silver-fang-mini-game/dist/assets/index-CS9tYjbg.js
2024-10-27 20:00:46 +02:00

6346 lines
1.4 MiB

var Dt=Object.defineProperty;var wt=(Tt,nt,gt)=>nt in Tt?Dt(Tt,nt,{enumerable:!0,configurable:!0,writable:!0,value:gt}):Tt[nt]=gt;var Rt=(Tt,nt,gt)=>wt(Tt,typeof nt!="symbol"?nt+"":nt,gt);(function(){const nt=document.createElement("link").relList;if(nt&&nt.supports&&nt.supports("modulepreload"))return;for(const ut of document.querySelectorAll('link[rel="modulepreload"]'))xt(ut);new MutationObserver(ut=>{for(const mt of ut)if(mt.type==="childList")for(const p of mt.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&xt(p)}).observe(document,{childList:!0,subtree:!0});function gt(ut){const mt={};return ut.integrity&&(mt.integrity=ut.integrity),ut.referrerPolicy&&(mt.referrerPolicy=ut.referrerPolicy),ut.crossOrigin==="use-credentials"?mt.credentials="include":ut.crossOrigin==="anonymous"?mt.credentials="omit":mt.credentials="same-origin",mt}function xt(ut){if(ut.ep)return;ut.ep=!0;const mt=gt(ut);fetch(ut.href,mt)}})();var Bt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Lt={exports:{}};(function(Tt,nt){(function(xt,ut){Tt.exports=ut()})(Bt,()=>(()=>{var gt={50792:p=>{var S=Object.prototype.hasOwnProperty,t="~";function d(){}Object.create&&(d.prototype=Object.create(null),new d().__proto__||(t=!1));function c(e,s,o){this.fn=e,this.context=s,this.once=o||!1}function h(e,s,o,i,a){if(typeof o!="function")throw new TypeError("The listener must be a function");var l=new c(o,i||e,a),u=t?t+s:s;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],l]:e._events[u].push(l):(e._events[u]=l,e._eventsCount++),e}function r(e,s){--e._eventsCount===0?e._events=new d:delete e._events[s]}function n(){this._events=new d,this._eventsCount=0}n.prototype.eventNames=function(){var s=[],o,i;if(this._eventsCount===0)return s;for(i in o=this._events)S.call(o,i)&&s.push(t?i.slice(1):i);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(o)):s},n.prototype.listeners=function(s){var o=t?t+s:s,i=this._events[o];if(!i)return[];if(i.fn)return[i.fn];for(var a=0,l=i.length,u=new Array(l);a<l;a++)u[a]=i[a].fn;return u},n.prototype.listenerCount=function(s){var o=t?t+s:s,i=this._events[o];return i?i.fn?1:i.length:0},n.prototype.emit=function(s,o,i,a,l,u){var f=t?t+s:s;if(!this._events[f])return!1;var v=this._events[f],m=arguments.length,g,x;if(v.fn){switch(v.once&&this.removeListener(s,v.fn,void 0,!0),m){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,o),!0;case 3:return v.fn.call(v.context,o,i),!0;case 4:return v.fn.call(v.context,o,i,a),!0;case 5:return v.fn.call(v.context,o,i,a,l),!0;case 6:return v.fn.call(v.context,o,i,a,l,u),!0}for(x=1,g=new Array(m-1);x<m;x++)g[x-1]=arguments[x];v.fn.apply(v.context,g)}else{var y=v.length,T;for(x=0;x<y;x++)switch(v[x].once&&this.removeListener(s,v[x].fn,void 0,!0),m){case 1:v[x].fn.call(v[x].context);break;case 2:v[x].fn.call(v[x].context,o);break;case 3:v[x].fn.call(v[x].context,o,i);break;case 4:v[x].fn.call(v[x].context,o,i,a);break;default:if(!g)for(T=1,g=new Array(m-1);T<m;T++)g[T-1]=arguments[T];v[x].fn.apply(v[x].context,g)}}return!0},n.prototype.on=function(s,o,i){return h(this,s,o,i,!1)},n.prototype.once=function(s,o,i){return h(this,s,o,i,!0)},n.prototype.removeListener=function(s,o,i,a){var l=t?t+s:s;if(!this._events[l])return this;if(!o)return r(this,l),this;var u=this._events[l];if(u.fn)u.fn===o&&(!a||u.once)&&(!i||u.context===i)&&r(this,l);else{for(var f=0,v=[],m=u.length;f<m;f++)(u[f].fn!==o||a&&!u[f].once||i&&u[f].context!==i)&&v.push(u[f]);v.length?this._events[l]=v.length===1?v[0]:v:r(this,l)}return this},n.prototype.removeAllListeners=function(s){var o;return s?(o=t?t+s:s,this._events[o]&&r(this,o)):(this._events=new d,this._eventsCount=0),this},n.prototype.off=n.prototype.removeListener,n.prototype.addListener=n.prototype.on,n.prefixed=t,n.EventEmitter=n,p.exports=n},11517:(p,S,t)=>{/**
* @author samme
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(38829),c=function(h,r,n,e){for(var s=h[0],o=1;o<h.length;o++){var i=h[o];d(i,s,r,n,e),s=i}return h};p.exports=c},80318:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66979),c=function(h,r,n,e,s){return d(h,"angle",r,n,e,s)};p.exports=c},60757:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){for(var h=0;h<t.length;h++){var r=t[h];d.call(c,r)}return t};p.exports=S},69927:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){c===void 0&&(c=0);for(var h=c;h<t.length;h++){var r=t[h],n=!0;for(var e in d)r[e]!==d[e]&&(n=!1);if(n)return r}return null};p.exports=S},32265:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){c===void 0&&(c=0);for(var h=t.length-1;h>=c;h--){var r=t[h],n=!0;for(var e in d)r[e]!==d[e]&&(n=!1);if(n)return r}return null};p.exports=S},94420:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(11879),c=t(60461),h=t(95540),r=t(29747),n=t(41481),e=new n({sys:{queueDepthSort:r,events:{once:r}}},0,0,1,1).setOrigin(0,0),s=function(o,i){i===void 0&&(i={});var a=i.hasOwnProperty("width"),l=i.hasOwnProperty("height"),u=h(i,"width",-1),f=h(i,"height",-1),v=h(i,"cellWidth",1),m=h(i,"cellHeight",v),g=h(i,"position",c.TOP_LEFT),x=h(i,"x",0),y=h(i,"y",0),T=0,C=0,E=u*v,M=f*m;e.setPosition(x,y),e.setSize(v,m);for(var P=0;P<o.length;P++)if(d(o[P],e,g),a&&u===-1)e.x+=v;else if(l&&f===-1)e.y+=m;else if(l&&!a){if(C+=m,e.y+=m,C===M&&(C=0,T+=v,e.y=y,e.x+=v,T===E))break}else if(T+=v,e.x+=v,T===E&&(T=0,C+=m,e.x=x,e.y+=m,C===M))break;return o};p.exports=s},41721:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66979),c=function(h,r,n,e,s){return d(h,"alpha",r,n,e,s)};p.exports=c},67285:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66979),c=function(h,r,n,e,s){return d(h,"x",r,n,e,s)};p.exports=c},9074:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66979),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"x",r,e,o,i),d(h,"y",n,s,o,i)};p.exports=c},75222:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66979),c=function(h,r,n,e,s){return d(h,"y",r,n,e,s)};p.exports=c},22983:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){c===void 0&&(c=0),h===void 0&&(h=6.28);for(var r=c,n=(h-c)/t.length,e=d.x,s=d.y,o=d.radius,i=0;i<t.length;i++)t[i].x=e+o*Math.cos(r),t[i].y=s+o*Math.sin(r),r+=n;return t};p.exports=S},95253:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){c===void 0&&(c=0),h===void 0&&(h=6.28);for(var r=c,n=(h-c)/t.length,e=d.width/2,s=d.height/2,o=0;o<t.length;o++)t[o].x=d.x+e*Math.cos(r),t[o].y=d.y+s*Math.sin(r),r+=n;return t};p.exports=S},88505:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(15258),c=t(26708),h=function(r,n,e){var s;e?s=c(n,e,r.length):s=d(n,r.length);for(var o=0;o<r.length;o++){var i=r[o],a=s[o];i.x=a.x,i.y=a.y}return r};p.exports=h},41346:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(14649),c=t(86003),h=t(49498),r=function(n,e,s){s===void 0&&(s=0);var o=d(e,!1,n.length);s>0?c(o,s):s<0&&h(o,Math.abs(s));for(var i=0;i<n.length;i++)n[i].x=o[i].x,n[i].y=o[i].y;return n};p.exports=r},11575:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(84993),c=function(h,r,n){var e=d({x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2},n),s=d({x1:r.x2,y1:r.y2,x2:r.x3,y2:r.y3},n),o=d({x1:r.x3,y1:r.y3,x2:r.x1,y2:r.y1},n);e.pop(),s.pop(),o.pop(),e=e.concat(s,o);for(var i=e.length/h.length,a=0,l=0;l<h.length;l++){var u=h[l],f=e[Math.floor(a)];u.x=f.x,u.y=f.y,a+=i}return h};p.exports=c},29953:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){for(var h=0;h<t.length;h++){var r=t[h];r.anims&&r.anims.play(d,c)}return t};p.exports=S},66979:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h,r,n){h===void 0&&(h=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,s=0,o=t.length;if(n===1)for(e=r;e<o;e++)t[e][d]+=c+s*h,s++;else for(e=r;e>=0;e--)t[e][d]+=c+s*h,s++;return t};p.exports=S},43967:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h,r,n){h===void 0&&(h=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,s=0,o=t.length;if(n===1)for(e=r;e<o;e++)t[e][d]=c+s*h,s++;else for(e=r;e>=0;e--)t[e][d]=c+s*h,s++;return t};p.exports=S},88926:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(28176),c=function(h,r){for(var n=0;n<h.length;n++)d(r,h[n]);return h};p.exports=c},33286:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(24820),c=function(h,r){for(var n=0;n<h.length;n++)d(r,h[n]);return h};p.exports=c},96e3:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(65822),c=function(h,r){for(var n=0;n<h.length;n++)d(r,h[n]);return h};p.exports=c},28789:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26597),c=function(h,r){for(var n=0;n<h.length;n++)d(r,h[n]);return h};p.exports=c},97154:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(90260),c=function(h,r){for(var n=0;n<h.length;n++)d(r,h[n]);return h};p.exports=c},20510:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66979),c=function(h,r,n,e,s){return d(h,"rotation",r,n,e,s)};p.exports=c},91051:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(1163),c=t(20339),h=function(r,n,e){for(var s=n.x,o=n.y,i=0;i<r.length;i++){var a=r[i];d(a,s,o,e,Math.max(1,c(a.x,a.y,s,o)))}return r};p.exports=h},76332:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(1163),c=function(h,r,n,e){var s=r.x,o=r.y;if(e===0)return h;for(var i=0;i<h.length;i++)d(h[i],s,o,n,e);return h};p.exports=c},61619:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66979),c=function(h,r,n,e,s){return d(h,"scaleX",r,n,e,s)};p.exports=c},94868:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66979),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"scaleX",r,e,o,i),d(h,"scaleY",n,s,o,i)};p.exports=c},95532:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66979),c=function(h,r,n,e,s){return d(h,"scaleY",r,n,e,s)};p.exports=c},8689:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e,s){return d(h,"alpha",r,n,e,s)};p.exports=c},2645:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e){return d(h,"blendMode",r,0,n,e)};p.exports=c},32372:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e,s){return d(h,"depth",r,n,e,s)};p.exports=c},85373:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){for(var h=0;h<t.length;h++)t[h].setInteractive(d,c);return t};p.exports=S},81583:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"originX",r,e,o,i),d(h,"originY",n,s,o,i),h.forEach(function(a){a.updateDisplayOrigin()}),h};p.exports=c},79939:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e,s){return d(h,"rotation",r,n,e,s)};p.exports=c},2699:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"scaleX",r,e,o,i),d(h,"scaleY",n,s,o,i)};p.exports=c},98739:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e,s){return d(h,"scaleX",r,n,e,s)};p.exports=c},98476:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e,s){return d(h,"scaleY",r,n,e,s)};p.exports=c},6207:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"scrollFactorX",r,e,o,i),d(h,"scrollFactorY",n,s,o,i)};p.exports=c},6607:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e,s){return d(h,"scrollFactorX",r,n,e,s)};p.exports=c},72248:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e,s){return d(h,"scrollFactorY",r,n,e,s)};p.exports=c},14036:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h,r){for(var n=0;n<t.length;n++)t[n].setTint(d,c,h,r);return t};p.exports=S},50159:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e){return d(h,"visible",r,0,n,e)};p.exports=c},77597:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e,s){return d(h,"x",r,n,e,s)};p.exports=c},83194:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"x",r,e,o,i),d(h,"y",n,s,o,i)};p.exports=c},67678:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43967),c=function(h,r,n,e,s){return d(h,"y",r,n,e,s)};p.exports=c},35850:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26099),c=function(h,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=new d);var o,i,a=h.length;if(a===1)o=h[0].x,i=h[0].y,h[0].x=r,h[0].y=n;else{var l=1,u=0;e===0&&(u=a-1,l=a-2),o=h[u].x,i=h[u].y,h[u].x=r,h[u].y=n;for(var f=0;f<a;f++)if(!(l>=a||l===-1)){var v=h[l],m=v.x,g=v.y;v.x=o,v.y=i,o=m,i=g,e===0?l--:l++}}return s.x=o,s.y=i,s};p.exports=c},8628:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(33680),c=function(h){return d(h)};p.exports=c},21837:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7602),c=function(h,r,n,e,s){s===void 0&&(s=!1);var o=Math.abs(e-n)/h.length,i;if(s)for(i=0;i<h.length;i++)h[i][r]+=d(i*o,n,e);else for(i=0;i<h.length;i++)h[i][r]=d(i*o,n,e);return h};p.exports=c},21910:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(54261),c=function(h,r,n,e,s){s===void 0&&(s=!1);var o=Math.abs(e-n)/h.length,i;if(s)for(i=0;i<h.length;i++)h[i][r]+=d(i*o,n,e);else for(i=0;i<h.length;i++)h[i][r]=d(i*o,n,e);return h};p.exports=c},62054:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h,r){if(r===void 0&&(r=!1),t.length===0)return t;if(t.length===1)return r?t[0][d]+=(h+c)/2:t[0][d]=(h+c)/2,t;var n=Math.abs(h-c)/(t.length-1),e;if(r)for(e=0;e<t.length;e++)t[e][d]+=e*n+c;else for(e=0;e<t.length;e++)t[e][d]=e*n+c;return t};p.exports=S},79815:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){for(var d=0;d<t.length;d++)t[d].visible=!t[d].visible;return t};p.exports=S},39665:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author samme <samme.npm@gmail.com>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(15994),c=function(h,r,n){n===void 0&&(n=0);for(var e=0;e<h.length;e++){var s=h[e];s.x=d(s.x,r.left-n,r.right+n),s.y=d(s.y,r.top-n,r.bottom+n)}return h};p.exports=c},61061:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={AlignTo:t(11517),Angle:t(80318),Call:t(60757),GetFirst:t(69927),GetLast:t(32265),GridAlign:t(94420),IncAlpha:t(41721),IncX:t(67285),IncXY:t(9074),IncY:t(75222),PlaceOnCircle:t(22983),PlaceOnEllipse:t(95253),PlaceOnLine:t(88505),PlaceOnRectangle:t(41346),PlaceOnTriangle:t(11575),PlayAnimation:t(29953),PropertyValueInc:t(66979),PropertyValueSet:t(43967),RandomCircle:t(88926),RandomEllipse:t(33286),RandomLine:t(96e3),RandomRectangle:t(28789),RandomTriangle:t(97154),Rotate:t(20510),RotateAround:t(91051),RotateAroundDistance:t(76332),ScaleX:t(61619),ScaleXY:t(94868),ScaleY:t(95532),SetAlpha:t(8689),SetBlendMode:t(2645),SetDepth:t(32372),SetHitArea:t(85373),SetOrigin:t(81583),SetRotation:t(79939),SetScale:t(2699),SetScaleX:t(98739),SetScaleY:t(98476),SetScrollFactor:t(6207),SetScrollFactorX:t(6607),SetScrollFactorY:t(72248),SetTint:t(14036),SetVisible:t(50159),SetX:t(77597),SetXY:t(83194),SetY:t(67678),ShiftPosition:t(35850),Shuffle:t(8628),SmootherStep:t(21910),SmoothStep:t(21837),Spread:t(62054),ToggleVisible:t(79815),WrapInRectangle:t(39665)}},42099:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45319),c=t(83419),h=t(74943),r=t(81957),n=t(41138),e=t(35154),s=t(90126),o=new c({initialize:function(a,l,u){this.manager=a,this.key=l,this.type="frame",this.frames=this.getFrames(a.textureManager,e(u,"frames",[]),e(u,"defaultTextureKey",null),e(u,"sortFrames",!0)),this.frameRate=e(u,"frameRate",null),this.duration=e(u,"duration",null),this.msPerFrame,this.skipMissedFrames=e(u,"skipMissedFrames",!0),this.delay=e(u,"delay",0),this.repeat=e(u,"repeat",0),this.repeatDelay=e(u,"repeatDelay",0),this.yoyo=e(u,"yoyo",!1),this.showBeforeDelay=e(u,"showBeforeDelay",!1),this.showOnStart=e(u,"showOnStart",!1),this.hideOnComplete=e(u,"hideOnComplete",!1),this.randomFrame=e(u,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(h.PAUSE_ALL,this.pause,this),this.manager.on(h.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(i,a,l,u){l===null&&u===null?(i.frameRate=24,i.duration=24/a*1e3):l&&u===null?(i.duration=l,i.frameRate=a/(l/1e3)):(i.frameRate=u,i.duration=a/u*1e3),i.msPerFrame=1e3/i.frameRate},addFrame:function(i){return this.addFrameAt(this.frames.length,i)},addFrameAt:function(i,a){var l=this.getFrames(this.manager.textureManager,a);if(l.length>0){if(i===0)this.frames=l.concat(this.frames);else if(i===this.frames.length)this.frames=this.frames.concat(l);else{var u=this.frames.slice(0,i),f=this.frames.slice(i);this.frames=u.concat(l,f)}this.updateFrameSequence()}return this},checkFrame:function(i){return i>=0&&i<this.frames.length},getFirstTick:function(i){i.accumulator=0,i.nextTick=i.currentFrame.duration?i.currentFrame.duration:i.msPerFrame},getFrameAt:function(i){return this.frames[i]},getFrames:function(i,a,l,u){u===void 0&&(u=!0);var f=[],v,m,g=1,x,y;if(typeof a=="string"){if(y=a,!i.exists(y))return console.warn('Texture "%s" not found',y),f;var T=i.get(y),C=T.getFrameNames();u&&s(C),a=[],C.forEach(function(F){a.push({key:y,frame:F})})}if(!Array.isArray(a)||a.length===0)return f;for(x=0;x<a.length;x++){var E=a[x],M=e(E,"key",l);if(M){var P=e(E,"frame",0),A=i.getFrame(M,P);if(!A){console.warn('Texture "%s" not found',M);continue}m=new n(M,P,g,A),m.duration=e(E,"duration",0),m.isFirst=!v,v&&(v.nextFrame=m,m.prevFrame=v),f.push(m),v=m,g++}}if(f.length>0){m.isLast=!0,m.nextFrame=f[0],f[0].prevFrame=m;var R=1/(f.length-1);for(x=0;x<f.length;x++)f[x].progress=x*R}return f},getNextTick:function(i){i.accumulator-=i.nextTick,i.nextTick=i.currentFrame.duration?i.currentFrame.duration:i.msPerFrame},getFrameByProgress:function(i){return i=d(i,0,1),r(i,this.frames,"progress")},nextFrame:function(i){var a=i.currentFrame;a.isLast?i.yoyo?this.handleYoyoFrame(i,!1):i.repeatCounter>0?i.inReverse&&i.forward?i.forward=!1:this.repeatAnimation(i):i.complete():this.updateAndGetNextTick(i,a.nextFrame)},handleYoyoFrame:function(i,a){if(a||(a=!1),i.inReverse===!a&&i.repeatCounter>0){(i.repeatDelay===0||i.pendingRepeat)&&(i.forward=a),this.repeatAnimation(i);return}if(i.inReverse!==a&&i.repeatCounter===0){i.complete();return}i.forward=a;var l=a?i.currentFrame.nextFrame:i.currentFrame.prevFrame;this.updateAndGetNextTick(i,l)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(i){var a=i.currentFrame;a.isFirst?i.yoyo?this.handleYoyoFrame(i,!0):i.repeatCounter>0?i.inReverse&&!i.forward?this.repeatAnimation(i):(i.forward=!0,this.repeatAnimation(i)):i.complete():this.updateAndGetNextTick(i,a.prevFrame)},updateAndGetNextTick:function(i,a){i.setCurrentFrame(a),this.getNextTick(i)},removeFrame:function(i){var a=this.frames.indexOf(i);return a!==-1&&this.removeFrameAt(a),this},removeFrameAt:function(i){return this.frames.splice(i,1),this.updateFrameSequence(),this},repeatAnimation:function(i){if(i._pendingStop===2){if(i._pendingStopValue===0)return i.stop();i._pendingStopValue--}i.repeatDelay>0&&!i.pendingRepeat?(i.pendingRepeat=!0,i.accumulator-=i.nextTick,i.nextTick+=i.repeatDelay):(i.repeatCounter--,i.forward?i.setCurrentFrame(i.currentFrame.nextFrame):i.setCurrentFrame(i.currentFrame.prevFrame),i.isPlaying&&(this.getNextTick(i),i.handleRepeat()))},toJSON:function(){var i={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,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(a){i.frames.push(a.toJSON())}),i},updateFrameSequence:function(){for(var i=this.frames.length,a=1/(i-1),l,u=0;u<i;u++)l=this.frames[u],l.index=u+1,l.isFirst=!1,l.isLast=!1,l.progress=u*a,u===0?(l.isFirst=!0,i===1?(l.isLast=!0,l.nextFrame=l,l.prevFrame=l):(l.isLast=!1,l.prevFrame=this.frames[i-1],l.nextFrame=this.frames[u+1])):u===i-1&&i>1?(l.isLast=!0,l.prevFrame=this.frames[i-2],l.nextFrame=this.frames[0]):i>1&&(l.prevFrame=this.frames[u-1],l.nextFrame=this.frames[u+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(h.PAUSE_ALL,this.pause,this),this.manager.off(h.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var i=0;i<this.frames.length;i++)this.frames[i].destroy();this.frames=[],this.manager=null}});p.exports=o},41138:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n,e,s,o){o===void 0&&(o=!1),this.textureKey=r,this.textureFrame=n,this.index=e,this.frame=s,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=o},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});p.exports=c},60848:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(42099),c=t(83419),h=t(90330),r=t(50792),n=t(74943),e=t(8443),s=t(95540),o=t(35154),i=t(36383),a=t(20283),l=t(41836),u=new c({Extends:r,initialize:function(v){r.call(this),this.game=v,this.textureManager=null,this.globalTimeScale=1,this.anims=new h,this.mixes=new h,this.paused=!1,this.name="AnimationManager",v.events.once(e.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(e.DESTROY,this.destroy,this)},addMix:function(f,v,m){var g=this.anims,x=this.mixes,y=typeof f=="string"?f:f.key,T=typeof v=="string"?v:v.key;if(g.has(y)&&g.has(T)){var C=x.get(y);C||(C={}),C[T]=m,x.set(y,C)}return this},removeMix:function(f,v){var m=this.mixes,g=typeof f=="string"?f:f.key,x=m.get(g);if(x)if(v){var y=typeof v=="string"?v:v.key;x.hasOwnProperty(y)&&delete x[y]}else v||m.delete(g);return this},getMix:function(f,v){var m=this.mixes,g=typeof f=="string"?f:f.key,x=typeof v=="string"?v:v.key,y=m.get(g);return y&&y.hasOwnProperty(x)?y[x]:0},add:function(f,v){return this.anims.has(f)?(console.warn("Animation key exists: "+f),this):(v.key=f,this.anims.set(f,v),this.emit(n.ADD_ANIMATION,f,v),this)},exists:function(f){return this.anims.has(f)},createFromAseprite:function(f,v,m){var g=[],x=this.game.cache.json.get(f);if(!x)return console.warn("No Aseprite data found for: "+f),g;var y=this,T=o(x,"meta",null),C=o(x,"frames",null);if(T&&C){var E=o(T,"frameTags",[]);E.forEach(function(M){var P=[],A=s(M,"name",null),R=s(M,"from",0),F=s(M,"to",0),w=s(M,"direction","forward");if(A&&(!v||v&&v.indexOf(A)>-1)){for(var B=0,N=R;N<=F;N++){var U=N.toString(),D=C[U];if(D){var I=s(D,"duration",i.MAX_SAFE_INTEGER);P.push({key:f,frame:U,duration:I}),B+=I}}w==="reverse"&&(P=P.reverse());var O={key:A,frames:P,duration:B,yoyo:w==="pingpong"},L;m?m.anims&&(L=m.anims.create(O)):L=y.create(O),L&&g.push(L)}})}return g},create:function(f){var v=f.key,m=!1;return v&&(m=this.get(v),m?console.warn("AnimationManager key already exists: "+v):(m=new d(this,v,f),this.anims.set(v,m),this.emit(n.ADD_ANIMATION,v,m))),m},fromJSON:function(f,v){v===void 0&&(v=!1),v&&this.anims.clear(),typeof f=="string"&&(f=JSON.parse(f));var m=[];if(f.hasOwnProperty("anims")&&Array.isArray(f.anims)){for(var g=0;g<f.anims.length;g++)m.push(this.create(f.anims[g]));f.hasOwnProperty("globalTimeScale")&&(this.globalTimeScale=f.globalTimeScale)}else f.hasOwnProperty("key")&&f.type==="frame"&&m.push(this.create(f));return m},generateFrameNames:function(f,v){var m=o(v,"prefix",""),g=o(v,"start",0),x=o(v,"end",0),y=o(v,"suffix",""),T=o(v,"zeroPad",0),C=o(v,"outputArray",[]),E=o(v,"frames",!1);if(!this.textureManager.exists(f))return console.warn('Texture "%s" not found',f),C;var M=this.textureManager.get(f);if(!M)return C;var P;if(v)for(E||(E=a(g,x)),P=0;P<E.length;P++){var A=m+l(E[P],T,"0",1)+y;M.has(A)?C.push({key:f,frame:A}):console.warn('Frame "%s" not found in texture "%s"',A,f)}else for(E=M.getFrameNames(),P=0;P<E.length;P++)C.push({key:f,frame:E[P]});return C},generateFrameNumbers:function(f,v){var m=o(v,"start",0),g=o(v,"end",-1),x=o(v,"first",!1),y=o(v,"outputArray",[]),T=o(v,"frames",!1);if(!this.textureManager.exists(f))return console.warn('Texture "%s" not found',f),y;var C=this.textureManager.get(f);if(!C)return y;x&&C.has(x)&&y.push({key:f,frame:x}),T||(g===-1&&(g=C.frameTotal-2),T=a(m,g));for(var E=0;E<T.length;E++){var M=T[E];C.has(M)?y.push({key:f,frame:M}):console.warn('Frame "%s" not found in texture "%s"',M,f)}return y},get:function(f){return this.anims.get(f)},getAnimsFromTexture:function(f){for(var v=this.textureManager.get(f),m=v.key,g=this.anims.getArray(),x=[],y=0;y<g.length;y++)for(var T=g[y],C=T.frames,E=0;E<C.length;E++)if(C[E].textureKey===m){x.push(T.key);break}return x},pauseAll:function(){return this.paused||(this.paused=!0,this.emit(n.PAUSE_ALL)),this},play:function(f,v){Array.isArray(v)||(v=[v]);for(var m=0;m<v.length;m++)v[m].anims.play(f);return this},staggerPlay:function(f,v,m,g){m===void 0&&(m=0),g===void 0&&(g=!0),Array.isArray(v)||(v=[v]);var x=v.length;g||x--;for(var y=0;y<v.length;y++){var T=m<0?Math.abs(m)*(x-y):m*y;v[y].anims.playAfterDelay(f,T)}return this},remove:function(f){var v=this.get(f);return v&&(this.emit(n.REMOVE_ANIMATION,f,v),this.anims.delete(f),this.removeMix(f)),v},resumeAll:function(){return this.paused&&(this.paused=!1,this.emit(n.RESUME_ALL)),this},toJSON:function(f){var v={anims:[],globalTimeScale:this.globalTimeScale};return f!==void 0&&f!==""?v.anims.push(this.anims.get(f).toJSON()):this.anims.each(function(m,g){v.anims.push(g.toJSON())}),v},destroy:function(){this.anims.clear(),this.mixes.clear(),this.textureManager=null,this.game=null}});p.exports=u},9674:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(42099),c=t(30976),h=t(83419),r=t(90330),n=t(74943),e=t(95540),s=new h({initialize:function(i){this.parent=i,this.animationManager=i.scene.sys.anims,this.animationManager.on(n.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.randomFrame=!1,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(o){var i=this.parent;if(o===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,i;Array.isArray(o)||(o=[o]);for(var a=0;a<o.length;a++){var l=o[a];this.nextAnim?this.nextAnimsQueue.push(l):this.nextAnim=l}return this.parent},getName:function(){return this.currentAnim?this.currentAnim.key:""},getFrameName:function(){return this.currentFrame?this.currentFrame.textureFrame:""},load:function(o){this.isPlaying&&this.stop();var i=this.animationManager,a=typeof o=="string"?o:e(o,"key",null),l=this.exists(a)?this.get(a):i.get(a);if(!l)console.warn("Missing animation: "+a);else{this.currentAnim=l;var u=l.getTotalFrames(),f=e(o,"frameRate",l.frameRate),v=e(o,"duration",l.duration);l.calculateDuration(this,u,v,f),this.delay=e(o,"delay",l.delay),this.repeat=e(o,"repeat",l.repeat),this.repeatDelay=e(o,"repeatDelay",l.repeatDelay),this.yoyo=e(o,"yoyo",l.yoyo),this.showBeforeDelay=e(o,"showBeforeDelay",l.showBeforeDelay),this.showOnStart=e(o,"showOnStart",l.showOnStart),this.hideOnComplete=e(o,"hideOnComplete",l.hideOnComplete),this.skipMissedFrames=e(o,"skipMissedFrames",l.skipMissedFrames),this.randomFrame=e(o,"randomFrame",l.randomFrame),this.timeScale=e(o,"timeScale",this.timeScale);var m=e(o,"startFrame",0);m>u&&(m=0),this.randomFrame&&(m=c(0,u-1));var g=l.frames[m];m===0&&!this.forward&&(g=l.getLastFrame()),this.currentFrame=g}return this.parent},pause:function(o){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),o!==void 0&&this.setCurrentFrame(o),this.parent},resume:function(o){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),o!==void 0&&this.setCurrentFrame(o),this.parent},playAfterDelay:function(o,i){if(!this.isPlaying)this.delayCounter=i,this.play(o,!0);else{var a=this.nextAnim,l=this.nextAnimsQueue;a&&l.unshift(a),this.nextAnim=o,this._pendingStop=1,this._pendingStopValue=i}return this.parent},playAfterRepeat:function(o,i){if(i===void 0&&(i=1),!this.isPlaying)this.play(o);else{var a=this.nextAnim,l=this.nextAnimsQueue;a&&l.unshift(a),this.repeatCounter!==-1&&i>this.repeatCounter&&(i=this.repeatCounter),this.nextAnim=o,this._pendingStop=2,this._pendingStopValue=i}return this.parent},play:function(o,i){i===void 0&&(i=!1);var a=this.currentAnim,l=this.parent,u=typeof o=="string"?o:o.key;if(i&&this.isPlaying&&a.key===u)return l;if(a&&this.isPlaying){var f=this.animationManager.getMix(a.key,o);if(f>0)return this.playAfterDelay(o,f)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(o)},playReverse:function(o,i){i===void 0&&(i=!1);var a=typeof o=="string"?o:o.key;return i&&this.isPlaying&&this.currentAnim.key===a?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(o))},startAnimation:function(o){this.load(o);var i=this.currentAnim,a=this.parent;return i&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,i.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,this.delayCounter===0?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame)),a},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(n.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(n.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(n.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(n.ANIMATION_COMPLETE,n.ANIMATION_COMPLETE_KEY)},emitEvents:function(o,i){var a=this.currentAnim;if(a){var l=this.currentFrame,u=this.parent,f=l.textureFrame;u.emit(o,a,l,u,f),i&&u.emit(i+a.key,a,l,u,f)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var o=this.currentFrame;if(!o)return 0;var i=o.progress;return this.inReverse&&(i*=-1),i},setProgress:function(o){return this.forward||(o=1-o),this.setCurrentFrame(this.currentAnim.getFrameByProgress(o)),this.parent},setRepeat:function(o){return this.repeatCounter=o===-1?Number.MAX_VALUE:o,this.parent},globalRemove:function(o,i){i===void 0&&(i=this.currentAnim),this.isPlaying&&i.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(o,i){o===void 0&&(o=!1),i===void 0&&(i=!1);var a=this.currentAnim,l=this.parent;return a?(i&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),a.getFirstTick(this),this.emitEvents(n.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!o,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(a.frames[0]),this.parent):l},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var o=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(o)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var o=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(o)}return this.parent},stopAfterDelay:function(o){return this._pendingStop=1,this._pendingStopValue=o,this.parent},stopAfterRepeat:function(o){return o===void 0&&(o=1),this.repeatCounter!==-1&&o>this.repeatCounter&&(o=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=o,this.parent},stopOnFrame:function(o){return this._pendingStop=3,this._pendingStopValue=o,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(o,i){var a=this.currentAnim;if(!(!this.isPlaying||!a||a.paused)){if(this.accumulator+=i*this.timeScale*this.animationManager.globalTimeScale,this._pendingStop===1&&(this._pendingStopValue-=i,this._pendingStopValue<=0))return this.stop();if(!this.hasStarted)this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart());else if(this.accumulator>=this.nextTick&&(this.forward?a.nextFrame(this):a.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var l=0;do this.forward?a.nextFrame(this):a.previousFrame(this),l++;while(this.isPlaying&&this.accumulator>this.nextTick&&l<60)}}},setCurrentFrame:function(o){var i=this.parent;return this.currentFrame=o,i.texture=o.frame.texture,i.frame=o.frame,i.isCropped&&i.frame.updateCropUVs(i._crop,i.flipX,i.flipY),o.setAlpha&&(i.alpha=o.alpha),i.setSizeToFrame(),i._originComponent&&(o.frame.customPivot?i.setOrigin(o.frame.pivotX,o.frame.pivotY):i.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(n.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===o&&this.stop()),i},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(o){return this.anims?this.anims.get(o):null},exists:function(o){return this.anims?this.anims.has(o):!1},create:function(o){var i=o.key,a=!1;return i&&(a=this.get(i),a?console.warn("Animation key already exists: "+i):(a=new d(this,i,o),this.anims||(this.anims=new r),this.anims.set(i,a))),a},createFromAseprite:function(o,i){return this.animationManager.createFromAseprite(o,i,this.parent)},generateFrameNames:function(o,i){return this.animationManager.generateFrameNames(o,i)},generateFrameNumbers:function(o,i){return this.animationManager.generateFrameNumbers(o,i)},remove:function(o){var i=this.get(o);return i&&(this.currentAnim===i&&this.stop(),this.anims.delete(o)),i},destroy:function(){this.animationManager.off(n.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}}});p.exports=s},57090:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="add"},25312:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="animationcomplete"},89580:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="animationcomplete-"},52860:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="animationrepeat"},63850:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="animationrestart"},99085:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="animationstart"},28087:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="animationstop"},1794:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="animationupdate"},52562:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pauseall"},57953:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="remove"},68339:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="resumeall"},74943:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={ADD_ANIMATION:t(57090),ANIMATION_COMPLETE:t(25312),ANIMATION_COMPLETE_KEY:t(89580),ANIMATION_REPEAT:t(52860),ANIMATION_RESTART:t(63850),ANIMATION_START:t(99085),ANIMATION_STOP:t(28087),ANIMATION_UPDATE:t(1794),PAUSE_ALL:t(52562),REMOVE_ANIMATION:t(57953),RESUME_ALL:t(68339)}},60421:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Animation:t(42099),AnimationFrame:t(41138),AnimationManager:t(60848),AnimationState:t(9674),Events:t(74943)}},2161:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(90330),h=t(50792),r=t(24736),n=new d({initialize:function(){this.entries=new c,this.events=new h},add:function(e,s){return this.entries.set(e,s),this.events.emit(r.ADD,this,e,s),this},has:function(e){return this.entries.has(e)},exists:function(e){return this.entries.has(e)},get:function(e){return this.entries.get(e)},remove:function(e){var s=this.get(e);return s&&(this.entries.delete(e),this.events.emit(r.REMOVE,this,e,s.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});p.exports=n},24047:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2161),c=t(83419),h=t(8443),r=new c({initialize:function(e){this.game=e,this.binary=new d,this.bitmapFont=new d,this.json=new d,this.physics=new d,this.shader=new d,this.audio=new d,this.video=new d,this.text=new d,this.html=new d,this.obj=new d,this.tilemap=new d,this.xml=new d,this.custom={},this.game.events.once(h.DESTROY,this.destroy,this)},addCustom:function(n){return this.custom.hasOwnProperty(n)||(this.custom[n]=new d),this.custom[n]},destroy:function(){for(var n=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e<n.length;e++)this[n[e]].destroy(),this[n[e]]=null;for(var s in this.custom)this.custom[s].destroy();this.custom=null,this.game=null}});p.exports=r},51464:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="add"},59261:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="remove"},24736:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={ADD:t(51464),REMOVE:t(59261)}},83388:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={BaseCache:t(2161),CacheManager:t(24047),Events:t(24736)}},71911:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(31401),h=t(39506),r=t(50792),n=t(19715),e=t(87841),s=t(61340),o=t(80333),i=t(26099),a=new d({Extends:r,Mixins:[c.AlphaSingle,c.Visible],initialize:function(u,f,v,m){u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=0),m===void 0&&(m=0),r.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new e,this.dirty=!0,this._x=u,this._y=f,this._width=v,this._height=m,this._bounds=new e,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new s,this.transparent=!0,this.backgroundColor=o("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new i(v/2,m/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0,this.renderRoundPixels=!0},addToRenderList:function(l){this.renderList.push(l)},setOrigin:function(l,u){return l===void 0&&(l=.5),u===void 0&&(u=l),this.originX=l,this.originY=u,this},getScroll:function(l,u,f){f===void 0&&(f=new i);var v=this.width*.5,m=this.height*.5;return f.x=l-v,f.y=u-m,this.useBounds&&(f.x=this.clampX(f.x),f.y=this.clampY(f.y)),f},centerOnX:function(l){var u=this.width*.5;return this.midPoint.x=l,this.scrollX=l-u,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(l){var u=this.height*.5;return this.midPoint.y=l,this.scrollY=l-u,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(l,u){return this.centerOnX(l),this.centerOnY(u),this},centerToBounds:function(){if(this.useBounds){var l=this._bounds,u=this.width*.5,f=this.height*.5;this.midPoint.set(l.centerX,l.centerY),this.scrollX=l.centerX-u,this.scrollY=l.centerY-f}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(l){if(this.disableCull)return l;var u=this.matrix.matrix,f=u[0],v=u[1],m=u[2],g=u[3],x=f*g-v*m;if(!x)return l;var y=u[4],T=u[5],C=this.scrollX,E=this.scrollY,M=this.width,P=this.height,A=this.y,R=A+P,F=this.x,w=F+M,B=this.culledObjects,N=l.length;x=1/x,B.length=0;for(var U=0;U<N;++U){var D=l[U];if(!D.hasOwnProperty("width")||D.parentContainer){B.push(D);continue}var I=D.width,O=D.height,L=D.x-C*D.scrollFactorX-I*D.originX,G=D.y-E*D.scrollFactorY-O*D.originY,z=L*f+G*m+y,X=L*v+G*g+T,V=(L+I)*f+(G+O)*m+y,Y=(L+I)*v+(G+O)*g+T;V>F&&z<w&&Y>A&&X<R&&B.push(D)}return B},getWorldPoint:function(l,u,f){f===void 0&&(f=new i);var v=this.matrix.matrix,m=v[0],g=v[1],x=v[2],y=v[3],T=v[4],C=v[5],E=m*y-g*x;if(!E)return f.x=l,f.y=u,f;E=1/E;var M=y*E,P=-g*E,A=-x*E,R=m*E,F=(x*C-y*T)*E,w=(g*T-m*C)*E,B=Math.cos(this.rotation),N=Math.sin(this.rotation),U=this.zoomX,D=this.zoomY,I=this.scrollX,O=this.scrollY,L=l+(I*B-O*N)*U,G=u+(I*N+O*B)*D;return f.x=L*M+G*A+F,f.y=L*P+G*R+w,f},ignore:function(l){var u=this.id;Array.isArray(l)||(l=[l]);for(var f=0;f<l.length;f++){var v=l[f];Array.isArray(v)?this.ignore(v):v.isParent?this.ignore(v.getChildren()):v.cameraFilter|=u}return this},clampX:function(l){var u=this._bounds,f=this.displayWidth,v=u.x+(f-this.width)/2,m=Math.max(v,v+u.width-f);return l<v?l=v:l>m&&(l=m),l},clampY:function(l){var u=this._bounds,f=this.displayHeight,v=u.y+(f-this.height)/2,m=Math.max(v,v+u.height-f);return l<v?l=v:l>m&&(l=m),l},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(l){return l===void 0&&(l=0),this.rotation=h(l),this},setBackgroundColor:function(l){return l===void 0&&(l="rgba(0,0,0,0)"),this.backgroundColor=o(l),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(l,u,f,v,m){return m===void 0&&(m=!1),this._bounds.setTo(l,u,f,v),this.dirty=!0,this.useBounds=!0,m?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(l){l===void 0&&(l=new e);var u=this._bounds;return l.setTo(u.x,u.y,u.width,u.height),l},setName:function(l){return l===void 0&&(l=""),this.name=l,this},setPosition:function(l,u){return u===void 0&&(u=l),this.x=l,this.y=u,this},setRotation:function(l){return l===void 0&&(l=0),this.rotation=l,this},setRoundPixels:function(l){return this.roundPixels=l,this},setScene:function(l,u){u===void 0&&(u=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=l,this.isSceneCamera=u;var f=l.sys;return this.sceneManager=f.game.scene,this.scaleManager=f.scale,this.cameraManager=f.cameras,this.updateSystem(),this},setScroll:function(l,u){return u===void 0&&(u=l),this.scrollX=l,this.scrollY=u,this},setSize:function(l,u){return u===void 0&&(u=l),this.width=l,this.height=u,this},setViewport:function(l,u,f,v){return this.x=l,this.y=u,this.width=f,this.height=v,this},setZoom:function(l,u){return l===void 0&&(l=1),u===void 0&&(u=l),l===0&&(l=.001),u===0&&(u=.001),this.zoomX=l,this.zoomY=u,this},setMask:function(l,u){return u===void 0&&(u=!0),this.mask=l,this._maskCamera=u?this.cameraManager.default:this,this},clearMask:function(l){return l===void 0&&(l=!1),l&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var l={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&&(l.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),l},update:function(){},setIsSceneCamera:function(l){return this.isSceneCamera=l,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var l=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,u=this.sceneManager;l&&!this._customViewport?u.customViewports++:!l&&this._customViewport&&u.customViewports--,this.dirty=!0,this._customViewport=l}},destroy:function(){this.emit(n.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(l){this._x=l,this.updateSystem()}},y:{get:function(){return this._y},set:function(l){this._y=l,this.updateSystem()}},width:{get:function(){return this._width},set:function(l){this._width=l,this.updateSystem()}},height:{get:function(){return this._height},set:function(l){this._height=l,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(l){l!==this._scrollX&&(this._scrollX=l,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(l){l!==this._scrollY&&(this._scrollY=l,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(l){this._zoomX=l,this._zoomY=l,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(l){this._zoomX=l,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(l){this._zoomY=l,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(l){this._rotation=l,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}}});p.exports=a},38058:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(71911),c=t(67502),h=t(45319),r=t(83419),n=t(31401),e=t(20052),s=t(19715),o=t(28915),i=t(87841),a=t(26099),l=new r({Extends:d,Mixins:[n.PostPipeline],initialize:function(f,v,m,g){d.call(this,f,v,m,g),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new e.Fade(this),this.flashEffect=new e.Flash(this),this.shakeEffect=new e.Shake(this),this.panEffect=new e.Pan(this),this.rotateToEffect=new e.RotateTo(this),this.zoomEffect=new e.Zoom(this),this.lerp=new a(1,1),this.followOffset=new a,this.deadzone=null,this._follow=null},setDeadzone:function(u,f){if(u===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=u,this.deadzone.height=f):this.deadzone=new i(0,0,u,f),this._follow){var v=this.width/2,m=this.height/2,g=this._follow.x-this.followOffset.x,x=this._follow.y-this.followOffset.y;this.midPoint.set(g,x),this.scrollX=g-v,this.scrollY=x-m}c(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(u,f,v,m,g,x){return this.fadeEffect.start(!1,u,f,v,m,!0,g,x)},fadeOut:function(u,f,v,m,g,x){return this.fadeEffect.start(!0,u,f,v,m,!0,g,x)},fadeFrom:function(u,f,v,m,g,x,y){return this.fadeEffect.start(!1,u,f,v,m,g,x,y)},fade:function(u,f,v,m,g,x,y){return this.fadeEffect.start(!0,u,f,v,m,g,x,y)},flash:function(u,f,v,m,g,x,y){return this.flashEffect.start(u,f,v,m,g,x,y)},shake:function(u,f,v,m,g){return this.shakeEffect.start(u,f,v,m,g)},pan:function(u,f,v,m,g,x,y){return this.panEffect.start(u,f,v,m,g,x,y)},rotateTo:function(u,f,v,m,g,x,y){return this.rotateToEffect.start(u,f,v,m,g,x,y)},zoomTo:function(u,f,v,m,g,x){return this.zoomEffect.start(u,f,v,m,g,x)},preRender:function(){this.renderList.length=0;var u=this.width,f=this.height,v=u*.5,m=f*.5,g=this.zoomX,x=this.zoomY,y=this.matrix;this.renderRoundPixels=this.roundPixels&&Number.isInteger(g)&&Number.isInteger(x);var T=u*this.originX,C=f*this.originY,E=this._follow,M=this.deadzone,P=this.scrollX,A=this.scrollY;M&&c(M,this.midPoint.x,this.midPoint.y);var R=!1;if(E&&!this.panEffect.isRunning){var F=this.lerp,w=E.x-this.followOffset.x,B=E.y-this.followOffset.y;M?(w<M.x?P=o(P,P-(M.x-w),F.x):w>M.right&&(P=o(P,P+(w-M.right),F.x)),B<M.y?A=o(A,A-(M.y-B),F.y):B>M.bottom&&(A=o(A,A+(B-M.bottom),F.y))):(P=o(P,w-T,F.x),A=o(A,B-C,F.y)),R=!0}this.roundPixels&&(P=Math.floor(P),A=Math.floor(A)),this.useBounds&&(P=this.clampX(P),A=this.clampY(A)),this.scrollX=P,this.scrollY=A;var N=P+v,U=A+m;this.midPoint.set(N,U);var D=Math.floor(u/g+.5),I=Math.floor(f/x+.5),O=Math.floor(N-D/2+.5),L=Math.floor(U-I/2+.5);this.worldView.setTo(O,L,D,I),y.applyITRS(Math.floor(this.x+T+.5),Math.floor(this.y+C+.5),this.rotation,g,x),y.translate(-T,-C),this.shakeEffect.preRender(),R&&this.emit(s.FOLLOW_UPDATE,this,E)},setLerp:function(u,f){return u===void 0&&(u=1),f===void 0&&(f=u),this.lerp.set(u,f),this},setFollowOffset:function(u,f){return u===void 0&&(u=0),f===void 0&&(f=0),this.followOffset.set(u,f),this},startFollow:function(u,f,v,m,g,x){f===void 0&&(f=!1),v===void 0&&(v=1),m===void 0&&(m=v),g===void 0&&(g=0),x===void 0&&(x=g),this._follow=u,this.roundPixels=f,v=h(v,0,1),m=h(m,0,1),this.lerp.set(v,m),this.followOffset.set(g,x);var y=this.width/2,T=this.height/2,C=u.x-g,E=u.y-x;return this.midPoint.set(C,E),this.scrollX=C-y,this.scrollY=E-T,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(u,f){this.visible&&(this.rotateToEffect.update(u,f),this.panEffect.update(u,f),this.zoomEffect.update(u,f),this.shakeEffect.update(u,f),this.flashEffect.update(u,f),this.fadeEffect.update(u,f))},destroy:function(){this.resetFX(),d.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});p.exports=l},32743:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(38058),c=t(83419),h=t(95540),r=t(37277),n=t(37303),e=t(97480),s=t(44594),o=new c({initialize:function(a){this.scene=a,this.systems=a.sys,this.roundPixels=a.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,a.sys.events.once(s.BOOT,this.boot,this),a.sys.events.on(s.START,this.start,this)},boot:function(){var i=this.systems;i.settings.cameras?this.fromJSON(i.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new d(0,0,i.scale.width,i.scale.height).setScene(this.scene),i.game.scale.on(e.RESIZE,this.onResize,this),this.systems.events.once(s.DESTROY,this.destroy,this)},start:function(){if(!this.main){var i=this.systems;i.settings.cameras?this.fromJSON(i.settings.cameras):this.add(),this.main=this.cameras[0]}var a=this.systems.events;a.on(s.UPDATE,this.update,this),a.once(s.SHUTDOWN,this.shutdown,this)},add:function(i,a,l,u,f,v){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=this.scene.sys.scale.width),u===void 0&&(u=this.scene.sys.scale.height),f===void 0&&(f=!1),v===void 0&&(v="");var m=new d(i,a,l,u);return m.setName(v),m.setScene(this.scene),m.setRoundPixels(this.roundPixels),m.id=this.getNextID(),this.cameras.push(m),f&&(this.main=m),m},addExisting:function(i,a){a===void 0&&(a=!1);var l=this.cameras.indexOf(i);return l===-1?(i.id=this.getNextID(),i.setRoundPixels(this.roundPixels),this.cameras.push(i),a&&(this.main=i),i):null},getNextID:function(){for(var i=this.cameras,a=1,l=0;l<32;l++){for(var u=!1,f=0;f<i.length;f++){var v=i[f];if(v&&v.id===a){u=!0;continue}}if(u)a=a<<1;else return a}return 0},getTotal:function(i){i===void 0&&(i=!1);for(var a=0,l=this.cameras,u=0;u<l.length;u++){var f=l[u];(!i||i&&f.visible)&&a++}return a},fromJSON:function(i){Array.isArray(i)||(i=[i]);for(var a=this.scene.sys.scale.width,l=this.scene.sys.scale.height,u=0;u<i.length;u++){var f=i[u],v=h(f,"x",0),m=h(f,"y",0),g=h(f,"width",a),x=h(f,"height",l),y=this.add(v,m,g,x);y.name=h(f,"name",""),y.zoom=h(f,"zoom",1),y.rotation=h(f,"rotation",0),y.scrollX=h(f,"scrollX",0),y.scrollY=h(f,"scrollY",0),y.roundPixels=h(f,"roundPixels",!1),y.visible=h(f,"visible",!0);var T=h(f,"backgroundColor",!1);T&&y.setBackgroundColor(T);var C=h(f,"bounds",null);if(C){var E=h(C,"x",0),M=h(C,"y",0),P=h(C,"width",a),A=h(C,"height",l);y.setBounds(E,M,P,A)}}return this},getCamera:function(i){for(var a=this.cameras,l=0;l<a.length;l++)if(a[l].name===i)return a[l];return null},getCamerasBelowPointer:function(i){for(var a=this.cameras,l=i.x,u=i.y,f=[],v=0;v<a.length;v++){var m=a[v];m.visible&&m.inputEnabled&&n(m,l,u)&&f.unshift(m)}return f},remove:function(i,a){a===void 0&&(a=!0),Array.isArray(i)||(i=[i]);for(var l=0,u=this.cameras,f=0;f<i.length;f++){var v=u.indexOf(i[f]);v!==-1&&(a?u[v].destroy():u[v].renderList=[],u.splice(v,1),l++)}return!this.main&&u[0]&&(this.main=u[0]),l},render:function(i,a){for(var l=this.scene,u=this.cameras,f=0;f<u.length;f++){var v=u[f];if(v.visible&&v.alpha>0){v.preRender();var m=this.getVisibleChildren(a.getChildren(),v);i.render(l,m,v)}}},getVisibleChildren:function(i,a){return i.filter(function(l){return l.willRender(a)})},resetAll:function(){for(var i=0;i<this.cameras.length;i++)this.cameras[i].destroy();return this.cameras=[],this.main=this.add(),this.main},update:function(i,a){for(var l=0;l<this.cameras.length;l++)this.cameras[l].update(i,a)},onResize:function(i,a,l,u,f){for(var v=0;v<this.cameras.length;v++){var m=this.cameras[v];m._x===0&&m._y===0&&m._width===u&&m._height===f&&m.setSize(a.width,a.height)}},resize:function(i,a){for(var l=0;l<this.cameras.length;l++)this.cameras[l].setSize(i,a)},shutdown:function(){this.main=void 0;for(var i=0;i<this.cameras.length;i++)this.cameras[i].destroy();this.cameras=[];var a=this.systems.events;a.off(s.UPDATE,this.update,this),a.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.default.destroy(),this.systems.events.off(s.START,this.start,this),this.systems.events.off(s.DESTROY,this.destroy,this),this.systems.game.scale.off(e.RESIZE,this.onResize,this),this.scene=null,this.systems=null}});r.register("CameraManager",o,"cameras"),p.exports=o},5020:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45319),c=t(83419),h=t(19715),r=new c({initialize:function(e){this.camera=e,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(n,e,s,o,i,a,l,u){if(n===void 0&&(n=!0),e===void 0&&(e=1e3),s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=!1),l===void 0&&(l=null),u===void 0&&(u=this.camera.scene),!a&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=n,this.progress=0,this.red=s,this.green=o,this.blue=i,this.alpha=n?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=l,this._onUpdateScope=u;var f=n?h.FADE_OUT_START:h.FADE_IN_START;return this.camera.emit(f,this.camera,this,e,s,o,i),this.camera},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=this.direction?this.progress:1-this.progress:(this.alpha=this.direction?1:0,this.effectComplete()))},postRenderCanvas:function(n){if(!this.isRunning&&!this.isComplete)return!1;var e=this.camera;return n.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",n.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(n,e){if(!this.isRunning&&!this.isComplete)return!1;var s=this.camera,o=this.red/255,i=this.green/255,a=this.blue/255;return n.drawFillRect(s.x,s.y,s.width,s.height,e(a,i,o,1),this.alpha),!0},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var n=this.direction?h.FADE_OUT_COMPLETE:h.FADE_IN_COMPLETE;this.camera.emit(n,this.camera,this)},reset:function(){this.isRunning=!1,this.isComplete=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});p.exports=r},10662:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45319),c=t(83419),h=t(19715),r=new c({initialize:function(e){this.camera=e,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(n,e,s,o,i,a,l){return n===void 0&&(n=250),e===void 0&&(e=255),s===void 0&&(s=255),o===void 0&&(o=255),i===void 0&&(i=!1),a===void 0&&(a=null),l===void 0&&(l=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=n,this.progress=0,this.red=e,this.green=s,this.blue=o,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=l,this.camera.emit(h.FLASH_START,this.camera,this,n,e,s,o),this.camera)},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=this._alpha*(1-this.progress):this.effectComplete())},postRenderCanvas:function(n){if(!this.isRunning)return!1;var e=this.camera;return n.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",n.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(n,e){if(!this.isRunning)return!1;var s=this.camera,o=this.red/255,i=this.green/255,a=this.blue/255;return n.drawFillRect(s.x,s.y,s.width,s.height,e(a,i,o,1),this.alpha),!0},effectComplete:function(){this.alpha=this._alpha,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(h.FLASH_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});p.exports=r},20359:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45319),c=t(83419),h=t(62640),r=t(19715),n=t(26099),e=new c({initialize:function(o){this.camera=o,this.isRunning=!1,this.duration=0,this.source=new n,this.current=new n,this.destination=new n,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(s,o,i,a,l,u,f){i===void 0&&(i=1e3),a===void 0&&(a=h.Linear),l===void 0&&(l=!1),u===void 0&&(u=null),f===void 0&&(f=this.camera.scene);var v=this.camera;return!l&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(v.scrollX,v.scrollY),this.destination.set(s,o),v.getScroll(s,o,this.current),typeof a=="string"&&h.hasOwnProperty(a)?this.ease=h[a]:typeof a=="function"&&(this.ease=a),this._elapsed=0,this._onUpdate=u,this._onUpdateScope=f,this.camera.emit(r.PAN_START,this.camera,this,i,s,o)),v},update:function(s,o){if(this.isRunning){this._elapsed+=o;var i=d(this._elapsed/this.duration,0,1);this.progress=i;var a=this.camera;if(this._elapsed<this.duration){var l=this.ease(i);a.getScroll(this.destination.x,this.destination.y,this.current);var u=this.source.x+(this.current.x-this.source.x)*l,f=this.source.y+(this.current.y-this.source.y)*l;a.setScroll(u,f),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,a,i,u,f)}else a.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,a,i,a.scrollX,a.scrollY),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.PAN_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});p.exports=e},34208:(p,S,t)=>{/**
* @author Jason Nicholls <nicholls.jason@gmail.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/var d=t(45319),c=t(83419),h=t(19715),r=t(62640),n=new c({initialize:function(s){this.camera=s,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(e,s,o,i,a,l,u){o===void 0&&(o=1e3),i===void 0&&(i=r.Linear),a===void 0&&(a=!1),l===void 0&&(l=null),u===void 0&&(u=this.camera.scene),s===void 0&&(s=!1),this.shortestPath=s;var f=e;e<0?(f=-1*e,this.clockwise=!1):this.clockwise=!0;var v=360*Math.PI/180;f=f-Math.floor(f/v)*v;var m=this.camera;if(!a&&this.isRunning)return m;if(this.isRunning=!0,this.duration=o,this.progress=0,this.source=m.rotation,this.destination=f,typeof i=="string"&&r.hasOwnProperty(i)?this.ease=r[i]:typeof i=="function"&&(this.ease=i),this._elapsed=0,this._onUpdate=l,this._onUpdateScope=u,this.shortestPath){var g=0,x=0;this.destination>this.source?g=Math.abs(this.destination-this.source):g=Math.abs(this.destination+v)-this.source,this.source>this.destination?x=Math.abs(this.source-this.destination):x=Math.abs(this.source+v)-this.destination,g<x?this.clockwise=!0:g>x&&(this.clockwise=!1)}return this.camera.emit(h.ROTATE_START,this.camera,this,o,f),m},update:function(e,s){if(this.isRunning){this._elapsed+=s;var o=d(this._elapsed/this.duration,0,1);this.progress=o;var i=this.camera;if(this._elapsed<this.duration){var a=this.ease(o);this.current=i.rotation;var l=0,u=360*Math.PI/180,f=this.destination,v=this.current;this.clockwise===!1&&(f=this.current,v=this.destination),f>=v?l=Math.abs(f-v):l=Math.abs(f+u)-v;var m=0;this.clockwise?m=i.rotation+l*a:m=i.rotation-l*a,i.rotation=m,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,o,m)}else i.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,o,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(h.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}});p.exports=n},30330:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45319),c=t(83419),h=t(19715),r=t(26099),n=new c({initialize:function(s){this.camera=s,this.isRunning=!1,this.duration=0,this.intensity=new r,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(e,s,o,i,a){return e===void 0&&(e=100),s===void 0&&(s=.05),o===void 0&&(o=!1),i===void 0&&(i=null),a===void 0&&(a=this.camera.scene),!o&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=e,this.progress=0,typeof s=="number"?this.intensity.set(s):this.intensity.set(s.x,s.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=i,this._onUpdateScope=a,this.camera.emit(h.SHAKE_START,this.camera,this,e,s),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(e,s){if(this.isRunning)if(this._elapsed+=s,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration){var o=this.intensity,i=this.camera.width,a=this.camera.height,l=this.camera.zoom;this._offsetX=(Math.random()*o.x*i*2-o.x*i)*l,this._offsetY=(Math.random()*o.y*a*2-o.y*a)*l,this.camera.roundPixels&&(this._offsetX=Math.round(this._offsetX),this._offsetY=Math.round(this._offsetY))}else this.effectComplete()},effectComplete:function(){this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(h.SHAKE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.intensity=null}});p.exports=n},45641:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45319),c=t(83419),h=t(62640),r=t(19715),n=new c({initialize:function(s){this.camera=s,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(e,s,o,i,a,l){s===void 0&&(s=1e3),o===void 0&&(o=h.Linear),i===void 0&&(i=!1),a===void 0&&(a=null),l===void 0&&(l=this.camera.scene);var u=this.camera;return!i&&this.isRunning||(this.isRunning=!0,this.duration=s,this.progress=0,this.source=u.zoom,this.destination=e,typeof o=="string"&&h.hasOwnProperty(o)?this.ease=h[o]:typeof o=="function"&&(this.ease=o),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=l,this.camera.emit(r.ZOOM_START,this.camera,this,s,e)),u},update:function(e,s){this.isRunning&&(this._elapsed+=s,this.progress=d(this._elapsed/this.duration,0,1),this._elapsed<this.duration?(this.camera.zoom=this.source+(this.destination-this.source)*this.ease(this.progress),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress,this.camera.zoom)):(this.camera.zoom=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress,this.destination),this.effectComplete()))},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.ZOOM_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});p.exports=n},20052:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Fade:t(5020),Flash:t(10662),Pan:t(20359),Shake:t(30330),RotateTo:t(34208),Zoom:t(45641)}},16438:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="cameradestroy"},32726:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="camerafadeincomplete"},87807:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="camerafadeinstart"},45917:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="camerafadeoutcomplete"},95666:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="camerafadeoutstart"},47056:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="cameraflashcomplete"},91261:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="cameraflashstart"},45047:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="followupdate"},81927:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="camerapancomplete"},74264:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="camerapanstart"},54419:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="postrender"},79330:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="prerender"},93183:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="camerarotatecomplete"},80112:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="camerarotatestart"},62252:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="camerashakecomplete"},86017:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="camerashakestart"},539:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="camerazoomcomplete"},51892:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="camerazoomstart"},19715:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={DESTROY:t(16438),FADE_IN_COMPLETE:t(32726),FADE_IN_START:t(87807),FADE_OUT_COMPLETE:t(45917),FADE_OUT_START:t(95666),FLASH_COMPLETE:t(47056),FLASH_START:t(91261),FOLLOW_UPDATE:t(45047),PAN_COMPLETE:t(81927),PAN_START:t(74264),POST_RENDER:t(54419),PRE_RENDER:t(79330),ROTATE_COMPLETE:t(93183),ROTATE_START:t(80112),SHAKE_COMPLETE:t(62252),SHAKE_START:t(86017),ZOOM_COMPLETE:t(539),ZOOM_START:t(51892)}},87969:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Camera:t(38058),BaseCamera:t(71911),CameraManager:t(32743),Effects:t(20052),Events:t(19715)}},63091:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(35154),h=new d({initialize:function(n){this.camera=c(n,"camera",null),this.left=c(n,"left",null),this.right=c(n,"right",null),this.up=c(n,"up",null),this.down=c(n,"down",null),this.zoomIn=c(n,"zoomIn",null),this.zoomOut=c(n,"zoomOut",null),this.zoomSpeed=c(n,"zoomSpeed",.01),this.minZoom=c(n,"minZoom",.001),this.maxZoom=c(n,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=c(n,"speed",null);typeof e=="number"?(this.speedX=e,this.speedY=e):(this.speedX=c(n,"speed.x",0),this.speedY=c(n,"speed.y",0)),this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(r){return this.camera=r,this},update:function(r){if(this.active){r===void 0&&(r=1);var n=this.camera;this.up&&this.up.isDown?n.scrollY-=this.speedY*r|0:this.down&&this.down.isDown&&(n.scrollY+=this.speedY*r|0),this.left&&this.left.isDown?n.scrollX-=this.speedX*r|0:this.right&&this.right.isDown&&(n.scrollX+=this.speedX*r|0),this.zoomIn&&this.zoomIn.isDown?(n.zoom-=this.zoomSpeed,n.zoom<this.minZoom&&(n.zoom=this.minZoom)):this.zoomOut&&this.zoomOut.isDown&&(n.zoom+=this.zoomSpeed,n.zoom>this.maxZoom&&(n.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}});p.exports=h},58818:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(35154),h=new d({initialize:function(n){this.camera=c(n,"camera",null),this.left=c(n,"left",null),this.right=c(n,"right",null),this.up=c(n,"up",null),this.down=c(n,"down",null),this.zoomIn=c(n,"zoomIn",null),this.zoomOut=c(n,"zoomOut",null),this.zoomSpeed=c(n,"zoomSpeed",.01),this.minZoom=c(n,"minZoom",.001),this.maxZoom=c(n,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=c(n,"acceleration",null);typeof e=="number"?(this.accelX=e,this.accelY=e):(this.accelX=c(n,"acceleration.x",0),this.accelY=c(n,"acceleration.y",0)),this.dragX=0,this.dragY=0;var s=c(n,"drag",null);typeof s=="number"?(this.dragX=s,this.dragY=s):(this.dragX=c(n,"drag.x",0),this.dragY=c(n,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var o=c(n,"maxSpeed",null);typeof o=="number"?(this.maxSpeedX=o,this.maxSpeedY=o):(this.maxSpeedX=c(n,"maxSpeed.x",0),this.maxSpeedY=c(n,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(r){return this.camera=r,this},update:function(r){if(this.active){r===void 0&&(r=1);var n=this.camera;this._speedX>0?(this._speedX-=this.dragX*r,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*r,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*r,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*r,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,this._speedX!==0&&(n.scrollX-=this._speedX*r|0),this._speedY!==0&&(n.scrollY-=this._speedY*r|0),this._zoom!==0&&(n.zoom+=this._zoom,n.zoom<this.minZoom?n.zoom=this.minZoom:n.zoom>this.maxZoom&&(n.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}});p.exports=h},38865:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={FixedKeyControl:t(63091),SmoothedKeyControl:t(58818)}},26638:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Controls:t(38865),Scene2D:t(87969)}},8054:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d={VERSION:"3.86.0",BlendModes:t(10312),ScaleModes:t(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};p.exports=d},69547:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(8054),h=t(42363),r=t(82264),n=t(95540),e=t(35154),s=t(41212),o=t(29747),i=t(75508),a=t(36060),l=t(80333),u=new d({initialize:function(v){v===void 0&&(v={});var m=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],g="#ffffff",x=e(v,"scale",null);this.width=e(x,"width",1024,v),this.height=e(x,"height",768,v),this.zoom=e(x,"zoom",1,v),this.parent=e(x,"parent",void 0,v),this.scaleMode=e(x,x?"mode":"scaleMode",0,v),this.expandParent=e(x,"expandParent",!0,v),this.autoRound=e(x,"autoRound",!1,v),this.autoCenter=e(x,"autoCenter",0,v),this.resizeInterval=e(x,"resizeInterval",500,v),this.fullscreenTarget=e(x,"fullscreenTarget",null,v),this.minWidth=e(x,"min.width",0,v),this.maxWidth=e(x,"max.width",0,v),this.minHeight=e(x,"min.height",0,v),this.maxHeight=e(x,"max.height",0,v),this.snapWidth=e(x,"snap.width",0,v),this.snapHeight=e(x,"snap.height",0,v),this.renderType=e(v,"type",c.AUTO),this.canvas=e(v,"canvas",null),this.context=e(v,"context",null),this.canvasStyle=e(v,"canvasStyle",null),this.customEnvironment=e(v,"customEnvironment",!1),this.sceneConfig=e(v,"scene",null),this.seed=e(v,"seed",[(Date.now()*Math.random()).toString()]),i.RND=new i.RandomDataGenerator(this.seed),this.gameTitle=e(v,"title",""),this.gameURL=e(v,"url","https://phaser.io/v385/"),this.gameVersion=e(v,"version",""),this.autoFocus=e(v,"autoFocus",!0),this.stableSort=e(v,"stableSort",-1),this.stableSort===-1&&(this.stableSort=r.browser.es2019?1:0),r.features.stableSort=this.stableSort,this.domCreateContainer=e(v,"dom.createContainer",!1),this.domPointerEvents=e(v,"dom.pointerEvents","none"),this.inputKeyboard=e(v,"input.keyboard",!0),this.inputKeyboardEventTarget=e(v,"input.keyboard.target",window),this.inputKeyboardCapture=e(v,"input.keyboard.capture",[]),this.inputMouse=e(v,"input.mouse",!0),this.inputMouseEventTarget=e(v,"input.mouse.target",null),this.inputMousePreventDefaultDown=e(v,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=e(v,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=e(v,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=e(v,"input.mouse.preventDefaultWheel",!0),this.inputTouch=e(v,"input.touch",r.input.touch),this.inputTouchEventTarget=e(v,"input.touch.target",null),this.inputTouchCapture=e(v,"input.touch.capture",!0),this.inputActivePointers=e(v,"input.activePointers",1),this.inputSmoothFactor=e(v,"input.smoothFactor",0),this.inputWindowEvents=e(v,"input.windowEvents",!0),this.inputGamepad=e(v,"input.gamepad",!1),this.inputGamepadEventTarget=e(v,"input.gamepad.target",window),this.disableContextMenu=e(v,"disableContextMenu",!1),this.audio=e(v,"audio",{}),this.hideBanner=e(v,"banner",null)===!1,this.hidePhaser=e(v,"banner.hidePhaser",!1),this.bannerTextColor=e(v,"banner.text",g),this.bannerBackgroundColor=e(v,"banner.background",m),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=e(v,"fps",null),this.disablePreFX=e(v,"disablePreFX",!1),this.disablePostFX=e(v,"disablePostFX",!1);var y=e(v,"render",null);this.pipeline=e(y,"pipeline",null,v),this.autoMobilePipeline=e(y,"autoMobilePipeline",!0,v),this.defaultPipeline=e(y,"defaultPipeline",a.MULTI_PIPELINE,v),this.antialias=e(y,"antialias",!0,v),this.antialiasGL=e(y,"antialiasGL",!0,v),this.mipmapFilter=e(y,"mipmapFilter","",v),this.desynchronized=e(y,"desynchronized",!1,v),this.roundPixels=e(y,"roundPixels",!1,v),this.pixelArt=e(y,"pixelArt",this.zoom!==1,v),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=e(y,"transparent",!1,v),this.clearBeforeRender=e(y,"clearBeforeRender",!0,v),this.preserveDrawingBuffer=e(y,"preserveDrawingBuffer",!1,v),this.premultipliedAlpha=e(y,"premultipliedAlpha",!0,v),this.failIfMajorPerformanceCaveat=e(y,"failIfMajorPerformanceCaveat",!1,v),this.powerPreference=e(y,"powerPreference","default",v),this.batchSize=e(y,"batchSize",4096,v),this.maxTextures=e(y,"maxTextures",-1,v),this.maxLights=e(y,"maxLights",10,v);var T=e(v,"backgroundColor",0);this.backgroundColor=l(T),this.transparent&&(this.backgroundColor=l(0),this.backgroundColor.alpha=0),this.preBoot=e(v,"callbacks.preBoot",o),this.postBoot=e(v,"callbacks.postBoot",o),this.physics=e(v,"physics",{}),this.defaultPhysicsSystem=e(this.physics,"default",!1),this.loaderBaseURL=e(v,"loader.baseURL",""),this.loaderPath=e(v,"loader.path",""),this.loaderMaxParallelDownloads=e(v,"loader.maxParallelDownloads",r.os.android?6:32),this.loaderCrossOrigin=e(v,"loader.crossOrigin",void 0),this.loaderResponseType=e(v,"loader.responseType",""),this.loaderAsync=e(v,"loader.async",!0),this.loaderUser=e(v,"loader.user",""),this.loaderPassword=e(v,"loader.password",""),this.loaderTimeout=e(v,"loader.timeout",0),this.loaderMaxRetries=e(v,"loader.maxRetries",2),this.loaderWithCredentials=e(v,"loader.withCredentials",!1),this.loaderImageLoadType=e(v,"loader.imageLoadType","XHR"),this.loaderLocalScheme=e(v,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=e(v,"fx.glow.quality",.1),this.glowFXDistance=e(v,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var C=e(v,"plugins",null),E=h.DefaultScene;C&&(Array.isArray(C)?this.defaultPlugins=C:s(C)&&(this.installGlobalPlugins=n(C,"global",[]),this.installScenePlugins=n(C,"scene",[]),Array.isArray(C.default)?E=C.default:Array.isArray(C.defaultMerge)&&(E=E.concat(C.defaultMerge)))),this.defaultPlugins=E;var M="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=e(v,"images.default",M+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=e(v,"images.missing",M+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=e(v,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=c.WEBGL:window.FORCE_CANVAS&&(this.renderType=c.CANVAS))}});p.exports=u},86054:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(20623),c=t(27919),h=t(8054),r=t(89357),n=function(e){var s=e.config;if((s.customEnvironment||s.canvas)&&s.renderType===h.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!s.customEnvironment&&!s.canvas&&s.renderType!==h.HEADLESS)if(s.renderType===h.AUTO&&(s.renderType=r.webGL?h.WEBGL:h.CANVAS),s.renderType===h.WEBGL){if(!r.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(s.renderType===h.CANVAS){if(!r.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+s.renderType);s.antialias||c.disableSmoothing();var o=e.scale.baseSize,i=o.width,a=o.height;if(s.canvas?(e.canvas=s.canvas,e.canvas.width=i,e.canvas.height=a):e.canvas=c.create(e,i,a,s.renderType),s.canvasStyle&&(e.canvas.style=s.canvasStyle),s.antialias||d.setCrisp(e.canvas),s.renderType!==h.HEADLESS){var l,u;l=t(68627),u=t(74797),s.renderType===h.WEBGL?e.renderer=new u(e):(e.renderer=new l(e),e.context=e.renderer.gameContext)}};p.exports=n},96391:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(8054),c=function(h){var r=h.config;if(!r.hideBanner){var n="WebGL";r.renderType===d.CANVAS?n="Canvas":r.renderType===d.HEADLESS&&(n="Headless");var e=r.audio,s=h.device.audio,o;if(s.webAudio&&!e.disableWebAudio?o="Web Audio":e.noAudio||!s.webAudio&&!s.audioData?o="No Audio":o="HTML5 Audio",h.device.browser.ie)window.console&&console.log("Phaser v"+d.VERSION+" / https://phaser.io");else{var i="",a=[i];if(Array.isArray(r.bannerBackgroundColor)){var l;r.bannerBackgroundColor.forEach(function(f){i=i.concat("%c "),a.push("background: "+f),l=f}),a[a.length-1]="color: "+r.bannerTextColor+"; background: "+l}else i=i.concat("%c "),a.push("color: "+r.bannerTextColor+"; background: "+r.bannerBackgroundColor);a.push("background: transparent"),r.gameTitle&&(i=i.concat(r.gameTitle),r.gameVersion&&(i=i.concat(" v"+r.gameVersion)),r.hidePhaser||(i=i.concat(" / ")));var u="";r.hidePhaser||(i=i.concat("Phaser v"+d.VERSION+u+" ("+n+" | "+o+")")),i=i.concat(" %c "+r.gameURL),a[0]=i,console.log.apply(console,a)}}};p.exports=c},50127:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(40366),c=t(60848),h=t(24047),r=t(27919),n=t(83419),e=t(69547),s=t(83719),o=t(86054),i=t(45893),a=t(96391),l=t(82264),u=t(57264),f=t(50792),v=t(8443),m=t(7003),g=t(37277),x=t(77332),y=t(76531),T=t(60903),C=t(69442),E=t(17130),M=t(65898),P=t(51085),A=t(14747),R=new n({initialize:function(w){this.config=new e(w),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new f,this.anims=new c(this),this.textures=new E(this),this.cache=new h(this),this.registry=new i(this,new f),this.input=new m(this,this.config),this.scene=new T(this,this.config.sceneConfig),this.device=l,this.scale=new y(this,this.config),this.sound=null,this.sound=A.create(this),this.loop=new M(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,u(this.boot.bind(this))},boot:function(){if(!g.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),o(this),s(this),a(this),d(this.canvas,this.config.parent),this.textures.once(C.READY,this.texturesReady,this),this.events.emit(v.BOOT)},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),P(this);var F=this.events;F.on(v.HIDDEN,this.onHidden,this),F.on(v.VISIBLE,this.onVisible,this),F.on(v.BLUR,this.onBlur,this),F.on(v.FOCUS,this.onFocus,this)},step:function(F,w){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var B=this.events;B.emit(v.PRE_STEP,F,w),B.emit(v.STEP,F,w),this.scene.update(F,w),B.emit(v.POST_STEP,F,w);var N=this.renderer;N.preRender(),B.emit(v.PRE_RENDER,N,F,w),this.scene.render(N),N.postRender(),B.emit(v.POST_RENDER,N,F,w)}},headlessStep:function(F,w){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var B=this.events;B.emit(v.PRE_STEP,F,w),B.emit(v.STEP,F,w),this.scene.update(F,w),B.emit(v.POST_STEP,F,w),this.scene.isProcessing=!1,B.emit(v.PRE_RENDER,null,F,w),B.emit(v.POST_RENDER,null,F,w)}},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},pause:function(){var F=this.isPaused;this.isPaused=!0,F||this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME,this.loop.pauseDuration)},resume:function(){var F=this.isPaused;this.isPaused=!1,F&&this.events.emit(v.RESUME,0)},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(F,w){w===void 0&&(w=!1),this.pendingDestroy=!0,this.removeCanvas=F,this.noReturn=w},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(r.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});p.exports=R},65898:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(35154),h=t(29747),r=t(43092),n=new d({initialize:function(s,o){this.game=s,this.raf=new r,this.started=!1,this.running=!1,this.minFps=c(o,"min",5),this.targetFps=c(o,"target",60),this.fpsLimit=c(o,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=h,this.forceSetTimeOut=c(o,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this.pauseDuration=0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=c(o,"deltaHistory",10),this.panicMax=c(o,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=c(o,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.pauseDuration=this.time-this._pauseTime,this.startTime+=this.pauseDuration},resetDelta:function(){var e=window.performance.now();this.time=e,this.lastTime=e,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0;for(var s=0;s<this.deltaSmoothingMax;s++)this.deltaHistory[s]=Math.min(this._target,this.deltaHistory[s]);this.delta=0,this.deltaIndex=0,this._coolDown=this.panicMax},start:function(e){if(this.started)return this;this.started=!0,this.running=!0;for(var s=0;s<this.deltaSmoothingMax;s++)this.deltaHistory[s]=this._target;this.resetDelta(),this.startTime=window.performance.now(),this.callback=e;var o=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(o,this.forceSetTimeOut,this._target)},smoothDelta:function(e){var s=this.deltaIndex,o=this.deltaHistory,i=this.deltaSmoothingMax;(this._coolDown>0||!this.inFocus)&&(this._coolDown--,e=Math.min(e,this._target)),e>this._min&&(e=o[s],e=Math.min(e,this._min)),o[s]=e,this.deltaIndex++,this.deltaIndex>=i&&(this.deltaIndex=0);for(var a=0,l=0;l<i;l++)a+=o[l];return a/=i,a},updateFPS:function(e){this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0},stepLimitFPS:function(e){this.now=e;var s=Math.max(0,e-this.lastTime);this.rawDelta=s,this.time+=this.rawDelta,this.smoothStep&&(s=this.smoothDelta(s)),this.delta+=s,e>=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(e,this.delta),this.delta=0),this.lastTime=e,this.frame++},step:function(e){this.now=e;var s=Math.max(0,e-this.lastTime);this.rawDelta=s,this.time+=this.rawDelta,this.smoothStep&&(s=this.smoothDelta(s)),this.delta=s,e>=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.callback(e,s),this.lastTime=e,this.frame++},tick:function(){var e=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(e):this.step(e)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(e){e===void 0&&(e=!1);var s=window.performance.now();if(!this.running){e&&(this.startTime+=-this.lastTime+(this.lastTime+s));var o=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(o,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=s+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},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.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});p.exports=n},51085:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(8443),c=function(h){var r,n=h.events;if(document.hidden!==void 0)r="visibilitychange";else{var e=["webkit","moz","ms"];e.forEach(function(o){document[o+"Hidden"]!==void 0&&(document.hidden=function(){return document[o+"Hidden"]},r=o+"visibilitychange")})}var s=function(o){document.hidden||o.type==="pause"?n.emit(d.HIDDEN):n.emit(d.VISIBLE)};r&&document.addEventListener(r,s,!1),window.onblur=function(){n.emit(d.BLUR)},window.onfocus=function(){n.emit(d.FOCUS)},window.focus&&h.config.autoFocus&&window.focus()};p.exports=c},97217:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="blur"},47548:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="boot"},19814:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="contextlost"},68446:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="destroy"},41700:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="focus"},25432:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="hidden"},65942:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pause"},59211:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="postrender"},47789:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="poststep"},39066:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="prerender"},460:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="prestep"},16175:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="ready"},42331:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="resume"},11966:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="step"},32969:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="systemready"},94830:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="visible"},8443:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={BLUR:t(97217),BOOT:t(47548),CONTEXT_LOST:t(19814),DESTROY:t(68446),FOCUS:t(41700),HIDDEN:t(25432),PAUSE:t(65942),POST_RENDER:t(59211),POST_STEP:t(47789),PRE_RENDER:t(39066),PRE_STEP:t(460),READY:t(16175),RESUME:t(42331),STEP:t(11966),SYSTEM_READY:t(32969),VISIBLE:t(94830)}},42857:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Config:t(69547),CreateRenderer:t(86054),DebugHeader:t(96391),Events:t(8443),TimeStep:t(65898),VisibilityHandler:t(51085)}},99584:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(5290),c=t(27919),h=t(35154),r=function(n){var e=h(n,"data",[]),s=h(n,"canvas",null),o=h(n,"palette",d),i=h(n,"pixelWidth",1),a=h(n,"pixelHeight",i),l=h(n,"resizeCanvas",!0),u=h(n,"clearCanvas",!0),f=h(n,"preRender",null),v=h(n,"postRender",null),m=Math.floor(Math.abs(e[0].length*i)),g=Math.floor(Math.abs(e.length*a));s||(s=c.create2D(this,m,g),l=!1,u=!1),l&&(s.width=m,s.height=g);var x=s.getContext("2d",{willReadFrequently:!0});u&&x.clearRect(0,0,m,g),f&&f(s,x);for(var y=0;y<e.length;y++)for(var T=e[y],C=0;C<T.length;C++){var E=T[C];E!=="."&&E!==" "&&(x.fillStyle=o[E],x.fillRect(C*i,y*a,i,a))}return v&&v(s,x),s};p.exports=r},15822:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={GenerateTexture:t(99584),Palettes:t(57763)}},5290:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},23816:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.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"}},9866:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.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"}},77552:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.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"}},92259:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.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"}},57763:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={ARNE16:t(5290),C64:t(23816),CGA:t(9866),JMP:t(77552),MSX:t(92259)}},46728:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(36316),h=t(80021),r=t(26099),n=new d({Extends:h,initialize:function(s,o,i,a){h.call(this,"CubicBezierCurve"),Array.isArray(s)&&(a=new r(s[6],s[7]),i=new r(s[4],s[5]),o=new r(s[2],s[3]),s=new r(s[0],s[1])),this.p0=s,this.p1=o,this.p2=i,this.p3=a},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,s){s===void 0&&(s=new r);var o=this.p0,i=this.p1,a=this.p2,l=this.p3;return s.set(c(e,o.x,i.x,a.x,l.x),c(e,o.y,i.y,a.y,l.y))},draw:function(e,s){s===void 0&&(s=32);var o=this.getPoints(s);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var i=1;i<o.length;i++)e.lineTo(o[i].x,o[i].y);return e.strokePath(),e},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y,this.p3.x,this.p3.y]}}});n.fromJSON=function(e){var s=e.points,o=new r(s[0],s[1]),i=new r(s[2],s[3]),a=new r(s[4],s[5]),l=new r(s[6],s[7]);return new n(o,i,a,l)},p.exports=n},80021:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(19217),h=t(87841),r=t(26099),n=new d({initialize:function(s){this.type=s,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new r,this._tmpVec2B=new r},draw:function(e,s){return s===void 0&&(s=32),e.strokePoints(this.getPoints(s))},getBounds:function(e,s){e||(e=new h),s===void 0&&(s=16);var o=this.getLength();s>o&&(s=o/2);var i=Math.max(1,Math.round(o/s));return c(this.getSpacedPoints(i),e)},getDistancePoints:function(e){var s=this.getLength(),o=Math.max(1,s/e);return this.getSpacedPoints(o)},getEndPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(1,e)},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(e===void 0&&(e=this.arcLengthDivisions),this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var s=[],o,i=this.getPoint(0,this._tmpVec2A),a=0;s.push(0);for(var l=1;l<=e;l++)o=this.getPoint(l/e,this._tmpVec2B),a+=o.distance(i),s.push(a),i.copy(o);return this.cacheArcLengths=s,s},getPointAt:function(e,s){var o=this.getUtoTmapping(e);return this.getPoint(o,s)},getPoints:function(e,s,o){o===void 0&&(o=[]),e||(s?e=this.getLength()/s:e=this.defaultDivisions);for(var i=0;i<=e;i++)o.push(this.getPoint(i/e));return o},getRandomPoint:function(e){return e===void 0&&(e=new r),this.getPoint(Math.random(),e)},getSpacedPoints:function(e,s,o){o===void 0&&(o=[]),e||(s?e=this.getLength()/s:e=this.defaultDivisions);for(var i=0;i<=e;i++){var a=this.getUtoTmapping(i/e,null,e);o.push(this.getPoint(a))}return o},getStartPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(0,e)},getTangent:function(e,s){s===void 0&&(s=new r);var o=1e-4,i=e-o,a=e+o;return i<0&&(i=0),a>1&&(a=1),this.getPoint(i,this._tmpVec2A),this.getPoint(a,s),s.subtract(this._tmpVec2A).normalize()},getTangentAt:function(e,s){var o=this.getUtoTmapping(e);return this.getTangent(o,s)},getTFromDistance:function(e,s){return e<=0?0:this.getUtoTmapping(0,e,s)},getUtoTmapping:function(e,s,o){var i=this.getLengths(o),a=0,l=i.length,u;s?u=Math.min(s,i[l-1]):u=e*i[l-1];for(var f=0,v=l-1,m;f<=v;)if(a=Math.floor(f+(v-f)/2),m=i[a]-u,m<0)f=a+1;else if(m>0)v=a-1;else{v=a;break}if(a=v,i[a]===u)return a/(l-1);var g=i[a],x=i[a+1],y=x-g,T=(u-g)/y;return(a+T)/(l-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});p.exports=n},73825:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(80021),h=t(39506),r=t(35154),n=t(43396),e=t(26099),s=new d({Extends:c,initialize:function(i,a,l,u,f,v,m,g){if(typeof i=="object"){var x=i;i=r(x,"x",0),a=r(x,"y",0),l=r(x,"xRadius",0),u=r(x,"yRadius",l),f=r(x,"startAngle",0),v=r(x,"endAngle",360),m=r(x,"clockwise",!1),g=r(x,"rotation",0)}else u===void 0&&(u=l),f===void 0&&(f=0),v===void 0&&(v=360),m===void 0&&(m=!1),g===void 0&&(g=0);c.call(this,"EllipseCurve"),this.p0=new e(i,a),this._xRadius=l,this._yRadius=u,this._startAngle=h(f),this._endAngle=h(v),this._clockwise=m,this._rotation=h(g)},getStartPoint:function(o){return o===void 0&&(o=new e),this.getPoint(0,o)},getResolution:function(o){return o*2},getPoint:function(o,i){i===void 0&&(i=new e);for(var a=Math.PI*2,l=this._endAngle-this._startAngle,u=Math.abs(l)<Number.EPSILON;l<0;)l+=a;for(;l>a;)l-=a;l<Number.EPSILON&&(u?l=0:l=a),this._clockwise&&!u&&(l===a?l=-a:l=l-a);var f=this._startAngle+o*l,v=this.p0.x+this._xRadius*Math.cos(f),m=this.p0.y+this._yRadius*Math.sin(f);if(this._rotation!==0){var g=Math.cos(this._rotation),x=Math.sin(this._rotation),y=v-this.p0.x,T=m-this.p0.y;v=y*g-T*x+this.p0.x,m=y*x+T*g+this.p0.y}return i.set(v,m)},setXRadius:function(o){return this.xRadius=o,this},setYRadius:function(o){return this.yRadius=o,this},setWidth:function(o){return this.xRadius=o/2,this},setHeight:function(o){return this.yRadius=o/2,this},setStartAngle:function(o){return this.startAngle=o,this},setEndAngle:function(o){return this.endAngle=o,this},setClockwise:function(o){return this.clockwise=o,this},setRotation:function(o){return this.rotation=o,this},x:{get:function(){return this.p0.x},set:function(o){this.p0.x=o}},y:{get:function(){return this.p0.y},set:function(o){this.p0.y=o}},xRadius:{get:function(){return this._xRadius},set:function(o){this._xRadius=o}},yRadius:{get:function(){return this._yRadius},set:function(o){this._yRadius=o}},startAngle:{get:function(){return n(this._startAngle)},set:function(o){this._startAngle=h(o)}},endAngle:{get:function(){return n(this._endAngle)},set:function(o){this._endAngle=h(o)}},clockwise:{get:function(){return this._clockwise},set:function(o){this._clockwise=o}},angle:{get:function(){return n(this._rotation)},set:function(o){this._rotation=h(o)}},rotation:{get:function(){return this._rotation},set:function(o){this._rotation=o}},toJSON:function(){return{type:this.type,x:this.p0.x,y:this.p0.y,xRadius:this._xRadius,yRadius:this._yRadius,startAngle:n(this._startAngle),endAngle:n(this._endAngle),clockwise:this._clockwise,rotation:n(this._rotation)}}});s.fromJSON=function(o){return new s(o)},p.exports=s},33951:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(80021),h=t(19217),r=t(87841),n=t(26099),e=new d({Extends:c,initialize:function(o,i){c.call(this,"LineCurve"),Array.isArray(o)&&(i=new n(o[2],o[3]),o=new n(o[0],o[1])),this.p0=o,this.p1=i,this.arcLengthDivisions=1},getBounds:function(s){return s===void 0&&(s=new r),h([this.p0,this.p1],s)},getStartPoint:function(s){return s===void 0&&(s=new n),s.copy(this.p0)},getResolution:function(s){return s===void 0&&(s=1),s},getPoint:function(s,o){return o===void 0&&(o=new n),s===1?o.copy(this.p1):(o.copy(this.p1).subtract(this.p0).scale(s).add(this.p0),o)},getPointAt:function(s,o){return this.getPoint(s,o)},getTangent:function(s,o){return o===void 0&&(o=new n),o.copy(this.p1).subtract(this.p0).normalize(),o},getUtoTmapping:function(s,o,i){var a;if(o){var l=this.getLengths(i),u=l[l.length-1],f=Math.min(o,u);a=f/u}else a=s;return a},draw:function(s){return s.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),s},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});e.fromJSON=function(s){var o=s.points,i=new n(o[0],o[1]),a=new n(o[2],o[3]);return new e(i,a)},p.exports=e},14744:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(80021),h=t(32112),r=t(26099),n=new d({Extends:c,initialize:function(s,o,i){c.call(this,"QuadraticBezierCurve"),Array.isArray(s)&&(i=new r(s[4],s[5]),o=new r(s[2],s[3]),s=new r(s[0],s[1])),this.p0=s,this.p1=o,this.p2=i},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,s){s===void 0&&(s=new r);var o=this.p0,i=this.p1,a=this.p2;return s.set(h(e,o.x,i.x,a.x),h(e,o.y,i.y,a.y))},draw:function(e,s){s===void 0&&(s=32);var o=this.getPoints(s);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var i=1;i<o.length;i++)e.lineTo(o[i].x,o[i].y);return e.strokePath(),e},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y]}}});n.fromJSON=function(e){var s=e.points,o=new r(s[0],s[1]),i=new r(s[2],s[3]),a=new r(s[4],s[5]);return new n(o,i,a)},p.exports=n},42534:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87842),c=t(83419),h=t(80021),r=t(26099),n=new c({Extends:h,initialize:function(s){s===void 0&&(s=[]),h.call(this,"SplineCurve"),this.points=[],this.addPoints(s)},addPoints:function(e){for(var s=0;s<e.length;s++){var o=new r;typeof e[s]=="number"?(o.x=e[s],o.y=e[s+1],s++):Array.isArray(e[s])?(o.x=e[s][0],o.y=e[s][1]):(o.x=e[s].x,o.y=e[s].y),this.points.push(o)}return this},addPoint:function(e,s){var o=new r(e,s);return this.points.push(o),o},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.points[0])},getResolution:function(e){return e*this.points.length},getPoint:function(e,s){s===void 0&&(s=new r);var o=this.points,i=(o.length-1)*e,a=Math.floor(i),l=i-a,u=o[a===0?a:a-1],f=o[a],v=o[a>o.length-2?o.length-1:a+1],m=o[a>o.length-3?o.length-1:a+2];return s.set(d(l,u.x,f.x,v.x,m.x),d(l,u.y,f.y,v.y,m.y))},toJSON:function(){for(var e=[],s=0;s<this.points.length;s++)e.push(this.points[s].x),e.push(this.points[s].y);return{type:this.type,points:e}}});n.fromJSON=function(e){return new n(e.points)},p.exports=n},25410:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Path:t(46669),MoveTo:t(68618),CubicBezier:t(46728),Curve:t(80021),Ellipse:t(73825),Line:t(33951),QuadraticBezier:t(14744),Spline:t(42534)}},68618:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(26099),h=new d({initialize:function(n,e){this.active=!1,this.p0=new c(n,e)},getPoint:function(r,n){return n===void 0&&(n=new c),n.copy(this.p0)},getPointAt:function(r,n){return this.getPoint(r,n)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});p.exports=h},46669:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(46728),h=t(73825),r=t(39429),n=t(33951),e=t(68618),s=t(14744),o=t(87841),i=t(42534),a=t(26099),l=t(36383),u=new d({initialize:function(v,m){v===void 0&&(v=0),m===void 0&&(m=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new a,this._tmpVec2A=new a,this._tmpVec2B=new a,typeof v=="object"?this.fromJSON(v):this.startPoint.set(v,m)},add:function(f){return this.curves.push(f),this},circleTo:function(f,v,m){return v===void 0&&(v=!1),this.ellipseTo(f,f,0,360,v,m)},closePath:function(){var f=this.curves[0].getPoint(0),v=this.curves[this.curves.length-1].getPoint(1);return f.equals(v)||this.curves.push(new n(v,f)),this},cubicBezierTo:function(f,v,m,g,x,y){var T=this.getEndPoint(),C,E,M;return f instanceof a?(C=f,E=v,M=m):(C=new a(m,g),E=new a(x,y),M=new a(f,v)),this.add(new c(T,C,E,M))},quadraticBezierTo:function(f,v,m,g){var x=this.getEndPoint(),y,T;return f instanceof a?(y=f,T=v):(y=new a(m,g),T=new a(f,v)),this.add(new s(x,y,T))},draw:function(f,v){for(var m=0;m<this.curves.length;m++){var g=this.curves[m];g.active&&g.draw(f,v)}return f},ellipseTo:function(f,v,m,g,x,y){var T=new h(0,0,f,v,m,g,x,y),C=this.getEndPoint(this._tmpVec2A),E=T.getStartPoint(this._tmpVec2B);return C.subtract(E),T.x=C.x,T.y=C.y,this.add(T)},fromJSON:function(f){this.curves=[],this.cacheLengths=[],this.startPoint.set(f.x,f.y),this.autoClose=f.autoClose;for(var v=0;v<f.curves.length;v++){var m=f.curves[v];switch(m.type){case"LineCurve":this.add(n.fromJSON(m));break;case"EllipseCurve":this.add(h.fromJSON(m));break;case"SplineCurve":this.add(i.fromJSON(m));break;case"CubicBezierCurve":this.add(c.fromJSON(m));break;case"QuadraticBezierCurve":this.add(s.fromJSON(m));break}}return this},getBounds:function(f,v){f===void 0&&(f=new o),v===void 0&&(v=16),f.x=Number.MAX_VALUE,f.y=Number.MAX_VALUE;for(var m=new o,g=l.MIN_SAFE_INTEGER,x=l.MIN_SAFE_INTEGER,y=0;y<this.curves.length;y++){var T=this.curves[y];T.active&&(T.getBounds(m,v),f.x=Math.min(f.x,m.x),f.y=Math.min(f.y,m.y),g=Math.max(g,m.right),x=Math.max(x,m.bottom))}return f.right=g,f.bottom=x,f},getCurveLengths:function(){if(this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var f=[],v=0,m=0;m<this.curves.length;m++)v+=this.curves[m].getLength(),f.push(v);return this.cacheLengths=f,f},getCurveAt:function(f){for(var v=f*this.getLength(),m=this.getCurveLengths(),g=0;g<m.length;){if(m[g]>=v)return this.curves[g];g++}return null},getEndPoint:function(f){return f===void 0&&(f=new a),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,f):f.copy(this.startPoint),f},getLength:function(){var f=this.getCurveLengths();return f[f.length-1]},getPoint:function(f,v){v===void 0&&(v=new a);for(var m=f*this.getLength(),g=this.getCurveLengths(),x=0;x<g.length;){if(g[x]>=m){var y=g[x]-m,T=this.curves[x],C=T.getLength(),E=C===0?0:1-y/C;return T.getPointAt(E,v)}x++}return null},getPoints:function(f,v){!f&&!v&&(f=this.defaultDivisions);for(var m=[],g,x=0;x<this.curves.length;x++){var y=this.curves[x];if(y.active)for(var T=y.getResolution(f),C=y.getPoints(T,v),E=0;E<C.length;E++){var M=C[E];g&&g.equals(M)||(m.push(M),g=M)}}return this.autoClose&&m.length>1&&!m[m.length-1].equals(m[0])&&m.push(m[0]),m},getRandomPoint:function(f){return f===void 0&&(f=new a),this.getPoint(Math.random(),f)},getSpacedPoints:function(f){f===void 0&&(f=40);for(var v=[],m=0;m<=f;m++)v.push(this.getPoint(m/f));return this.autoClose&&v.push(v[0]),v},getStartPoint:function(f){return f===void 0&&(f=new a),f.copy(this.startPoint)},getTangent:function(f,v){v===void 0&&(v=new a);for(var m=f*this.getLength(),g=this.getCurveLengths(),x=0;x<g.length;){if(g[x]>=m){var y=g[x]-m,T=this.curves[x],C=T.getLength(),E=C===0?0:1-y/C;return T.getTangentAt(E,v)}x++}return null},lineTo:function(f,v){f instanceof a?this._tmpVec2B.copy(f):typeof f=="object"?this._tmpVec2B.setFromObject(f):this._tmpVec2B.set(f,v);var m=this.getEndPoint(this._tmpVec2A);return this.add(new n([m.x,m.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(f){return f.unshift(this.getEndPoint()),this.add(new i(f))},moveTo:function(f,v){return f instanceof a?this.add(new e(f.x,f.y)):this.add(new e(f,v))},toJSON:function(){for(var f=[],v=0;v<this.curves.length;v++)f.push(this.curves[v].toJSON());return{type:"Path",x:this.startPoint.x,y:this.startPoint.y,autoClose:this.autoClose,curves:f}},updateArcLengths:function(){this.cacheLengths=[],this.getCurveLengths()},destroy:function(){this.curves.length=0,this.cacheLengths.length=0,this.startPoint=void 0}});r.register("path",function(f,v){return new u(f,v)}),p.exports=u},45893:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(24882),h=new d({initialize:function(n,e){this.parent=n,this.events=e,e||(this.events=n.events?n.events:n),this.list={},this.values={},this._frozen=!1,!n.hasOwnProperty("sys")&&this.events&&this.events.once(c.DESTROY,this.destroy,this)},get:function(r){var n=this.list;if(Array.isArray(r)){for(var e=[],s=0;s<r.length;s++)e.push(n[r[s]]);return e}else return n[r]},getAll:function(){var r={};for(var n in this.list)this.list.hasOwnProperty(n)&&(r[n]=this.list[n]);return r},query:function(r){var n={};for(var e in this.list)this.list.hasOwnProperty(e)&&e.match(r)&&(n[e]=this.list[e]);return n},set:function(r,n){if(this._frozen)return this;if(typeof r=="string")return this.setValue(r,n);for(var e in r)this.setValue(e,r[e]);return this},inc:function(r,n){if(this._frozen)return this;n===void 0&&(n=1);var e=this.get(r);return e===void 0&&(e=0),this.set(r,e+n),this},toggle:function(r){return this._frozen?this:(this.set(r,!this.get(r)),this)},setValue:function(r,n){if(this._frozen)return this;if(this.has(r))this.values[r]=n;else{var e=this,s=this.list,o=this.events,i=this.parent;Object.defineProperty(this.values,r,{enumerable:!0,configurable:!0,get:function(){return s[r]},set:function(a){if(!e._frozen){var l=s[r];s[r]=a,o.emit(c.CHANGE_DATA,i,r,a,l),o.emit(c.CHANGE_DATA_KEY+r,i,a,l)}}}),s[r]=n,o.emit(c.SET_DATA,i,r,n)}return this},each:function(r,n){for(var e=[this.parent,null,void 0],s=1;s<arguments.length;s++)e.push(arguments[s]);for(var o in this.list)e[1]=o,e[2]=this.list[o],r.apply(n,e);return this},merge:function(r,n){n===void 0&&(n=!0);for(var e in r)r.hasOwnProperty(e)&&(n||!n&&!this.has(e))&&this.setValue(e,r[e]);return this},remove:function(r){if(this._frozen)return this;if(Array.isArray(r))for(var n=0;n<r.length;n++)this.removeValue(r[n]);else return this.removeValue(r);return this},removeValue:function(r){if(this.has(r)){var n=this.list[r];delete this.list[r],delete this.values[r],this.events.emit(c.REMOVE_DATA,this.parent,r,n)}return this},pop:function(r){var n=void 0;return!this._frozen&&this.has(r)&&(n=this.list[r],delete this.list[r],delete this.values[r],this.events.emit(c.REMOVE_DATA,this.parent,r,n)),n},has:function(r){return this.list.hasOwnProperty(r)},setFreeze:function(r){return this._frozen=r,this},reset:function(){for(var r in this.list)delete this.list[r],delete this.values[r];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(c.CHANGE_DATA),this.events.off(c.SET_DATA),this.events.off(c.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(r){this._frozen=!!r}},count:{get:function(){var r=0;for(var n in this.list)this.list[n]!==void 0&&r++;return r}}});p.exports=h},63646:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(45893),h=t(37277),r=t(44594),n=new d({Extends:c,initialize:function(s){c.call(this,s,s.sys.events),this.scene=s,this.systems=s.sys,s.sys.events.once(r.BOOT,this.boot,this),s.sys.events.on(r.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){c.prototype.destroy.call(this),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null}});h.register("DataManagerPlugin",n,"data"),p.exports=n},10700:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="changedata"},93608:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="changedata-"},60883:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="destroy"},69780:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="removedata"},22166:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="setdata"},24882:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={CHANGE_DATA:t(10700),CHANGE_DATA_KEY:t(93608),DESTROY:t(60883),REMOVE_DATA:t(69780),SET_DATA:t(22166)}},44965:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={DataManager:t(45893),DataManagerPlugin:t(63646),Events:t(24882)}},7098:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(84148),c={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function h(){if(typeof importScripts=="function")return c;c.audioData=!!window.Audio,c.webAudio=!!(window.AudioContext||window.webkitAudioContext);var r=document.createElement("audio"),n=!!r.canPlayType;try{if(n){var e=function(i,a){var l=r.canPlayType("audio/"+i).replace(/^no$/,"");return a?!!(l||r.canPlayType("audio/"+a).replace(/^no$/,"")):!!l};if(c.ogg=e('ogg; codecs="vorbis"'),c.opus=e('ogg; codecs="opus"',"opus"),c.mp3=e("mpeg"),c.wav=e("wav"),c.m4a=e("x-m4a"),c.aac=e("aac"),c.flac=e("flac","x-flac"),c.webm=e('webm; codecs="vorbis"'),r.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(d.edge)c.dolby=!0;else if(d.safari&&d.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var s=parseInt(RegExp.$1,10),o=parseInt(RegExp.$2,10);(s===10&&o>=11||s>10)&&(c.dolby=!0)}}}}catch{}return c}p.exports=h()},84148:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25892),c={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,es2019:!1};function h(){var r=navigator.userAgent;return/Edg\/\d+/.test(r)?(c.edge=!0,c.es2019=!0):/OPR/.test(r)?(c.opera=!0,c.es2019=!0):/Chrome\/(\d+)/.test(r)&&!d.windowsPhone?(c.chrome=!0,c.chromeVersion=parseInt(RegExp.$1,10),c.es2019=c.chromeVersion>69):/Firefox\D+(\d+)/.test(r)?(c.firefox=!0,c.firefoxVersion=parseInt(RegExp.$1,10),c.es2019=c.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(r)&&d.iOS?(c.mobileSafari=!0,c.es2019=!0):/MSIE (\d+\.\d+);/.test(r)?(c.ie=!0,c.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(r)&&!d.windowsPhone?(c.safari=!0,c.safariVersion=parseInt(RegExp.$1,10),c.es2019=c.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(r)&&(c.ie=!0,c.trident=!0,c.tridentVersion=parseInt(RegExp.$1,10),c.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(r)&&(c.silk=!0),c}p.exports=h()},89289:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(27919),c={supportInverseAlpha:!1,supportNewBlendModes:!1};function h(){var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",o=new Image;return o.onload=function(){var i=new Image;i.onload=function(){var a=d.create2D(i,6),l=a.getContext("2d",{willReadFrequently:!0});if(l.globalCompositeOperation="multiply",l.drawImage(o,0,0),l.drawImage(i,2,0),!l.getImageData(2,0,1,1))return!1;var u=l.getImageData(2,0,1,1).data;d.remove(i),c.supportNewBlendModes=u[0]===255&&u[1]===0&&u[2]===0},i.src=e+"/wCKxvRF"+s},o.src=e+"AP804Oa6"+s,!1}function r(){var e=d.create2D(this,2),s=e.getContext("2d",{willReadFrequently:!0});s.fillStyle="rgba(10, 20, 30, 0.5)",s.fillRect(0,0,1,1);var o=s.getImageData(0,0,1,1);if(o===null)return!1;s.putImageData(o,1,0);var i=s.getImageData(1,0,1,1),a=i.data[0]===o.data[0]&&i.data[1]===o.data[1]&&i.data[2]===o.data[2]&&i.data[3]===o.data[3];return d.remove(this),a}function n(){return typeof importScripts!="function"&&document!==void 0&&(c.supportNewBlendModes=h(),c.supportInverseAlpha=r()),c}p.exports=n()},89357:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25892),c=t(84148),h=t(27919),r={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};function n(){var s=new ArrayBuffer(4),o=new Uint8Array(s),i=new Uint32Array(s);return o[0]=161,o[1]=178,o[2]=195,o[3]=212,i[0]===3569595041?!0:i[0]===2712847316?!1:null}function e(){if(typeof importScripts=="function")return r;r.canvas=!!window.CanvasRenderingContext2D;try{r.localStorage=!!localStorage.getItem}catch{r.localStorage=!1}r.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,r.fileSystem=!!window.requestFileSystem;var s=!1,o=function(){if(window.WebGLRenderingContext)try{var i=h.createWebGL(this),a=i.getContext("webgl")||i.getContext("experimental-webgl"),l=h.create2D(this),u=l.getContext("2d",{willReadFrequently:!0}),f=u.createImageData(1,1);return s=f.data instanceof Uint8ClampedArray,h.remove(i),h.remove(l),!!a}catch{return!1}return!1};return r.webGL=o(),r.worker=!!window.Worker,r.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,r.getUserMedia=r.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,c.firefox&&c.firefoxVersion<21&&(r.getUserMedia=!1),!d.iOS&&(c.ie||c.firefox||c.chrome)&&(r.canvasBitBltShift=!0),(c.safari||c.mobileSafari)&&(r.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(r.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(r.littleEndian=n()),r.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&r.littleEndian!==null&&s,r}p.exports=e()},91639:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={available:!1,cancel:"",keyboard:!1,request:""};function t(){if(typeof importScripts=="function")return S;var d,c="Fullscreen",h="FullScreen",r=["request"+c,"request"+h,"webkitRequest"+c,"webkitRequest"+h,"msRequest"+c,"msRequest"+h,"mozRequest"+h,"mozRequest"+c];for(d=0;d<r.length;d++)if(document.documentElement[r[d]]){S.available=!0,S.request=r[d];break}var n=["cancel"+h,"exit"+c,"webkitCancel"+h,"webkitExit"+c,"msCancel"+h,"msExit"+c,"mozCancel"+h,"mozExit"+c];if(S.available){for(d=0;d<n.length;d++)if(document[n[d]]){S.cancel=n[d];break}}return window.Element&&Element.ALLOW_KEYBOARD_INPUT&&!/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)&&(S.keyboard=!0),Object.defineProperty(S,"active",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),S}p.exports=t()},31784:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(84148),c={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function h(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(c.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(c.mspointer=!0),navigator.getGamepads&&(c.gamepads=!0),"onwheel"in window||d.ie&&"WheelEvent"in window?c.wheelEvent="wheel":"onmousewheel"in window?c.wheelEvent="mousewheel":d.firefox&&"MouseScrollEvent"in window&&(c.wheelEvent="DOMMouseScroll")),c}p.exports=h()},25892:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};function t(){if(typeof importScripts=="function")return S;var d=navigator.userAgent;/Windows/.test(d)?S.windows=!0:/Mac OS/.test(d)&&!/like Mac OS/.test(d)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(S.iOS=!0,S.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),S.iOSVersion=parseInt(RegExp.$1,10)):S.macOS=!0:/Android/.test(d)?S.android=!0:/Linux/.test(d)?S.linux=!0:/iP[ao]d|iPhone/i.test(d)?(S.iOS=!0,navigator.appVersion.match(/OS (\d+)/),S.iOSVersion=parseInt(RegExp.$1,10),S.iPhone=d.toLowerCase().indexOf("iphone")!==-1,S.iPad=d.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(d)||/\bKF[A-Z][A-Z]+/.test(d)||/Silk.*Mobile Safari/.test(d)?S.kindle=!0:/CrOS/.test(d)&&(S.chromeOS=!0),(/Windows Phone/i.test(d)||/IEMobile/i.test(d))&&(S.android=!1,S.iOS=!1,S.macOS=!1,S.windows=!0,S.windowsPhone=!0);var c=/Silk/.test(d);return(S.windows||S.macOS||S.linux&&!c||S.chromeOS)&&(S.desktop=!0),(S.windowsPhone||/Windows NT/i.test(d)&&/Touch/i.test(d))&&(S.desktop=!1),navigator.standalone&&(S.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(S.cordova=!0),window.ejecta!==void 0&&(S.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(S.node=!0),S.node&&typeof process.versions=="object"&&(S.nodeWebkit=!!process.versions["node-webkit"],S.electron=!!process.versions.electron),/Crosswalk/.test(d)&&(S.crosswalk=!0),S.pixelRatio=window.devicePixelRatio||1,S}p.exports=t()},43267:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(95540),c={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function h(){if(typeof importScripts=="function")return c;var r=document.createElement("video"),n=!!r.canPlayType,e=/^no$/;try{n&&(r.canPlayType('video/ogg; codecs="theora"').replace(e,"")&&(c.ogg=!0),r.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(e,"")&&(c.h264=!0,c.mp4=!0),r.canPlayType("video/x-m4v").replace(e,"")&&(c.m4v=!0),r.canPlayType('video/webm; codecs="vp8, vorbis"').replace(e,"")&&(c.webm=!0),r.canPlayType('video/webm; codecs="vp9"').replace(e,"")&&(c.vp9=!0),r.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(e,"")&&(c.hls=!0))}catch{}return r.parentNode&&r.parentNode.removeChild(r),c.getVideoURL=function(s){Array.isArray(s)||(s=[s]);for(var o=0;o<s.length;o++){var i=d(s[o],"url",s[o]);if(i.indexOf("blob:")===0)return{url:i,type:""};var a;if(i.indexOf("data:")===0?a=i.split(",")[0].match(/\/(.*?);/):a=i.match(/\.([a-zA-Z0-9]+)($|\?)/),a=d(s[o],"type",a?a[1]:"").toLowerCase(),c[a])return{url:i,type:a}}return null},c}p.exports=h()},82264:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={os:t(25892),browser:t(84148),features:t(89357),input:t(31784),audio:t(7098),video:t(43267),fullscreen:t(91639),canvasFeatures:t(89289)}},89422:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new Float32Array(20),h=new d({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(r){return this._matrix.set(r),this._dirty=!0,this},reset:function(){var r=this._matrix;return r.fill(0),r[0]=1,r[6]=1,r[12]=1,r[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var r=this._data;return this._dirty&&(r.set(this._matrix),r[4]/=255,r[9]/=255,r[14]/=255,r[19]/=255,this._dirty=!1),r},brightness:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r;return this.multiply([e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0],n)},saturate:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r*2/3+1,s=(e-1)*-.5;return this.multiply([e,s,s,0,0,s,e,s,0,0,s,s,e,0,0,0,0,0,1,0],n)},desaturate:function(r){return r===void 0&&(r=!1),this.saturate(-1,r)},hue:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1),r=r/180*Math.PI;var e=Math.cos(r),s=Math.sin(r),o=.213,i=.715,a=.072;return this.multiply([o+e*(1-o)+s*-o,i+e*-i+s*-i,a+e*-a+s*(1-a),0,0,o+e*-o+s*.143,i+e*(1-i)+s*.14,a+e*-a+s*-.283,0,0,o+e*-o+s*-(1-o),i+e*-i+s*i,a+e*(1-a)+s*a,0,0,0,0,0,1,0],n)},grayscale:function(r,n){return r===void 0&&(r=1),n===void 0&&(n=!1),this.saturate(-r,n)},blackWhite:function(r){return r===void 0&&(r=!1),this.multiply(h.BLACK_WHITE,r)},contrast:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r+1,s=-.5*(e-1);return this.multiply([e,0,0,0,s,0,e,0,0,s,0,0,e,0,s,0,0,0,1,0],n)},negative:function(r){return r===void 0&&(r=!1),this.multiply(h.NEGATIVE,r)},desaturateLuminance:function(r){return r===void 0&&(r=!1),this.multiply(h.DESATURATE_LUMINANCE,r)},sepia:function(r){return r===void 0&&(r=!1),this.multiply(h.SEPIA,r)},night:function(r,n){return r===void 0&&(r=.1),n===void 0&&(n=!1),this.multiply([r*-2,-r,0,0,0,-r,0,r,0,0,0,r,r*2,0,0,0,0,0,1,0],n)},lsd:function(r){return r===void 0&&(r=!1),this.multiply(h.LSD,r)},brown:function(r){return r===void 0&&(r=!1),this.multiply(h.BROWN,r)},vintagePinhole:function(r){return r===void 0&&(r=!1),this.multiply(h.VINTAGE,r)},kodachrome:function(r){return r===void 0&&(r=!1),this.multiply(h.KODACHROME,r)},technicolor:function(r){return r===void 0&&(r=!1),this.multiply(h.TECHNICOLOR,r)},polaroid:function(r){return r===void 0&&(r=!1),this.multiply(h.POLAROID,r)},shiftToBGR:function(r){return r===void 0&&(r=!1),this.multiply(h.SHIFT_BGR,r)},multiply:function(r,n){n===void 0&&(n=!1),n||this.reset();var e=this._matrix,s=c;return s.set(e),e.set([s[0]*r[0]+s[1]*r[5]+s[2]*r[10]+s[3]*r[15],s[0]*r[1]+s[1]*r[6]+s[2]*r[11]+s[3]*r[16],s[0]*r[2]+s[1]*r[7]+s[2]*r[12]+s[3]*r[17],s[0]*r[3]+s[1]*r[8]+s[2]*r[13]+s[3]*r[18],s[0]*r[4]+s[1]*r[9]+s[2]*r[14]+s[3]*r[19]+s[4],s[5]*r[0]+s[6]*r[5]+s[7]*r[10]+s[8]*r[15],s[5]*r[1]+s[6]*r[6]+s[7]*r[11]+s[8]*r[16],s[5]*r[2]+s[6]*r[7]+s[7]*r[12]+s[8]*r[17],s[5]*r[3]+s[6]*r[8]+s[7]*r[13]+s[8]*r[18],s[5]*r[4]+s[6]*r[9]+s[7]*r[14]+s[8]*r[19]+s[9],s[10]*r[0]+s[11]*r[5]+s[12]*r[10]+s[13]*r[15],s[10]*r[1]+s[11]*r[6]+s[12]*r[11]+s[13]*r[16],s[10]*r[2]+s[11]*r[7]+s[12]*r[12]+s[13]*r[17],s[10]*r[3]+s[11]*r[8]+s[12]*r[13]+s[13]*r[18],s[10]*r[4]+s[11]*r[9]+s[12]*r[14]+s[13]*r[19]+s[14],s[15]*r[0]+s[16]*r[5]+s[17]*r[10]+s[18]*r[15],s[15]*r[1]+s[16]*r[6]+s[17]*r[11]+s[18]*r[16],s[15]*r[2]+s[16]*r[7]+s[17]*r[12]+s[18]*r[17],s[15]*r[3]+s[16]*r[8]+s[17]*r[13]+s[18]*r[18],s[15]*r[4]+s[16]*r[9]+s[17]*r[14]+s[18]*r[19]+s[19]]),this._dirty=!0,this}});h.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],h.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],h.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],h.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],h.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],h.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],h.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],h.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],h.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],h.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],h.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],p.exports=h},51767:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(29747),h=new d({initialize:function(n,e,s){this._rgb=[0,0,0],this.onChangeCallback=c,this.dirty=!1,this.set(n,e,s)},set:function(r,n,e){return r===void 0&&(r=0),n===void 0&&(n=0),e===void 0&&(e=0),this._rgb=[r,n,e],this.onChange(),this},equals:function(r,n,e){var s=this._rgb;return s[0]===r&&s[1]===n&&s[2]===e},onChange:function(){this.dirty=!0;var r=this._rgb;this.onChangeCallback.call(this,r[0],r[1],r[2])},r:{get:function(){return this._rgb[0]},set:function(r){this._rgb[0]=r,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(r){this._rgb[1]=r,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(r){this._rgb[2]=r,this.onChange()}},destroy:function(){this.onChangeCallback=null}});p.exports=h},60461:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12};p.exports=S},54312:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62235),c=t(35893),h=t(86327),r=t(88417),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n},46768:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62235),c=t(26541),h=t(86327),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)-o),h(e,d(s)+i),e};p.exports=n},35827:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62235),c=t(54380),h=t(86327),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n},46871:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66786),c=t(35893),h=t(7702),r=function(n,e,s,o){return s===void 0&&(s=0),o===void 0&&(o=0),d(n,c(e)+s,h(e)+o),n};p.exports=r},5198:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7702),c=t(26541),h=t(20786),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)-o),h(e,d(s)+i),e};p.exports=n},11879:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(60461),c=[];c[d.BOTTOM_CENTER]=t(54312),c[d.BOTTOM_LEFT]=t(46768),c[d.BOTTOM_RIGHT]=t(35827),c[d.CENTER]=t(46871),c[d.LEFT_CENTER]=t(5198),c[d.RIGHT_CENTER]=t(80503),c[d.TOP_CENTER]=t(89698),c[d.TOP_LEFT]=t(922),c[d.TOP_RIGHT]=t(21373),c[d.LEFT_BOTTOM]=c[d.BOTTOM_LEFT],c[d.LEFT_TOP]=c[d.TOP_LEFT],c[d.RIGHT_BOTTOM]=c[d.BOTTOM_RIGHT],c[d.RIGHT_TOP]=c[d.TOP_RIGHT];var h=function(r,n,e,s,o){return c[e](r,n,s,o)};p.exports=h},80503:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7702),c=t(54380),h=t(20786),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n},89698:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(35893),c=t(17717),h=t(88417),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)+o),r(e,c(s)-i),e};p.exports=n},922:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26541),c=t(17717),h=t(385),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)-o),r(e,c(s)-i),e};p.exports=n},21373:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(54380),c=t(17717),h=t(40136),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)+o),r(e,c(s)-i),e};p.exports=n},91660:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={BottomCenter:t(54312),BottomLeft:t(46768),BottomRight:t(35827),Center:t(46871),LeftCenter:t(5198),QuickSet:t(11879),RightCenter:t(80503),TopCenter:t(89698),TopLeft:t(922),TopRight:t(21373)}},71926:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(60461),c=t(79291),h={In:t(91660),To:t(16694)};h=c(!1,h,d),p.exports=h},21578:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62235),c=t(35893),h=t(88417),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,c(s)+o),r(e,d(s)+i),e};p.exports=n},10210:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62235),c=t(26541),h=t(385),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,c(s)-o),r(e,d(s)+i),e};p.exports=n},82341:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62235),c=t(54380),h=t(40136),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,c(s)+o),r(e,d(s)+i),e};p.exports=n},87958:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62235),c=t(26541),h=t(86327),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)-o),h(e,d(s)+i),e};p.exports=n},40080:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7702),c=t(26541),h=t(20786),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)-o),h(e,d(s)+i),e};p.exports=n},88466:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26541),c=t(17717),h=t(40136),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)-o),r(e,c(s)-i),e};p.exports=n},38829:(p,S,t)=>{/**
* @author samme
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(60461),c=[];c[d.BOTTOM_CENTER]=t(21578),c[d.BOTTOM_LEFT]=t(10210),c[d.BOTTOM_RIGHT]=t(82341),c[d.LEFT_BOTTOM]=t(87958),c[d.LEFT_CENTER]=t(40080),c[d.LEFT_TOP]=t(88466),c[d.RIGHT_BOTTOM]=t(19211),c[d.RIGHT_CENTER]=t(34609),c[d.RIGHT_TOP]=t(48741),c[d.TOP_CENTER]=t(49440),c[d.TOP_LEFT]=t(81288),c[d.TOP_RIGHT]=t(61323);var h=function(r,n,e,s,o){return c[e](r,n,s,o)};p.exports=h},19211:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62235),c=t(54380),h=t(86327),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n},34609:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7702),c=t(54380),h=t(20786),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n},48741:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(54380),c=t(17717),h=t(385),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)+o),r(e,c(s)-i),e};p.exports=n},49440:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(35893),c=t(17717),h=t(86327),r=t(88417),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,d(s)+o),h(e,c(s)-i),e};p.exports=n},81288:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26541),c=t(17717),h=t(86327),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,d(s)-o),h(e,c(s)-i),e};p.exports=n},61323:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(54380),c=t(17717),h=t(86327),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,d(s)+o),h(e,c(s)-i),e};p.exports=n},16694:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={BottomCenter:t(21578),BottomLeft:t(10210),BottomRight:t(82341),LeftBottom:t(87958),LeftCenter:t(40080),LeftTop:t(88466),QuickSet:t(38829),RightBottom:t(19211),RightCenter:t(34609),RightTop:t(48741),TopCenter:t(49440),TopLeft:t(81288),TopRight:t(61323)}},66786:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(88417),c=t(20786),h=function(r,n,e){return d(r,n),c(r,e)};p.exports=h},62235:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.y+t.height-t.height*t.originY};p.exports=S},72873:(p,S,t)=>{/**
* @author samme
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62235),c=t(26541),h=t(54380),r=t(17717),n=t(87841),e=function(s,o){o===void 0&&(o=new n);var i=c(s),a=r(s);return o.x=i,o.y=a,o.width=h(s)-i,o.height=d(s)-a,o};p.exports=e},35893:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.x-t.width*t.originX+t.width*.5};p.exports=S},7702:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.y-t.height*t.originY+t.height*.5};p.exports=S},26541:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.x-t.width*t.originX};p.exports=S},87431:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.width*t.originX};p.exports=S},46928:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.height*t.originY};p.exports=S},54380:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.x+t.width-t.width*t.originX};p.exports=S},17717:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.y-t.height*t.originY};p.exports=S},86327:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.y=d-t.height+t.height*t.originY,t};p.exports=S},88417:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=t.width*t.originX;return t.x=d+c-t.width*.5,t};p.exports=S},20786:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=t.height*t.originY;return t.y=d+c-t.height*.5,t};p.exports=S},385:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.x=d+t.width*t.originX,t};p.exports=S},40136:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.x=d-t.width+t.width*t.originX,t};p.exports=S},66737:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.y=d+t.height*t.originY,t};p.exports=S},58724:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={CenterOn:t(66786),GetBottom:t(62235),GetBounds:t(72873),GetCenterX:t(35893),GetCenterY:t(7702),GetLeft:t(26541),GetOffsetX:t(87431),GetOffsetY:t(46928),GetRight:t(54380),GetTop:t(17717),SetBottom:t(86327),SetCenterX:t(88417),SetCenterY:t(20786),SetLeft:t(385),SetRight:t(40136),SetTop:t(66737)}},20623:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setCrisp:function(t){var d=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return d.forEach(function(c){t.style["image-rendering"]=c}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}};p.exports=S},27919:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(8054),c=t(68703),h=[],r=!1,n=function(){var e=function(m,g,x,y,T){g===void 0&&(g=1),x===void 0&&(x=1),y===void 0&&(y=d.CANVAS),T===void 0&&(T=!1);var C,E=i(y);return E===null?(E={parent:m,canvas:document.createElement("canvas"),type:y},y===d.CANVAS&&h.push(E),C=E.canvas):(E.parent=m,C=E.canvas),T&&(E.parent=C),C.width=g,C.height=x,r&&y===d.CANVAS&&c.disable(C.getContext("2d",{willReadFrequently:!1})),C},s=function(m,g,x){return e(m,g,x,d.CANVAS)},o=function(m,g,x){return e(m,g,x,d.WEBGL)},i=function(m){if(m===void 0&&(m=d.CANVAS),m===d.WEBGL)return null;for(var g=0;g<h.length;g++){var x=h[g];if(!x.parent&&x.type===m)return x}return null},a=function(m){var g=m instanceof HTMLCanvasElement;h.forEach(function(x){(g&&x.canvas===m||!g&&x.parent===m)&&(x.parent=null,x.canvas.width=1,x.canvas.height=1)})},l=function(){var m=0;return h.forEach(function(g){g.parent&&m++}),m},u=function(){return h.length-l()},f=function(){r=!0},v=function(){r=!1};return{create2D:s,create:e,createWebGL:o,disableSmoothing:f,enableSmoothing:v,first:i,free:u,pool:h,remove:a,total:l}};p.exports=n()},68703:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S="",t=function(){var d=function(n){for(var e=["i","webkitI","msI","mozI","oI"],s=0;s<e.length;s++){var o=e[s]+"mageSmoothingEnabled";if(o in n)return o}return null},c=function(n){return S===""&&(S=d(n)),S&&(n[S]=!0),n},h=function(n){return S===""&&(S=d(n)),S&&(n[S]=!1),n},r=function(n){return S!==null?n[S]:null};return{disable:h,enable:c,getPrefix:d,isEnabled:r}};p.exports=t()},65208:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d===void 0&&(d="none"),t.style.msTouchAction=d,t.style["ms-touch-action"]=d,t.style["touch-action"]=d,t};p.exports=S},91610:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){d===void 0&&(d="none");var c=["-webkit-","-khtml-","-moz-","-ms-",""];return c.forEach(function(h){t.style[h+"user-select"]=d}),t.style["-webkit-touch-callout"]=d,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t};p.exports=S},26253:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={CanvasInterpolation:t(20623),CanvasPool:t(27919),Smoothing:t(68703),TouchAction:t(65208),UserSelect:t(91610)}},40987:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(37589),h=t(1e3),r=t(7537),n=t(87837),e=new d({initialize:function(o,i,a,l){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(o,i,a,l)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(s,o,i,a,l){return a===void 0&&(a=255),l===void 0&&(l=!0),this._locked=!0,this.red=s,this.green=o,this.blue=i,this.alpha=a,this._locked=!1,this.update(l)},setGLTo:function(s,o,i,a){return a===void 0&&(a=1),this._locked=!0,this.redGL=s,this.greenGL=o,this.blueGL=i,this.alphaGL=a,this._locked=!1,this.update(!0)},setFromRGB:function(s){return this._locked=!0,this.red=s.r,this.green=s.g,this.blue=s.b,s.hasOwnProperty("a")&&(this.alpha=s.a),this._locked=!1,this.update(!0)},setFromHSV:function(s,o,i){return r(s,o,i,this)},update:function(s){if(s===void 0&&(s=!1),this._locked)return this;var o=this.r,i=this.g,a=this.b,l=this.a;return this._color=c(o,i,a),this._color32=h(o,i,a,l),this._rgba="rgba("+o+","+i+","+a+","+l/255+")",s&&n(o,i,a,this),this},updateHSV:function(){var s=this.r,o=this.g,i=this.b;return n(s,o,i,this),this},clone:function(){return new e(this.r,this.g,this.b,this.a)},gray:function(s){return this.setTo(s,s,s)},random:function(s,o){s===void 0&&(s=0),o===void 0&&(o=255);var i=Math.floor(s+Math.random()*(o-s)),a=Math.floor(s+Math.random()*(o-s)),l=Math.floor(s+Math.random()*(o-s));return this.setTo(i,a,l)},randomGray:function(s,o){s===void 0&&(s=0),o===void 0&&(o=255);var i=Math.floor(s+Math.random()*(o-s));return this.setTo(i,i,i)},saturate:function(s){return this.s+=s/100,this},desaturate:function(s){return this.s-=s/100,this},lighten:function(s){return this.v+=s/100,this},darken:function(s){return this.v-=s/100,this},brighten:function(s){var o=this.r,i=this.g,a=this.b;return o=Math.max(0,Math.min(255,o-Math.round(255*-(s/100)))),i=Math.max(0,Math.min(255,i-Math.round(255*-(s/100)))),a=Math.max(0,Math.min(255,a-Math.round(255*-(s/100)))),this.setTo(o,i,a)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(s){this.gl[0]=Math.min(Math.abs(s),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(s){this.gl[1]=Math.min(Math.abs(s),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(s){this.gl[2]=Math.min(Math.abs(s),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(s){this.gl[3]=Math.min(Math.abs(s),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(s){s=Math.floor(Math.abs(s)),this.r=Math.min(s,255),this.gl[0]=s/255,this.update(!0)}},green:{get:function(){return this.g},set:function(s){s=Math.floor(Math.abs(s)),this.g=Math.min(s,255),this.gl[1]=s/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(s){s=Math.floor(Math.abs(s)),this.b=Math.min(s,255),this.gl[2]=s/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(s){s=Math.floor(Math.abs(s)),this.a=Math.min(s,255),this.gl[3]=s/255,this.update()}},h:{get:function(){return this._h},set:function(s){this._h=s,r(s,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(s){this._s=s,r(this._h,s,this._v,this)}},v:{get:function(){return this._v},set:function(s){this._v=s,r(this._h,this._s,s,this)}}});p.exports=e},92728:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(37589),c=function(h){h===void 0&&(h=1024);var r=[],n=255,e,s=255,o=0,i=0;for(e=0;e<=n;e++)r.push({r:s,g:e,b:i,color:d(s,e,i)});for(o=255,e=n;e>=0;e--)r.push({r:e,g:o,b:i,color:d(e,o,i)});for(s=0,e=0;e<=n;e++,o--)r.push({r:s,g:o,b:e,color:d(s,o,e)});for(o=0,i=255,e=0;e<=n;e++,i--,s++)r.push({r:s,g:o,b:i,color:d(s,o,i)});if(h===1024)return r;var a=[],l=0,u=1024/h;for(e=0;e<h;e++)a.push(r[Math.floor(l)]),l+=u;return a};p.exports=c},91588:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d={r:t>>16&255,g:t>>8&255,b:t&255,a:255};return t>16777215&&(d.a=t>>>24),d};p.exports=S},62957:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d=t.toString(16);return d.length===1?"0"+d:d};p.exports=S},37589:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return t<<16|d<<8|c};p.exports=S},1e3:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){return h<<24|t<<16|d<<8|c};p.exports=S},62183:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(40987),c=t(89528),h=function(r,n,e){var s=e,o=e,i=e;if(n!==0){var a=e<.5?e*(1+n):e+n-e*n,l=2*e-a;s=c(l,a,r+1/3),o=c(l,a,r),i=c(l,a,r-1/3)}var u=new d;return u.setGLTo(s,o,i,1)};p.exports=h},27939:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7537),c=function(h,r){h===void 0&&(h=1),r===void 0&&(r=1);for(var n=[],e=0;e<=359;e++)n.push(d(e/359,h,r));return n};p.exports=c},7537:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(37589);function c(r,n,e,s){var o=(r+n*6)%6,i=Math.min(o,4-o,1);return Math.round(255*(s-s*e*Math.max(0,i)))}var h=function(r,n,e,s){n===void 0&&(n=1),e===void 0&&(e=1);var o=c(5,r,n,e),i=c(3,r,n,e),a=c(1,r,n,e);return s?s.setTo?s.setTo(o,i,a,s.alpha,!0):(s.r=o,s.g=i,s.b=a,s.color=d(o,i,a),s):{r:o,g:i,b:a,color:d(o,i,a)}};p.exports=h},70238:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(40987),c=function(h){var r=new d;h=h.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(i,a,l,u){return a+a+l+l+u+u});var n=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(h);if(n){var e=parseInt(n[1],16),s=parseInt(n[2],16),o=parseInt(n[3],16);r.setTo(e,s,o)}return r};p.exports=c},89528:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return c<0&&(c+=1),c>1&&(c-=1),c<.16666666666666666?t+(d-t)*6*c:c<.5?d:c<.6666666666666666?t+(d-t)*(.6666666666666666-c)*6:t};p.exports=S},30100:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(40987),c=t(90664),h=function(r){var n=c(r);return new d(n.r,n.g,n.b,n.a)};p.exports=h},90664:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:t&255}:{a:255,r:t>>16&255,g:t>>8&255,b:t&255}};p.exports=S},13699:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(28915),c=function(n,e,s,o,i,a,l,u){l===void 0&&(l=100),u===void 0&&(u=0);var f=u/l;return{r:d(n,o,f),g:d(e,i,f),b:d(s,a,f)}},h=function(n,e,s,o){return s===void 0&&(s=100),o===void 0&&(o=0),c(n.r,n.g,n.b,e.r,e.g,e.b,s,o)},r=function(n,e,s,o,i,a){return i===void 0&&(i=100),a===void 0&&(a=0),c(n.r,n.g,n.b,e,s,o,i,a)};p.exports={RGBWithRGB:c,ColorWithRGB:r,ColorWithColor:h}},68957:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(40987),c=function(h){return new d(h.r,h.g,h.b,h.a)};p.exports=c},87388:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(40987),c=function(h){var r=new d,n=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(h.toLowerCase());if(n){var e=parseInt(n[1],10),s=parseInt(n[2],10),o=parseInt(n[3],10),i=n[4]!==void 0?parseFloat(n[4]):1;r.setTo(e,s,o,i*255)}return r};p.exports=c},87837:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){h===void 0&&(h={h:0,s:0,v:0}),t/=255,d/=255,c/=255;var r=Math.min(t,d,c),n=Math.max(t,d,c),e=n-r,s=0,o=n===0?0:e/n,i=n;return n!==r&&(n===t?s=(d-c)/e+(d<c?6:0):n===d?s=(c-t)/e+2:n===c&&(s=(t-d)/e+4),s/=6),h.hasOwnProperty("_h")?(h._h=s,h._s=o,h._v=i):(h.h=s,h.s=o,h.v=i),h};p.exports=S},75723:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62957),c=function(h,r,n,e,s){return e===void 0&&(e=255),s===void 0&&(s="#"),s==="#"?"#"+((1<<24)+(h<<16)+(r<<8)+n).toString(16).slice(1,7):"0x"+d(e)+d(h)+d(r)+d(n)};p.exports=c},85386:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(30976),c=t(40987),h=function(r,n){return r===void 0&&(r=0),n===void 0&&(n=255),new c(d(r,n),d(r,n),d(r,n))};p.exports=h},80333:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(70238),c=t(30100),h=t(68957),r=t(87388),n=function(e){var s=typeof e;switch(s){case"string":return e.substr(0,3).toLowerCase()==="rgb"?r(e):d(e);case"number":return c(e);case"object":return h(e)}};p.exports=n},3956:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(40987);d.ColorSpectrum=t(92728),d.ColorToRGBA=t(91588),d.ComponentToHex=t(62957),d.GetColor=t(37589),d.GetColor32=t(1e3),d.HexStringToColor=t(70238),d.HSLToColor=t(62183),d.HSVColorWheel=t(27939),d.HSVToRGB=t(7537),d.HueToComponent=t(89528),d.IntegerToColor=t(30100),d.IntegerToRGB=t(90664),d.Interpolate=t(13699),d.ObjectToColor=t(68957),d.RandomRGB=t(85386),d.RGBStringToColor=t(87388),d.RGBToHSV=t(87837),d.RGBToString=t(75723),d.ValueToColor=t(80333),p.exports=d},27460:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Align:t(71926),BaseShader:t(73894),Bounds:t(58724),Canvas:t(26253),Color:t(3956),ColorMatrix:t(89422),Masks:t(69781),RGB:t(51767)}},6858:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(39429),h=new d({initialize:function(n,e,s,o,i,a){e||(e=n.sys.make.image({x:s,y:o,key:i,frame:a,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(r){this.bitmapMask=r},preRenderWebGL:function(r,n,e){r.pipelines.BITMAPMASK_PIPELINE.beginMask(this,n,e)},postRenderWebGL:function(r,n,e){r.pipelines.BITMAPMASK_PIPELINE.endMask(this,n,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});c.register("bitmapMask",function(r,n,e,s,o){return new h(this.scene,r,n,e,s,o)}),p.exports=h},80661:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n){this.geometryMask=n,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(h){return this.geometryMask=h,this},setInvertAlpha:function(h){return h===void 0&&(h=!0),this.invertAlpha=h,this},preRenderWebGL:function(h,r,n){var e=h.gl;h.flush(),h.maskStack.length===0&&(e.enable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),h.maskCount=0),h.currentCameraMask.mask!==this&&(h.currentMask.mask=this),h.maskStack.push({mask:this,camera:n}),this.applyStencil(h,n,!0),h.maskCount++},applyStencil:function(h,r,n){var e=h.gl,s=this.geometryMask,o=h.maskCount,i=255;e.colorMask(!1,!1,!1,!1),n?(e.stencilFunc(e.EQUAL,o,i),e.stencilOp(e.KEEP,e.KEEP,e.INCR),o++):(e.stencilFunc(e.EQUAL,o+1,i),e.stencilOp(e.KEEP,e.KEEP,e.DECR)),this.level=o,s.renderWebGL(h,s,r),h.flush(),e.colorMask(!0,!0,!0,!0),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),this.invertAlpha?e.stencilFunc(e.NOTEQUAL,o,i):e.stencilFunc(e.EQUAL,o,i)},postRenderWebGL:function(h){var r=h.gl;h.maskStack.pop(),h.maskCount--,h.flush();var n=h.currentMask;if(h.maskStack.length===0)n.mask=null,r.disable(r.STENCIL_TEST);else{var e=h.maskStack[h.maskStack.length-1];e.mask.applyStencil(h,e.camera,!1),h.currentCameraMask.mask!==e.mask?(n.mask=e.mask,n.camera=e.camera):n.mask=null}},preRenderCanvas:function(h,r,n){var e=this.geometryMask;h.currentContext.save(),e.renderCanvas(h,e,n,null,null,!0),h.currentContext.clip()},postRenderCanvas:function(h){h.currentContext.restore()},destroy:function(){this.geometryMask=null}});p.exports=c},69781:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={BitmapMask:t(6858),GeometryMask:t(80661)}},73894:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n,e,s){(!n||n==="")&&(n=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join(`
`)),(!e||e==="")&&(e=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join(`
`)),s===void 0&&(s=null),this.key=r,this.fragmentSrc=n,this.vertexSrc=e,this.uniforms=s}});p.exports=c},40366:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c;if(d)typeof d=="string"?c=document.getElementById(d):typeof d=="object"&&d.nodeType===1&&(c=d);else if(t.parentElement||d===null)return t;return c||(c=document.body),c.appendChild(t),t};p.exports=S},83719:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(40366),c=function(h){var r=h.config;if(!(!r.parent||!r.domCreateContainer)){var n=document.createElement("div");n.style.cssText=["display: block;","width: "+h.scale.width+"px;","height: "+h.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+r.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),h.domContainer=n,d(n,r.parent)}};p.exports=c},57264:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25892),c=function(h){if(document.readyState==="complete"||document.readyState==="interactive"){h();return}var r=function(){document.removeEventListener("deviceready",r,!0),document.removeEventListener("DOMContentLoaded",r,!0),window.removeEventListener("load",r,!0),h()};document.body?d.cordova?document.addEventListener("deviceready",r,!1):(document.addEventListener("DOMContentLoaded",r,!0),window.addEventListener("load",r,!0)):window.setTimeout(r,20)};p.exports=c},57811:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){if(!t)return window.innerHeight;var d=Math.abs(window.orientation),c={w:0,h:0},h=document.createElement("div");return h.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(h),c.w=d===90?h.offsetHeight:window.innerWidth,c.h=d===90?window.innerWidth:h.offsetHeight,document.documentElement.removeChild(h),h=null,Math.abs(window.orientation)!==90?c.h:c.w};p.exports=S},45818:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(13560),c=function(h,r){var n=window.screen,e=n?n.orientation||n.mozOrientation||n.msOrientation:!1;if(e&&typeof e.type=="string")return e.type;if(typeof e=="string")return e;if(typeof window.orientation=="number")return window.orientation===0||window.orientation===180?d.ORIENTATION.PORTRAIT:d.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return d.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return d.ORIENTATION.LANDSCAPE}else return r>h?d.ORIENTATION.PORTRAIT:d.ORIENTATION.LANDSCAPE};p.exports=c},74403:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d;return t!==""&&(typeof t=="string"?d=document.getElementById(t):t&&t.nodeType===1&&(d=t)),d||(d=document.body),d};p.exports=S},56836:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d="";try{if(window.DOMParser){var c=new DOMParser;d=c.parseFromString(t,"text/xml")}else d=new ActiveXObject("Microsoft.XMLDOM"),d.loadXML(t)}catch{d=null}return!d||!d.documentElement||d.getElementsByTagName("parsererror").length?null:d};p.exports=S},35846:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){t.parentNode&&t.parentNode.removeChild(t)};p.exports=S},43092:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(29747),h=new d({initialize:function(){this.isRunning=!1,this.callback=c,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var n=this;this.step=function e(s){n.callback(s),n.isRunning&&(n.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){n.isRunning&&(n.timeOutID=window.setTimeout(e,n.delay)),n.callback(window.performance.now())}},start:function(r,n,e){this.isRunning||(this.callback=r,this.isSetTimeOut=n,this.delay=e,this.isRunning=!0,this.timeOutID=n?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=c}});p.exports=h},84902:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d={AddToDOM:t(40366),DOMContentLoaded:t(57264),GetInnerHeight:t(57811),GetScreenOrientation:t(45818),GetTarget:t(74403),ParseXML:t(56836),RemoveFromDOM:t(35846),RequestAnimationFrame:t(43092)};p.exports=d},47565:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(50792),h=t(37277),r=new d({Extends:c,initialize:function(){c.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});h.register("EventEmitter",r,"events"),p.exports=r},93055:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={EventEmitter:t(47565)}},20122:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s){s===void 0&&(s=1),c.call(this,h.BARREL,e),this.amount=s}});p.exports=r},32251:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,u){o===void 0&&(o=1),i===void 0&&(i=1),a===void 0&&(a=1),l===void 0&&(l=1),u===void 0&&(u=4),c.call(this,h.BLOOM,e),this.steps=u,this.offsetX=o,this.offsetY=i,this.blurStrength=a,this.strength=l,this.glcolor=[1,1,1],s!=null&&(this.color=s)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r},9047:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,u){s===void 0&&(s=0),o===void 0&&(o=2),i===void 0&&(i=2),a===void 0&&(a=1),u===void 0&&(u=4),c.call(this,h.BLUR,e),this.quality=s,this.x=o,this.y=i,this.steps=u,this.strength=a,this.glcolor=[1,1,1],l!=null&&(this.color=l)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r},27885:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,u,f){s===void 0&&(s=.5),o===void 0&&(o=1),i===void 0&&(i=.2),a===void 0&&(a=!1),l===void 0&&(l=1),u===void 0&&(u=1),f===void 0&&(f=1),c.call(this,h.BOKEH,e),this.radius=s,this.amount=o,this.contrast=i,this.isTiltShift=a,this.strength=f,this.blurX=l,this.blurY=u}});p.exports=r},12578:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l){s===void 0&&(s=8),a===void 0&&(a=1),l===void 0&&(l=.005),c.call(this,h.CIRCLE,e),this.scale=a,this.feather=l,this.thickness=s,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],o!=null&&(this.color=o),i!=null&&(this.backgroundColor=i)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}},backgroundColor:{get:function(){var n=this.glcolor2;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor2;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(n){this.glcolor2[3]=n}}});p.exports=r},15802:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(89422),h=t(14811),r=new d({Extends:c,initialize:function(e){c.call(this),this.type=h.COLOR_MATRIX,this.gameObject=e,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});p.exports=r},72898:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n){this.type=r,this.gameObject=n,this.active=!0},setActive:function(h){return this.active=h,this},destroy:function(){this.gameObject=null,this.active=!1}});p.exports=c},44553:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i){s===void 0&&(s="__WHITE"),o===void 0&&(o=.005),i===void 0&&(i=.005),c.call(this,h.DISPLACEMENT,e),this.x=o,this.y=i,this.glTexture,this.setTexture(s)},setTexture:function(n){var e=this.gameObject.scene.sys.textures.getFrame(n);return e&&(this.glTexture=e.glTexture),this}});p.exports=r},68531:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a){o===void 0&&(o=4),i===void 0&&(i=0),a===void 0&&(a=!1),c.call(this,h.GLOW,e),this.outerStrength=o,this.innerStrength=i,this.knockout=a,this.glcolor=[1,1,1,1],s!==void 0&&(this.color=s)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r},37102:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,u,f,v){i===void 0&&(i=.2),a===void 0&&(a=0),l===void 0&&(l=0),u===void 0&&(u=0),f===void 0&&(f=1),v===void 0&&(v=0),c.call(this,h.GRADIENT,e),this.alpha=i,this.size=v,this.fromX=a,this.fromY=l,this.toX=u,this.toY=f,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],s!=null&&(this.color1=s),o!=null&&(this.color2=o)},color1:{get:function(){var n=this.glcolor1;return(n[0]<<16)+(n[1]<<8)+(n[2]|0)},set:function(n){var e=this.glcolor1;e[0]=n>>16&255,e[1]=n>>8&255,e[2]=n&255}},color2:{get:function(){var n=this.glcolor2;return(n[0]<<16)+(n[1]<<8)+(n[2]|0)},set:function(n){var e=this.glcolor2;e[0]=n>>16&255,e[1]=n>>8&255,e[2]=n&255}}});p.exports=r},86886:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s){s===void 0&&(s=1),c.call(this,h.PIXELATE,e),this.amount=s}});p.exports=r},92322:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,u,f){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=.1),a===void 0&&(a=1),u===void 0&&(u=6),f===void 0&&(f=1),c.call(this,h.SHADOW,e),this.x=s,this.y=o,this.decay=i,this.power=a,this.glcolor=[0,0,0,1],this.samples=u,this.intensity=f,l!==void 0&&(this.color=l)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r},39563:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a){s===void 0&&(s=.5),o===void 0&&(o=.5),i===void 0&&(i=3),a===void 0&&(a=!1),c.call(this,h.SHINE,e),this.speed=s,this.lineWidth=o,this.gradient=i,this.reveal=a}});p.exports=r},56448:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a){s===void 0&&(s=.5),o===void 0&&(o=.5),i===void 0&&(i=.5),a===void 0&&(a=.5),c.call(this,h.VIGNETTE,e),this.x=s,this.y=o,this.radius=i,this.strength=a}});p.exports=r},38433:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a){s===void 0&&(s=.1),o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=!1),c.call(this,h.WIPE,e),this.progress=0,this.wipeWidth=s,this.direction=o,this.axis=i,this.reveal=a}});p.exports=r},14811:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19};p.exports=S},66064:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(79291),c=t(14811),h={Barrel:t(20122),Controller:t(72898),Bloom:t(32251),Blur:t(9047),Bokeh:t(27885),Circle:t(12578),ColorMatrix:t(15802),Displacement:t(44553),Glow:t(68531),Gradient:t(37102),Pixelate:t(86886),Shadow:t(92322),Shine:t(39563),Vignette:t(56448),Wipe:t(38433)};h=d(!1,h,c),p.exports=h},25305:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(10312),c=t(23568),h=function(r,n,e){n.x=c(e,"x",0),n.y=c(e,"y",0),n.depth=c(e,"depth",0),n.flipX=c(e,"flipX",!1),n.flipY=c(e,"flipY",!1);var s=c(e,"scale",null);typeof s=="number"?n.setScale(s):s!==null&&(n.scaleX=c(s,"x",1),n.scaleY=c(s,"y",1));var o=c(e,"scrollFactor",null);typeof o=="number"?n.setScrollFactor(o):o!==null&&(n.scrollFactorX=c(o,"x",1),n.scrollFactorY=c(o,"y",1)),n.rotation=c(e,"rotation",0);var i=c(e,"angle",null);i!==null&&(n.angle=i),n.alpha=c(e,"alpha",1);var a=c(e,"origin",null);if(typeof a=="number")n.setOrigin(a);else if(a!==null){var l=c(a,"x",.5),u=c(a,"y",.5);n.setOrigin(l,u)}n.blendMode=c(e,"blendMode",d.NORMAL),n.visible=c(e,"visible",!0);var f=c(e,"add",!0);return f&&r.sys.displayList.add(n),n.preUpdate&&r.sys.updateList.add(n),n};p.exports=h},13059:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(23568),c=function(h,r){var n=d(r,"anims",null);if(n===null)return h;if(typeof n=="string")h.anims.play(n);else if(typeof n=="object"){var e=h.anims,s=d(n,"key",void 0);if(s){var o=d(n,"startFrame",void 0),i=d(n,"delay",0),a=d(n,"repeat",0),l=d(n,"repeatDelay",0),u=d(n,"yoyo",!1),f=d(n,"play",!1),v=d(n,"delayedPlay",0),m={key:s,delay:i,repeat:a,repeatDelay:l,yoyo:u,startFrame:o};f?e.play(m):v>0?e.playAfterDelay(m,v):e.load(m)}}return h};p.exports=c},8050:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(73162),h=t(37277),r=t(51708),n=t(44594),e=t(19186),s=new d({Extends:c,initialize:function(i){c.call(this,i),this.sortChildrenFlag=!1,this.scene=i,this.systems=i.sys,this.events=i.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.events.once(n.DESTROY,this.destroy,this)},addChildCallback:function(o){o.displayList&&o.displayList!==this&&o.removeFromDisplayList(),o.parentContainer&&o.parentContainer.remove(o),o.displayList||(this.queueDepthSort(),o.displayList=this,o.emit(r.ADDED_TO_SCENE,o,this.scene),this.events.emit(n.ADDED_TO_SCENE,o,this.scene))},removeChildCallback:function(o){this.queueDepthSort(),o.displayList=null,o.emit(r.REMOVED_FROM_SCENE,o,this.scene),this.events.emit(n.REMOVED_FROM_SCENE,o,this.scene)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(e(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(o,i){return o._depth-i._depth},getChildren:function(){return this.list},shutdown:function(){for(var o=this.list;o.length;)o[0].destroy(!0);this.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});h.register("DisplayList",s,"displayList"),p.exports=s},95643:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(53774),h=t(45893),r=t(50792),n=t(51708),e=t(44594),s=new d({Extends:r,initialize:function(i,a){r.call(this),this.scene=i,this.displayList=null,this.type=a,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(n.ADDED_TO_SCENE,this.addedToScene,this),this.on(n.REMOVED_FROM_SCENE,this.removedFromScene,this),i.sys.queueDepthSort()},setActive:function(o){return this.active=o,this},setName:function(o){return this.name=o,this},setState:function(o){return this.state=o,this},setDataEnabled:function(){return this.data||(this.data=new h(this)),this},setData:function(o,i){return this.data||(this.data=new h(this)),this.data.set(o,i),this},incData:function(o,i){return this.data||(this.data=new h(this)),this.data.inc(o,i),this},toggleData:function(o){return this.data||(this.data=new h(this)),this.data.toggle(o),this},getData:function(o){return this.data||(this.data=new h(this)),this.data.get(o)},setInteractive:function(o,i,a){return this.scene.sys.input.enable(this,o,i,a),this},disableInteractive:function(o){return o===void 0&&(o=!1),this.scene.sys.input.disable(this,o),this},removeInteractive:function(o){return o===void 0&&(o=!1),this.scene.sys.input.clear(this),o&&this.scene.sys.input.resetCursor(),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return c(this)},willRender:function(o){var i=this.displayList&&this.displayList.active?this.displayList.willRender(o):!0;return!(!i||s.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&o.id)},getIndexList:function(){for(var o=this,i=this.parentContainer,a=[];i&&(a.unshift(i.getIndex(o)),o=i,i.parentContainer);)i=i.parentContainer;return this.displayList?a.unshift(this.displayList.getIndex(o)):a.unshift(this.scene.sys.displayList.getIndex(o)),a},addToDisplayList:function(o){return o===void 0&&(o=this.scene.sys.displayList),this.displayList&&this.displayList!==o&&this.removeFromDisplayList(),o.exists(this)||(this.displayList=o,o.add(this,!0),o.queueDepthSort(),this.emit(n.ADDED_TO_SCENE,this,this.scene),o.events.emit(e.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var o=this.displayList||this.scene.sys.displayList;return o&&o.exists(this)&&(o.remove(this,!0),o.queueDepthSort(),this.displayList=null,this.emit(n.REMOVED_FROM_SCENE,this,this.scene),o.events.emit(e.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},getDisplayList:function(){var o=null;return this.parentContainer?o=this.parentContainer.list:this.displayList&&(o=this.displayList.list),o},destroy:function(o){!this.scene||this.ignoreDestroy||(o===void 0&&(o=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(n.DESTROY,this,o),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});s.RENDER_MASK=15,p.exports=s},44603:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(37277),h=t(44594),r=new d({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});r.register=function(n,e){r.prototype.hasOwnProperty(n)||(r.prototype[n]=e)},r.remove=function(n){r.prototype.hasOwnProperty(n)&&delete r.prototype[n]},c.register("GameObjectCreator",r,"make"),p.exports=r},39429:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(37277),h=t(44594),r=new d({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},existing:function(n){return(n.renderCanvas||n.renderWebGL)&&this.displayList.add(n),n.preUpdate&&this.updateList.add(n),n},shutdown:function(){this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});r.register=function(n,e){r.prototype.hasOwnProperty(n)||(r.prototype[n]=e)},r.remove=function(n){r.prototype.hasOwnProperty(n)&&delete r.prototype[n]},c.register("GameObjectFactory",r,"add"),p.exports=r},91296:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(61340),c=new d,h=new d,r=new d,n={camera:c,sprite:h,calc:r},e=function(s,o,i){var a=c,l=h,u=r;return l.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY),a.copyFrom(o.matrix),i?(a.multiplyWithOffset(i,-o.scrollX*s.scrollFactorX,-o.scrollY*s.scrollFactorY),l.e=s.x,l.f=s.y):(l.e-=o.scrollX*s.scrollFactorX,l.f-=o.scrollY*s.scrollFactorY),a.multiply(l,u),n};p.exports=e},45027:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(25774),h=t(37277),r=t(44594),n=new d({Extends:c,initialize:function(s){c.call(this),this.checkQueue=!0,this.scene=s,this.systems=s.sys,s.sys.events.once(r.BOOT,this.boot,this),s.sys.events.on(r.START,this.start,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var e=this.systems.events;e.on(r.PRE_UPDATE,this.update,this),e.on(r.UPDATE,this.sceneUpdate,this),e.once(r.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(e,s){for(var o=this._active,i=o.length,a=0;a<i;a++){var l=o[a];l.active&&l.preUpdate.call(l,e,s)}},shutdown:function(){for(var e=this._active.length;e--;)this._active[e].destroy(!0);for(e=this._pending.length;e--;)this._pending[e].destroy(!0);for(e=this._destroy.length;e--;)this._destroy[e].destroy(!0);this._toProcess=0,this._pending=[],this._active=[],this._destroy=[],this.removeAllListeners();var s=this.systems.events;s.off(r.PRE_UPDATE,this.update,this),s.off(r.UPDATE,this.sceneUpdate,this),s.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.systems.events.off(r.START,this.start,this),this.scene=null,this.systems=null}});h.register("UpdateList",n,"updateList"),p.exports=n},3217:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h,r,n,e,s,o,i,a,l,u,f,v){var m=c.x-d.displayOriginX+r,g=c.y-d.displayOriginY+n,x=m+c.w,y=g+c.h,T=e.a,C=e.b,E=e.c,M=e.d,P=e.e,A=e.f,R=m*T+g*E+P,F=m*C+g*M+A,w=m*T+y*E+P,B=m*C+y*M+A,N=x*T+y*E+P,U=x*C+y*M+A,D=x*T+g*E+P,I=x*C+g*M+A;s&&(R=Math.round(R),F=Math.round(F),w=Math.round(w),B=Math.round(B),N=Math.round(N),U=Math.round(U),D=Math.round(D),I=Math.round(I)),t.batchQuad(d,R,F,w,B,N,U,D,I,h.u0,h.v0,h.u1,h.v1,o,i,a,l,u,f,v)};p.exports=S},53048:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){if(c===void 0&&(c=!1),h===void 0)return h={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0},h;var r=t.text,n=r.length,e=t.maxWidth,s=t.wordWrapCharCode,o=Number.MAX_VALUE,i=Number.MAX_VALUE,a=0,l=0,u=t.fontData.chars,f=t.fontData.lineHeight,v=t.letterSpacing,m=t.lineSpacing,g=0,x=0,y=0,T=null,C=t._align,E=0,M=0,P=t.fontSize/t.fontData.size,A=P*t.scaleX,R=P*t.scaleY,F=null,w=0,B=[],N=Number.MAX_VALUE,U=0,D=0,I=0,O,L,G,z=[],X=[],V=null,Y=function(yt,Pt){for(var At=0,Mt=0;Mt<yt.length;Mt++){var Ot=yt.charCodeAt(Mt),Ft=Pt.chars[Ot];Ft&&(At+=Ft.xAdvance)}return At*A};if(e>0){G=r.split(`
`);var W=[];for(O=0;O<G.length;O++){var H=G[O],b="",K="",Q="",Z="";for(L=0;L<H.length;L++)if(y=H.charCodeAt(L),b+=H[L],y===s||L===H.length-1){Z=Q+b;var $=Y(Z,t.fontData);$<=e?Q=Z:(K+=(K?`
`:"")+Q,Q=b),b=""}K+=(K?`
`:"")+Q,W.push(K)}r=W.join(`
`);var q,_=0,tt=[];for(O=0;O<z.length;O++){var J=z[O],j=J.x,k=J.x+J.w;if(j===0&&(_=0,q=null),q){var et=j-(q.x+q.w);_=j-(et+q.w),q=null}var it=j-_,ht=k-_;it>e||ht>e?(tt.push(J.i-1),J.cr?(tt.push(J.i+J.word.length),_=0,q=null):q=J):J.cr&&(tt.push(J.i+J.word.length),_=0,q=null)}var at=function(yt,Pt,At){return yt.substr(0,Pt)+At+yt.substr(Pt+1)};for(O=tt.length-1;O>=0;O--)tt[O]>-1&&(r=at(r,tt[O],`
`));h.wrappedText=r,n=r.length,z=[],V=null}var ft=0;for(O=0;O<n;O++){if(y=r.charCodeAt(O),y===10){V!==null&&(z.push({word:V.word,i:V.i,x:V.x*A,y:V.y*R,w:V.w*A,h:V.h*R}),V=null),F=null,B[D]=I,I>U&&(U=I),I<N&&(N=I),D++,I=0,g=0,x=(f+m)*D;continue}if(T=u[y],!!T){if(E=g,M=x,F!==null){var rt=T.kerning[w];E+=rt!==void 0?rt:0}o>E&&(o=E),i>M&&(i=M);var dt=E+T.xAdvance,st=M+f;a<dt&&(a=dt),l<st&&(l=st);var vt=T.xOffset+T.xAdvance+(rt!==void 0?rt:0);y===s?V!==null&&(z.push({word:V.word,i:V.i,x:V.x*A,y:V.y*R,w:V.w*A,h:V.h*R}),V=null):(V===null&&(V={word:"",i:ft,x:g,y:x,w:0,h:f}),V.word=V.word.concat(r[O]),V.w+=vt),X.push({i:ft,idx:O,char:r[O],code:y,x:(T.xOffset+E)*P,y:(T.yOffset+x)*P,w:T.width*P,h:T.height*P,t:x*P,r:dt*P,b:f*P,line:D,glyph:T}),g+=T.xAdvance+v+(rt!==void 0?rt:0),F=T,w=y,I=dt*P,ft++}}if(V!==null&&z.push({word:V.word,i:V.i,x:V.x*A,y:V.y*R,w:V.w*A,h:V.h*R}),B[D]=I,I>U&&(U=I),I<N&&(N=I),C>0)for(var lt=0;lt<X.length;lt++){var pt=X[lt];if(C===1){var St=(U-B[pt.line])/2;pt.x+=St,pt.r+=St}else if(C===2){var Ct=U-B[pt.line];pt.x+=Ct,pt.r+=Ct}}var ct=h.local,ot=h.global;return G=h.lines,ct.x=o*P,ct.y=i*P,ct.width=a*P,ct.height=l*P,ot.x=t.x-t._displayOriginX+o*A,ot.y=t.y-t._displayOriginY+i*R,ot.width=a*A,ot.height=l*R,G.shortest=N,G.longest=U,G.lengths=B,d&&(ct.x=Math.ceil(ct.x),ct.y=Math.ceil(ct.y),ct.width=Math.ceil(ct.width),ct.height=Math.ceil(ct.height),ot.x=Math.ceil(ot.x),ot.y=Math.ceil(ot.y),ot.width=Math.ceil(ot.width),ot.height=Math.ceil(ot.height),G.shortest=Math.ceil(N),G.longest=Math.ceil(U)),c&&(t._displayOriginX=t.originX*ct.width,t._displayOriginY=t.originY*ct.height,ot.x=t.x-t._displayOriginX*t.scaleX,ot.y=t.y-t._displayOriginY*t.scaleY,d&&(ot.x=Math.ceil(ot.x),ot.y=Math.ceil(ot.y))),h.words=z,h.characters=X,h.lines.height=f,h.scale=P,h.scaleX=t.scaleX,h.scaleY=t.scaleY,h};p.exports=S},61327:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(21859),c=function(h,r,n,e,s,o,i){var a=h.sys.textures.get(n),l=a.get(e),u=h.sys.cache.xml.get(s);if(l&&u){var f=d(u,l,o,i,a);return h.sys.cache.bitmapFont.add(r,{data:f,texture:n,frame:e,fromAtlas:!0}),!0}else return!1};p.exports=c},6925:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(35154),c=function(h,r){var n=r.width,e=r.height,s=Math.floor(n/2),o=Math.floor(e/2),i=d(r,"chars","");if(i!==""){var a=d(r,"image",""),l=h.sys.textures.getFrame(a),u=l.cutX,f=l.cutY,v=l.source.width,m=l.source.height,g=d(r,"offset.x",0),x=d(r,"offset.y",0),y=d(r,"spacing.x",0),T=d(r,"spacing.y",0),C=d(r,"lineSpacing",0),E=d(r,"charsPerRow",null);E===null&&(E=v/n,E>i.length&&(E=i.length));for(var M=g,P=x,A={retroFont:!0,font:a,size:n,lineHeight:e+C,chars:{}},R=0,F=0;F<i.length;F++){var w=i.charCodeAt(F),B=(u+M)/v,N=(f+P)/m,U=(u+M+n)/v,D=(f+P+e)/m;A.chars[w]={x:M,y:P,width:n,height:e,centerX:s,centerY:o,xOffset:0,yOffset:0,xAdvance:n,data:{},kerning:{},u0:B,v0:N,u1:U,v1:D},R++,R===E?(R=0,M=g,P+=e+T):M+=n+y}var I={data:A,frame:null,texture:a};return I}};p.exports=c},21859:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/function S(d,c){return parseInt(d.getAttribute(c),10)}var t=function(d,c,h,r,n){h===void 0&&(h=0),r===void 0&&(r=0);var e=c.cutX,s=c.cutY,o=c.source.width,i=c.source.height,a=c.sourceIndex,l={},u=d.getElementsByTagName("info")[0],f=d.getElementsByTagName("common")[0];l.font=u.getAttribute("face"),l.size=S(u,"size"),l.lineHeight=S(f,"lineHeight")+r,l.chars={};var v=d.getElementsByTagName("char"),m=c!==void 0&&c.trimmed;if(m)var g=c.height,x=c.width;for(var y=0;y<v.length;y++){var T=v[y],C=S(T,"id"),E=String.fromCharCode(C),M=S(T,"x"),P=S(T,"y"),A=S(T,"width"),R=S(T,"height");m&&(M<x&&(x=M),P<g&&(g=P)),m&&g!==0&&x!==0&&(M-=c.x,P-=c.y);var F=(e+M)/o,w=(s+P)/i,B=(e+M+A)/o,N=(s+P+R)/i;if(l.chars[C]={x:M,y:P,width:A,height:R,centerX:Math.floor(A/2),centerY:Math.floor(R/2),xOffset:S(T,"xoffset"),yOffset:S(T,"yoffset"),xAdvance:S(T,"xadvance")+h,data:{},kerning:{},u0:F,v0:w,u1:B,v1:N},n&&A!==0&&R!==0){var U=n.add(E,a,M,P,A,R);U&&U.setUVs(A,R,F,w,B,N)}}var D=d.getElementsByTagName("kerning");for(y=0;y<D.length;y++){var I=D[y],O=S(I,"first"),L=S(I,"second"),G=S(I,"amount");l.chars[L].kerning[O]=G}return l};p.exports=t},196:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87662),c=t(79291),h={Parse:t(6925)};h=c(!1,h,d),p.exports=h},87662:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ`,TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:`ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' `,TEXT_SET7:`AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39`,TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:`ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!`,TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:`ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789`};p.exports=S},2638:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(22186),c=t(83419),h=t(12310),r=new c({Extends:d,Mixins:[h],initialize:function(e,s,o,i,a,l,u){d.call(this,e,s,o,i,a,l,u),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(n,e){return this.cropWidth=n,this.cropHeight=e,this},setDisplayCallback:function(n){return this.displayCallback=n,this},setScrollX:function(n){return this.scrollX=n,this},setScrollY:function(n){return this.scrollY=n,this}});p.exports=r},86741:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(20926),c=function(h,r,n,e){var s=r._text,o=s.length,i=h.currentContext;if(!(o===0||!d(h,i,r,n,e))){n.addToRenderList(r);var a=r.fromAtlas?r.frame:r.texture.frames.__BASE,l=r.displayCallback,u=r.callbackData,f=r.fontData.chars,v=r.fontData.lineHeight,m=r._letterSpacing,g=0,x=0,y=0,T=null,C=0,E=0,M=0,P=0,A=0,R=0,F=null,w=0,B=r.frame.source.image,N=a.cutX,U=a.cutY,D=0,I=0,O=r._fontSize/r.fontData.size,L=r._align,G=0,z=0;r.getTextBounds(!1);var X=r._bounds.lines;L===1?z=(X.longest-X.lengths[0])/2:L===2&&(z=X.longest-X.lengths[0]),i.translate(-r.displayOriginX,-r.displayOriginY);var V=n.roundPixels;r.cropWidth>0&&r.cropHeight>0&&(i.beginPath(),i.rect(0,0,r.cropWidth,r.cropHeight),i.clip());for(var Y=0;Y<o;Y++){if(I=O,D=0,y=s.charCodeAt(Y),y===10){G++,L===1?z=(X.longest-X.lengths[G])/2:L===2&&(z=X.longest-X.lengths[G]),g=0,x+=v,F=null;continue}if(T=f[y],!!T){if(C=N+T.x,E=U+T.y,M=T.width,P=T.height,A=T.xOffset+g-r.scrollX,R=T.yOffset+x-r.scrollY,F!==null){var W=T.kerning[w];A+=W!==void 0?W:0}if(l){u.index=Y,u.charCode=y,u.x=A,u.y=R,u.scale=I,u.rotation=D,u.data=T.data;var H=l(u);A=H.x,R=H.y,I=H.scale,D=H.rotation}A*=I,R*=I,A+=z,g+=T.xAdvance+m+(W!==void 0?W:0),F=T,w=y,!(M===0||P===0||y===32)&&(V&&(A=Math.round(A),R=Math.round(R)),i.save(),i.translate(A,R),i.rotate(D),i.scale(I,I),i.drawImage(B,C,E,M,P,0,0,M,P),i.restore())}}i.restore()}};p.exports=c},11164:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2638),c=t(25305),h=t(44603),r=t(23568);h.register("dynamicBitmapText",function(n,e){n===void 0&&(n={});var s=r(n,"font",""),o=r(n,"text",""),i=r(n,"size",!1),a=new d(this.scene,0,0,s,o,i);return e!==void 0&&(n.add=e),c(this.scene,a,n),a})},72566:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2638),c=t(39429);c.register("dynamicBitmapText",function(h,r,n,e,s){return this.displayList.add(new d(this.scene,h,r,n,e,s))})},12310:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(73482),h=t(86741),p.exports={renderWebGL:c,renderCanvas:h}},73482:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=t(61340),h=t(70554),r=new c,n=function(e,s,o,i){var a=s.text,l=a.length;if(l!==0){o.addToRenderList(s);var u=e.pipelines.set(s.pipeline,s),f=d(s,o,i);e.pipelines.preBatch(s);var v=f.sprite,m=f.calc,g=r,x=s.cropWidth>0||s.cropHeight>0;x&&(u.flush(),e.pushScissor(m.tx,m.ty,s.cropWidth*m.scaleX,s.cropHeight*m.scaleY));var y=s.frame,T=y.glTexture,C=s.tintFill,E=h.getTintAppendFloatAlpha(s.tintTopLeft,o.alpha*s._alphaTL),M=h.getTintAppendFloatAlpha(s.tintTopRight,o.alpha*s._alphaTR),P=h.getTintAppendFloatAlpha(s.tintBottomLeft,o.alpha*s._alphaBL),A=h.getTintAppendFloatAlpha(s.tintBottomRight,o.alpha*s._alphaBR),R=u.setGameObject(s),F=0,w=0,B=0,N=0,U=s.letterSpacing,D,I=0,O=0,L,G=s.scrollX,z=s.scrollY,X=s.fontData,V=X.chars,Y=X.lineHeight,W=s.fontSize/X.size,H=0,b=s._align,K=0,Q=0,Z=s.getTextBounds(!1);s.maxWidth>0&&(a=Z.wrappedText,l=a.length);var $=s._bounds.lines;b===1?Q=($.longest-$.lengths[0])/2:b===2&&(Q=$.longest-$.lengths[0]);for(var q=o.roundPixels,_=s.displayCallback,tt=s.callbackData,J=0;J<l;J++){if(B=a.charCodeAt(J),B===10){K++,b===1?Q=($.longest-$.lengths[K])/2:b===2&&(Q=$.longest-$.lengths[K]),F=0,w+=Y,L=null;continue}if(D=V[B],!!D){I=D.width,O=D.height;var j=D.xOffset+F-G,k=D.yOffset+w-z;if(L!==null){var et=D.kerning[N]||0;j+=et,F+=et}if(F+=D.xAdvance+U,L=D,N=B,!(I===0||O===0||B===32)){if(W=s.fontSize/s.fontData.size,H=0,_){tt.color=0,tt.tint.topLeft=E,tt.tint.topRight=M,tt.tint.bottomLeft=P,tt.tint.bottomRight=A,tt.index=J,tt.charCode=B,tt.x=j,tt.y=k,tt.scale=W,tt.rotation=H,tt.data=D.data;var it=_(tt);j=it.x,k=it.y,W=it.scale,H=it.rotation,it.color?(E=it.color,M=it.color,P=it.color,A=it.color):(E=it.tint.topLeft,M=it.tint.topRight,P=it.tint.bottomLeft,A=it.tint.bottomRight),E=h.getTintAppendFloatAlpha(E,o.alpha*s._alphaTL),M=h.getTintAppendFloatAlpha(M,o.alpha*s._alphaTR),P=h.getTintAppendFloatAlpha(P,o.alpha*s._alphaBL),A=h.getTintAppendFloatAlpha(A,o.alpha*s._alphaBR)}j*=W,k*=W,j-=s.displayOriginX,k-=s.displayOriginY,j+=Q,g.applyITRS(j,k,H,W,W),m.multiply(g,v);var ht=D.u0,at=D.v0,ft=D.u1,rt=D.v1,dt=I,st=O,vt=v.e,lt=v.f,pt=st*v.c+v.e,St=st*v.d+v.f,Ct=dt*v.a+st*v.c+v.e,ct=dt*v.b+st*v.d+v.f,ot=dt*v.a+v.e,yt=dt*v.b+v.f;q&&(vt=Math.round(vt),lt=Math.round(lt),pt=Math.round(pt),St=Math.round(St),Ct=Math.round(Ct),ct=Math.round(ct),ot=Math.round(ot),yt=Math.round(yt)),u.shouldFlush(6)&&(u.flush(),R=u.setGameObject(s)),u.batchQuad(s,vt,lt,pt,St,Ct,ct,ot,yt,ht,at,ft,rt,E,M,P,A,C,T,R)}}}x&&(u.flush(),e.popScissor()),e.pipelines.postBatch(s)}};p.exports=n},22186:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(45319),h=t(31401),r=t(95643),n=t(53048),e=t(61327),s=t(21859),o=t(87841),i=t(18658),a=new d({Extends:r,Mixins:[h.Alpha,h.BlendMode,h.Depth,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.Texture,h.Tint,h.Transform,h.Visible,i],initialize:function(u,f,v,m,g,x,y){g===void 0&&(g=""),y===void 0&&(y=0),r.call(this,u,"BitmapText"),this.font=m;var T=this.scene.sys.cache.bitmapFont.get(m);if(!T)throw new Error("Invalid BitmapText key: "+m);this.fontData=T.data,this._text="",this._fontSize=x||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=y,this._bounds=n(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=T.fromAtlas,this.setTexture(T.texture,T.frame),this.setPosition(f,v),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(g)},setLeftAlign:function(){return this._align=a.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=a.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=a.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(l){return this._fontSize=l,this._dirty=!0,this},setLetterSpacing:function(l){return l===void 0&&(l=0),this._letterSpacing=l,this._dirty=!0,this},setLineSpacing:function(l){return l===void 0&&(l=0),this.lineSpacing=l,this},setText:function(l){return!l&&l!==0&&(l=""),Array.isArray(l)&&(l=l.join(`
`)),l!==this.text&&(this._text=l.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(l,u,f,v){return l===void 0&&(l=0),u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=.5),this.dropShadowX=l,this.dropShadowY=u,this.dropShadowColor=f,this.dropShadowAlpha=v,this},setCharacterTint:function(l,u,f,v,m,g,x){l===void 0&&(l=0),u===void 0&&(u=1),f===void 0&&(f=!1),v===void 0&&(v=-1),m===void 0&&(m=v,g=v,x=v);var y=this.text.length;u===-1&&(u=y),l<0&&(l=y+l),l=c(l,0,y-1);for(var T=c(l+u,l,y),C=this.charColors,E=l;E<T;E++){var M=C[E];if(v===-1)C[E]=null;else{var P=f?1:0;M?(M.tintEffect=P,M.tintTL=v,M.tintTR=m,M.tintBL=g,M.tintBR=x):C[E]={tintEffect:P,tintTL:v,tintTR:m,tintBL:g,tintBR:x}}}return this},setWordTint:function(l,u,f,v,m,g,x){u===void 0&&(u=1);for(var y=this.getTextBounds(),T=y.words,C=typeof l=="number",E=0,M=0;M<T.length;M++){var P=T[M];if((C&&M===l||!C&&P.word===l)&&(this.setCharacterTint(P.i,P.word.length,f,v,m,g,x),E++,E===u))return this}return this},getTextBounds:function(l){var u=this._bounds;return(this._dirty||l||this.scaleX!==u.scaleX||this.scaleY!==u.scaleY)&&(n(this,l,!0,u),this._dirty=!1),u},getCharacterAt:function(l,u,f){for(var v=this.getLocalPoint(l,u,null,f),m=this.getTextBounds(),g=m.characters,x=new o,y=0;y<g.length;y++){var T=g[y];if(x.setTo(T.x,T.t,T.r-T.x,T.b),x.contains(v.x,v.y))return T}return null},updateDisplayOrigin:function(){return this._dirty=!0,this.getTextBounds(!1),this},setFont:function(l,u,f){u===void 0&&(u=this._fontSize),f===void 0&&(f=this._align);var v=this.scene.sys.cache.bitmapFont.get(l);return v&&(this.font=l,this.fontData=v.data,this._fontSize=u,this._align=f,this.fromAtlas=v.fromAtlas===!0,this.setTexture(v.texture,v.frame),n(this,!1,!0,this._bounds)),this},setMaxWidth:function(l,u){return this._maxWidth=l,this._dirty=!0,u!==void 0&&(this.wordWrapCharCode=u),this},align:{set:function(l){this._align=l,this._dirty=!0},get:function(){return this._align}},text:{set:function(l){this.setText(l)},get:function(){return this._text}},fontSize:{set:function(l){this._fontSize=l,this._dirty=!0},get:function(){return this._fontSize}},letterSpacing:{set:function(l){this._letterSpacing=l,this._dirty=!0},get:function(){return this._letterSpacing}},lineSpacing:{set:function(l){this._lineSpacing=l,this._dirty=!0},get:function(){return this._lineSpacing}},maxWidth:{set:function(l){this._maxWidth=l,this._dirty=!0},get:function(){return this._maxWidth}},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},displayWidth:{get:function(){return this.width}},displayHeight:{get:function(){return this.height}},toJSON:function(){var l=h.ToJSON(this),u={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,lineSpacing:this.lineSpacing,align:this.align};return l.data=u,l},preDestroy:function(){this.charColors.length=0,this._bounds=null,this.fontData=null}});a.ALIGN_LEFT=0,a.ALIGN_CENTER=1,a.ALIGN_RIGHT=2,a.ParseFromAtlas=e,a.ParseXMLBitmapFont=s,p.exports=a},37289:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(20926),c=function(h,r,n,e){var s=r._text,o=s.length,i=h.currentContext;if(!(o===0||!d(h,i,r,n,e))){n.addToRenderList(r);var a=r.fromAtlas?r.frame:r.texture.frames.__BASE,l=r.fontData.chars,u=r.fontData.lineHeight,f=r._letterSpacing,v=r._lineSpacing,m=0,g=0,x=0,y=null,T=0,C=0,E=0,M=0,P=0,A=0,R=null,F=0,w=a.source.image,B=a.cutX,N=a.cutY,U=r._fontSize/r.fontData.size,D=r._align,I=0,O=0,L=r.getTextBounds(!1);r.maxWidth>0&&(s=L.wrappedText,o=s.length);var G=r._bounds.lines;D===1?O=(G.longest-G.lengths[0])/2:D===2&&(O=G.longest-G.lengths[0]),i.translate(-r.displayOriginX,-r.displayOriginY);for(var z=n.roundPixels,X=0;X<o;X++){if(x=s.charCodeAt(X),x===10){I++,D===1?O=(G.longest-G.lengths[I])/2:D===2&&(O=G.longest-G.lengths[I]),m=0,g+=u+v,R=null;continue}if(y=l[x],!!y){if(T=B+y.x,C=N+y.y,E=y.width,M=y.height,P=y.xOffset+m,A=y.yOffset+g,R!==null){var V=y.kerning[F];P+=V!==void 0?V:0}P*=U,A*=U,P+=O,m+=y.xAdvance+f+(V!==void 0?V:0),R=y,F=x,!(E===0||M===0||x===32)&&(z&&(P=Math.round(P),A=Math.round(A)),i.save(),i.translate(P,A),i.scale(U,U),i.drawImage(w,T,C,E,M,0,0,E,M),i.restore())}}i.restore()}};p.exports=c},57336:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(22186),c=t(25305),h=t(44603),r=t(23568),n=t(35154);h.register("bitmapText",function(e,s){e===void 0&&(e={});var o=n(e,"font",""),i=r(e,"text",""),a=r(e,"size",!1),l=n(e,"align",0),u=new d(this.scene,0,0,o,i,a,l);return s!==void 0&&(e.add=s),c(this.scene,u,e),u})},34914:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(22186),c=t(39429);c.register("bitmapText",function(h,r,n,e,s,o){return this.displayList.add(new d(this.scene,h,r,n,e,s,o))})},18658:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(33590),h=t(37289),p.exports={renderWebGL:c,renderCanvas:h}},33590:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(3217),c=t(91296),h=t(70554),r=function(n,e,s,o){var i=e._text,a=i.length;if(a!==0){s.addToRenderList(e);var l=n.pipelines.set(e.pipeline,e),u=c(e,s,o).calc;n.pipelines.preBatch(e);var f=s.roundPixels,v=s.alpha,m=e.charColors,g=e.tintFill,x=h.getTintAppendFloatAlpha,y=x(e.tintTopLeft,v*e._alphaTL),T=x(e.tintTopRight,v*e._alphaTR),C=x(e.tintBottomLeft,v*e._alphaBL),E=x(e.tintBottomRight,v*e._alphaBR),M=e.frame.glTexture,P=l.setGameObject(e),A=e.getTextBounds(!1),R,F,w,B=A.characters,N=e.dropShadowX,U=e.dropShadowY,D=N!==0||U!==0;if(D){var I=e.dropShadowColor,O=e.dropShadowAlpha,L=x(I,v*O*e._alphaTL),G=x(I,v*O*e._alphaTR),z=x(I,v*O*e._alphaBL),X=x(I,v*O*e._alphaBR);for(R=0;R<B.length;R++)F=B[R],w=F.glyph,!(F.code===32||w.width===0||w.height===0)&&d(l,e,F,w,N,U,u,f,L,G,z,X,1,M,P)}for(R=0;R<B.length;R++)if(F=B[R],w=F.glyph,!(F.code===32||w.width===0||w.height===0))if(l.shouldFlush(6)&&(l.flush(),P=l.setGameObject(e)),m[F.i]){var V=m[F.i],Y=V.tintEffect,W=x(V.tintTL,v*e._alphaTL),H=x(V.tintTR,v*e._alphaTR),b=x(V.tintBL,v*e._alphaBL),K=x(V.tintBR,v*e._alphaBR);d(l,e,F,w,0,0,u,f,W,H,b,K,Y,M,P)}else d(l,e,F,w,0,0,u,f,y,T,C,E,g,M,P);n.pipelines.postBatch(e)}};p.exports=r},6107:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(48011),c=t(46590),h=t(83419),r=t(31401),n=t(4327),e=t(95643),s=t(73162),o=new h({Extends:e,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Size,r.Texture,r.Transform,r.Visible,d],initialize:function(a,l,u,f,v){e.call(this,a,"Blitter"),this.setTexture(f,v),this.setPosition(l,u),this.initPipeline(),this.initPostPipeline(),this.children=new s,this.renderList=[],this.dirty=!1},create:function(i,a,l,u,f){u===void 0&&(u=!0),f===void 0&&(f=this.children.length),l===void 0?l=this.frame:l instanceof n||(l=this.texture.get(l));var v=new c(this,i,a,l,u);return this.children.addAt(v,f,!1),this.dirty=!0,v},createFromCallback:function(i,a,l,u){for(var f=this.createMultiple(a,l,u),v=0;v<f.length;v++){var m=f[v];i.call(this,m,v)}return f},createMultiple:function(i,a,l){a===void 0&&(a=this.frame.name),l===void 0&&(l=!0),Array.isArray(a)||(a=[a]);var u=[],f=this;return a.forEach(function(v){for(var m=0;m<i;m++)u.push(f.create(0,0,v,l))}),u},childCanRender:function(i){return i.visible&&i.alpha>0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});p.exports=o},72396:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){var r=d.getRenderList();if(r.length!==0){var n=t.currentContext,e=c.alpha*d.alpha;if(e!==0){c.addToRenderList(d),n.globalCompositeOperation=t.blendModes[d.blendMode],n.imageSmoothingEnabled=!d.frame.source.scaleMode;var s=d.x-c.scrollX*d.scrollFactorX,o=d.y-c.scrollY*d.scrollFactorY;n.save(),h&&h.copyToContext(n);for(var i=c.roundPixels,a=0;a<r.length;a++){var l=r[a],u=l.flipX||l.flipY,f=l.frame,v=f.canvasData,m=f.x,g=f.y,x=1,y=1,T=l.alpha*e;T!==0&&(n.globalAlpha=T,u?(l.flipX&&(x=-1,m-=v.width),l.flipY&&(y=-1,g-=v.height),v.width>0&&v.height>0&&(n.save(),n.translate(l.x+s,l.y+o),n.scale(x,y),n.drawImage(f.source.image,v.x,v.y,v.width,v.height,m,g,v.width,v.height),n.restore())):(i&&(m=Math.round(m),g=Math.round(g)),v.width>0&&v.height>0&&n.drawImage(f.source.image,v.x,v.y,v.width,v.height,m+l.x+s,g+l.y+o,v.width,v.height)))}n.restore()}}};p.exports=S},9403:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(6107),c=t(25305),h=t(44603),r=t(23568);h.register("blitter",function(n,e){n===void 0&&(n={});var s=r(n,"key",null),o=r(n,"frame",null),i=new d(this.scene,0,0,s,o);return e!==void 0&&(n.add=e),c(this.scene,i,n),i})},12709:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(6107),c=t(39429);c.register("blitter",function(h,r,n,e){return this.displayList.add(new d(this.scene,h,r,n,e))})},48011:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(99485),h=t(72396),p.exports={renderWebGL:c,renderCanvas:h}},99485:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(61340),c=t(70554),h=new d,r=function(n,e,s,o){var i=e.getRenderList(),a=s.alpha*e.alpha;if(!(i.length===0||a===0)){s.addToRenderList(e);var l=n.pipelines.set(this.pipeline,e),u=s.scrollX*e.scrollFactorX,f=s.scrollY*e.scrollFactorY,v=h.copyFrom(s.matrix);o&&(v.multiplyWithOffset(o,-u,-f),u=0,f=0);var m=e.x-u,g=e.y-f,x=-1,y=!1,T=s.roundPixels;n.pipelines.preBatch(e);for(var C=0;C<i.length;C++){var E=i[C],M=E.frame,P=E.alpha*a;if(P!==0){var A=M.width,R=M.height,F=m+E.x+M.x,w=g+E.y+M.y;E.flipX&&(A*=-1,F+=M.width),E.flipY&&(R*=-1,w+=M.height);var B=v.setQuad(F,w,F+A,w+R,T),N=c.getTintAppendFloatAlpha(E.tint,P);if(M.sourceIndex!==x){var U=l.setGameObject(e,M);x=M.sourceIndex}l.batchQuad(e,B[0],B[1],B[2],B[3],B[4],B[5],B[6],B[7],M.u0,M.v0,M.u1,M.v1,N,N,N,N,y,M.glTexture,U)&&(x=-1)}}n.pipelines.postBatch(e)}};p.exports=r},46590:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(4327),h=new d({initialize:function(n,e,s,o,i){this.parent=n,this.x=e,this.y=s,this.frame=o,this.data={},this.tint=16777215,this._visible=i,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(r){return r===void 0?this.frame=this.parent.frame:r instanceof c&&r.texture===this.parent.texture?this.frame=r:this.frame=this.parent.texture.get(r),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(r,n,e){return this.x=r,this.y=n,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,e&&this.setFrame(e),this},setPosition:function(r,n){return this.x=r,this.y=n,this},setFlipX:function(r){return this.flipX=r,this},setFlipY:function(r){return this.flipY=r,this},setFlip:function(r,n){return this.flipX=r,this.flipY=n,this},setVisible:function(r){return this.visible=r,this},setAlpha:function(r){return this.alpha=r,this},setTint:function(r){return this.tint=r,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(r){this.parent.dirty|=this._visible!==r,this._visible=r}},alpha:{get:function(){return this._alpha},set:function(r){this.parent.dirty|=this._alpha>0!=r>0,this._alpha=r}}});p.exports=h},16005:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45319),c=2,h={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r,n,e,s){return r===void 0&&(r=1),n===void 0?this.alpha=r:(this._alphaTL=d(r,0,1),this._alphaTR=d(n,0,1),this._alphaBL=d(e,0,1),this._alphaBR=d(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(r){var n=d(r,0,1);this._alpha=n,this._alphaTL=n,this._alphaTR=n,this._alphaBL=n,this._alphaBR=n,n===0?this.renderFlags&=~c:this.renderFlags|=c}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(r){var n=d(r,0,1);this._alphaTL=n,n!==0&&(this.renderFlags|=c)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(r){var n=d(r,0,1);this._alphaTR=n,n!==0&&(this.renderFlags|=c)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(r){var n=d(r,0,1);this._alphaBL=n,n!==0&&(this.renderFlags|=c)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(r){var n=d(r,0,1);this._alphaBR=n,n!==0&&(this.renderFlags|=c)}}};p.exports=h},88509:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45319),c=2,h={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r){return r===void 0&&(r=1),this.alpha=r,this},alpha:{get:function(){return this._alpha},set:function(r){var n=d(r,0,1);this._alpha=n,n===0?this.renderFlags&=~c:this.renderFlags|=c}}};p.exports=h},90065:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(10312),c={_blendMode:d.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(h){typeof h=="string"&&(h=d[h]),h|=0,h>=-1&&(this._blendMode=h)}},setBlendMode:function(h){return this.blendMode=h,this}};p.exports=c},94215:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,d){return this.width=t,this.height=d,this},setDisplaySize:function(t,d){return this.displayWidth=t,this.displayHeight=d,this}};p.exports=S},61683:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={texture:null,frame:null,isCropped:!1,setCrop:function(t,d,c,h){if(t===void 0)this.isCropped=!1;else if(this.frame){if(typeof t=="number")this.frame.setCropUVs(this._crop,t,d,c,h,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};p.exports=S},89272:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(37105),c={_depth:0,depth:{get:function(){return this._depth},set:function(h){this.displayList&&this.displayList.queueDepthSort(),this._depth=h}},setDepth:function(h){return h===void 0&&(h=0),this.depth=h,this},setToTop:function(){var h=this.getDisplayList();return h&&d.BringToTop(h,this),this},setToBack:function(){var h=this.getDisplayList();return h&&d.SendToBack(h,this),this},setAbove:function(h){var r=this.getDisplayList();return r&&h&&d.MoveAbove(r,this,h),this},setBelow:function(h){var r=this.getDisplayList();return r&&h&&d.MoveBelow(r,this,h),this}};p.exports=c},47059:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(66064),h=t(19133),r=new d({initialize:function(e,s){this.gameObject=e,this.isPost=s,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(n){return n===void 0&&(n=0),this.padding=n,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(n){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,n!==void 0&&(this.padding=n),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var n=this.list,e=0;e<n.length;e++)n[e].destroy();this.list=[]}return this.enabled=!1,this.gameObject},remove:function(n){var e;if(this.isPost){var s=this.gameObject.getPostPipeline(String(n.type));for(Array.isArray(s)||(s=[s]),e=0;e<s.length;e++){var o=s[e];if(o.controller===n){this.gameObject.removePostPipeline(o),n.destroy();break}}}else{var i=this.list;for(e=0;e<i.length;e++)i[e]===n&&(h(i,e),n.destroy())}return this.gameObject},disable:function(n){return n===void 0&&(n=!1),this.isPost||this.gameObject.resetPipeline(),this.enabled=!1,n&&this.clear(),this.gameObject},add:function(n,e){if(this.isPost){var s=String(n.type);this.gameObject.setPostPipeline(s,e);var o=this.gameObject.getPostPipeline(s);if(o)return Array.isArray(o)&&(o=o.pop()),o&&(o.controller=n),n}else return this.enabled||this.enable(),this.list.push(n),n},addGlow:function(n,e,s,o,i,a){return this.add(new c.Glow(this.gameObject,n,e,s,o),{quality:i,distance:a})},addShadow:function(n,e,s,o,i,a,l){return this.add(new c.Shadow(this.gameObject,n,e,s,o,i,a,l))},addPixelate:function(n){return this.add(new c.Pixelate(this.gameObject,n))},addVignette:function(n,e,s,o){return this.add(new c.Vignette(this.gameObject,n,e,s,o))},addShine:function(n,e,s,o){return this.add(new c.Shine(this.gameObject,n,e,s,o))},addBlur:function(n,e,s,o,i,a){return this.add(new c.Blur(this.gameObject,n,e,s,o,i,a))},addGradient:function(n,e,s,o,i,a,l,u){return this.add(new c.Gradient(this.gameObject,n,e,s,o,i,a,l,u))},addBloom:function(n,e,s,o,i,a){return this.add(new c.Bloom(this.gameObject,n,e,s,o,i,a))},addColorMatrix:function(){return this.add(new c.ColorMatrix(this.gameObject))},addCircle:function(n,e,s,o,i){return this.add(new c.Circle(this.gameObject,n,e,s,o,i))},addBarrel:function(n){return this.add(new c.Barrel(this.gameObject,n))},addDisplacement:function(n,e,s){return this.add(new c.Displacement(this.gameObject,n,e,s))},addWipe:function(n,e,s){return this.add(new c.Wipe(this.gameObject,n,e,s))},addReveal:function(n,e,s){return this.add(new c.Wipe(this.gameObject,n,e,s,!0))},addBokeh:function(n,e,s){return this.add(new c.Bokeh(this.gameObject,n,e,s))},addTiltShift:function(n,e,s,o,i,a){return this.add(new c.Bokeh(this.gameObject,n,e,s,!0,o,i,a))},destroy:function(){this.clear(),this.gameObject=null}});p.exports=r},54434:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,d){return this.flipX=t,this.flipY=d,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};p.exports=S},8004:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87841),c=t(11520),h=t(26099),r={prepareBoundsOutput:function(n,e){if(e===void 0&&(e=!1),this.rotation!==0&&c(n,this.x,this.y,this.rotation),e&&this.parentContainer){var s=this.parentContainer.getBoundsTransformMatrix();s.transformPoint(n.x,n.y,n)}return n},getCenter:function(n,e){return n===void 0&&(n=new h),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getTopLeft:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getTopCenter:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getTopRight:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getLeftCenter:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getRightCenter:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getBottomLeft:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBottomCenter:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBottomRight:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBounds:function(n){n===void 0&&(n=new d);var e,s,o,i,a,l,u,f;if(this.parentContainer){var v=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(n),v.transformPoint(n.x,n.y,n),e=n.x,s=n.y,this.getTopRight(n),v.transformPoint(n.x,n.y,n),o=n.x,i=n.y,this.getBottomLeft(n),v.transformPoint(n.x,n.y,n),a=n.x,l=n.y,this.getBottomRight(n),v.transformPoint(n.x,n.y,n),u=n.x,f=n.y}else this.getTopLeft(n),e=n.x,s=n.y,this.getTopRight(n),o=n.x,i=n.y,this.getBottomLeft(n),a=n.x,l=n.y,this.getBottomRight(n),u=n.x,f=n.y;return n.x=Math.min(e,o,a,u),n.y=Math.min(s,i,l,f),n.width=Math.max(e,o,a,u)-n.x,n.height=Math.max(s,i,l,f)-n.y,n}};p.exports=r},8573:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(6858),c=t(80661),h={mask:null,setMask:function(r){return this.mask=r,this},clearMask:function(r){return r===void 0&&(r=!1),r&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(r,n,e,s,o){return r===void 0&&(this.texture||this.shader||this.geom)&&(r=this),new d(this.scene,r,n,e,s,o)},createGeometryMask:function(r){return r===void 0&&(this.type==="Graphics"||this.geom)&&(r=this),new c(this.scene,r)}};p.exports=h},27387:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,d){return t===void 0&&(t=.5),d===void 0&&(d=t),this.originX=t,this.originY=d,this.updateDisplayOrigin()},setOriginFromFrame:function(){return!this.frame||!this.frame.customPivot?this.setOrigin():(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin())},setDisplayOrigin:function(t,d){return t===void 0&&(t=0),d===void 0&&(d=t),this.displayOriginX=t,this.displayOriginY=d,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};p.exports=S},37640:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39506),c=t(57355),h=t(35154),r=t(86353),n=t(26099),e={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:r.PLAYING_FORWARD,setPath:function(s,o){o===void 0&&(o=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=s,o&&this.startFollow(o),this},setRotateToPath:function(s,o){return o===void 0&&(o=0),this.rotateToPath=s,this.pathRotationOffset=o,this},isFollowing:function(){var s=this.pathTween;return s&&s.isPlaying()},startFollow:function(s,o){s===void 0&&(s={}),o===void 0&&(o=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),typeof s=="number"&&(s={duration:s}),s.from=h(s,"from",0),s.to=h(s,"to",1);var a=c(s,"positionOnPath",!1);this.rotateToPath=c(s,"rotateToPath",!1),this.pathRotationOffset=h(s,"rotationOffset",0);var l=h(s,"startAt",o);if(l&&(s.onStart=function(f){var v=f.data[0];v.progress=l,v.elapsed=v.duration*l;var m=v.ease(v.progress);v.current=v.start+(v.end-v.start)*m,v.setTargetValue()}),this.pathOffset||(this.pathOffset=new n(this.x,this.y)),this.pathVector||(this.pathVector=new n),this.pathDelta||(this.pathDelta=new n),this.pathDelta.reset(),s.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(s),this.path.getStartPoint(this.pathOffset),a&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=r.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+d(this.pathRotationOffset)}return this.pathConfig=s,this},pauseFollow:function(){var s=this.pathTween;return s&&s.isPlaying()&&s.pause(),this},resumeFollow:function(){var s=this.pathTween;return s&&s.isPaused()&&s.resume(),this},stopFollow:function(){var s=this.pathTween;return s&&s.isPlaying()&&s.stop(),this},pathUpdate:function(){var s=this.pathTween;if(s&&s.data){var o=s.data[0],i=this.pathDelta,a=this.pathVector;if(i.copy(a).negate(),o.state===r.COMPLETE){this.path.getPoint(o.end,a),i.add(a),a.add(this.pathOffset),this.setPosition(a.x,a.y);return}else if(o.state!==r.PLAYING_FORWARD&&o.state!==r.PLAYING_BACKWARD)return;this.path.getPoint(s.getValue(),a),i.add(a),a.add(this.pathOffset);var l=this.x,u=this.y;this.setPosition(a.x,a.y);var f=this.x-l,v=this.y-u;if(f===0&&v===0)return;if(o.state!==this._prevDirection){this._prevDirection=o.state;return}this.rotateToPath&&(this.rotation=Math.atan2(v,f)+d(this.pathRotationOffset))}}};p.exports=e},72699:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62644),c={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(h){this.pipelineData={};var r=this.scene.sys.renderer;if(!r)return!1;var n=r.pipelines;if(n){h===void 0&&(h=n.default);var e=n.get(h);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}return!1},setPipeline:function(h,r,n){var e=this.scene.sys.renderer;if(!e)return this;var s=e.pipelines;if(s){var o=s.get(h);o&&(this.pipeline=o),r&&(this.pipelineData=n?d(r):r)}return this},setPipelineData:function(h,r){var n=this.pipelineData;return r===void 0?delete n[h]:n[h]=r,this},resetPipeline:function(h){return h===void 0&&(h=!1),this.pipeline=this.defaultPipeline,h&&(this.pipelineData={}),this.pipeline!==null},getPipelineName:function(){return this.pipeline===null?null:this.pipeline.name}};p.exports=c},17581:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62644),c=t(47059),h=t(19133),r={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(n){this.postPipelines=[],this.postPipelineData={},this.postFX=new c(this,!0),n&&(this.preFX=new c(this,!1))},setPostPipeline:function(n,e,s){var o=this.scene.sys.renderer;if(!o)return this;var i=o.pipelines;if(i){Array.isArray(n)||(n=[n]);for(var a=0;a<n.length;a++){var l=i.getPostPipeline(n[a],this,e);l&&this.postPipelines.push(l)}e&&(this.postPipelineData=s?d(e):e)}return this.hasPostPipeline=this.postPipelines.length>0,this},setPostPipelineData:function(n,e){var s=this.postPipelineData;return e===void 0?delete s[n]:s[n]=e,this},getPostPipeline:function(n){for(var e=typeof n=="string",s=this.postPipelines,o=[],i=0;i<s.length;i++){var a=s[i];(e&&a.name===n||!e&&a instanceof n)&&o.push(a)}return o.length===1?o[0]:o},resetPostPipeline:function(n){n===void 0&&(n=!1);for(var e=this.postPipelines,s=0;s<e.length;s++)e[s].destroy();this.postPipelines=[],this.hasPostPipeline=!1,n&&(this.postPipelineData={})},removePostPipeline:function(n){for(var e=typeof n=="string",s=this.postPipelines,o=s.length-1;o>=0;o--){var i=s[o];(e&&i.name===n||!e&&i===n)&&(i.destroy(),h(s,o))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};p.exports=r},80227:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,d){return d===void 0&&(d=t),this.scrollFactorX=t,this.scrollFactorY=d,this}};p.exports=S},16736:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var d=this.input;return d&&!d.customHitArea&&(d.hitArea.width=this.width,d.hitArea.height=this.height),this},setSize:function(t,d){return this.width=t,this.height=d,this},setDisplaySize:function(t,d){return this.displayWidth=t,this.displayHeight=d,this}};p.exports=S},37726:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(4327),c=8,h={texture:null,frame:null,isCropped:!1,setTexture:function(r,n,e,s){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n,e,s)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof d?(this.texture=this.scene.sys.textures.get(r.texture.key),this.frame=r):this.frame=this.texture.get(r),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~c:this.renderFlags|=c,this._sizeComponent&&n&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};p.exports=h},79812:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(4327),c=8,h={texture:null,frame:null,isCropped:!1,setCrop:function(r,n,e,s){if(r===void 0)this.isCropped=!1;else if(this.frame){if(typeof r=="number")this.frame.setCropUVs(this._crop,r,n,e,s,this.flipX,this.flipY);else{var o=r;this.frame.setCropUVs(this._crop,o.x,o.y,o.width,o.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(r,n){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof d?(this.texture=this.scene.sys.textures.get(r.texture.key),this.frame=r):this.frame=this.texture.get(r),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~c:this.renderFlags|=c,this._sizeComponent&&n&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};p.exports=h},27472:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,d,c,h){return t===void 0&&(t=16777215),d===void 0&&(d=t,c=t,h=t),this.tintTopLeft=t,this.tintTopRight=d,this.tintBottomLeft=c,this.tintBottomRight=h,this.tintFill=!1,this},setTintFill:function(t,d,c,h){return this.setTint(t,d,c,h),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};p.exports=S},53774:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(d.textureKey=t.texture.key,d.frameKey=t.frame.name),d};p.exports=S},16901:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(36383),c=t(61340),h=t(85955),r=t(86554),n=t(30954),e=t(26099),s=4,o={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(i){this._scaleX=i,this._scaleY=i,i===0?this.renderFlags&=~s:this.renderFlags|=s}},scaleX:{get:function(){return this._scaleX},set:function(i){this._scaleX=i,i===0?this.renderFlags&=~s:this._scaleY!==0&&(this.renderFlags|=s)}},scaleY:{get:function(){return this._scaleY},set:function(i){this._scaleY=i,i===0?this.renderFlags&=~s:this._scaleX!==0&&(this.renderFlags|=s)}},angle:{get:function(){return n(this._rotation*d.RAD_TO_DEG)},set:function(i){this.rotation=n(i)*d.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(i){this._rotation=r(i)}},setPosition:function(i,a,l,u){return i===void 0&&(i=0),a===void 0&&(a=i),l===void 0&&(l=0),u===void 0&&(u=0),this.x=i,this.y=a,this.z=l,this.w=u,this},copyPosition:function(i){return i.x!==void 0&&(this.x=i.x),i.y!==void 0&&(this.y=i.y),i.z!==void 0&&(this.z=i.z),i.w!==void 0&&(this.w=i.w),this},setRandomPosition:function(i,a,l,u){return i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=this.scene.sys.scale.width),u===void 0&&(u=this.scene.sys.scale.height),this.x=i+Math.random()*l,this.y=a+Math.random()*u,this},setRotation:function(i){return i===void 0&&(i=0),this.rotation=i,this},setAngle:function(i){return i===void 0&&(i=0),this.angle=i,this},setScale:function(i,a){return i===void 0&&(i=1),a===void 0&&(a=i),this.scaleX=i,this.scaleY=a,this},setX:function(i){return i===void 0&&(i=0),this.x=i,this},setY:function(i){return i===void 0&&(i=0),this.y=i,this},setZ:function(i){return i===void 0&&(i=0),this.z=i,this},setW:function(i){return i===void 0&&(i=0),this.w=i,this},getLocalTransformMatrix:function(i){return i===void 0&&(i=new c),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(i,a){i===void 0&&(i=new c);var l=this.parentContainer;if(!l)return this.getLocalTransformMatrix(i);for(a||(a=new c),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);l;)a.applyITRS(l.x,l.y,l._rotation,l._scaleX,l._scaleY),a.multiply(i,i),l=l.parentContainer;return i},getLocalPoint:function(i,a,l,u){l||(l=new e),u||(u=this.scene.sys.cameras.main);var f=u.scrollX,v=u.scrollY,m=i+f*this.scrollFactorX-f,g=a+v*this.scrollFactorY-v;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(m,g,l):h(m,g,this.x,this.y,this.rotation,this.scaleX,this.scaleY,l),this._originComponent&&(l.x+=this._displayOriginX,l.y+=this._displayOriginY),l},getParentRotation:function(){for(var i=0,a=this.parentContainer;a;)i+=a.rotation,a=a.parentContainer;return i}};p.exports=o},61340:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(36383),h=t(26099),r=new d({initialize:function(e,s,o,i,a,l){e===void 0&&(e=1),s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=1),a===void 0&&(a=0),l===void 0&&(l=0),this.matrix=new Float32Array([e,s,o,i,a,l,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(n){this.matrix[0]=n}},b:{get:function(){return this.matrix[1]},set:function(n){this.matrix[1]=n}},c:{get:function(){return this.matrix[2]},set:function(n){this.matrix[2]=n}},d:{get:function(){return this.matrix[3]},set:function(n){this.matrix[3]=n}},e:{get:function(){return this.matrix[4]},set:function(n){this.matrix[4]=n}},f:{get:function(){return this.matrix[5]},set:function(n){this.matrix[5]=n}},tx:{get:function(){return this.matrix[4]},set:function(n){this.matrix[4]=n}},ty:{get:function(){return this.matrix[5]},set:function(n){this.matrix[5]=n}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var n=this.matrix,e=n[0],s=n[1],o=n[2],i=n[3];return e||s?s>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):o||i?c.TAU-(i>0?Math.acos(-o/this.scaleY):-Math.acos(o/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 n=this.matrix;return n[0]=1,n[1]=0,n[2]=0,n[3]=1,n[4]=0,n[5]=0,this},translate:function(n,e){var s=this.matrix;return s[4]=s[0]*n+s[2]*e+s[4],s[5]=s[1]*n+s[3]*e+s[5],this},scale:function(n,e){var s=this.matrix;return s[0]*=n,s[1]*=n,s[2]*=e,s[3]*=e,this},rotate:function(n){var e=Math.sin(n),s=Math.cos(n),o=this.matrix,i=o[0],a=o[1],l=o[2],u=o[3];return o[0]=i*s+l*e,o[1]=a*s+u*e,o[2]=i*-e+l*s,o[3]=a*-e+u*s,this},multiply:function(n,e){var s=this.matrix,o=n.matrix,i=s[0],a=s[1],l=s[2],u=s[3],f=s[4],v=s[5],m=o[0],g=o[1],x=o[2],y=o[3],T=o[4],C=o[5],E=e===void 0?s:e.matrix;return E[0]=m*i+g*l,E[1]=m*a+g*u,E[2]=x*i+y*l,E[3]=x*a+y*u,E[4]=T*i+C*l+f,E[5]=T*a+C*u+v,E},multiplyWithOffset:function(n,e,s){var o=this.matrix,i=n.matrix,a=o[0],l=o[1],u=o[2],f=o[3],v=o[4],m=o[5],g=e*a+s*u+v,x=e*l+s*f+m,y=i[0],T=i[1],C=i[2],E=i[3],M=i[4],P=i[5];return o[0]=y*a+T*u,o[1]=y*l+T*f,o[2]=C*a+E*u,o[3]=C*l+E*f,o[4]=M*a+P*u+g,o[5]=M*l+P*f+x,this},transform:function(n,e,s,o,i,a){var l=this.matrix,u=l[0],f=l[1],v=l[2],m=l[3],g=l[4],x=l[5];return l[0]=n*u+e*v,l[1]=n*f+e*m,l[2]=s*u+o*v,l[3]=s*f+o*m,l[4]=i*u+a*v+g,l[5]=i*f+a*m+x,this},transformPoint:function(n,e,s){s===void 0&&(s={x:0,y:0});var o=this.matrix,i=o[0],a=o[1],l=o[2],u=o[3],f=o[4],v=o[5];return s.x=n*i+e*l+f,s.y=n*a+e*u+v,s},invert:function(){var n=this.matrix,e=n[0],s=n[1],o=n[2],i=n[3],a=n[4],l=n[5],u=e*i-s*o;return n[0]=i/u,n[1]=-s/u,n[2]=-o/u,n[3]=e/u,n[4]=(o*l-i*a)/u,n[5]=-(e*l-s*a)/u,this},copyFrom:function(n){var e=this.matrix;return e[0]=n.a,e[1]=n.b,e[2]=n.c,e[3]=n.d,e[4]=n.e,e[5]=n.f,this},copyFromArray:function(n){var e=this.matrix;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],this},copyToContext:function(n){var e=this.matrix;return n.transform(e[0],e[1],e[2],e[3],e[4],e[5]),n},setToContext:function(n){return n.setTransform(this),n},copyToArray:function(n){var e=this.matrix;return n===void 0?n=[e[0],e[1],e[2],e[3],e[4],e[5]]:(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5]),n},setTransform:function(n,e,s,o,i,a){var l=this.matrix;return l[0]=n,l[1]=e,l[2]=s,l[3]=o,l[4]=i,l[5]=a,this},decomposeMatrix:function(){var n=this.decomposedMatrix,e=this.matrix,s=e[0],o=e[1],i=e[2],a=e[3],l=s*a-o*i;if(n.translateX=e[4],n.translateY=e[5],s||o){var u=Math.sqrt(s*s+o*o);n.rotation=o>0?Math.acos(s/u):-Math.acos(s/u),n.scaleX=u,n.scaleY=l/u}else if(i||a){var f=Math.sqrt(i*i+a*a);n.rotation=Math.PI*.5-(a>0?Math.acos(-i/f):-Math.acos(i/f)),n.scaleX=l/f,n.scaleY=f}else n.rotation=0,n.scaleX=0,n.scaleY=0;return n},applyITRS:function(n,e,s,o,i){var a=this.matrix,l=Math.sin(s),u=Math.cos(s);return a[4]=n,a[5]=e,a[0]=u*o,a[1]=l*o,a[2]=-l*i,a[3]=u*i,this},applyInverse:function(n,e,s){s===void 0&&(s=new h);var o=this.matrix,i=o[0],a=o[1],l=o[2],u=o[3],f=o[4],v=o[5],m=1/(i*u+l*-a);return s.x=u*m*n+-l*m*e+(v*l-f*u)*m,s.y=i*m*e+-a*m*n+(-v*i+f*a)*m,s},setQuad:function(n,e,s,o,i,a){i===void 0&&(i=!1),a===void 0&&(a=this.quad);var l=this.matrix,u=l[0],f=l[1],v=l[2],m=l[3],g=l[4],x=l[5],y=n*u+e*v+g,T=n*f+e*m+x,C=n*u+o*v+g,E=n*f+o*m+x,M=s*u+o*v+g,P=s*f+o*m+x,A=s*u+e*v+g,R=s*f+e*m+x;if(i){var F=Math.floor(y+.5),w=Math.floor(T+.5),B=F-y,N=w-T;a[0]=F,a[1]=w,a[2]=C+B,a[3]=E+N,a[4]=M+B,a[5]=P+N,a[6]=A+B,a[7]=R+N}else a[0]=y,a[1]=T,a[2]=C,a[3]=E,a[4]=M,a[5]=P,a[6]=A,a[7]=R;return a},getX:function(n,e){return n*this.a+e*this.c+this.e},getY:function(n,e){return n*this.b+e*this.d+this.f},getXRound:function(n,e,s){var o=this.getX(n,e);return s&&(o=Math.floor(o+.5)),o},getYRound:function(n,e,s){var o=this.getY(n,e);return s&&(o=Math.floor(o+.5)),o},getCSSMatrix:function(){var n=this.matrix;return"matrix("+n[0]+","+n[1]+","+n[2]+","+n[3]+","+n[4]+","+n[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});p.exports=r},59715:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=1,t={_visible:!0,visible:{get:function(){return this._visible},set:function(d){d?(this._visible=!0,this.renderFlags|=S):(this._visible=!1,this.renderFlags&=~S)}},setVisible:function(d){return this.visible=d,this}};p.exports=t},31401:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Alpha:t(16005),AlphaSingle:t(88509),BlendMode:t(90065),ComputedSize:t(94215),Crop:t(61683),Depth:t(89272),Flip:t(54434),FX:t(47059),GetBounds:t(8004),Mask:t(8573),Origin:t(27387),PathFollower:t(37640),Pipeline:t(72699),PostPipeline:t(17581),ScrollFactor:t(80227),Size:t(16736),Texture:t(37726),TextureCrop:t(79812),Tint:t(27472),ToJSON:t(53774),Transform:t(16901),TransformMatrix:t(61340),Visible:t(59715)}},31559:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Felipe Alfonso <@bitnenfer>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(37105),c=t(10312),h=t(83419),r=t(31401),n=t(51708),e=t(95643),s=t(87841),o=t(29959),i=t(36899),a=t(26099),l=new r.TransformMatrix,u=new h({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.ComputedSize,r.Depth,r.Mask,r.PostPipeline,r.Transform,r.Visible,o],initialize:function(v,m,g,x){e.call(this,v,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new r.TransformMatrix,this._sortKey="",this._sysEvents=v.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(m,g),this.setBlendMode(c.SKIP_CHECK),x&&this.add(x)},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this.width*.5}},displayOriginY:{get:function(){return this.height*.5}},setExclusive:function(f){return f===void 0&&(f=!0),this.exclusive=f,this},getBounds:function(f){if(f===void 0&&(f=new s),f.setTo(this.x,this.y,0,0),this.parentContainer){var v=this.parentContainer.getBoundsTransformMatrix(),m=v.transformPoint(this.x,this.y);f.setTo(m.x,m.y,0,0)}if(this.list.length>0){var g=this.list,x=new s,y=!1;f.setEmpty();for(var T=0;T<g.length;T++){var C=g[T];C.getBounds&&(C.getBounds(x),y?i(x,f,f):(f.setTo(x.x,x.y,x.width,x.height),y=!0))}}return f},addHandler:function(f){f.once(n.DESTROY,this.onChildDestroyed,this),this.exclusive&&(f.parentContainer&&f.parentContainer.remove(f),f.parentContainer=this,f.removeFromDisplayList(),f.addedToScene())},removeHandler:function(f){f.off(n.DESTROY,this.remove,this),this.exclusive&&(f.parentContainer=null,f.removedFromScene(),f.addToDisplayList())},pointToContainer:function(f,v){v===void 0&&(v=new a),this.parentContainer?this.parentContainer.pointToContainer(f,v):(v.x=f.x,v.y=f.y);var m=l;return m.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),m.invert(),m.transformPoint(f.x,f.y,v),v},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(l,this.localTransform)},add:function(f){return d.Add(this.list,f,this.maxSize,this.addHandler,this),this},addAt:function(f,v){return d.AddAt(this.list,f,v,this.maxSize,this.addHandler,this),this},getAt:function(f){return this.list[f]},getIndex:function(f){return this.list.indexOf(f)},sort:function(f,v){return f?(v===void 0&&(v=function(m,g){return m[f]-g[f]}),d.StableSort(this.list,v),this):this},getByName:function(f){return d.GetFirst(this.list,"name",f)},getRandom:function(f,v){return d.GetRandom(this.list,f,v)},getFirst:function(f,v,m,g){return d.GetFirst(this.list,f,v,m,g)},getAll:function(f,v,m,g){return d.GetAll(this.list,f,v,m,g)},count:function(f,v,m,g){return d.CountAllMatching(this.list,f,v,m,g)},swap:function(f,v){return d.Swap(this.list,f,v),this},moveTo:function(f,v){return d.MoveTo(this.list,f,v),this},moveAbove:function(f,v){return d.MoveAbove(this.list,f,v),this},moveBelow:function(f,v){return d.MoveBelow(this.list,f,v),this},remove:function(f,v){var m=d.Remove(this.list,f,this.removeHandler,this);if(v&&m){Array.isArray(m)||(m=[m]);for(var g=0;g<m.length;g++)m[g].destroy()}return this},removeAt:function(f,v){var m=d.RemoveAt(this.list,f,this.removeHandler,this);return v&&m&&m.destroy(),this},removeBetween:function(f,v,m){var g=d.RemoveBetween(this.list,f,v,this.removeHandler,this);if(m)for(var x=0;x<g.length;x++)g[x].destroy();return this},removeAll:function(f){var v=this.list;if(f){for(var m=0;m<v.length;m++)v[m]&&v[m].scene&&(v[m].off(n.DESTROY,this.onChildDestroyed,this),v[m].destroy());this.list=[]}else d.RemoveBetween(v,0,v.length,this.removeHandler,this);return this},bringToTop:function(f){return d.BringToTop(this.list,f),this},sendToBack:function(f){return d.SendToBack(this.list,f),this},moveUp:function(f){return d.MoveUp(this.list,f),this},moveDown:function(f){return d.MoveDown(this.list,f),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return d.Shuffle(this.list),this},replace:function(f,v,m){var g=d.Replace(this.list,f,v);return g&&(this.addHandler(v),this.removeHandler(f),m&&f.destroy()),this},exists:function(f){return this.list.indexOf(f)>-1},setAll:function(f,v,m,g){return d.SetAll(this.list,f,v,m,g),this},each:function(f,v){var m=[null],g,x=this.list.slice(),y=x.length;for(g=2;g<arguments.length;g++)m.push(arguments[g]);for(g=0;g<y;g++)m[0]=x[g],f.apply(v,m);return this},iterate:function(f,v){var m=[null],g;for(g=2;g<arguments.length;g++)m.push(arguments[g]);for(g=0;g<this.list.length;g++)m[0]=this.list[g],f.apply(v,m);return this},setScrollFactor:function(f,v,m){return v===void 0&&(v=f),m===void 0&&(m=!1),this.scrollFactorX=f,this.scrollFactorY=v,m&&(d.SetAll(this.list,"scrollFactorX",f),d.SetAll(this.list,"scrollFactorY",v)),this},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.list=[]},onChildDestroyed:function(f){d.Remove(this.list,f),this.exclusive&&(f.parentContainer=null,f.removedFromScene())}});p.exports=u},53584:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Felipe Alfonso <@bitnenfer>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){c.addToRenderList(d);var r=d.list;if(r.length!==0){var n=d.localTransform;h?(n.loadIdentity(),n.multiply(h),n.translate(d.x,d.y),n.rotate(d.rotation),n.scale(d.scaleX,d.scaleY)):n.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY);var e=d.blendMode!==-1;e||t.setBlendMode(0);var s=d._alpha,o=d.scrollFactorX,i=d.scrollFactorY;d.mask&&d.mask.preRenderCanvas(t,null,c);for(var a=0;a<r.length;a++){var l=r[a];if(l.willRender(c)){var u=l.alpha,f=l.scrollFactorX,v=l.scrollFactorY;!e&&l.blendMode!==t.currentBlendMode&&t.setBlendMode(l.blendMode),l.setScrollFactor(f*o,v*i),l.setAlpha(u*s),l.renderCanvas(t,l,c,n),l.setAlpha(u),l.setScrollFactor(f,v)}}d.mask&&d.mask.postRenderCanvas(t)}};p.exports=S},77143:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Felipe Alfonso <@bitnenfer>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(31559),h=t(44603),r=t(23568),n=t(95540);h.register("container",function(e,s){e===void 0&&(e={});var o=r(e,"x",0),i=r(e,"y",0),a=n(e,"children",null),l=new c(this.scene,o,i,a);return s!==void 0&&(e.add=s),d(this.scene,l,e),l})},24961:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Felipe Alfonso <@bitnenfer>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(31559),c=t(39429);c.register("container",function(h,r,n){return this.displayList.add(new d(this.scene,h,r,n))})},29959:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Felipe Alfonso <@bitnenfer>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(72249),h=t(53584),p.exports={renderWebGL:c,renderCanvas:h}},72249:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Felipe Alfonso <@bitnenfer>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){c.addToRenderList(d);var r=d.list,n=r.length;if(n!==0){var e=d.localTransform;h?(e.loadIdentity(),e.multiply(h),e.translate(d.x,d.y),e.rotate(d.rotation),e.scale(d.scaleX,d.scaleY)):e.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY),t.pipelines.preBatch(d);var s=d.blendMode!==-1;s||t.setBlendMode(0);for(var o=d.alpha,i=d.scrollFactorX,a=d.scrollFactorY,l=0;l<n;l++){var u=r[l];if(u.willRender(c)){var f,v,m,g;if(u.alphaTopLeft!==void 0)f=u.alphaTopLeft,v=u.alphaTopRight,m=u.alphaBottomLeft,g=u.alphaBottomRight;else{var x=u.alpha;f=x,v=x,m=x,g=x}var y=u.scrollFactorX,T=u.scrollFactorY;!s&&u.blendMode!==t.currentBlendMode&&t.setBlendMode(u.blendMode);var C=u.mask;C&&C.preRenderWebGL(t,u,c);var E=u.type;E!==t.currentType&&(t.newType=!0,t.currentType=E),t.nextTypeMatch=l<n-1?r[l+1].type===t.currentType:!1,u.setScrollFactor(y*i,T*a),u.setAlpha(f*o,v*o,m*o,g*o),u.renderWebGL(t,u,c,e,d),u.setAlpha(f,v,m,g),u.setScrollFactor(y,T),C&&C.postRenderWebGL(t,c),t.newType=!1}}t.pipelines.postBatch(d)}};p.exports=S},47407:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(31401),h=t(441),r=t(95643),n=t(41212),e=t(35846),s=t(44594),o=t(61369),i=new d({Extends:r,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Origin,c.ScrollFactor,c.Transform,c.Visible,h],initialize:function(l,u,f,v,m,g){r.call(this,l,"DOMElement"),this.parent=l.sys.game.domContainer,this.cache=l.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new o,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(u,f),typeof v=="string"?v[0]==="#"?this.setElement(v.substr(1),m,g):this.createElement(v,m,g):v&&this.setElement(v,m,g),l.sys.events.on(s.SLEEP,this.handleSceneEvent,this),l.sys.events.on(s.WAKE,this.handleSceneEvent,this),l.sys.events.on(s.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(a){var l=this.node,u=l.style;l&&(u.display=a.settings.visible?"block":"none")},setSkew:function(a,l){return a===void 0&&(a=0),l===void 0&&(l=a),this.skewX=a,this.skewY=l,this},setPerspective:function(a){return this.parent.style.perspective=a+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(a){this.parent.style.perspective=a+"px"}},addListener:function(a){if(this.node){a=a.split(" ");for(var l=0;l<a.length;l++)this.node.addEventListener(a[l],this.handler,!1)}return this},removeListener:function(a){if(this.node){a=a.split(" ");for(var l=0;l<a.length;l++)this.node.removeEventListener(a[l],this.handler)}return this},dispatchNativeEvent:function(a){this.emit(a.type,a)},createElement:function(a,l,u){return this.setElement(document.createElement(a),l,u)},setElement:function(a,l,u){this.removeElement();var f;if(typeof a=="string"?(a[0]==="#"&&(a=a.substr(1)),f=document.getElementById(a)):typeof a=="object"&&a.nodeType===1&&(f=a),!f)return this;if(this.node=f,l&&n(l))for(var v in l)f.style[v]=l[v];else typeof l=="string"&&(f.style=l);return f.style.zIndex="0",f.style.display="inline",f.style.position="absolute",f.phaser=this,this.parent&&this.parent.appendChild(f),u&&(f.innerText=u),this.updateSize()},createFromCache:function(a,l){var u=this.cache.get(a);return u&&this.createFromHTML(u,l),this},createFromHTML:function(a,l){l===void 0&&(l="div"),this.removeElement();var u=document.createElement(l);return this.node=u,u.style.zIndex="0",u.style.display="inline",u.style.position="absolute",u.phaser=this,this.parent&&this.parent.appendChild(u),u.innerHTML=a,this.updateSize()},removeElement:function(){return this.node&&(e(this.node),this.node=null),this},updateSize:function(){var a=this.node,l=a.getBoundingClientRect();return this.width=a.clientWidth,this.height=a.clientHeight,this.displayWidth=l.width||0,this.displayHeight=l.height||0,this},getChildByProperty:function(a,l){if(this.node){for(var u=this.node.querySelectorAll("*"),f=0;f<u.length;f++)if(u[f][a]===l)return u[f]}return null},getChildByID:function(a){return this.getChildByProperty("id",a)},getChildByName:function(a){return this.getChildByProperty("name",a)},setClassName:function(a){return this.node&&(this.node.className=a,this.updateSize()),this},setText:function(a){return this.node&&(this.node.innerText=a,this.updateSize()),this},setHTML:function(a){return this.node&&(this.node.innerHTML=a,this.updateSize()),this},preRender:function(){var a=this.parentContainer,l=this.node;l&&a&&!a.willRender()&&(l.style.display="none")},willRender:function(){return!0},preDestroy:function(){this.removeElement(),this.scene.sys.events.off(s.SLEEP,this.handleSceneEvent,this),this.scene.sys.events.off(s.WAKE,this.handleSceneEvent,this),this.scene.sys.events.off(s.PRE_RENDER,this.preRender,this)}});p.exports=i},49381:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(47407),c=t(95643),h=t(61340),r=new h,n=new h,e=new h,s=function(o,i,a,l){if(i.node){var u=i.node.style,f=i.scene.sys.settings;if(!u||!f.visible||c.RENDER_MASK!==i.renderFlags||i.cameraFilter!==0&&i.cameraFilter&a.id||i.parentContainer&&!i.parentContainer.willRender()){u.display="none";return}var v=i.parentContainer,m=a.alpha*i.alpha;v&&(m*=v.alpha);var g=r,x=n,y=e,T=0,C=0,E="0%",M="0%";l?(T=i.width*i.scaleX*i.originX,C=i.height*i.scaleY*i.originY,x.applyITRS(i.x-T,i.y-C,i.rotation,i.scaleX,i.scaleY),g.copyFrom(a.matrix),g.multiplyWithOffset(l,-a.scrollX*i.scrollFactorX,-a.scrollY*i.scrollFactorY),x.e=i.x-T,x.f=i.y-C,g.multiply(x,y)):(T=i.width*i.originX,C=i.height*i.originY,x.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),g.copyFrom(a.matrix),E=100*i.originX+"%",M=100*i.originY+"%",x.e-=a.scrollX*i.scrollFactorX,x.f-=a.scrollY*i.scrollFactorY,g.multiply(x,y),y.e-=T,y.f-=C),i.transformOnly||(u.display="block",u.opacity=m,u.zIndex=i._depth,u.pointerEvents=i.pointerEvents,u.mixBlendMode=d[i._blendMode]),u.transform=y.getCSSMatrix()+" skew("+i.skewX+"rad, "+i.skewY+"rad) rotate3d("+i.rotate3d.x+","+i.rotate3d.y+","+i.rotate3d.z+","+i.rotate3d.w+i.rotate3dAngle+")",u.transformOrigin=E+" "+M}};p.exports=s},2611:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(3069),c=t(39429);c.register("dom",function(h,r,n,e,s){var o=new d(this.scene,h,r,n,e,s);return this.displayList.add(o),o})},441:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(49381),h=t(49381),p.exports={renderWebGL:c,renderCanvas:h}},62980:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="addedtoscene"},41337:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="destroy"},44947:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="removedfromscene"},49358:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="complete"},35163:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="created"},97249:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="error"},19483:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="locked"},56059:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="loop"},26772:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="metadata"},64437:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="playing"},83411:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="play"},75780:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="seeked"},67799:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="seeking"},63500:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="stalled"},55541:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="stop"},53208:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="textureready"},4992:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="unlocked"},12:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="unsupported"},51708:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={ADDED_TO_SCENE:t(62980),DESTROY:t(41337),REMOVED_FROM_SCENE:t(44947),VIDEO_COMPLETE:t(49358),VIDEO_CREATED:t(35163),VIDEO_ERROR:t(97249),VIDEO_LOCKED:t(19483),VIDEO_LOOP:t(56059),VIDEO_METADATA:t(26772),VIDEO_PLAY:t(83411),VIDEO_PLAYING:t(64437),VIDEO_SEEKED:t(75780),VIDEO_SEEKING:t(67799),VIDEO_STALLED:t(63500),VIDEO_STOP:t(55541),VIDEO_TEXTURE:t(53208),VIDEO_UNLOCKED:t(4992),VIDEO_UNSUPPORTED:t(12)}},42421:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(31401),h=t(95643),r=t(64993),n=new d({Extends:h,Mixins:[c.Alpha,c.BlendMode,c.Depth,c.Flip,c.Origin,c.ScrollFactor,c.Size,c.Texture,c.Tint,c.Transform,c.Visible,r],initialize:function(s){h.call(this,s,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});p.exports=n},70217:()=>{},56315:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(42421),c=t(39429);c.register("extern",function(){var h=new d(this.scene);return this.displayList.add(h),h})},64993:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(80287),h=t(70217),p.exports={renderWebGL:c,renderCanvas:h}},80287:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=function(h,r,n,e){h.pipelines.clear();var s=d(r,n,e).calc;r.render.call(r,h,n,s),h.pipelines.rebind()};p.exports=c},85592:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.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}},43831:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(71911),c=t(83419),h=t(85592),r=t(31401),n=t(8497),e=t(95643),s=t(95540),o=t(35154),i=t(36383),a=t(84503),l=new c({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.Transform,r.Visible,r.ScrollFactor,a],initialize:function(f,v){var m=o(v,"x",0),g=o(v,"y",0);e.call(this,f,"Graphics"),this.setPosition(m,g),this.initPipeline(),this.initPostPipeline(),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.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(v)},setDefaultStyles:function(u){return o(u,"lineStyle",null)&&(this.defaultStrokeWidth=o(u,"lineStyle.width",1),this.defaultStrokeColor=o(u,"lineStyle.color",16777215),this.defaultStrokeAlpha=o(u,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),o(u,"fillStyle",null)&&(this.defaultFillColor=o(u,"fillStyle.color",16777215),this.defaultFillAlpha=o(u,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(u,f,v){return v===void 0&&(v=1),this.commandBuffer.push(h.LINE_STYLE,u,f,v),this._lineWidth=u,this},fillStyle:function(u,f){return f===void 0&&(f=1),this.commandBuffer.push(h.FILL_STYLE,u,f),this},fillGradientStyle:function(u,f,v,m,g,x,y,T){return g===void 0&&(g=1),x===void 0&&(x=g),y===void 0&&(y=g),T===void 0&&(T=g),this.commandBuffer.push(h.GRADIENT_FILL_STYLE,g,x,y,T,u,f,v,m),this},lineGradientStyle:function(u,f,v,m,g,x){return x===void 0&&(x=1),this.commandBuffer.push(h.GRADIENT_LINE_STYLE,u,x,f,v,m,g),this},beginPath:function(){return this.commandBuffer.push(h.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(h.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(h.FILL_PATH),this},fill:function(){return this.commandBuffer.push(h.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(h.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(h.STROKE_PATH),this},fillCircleShape:function(u){return this.fillCircle(u.x,u.y,u.radius)},strokeCircleShape:function(u){return this.strokeCircle(u.x,u.y,u.radius)},fillCircle:function(u,f,v){return this.beginPath(),this.arc(u,f,v,0,i.PI2),this.fillPath(),this},strokeCircle:function(u,f,v){return this.beginPath(),this.arc(u,f,v,0,i.PI2),this.strokePath(),this},fillRectShape:function(u){return this.fillRect(u.x,u.y,u.width,u.height)},strokeRectShape:function(u){return this.strokeRect(u.x,u.y,u.width,u.height)},fillRect:function(u,f,v,m){return this.commandBuffer.push(h.FILL_RECT,u,f,v,m),this},strokeRect:function(u,f,v,m){var g=this._lineWidth/2,x=u-g,y=u+g;return this.beginPath(),this.moveTo(u,f),this.lineTo(u,f+m),this.strokePath(),this.beginPath(),this.moveTo(u+v,f),this.lineTo(u+v,f+m),this.strokePath(),this.beginPath(),this.moveTo(x,f),this.lineTo(y+v,f),this.strokePath(),this.beginPath(),this.moveTo(x,f+m),this.lineTo(y+v,f+m),this.strokePath(),this},fillRoundedRect:function(u,f,v,m,g){g===void 0&&(g=20);var x=g,y=g,T=g,C=g;typeof g!="number"&&(x=s(g,"tl",20),y=s(g,"tr",20),T=s(g,"bl",20),C=s(g,"br",20));var E=x>=0,M=y>=0,P=T>=0,A=C>=0;return x=Math.abs(x),y=Math.abs(y),T=Math.abs(T),C=Math.abs(C),this.beginPath(),this.moveTo(u+x,f),this.lineTo(u+v-y,f),M?this.arc(u+v-y,f+y,y,-i.TAU,0):this.arc(u+v,f,y,Math.PI,i.TAU,!0),this.lineTo(u+v,f+m-C),A?this.arc(u+v-C,f+m-C,C,0,i.TAU):this.arc(u+v,f+m,C,-i.TAU,Math.PI,!0),this.lineTo(u+T,f+m),P?this.arc(u+T,f+m-T,T,i.TAU,Math.PI):this.arc(u,f+m,T,0,-i.TAU,!0),this.lineTo(u,f+x),E?this.arc(u+x,f+x,x,-Math.PI,-i.TAU):this.arc(u,f,x,i.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(u,f,v,m,g){g===void 0&&(g=20);var x=g,y=g,T=g,C=g,E=Math.min(v,m)/2;typeof g!="number"&&(x=s(g,"tl",20),y=s(g,"tr",20),T=s(g,"bl",20),C=s(g,"br",20));var M=x>=0,P=y>=0,A=T>=0,R=C>=0;return x=Math.min(Math.abs(x),E),y=Math.min(Math.abs(y),E),T=Math.min(Math.abs(T),E),C=Math.min(Math.abs(C),E),this.beginPath(),this.moveTo(u+x,f),this.lineTo(u+v-y,f),this.moveTo(u+v-y,f),P?this.arc(u+v-y,f+y,y,-i.TAU,0):this.arc(u+v,f,y,Math.PI,i.TAU,!0),this.lineTo(u+v,f+m-C),this.moveTo(u+v,f+m-C),R?this.arc(u+v-C,f+m-C,C,0,i.TAU):this.arc(u+v,f+m,C,-i.TAU,Math.PI,!0),this.lineTo(u+T,f+m),this.moveTo(u+T,f+m),A?this.arc(u+T,f+m-T,T,i.TAU,Math.PI):this.arc(u,f+m,T,0,-i.TAU,!0),this.lineTo(u,f+x),this.moveTo(u,f+x),M?this.arc(u+x,f+x,x,-Math.PI,-i.TAU):this.arc(u,f,x,i.TAU,0,!0),this.strokePath(),this},fillPointShape:function(u,f){return this.fillPoint(u.x,u.y,f)},fillPoint:function(u,f,v){return!v||v<1?v=1:(u-=v/2,f-=v/2),this.commandBuffer.push(h.FILL_RECT,u,f,v,v),this},fillTriangleShape:function(u){return this.fillTriangle(u.x1,u.y1,u.x2,u.y2,u.x3,u.y3)},strokeTriangleShape:function(u){return this.strokeTriangle(u.x1,u.y1,u.x2,u.y2,u.x3,u.y3)},fillTriangle:function(u,f,v,m,g,x){return this.commandBuffer.push(h.FILL_TRIANGLE,u,f,v,m,g,x),this},strokeTriangle:function(u,f,v,m,g,x){return this.commandBuffer.push(h.STROKE_TRIANGLE,u,f,v,m,g,x),this},strokeLineShape:function(u){return this.lineBetween(u.x1,u.y1,u.x2,u.y2)},lineBetween:function(u,f,v,m){return this.beginPath(),this.moveTo(u,f),this.lineTo(v,m),this.strokePath(),this},lineTo:function(u,f){return this.commandBuffer.push(h.LINE_TO,u,f),this},moveTo:function(u,f){return this.commandBuffer.push(h.MOVE_TO,u,f),this},strokePoints:function(u,f,v,m){f===void 0&&(f=!1),v===void 0&&(v=!1),m===void 0&&(m=u.length),this.beginPath(),this.moveTo(u[0].x,u[0].y);for(var g=1;g<m;g++)this.lineTo(u[g].x,u[g].y);return f&&this.lineTo(u[0].x,u[0].y),v&&this.closePath(),this.strokePath(),this},fillPoints:function(u,f,v,m){f===void 0&&(f=!1),v===void 0&&(v=!1),m===void 0&&(m=u.length),this.beginPath(),this.moveTo(u[0].x,u[0].y);for(var g=1;g<m;g++)this.lineTo(u[g].x,u[g].y);return f&&this.lineTo(u[0].x,u[0].y),v&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(u,f){f===void 0&&(f=32);var v=u.getPoints(f);return this.strokePoints(v,!0)},strokeEllipse:function(u,f,v,m,g){g===void 0&&(g=32);var x=new n(u,f,v,m),y=x.getPoints(g);return this.strokePoints(y,!0)},fillEllipseShape:function(u,f){f===void 0&&(f=32);var v=u.getPoints(f);return this.fillPoints(v,!0)},fillEllipse:function(u,f,v,m,g){g===void 0&&(g=32);var x=new n(u,f,v,m),y=x.getPoints(g);return this.fillPoints(y,!0)},arc:function(u,f,v,m,g,x,y){return x===void 0&&(x=!1),y===void 0&&(y=0),this.commandBuffer.push(h.ARC,u,f,v,m,g,x,y),this},slice:function(u,f,v,m,g,x,y){return x===void 0&&(x=!1),y===void 0&&(y=0),this.commandBuffer.push(h.BEGIN_PATH),this.commandBuffer.push(h.MOVE_TO,u,f),this.commandBuffer.push(h.ARC,u,f,v,m,g,x,y),this.commandBuffer.push(h.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(h.SAVE),this},restore:function(){return this.commandBuffer.push(h.RESTORE),this},translateCanvas:function(u,f){return this.commandBuffer.push(h.TRANSLATE,u,f),this},scaleCanvas:function(u,f){return this.commandBuffer.push(h.SCALE,u,f),this},rotateCanvas:function(u){return this.commandBuffer.push(h.ROTATE,u),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(u,f,v){var m=this.scene.sys,g=m.game.renderer;f===void 0&&(f=m.scale.width),v===void 0&&(v=m.scale.height),l.TargetCamera.setScene(this.scene),l.TargetCamera.setViewport(0,0,f,v),l.TargetCamera.scrollX=this.x,l.TargetCamera.scrollY=this.y;var x,y,T={willReadFrequently:!0};if(typeof u=="string")if(m.textures.exists(u)){x=m.textures.get(u);var C=x.getSourceImage();C instanceof HTMLCanvasElement&&(y=C.getContext("2d",T))}else x=m.textures.createCanvas(u,f,v),y=x.getSourceImage().getContext("2d",T);else u instanceof HTMLCanvasElement&&(y=u.getContext("2d",T));return y&&(this.renderCanvas(g,this,l.TargetCamera,null,y,!1),x&&x.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});l.TargetCamera=new d,p.exports=l},32768:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(85592),c=t(20926),h=function(r,n,e,s,o,i){var a=n.commandBuffer,l=a.length,u=o||r.currentContext;if(!(l===0||!c(r,u,n,e,s))){e.addToRenderList(n);var f=1,v=1,m=0,g=0,x=1,y=0,T=0,C=0;u.beginPath();for(var E=0;E<l;++E){var M=a[E];switch(M){case d.ARC:u.arc(a[E+1],a[E+2],a[E+3],a[E+4],a[E+5],a[E+6]),E+=7;break;case d.LINE_STYLE:x=a[E+1],m=a[E+2],f=a[E+3],y=(m&16711680)>>>16,T=(m&65280)>>>8,C=m&255,u.strokeStyle="rgba("+y+","+T+","+C+","+f+")",u.lineWidth=x,E+=3;break;case d.FILL_STYLE:g=a[E+1],v=a[E+2],y=(g&16711680)>>>16,T=(g&65280)>>>8,C=g&255,u.fillStyle="rgba("+y+","+T+","+C+","+v+")",E+=2;break;case d.BEGIN_PATH:u.beginPath();break;case d.CLOSE_PATH:u.closePath();break;case d.FILL_PATH:i||u.fill();break;case d.STROKE_PATH:i||u.stroke();break;case d.FILL_RECT:i?u.rect(a[E+1],a[E+2],a[E+3],a[E+4]):u.fillRect(a[E+1],a[E+2],a[E+3],a[E+4]),E+=4;break;case d.FILL_TRIANGLE:u.beginPath(),u.moveTo(a[E+1],a[E+2]),u.lineTo(a[E+3],a[E+4]),u.lineTo(a[E+5],a[E+6]),u.closePath(),i||u.fill(),E+=6;break;case d.STROKE_TRIANGLE:u.beginPath(),u.moveTo(a[E+1],a[E+2]),u.lineTo(a[E+3],a[E+4]),u.lineTo(a[E+5],a[E+6]),u.closePath(),i||u.stroke(),E+=6;break;case d.LINE_TO:u.lineTo(a[E+1],a[E+2]),E+=2;break;case d.MOVE_TO:u.moveTo(a[E+1],a[E+2]),E+=2;break;case d.LINE_FX_TO:u.lineTo(a[E+1],a[E+2]),E+=5;break;case d.MOVE_FX_TO:u.moveTo(a[E+1],a[E+2]),E+=5;break;case d.SAVE:u.save();break;case d.RESTORE:u.restore();break;case d.TRANSLATE:u.translate(a[E+1],a[E+2]),E+=2;break;case d.SCALE:u.scale(a[E+1],a[E+2]),E+=2;break;case d.ROTATE:u.rotate(a[E+1]),E+=1;break;case d.GRADIENT_FILL_STYLE:E+=5;break;case d.GRADIENT_LINE_STYLE:E+=6;break}}u.restore()}};p.exports=h},87079:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(44603),c=t(43831);d.register("graphics",function(h,r){h===void 0&&(h={}),r!==void 0&&(h.add=r);var n=new c(this.scene,h);return h.add&&this.scene.sys.displayList.add(n),n})},1201:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43831),c=t(39429);c.register("graphics",function(h){return this.displayList.add(new d(this.scene,h))})},84503:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(77545),h=t(32768),h=t(32768),p.exports={renderWebGL:c,renderCanvas:h}},77545:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(85592),c=t(91296),h=t(61340),r=t(70554),n=function(a,l,u){this.x=a,this.y=l,this.width=u},e=function(a,l,u){this.points=[],this.pointsLength=1,this.points[0]=new n(a,l,u)},s=[],o=new h,i=function(a,l,u,f){if(l.commandBuffer.length!==0){u.addToRenderList(l);var v=a.pipelines.set(l.pipeline,l);a.pipelines.preBatch(l);for(var m=c(l,u,f).calc,g=o.loadIdentity(),x=l.commandBuffer,y=u.alpha*l.alpha,T=1,C=v.fillTint,E=v.strokeTint,M=0,P=0,A=0,R=.01,F=Math.PI*2,w,B=[],N=0,U=!0,D=null,I=r.getTintAppendFloatAlpha,O=0;O<x.length;O++)switch(w=x[O],w){case d.BEGIN_PATH:{B.length=0,D=null,U=!0;break}case d.CLOSE_PATH:{U=!1,D&&D.points.length&&D.points.push(D.points[0]);break}case d.FILL_PATH:{for(N=0;N<B.length;N++)v.batchFillPath(B[N].points,g,m);break}case d.STROKE_PATH:{for(N=0;N<B.length;N++)v.batchStrokePath(B[N].points,T,U,g,m);break}case d.LINE_STYLE:{T=x[++O];var L=x[++O],G=x[++O]*y,z=I(L,G);E.TL=z,E.TR=z,E.BL=z,E.BR=z;break}case d.FILL_STYLE:{var X=x[++O],V=x[++O]*y,Y=I(X,V);C.TL=Y,C.TR=Y,C.BL=Y,C.BR=Y;break}case d.GRADIENT_FILL_STYLE:{var W=x[++O]*y,H=x[++O]*y,b=x[++O]*y,K=x[++O]*y;C.TL=I(x[++O],W),C.TR=I(x[++O],H),C.BL=I(x[++O],b),C.BR=I(x[++O],K);break}case d.GRADIENT_LINE_STYLE:{T=x[++O];var Q=x[++O]*y;E.TL=I(x[++O],Q),E.TR=I(x[++O],Q),E.BL=I(x[++O],Q),E.BR=I(x[++O],Q);break}case d.ARC:{var Z=0,$=x[++O],q=x[++O],_=x[++O],tt=x[++O],J=x[++O],j=x[++O],k=x[++O];for(J-=tt,j?J<-F?J=-F:J>0&&(J=-F+J%F):J>F?J=F:J<0&&(J=F+J%F),D===null&&(D=new e($+Math.cos(tt)*_,q+Math.sin(tt)*_,T),B.push(D),Z+=R);Z<1+k;)A=J*Z+tt,M=$+Math.cos(A)*_,P=q+Math.sin(A)*_,D.points.push(new n(M,P,T)),Z+=R;A=J+tt,M=$+Math.cos(A)*_,P=q+Math.sin(A)*_,D.points.push(new n(M,P,T));break}case d.FILL_RECT:{v.batchFillRect(x[++O],x[++O],x[++O],x[++O],g,m);break}case d.FILL_TRIANGLE:{v.batchFillTriangle(x[++O],x[++O],x[++O],x[++O],x[++O],x[++O],g,m);break}case d.STROKE_TRIANGLE:{v.batchStrokeTriangle(x[++O],x[++O],x[++O],x[++O],x[++O],x[++O],T,g,m);break}case d.LINE_TO:{D!==null?D.points.push(new n(x[++O],x[++O],T)):(D=new e(x[++O],x[++O],T),B.push(D));break}case d.MOVE_TO:{D=new e(x[++O],x[++O],T),B.push(D);break}case d.SAVE:{s.push(g.copyToArray());break}case d.RESTORE:{g.copyFromArray(s.pop());break}case d.TRANSLATE:{$=x[++O],q=x[++O],g.translate($,q);break}case d.SCALE:{$=x[++O],q=x[++O],g.scale($,q);break}case d.ROTATE:{g.rotate(x[++O]);break}}a.pipelines.postBatch(l)}};p.exports=i},26479:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(61061),c=t(83419),h=t(51708),r=t(50792),n=t(46710),e=t(95540),s=t(35154),o=t(97022),i=t(41212),a=t(88492),l=t(35072),u=t(68287),f=new c({Extends:r,initialize:function(m,g,x){r.call(this),x?g&&!Array.isArray(g)&&(g=[g]):Array.isArray(g)?i(g[0])&&(x=g,g=null):i(g)&&(x=g,g=null),this.scene=m,this.children=new l,this.isParent=!0,this.type="Group",this.classType=e(x,"classType",u),this.name=e(x,"name",""),this.active=e(x,"active",!0),this.maxSize=e(x,"maxSize",-1),this.defaultKey=e(x,"defaultKey",null),this.defaultFrame=e(x,"defaultFrame",null),this.runChildUpdate=e(x,"runChildUpdate",!1),this.createCallback=e(x,"createCallback",null),this.removeCallback=e(x,"removeCallback",null),this.createMultipleCallback=e(x,"createMultipleCallback",null),this.internalCreateCallback=e(x,"internalCreateCallback",null),this.internalRemoveCallback=e(x,"internalRemoveCallback",null),g&&this.addMultiple(g),x&&this.createMultiple(x),this.on(h.ADDED_TO_SCENE,this.addedToScene,this),this.on(h.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(v,m,g,x,y,T){if(v===void 0&&(v=0),m===void 0&&(m=0),g===void 0&&(g=this.defaultKey),x===void 0&&(x=this.defaultFrame),y===void 0&&(y=!0),T===void 0&&(T=!0),this.isFull())return null;var C=new this.classType(this.scene,v,m,g,x);return C.addToDisplayList(this.scene.sys.displayList),C.addToUpdateList(),C.visible=y,C.setActive(T),this.add(C),C},createMultiple:function(v){if(this.isFull())return[];Array.isArray(v)||(v=[v]);var m=[];if(v[0].key)for(var g=0;g<v.length;g++){var x=this.createFromConfig(v[g]);m=m.concat(x)}return m},createFromConfig:function(v){if(this.isFull())return[];this.classType=e(v,"classType",this.classType);var m=e(v,"key",void 0),g=e(v,"frame",null),x=e(v,"visible",!0),y=e(v,"active",!0),T=[];if(m===void 0)return T;Array.isArray(m)||(m=[m]),Array.isArray(g)||(g=[g]);var C=e(v,"repeat",0),E=e(v,"randomKey",!1),M=e(v,"randomFrame",!1),P=e(v,"yoyo",!1),A=e(v,"quantity",!1),R=e(v,"frameQuantity",1),F=e(v,"max",0),w=a(m,g,{max:F,qty:A||R,random:E,randomB:M,repeat:C,yoyo:P});v.createCallback&&(this.createCallback=v.createCallback),v.removeCallback&&(this.removeCallback=v.removeCallback),v.internalCreateCallback&&(this.internalCreateCallback=v.internalCreateCallback),v.internalRemoveCallback&&(this.internalRemoveCallback=v.internalRemoveCallback);for(var B=0;B<w.length;B++){var N=this.create(0,0,w[B].a,w[B].b,x,y);if(!N)break;T.push(N)}if(o(v,"setXY")){var U=s(v,"setXY.x",0),D=s(v,"setXY.y",0),I=s(v,"setXY.stepX",0),O=s(v,"setXY.stepY",0);d.SetXY(T,U,D,I,O)}if(o(v,"setRotation")){var L=s(v,"setRotation.value",0),G=s(v,"setRotation.step",0);d.SetRotation(T,L,G)}if(o(v,"setScale")){var z=s(v,"setScale.x",1),X=s(v,"setScale.y",z),V=s(v,"setScale.stepX",0),Y=s(v,"setScale.stepY",0);d.SetScale(T,z,X,V,Y)}if(o(v,"setOrigin")){var W=s(v,"setOrigin.x",.5),H=s(v,"setOrigin.y",W),b=s(v,"setOrigin.stepX",0),K=s(v,"setOrigin.stepY",0);d.SetOrigin(T,W,H,b,K)}if(o(v,"setAlpha")){var Q=s(v,"setAlpha.value",1),Z=s(v,"setAlpha.step",0);d.SetAlpha(T,Q,Z)}if(o(v,"setDepth")){var $=s(v,"setDepth.value",0),q=s(v,"setDepth.step",0);d.SetDepth(T,$,q)}if(o(v,"setScrollFactor")){var _=s(v,"setScrollFactor.x",1),tt=s(v,"setScrollFactor.y",_),J=s(v,"setScrollFactor.stepX",0),j=s(v,"setScrollFactor.stepY",0);d.SetScrollFactor(T,_,tt,J,j)}var k=e(v,"hitArea",null),et=e(v,"hitAreaCallback",null);k&&d.SetHitArea(T,k,et);var it=e(v,"gridAlign",!1);return it&&d.GridAlign(T,it),this.createMultipleCallback&&this.createMultipleCallback.call(this,T),T},preUpdate:function(v,m){if(!(!this.runChildUpdate||this.children.size===0))for(var g=this.children.entries.slice(),x=0;x<g.length;x++){var y=g[x];y.active&&y.update(v,m)}},add:function(v,m){return m===void 0&&(m=!1),this.isFull()?this:(this.children.set(v),this.internalCreateCallback&&this.internalCreateCallback.call(this,v),this.createCallback&&this.createCallback.call(this,v),m&&(v.addToDisplayList(this.scene.sys.displayList),v.addToUpdateList()),v.on(h.DESTROY,this.remove,this),this)},addMultiple:function(v,m){if(m===void 0&&(m=!1),Array.isArray(v))for(var g=0;g<v.length;g++)this.add(v[g],m);return this},remove:function(v,m,g){return m===void 0&&(m=!1),g===void 0&&(g=!1),this.children.contains(v)?(this.children.delete(v),this.internalRemoveCallback&&this.internalRemoveCallback.call(this,v),this.removeCallback&&this.removeCallback.call(this,v),v.off(h.DESTROY,this.remove,this),g?v.destroy():m&&(v.removeFromDisplayList(),v.removeFromUpdateList()),this):this},clear:function(v,m){v===void 0&&(v=!1),m===void 0&&(m=!1);for(var g=this.children,x=0;x<g.size;x++){var y=g.entries[x];y.off(h.DESTROY,this.remove,this),m?y.destroy():v&&(y.removeFromDisplayList(),y.removeFromUpdateList())}return this.children.clear(),this},contains:function(v){return this.children.contains(v)},getChildren:function(){return this.children.entries},getLength:function(){return this.children.size},getMatching:function(v,m,g,x){return n(this.children.entries,v,m,g,x)},getFirst:function(v,m,g,x,y,T,C){return this.getHandler(!0,1,v,m,g,x,y,T,C)},getFirstNth:function(v,m,g,x,y,T,C,E){return this.getHandler(!0,v,m,g,x,y,T,C,E)},getLast:function(v,m,g,x,y,T,C){return this.getHandler(!1,1,v,m,g,x,y,T,C)},getLastNth:function(v,m,g,x,y,T,C,E){return this.getHandler(!1,v,m,g,x,y,T,C,E)},getHandler:function(v,m,g,x,y,T,C,E,M){g===void 0&&(g=!1),x===void 0&&(x=!1);var P,A,R=0,F=this.children.entries;if(v)for(A=0;A<F.length;A++)if(P=F[A],P.active===g){if(R++,R===m)break}else P=null;else for(A=F.length-1;A>=0;A--)if(P=F[A],P.active===g){if(R++,R===m)break}else P=null;return P?(typeof y=="number"&&(P.x=y),typeof T=="number"&&(P.y=T),P):x?this.create(y,T,C,E,M):null},get:function(v,m,g,x,y){return this.getFirst(!1,!0,v,m,g,x,y)},getFirstAlive:function(v,m,g,x,y,T){return this.getFirst(!0,v,m,g,x,y,T)},getFirstDead:function(v,m,g,x,y,T){return this.getFirst(!1,v,m,g,x,y,T)},playAnimation:function(v,m){return d.PlayAnimation(this.children.entries,v,m),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(v){v===void 0&&(v=!0);for(var m=0,g=0;g<this.children.size;g++)this.children.entries[g].active===v&&m++;return m},getTotalUsed:function(){return this.countActive()},getTotalFree:function(){var v=this.getTotalUsed(),m=this.maxSize===-1?999999999999:this.maxSize;return m-v},setActive:function(v){return this.active=v,this},setName:function(v){return this.name=v,this},propertyValueSet:function(v,m,g,x,y){return d.PropertyValueSet(this.children.entries,v,m,g,x,y),this},propertyValueInc:function(v,m,g,x,y){return d.PropertyValueInc(this.children.entries,v,m,g,x,y),this},setX:function(v,m){return d.SetX(this.children.entries,v,m),this},setY:function(v,m){return d.SetY(this.children.entries,v,m),this},setXY:function(v,m,g,x){return d.SetXY(this.children.entries,v,m,g,x),this},incX:function(v,m){return d.IncX(this.children.entries,v,m),this},incY:function(v,m){return d.IncY(this.children.entries,v,m),this},incXY:function(v,m,g,x){return d.IncXY(this.children.entries,v,m,g,x),this},shiftPosition:function(v,m,g){return d.ShiftPosition(this.children.entries,v,m,g),this},angle:function(v,m){return d.Angle(this.children.entries,v,m),this},rotate:function(v,m){return d.Rotate(this.children.entries,v,m),this},rotateAround:function(v,m){return d.RotateAround(this.children.entries,v,m),this},rotateAroundDistance:function(v,m,g){return d.RotateAroundDistance(this.children.entries,v,m,g),this},setAlpha:function(v,m){return d.SetAlpha(this.children.entries,v,m),this},setTint:function(v,m,g,x){return d.SetTint(this.children.entries,v,m,g,x),this},setOrigin:function(v,m,g,x){return d.SetOrigin(this.children.entries,v,m,g,x),this},scaleX:function(v,m){return d.ScaleX(this.children.entries,v,m),this},scaleY:function(v,m){return d.ScaleY(this.children.entries,v,m),this},scaleXY:function(v,m,g,x){return d.ScaleXY(this.children.entries,v,m,g,x),this},setDepth:function(v,m){return d.SetDepth(this.children.entries,v,m),this},setBlendMode:function(v){return d.SetBlendMode(this.children.entries,v),this},setHitArea:function(v,m){return d.SetHitArea(this.children.entries,v,m),this},shuffle:function(){return d.Shuffle(this.children.entries),this},kill:function(v){this.children.contains(v)&&v.setActive(!1)},killAndHide:function(v){this.children.contains(v)&&(v.setActive(!1),v.setVisible(!1))},setVisible:function(v,m,g){return d.SetVisible(this.children.entries,v,m,g),this},toggleVisible:function(){return d.ToggleVisible(this.children.entries),this},destroy:function(v,m){v===void 0&&(v=!1),m===void 0&&(m=!1),!(!this.scene||this.ignoreDestroy)&&(this.emit(h.DESTROY,this),this.removeAllListeners(),this.scene.sys.updateList.remove(this),this.clear(m,v),this.scene=void 0,this.children=void 0)}});p.exports=f},94975:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(44603),c=t(26479);d.register("group",function(h){return new c(this.scene,null,h)})},3385:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26479),c=t(39429);c.register("group",function(h,r){return this.updateList.add(new d(this.scene,h,r))})},88571:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(31401),h=t(95643),r=t(59819),n=new d({Extends:h,Mixins:[c.Alpha,c.BlendMode,c.Depth,c.Flip,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Size,c.TextureCrop,c.Tint,c.Transform,c.Visible,r],initialize:function(s,o,i,a,l){h.call(this,s,"Image"),this._crop=this.resetCropObject(),this.setTexture(a,l),this.setPosition(o,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=n},40652:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){c.addToRenderList(d),t.batchSprite(d,d.frame,c,h)};p.exports=S},82459:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(44603),h=t(23568),r=t(88571);c.register("image",function(n,e){n===void 0&&(n={});var s=h(n,"key",null),o=h(n,"frame",null),i=new r(this.scene,0,0,s,o);return e!==void 0&&(n.add=e),d(this.scene,i,n),i})},2117:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(88571),c=t(39429);c.register("image",function(h,r,n,e){return this.displayList.add(new d(this.scene,h,r,n,e))})},59819:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(99517),h=t(40652),p.exports={renderWebGL:c,renderCanvas:h}},99517:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){c.addToRenderList(d),this.pipeline.batchSprite(d,c,h)};p.exports=S},77856:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d={Events:t(51708),DisplayList:t(8050),GameObjectCreator:t(44603),GameObjectFactory:t(39429),UpdateList:t(45027),Components:t(31401),GetCalcMatrix:t(91296),BuildGameObject:t(25305),BuildGameObjectAnimation:t(13059),GameObject:t(95643),BitmapText:t(22186),Blitter:t(6107),Bob:t(46590),Container:t(31559),DOMElement:t(3069),DynamicBitmapText:t(2638),Extern:t(42421),Graphics:t(43831),Group:t(26479),Image:t(88571),Layer:t(93595),Particles:t(18404),PathFollower:t(1159),RenderTexture:t(591),RetroFont:t(196),Rope:t(77757),Sprite:t(68287),Text:t(50171),GetTextSize:t(14220),MeasureText:t(79557),TextStyle:t(35762),TileSprite:t(20839),Zone:t(41481),Video:t(18471),Shape:t(17803),Arc:t(23629),Curve:t(89),Ellipse:t(19921),Grid:t(30479),IsoBox:t(61475),IsoTriangle:t(16933),Line:t(57847),Polygon:t(24949),Rectangle:t(74561),Star:t(55911),Triangle:t(36931),Factories:{Blitter:t(12709),Container:t(24961),DOMElement:t(2611),DynamicBitmapText:t(72566),Extern:t(56315),Graphics:t(1201),Group:t(3385),Image:t(2117),Layer:t(20005),Particles:t(676),PathFollower:t(90145),RenderTexture:t(60505),Rope:t(96819),Sprite:t(46409),StaticBitmapText:t(34914),Text:t(68005),TileSprite:t(91681),Zone:t(84175),Video:t(89025),Arc:t(42563),Curve:t(40511),Ellipse:t(1543),Grid:t(34137),IsoBox:t(3933),IsoTriangle:t(49803),Line:t(2481),Polygon:t(64827),Rectangle:t(87959),Star:t(93697),Triangle:t(45245)},Creators:{Blitter:t(9403),Container:t(77143),DynamicBitmapText:t(11164),Graphics:t(87079),Group:t(94975),Image:t(82459),Layer:t(25179),Particles:t(92730),RenderTexture:t(34495),Rope:t(26209),Sprite:t(15567),StaticBitmapText:t(57336),Text:t(71259),TileSprite:t(14167),Zone:t(95261),Video:t(11511)}};d.Shader=t(20071),d.Mesh=t(4703),d.NineSlice=t(28103),d.PointLight=t(80321),d.Plane=t(33663),d.Factories.Shader=t(74177),d.Factories.Mesh=t(9225),d.Factories.NineSlice=t(47521),d.Factories.PointLight=t(71255),d.Factories.Plane=t(30985),d.Creators.Shader=t(54935),d.Creators.Mesh=t(20527),d.Creators.NineSlice=t(28279),d.Creators.PointLight=t(39829),d.Creators.Plane=t(56015),d.Light=t(41432),d.LightsManager=t(61356),d.LightsPlugin=t(88992),p.exports=d},93595:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(10312),c=t(83419),h=t(31401),r=t(53774),n=t(45893),e=t(50792),s=t(51708),o=t(73162),i=t(33963),a=t(44594),l=t(19186),u=new c({Extends:o,Mixins:[h.AlphaSingle,h.BlendMode,h.Depth,h.Mask,h.PostPipeline,h.Visible,e,i],initialize:function(v,m){o.call(this,v),e.call(this),this.scene=v,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=v.sys,this.events=v.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(d.SKIP_CHECK),m&&this.add(m),v.sys.queueDepthSort()},setActive:function(f){return this.active=f,this},setName:function(f){return this.name=f,this},setState:function(f){return this.state=f,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(f,v){return this.data||(this.data=new n(this)),this.data.set(f,v),this},incData:function(f,v){return this.data||(this.data=new n(this)),this.data.inc(f,v),this},toggleData:function(f){return this.data||(this.data=new n(this)),this.data.toggle(f),this},getData:function(f){return this.data||(this.data=new n(this)),this.data.get(f)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(f){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&f.id)},getIndexList:function(){for(var f=this,v=this.parentContainer,m=[];v&&(m.unshift(v.getIndex(f)),f=v,v.parentContainer);)v=v.parentContainer;return m.unshift(this.displayList.getIndex(f)),m},addChildCallback:function(f){var v=f.displayList;v&&v!==this&&f.removeFromDisplayList(),f.displayList||(this.queueDepthSort(),f.displayList=this,f.emit(s.ADDED_TO_SCENE,f,this.scene),this.events.emit(a.ADDED_TO_SCENE,f,this.scene))},removeChildCallback:function(f){this.queueDepthSort(),f.displayList=null,f.emit(s.REMOVED_FROM_SCENE,f,this.scene),this.events.emit(a.REMOVED_FROM_SCENE,f,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(l(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(f,v){return f._depth-v._depth},getChildren:function(){return this.list},addToDisplayList:function(f){return f===void 0&&(f=this.scene.sys.displayList),this.displayList&&this.displayList!==f&&this.removeFromDisplayList(),f.exists(this)||(this.displayList=f,f.add(this,!0),f.queueDepthSort(),this.emit(s.ADDED_TO_SCENE,this,this.scene),f.events.emit(a.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var f=this.displayList||this.scene.sys.displayList;return f.exists(this)&&(f.remove(this,!0),f.queueDepthSort(),this.displayList=null,this.emit(s.REMOVED_FROM_SCENE,this,this.scene),f.events.emit(a.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(f){if(!(!this.scene||this.ignoreDestroy)){this.emit(s.DESTROY,this);for(var v=this.list;v.length;)v[0].destroy(f);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0,!1),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}}});p.exports=u},2956:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=d.list;if(h.length!==0){d.depthSort();var r=d.blendMode!==-1;r||t.setBlendMode(0);var n=d._alpha;d.mask&&d.mask.preRenderCanvas(t,null,c);for(var e=0;e<h.length;e++){var s=h[e];if(s.willRender(c)){var o=s.alpha;!r&&s.blendMode!==t.currentBlendMode&&t.setBlendMode(s.blendMode),s.setAlpha(o*n),s.renderCanvas(t,s,c),s.setAlpha(o)}}d.mask&&d.mask.postRenderCanvas(t)}};p.exports=S},25179:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(93595),h=t(44603),r=t(23568);h.register("layer",function(n,e){n===void 0&&(n={});var s=r(n,"children",null),o=new c(this.scene,s);return e!==void 0&&(n.add=e),d(this.scene,o,n),o})},20005:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(93595),c=t(39429);c.register("layer",function(h){return this.displayList.add(new d(this.scene,h))})},33963:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(15869),h=t(2956),p.exports={renderWebGL:c,renderCanvas:h}},15869:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=d.list,r=h.length;if(r!==0){d.depthSort(),t.pipelines.preBatch(d);var n=d.blendMode!==-1;n||t.setBlendMode(0);for(var e=d.alpha,s=0;s<r;s++){var o=h[s];if(o.willRender(c)){var i,a,l,u;if(o.alphaTopLeft!==void 0)i=o.alphaTopLeft,a=o.alphaTopRight,l=o.alphaBottomLeft,u=o.alphaBottomRight;else{var f=o.alpha;i=f,a=f,l=f,u=f}!n&&o.blendMode!==t.currentBlendMode&&t.setBlendMode(o.blendMode);var v=o.mask;v&&v.preRenderWebGL(t,o,c);var m=o.type;m!==t.currentType&&(t.newType=!0,t.currentType=m),t.nextTypeMatch=s<r-1?h[s+1].type===t.currentType:!1,o.setAlpha(i*e,a*e,l*e,u*e),o.renderWebGL(t,o,c),o.setAlpha(i,a,l,u),v&&v.postRenderWebGL(t,c),t.newType=!1}}t.pipelines.postBatch(d)}};p.exports=S},41432:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(96503),c=t(83419),h=t(31401),r=t(51767),n=t(70554),e=new c({Extends:d,Mixins:[h.Origin,h.ScrollFactor,h.Visible],initialize:function(o,i,a,l,u,f,v){d.call(this,o,i,a),this.color=new r(l,u,f),this.intensity=v,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(a)},displayWidth:{get:function(){return this.diameter},set:function(s){this.diameter=s}},displayHeight:{get:function(){return this.diameter},set:function(s){this.diameter=s}},width:{get:function(){return this.diameter},set:function(s){this.diameter=s}},height:{get:function(){return this.diameter},set:function(s){this.diameter=s}},willRender:function(s){return!(e.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&s.id)},setColor:function(s){var o=n.getFloatsFromUintRGB(s);return this.color.set(o[0],o[1],o[2]),this},setIntensity:function(s){return this.intensity=s,this},setRadius:function(s){return this.radius=s,this}});e.RENDER_MASK=15,p.exports=e},61356:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(81491),c=t(83419),h=t(20339),r=t(41432),n=t(80321),e=t(51767),s=t(19133),o=t(19186),i=t(70554),a=new c({initialize:function(){this.lights=[],this.ambientColor=new e(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(l,u,f,v,m,g){return this.systems.displayList.add(new n(this.scene,l,u,f,v,m,g))},enable:function(){return this.maxLights===-1&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(l){for(var u=this.lights,f=l.worldView,v=[],m=0;m<u.length;m++){var g=u[m];g.willRender(l)&&d(g,f)&&v.push({light:g,distance:h(g.x,g.y,f.centerX,f.centerY)})}return v.length>this.maxLights&&(o(v,this.sortByDistance),v=v.slice(0,this.maxLights)),this.visibleLights=v.length,v},sortByDistance:function(l,u){return l.distance>=u.distance},setAmbientColor:function(l){var u=i.getFloatsFromUintRGB(l);return this.ambientColor.set(u[0],u[1],u[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(l,u,f,v,m){l===void 0&&(l=0),u===void 0&&(u=0),f===void 0&&(f=128),v===void 0&&(v=16777215),m===void 0&&(m=1);var g=i.getFloatsFromUintRGB(v),x=new r(l,u,f,g[0],g[1],g[2],m);return this.lights.push(x),x},removeLight:function(l){var u=this.lights.indexOf(l);return u>=0&&s(this.lights,u),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});p.exports=a},88992:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(61356),h=t(37277),r=t(44594),n=new d({Extends:c,initialize:function(s){this.scene=s,this.systems=s.sys,s.sys.settings.isBooted||s.sys.events.once(r.BOOT,this.boot,this),c.call(this)},boot:function(){var e=this.systems.events;e.on(r.SHUTDOWN,this.shutdown,this),e.on(r.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});h.register("LightsPlugin",n,"lights"),p.exports=n},4703:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(31401),h=t(39506),r=t(83997),n=t(95643),e=t(34684),s=t(92515),o=t(91296),i=t(37867),a=t(29807),l=t(43396),u=t(19186),f=t(25836),v=t(39318),m=new d({Extends:n,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Size,c.Texture,c.Transform,c.Visible,a],initialize:function(x,y,T,C,E,M,P,A,R,F,w,B){y===void 0&&(y=0),T===void 0&&(T=0),C===void 0&&(C="__WHITE"),n.call(this,x,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new f,this.modelScale=new f(1,1,1),this.modelRotation=new f,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new i,this.viewPosition=new f,this.viewMatrix=new i,this.projectionMatrix=new i,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var N=x.sys.renderer;this.setPosition(y,T),this.setTexture(C,E),this.setSize(N.width,N.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(N.width,N.height),M&&this.addVertices(M,P,A,R,F,w,B)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(g){return this.viewPosition.addScale(f.LEFT,g),this.dirtyCache[10]=1,this},panY:function(g){return this.viewPosition.y+=f.DOWN.y*g,this.dirtyCache[10]=1,this},panZ:function(g){return this.viewPosition.z+=g,this.dirtyCache[10]=1,this},setPerspective:function(g,x,y,T,C){return y===void 0&&(y=45),T===void 0&&(T=.01),C===void 0&&(C=1e3),this.fov=y,this.projectionMatrix.perspective(h(y),g/x,T,C),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(g,x,y,T){return g===void 0&&(g=this.scene.sys.renderer.getAspectRatio()),x===void 0&&(x=1),y===void 0&&(y=-1e3),T===void 0&&(T=1e3),this.fov=0,this.projectionMatrix.ortho(-g,g,-x,x,y,T),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(g){g.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(g,x,y,T,C,E,M,P,A){var R=this.scene.sys.cache.obj.get(g),F;return R&&(F=e(R,this,x,y,T,C,E,M,P,A)),(!F||F.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",g),this},sortByDepth:function(g,x){return g.depth-x.depth},depthSort:function(){return u(this.faces,this.sortByDepth),this},addVertex:function(g,x,y,T,C,E,M){var P=new v(g,x,y,T,C,E,M);return this.vertices.push(P),P},addFace:function(g,x,y){var T=new r(g,x,y);return this.faces.push(T),this.dirtyCache[9]=-1,T},addVertices:function(g,x,y,T,C,E,M){var P=s(g,x,y,T,C,E,M);return P?(this.faces=this.faces.concat(P.faces),this.vertices=this.vertices.concat(P.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(g){return this.faces[g]},hasFaceAt:function(g,x,y){y===void 0&&(y=this.scene.sys.cameras.main);for(var T=o(this,y).calc,C=this.faces,E=0;E<C.length;E++){var M=C[E];if(M.contains(g,x,T))return!0}return!1},getFaceAt:function(g,x,y){y===void 0&&(y=this.scene.sys.cameras.main);for(var T=o(this,y).calc,C=this.faces,E=[],M=0;M<C.length;M++){var P=C[M];P.contains(g,x,T)&&E.push(P)}return u(E,this.sortByDepth)},setDebug:function(g,x){return this.debugGraphic=g,!g&&!x?this.debugCallback=null:x?this.debugCallback=x:this.debugCallback=this.renderDebug,this},isDirty:function(){var g=this.modelPosition,x=this.modelRotation,y=this.modelScale,T=this.dirtyCache,C=g.x,E=g.y,M=g.z,P=x.x,A=x.y,R=x.z,F=y.x,w=y.y,B=y.z,N=this.getFaceCount(),U=T[0],D=T[1],I=T[2],O=T[3],L=T[4],G=T[5],z=T[6],X=T[7],V=T[8],Y=T[9];return T[0]=C,T[1]=E,T[2]=M,T[3]=P,T[4]=A,T[5]=R,T[6]=F,T[7]=w,T[8]=B,T[9]=N,U!==C||D!==E||I!==M||O!==P||L!==A||G!==R||z!==F||X!==w||V!==B||Y!==N},preUpdate:function(){this.totalRendered=this.totalFrame,this.totalFrame=0;var g=this.dirtyCache;if(!(!this.ignoreDirtyCache&&!g[10]&&!this.isDirty())){var x=this.width,y=this.height,T=this.viewMatrix,C=this.viewPosition;g[10]&&(T.identity(),T.translate(C),T.invert(),g[10]=0);var E=this.transformMatrix;E.setWorldMatrix(this.modelRotation,this.modelPosition,this.modelScale,this.viewMatrix,this.projectionMatrix);for(var M=C.z,P=this.faces,A=0;A<P.length;A++)P[A].transformCoordinatesLocal(E,x,y,M);this.depthSort()}},renderDebug:function(g,x){for(var y=g.debugGraphic,T=0;T<x.length;T++){var C=x[T],E=C.vertex1.tx,M=C.vertex1.ty,P=C.vertex2.tx,A=C.vertex2.ty,R=C.vertex3.tx,F=C.vertex3.ty;y.strokeTriangle(E,M,P,A,R,F)}},preDestroy:function(){this.clear(),this.debugCallback=null,this.debugGraphic=null},clearTint:function(){return this.setTint()},setInteractive:function(g){g===void 0&&(g={});var x=(function(y,T,C){for(var E=this.faces,M=0;M<E.length;M++){var P=E[M];if(P.contains(T,C))return!0}return!1}).bind(this);return this.scene.sys.input.enable(this,g,x),this},setTint:function(g){g===void 0&&(g=16777215);for(var x=this.vertices,y=0;y<x.length;y++)x[y].color=g;return this},uvScroll:function(g,x){for(var y=this.faces,T=0;T<y.length;T++)y[T].scrollUV(g,x);return this},uvScale:function(g,x){for(var y=this.faces,T=0;T<y.length;T++)y[T].scaleUV(g,x);return this},tint:{set:function(g){this.setTint(g)}},rotateX:{get:function(){return l(this.modelRotation.x)},set:function(g){this.modelRotation.x=h(g)}},rotateY:{get:function(){return l(this.modelRotation.y)},set:function(g){this.modelRotation.y=h(g)}},rotateZ:{get:function(){return l(this.modelRotation.z)},set:function(g){this.modelRotation.z=h(g)}}});p.exports=m},36488:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(){};p.exports=S},20527:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(44603),h=t(23568),r=t(35154),n=t(4703);c.register("mesh",function(e,s){e===void 0&&(e={});var o=h(e,"key",null),i=h(e,"frame",null),a=r(e,"vertices",[]),l=r(e,"uvs",[]),u=r(e,"indicies",[]),f=r(e,"containsZ",!1),v=r(e,"normals",[]),m=r(e,"colors",16777215),g=r(e,"alphas",1),x=new n(this.scene,0,0,o,i,a,l,u,f,v,m,g);return s!==void 0&&(e.add=s),d(this.scene,x,e),x})},9225:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(4703),c=t(39429);c.register("mesh",function(h,r,n,e,s,o,i,a,l,u,f){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i,a,l,u,f))})},29807:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(48833),h=t(36488),p.exports={renderWebGL:c,renderCanvas:h}},48833:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=function(h,r,n,e){var s=r.faces,o=s.length;if(o!==0){n.addToRenderList(r);var i=h.pipelines.set(r.pipeline,r),a=d(r,n,e).calc;h.pipelines.preBatch(r);for(var l=i.setGameObject(r),u=i.vertexViewF32,f=i.vertexViewU32,v=i.vertexCount*i.currentShader.vertexComponentCount-1,m=r.tintFill,g=[],x=r.debugCallback,y=a.a,T=a.b,C=a.c,E=a.d,M=a.e,P=a.f,A=r.viewPosition.z,R=r.hideCCW,F=n.roundPixels,w=n.alpha*r.alpha,B=0,N=0;N<o;N++){var U=s[N];U.isInView(n,R,A,w,y,T,C,E,M,P,F)&&(i.shouldFlush(3)&&(i.flush(),l=i.setGameObject(r),v=i.vertexCount*i.currentShader.vertexComponentCount-1),v=U.load(u,f,v,l,m),B++,i.vertexCount+=3,i.currentBatch.count=i.vertexCount-i.currentBatch.start,x&&g.push(U))}r.totalFrame+=B,x&&x.call(r,r,g),h.pipelines.postBatch(r)}};p.exports=c},28103:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(31401),h=t(95643),r=t(78023),n=t(39318),e=new d({Extends:h,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Texture,c.Transform,c.Visible,r],initialize:function(o,i,a,l,u,f,v,m,g,x,y){h.call(this,o,"NineSlice"),this._width,this._height,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth,this.rightWidth,this.topHeight,this.bottomHeight,this.tint=16777215,this.tintFill=!1;var T=o.textures.getFrame(l,u);this.is3Slice=!x&&!y,T&&T.scale9&&(this.is3Slice=T.is3Slice);for(var C=this.is3Slice?18:54,E=0;E<C;E++)this.vertices.push(new n);this.setPosition(i,a),this.setTexture(l,u),this.setSlices(f,v,m,g,x,y,!1),this.updateDisplayOrigin(),this.initPipeline(),this.initPostPipeline()},setSlices:function(s,o,i,a,l,u,f){i===void 0&&(i=10),a===void 0&&(a=10),l===void 0&&(l=0),u===void 0&&(u=0),f===void 0&&(f=!1);var v=this.frame,m=!1;if(this.is3Slice&&f&&l!==0&&u!==0&&(m=!0),m)console.warn("Cannot change 9 slice to 3 slice");else{if(v&&v.scale9&&!f){var g=v.data.scale9Borders,x=g.x,y=g.y;i=x,a=v.width-g.w-x,l=y,u=v.height-g.h-y,s===void 0&&(s=v.width),o===void 0&&(o=v.height)}else s===void 0&&(s=256),o===void 0&&(o=256);this._width=s,this._height=o,this.leftWidth=i,this.rightWidth=a,this.topHeight=l,this.bottomHeight=u,this.is3Slice&&(o=v.height,this._height=o,this.topHeight=o,this.bottomHeight=0),this.updateVertices(),this.updateUVs()}return this},updateUVs:function(){var s=this.leftWidth,o=this.rightWidth,i=this.topHeight,a=this.bottomHeight,l=this.frame.width,u=this.frame.height;this.updateQuadUVs(0,0,0,s/l,i/u),this.updateQuadUVs(6,s/l,0,1-o/l,i/u),this.updateQuadUVs(12,1-o/l,0,1,i/u),this.is3Slice||(this.updateQuadUVs(18,0,i/u,s/l,1-a/u),this.updateQuadUVs(24,s/l,i/u,1-o/l,1-a/u),this.updateQuadUVs(30,1-o/l,i/u,1,1-a/u),this.updateQuadUVs(36,0,1-a/u,s/l,1),this.updateQuadUVs(42,s/l,1-a/u,1-o/l,1),this.updateQuadUVs(48,1-o/l,1-a/u,1,1))},updateVertices:function(){var s=this.leftWidth,o=this.rightWidth,i=this.topHeight,a=this.bottomHeight,l=this.width,u=this.height;this.updateQuad(0,-.5,.5,-.5+s/l,.5-i/u),this.updateQuad(6,-.5+s/l,.5,.5-o/l,.5-i/u),this.updateQuad(12,.5-o/l,.5,.5,.5-i/u),this.is3Slice||(this.updateQuad(18,-.5,.5-i/u,-.5+s/l,-.5+a/u),this.updateQuad(24,-.5+s/l,.5-i/u,.5-o/l,-.5+a/u),this.updateQuad(30,.5-o/l,.5-i/u,.5,-.5+a/u),this.updateQuad(36,-.5,-.5+a/u,-.5+s/l,-.5),this.updateQuad(42,-.5+s/l,-.5+a/u,.5-o/l,-.5),this.updateQuad(48,.5-o/l,-.5+a/u,.5,-.5))},updateQuad:function(s,o,i,a,l){var u=this.width,f=this.height,v=this.originX,m=this.originY,g=this.vertices;g[s+0].resize(o,i,u,f,v,m),g[s+1].resize(o,l,u,f,v,m),g[s+2].resize(a,i,u,f,v,m),g[s+3].resize(o,l,u,f,v,m),g[s+4].resize(a,l,u,f,v,m),g[s+5].resize(a,i,u,f,v,m)},updateQuadUVs:function(s,o,i,a,l){var u=this.vertices,f=this.frame,v=f.u0,m=f.v0,g=f.u1,x=f.v1;if(v!==0||g!==1){var y=g-v;o=v+o*y,a=v+a*y}if(m!==0||x!==1){var T=x-m;i=m+i*T,l=m+l*T}u[s+0].setUVs(o,i),u[s+1].setUVs(o,l),u[s+2].setUVs(a,i),u[s+3].setUVs(o,l),u[s+4].setUVs(a,l),u[s+5].setUVs(a,i)},clearTint:function(){return this.setTint(16777215),this},setTint:function(s){return s===void 0&&(s=16777215),this.tint=s,this.tintFill=!1,this},setTintFill:function(s){return this.setTint(s),this.tintFill=!0,this},isTinted:{get:function(){return this.tint!==16777215}},width:{get:function(){return this._width},set:function(s){this._width=Math.max(s,this.leftWidth+this.rightWidth),this.updateVertices()}},height:{get:function(){return this._height},set:function(s){this.is3Slice||(this._height=Math.max(s,this.topHeight+this.bottomHeight),this.updateVertices())}},displayWidth:{get:function(){return this.scaleX*this.width},set:function(s){this.scaleX=s/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(s){this.scaleY=s/this.height}},setSize:function(s,o){this.width=s,this.height=o,this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=this.width,i.hitArea.height=this.height),this},setDisplaySize:function(s,o){return this.displayWidth=s,this.displayHeight=o,this},originX:{get:function(){return this._originX},set:function(s){this._originX=s,this.updateVertices()}},originY:{get:function(){return this._originY},set:function(s){this._originY=s,this.updateVertices()}},setOrigin:function(s,o){return s===void 0&&(s=.5),o===void 0&&(o=s),this._originX=s,this._originY=o,this.updateVertices(),this.updateDisplayOrigin()},setSizeToFrame:function(){if(this.is3Slice){var s=this.frame.height;this._height=s,this.topHeight=s,this.bottomHeight=0}return this.updateUVs(),this},preDestroy:function(){this.vertices=[]}});p.exports=e},28279:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(44603),h=t(23568),r=t(35154),n=t(28103);c.register("nineslice",function(e,s){e===void 0&&(e={});var o=h(e,"key",null),i=h(e,"frame",null),a=r(e,"width",256),l=r(e,"height",256),u=r(e,"leftWidth",10),f=r(e,"rightWidth",10),v=r(e,"topHeight",0),m=r(e,"bottomHeight",0),g=new n(this.scene,0,0,o,i,a,l,u,f,v,m);return s!==void 0&&(e.add=s),d(this.scene,g,e),g})},47521:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(28103),c=t(39429);c.register("nineslice",function(h,r,n,e,s,o,i,a,l,u){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i,a,l,u))})},78023:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(52230),p.exports={renderWebGL:c,renderCanvas:h}},52230:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=t(70554),h=function(r,n,e,s){var o=n.vertices,i=o.length;if(i!==0){e.addToRenderList(n);var a=r.pipelines.set(n.pipeline,n),l=d(n,e,s,!1).calc;r.pipelines.preBatch(n);var u=a.setGameObject(n),f=a.vertexViewF32,v=a.vertexViewU32,m=a.vertexCount*a.currentShader.vertexComponentCount-1,g=e.roundPixels,x=n.tintFill,y=e.alpha*n.alpha,T=c.getTintAppendFloatAlpha(n.tint,y),C=a.vertexAvailable(),E=-1;C<i&&(E=C);for(var M=0;M<i;M++){var P=o[M];M===E&&(a.flush(),u=a.setGameObject(n),m=0),f[++m]=l.getXRound(P.vx,P.vy,g),f[++m]=l.getYRound(P.vx,P.vy,g),f[++m]=P.u,f[++m]=P.v,f[++m]=u,f[++m]=x,v[++m]=T,a.vertexCount++,a.currentBatch.count=a.vertexCount-a.currentBatch.start}r.pipelines.postBatch(n)}};p.exports=h},76472:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(44777),h=t(37589),r=t(6113),n=t(91389),e=t(90664),s=new d({Extends:c,initialize:function(i){c.call(this,i,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return this.propertyValue===null?0:9},setMethods:function(){var o=this.propertyValue,i=o,a=this.defaultEmit,l=this.defaultUpdate;if(this.method===9){this.start=o[0],this.ease=r("Linear"),this.interpolation=n("linear"),a=this.easedValueEmit,l=this.easeValueUpdate,i=o[0],this.active=!0;for(var u=0;u<o.length;u++){var f=e(o[u]);this.r.push(f.r),this.g.push(f.g),this.b.push(f.b)}}return this.onEmit=a,this.onUpdate=l,this.current=i,this},setEase:function(o){this.easeName=o,this.ease=r(o)},easedValueEmit:function(){return this.current=this.start,this.start},easeValueUpdate:function(o,i,a){var l=this.ease(a),u=this.interpolation(this.r,l),f=this.interpolation(this.g,l),v=this.interpolation(this.b,l),m=h(u,f,v);return this.current=m,m}});p.exports=s},44777:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(30976),c=t(45319),h=t(83419),r=t(99472),n=t(6113),e=t(95540),s=t(91389),o=t(77720),i=t(15994),a=new h({initialize:function(u,f,v){v===void 0&&(v=!1),this.propertyKey=u,this.propertyValue=f,this.defaultValue=f,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=v,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(l,u){l===void 0&&(l={}),u&&(this.propertyKey=u),this.propertyValue=e(l,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(l){var u;switch(this.method){case 1:case 3:case 8:u=l;break;case 2:this.propertyValue.indexOf(l)>=0&&(u=l);break;case 4:var f=(this.end-this.start)/this.steps;u=o(l,f),this.counter=u;break;case 5:case 6:case 7:u=c(l,this.start,this.end);break;case 9:u=this.start[0];break}return this.current=u,this},getMethod:function(){var l=this.propertyValue;if(l===null)return 0;var u=typeof l;if(u==="number")return 1;if(Array.isArray(l))return 2;if(u==="function")return 3;if(u==="object"){if(this.hasBoth(l,"start","end"))return this.has(l,"steps")?4:5;if(this.hasBoth(l,"min","max"))return 6;if(this.has(l,"random"))return 7;if(this.hasEither(l,"onEmit","onUpdate"))return 8;if(this.hasEither(l,"values","interpolation"))return 9}return 0},setMethods:function(){var l=this.propertyValue,u=l,f=this.defaultEmit,v=this.defaultUpdate;switch(this.method){case 1:f=this.staticValueEmit;break;case 2:f=this.randomStaticValueEmit,u=l[0];break;case 3:this._onEmit=l,f=this.proxyEmit;break;case 4:this.start=l.start,this.end=l.end,this.steps=l.steps,this.counter=this.start,this.yoyo=this.has(l,"yoyo")?l.yoyo:!1,this.direction=0,f=this.steppedEmit,u=this.start;break;case 5:this.start=l.start,this.end=l.end;var m=this.has(l,"ease")?l.ease:"Linear";this.ease=n(m,l.easeParams),f=this.has(l,"random")&&l.random?this.randomRangedValueEmit:this.easedValueEmit,v=this.easeValueUpdate,u=this.start;break;case 6:this.start=l.min,this.end=l.max,f=this.has(l,"int")&&l.int?this.randomRangedIntEmit:this.randomRangedValueEmit,u=this.start;break;case 7:var g=l.random;Array.isArray(g)&&(this.start=g[0],this.end=g[1]),f=this.randomRangedIntEmit,u=this.start;break;case 8:this._onEmit=this.has(l,"onEmit")?l.onEmit:this.defaultEmit,this._onUpdate=this.has(l,"onUpdate")?l.onUpdate:this.defaultUpdate,f=this.proxyEmit,v=this.proxyUpdate;break;case 9:this.start=l.values;var x=this.has(l,"ease")?l.ease:"Linear";this.ease=n(x,l.easeParams),this.interpolation=s(l.interpolation),f=this.easedValueEmit,v=this.easeValueUpdate,u=this.start[0];break}return this.onEmit=f,this.onUpdate=v,this.current=u,this},has:function(l,u){return l.hasOwnProperty(u)},hasBoth:function(l,u,f){return l.hasOwnProperty(u)&&l.hasOwnProperty(f)},hasEither:function(l,u,f){return l.hasOwnProperty(u)||l.hasOwnProperty(f)},defaultEmit:function(l,u,f){return f},defaultUpdate:function(l,u,f,v){return v},proxyEmit:function(l,u,f){var v=this._onEmit(l,u,f);return this.current=v,v},proxyUpdate:function(l,u,f,v){var m=this._onUpdate(l,u,f,v);return this.current=m,m},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var l=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[l],this.current},randomRangedValueEmit:function(l,u){var f=r(this.start,this.end);return l&&l.data[u]&&(l.data[u].min=f,l.data[u].max=this.end),this.current=f,f},randomRangedIntEmit:function(l,u){var f=d(this.start,this.end);return l&&l.data[u]&&(l.data[u].min=f,l.data[u].max=this.end),this.current=f,f},steppedEmit:function(){var l=this.counter,u=l,f=(this.end-this.start)/this.steps;if(this.yoyo){var v;this.direction===0?(u+=f,u>=this.end&&(v=u-this.end,u=this.end-v,this.direction=1)):(u-=f,u<=this.start&&(v=this.start-u,u=this.start+v,this.direction=0)),this.counter=u}else this.counter=i(u+f,this.start,this.end);return this.current=l,l},easedValueEmit:function(l,u){if(l&&l.data[u]){var f=l.data[u];f.min=this.start,f.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(l,u,f){var v=l.data[u],m,g=this.ease(f);return this.interpolation?m=this.interpolation(this.start,g):m=(v.max-v.min)*g+v.min,this.current=m,m},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});p.exports=a},24502:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(95540),h=t(20286),r=new d({Extends:h,initialize:function(e,s,o,i,a){if(typeof e=="object"){var l=e;e=c(l,"x",0),s=c(l,"y",0),o=c(l,"power",0),i=c(l,"epsilon",100),a=c(l,"gravity",50)}else e===void 0&&(e=0),s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=100),a===void 0&&(a=50);h.call(this,e,s,!0),this._gravity=a,this._power=o*a,this._epsilon=i*i},update:function(n,e){var s=this.x-n.x,o=this.y-n.y,i=s*s+o*o;if(i!==0){var a=Math.sqrt(i);i<this._epsilon&&(i=this._epsilon);var l=this._power*e/(i*a)*100;n.velocityX+=s*l,n.velocityY+=o*l}},epsilon:{get:function(){return Math.sqrt(this._epsilon)},set:function(n){this._epsilon=n*n}},power:{get:function(){return this._power/this._gravity},set:function(n){this._power=n*this._gravity}},gravity:{get:function(){return this._gravity},set:function(n){var e=this.power;this._gravity=n,this.power=e}}});p.exports=r},56480:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(9674),c=t(45319),h=t(83419),r=t(39506),n=t(87841),e=t(11520),s=t(26099),o=new h({initialize:function(a){this.emitter=a,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new s,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.holdCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=a.scene,this.anims=new d(this),this.bounds=new n},emit:function(i,a,l,u,f,v){return this.emitter.emit(i,a,l,u,f,v)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(i,a){i===void 0&&(i=0),a===void 0&&(a=0),this.x=i,this.y=a},fire:function(i,a){var l=this.emitter,u=l.ops,f=l.getAnim();if(f?this.anims.play(f):(this.frame=l.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(l.getEmitZone(this),i===void 0?this.x+=u.x.onEmit(this,"x"):u.x.steps>0?this.x+=i+u.x.onEmit(this,"x"):this.x+=i,a===void 0?this.y+=u.y.onEmit(this,"y"):u.y.steps>0?this.y+=a+u.y.onEmit(this,"y"):this.y+=a,this.life=u.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=u.delay.onEmit(this,"delay"),this.holdCurrent=u.hold.onEmit(this,"hold"),this.scaleX=u.scaleX.onEmit(this,"scaleX"),this.scaleY=u.scaleY.active?u.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=u.rotate.onEmit(this,"rotate"),this.rotation=r(this.angle),l.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&l.getDeathZone(this))return this.lifeCurrent=0,!1;var v=u.speedX.onEmit(this,"speedX"),m=u.speedY.active?u.speedY.onEmit(this,"speedY"):v;if(l.radial){var g=r(u.angle.onEmit(this,"angle"));this.velocityX=Math.cos(g)*Math.abs(v),this.velocityY=Math.sin(g)*Math.abs(m)}else if(l.moveTo){var x=u.moveToX.onEmit(this,"moveToX"),y=u.moveToY.onEmit(this,"moveToY"),T=this.life/1e3;this.velocityX=(x-this.x)/T,this.velocityY=(y-this.y)/T}else this.velocityX=v,this.velocityY=m;return l.acceleration&&(this.accelerationX=u.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=u.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=u.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=u.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=u.bounce.onEmit(this,"bounce"),this.alpha=u.alpha.onEmit(this,"alpha"),u.color.active?this.tint=u.color.onEmit(this,"tint"):this.tint=u.tint.onEmit(this,"tint"),!0},update:function(i,a,l){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=i,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=i,!1;this.anims.update(0,i);var u=this.emitter,f=u.ops,v=1-this.lifeCurrent/this.life;if(this.lifeT=v,this.x=f.x.onUpdate(this,"x",v,this.x),this.y=f.y.onUpdate(this,"y",v,this.y),u.moveTo){var m=f.moveToX.onUpdate(this,"moveToX",v,u.moveToX),g=f.moveToY.onUpdate(this,"moveToY",v,u.moveToY),x=this.lifeCurrent/1e3;this.velocityX=(m-this.x)/x,this.velocityY=(g-this.y)/x}return this.computeVelocity(u,i,a,l,v),this.scaleX=f.scaleX.onUpdate(this,"scaleX",v,this.scaleX),f.scaleY.active?this.scaleY=f.scaleY.onUpdate(this,"scaleY",v,this.scaleY):this.scaleY=this.scaleX,this.angle=f.rotate.onUpdate(this,"rotate",v,this.angle),this.rotation=r(this.angle),u.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=c(f.alpha.onUpdate(this,"alpha",v,this.alpha),0,1),f.color.active?this.tint=f.color.onUpdate(this,"color",v,this.tint):this.tint=f.tint.onUpdate(this,"tint",v,this.tint),this.lifeCurrent-=i,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(i,a,l,u,f){var v=i.ops,m=this.velocityX,g=this.velocityY,x=v.accelerationX.onUpdate(this,"accelerationX",f,this.accelerationX),y=v.accelerationY.onUpdate(this,"accelerationY",f,this.accelerationY),T=v.maxVelocityX.onUpdate(this,"maxVelocityX",f,this.maxVelocityX),C=v.maxVelocityY.onUpdate(this,"maxVelocityY",f,this.maxVelocityY);this.bounce=v.bounce.onUpdate(this,"bounce",f,this.bounce),m+=i.gravityX*l+x*l,g+=i.gravityY*l+y*l,m=c(m,-T,T),g=c(g,-C,C),this.velocityX=m,this.velocityY=g,this.x+=m*l,this.y+=g*l,i.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var E=0;E<u.length;E++){var M=u[E];M.active&&M.update(this,a,l,f)}},setSizeToFrame:function(){},getBounds:function(i){i===void 0&&(i=this.emitter.getWorldTransformMatrix());var a=Math.abs(i.scaleX)*this.scaleX,l=Math.abs(i.scaleY)*this.scaleY,u=this.x,f=this.y,v=this.rotation,m=this.frame.width*a/2,g=this.frame.height*l/2,x=this.bounds,y=new s(u-m,f-g),T=new s(u+m,f-g),C=new s(u-m,f+g),E=new s(u+m,f+g);return v!==0&&(e(y,u,f,v),e(T,u,f,v),e(C,u,f,v),e(E,u,f,v)),i.transformPoint(y.x,y.y,y),i.transformPoint(T.x,T.y,T),i.transformPoint(C.x,C.y,C),i.transformPoint(E.x,E.y,E),x.x=Math.min(y.x,T.x,C.x,E.x),x.y=Math.min(y.y,T.y,C.y,E.y),x.width=Math.max(y.x,T.x,C.x,E.x)-x.x,x.height=Math.max(y.y,T.y,C.y,E.y)-x.y,x},destroy:function(){this.anims.destroy(),this.anims=null,this.emitter=null,this.texture=null,this.frame=null,this.scene=null}});p.exports=o},69601:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(20286),h=t(87841),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,u,f){a===void 0&&(a=!0),l===void 0&&(l=!0),u===void 0&&(u=!0),f===void 0&&(f=!0),c.call(this,e,s,!0),this.bounds=new h(e,s,o,i),this.collideLeft=a,this.collideRight=l,this.collideTop=u,this.collideBottom=f},update:function(n){var e=this.bounds,s=-n.bounce,o=n.worldPosition;o.x<e.x&&this.collideLeft?(n.x+=e.x-o.x,n.velocityX*=s):o.x>e.right&&this.collideRight&&(n.x-=o.x-e.right,n.velocityX*=s),o.y<e.y&&this.collideTop?(n.y+=e.y-o.y,n.velocityY*=s):o.y>e.bottom&&this.collideBottom&&(n.y-=o.y-e.bottom,n.velocityY*=s)}});p.exports=r},31600:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(31401),h=t(53774),r=t(43459),n=t(26388),e=t(19909),s=t(76472),o=t(44777),i=t(20696),a=t(95643),l=t(95540),u=t(26546),f=t(24502),v=t(1985),m=t(97022),g=t(86091),x=t(73162),y=t(20074),T=t(269),C=t(56480),E=t(69601),M=t(68875),P=t(87841),A=t(59996),R=t(72905),F=t(90668),w=t(19186),B=t(61340),N=t(26099),U=t(15994),D=["active","advance","blendMode","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],I=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],O=new d({Extends:a,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Texture,c.Transform,c.Visible,F],initialize:function(G,z,X,V,Y){a.call(this,G,"ParticleEmitter"),this.particleClass=C,this.config=null,this.ops={accelerationX:new o("accelerationX",0),accelerationY:new o("accelerationY",0),alpha:new o("alpha",1),angle:new o("angle",{min:0,max:360},!0),bounce:new o("bounce",0),color:new s("color"),delay:new o("delay",0,!0),hold:new o("hold",0,!0),lifespan:new o("lifespan",1e3,!0),maxVelocityX:new o("maxVelocityX",1e4),maxVelocityY:new o("maxVelocityY",1e4),moveToX:new o("moveToX",0),moveToY:new o("moveToY",0),quantity:new o("quantity",1,!0),rotate:new o("rotate",0),scaleX:new o("scaleX",1),scaleY:new o("scaleY",1),speedX:new o("speedX",0,!0),speedY:new o("speedY",0,!0),tint:new o("tint",16777215),x:new o("x",0),y:new o("y",0)},this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.moveTo=!1,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.stopAfter=0,this.duration=0,this.frequency=0,this.emitting=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZones=[],this.deathZones=[],this.viewBounds=null,this.follow=null,this.followOffset=new N,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this.skipping=!1,this.worldMatrix=new B,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new x(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(z,X),this.setTexture(V),Y&&this.setConfig(Y)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(L){if(!L)return this;this.config=L;var G=0,z="",X=this.ops;for(G=0;G<I.length;G++)z=I[G],X[z].loadConfig(L);for(G=0;G<D.length;G++)z=D[G],m(L,z)&&(this[z]=l(L,z));if(this.acceleration=this.accelerationX!==0||this.accelerationY!==0,this.moveTo=this.moveToX!==0&&this.moveToY!==0,m(L,"speed")&&(X.speedX.loadConfig(L,"speed"),X.speedY.active=!1),(v(L,["speedX","speedY"])||this.moveTo)&&(this.radial=!1),m(L,"scale")&&(X.scaleX.loadConfig(L,"scale"),X.scaleY.active=!1),m(L,"callbackScope")){var V=l(L,"callbackScope",null);this.emitCallbackScope=V,this.deathCallbackScope=V}if(m(L,"emitZone")&&this.addEmitZone(L.emitZone),m(L,"deathZone")&&this.addDeathZone(L.deathZone),m(L,"bounds")){var Y=this.addParticleBounds(L.bounds);Y.collideLeft=l(L,"collideLeft",!0),Y.collideRight=l(L,"collideRight",!0),Y.collideTop=l(L,"collideTop",!0),Y.collideBottom=l(L,"collideBottom",!0)}return m(L,"followOffset")&&this.followOffset.setFromObject(l(L,"followOffset",0)),m(L,"texture")&&this.setTexture(L.texture),m(L,"frame")?this.setEmitterFrame(L.frame):m(L,"anim")&&this.setAnim(L.anim),m(L,"reserve")&&this.reserve(L.reserve),m(L,"advance")&&this.fastForward(L.advance),this.resetCounters(this.frequency,this.emitting),this.emitting&&this.emit(i.START,this),this},updateConfig:function(L){return L&&(this.config?this.setConfig(T(this.config,L)):this.setConfig(L)),this},toJSON:function(){var L=h(this),G=0,z="";for(G=0;G<D.length;G++)z=D[G],L[z]=this[z];var X=this.ops;for(G=0;G<I.length;G++)z=I[G],X[z]&&(L[z]=X[z].toJSON());return X.speedY.active||(delete L.speedX,L.speed=X.speedX.toJSON()),this.scaleX===this.scaleY&&(delete L.scaleX,delete L.scaleY,L.scale=X.scaleX.toJSON()),L},resetCounters:function(L,G){var z=this.counters;z.fill(0),z[0]=L,G&&(z[5]=1)},startFollow:function(L,G,z,X){return G===void 0&&(G=0),z===void 0&&(z=0),X===void 0&&(X=!1),this.follow=L,this.followOffset.set(G,z),this.trackVisible=X,this},stopFollow:function(){return this.follow=null,this.followOffset.set(0,0),this.trackVisible=!1,this},getFrame:function(){var L=this.frames,G=L.length,z;return G===1?z=L[0]:this.randomFrame?z=u(L):(z=L[this.currentFrame],this.frameCounter++,this.frameCounter===this.frameQuantity&&(this.frameCounter=0,this.currentFrame++,this.currentFrame===G&&(this.currentFrame=0))),this.texture.get(z)},setEmitterFrame:function(L,G,z){G===void 0&&(G=!0),z===void 0&&(z=1),this.randomFrame=G,this.frameQuantity=z,this.currentFrame=0;var X=typeof L;if(this.frames.length=0,Array.isArray(L))this.frames=this.frames.concat(L);else if(X==="string"||X==="number")this.frames.push(L);else if(X==="object"){var V=L;L=l(V,"frames",null),L&&(this.frames=this.frames.concat(L));var Y=l(V,"cycle",!1);this.randomFrame=!Y,this.frameQuantity=l(V,"quantity",z)}return this.frames.length===1&&(this.frameQuantity=1,this.randomFrame=!1),this},getAnim:function(){var L=this.anims,G=L.length;if(G===0)return null;if(G===1)return L[0];if(this.randomAnim)return u(L);var z=L[this.currentAnim];return this.animCounter++,this.animCounter>=this.animQuantity&&(this.animCounter=0,this.currentAnim=U(this.currentAnim+1,0,G)),z},setAnim:function(L,G,z){G===void 0&&(G=!0),z===void 0&&(z=1),this.randomAnim=G,this.animQuantity=z,this.currentAnim=0;var X=typeof L;if(this.anims.length=0,Array.isArray(L))this.anims=this.anims.concat(L);else if(X==="string")this.anims.push(L);else if(X==="object"){var V=L;L=l(V,"anims",null),L&&(this.anims=this.anims.concat(L));var Y=l(V,"cycle",!1);this.randomAnim=!Y,this.animQuantity=l(V,"quantity",z)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(L){return L===void 0&&(L=!0),this.radial=L,this},addParticleBounds:function(L,G,z,X,V,Y,W,H){if(typeof L=="object"){var b=L;L=b.x,G=b.y,z=m(b,"w")?b.w:b.width,X=m(b,"h")?b.h:b.height}return this.addParticleProcessor(new E(L,G,z,X,V,Y,W,H))},setParticleSpeed:function(L,G){return G===void 0&&(G=L),this.ops.speedX.onChange(L),L===G?this.ops.speedY.active=!1:this.ops.speedY.onChange(G),this.radial=!0,this},setParticleScale:function(L,G){return L===void 0&&(L=1),G===void 0&&(G=L),this.ops.scaleX.onChange(L),this.ops.scaleY.onChange(G),this},setParticleGravity:function(L,G){return this.gravityX=L,this.gravityY=G,this},setParticleAlpha:function(L){return this.ops.alpha.onChange(L),this},setParticleTint:function(L){return this.ops.tint.onChange(L),this},setEmitterAngle:function(L){return this.ops.angle.onChange(L),this},setParticleLifespan:function(L){return this.ops.lifespan.onChange(L),this},setQuantity:function(L){return this.quantity=L,this},setFrequency:function(L,G){return this.frequency=L,this.flowCounter=L>0?L:0,G&&(this.quantity=G),this},addDeathZone:function(L){Array.isArray(L)||(L=[L]);for(var G,z=[],X=0;X<L.length;X++)if(G=L[X],G instanceof n)z.push(G);else if(typeof G.contains=="function")G=new n(G,!0),z.push(G);else{var V=l(G,"type","onEnter"),Y=l(G,"source",null);if(Y&&typeof Y.contains=="function"){var W=V==="onEnter";G=new n(Y,W),z.push(G)}}return this.deathZones=this.deathZones.concat(z),z},removeDeathZone:function(L){return R(this.deathZones,L),this},clearDeathZones:function(){return this.deathZones.length=0,this},addEmitZone:function(L){Array.isArray(L)||(L=[L]);for(var G,z=[],X=0;X<L.length;X++)if(G=L[X],G instanceof M||G instanceof e)z.push(G);else{var V=l(G,"source",null);if(V){var Y=l(G,"type","random");if(Y==="random"&&typeof V.getRandomPoint=="function")G=new M(V),z.push(G);else if(Y==="edge"&&typeof V.getPoints=="function"){var W=l(G,"quantity",1),H=l(G,"stepRate",0),b=l(G,"yoyo",!1),K=l(G,"seamless",!0),Q=l(G,"total",-1);G=new e(V,W,H,b,K,Q),z.push(G)}}}return this.emitZones=this.emitZones.concat(z),z},removeEmitZone:function(L){return R(this.emitZones,L),this.zoneIndex=0,this},clearEmitZones:function(){return this.emitZones.length=0,this.zoneIndex=0,this},getEmitZone:function(L){var G=this.emitZones,z=G.length;if(z!==0){var X=G[this.zoneIndex];X.getPoint(L),X.total>-1&&(this.zoneTotal++,this.zoneTotal===X.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===z&&(this.zoneIndex=0)))}},getDeathZone:function(L){for(var G=this.deathZones,z=0;z<G.length;z++){var X=G[z];if(X.willKill(L))return this.emit(i.DEATH_ZONE,this,L,X),!0}return!1},setEmitZone:function(L){var G;return isFinite(L)?G=L:G=this.emitZones.indexOf(L),G>=0&&(this.zoneIndex=G),this},addParticleProcessor:function(L){return this.processors.exists(L)||(L.emitter&&L.emitter.removeParticleProcessor(L),this.processors.add(L),L.emitter=this),L},removeParticleProcessor:function(L){return this.processors.exists(L)&&(this.processors.remove(L,!0),L.emitter=null),L},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(L){return this.addParticleProcessor(new f(L))},reserve:function(L){var G=this.dead;if(this.maxParticles>0){var z=this.getParticleCount();z+L>this.maxParticles&&(L=this.maxParticles-(z+L))}for(var X=0;X<L;X++)G.push(new this.particleClass(this));return this},getAliveParticleCount:function(){return this.alive.length},getDeadParticleCount:function(){return this.dead.length},getParticleCount:function(){return this.getAliveParticleCount()+this.getDeadParticleCount()},atLimit:function(){return this.maxParticles>0&&this.getParticleCount()>=this.maxParticles?!0:this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(L,G){return L===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof L=="function"&&(this.emitCallback=L,G&&(this.emitCallbackScope=G)),this},onParticleDeath:function(L,G){return L===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof L=="function"&&(this.deathCallback=L,G&&(this.deathCallbackScope=G)),this},killAll:function(){for(var L=this.dead,G=this.alive;G.length>0;)L.push(G.pop());return this},forEachAlive:function(L,G){for(var z=this.alive,X=z.length,V=0;V<X;V++)L.call(G,z[V],this);return this},forEachDead:function(L,G){for(var z=this.dead,X=z.length,V=0;V<X;V++)L.call(G,z[V],this);return this},start:function(L,G){return L===void 0&&(L=0),this.emitting||(L>0&&this.fastForward(L),this.emitting=!0,this.resetCounters(this.frequency,!0),G!==void 0&&(this.duration=Math.abs(G)),this.emit(i.START,this)),this},stop:function(L){return L===void 0&&(L=!1),this.emitting&&(this.emitting=!1,L&&this.killAll(),this.emit(i.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(L,G){return L===void 0&&(L=""),G===void 0&&(G=this.true),this.sortProperty=L,this.sortOrderAsc=G,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(L){return this.sortProperty!==""?L=this.depthSortCallback:L=null,this.sortCallback=L,this},depthSort:function(){return w(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(L,G){var z=this.sortProperty;return this.sortOrderAsc?L[z]-G[z]:G[z]-L[z]},flow:function(L,G,z){return G===void 0&&(G=1),this.emitting=!1,this.frequency=L,this.quantity=G,z!==void 0&&(this.stopAfter=z),this.start()},explode:function(L,G,z){this.frequency=-1,this.resetCounters(-1,!0);var X=this.emitParticle(L,G,z);return this.emit(i.EXPLODE,this,X),X},emitParticleAt:function(L,G,z){return this.emitParticle(z,L,G)},emitParticle:function(L,G,z){if(!this.atLimit()){L===void 0&&(L=this.ops.quantity.onEmit());for(var X=this.dead,V=this.stopAfter,Y=this.follow?this.follow.x+this.followOffset.x:G,W=this.follow?this.follow.y+this.followOffset.y:z,H=0;H<L;H++){var b=X.pop();if(b||(b=new this.particleClass(this)),b.fire(Y,W)?(this.particleBringToTop?this.alive.push(b):this.alive.unshift(b),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,b,this)):this.dead.push(b),V>0&&(this.stopCounter++,this.stopCounter>=V)||this.atLimit())break}return b}},fastForward:function(L,G){G===void 0&&(G=1e3/60);var z=0;for(this.skipping=!0;z<Math.abs(L);)this.preUpdate(0,G),z+=G;return this.skipping=!1,this},preUpdate:function(L,G){G*=this.timeScale;var z=G/1e3;this.trackVisible&&(this.visible=this.follow.visible),this.getWorldTransformMatrix(this.worldMatrix);var X=this.getProcessors(),V=this.alive,Y=this.dead,W=0,H=[],b=V.length;for(W=0;W<b;W++){var K=V[W];K.update(G,z,X)&&H.push({index:W,particle:K})}if(b=H.length,b>0){var Q=this.deathCallback,Z=this.deathCallbackScope;for(W=b-1;W>=0;W--){var $=H[W];V.splice($.index,1),Y.push($.particle),Q&&Q.call(Z,$.particle),$.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&V.length===0&&(this.completeFlag=0,this.emit(i.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=G;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=G,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(L){for(var G=this.getWorldTransformMatrix(),z=this.alive,X=z.length,V=[],Y=0;Y<X;Y++){var W=z[Y];A(L,W.getBounds(G))&&V.push(W)}return V},getBounds:function(L,G,z,X){L===void 0&&(L=0),G===void 0&&(G=0),z===void 0&&(z=1e3/60),X===void 0&&(X=new P);var V=this.getWorldTransformMatrix(),Y,W,H=this.alive,b=!1;if(X.setTo(0,0,0,0),G>0){var K=0;for(this.skipping=!0;K<Math.abs(G);){for(this.preUpdate(0,z),Y=0;Y<H.length;Y++)W=H[Y].getBounds(V),b?y(X,W):(b=!0,r(W,X));K+=z}this.skipping=!1}else for(Y=0;Y<H.length;Y++)W=H[Y].getBounds(V),b?y(X,W):(b=!0,r(W,X));return L>0&&g(X,L,L),X},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(L){this.ops.x.onChange(L)}},particleY:{get:function(){return this.ops.y.current},set:function(L){this.ops.y.onChange(L)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(L){this.ops.accelerationX.onChange(L)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(L){this.ops.accelerationY.onChange(L)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(L){this.ops.maxVelocityX.onChange(L)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(L){this.ops.maxVelocityY.onChange(L)}},speed:{get:function(){return this.ops.speedX.current},set:function(L){this.ops.speedX.onChange(L),this.ops.speedY.onChange(L)}},speedX:{get:function(){return this.ops.speedX.current},set:function(L){this.ops.speedX.onChange(L)}},speedY:{get:function(){return this.ops.speedY.current},set:function(L){this.ops.speedY.onChange(L)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(L){this.ops.moveToX.onChange(L)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(L){this.ops.moveToY.onChange(L)}},bounce:{get:function(){return this.ops.bounce.current},set:function(L){this.ops.bounce.onChange(L)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(L){this.ops.scaleX.onChange(L)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(L){this.ops.scaleY.onChange(L)}},particleColor:{get:function(){return this.ops.color.current},set:function(L){this.ops.color.onChange(L)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(L){this.ops.color.setEase(L)}},particleTint:{get:function(){return this.ops.tint.current},set:function(L){this.ops.tint.onChange(L)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(L){this.ops.alpha.onChange(L)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(L){this.ops.lifespan.onChange(L)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(L){this.ops.angle.onChange(L)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(L){this.ops.rotate.onChange(L)}},quantity:{get:function(){return this.ops.quantity.current},set:function(L){this.ops.quantity.onChange(L)}},delay:{get:function(){return this.ops.delay.current},set:function(L){this.ops.delay.onChange(L)}},hold:{get:function(){return this.ops.hold.current},set:function(L){this.ops.hold.onChange(L)}},flowCounter:{get:function(){return this.counters[0]},set:function(L){this.counters[0]=L}},frameCounter:{get:function(){return this.counters[1]},set:function(L){this.counters[1]=L}},animCounter:{get:function(){return this.counters[2]},set:function(L){this.counters[2]=L}},elapsed:{get:function(){return this.counters[3]},set:function(L){this.counters[3]=L}},stopCounter:{get:function(){return this.counters[4]},set:function(L){this.counters[4]=L}},completeFlag:{get:function(){return this.counters[5]},set:function(L){this.counters[5]=L}},zoneIndex:{get:function(){return this.counters[6]},set:function(L){this.counters[6]=L}},zoneTotal:{get:function(){return this.counters[7]},set:function(L){this.counters[7]=L}},currentFrame:{get:function(){return this.counters[8]},set:function(L){this.counters[8]=L}},currentAnim:{get:function(){return this.counters[9]},set:function(L){this.counters[9]=L}},preDestroy:function(){this.texture=null,this.frames=null,this.anims=null,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.emitZones=null,this.deathZones=null,this.bounds=null,this.follow=null,this.counters=null;var L,G=this.ops;for(L=0;L<I.length;L++){var z=I[L];G[z].destroy()}for(L=0;L<this.alive.length;L++)this.alive[L].destroy();for(L=0;L<this.dead.length;L++)this.dead[L].destroy();this.ops=null,this.alive=[],this.dead=[],this.worldMatrix.destroy()}});p.exports=O},9871:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(59996),c=t(61340),h=new c,r=new c,n=new c,e=new c,s=function(o,i,a,l){var u=h,f=r,v=n,m=e;l?(m.loadIdentity(),m.multiply(l),m.translate(i.x,i.y),m.rotate(i.rotation),m.scale(i.scaleX,i.scaleY)):m.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY);var g=o.currentContext,x=a.roundPixels,y=a.alpha,T=i.alpha,C=i.alive,E=C.length,M=i.viewBounds;if(!(!i.visible||E===0||M&&!d(M,a.worldView))){i.sortCallback&&i.depthSort(),a.addToRenderList(i);var P=i.scrollFactorX,A=i.scrollFactorY;g.save(),g.globalCompositeOperation=o.blendModes[i.blendMode];for(var R=0;R<E;R++){var F=C[R],w=F.alpha*T*y;if(!(w<=0||F.scaleX===0||F.scaleY===0)){v.applyITRS(F.x,F.y,F.rotation,F.scaleX,F.scaleY),u.copyFrom(a.matrix),u.multiplyWithOffset(m,-a.scrollX*P,-a.scrollY*A),v.e=F.x,v.f=F.y,u.multiply(v,f);var B=F.frame,N=B.canvasData;if(N.width>0&&N.height>0){var U=-B.halfWidth,D=-B.halfHeight;g.globalAlpha=w,g.save(),f.setToContext(g),x&&(U=Math.round(U),D=Math.round(D)),g.imageSmoothingEnabled=!B.source.scaleMode,g.drawImage(B.source.image,N.x,N.y,N.width,N.height,U,D,N.width,N.height),g.restore()}}}g.restore()}};p.exports=s},92730:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(44603),h=t(23568),r=t(95540),n=t(31600);c.register("particles",function(e,s){e===void 0&&(e={});var o=h(e,"key",null),i=r(e,"config",null),a=new n(this.scene,0,0,o);return s!==void 0&&(e.add=s),d(this.scene,a,e),i&&a.setConfig(i),a})},676:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39429),c=t(31600);d.register("particles",function(h,r,n,e){return h!==void 0&&typeof h=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new c(this.scene,h,r,n,e))})},90668:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(21188),h=t(9871),p.exports={renderWebGL:c,renderCanvas:h}},21188:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(59996),c=t(61340),h=t(70554),r=new c,n=new c,e=new c,s=new c,o=function(i,a,l,u){var f=i.pipelines.set(a.pipeline),v=r,m=n,g=e,x=s;u?(x.loadIdentity(),x.multiply(u),x.translate(a.x,a.y),x.rotate(a.rotation),x.scale(a.scaleX,a.scaleY)):x.applyITRS(a.x,a.y,a.rotation,a.scaleX,a.scaleY);var y=h.getTintAppendFloatAlpha,T=l.alpha,C=a.alpha;i.pipelines.preBatch(a);var E=a.alive,M=E.length,P=a.viewBounds;if(!(M===0||P&&!d(P,l.worldView))){a.sortCallback&&a.depthSort(),l.addToRenderList(a),v.copyFrom(l.matrix),v.multiplyWithOffset(x,-l.scrollX*a.scrollFactorX,-l.scrollY*a.scrollFactorY),i.setBlendMode(a.blendMode),a.mask&&(a.mask.preRenderWebGL(i,a,l),i.pipelines.set(a.pipeline));for(var A=a.tintFill,R,F,w=0;w<M;w++){var B=E[w],N=B.alpha*C*T;if(!(N<=0||B.scaleX===0||B.scaleY===0)){g.applyITRS(B.x,B.y,B.rotation,B.scaleX,B.scaleY),g.e=B.x,g.f=B.y,v.multiply(g,m);var U=B.frame;U.glTexture!==F&&(F=U.glTexture,R=f.setGameObject(a,U));var D=-U.halfWidth,I=-U.halfHeight,O=m.setQuad(D,I,D+U.width,I+U.height),L=y(B.tint,N);f.shouldFlush(6)&&(f.flush(),R=f.setGameObject(a,U)),f.batchQuad(a,O[0],O[1],O[2],O[3],O[4],O[5],O[6],O[7],U.u0,U.v0,U.u1,U.v1,L,L,L,L,A,F,R)}}a.mask&&a.mask.postRenderWebGL(i,l),i.pipelines.postBatch(a)}};p.exports=o},20286:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n,e){r===void 0&&(r=0),n===void 0&&(n=0),e===void 0&&(e=!0),this.emitter,this.x=r,this.y=n,this.active=e},update:function(){},destroy:function(){this.emitter=null}});p.exports=c},9774:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="complete"},812:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="deathzone"},30522:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="explode"},96695:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="start"},18677:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="stop"},20696:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={COMPLETE:t(9774),DEATH_ZONE:t(812),EXPLODE:t(30522),START:t(96695),STOP:t(18677)}},18404:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={EmitterColorOp:t(76472),EmitterOp:t(44777),Events:t(20696),GravityWell:t(24502),Particle:t(56480),ParticleBounds:t(69601),ParticleEmitter:t(31600),ParticleProcessor:t(20286),Zones:t(21024)}},26388:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n){this.source=r,this.killOnEnter=n},willKill:function(h){var r=this.source.contains(h.x,h.y);return r&&this.killOnEnter||!r&&!this.killOnEnter}});p.exports=c},19909:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n,e,s,o,i){s===void 0&&(s=!1),o===void 0&&(o=!0),i===void 0&&(i=-1),this.source=r,this.points=[],this.quantity=n,this.stepRate=e,this.yoyo=s,this.counter=-1,this.seamless=o,this._length=0,this._direction=0,this.total=i,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var h=this.points[0],r=this.points[this.points.length-1];h.x===r.x&&h.y===r.y&&this.points.pop()}var n=this._length;return this._length=this.points.length,this._length<n&&this.counter>this._length&&(this.counter=this._length-1),this},changeSource:function(h){return this.source=h,this.updateSource()},getPoint:function(h){this._direction===0?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,this.counter===-1&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var r=this.points[this.counter];r&&(h.x=r.x,h.y=r.y)}});p.exports=c},68875:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(26099),h=new d({initialize:function(n){this.source=n,this._tempVec=new c,this.total=-1},getPoint:function(r){var n=this._tempVec;this.source.getRandomPoint(n),r.x=n.x,r.y=n.y}});p.exports=h},21024:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={DeathZone:t(26388),EdgeZone:t(19909),RandomZone:t(68875)}},1159:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(31401),h=t(68287),r=new d({Extends:h,Mixins:[c.PathFollower],initialize:function(e,s,o,i,a,l){h.call(this,e,o,i,a,l),this.path=s},preUpdate:function(n,e){this.anims.update(n,e),this.pathUpdate(n)}});p.exports=r},90145:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39429),c=t(1159);d.register("follower",function(h,r,n,e,s){var o=new c(this.scene,h,r,n,e,s);return this.displayList.add(o),this.updateList.add(o),o})},33663:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(9674),c=t(83419),h=t(48803),r=t(90664),n=t(4703),e=t(45650),s=new c({Extends:n,initialize:function(i,a,l,u,f,v,m,g){u||(u="__DEFAULT"),n.call(this,i,a,l,u,f),this.type="Plane",this.anims=new d(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(v,m,g),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(o,i,a){o===void 0&&(o=8),i===void 0&&(i=8),a===void 0&&(a=!1);var l=!1;return a&&(l=!0),this.gridWidth=o,this.gridHeight=i,this.isTiled=a,this.clear(),h({mesh:this,widthSegments:o,heightSegments:i,isOrtho:!1,tile:a,flipY:l}),this},setSizeToFrame:function(o){o===void 0&&(o=!0);var i=this.frame;if(this.setPerspective(this.width/i.width,this.height/i.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!o)return this;var a=this.gridWidth,l=this.gridHeight,u=this.vertices,f=i.u0,v=i.u1,m=i.v0,g=i.v1,x,y,T=0;if(this.isTiled)for(m=i.v1,g=i.v0,y=0;y<l;y++)for(x=0;x<a;x++)u[T++].setUVs(f,g),u[T++].setUVs(f,m),u[T++].setUVs(v,g),u[T++].setUVs(f,m),u[T++].setUVs(v,m),u[T++].setUVs(v,g);else{var C=a+1,E=l+1,M=v-f,P=g-m,A=[];for(y=0;y<E;y++)for(x=0;x<C;x++){var R=f+M*(x/a),F=m+P*(y/l);A.push(R,F)}for(y=0;y<l;y++)for(x=0;x<a;x++){var w=(x+C*y)*2,B=(x+C*(y+1))*2,N=(x+1+C*(y+1))*2,U=(x+1+C*y)*2;u[T++].setUVs(A[w],A[w+1]),u[T++].setUVs(A[B],A[B+1]),u[T++].setUVs(A[U],A[U+1]),u[T++].setUVs(A[B],A[B+1]),u[T++].setUVs(A[N],A[N+1]),u[T++].setUVs(A[U],A[U+1])}}return this},setViewHeight:function(o){o===void 0&&(o=this.frame.height);var i=this.fov*(Math.PI/180);this.viewPosition.z=this.height/o/Math.tan(i/2),this.dirtyCache[10]=1},createCheckerboard:function(o,i,a,l,u){o===void 0&&(o=16777215),i===void 0&&(i=255),a===void 0&&(a=255),l===void 0&&(l=255),u===void 0&&(u=128);for(var f=r(o),v=r(i),m=[],g=0;g<16;g++)for(var x=0;x<16;x++)g<8&&x<8||g>7&&x>7?m.push(f.r,f.g,f.b,a):m.push(v.r,v.g,v.b,l);var y=this.scene.sys.textures.addUint8Array(e(),new Uint8Array(m),16,16);return this.removeCheckerboard(),this.setTexture(y),this.setSizeToFrame(),this.setViewHeight(u),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(o,i){return this.anims.play(o,i)},playReverse:function(o,i){return this.anims.playReverse(o,i)},playAfterDelay:function(o,i){return this.anims.playAfterDelay(o,i)},playAfterRepeat:function(o,i){return this.anims.playAfterRepeat(o,i)},stop:function(){return this.anims.stop()},stopAfterDelay:function(o){return this.anims.stopAfterDelay(o)},stopAfterRepeat:function(o){return this.anims.stopAfterRepeat(o)},stopOnFrame:function(o){return this.anims.stopOnFrame(o)},preUpdate:function(o,i){n.prototype.preUpdate.call(this,o,i),this.anims.update(o,i)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});p.exports=s},56015:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(13059),h=t(44603),r=t(23568),n=t(35154),e=t(33663);h.register("plane",function(s,o){s===void 0&&(s={});var i=r(s,"key",null),a=r(s,"frame",null),l=n(s,"width",8),u=n(s,"height",8),f=n(s,"tile",!1),v=new e(this.scene,0,0,i,a,l,u,f);o!==void 0&&(s.add=o);var m=n(s,"checkerboard",null);if(m){var g=n(m,"color1",16777215),x=n(m,"color2",255),y=n(m,"alpha1",255),T=n(m,"alpha2",255),C=n(m,"height",128);v.createCheckerboard(g,x,y,T,C)}return d(this.scene,v,s),c(v,s),v})},30985:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(33663),c=t(39429);c.register("plane",function(h,r,n,e,s,o,i){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i))})},80321:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(31401),h=t(95643),r=t(30100),n=t(36060),e=t(67277),s=new d({Extends:h,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Transform,c.Visible,e],initialize:function(i,a,l,u,f,v,m){u===void 0&&(u=16777215),f===void 0&&(f=128),v===void 0&&(v=1),m===void 0&&(m=.1),h.call(this,i,"PointLight"),this.initPipeline(n.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(a,l),this.color=r(u),this.intensity=v,this.attenuation=m,this.width=f*2,this.height=f*2,this._radius=f},radius:{get:function(){return this._radius},set:function(o){this._radius=o,this.width=o*2,this.height=o*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});p.exports=s},39829:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(44603),h=t(23568),r=t(80321);c.register("pointlight",function(n,e){n===void 0&&(n={});var s=h(n,"color",16777215),o=h(n,"radius",128),i=h(n,"intensity",1),a=h(n,"attenuation",.1),l=new r(this.scene,0,0,s,o,i,a);return e!==void 0&&(n.add=e),d(this.scene,l,n),l})},71255:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39429),c=t(80321);d.register("pointlight",function(h,r,n,e,s,o){return this.displayList.add(new c(this.scene,h,r,n,e,s,o))})},67277:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(57787),p.exports={renderWebGL:c,renderCanvas:h}},57787:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=function(h,r,n,e){n.addToRenderList(r);var s=h.pipelines.set(r.pipeline),o=d(r,n,e).calc,i=r.width,a=r.height,l=-r._radius,u=-r._radius,f=l+i,v=u+a,m=o.getX(0,0),g=o.getY(0,0),x=o.getX(l,u),y=o.getY(l,u),T=o.getX(l,v),C=o.getY(l,v),E=o.getX(f,v),M=o.getY(f,v),P=o.getX(f,u),A=o.getY(f,u);h.pipelines.preBatch(r),s.batchPointLight(r,n,x,y,T,C,E,M,P,A,m,g),h.pipelines.postBatch(r)};p.exports=c},591:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(81320),h=t(88571),r=new d({Extends:h,initialize:function(e,s,o,i,a){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=32),a===void 0&&(a=32);var l=new c(e.sys.textures,"",i,a);h.call(this,e,s,o,l),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(n,e){this.width=n,this.height=e,this.texture.setSize(n,e),this.updateDisplayOrigin();var s=this.input;return s&&!s.customHitArea&&(s.hitArea.width=n,s.hitArea.height=e),this},resize:function(n,e){return this.setSize(n,e),this},saveTexture:function(n){var e=this.texture;return e.key=n,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(n,e,s,o,i,a){return this.texture.fill(n,e,s,o,i,a),this},clear:function(){return this.texture.clear(),this},stamp:function(n,e,s,o,i){return this.texture.stamp(n,e,s,o,i),this},erase:function(n,e,s){return this.texture.erase(n,e,s),this},draw:function(n,e,s,o,i){return this.texture.draw(n,e,s,o,i),this},drawFrame:function(n,e,s,o,i,a){return this.texture.drawFrame(n,e,s,o,i,a),this},repeat:function(n,e,s,o,i,a,l,u,f){return this.texture.repeat(n,e,s,o,i,a,l,u,f),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(n,e,s,o,i){return this.texture.batchDraw(n,e,s,o,i),this},batchDrawFrame:function(n,e,s,o,i,a){return this.texture.batchDrawFrame(n,e,s,o,i,a),this},endDraw:function(n){return this.texture.endDraw(n),this},snapshotArea:function(n,e,s,o,i,a,l){return this.texture.snapshotArea(n,e,s,o,i,a,l),this},snapshot:function(n,e,s){return this.snapshotArea(0,0,this.width,this.height,n,e,s)},snapshotPixel:function(n,e,s){return this.snapshotArea(n,e,1,1,s,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});p.exports=r},34495:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(44603),h=t(23568),r=t(591);c.register("renderTexture",function(n,e){n===void 0&&(n={});var s=h(n,"x",0),o=h(n,"y",0),i=h(n,"width",32),a=h(n,"height",32),l=new r(this.scene,s,o,i,a);return e!==void 0&&(n.add=e),d(this.scene,l,n),l})},60505:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39429),c=t(591);d.register("renderTexture",function(h,r,n,e){return this.displayList.add(new c(this.scene,h,r,n,e))})},77757:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(9674),c=t(83419),h=t(31401),r=t(95643),n=t(36060),e=t(38745),s=t(26099),o=new c({Extends:r,Mixins:[h.AlphaSingle,h.BlendMode,h.Depth,h.Flip,h.Mask,h.Pipeline,h.PostPipeline,h.Size,h.Texture,h.Transform,h.Visible,h.ScrollFactor,e],initialize:function(a,l,u,f,v,m,g,x,y){f===void 0&&(f="__DEFAULT"),m===void 0&&(m=2),g===void 0&&(g=!0),r.call(this,a,"Rope"),this.anims=new d(this),this.points=m,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=f==="__DEFAULT",this.dirty=!1,this.horizontal=g,this._flipX=!1,this._flipY=!1,this._perp=new s,this.debugCallback=null,this.debugGraphic=null,this.setTexture(f,v),this.setPosition(l,u),this.setSizeToFrame(),this.initPipeline(n.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(m)&&this.resizeArrays(m.length),this.setPoints(m,x,y),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(i,a){var l=this.anims.currentFrame;this.anims.update(i,a),this.anims.currentFrame!==l&&(this.updateUVs(),this.updateVertices())},play:function(i,a,l){return this.anims.play(i,a,l),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(i,a,l){return i===void 0&&(i=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(i,a,l))},setVertical:function(i,a,l){return i===void 0&&(i=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(i,a,l)):this},setTintFill:function(i){return i===void 0&&(i=!1),this.tintFill=i,this},setAlphas:function(i,a){var l=this.points.length;if(l<1)return this;var u=this.alphas;i===void 0?i=[1]:!Array.isArray(i)&&a===void 0&&(i=[i]);var f,v=0;if(a!==void 0)for(f=0;f<l;f++)v=f*2,u[v]=i,u[v+1]=a;else if(i.length===l)for(f=0;f<l;f++)v=f*2,u[v]=i[f],u[v+1]=i[f];else{var m=i[0];for(f=0;f<l;f++)v=f*2,i.length>v&&(m=i[v]),u[v]=m,i.length>v+1&&(m=i[v+1]),u[v+1]=m}return this},setColors:function(i){var a=this.points.length;if(a<1)return this;var l=this.colors;i===void 0?i=[16777215]:Array.isArray(i)||(i=[i]);var u,f=0;if(i.length===a)for(u=0;u<a;u++)f=u*2,l[f]=i[u],l[f+1]=i[u];else{var v=i[0];for(u=0;u<a;u++)f=u*2,i.length>f&&(v=i[f]),l[f]=v,i.length>f+1&&(v=i[f+1]),l[f+1]=v}return this},setPoints:function(i,a,l){if(i===void 0&&(i=2),typeof i=="number"){var u=i;u<2&&(u=2),i=[];var f,v,m;if(this.horizontal)for(m=-this.frame.halfWidth,v=this.frame.width/(u-1),f=0;f<u;f++)i.push({x:m+f*v,y:0});else for(m=-this.frame.halfHeight,v=this.frame.height/(u-1),f=0;f<u;f++)i.push({x:0,y:m+f*v})}var g=i.length,x=this.points.length;return g<1?(console.warn("Rope: Not enough points given"),this):(g===1&&(i.unshift({x:0,y:0}),g++),x!==g&&this.resizeArrays(g),this.dirty=!0,this.points=i,this.updateUVs(),a!=null&&this.setColors(a),l!=null&&this.setAlphas(l),this)},updateUVs:function(){for(var i=this.uv,a=this.points.length,l=this.frame.u0,u=this.frame.v0,f=this.frame.u1,v=this.frame.v1,m=(f-l)/(a-1),g=(v-u)/(a-1),x=0;x<a;x++){var y=x*4,T,C,E,M;this.horizontal?(this._flipX?(T=f-x*m,E=f-x*m):(T=l+x*m,E=l+x*m),this._flipY?(C=v,M=u):(C=u,M=v)):(this._flipX?(T=l,E=f):(T=f,E=l),this._flipY?(C=v-x*g,M=v-x*g):(C=u+x*g,M=u+x*g)),i[y+0]=T,i[y+1]=C,i[y+2]=E,i[y+3]=M}return this},resizeArrays:function(i){var a=this.colors,l=this.alphas;this.vertices=new Float32Array(i*4),this.uv=new Float32Array(i*4),a=new Uint32Array(i*2),l=new Float32Array(i*2);for(var u=0;u<i*2;u++)a[u]=16777215,l[u]=1;return this.colors=a,this.alphas=l,this.dirty=!0,this},updateVertices:function(){var i=this._perp,a=this.points,l=this.vertices,u=a.length;if(this.dirty=!1,!(u<1)){for(var f,v=a[0],m=this.horizontal?this.frame.halfHeight:this.frame.halfWidth,g=0;g<u;g++){var x=a[g],y=g*4;g<u-1?f=a[g+1]:f=x,i.x=f.y-v.y,i.y=-(f.x-v.x);var T=i.length();i.x/=T,i.y/=T,i.x*=m,i.y*=m,l[y]=x.x+i.x,l[y+1]=x.y+i.y,l[y+2]=x.x-i.x,l[y+3]=x.y-i.y,v=x}return this}},setDebug:function(i,a){return this.debugGraphic=i,!i&&!a?this.debugCallback=null:a?this.debugCallback=a:this.debugCallback=this.renderDebugVerts,this},renderDebugVerts:function(i,a,l){var u=i.debugGraphic,f=l[0],v=l[1],m=l[2],g=l[3];u.lineBetween(f,v,m,g);for(var x=4;x<a;x+=4){var y=l[x+0],T=l[x+1],C=l[x+2],E=l[x+3];u.lineBetween(f,v,y,T),u.lineBetween(m,g,C,E),u.lineBetween(m,g,y,T),u.lineBetween(y,T,C,E),f=y,v=T,m=C,g=E}},preDestroy:function(){this.anims.destroy(),this.anims=void 0,this.points=null,this.vertices=null,this.uv=null,this.colors=null,this.alphas=null,this.debugCallback=null,this.debugGraphic=null},flipX:{get:function(){return this._flipX},set:function(i){return this._flipX=i,this.updateUVs()}},flipY:{get:function(){return this._flipY},set:function(i){return this._flipY=i,this.updateUVs()}}});p.exports=o},95262:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(){};p.exports=S},26209:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(44603),h=t(23568),r=t(35154),n=t(77757);c.register("rope",function(e,s){e===void 0&&(e={});var o=h(e,"key",null),i=h(e,"frame",null),a=h(e,"horizontal",!0),l=r(e,"points",void 0),u=r(e,"colors",void 0),f=r(e,"alphas",void 0),v=new n(this.scene,0,0,o,i,l,a,u,f);return s!==void 0&&(e.add=s),d(this.scene,v,e),v})},96819:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(77757),c=t(39429);c.register("rope",function(h,r,n,e,s,o,i,a){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i,a))})},38745:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(20439),h=t(95262),p.exports={renderWebGL:c,renderCanvas:h}},20439:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline,n),i=d(n,e,s).calc,a=n.vertices,l=n.uv,u=n.colors,f=n.alphas,v=n.alpha,m=c.getTintAppendFloatAlpha,g=e.roundPixels,x=a.length,y=Math.floor(x*.5);o.flush(),r.pipelines.preBatch(n);var T=o.setGameObject(n),C=o.vertexViewF32,E=o.vertexViewU32,M=o.vertexCount*o.currentShader.vertexComponentCount-1,P=0,A=n.tintFill;n.dirty&&n.updateVertices();for(var R=n.debugCallback,F=[],w=0;w<x;w+=2){var B=a[w+0],N=a[w+1],U=B*i.a+N*i.c+i.e,D=B*i.b+N*i.d+i.f;g&&(U=Math.round(U),D=Math.round(D)),C[++M]=U,C[++M]=D,C[++M]=l[w+0],C[++M]=l[w+1],C[++M]=T,C[++M]=A,E[++M]=m(u[P],e.alpha*(f[P]*v)),P++,R&&(F[w+0]=U,F[w+1]=D)}R&&R.call(n,n,x,F),o.vertexCount+=y,o.currentBatch.count=o.vertexCount-o.currentBatch.start,r.pipelines.postBatch(n)};p.exports=h},20071:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(31401),h=t(95643),r=t(95540),n=t(79291),e=t(61622),s=t(25479),o=t(61340),i=t(95428),a=t(92503),l=new d({Extends:h,Mixins:[c.ComputedSize,c.Depth,c.GetBounds,c.Mask,c.Origin,c.ScrollFactor,c.Transform,c.Visible,s],initialize:function(f,v,m,g,x,y,T,C){m===void 0&&(m=0),g===void 0&&(g=0),x===void 0&&(x=128),y===void 0&&(y=128),h.call(this,f,"Shader"),this.blendMode=-1,this.shader;var E=f.sys.renderer;this.renderer=E,this.gl=E.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=E.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this._deferSetShader=null,this._deferProjOrtho=null,this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new o,this._tempMatrix2=new o,this._tempMatrix3=new o,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=E.width,this._rendererHeight=E.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(m,g),this.setSize(x,y),this.setOrigin(.5,.5),this.setShader(v,T,C),this.renderer.on(a.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(u){return this.renderToTexture?!0:!(h.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&u.id)},setRenderToTexture:function(u,f){if(!this.renderToTexture){var v=this.width,m=this.height,g=this.renderer;this.glTexture=g.createTextureFromSource(null,v,m,0),this.framebuffer=g.createFramebuffer(v,m,this.glTexture,!1),this._rendererWidth=v,this._rendererHeight=m,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),u&&(this.texture=this.scene.sys.textures.addGLTexture(u,this.glTexture))}return this.shader&&(g.pipelines.clear(),this.load(),this.flush(),g.pipelines.rebind()),this},setShader:function(u,f,v){if(this.renderer.contextLost)return this._deferSetShader={key:u,textures:f,textureData:v},this;if(f===void 0&&(f=[]),typeof u=="string"){var m=this.scene.sys.cache.shader;if(!m.has(u))return console.warn("Shader missing: "+u),this;this.shader=m.get(u)}else this.shader=u;var g=this.gl,x=this.renderer;this.program&&x.deleteProgram(this.program);var y=x.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);g.uniformMatrix4fv(g.getUniformLocation(y.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),g.uniformMatrix4fv(g.getUniformLocation(y.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),g.uniform2f(g.getUniformLocation(y.webGLProgram,"uResolution"),this.width,this.height),this.program=y;var T=new Date,C={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[T.getFullYear(),T.getMonth(),T.getDate(),T.getHours()*60*60+T.getMinutes()*60+T.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=n(!0,{},this.shader.uniforms,C):this.uniforms=C;for(var E=0;E<4;E++)f[E]&&this.setSampler2D("iChannel"+E,f[E],E,v);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(u){return this.pointer=u,this},projOrtho:function(u,f,v,m){if(this.renderer.contextLost){this._deferProjOrtho={left:u,right:f,bottom:v,top:m};return}var g=-1e3,x=1e3,y=1/(u-f),T=1/(v-m),C=1/(g-x),E=this.projectionMatrix;E[0]=-2*y,E[5]=-2*T,E[10]=2*C,E[12]=(u+f)*y,E[13]=(m+v)*T,E[14]=(x+g)*C;var M=this.program,P=this.gl,A=this.renderer;A.setProgram(M),P.uniformMatrix4fv(P.getUniformLocation(M.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=f,this._rendererHeight=v},initUniforms:function(){var u=this.renderer.glFuncMap,f=this.program;this._textureCount=0;for(var v in this.uniforms){var m=this.uniforms[v],g=m.type,x=u[g];m.uniformLocation=this.renderer.createUniformLocation(f,v),g!=="sampler2D"&&(m.glMatrix=x.matrix,m.glValueLength=x.length,m.glFunc=x.func)}},setSampler2DBuffer:function(u,f,v,m,g,x){g===void 0&&(g=0),x===void 0&&(x={});var y=this.uniforms[u];return y.value=f,x.width=v,x.height=m,y.textureData=x,this._textureCount=g,this.initSampler2D(y),this},setSampler2D:function(u,f,v,m){v===void 0&&(v=0);var g=this.scene.sys.textures;if(g.exists(f)){var x=g.getFrame(f);if(x.glTexture&&x.glTexture.isRenderTexture)return this.setSampler2DBuffer(u,x.glTexture,x.width,x.height,v,m);var y=this.uniforms[u],T=x.source;y.textureKey=f,y.source=T.image,y.value=x.glTexture,T.isGLTexture&&(m||(m={}),m.width=T.width,m.height=T.height),m&&(y.textureData=m),this._textureCount=v,this.initSampler2D(y)}return this},setUniform:function(u,f){return e(this.uniforms,u,f),this},getUniform:function(u){return r(this.uniforms,u,null)},setChannel0:function(u,f){return this.setSampler2D("iChannel0",u,0,f)},setChannel1:function(u,f){return this.setSampler2D("iChannel1",u,1,f)},setChannel2:function(u,f){return this.setSampler2D("iChannel2",u,2,f)},setChannel3:function(u,f){return this.setSampler2D("iChannel3",u,3,f)},initSampler2D:function(u){if(u.value){var f=u.textureData;if(f&&!u.value.isRenderTexture){var v=this.gl,m=u.value,g=v[r(f,"magFilter","linear").toUpperCase()],x=v[r(f,"minFilter","linear").toUpperCase()],y=v[r(f,"wrapS","repeat").toUpperCase()],T=v[r(f,"wrapT","repeat").toUpperCase()],C=v[r(f,"format","rgba").toUpperCase()],E=r(f,"flipY",!1),M=r(f,"width",m.width),P=r(f,"height",m.height),A=r(f,"source",m.pixels);f.repeat&&(y=v.REPEAT,T=v.REPEAT),f.width&&(A=null),m.update(A,M,P,E,y,T,x,g,C)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var u=this.gl,f=this.uniforms,v,m,g,x,y,T=0;for(var C in f)v=f[C],g=v.glFunc,m=v.glValueLength,x=v.uniformLocation,y=v.value,y!==null&&(m===1?v.glMatrix?g.call(u,x.webGLUniformLocation,v.transpose,y):g.call(u,x.webGLUniformLocation,y):m===2?g.call(u,x.webGLUniformLocation,y.x,y.y):m===3?g.call(u,x.webGLUniformLocation,y.x,y.y,y.z):m===4?g.call(u,x.webGLUniformLocation,y.x,y.y,y.z,y.w):v.type==="sampler2D"&&(u.activeTexture(u.TEXTURE0+T),u.bindTexture(u.TEXTURE_2D,y.webGLTexture),u.uniform1i(x.webGLUniformLocation,T),T++))},load:function(u){var f=this.gl,v=this.width,m=this.height,g=this.renderer,x=this.program,y=this.viewMatrix;if(!this.renderToTexture){var T=-this._displayOriginX,C=-this._displayOriginY;y[0]=u[0],y[1]=u[1],y[4]=u[2],y[5]=u[3],y[8]=u[4],y[9]=u[5],y[12]=y[0]*T+y[4]*C,y[13]=y[1]*T+y[5]*C}f.useProgram(x.webGLProgram),f.uniformMatrix4fv(f.getUniformLocation(x.webGLProgram,"uViewMatrix"),!1,y),f.uniformMatrix4fv(f.getUniformLocation(x.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),f.uniform2f(f.getUniformLocation(x.webGLProgram,"uResolution"),this.width,this.height);var E=this.uniforms,M=E.resolution;M.value.x=v,M.value.y=m,E.time.value=g.game.loop.getDuration();var P=this.pointer;if(P){var A=E.mouse,R=P.x/v,F=1-P.y/m;A.value.x=R.toFixed(2),A.value.y=F.toFixed(2)}this.syncUniforms()},flush:function(){var u=this.width,f=this.height,v=this.program,m=this.gl,g=this.vertexBuffer,x=this.renderer,y=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(x.setFramebuffer(this.framebuffer),m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT)),m.bindBuffer(m.ARRAY_BUFFER,g.webGLBuffer);var T=m.getAttribLocation(v.webGLProgram,"inPosition");T!==-1&&(m.enableVertexAttribArray(T),m.vertexAttribPointer(T,2,m.FLOAT,!1,y,0));var C=this.vertexViewF32;C[3]=f,C[4]=u,C[5]=f,C[8]=u,C[9]=f,C[10]=u;var E=6;m.bufferSubData(m.ARRAY_BUFFER,0,this.bytes.subarray(0,E*y)),m.drawArrays(m.TRIANGLES,0,E),this.renderToTexture&&x.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(this._deferSetShader!==null){var u=this._deferSetShader.key,f=this._deferSetShader.textures,v=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(u,f,v)}if(this._deferProjOrtho!==null){var m=this._deferProjOrtho.left,g=this._deferProjOrtho.right,x=this._deferProjOrtho.bottom,y=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(m,g,x,y)}},preDestroy:function(){var u=this.renderer;u.off(a.RESTORE_WEBGL,this.onContextRestored,this),u.deleteProgram(this.program),u.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(u.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),i(this.uniforms,function(f){u.deleteUniformLocation(f.uniformLocation),f.uniformLocation=null})}});p.exports=l},80464:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(){};p.exports=S},54935:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(44603),h=t(23568),r=t(20071);c.register("shader",function(n,e){n===void 0&&(n={});var s=h(n,"key",null),o=h(n,"x",0),i=h(n,"y",0),a=h(n,"width",128),l=h(n,"height",128),u=new r(this.scene,s,o,i,a,l);return e!==void 0&&(n.add=e),d(this.scene,u,n),u})},74177:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(20071),c=t(39429);c.register("shader",function(h,r,n,e,s,o,i){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i))})},25479:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(19257),h=t(80464),p.exports={renderWebGL:c,renderCanvas:h}},19257:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=function(h,r,n,e){if(r.shader){if(n.addToRenderList(r),h.pipelines.clear(),r.renderToTexture)r.load(),r.flush();else{var s=d(r,n,e).calc;(h.width!==r._rendererWidth||h.height!==r._rendererHeight)&&r.projOrtho(0,h.width,h.height,0),r.load(s.matrix),r.flush()}h.pipelines.rebind()}};p.exports=c},10441:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(70554),c=function(h,r,n,e,s,o){for(var i=d.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*e),a=n.pathData,l=n.pathIndexes,u=0;u<l.length;u+=3){var f=l[u]*2,v=l[u+1]*2,m=l[u+2]*2,g=a[f+0]-s,x=a[f+1]-o,y=a[v+0]-s,T=a[v+1]-o,C=a[m+0]-s,E=a[m+1]-o,M=r.getX(g,x),P=r.getY(g,x),A=r.getX(y,T),R=r.getY(y,T),F=r.getX(C,E),w=r.getY(C,E);h.batchTri(n,M,P,A,R,F,w,0,0,1,1,i,i,i,2)}};p.exports=c},65960:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){var r=c||d.fillColor,n=h||d.fillAlpha,e=(r&16711680)>>>16,s=(r&65280)>>>8,o=r&255;t.fillStyle="rgba("+e+","+s+","+o+","+n+")"};p.exports=S},75177:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){var r=c||d.strokeColor,n=h||d.strokeAlpha,e=(r&16711680)>>>16,s=(r&65280)>>>8,o=r&255;t.strokeStyle="rgba("+e+","+s+","+o+","+n+")",t.lineWidth=d.lineWidth};p.exports=S},17803:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(31401),h=t(95643),r=t(23031),n=new d({Extends:h,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Transform,c.Visible],initialize:function(s,o,i){o===void 0&&(o="Shape"),h.call(this,s,o),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new r,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(e,s){return s===void 0&&(s=1),e===void 0?this.isFilled=!1:(this.fillColor=e,this.fillAlpha=s,this.isFilled=!0),this},setStrokeStyle:function(e,s,o){return o===void 0&&(o=1),e===void 0?this.isStroked=!1:(this.lineWidth=e,this.strokeColor=s,this.strokeAlpha=o,this.isStroked=!0),this},setClosePath:function(e){return this.closePath=e,this},setSize:function(e,s){return this.width=e,this.height=s,this},setDisplaySize:function(e,s){return this.displayWidth=e,this.displayHeight=s,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(e){this.scaleX=e/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(e){this.scaleY=e/this.height}}});p.exports=n},34682:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(70554),c=function(h,r,n,e,s){var o=h.strokeTint,i=d.getTintAppendFloatAlpha(r.strokeColor,r.strokeAlpha*n);o.TL=i,o.TR=i,o.BL=i,o.BR=i;var a=r.pathData,l=a.length-1,u=r.lineWidth,f=u/2,v=a[0]-e,m=a[1]-s;r.closePath||(l-=2);for(var g=2;g<l;g+=2){var x=a[g]-e,y=a[g+1]-s;h.batchLine(v,m,x,y,f,f,u,g-2,r.closePath?g===l-1:!1),v=x,m=y}};p.exports=c},23629:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(13609),c=t(83419),h=t(39506),r=t(94811),n=t(96503),e=t(36383),s=t(17803),o=new c({Extends:s,Mixins:[d],initialize:function(a,l,u,f,v,m,g,x,y){l===void 0&&(l=0),u===void 0&&(u=0),f===void 0&&(f=128),v===void 0&&(v=0),m===void 0&&(m=360),g===void 0&&(g=!1),s.call(this,a,"Arc",new n(0,0,f)),this._startAngle=v,this._endAngle=m,this._anticlockwise=g,this._iterations=.01,this.setPosition(l,u);var T=this.geom.radius*2;this.setSize(T,T),x!==void 0&&this.setFillStyle(x,y),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(i){this._iterations=i,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(i){this.geom.radius=i;var a=i*2;this.setSize(a,a),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(i){this._startAngle=i,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(i){this._endAngle=i,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(i){this._anticlockwise=i,this.updateData()}},setRadius:function(i){return this.radius=i,this},setIterations:function(i){return i===void 0&&(i=.01),this.iterations=i,this},setStartAngle:function(i,a){return this._startAngle=i,a!==void 0&&(this._anticlockwise=a),this.updateData()},setEndAngle:function(i,a){return this._endAngle=i,a!==void 0&&(this._anticlockwise=a),this.updateData()},updateData:function(){var i=this._iterations,a=i,l=this.geom.radius,u=h(this._startAngle),f=h(this._endAngle),v=this._anticlockwise,m=l,g=l;f-=u,v?f<-e.PI2?f=-e.PI2:f>0&&(f=-e.PI2+f%e.PI2):f>e.PI2?f=e.PI2:f<0&&(f=e.PI2+f%e.PI2);for(var x=[m+Math.cos(u)*l,g+Math.sin(u)*l],y;a<1;)y=f*a+u,x.push(m+Math.cos(y)*l,g+Math.sin(y)*l),a+=i;return y=f+u,x.push(m+Math.cos(y)*l,g+Math.sin(y)*l),x.push(m+Math.cos(u)*l,g+Math.sin(u)*l),this.pathIndexes=r(x),this.pathData=x,this}});p.exports=o},42542:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39506),c=t(65960),h=t(75177),r=t(20926),n=function(e,s,o,i){o.addToRenderList(s);var a=e.currentContext;if(r(e,a,s,o,i)){var l=s.radius;a.beginPath(),a.arc(l-s.originX*(l*2),l-s.originY*(l*2),l,d(s._startAngle),d(s._endAngle),s.anticlockwise),s.closePath&&a.closePath(),s.isFilled&&(c(a,s),a.fill()),s.isStroked&&(h(a,s),a.stroke()),a.restore()}};p.exports=n},42563:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(23629),c=t(39429);c.register("arc",function(h,r,n,e,s,o,i,a){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i,a))}),c.register("circle",function(h,r,n,e,s){return this.displayList.add(new d(this.scene,h,r,n,0,360,!1,e,s))})},13609:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(41447),h=t(42542),p.exports={renderWebGL:c,renderCanvas:h}},41447:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=t(10441),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=d(e,s,o),l=i.calcMatrix.copyFrom(a.calc),u=e._displayOriginX,f=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&c(i,l,e,v,u,f),e.isStroked&&h(i,e,v,u,f),n.pipelines.postBatch(e)};p.exports=r},89:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(33141),h=t(94811),r=t(87841),n=t(17803),e=new d({Extends:n,Mixins:[c],initialize:function(o,i,a,l,u,f){i===void 0&&(i=0),a===void 0&&(a=0),n.call(this,o,"Curve",l),this._smoothness=32,this._curveBounds=new r,this.closePath=!1,this.setPosition(i,a),u!==void 0&&this.setFillStyle(u,f),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(s){this._smoothness=s,this.updateData()}},setSmoothness:function(s){return this._smoothness=s,this.updateData()},updateData:function(){var s=this._curveBounds,o=this._smoothness;this.geom.getBounds(s,o),this.setSize(s.width,s.height),this.updateDisplayOrigin();for(var i=[],a=this.geom.getPoints(o),l=0;l<a.length;l++)i.push(a[l].x,a[l].y);return i.push(a[0].x,a[0].y),this.pathIndexes=h(i),this.pathData=i,this}});p.exports=e},3170:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX+e._curveBounds.x,l=e._displayOriginY+e._curveBounds.y,u=e.pathData,f=u.length-1,v=u[0]-a,m=u[1]-l;i.beginPath(),i.moveTo(v,m),e.closePath||(f-=2);for(var g=2;g<f;g+=2){var x=u[g]-a,y=u[g+1]-l;i.lineTo(x,y)}e.closePath&&i.closePath(),e.isFilled&&(d(i,e),i.fill()),e.isStroked&&(c(i,e),i.stroke()),i.restore()}};p.exports=r},40511:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39429),c=t(89);d.register("curve",function(h,r,n,e,s){return this.displayList.add(new c(this.scene,h,r,n,e,s))})},33141:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(53987),h=t(3170),p.exports={renderWebGL:c,renderCanvas:h}},53987:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(10441),c=t(91296),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,o),l=i.calcMatrix.copyFrom(a.calc),u=e._displayOriginX+e._curveBounds.x,f=e._displayOriginY+e._curveBounds.y,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,l,e,v,u,f),e.isStroked&&h(i,e,v,u,f),n.pipelines.postBatch(e)};p.exports=r},19921:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(94811),h=t(54205),r=t(8497),n=t(17803),e=new d({Extends:n,Mixins:[h],initialize:function(o,i,a,l,u,f,v){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=128),u===void 0&&(u=128),n.call(this,o,"Ellipse",new r(l/2,u/2,l,u)),this._smoothness=64,this.setPosition(i,a),this.width=l,this.height=u,f!==void 0&&this.setFillStyle(f,v),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(s){this._smoothness=s,this.updateData()}},setSize:function(s,o){return this.width=s,this.height=o,this.geom.setPosition(s/2,o/2),this.geom.setSize(s,o),this.updateDisplayOrigin(),this.updateData()},setSmoothness:function(s){return this._smoothness=s,this.updateData()},updateData:function(){for(var s=[],o=this.geom.getPoints(this._smoothness),i=0;i<o.length;i++)s.push(o[i].x,o[i].y);return s.push(o[0].x,o[0].y),this.pathIndexes=c(s),this.pathData=s,this}});p.exports=e},7930:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX,l=e._displayOriginY,u=e.pathData,f=u.length-1,v=u[0]-a,m=u[1]-l;i.beginPath(),i.moveTo(v,m),e.closePath||(f-=2);for(var g=2;g<f;g+=2){var x=u[g]-a,y=u[g+1]-l;i.lineTo(x,y)}i.closePath(),e.isFilled&&(d(i,e),i.fill()),e.isStroked&&(c(i,e),i.stroke()),i.restore()}};p.exports=r},1543:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(19921),c=t(39429);c.register("ellipse",function(h,r,n,e,s,o){return this.displayList.add(new d(this.scene,h,r,n,e,s,o))})},54205:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(19467),h=t(7930),p.exports={renderWebGL:c,renderCanvas:h}},19467:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(10441),c=t(91296),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,o),l=i.calcMatrix.copyFrom(a.calc),u=e._displayOriginX,f=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,l,e,v,u,f),e.isStroked&&h(i,e,v,u,f),n.pipelines.postBatch(e)};p.exports=r},30479:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(17803),h=t(26015),r=new d({Extends:c,Mixins:[h],initialize:function(e,s,o,i,a,l,u,f,v,m,g){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=128),a===void 0&&(a=128),l===void 0&&(l=32),u===void 0&&(u=32),c.call(this,e,"Grid",null),this.cellWidth=l,this.cellHeight=u,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(s,o),this.setSize(i,a),this.setFillStyle(f,v),m!==void 0&&this.setOutlineStyle(m,g),this.updateDisplayOrigin()},setFillStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showCells=!1:(this.fillColor=n,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showAltCells=!1:(this.altFillColor=n,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showOutline=!1:(this.outlineFillColor=n,this.outlineFillAlpha=e,this.showOutline=!0),this}});p.exports=r},49912:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=-e._displayOriginX,l=-e._displayOriginY,u=s.alpha*e.alpha,f=e.width,v=e.height,m=e.cellWidth,g=e.cellHeight,x=Math.ceil(f/m),y=Math.ceil(v/g),T=m,C=g,E=m-(x*m-f),M=g-(y*g-v),P=e.showCells,A=e.showAltCells,R=e.showOutline,F=0,w=0,B=0,N=0,U=0;if(R&&(T--,C--,E===m&&E--,M===g&&M--),P&&e.fillAlpha>0)for(d(i,e),w=0;w<y;w++)for(A&&(B=w%2),F=0;F<x;F++){if(A&&B){B=0;continue}B++,N=F<x-1?T:E,U=w<y-1?C:M,i.fillRect(a+F*m,l+w*g,N,U)}if(A&&e.altFillAlpha>0)for(d(i,e,e.altFillColor,e.altFillAlpha*u),w=0;w<y;w++)for(A&&(B=w%2),F=0;F<x;F++){if(A&&!B){B=1;continue}B=0,N=F<x-1?T:E,U=w<y-1?C:M,i.fillRect(a+F*m,l+w*g,N,U)}if(R&&e.outlineFillAlpha>0){for(c(i,e,e.outlineFillColor,e.outlineFillAlpha*u),F=1;F<x;F++){var D=F*m;i.beginPath(),i.moveTo(D+a,l),i.lineTo(D+a,v+l),i.stroke()}for(w=1;w<y;w++){var I=w*g;i.beginPath(),i.moveTo(a,I+l),i.lineTo(a+f,I+l),i.stroke()}}i.restore()}};p.exports=r},34137:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39429),c=t(30479);d.register("grid",function(h,r,n,e,s,o,i,a,l,u){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i,a,l,u))})},26015:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(46161),h=t(49912),p.exports={renderWebGL:c,renderCanvas:h}},46161:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline),i=d(n,e,s),a=o.calcMatrix.copyFrom(i.calc);a.translate(-n._displayOriginX,-n._displayOriginY);var l=e.alpha*n.alpha,u=n.width,f=n.height,v=n.cellWidth,m=n.cellHeight,g=Math.ceil(u/v),x=Math.ceil(f/m),y=v,T=m,C=v-(g*v-u),E=m-(x*m-f),M,P,A=n.showCells,R=n.showAltCells,F=n.showOutline,w=0,B=0,N=0,U=0,D=0;if(F&&(y--,T--,C===v&&C--,E===m&&E--),r.pipelines.preBatch(n),A&&n.fillAlpha>0)for(M=o.fillTint,P=c.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*l),M.TL=P,M.TR=P,M.BL=P,M.BR=P,B=0;B<x;B++)for(R&&(N=B%2),w=0;w<g;w++){if(R&&N){N=0;continue}N++,U=w<g-1?y:C,D=B<x-1?T:E,o.batchFillRect(w*v,B*m,U,D)}if(R&&n.altFillAlpha>0)for(M=o.fillTint,P=c.getTintAppendFloatAlpha(n.altFillColor,n.altFillAlpha*l),M.TL=P,M.TR=P,M.BL=P,M.BR=P,B=0;B<x;B++)for(R&&(N=B%2),w=0;w<g;w++){if(R&&!N){N=1;continue}N=0,U=w<g-1?y:C,D=B<x-1?T:E,o.batchFillRect(w*v,B*m,U,D)}if(F&&n.outlineFillAlpha>0){var I=o.strokeTint,O=c.getTintAppendFloatAlpha(n.outlineFillColor,n.outlineFillAlpha*l);for(I.TL=O,I.TR=O,I.BL=O,I.BR=O,w=1;w<g;w++){var L=w*v;o.batchLine(L,0,L,f,1,1,1,0,!1)}for(B=1;B<x;B++){var G=B*m;o.batchLine(0,G,u,G,1,1,1,0,!1)}}r.pipelines.postBatch(n)};p.exports=h},61475:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(99651),c=t(83419),h=t(17803),r=new c({Extends:h,Mixins:[d],initialize:function(e,s,o,i,a,l,u,f){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=48),a===void 0&&(a=32),l===void 0&&(l=15658734),u===void 0&&(u=10066329),f===void 0&&(f=13421772),h.call(this,e,"IsoBox",null),this.projection=4,this.fillTop=l,this.fillLeft=u,this.fillRight=f,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(s,o),this.setSize(i,a),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setFaces:function(n,e,s){return n===void 0&&(n=!0),e===void 0&&(e=!0),s===void 0&&(s=!0),this.showTop=n,this.showLeft=e,this.showRight=s,this},setFillStyle:function(n,e,s){return this.fillTop=n,this.fillLeft=e,this.fillRight=s,this.isFilled=!0,this}});p.exports=r},11508:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(65960),c=t(20926),h=function(r,n,e,s){e.addToRenderList(n);var o=r.currentContext;if(c(r,o,n,e,s)&&n.isFilled){var i=n.width,a=n.height,l=i/2,u=i/n.projection;n.showTop&&(d(o,n,n.fillTop),o.beginPath(),o.moveTo(-l,-a),o.lineTo(0,-u-a),o.lineTo(l,-a),o.lineTo(l,-1),o.lineTo(0,u-1),o.lineTo(-l,-1),o.lineTo(-l,-a),o.fill()),n.showLeft&&(d(o,n,n.fillLeft),o.beginPath(),o.moveTo(-l,0),o.lineTo(0,u),o.lineTo(0,u-a),o.lineTo(-l,-a),o.lineTo(-l,0),o.fill()),n.showRight&&(d(o,n,n.fillRight),o.beginPath(),o.moveTo(l,0),o.lineTo(0,u),o.lineTo(0,u-a),o.lineTo(l,-a),o.lineTo(l,0),o.fill()),o.restore()}};p.exports=h},3933:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39429),c=t(61475);d.register("isobox",function(h,r,n,e,s,o,i){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i))})},99651:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(68149),h=t(11508),p.exports={renderWebGL:c,renderCanvas:h}},68149:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline),i=d(n,e,s),a=o.calcMatrix.copyFrom(i.calc),l=n.width,u=n.height,f=l/2,v=l/n.projection,m=e.alpha*n.alpha;if(n.isFilled){var g,x,y,T,C,E,M,P,A;r.pipelines.preBatch(n),n.showTop&&(g=c.getTintAppendFloatAlpha(n.fillTop,m),x=a.getX(-f,-u),y=a.getY(-f,-u),T=a.getX(0,-v-u),C=a.getY(0,-v-u),E=a.getX(f,-u),M=a.getY(f,-u),P=a.getX(0,v-u),A=a.getY(0,v-u),o.batchQuad(n,x,y,T,C,E,M,P,A,0,0,1,1,g,g,g,g,2)),n.showLeft&&(g=c.getTintAppendFloatAlpha(n.fillLeft,m),x=a.getX(-f,0),y=a.getY(-f,0),T=a.getX(0,v),C=a.getY(0,v),E=a.getX(0,v-u),M=a.getY(0,v-u),P=a.getX(-f,-u),A=a.getY(-f,-u),o.batchQuad(n,x,y,T,C,E,M,P,A,0,0,1,1,g,g,g,g,2)),n.showRight&&(g=c.getTintAppendFloatAlpha(n.fillRight,m),x=a.getX(f,0),y=a.getY(f,0),T=a.getX(0,v),C=a.getY(0,v),E=a.getX(0,v-u),M=a.getY(0,v-u),P=a.getX(f,-u),A=a.getY(f,-u),o.batchQuad(n,x,y,T,C,E,M,P,A,0,0,1,1,g,g,g,g,2)),r.pipelines.postBatch(n)}};p.exports=h},16933:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(60561),h=t(17803),r=new d({Extends:h,Mixins:[c],initialize:function(e,s,o,i,a,l,u,f,v){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=48),a===void 0&&(a=32),l===void 0&&(l=!1),u===void 0&&(u=15658734),f===void 0&&(f=10066329),v===void 0&&(v=13421772),h.call(this,e,"IsoTriangle",null),this.projection=4,this.fillTop=u,this.fillLeft=f,this.fillRight=v,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=l,this.isFilled=!0,this.setPosition(s,o),this.setSize(i,a),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setReversed:function(n){return this.isReversed=n,this},setFaces:function(n,e,s){return n===void 0&&(n=!0),e===void 0&&(e=!0),s===void 0&&(s=!0),this.showTop=n,this.showLeft=e,this.showRight=s,this},setFillStyle:function(n,e,s){return this.fillTop=n,this.fillLeft=e,this.fillRight=s,this.isFilled=!0,this}});p.exports=r},79590:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(65960),c=t(20926),h=function(r,n,e,s){e.addToRenderList(n);var o=r.currentContext;if(c(r,o,n,e,s)&&n.isFilled){var i=n.width,a=n.height,l=i/2,u=i/n.projection,f=n.isReversed;n.showTop&&f&&(d(o,n,n.fillTop),o.beginPath(),o.moveTo(-l,-a),o.lineTo(0,-u-a),o.lineTo(l,-a),o.lineTo(0,u-a),o.fill()),n.showLeft&&(d(o,n,n.fillLeft),o.beginPath(),f?(o.moveTo(-l,-a),o.lineTo(0,u),o.lineTo(0,u-a)):(o.moveTo(-l,0),o.lineTo(0,u),o.lineTo(0,u-a)),o.fill()),n.showRight&&(d(o,n,n.fillRight),o.beginPath(),f?(o.moveTo(l,-a),o.lineTo(0,u),o.lineTo(0,u-a)):(o.moveTo(l,0),o.lineTo(0,u),o.lineTo(0,u-a)),o.fill()),o.restore()}};p.exports=h},49803:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39429),c=t(16933);d.register("isotriangle",function(h,r,n,e,s,o,i,a){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i,a))})},60561:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(51503),h=t(79590),p.exports={renderWebGL:c,renderCanvas:h}},51503:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline),i=d(n,e,s),a=o.calcMatrix.copyFrom(i.calc),l=n.width,u=n.height,f=l/2,v=l/n.projection,m=n.isReversed,g=e.alpha*n.alpha;if(n.isFilled){r.pipelines.preBatch(n);var x,y,T,C,E,M,P;if(n.showTop&&m){x=c.getTintAppendFloatAlpha(n.fillTop,g),y=a.getX(-f,-u),T=a.getY(-f,-u),C=a.getX(0,-v-u),E=a.getY(0,-v-u),M=a.getX(f,-u),P=a.getY(f,-u);var A=a.getX(0,v-u),R=a.getY(0,v-u);o.batchQuad(n,y,T,C,E,M,P,A,R,0,0,1,1,x,x,x,x,2)}n.showLeft&&(x=c.getTintAppendFloatAlpha(n.fillLeft,g),m?(y=a.getX(-f,-u),T=a.getY(-f,-u),C=a.getX(0,v),E=a.getY(0,v),M=a.getX(0,v-u),P=a.getY(0,v-u)):(y=a.getX(-f,0),T=a.getY(-f,0),C=a.getX(0,v),E=a.getY(0,v),M=a.getX(0,v-u),P=a.getY(0,v-u)),o.batchTri(n,y,T,C,E,M,P,0,0,1,1,x,x,x,2)),n.showRight&&(x=c.getTintAppendFloatAlpha(n.fillRight,g),m?(y=a.getX(f,-u),T=a.getY(f,-u),C=a.getX(0,v),E=a.getY(0,v),M=a.getX(0,v-u),P=a.getY(0,v-u)):(y=a.getX(f,0),T=a.getY(f,0),C=a.getX(0,v),E=a.getY(0,v),M=a.getX(0,v-u),P=a.getY(0,v-u)),o.batchTri(n,y,T,C,E,M,P,0,0,1,1,x,x,x,2)),r.pipelines.postBatch(n)}};p.exports=h},57847:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(17803),h=t(23031),r=t(36823),n=new d({Extends:c,Mixins:[r],initialize:function(s,o,i,a,l,u,f,v,m){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),u===void 0&&(u=128),f===void 0&&(f=0),c.call(this,s,"Line",new h(a,l,u,f));var g=Math.max(1,this.geom.right-this.geom.left),x=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(o,i),this.setSize(g,x),v!==void 0&&this.setStrokeStyle(1,v,m),this.updateDisplayOrigin()},setLineWidth:function(e,s){return s===void 0&&(s=e),this._startWidth=e,this._endWidth=s,this.lineWidth=e,this},setTo:function(e,s,o,i){return this.geom.setTo(e,s,o,i),this}});p.exports=n},17440:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(75177),c=t(20926),h=function(r,n,e,s){e.addToRenderList(n);var o=r.currentContext;if(c(r,o,n,e,s)){var i=n._displayOriginX,a=n._displayOriginY;n.isStroked&&(d(o,n),o.beginPath(),o.moveTo(n.geom.x1-i,n.geom.y1-a),o.lineTo(n.geom.x2-i,n.geom.y2-a),o.stroke()),o.restore()}};p.exports=h},2481:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39429),c=t(57847);d.register("line",function(h,r,n,e,s,o,i,a){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i,a))})},36823:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(77385),h=t(17440),p.exports={renderWebGL:c,renderCanvas:h}},77385:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline),i=d(n,e,s);o.calcMatrix.copyFrom(i.calc);var a=n._displayOriginX,l=n._displayOriginY,u=e.alpha*n.alpha;if(r.pipelines.preBatch(n),n.isStroked){var f=o.strokeTint,v=c.getTintAppendFloatAlpha(n.strokeColor,n.strokeAlpha*u);f.TL=v,f.TR=v,f.BL=v,f.BR=v,o.batchLine(n.geom.x1-a,n.geom.y1-l,n.geom.x2-a,n.geom.y2-l,n._startWidth/2,n._endWidth/2,1,0,!1,i.sprite,i.camera)}r.pipelines.postBatch(n)};p.exports=h},24949:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(90273),c=t(83419),h=t(94811),r=t(13829),n=t(25717),e=t(17803),s=t(5469),o=new c({Extends:e,Mixins:[d],initialize:function(a,l,u,f,v,m){l===void 0&&(l=0),u===void 0&&(u=0),e.call(this,a,"Polygon",new n(f));var g=r(this.geom);this.setPosition(l,u),this.setSize(g.width,g.height),v!==void 0&&this.setFillStyle(v,m),this.updateDisplayOrigin(),this.updateData()},smooth:function(i){i===void 0&&(i=1);for(var a=0;a<i;a++)s(this.geom);return this.updateData()},setTo:function(i){this.geom.setTo(i);var a=r(this.geom);return this.setSize(a.width,a.height),this.updateDisplayOrigin(),this.updateData()},updateData:function(){for(var i=[],a=this.geom.points,l=0;l<a.length;l++)i.push(a[l].x,a[l].y);return i.push(a[0].x,a[0].y),this.pathIndexes=h(i),this.pathData=i,this}});p.exports=o},38710:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX,l=e._displayOriginY,u=e.pathData,f=u.length-1,v=u[0]-a,m=u[1]-l;i.beginPath(),i.moveTo(v,m),e.closePath||(f-=2);for(var g=2;g<f;g+=2){var x=u[g]-a,y=u[g+1]-l;i.lineTo(x,y)}e.closePath&&i.closePath(),e.isFilled&&(d(i,e),i.fill()),e.isStroked&&(c(i,e),i.stroke()),i.restore()}};p.exports=r},64827:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39429),c=t(24949);d.register("polygon",function(h,r,n,e,s){return this.displayList.add(new c(this.scene,h,r,n,e,s))})},90273:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(73695),h=t(38710),p.exports={renderWebGL:c,renderCanvas:h}},73695:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(10441),c=t(91296),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,o),l=i.calcMatrix.copyFrom(a.calc),u=e._displayOriginX,f=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,l,e,v,u,f),e.isStroked&&h(i,e,v,u,f),n.pipelines.postBatch(e)};p.exports=r},74561:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(87841),h=t(17803),r=t(95597),n=new d({Extends:h,Mixins:[r],initialize:function(s,o,i,a,l,u,f){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=128),l===void 0&&(l=128),h.call(this,s,"Rectangle",new c(0,0,a,l)),this.setPosition(o,i),this.setSize(a,l),u!==void 0&&this.setFillStyle(u,f),this.updateDisplayOrigin(),this.updateData()},setSize:function(e,s){this.width=e,this.height=s,this.geom.setSize(e,s),this.updateData(),this.updateDisplayOrigin();var o=this.input;return o&&!o.customHitArea&&(o.hitArea.width=e,o.hitArea.height=s),this},updateData:function(){var e=[],s=this.geom,o=this._tempLine;return s.getLineA(o),e.push(o.x1,o.y1,o.x2,o.y2),s.getLineB(o),e.push(o.x2,o.y2),s.getLineC(o),e.push(o.x2,o.y2),s.getLineD(o),e.push(o.x2,o.y2),this.pathData=e,this}});p.exports=n},48682:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX,l=e._displayOriginY;e.isFilled&&(d(i,e),i.fillRect(-a,-l,e.width,e.height)),e.isStroked&&(c(i,e),i.beginPath(),i.rect(-a,-l,e.width,e.height),i.stroke()),i.restore()}};p.exports=r},87959:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39429),c=t(74561);d.register("rectangle",function(h,r,n,e,s,o){return this.displayList.add(new c(this.scene,h,r,n,e,s,o))})},95597:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(52059),h=t(48682),p.exports={renderWebGL:c,renderCanvas:h}},52059:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=t(34682),h=t(70554),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=d(e,s,o);i.calcMatrix.copyFrom(a.calc);var l=e._displayOriginX,u=e._displayOriginY,f=s.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var v=i.fillTint,m=h.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*f);v.TL=m,v.TR=m,v.BL=m,v.BR=m,i.batchFillRect(-l,-u,e.width,e.height)}e.isStroked&&c(i,e,f,l,u),n.pipelines.postBatch(e)};p.exports=r},55911:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(81991),c=t(83419),h=t(94811),r=t(17803),n=new c({Extends:r,Mixins:[d],initialize:function(s,o,i,a,l,u,f,v){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=5),l===void 0&&(l=32),u===void 0&&(u=64),r.call(this,s,"Star",null),this._points=a,this._innerRadius=l,this._outerRadius=u,this.setPosition(o,i),this.setSize(u*2,u*2),f!==void 0&&this.setFillStyle(f,v),this.updateDisplayOrigin(),this.updateData()},setPoints:function(e){return this._points=e,this.updateData()},setInnerRadius:function(e){return this._innerRadius=e,this.updateData()},setOuterRadius:function(e){return this._outerRadius=e,this.updateData()},points:{get:function(){return this._points},set:function(e){this._points=e,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(e){this._innerRadius=e,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(e){this._outerRadius=e,this.updateData()}},updateData:function(){var e=[],s=this._points,o=this._innerRadius,i=this._outerRadius,a=Math.PI/2*3,l=Math.PI/s,u=i,f=i;e.push(u,f+-i);for(var v=0;v<s;v++)e.push(u+Math.cos(a)*i,f+Math.sin(a)*i),a+=l,e.push(u+Math.cos(a)*o,f+Math.sin(a)*o),a+=l;return e.push(u,f+-i),this.pathIndexes=h(e),this.pathData=e,this}});p.exports=n},64272:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX,l=e._displayOriginY,u=e.pathData,f=u.length-1,v=u[0]-a,m=u[1]-l;i.beginPath(),i.moveTo(v,m),e.closePath||(f-=2);for(var g=2;g<f;g+=2){var x=u[g]-a,y=u[g+1]-l;i.lineTo(x,y)}i.closePath(),e.isFilled&&(d(i,e),i.fill()),e.isStroked&&(c(i,e),i.stroke()),i.restore()}};p.exports=r},93697:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(55911),c=t(39429);c.register("star",function(h,r,n,e,s,o,i){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i))})},81991:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(57017),h=t(64272),p.exports={renderWebGL:c,renderCanvas:h}},57017:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(10441),c=t(91296),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,o),l=i.calcMatrix.copyFrom(a.calc),u=e._displayOriginX,f=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,l,e,v,u,f),e.isStroked&&h(i,e,v,u,f),n.pipelines.postBatch(e)};p.exports=r},36931:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(17803),h=t(16483),r=t(96195),n=new d({Extends:c,Mixins:[r],initialize:function(s,o,i,a,l,u,f,v,m,g,x){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=128),u===void 0&&(u=64),f===void 0&&(f=0),v===void 0&&(v=128),m===void 0&&(m=128),c.call(this,s,"Triangle",new h(a,l,u,f,v,m));var y=this.geom.right-this.geom.left,T=this.geom.bottom-this.geom.top;this.setPosition(o,i),this.setSize(y,T),g!==void 0&&this.setFillStyle(g,x),this.updateDisplayOrigin(),this.updateData()},setTo:function(e,s,o,i,a,l){return this.geom.setTo(e,s,o,i,a,l),this.updateData()},updateData:function(){var e=[],s=this.geom,o=this._tempLine;return s.getLineA(o),e.push(o.x1,o.y1,o.x2,o.y2),s.getLineB(o),e.push(o.x2,o.y2),s.getLineC(o),e.push(o.x2,o.y2),this.pathData=e,this}});p.exports=n},85172:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX,l=e._displayOriginY,u=e.geom.x1-a,f=e.geom.y1-l,v=e.geom.x2-a,m=e.geom.y2-l,g=e.geom.x3-a,x=e.geom.y3-l;i.beginPath(),i.moveTo(u,f),i.lineTo(v,m),i.lineTo(g,x),i.closePath(),e.isFilled&&(d(i,e),i.fill()),e.isStroked&&(c(i,e),i.stroke()),i.restore()}};p.exports=r},45245:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39429),c=t(36931);d.register("triangle",function(h,r,n,e,s,o,i,a,l,u){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i,a,l,u))})},96195:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(83253),h=t(85172),p.exports={renderWebGL:c,renderCanvas:h}},83253:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=t(34682),h=t(70554),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=d(e,s,o);i.calcMatrix.copyFrom(a.calc);var l=e._displayOriginX,u=e._displayOriginY,f=s.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var v=i.fillTint,m=h.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*f);v.TL=m,v.TR=m,v.BL=m,v.BR=m;var g=e.geom.x1-l,x=e.geom.y1-u,y=e.geom.x2-l,T=e.geom.y2-u,C=e.geom.x3-l,E=e.geom.y3-u;i.batchFillTriangle(g,x,y,T,C,E,a.sprite,a.camera)}e.isStroked&&c(i,e,f,l,u),n.pipelines.postBatch(e)};p.exports=r},68287:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(9674),c=t(83419),h=t(31401),r=t(95643),n=t(92751),e=new c({Extends:r,Mixins:[h.Alpha,h.BlendMode,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.Size,h.TextureCrop,h.Tint,h.Transform,h.Visible,n],initialize:function(o,i,a,l,u){r.call(this,o,"Sprite"),this._crop=this.resetCropObject(),this.anims=new d(this),this.setTexture(l,u),this.setPosition(i,a),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(s,o){this.anims.update(s,o)},play:function(s,o){return this.anims.play(s,o)},playReverse:function(s,o){return this.anims.playReverse(s,o)},playAfterDelay:function(s,o){return this.anims.playAfterDelay(s,o)},playAfterRepeat:function(s,o){return this.anims.playAfterRepeat(s,o)},chain:function(s){return this.anims.chain(s)},stop:function(){return this.anims.stop()},stopAfterDelay:function(s){return this.anims.stopAfterDelay(s)},stopAfterRepeat:function(s){return this.anims.stopAfterRepeat(s)},stopOnFrame:function(s){return this.anims.stopOnFrame(s)},toJSON:function(){return h.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});p.exports=e},76552:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){c.addToRenderList(d),t.batchSprite(d,d.frame,c,h)};p.exports=S},15567:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(13059),h=t(44603),r=t(23568),n=t(68287);h.register("sprite",function(e,s){e===void 0&&(e={});var o=r(e,"key",null),i=r(e,"frame",null),a=new n(this.scene,0,0,o,i);return s!==void 0&&(e.add=s),d(this.scene,a,e),c(a,e),a})},46409:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39429),c=t(68287);d.register("sprite",function(h,r,n,e){return this.displayList.add(new c(this.scene,h,r,n,e))})},92751:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(9409),h=t(76552),p.exports={renderWebGL:c,renderCanvas:h}},9409:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){c.addToRenderList(d),d.pipeline.batchSprite(d,c,h)};p.exports=S},14220:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=t.canvas,r=t.context,n=t.style,e=[],s=0,o=c.length;n.maxLines>0&&n.maxLines<c.length&&(o=n.maxLines),n.syncFont(h,r);for(var i=t.letterSpacing,a=0;a<o;a++){var l=n.strokeThickness;if(i===0)l+=r.measureText(c[a]).width;else{for(var u=c[a],f=0;f<u.length;f++)l+=r.measureText(u[f]).width;u.length>1&&(l+=i*(u.length-1))}n.wordWrap&&(l-=r.measureText(" ").width),e[a]=Math.ceil(l),s=Math.max(s,e[a])}var v=d.fontSize+n.strokeThickness,m=v*o,g=t.lineSpacing;return o>1&&(m+=g*(o-1)),{width:s,height:m,lines:o,lineWidths:e,lineSpacing:g,lineHeight:v}};p.exports=S},79557:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(27919),c=function(h){var r=d.create(this),n=r.getContext("2d",{willReadFrequently:!0});h.syncFont(r,n);var e=n.measureText(h.testString);if("actualBoundingBoxAscent"in e){var s=e.actualBoundingBoxAscent,o=e.actualBoundingBoxDescent;return d.remove(r),{ascent:s,descent:o,fontSize:s+o}}var i=Math.ceil(e.width*h.baselineX),a=i,l=2*a;a=a*h.baselineY|0,r.width=i,r.height=l,n.fillStyle="#f00",n.fillRect(0,0,i,l),n.font=h._font,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(h.testString,0,a);var u={ascent:0,descent:0,fontSize:0},f=n.getImageData(0,0,i,l);if(!f)return u.ascent=a,u.descent=a+6,u.fontSize=u.ascent+u.descent,d.remove(r),u;var v=f.data,m=v.length,g=i*4,x,y,T=0,C=!1;for(x=0;x<a;x++){for(y=0;y<g;y+=4)if(v[T+y]!==255){C=!0;break}if(!C)T+=g;else break}for(u.ascent=a-x,T=m-g,C=!1,x=l;x>a;x--){for(y=0;y<g;y+=4)if(v[T+y]!==255){C=!0;break}if(!C)T-=g;else break}return u.descent=x-a,u.fontSize=u.ascent+u.descent,d.remove(r),u};p.exports=c},50171:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(40366),c=t(27919),h=t(83419),r=t(31401),n=t(95643),e=t(14220),s=t(35154),o=t(35846),i=t(61771),a=t(35762),l=t(45650),u=new h({Extends:n,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,i],initialize:function(v,m,g,x,y){m===void 0&&(m=0),g===void 0&&(g=0),n.call(this,v,"Text"),this.renderer=v.sys.renderer,this.setPosition(m,g),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=c.create(this),this.context,this.style=new a(this,y),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.letterSpacing=0,this.style.resolution===0&&(this.style.resolution=1),this._crop=this.resetCropObject(),this._textureKey=l(),this.texture=v.sys.textures.addCanvas(this._textureKey,this.canvas),this.context=this.texture.context,this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(x),y&&y.padding&&this.setPadding(y.padding),y&&y.lineSpacing&&this.setLineSpacing(y.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",d(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(f){var v=this.style;if(v.wordWrapCallback){var m=v.wordWrapCallback.call(v.wordWrapCallbackScope,f,this);return Array.isArray(m)&&(m=m.join(`
`)),m}else return v.wordWrapWidth?v.wordWrapUseAdvanced?this.advancedWordWrap(f,this.context,this.style.wordWrapWidth):this.basicWordWrap(f,this.context,this.style.wordWrapWidth):f},advancedWordWrap:function(f,v,m){for(var g="",x=f.replace(/ +/gi," ").split(this.splitRegExp),y=x.length,T=0;T<y;T++){var C=x[T],E="";C=C.replace(/^ *|\s*$/gi,"");var M=v.measureText(C).width;if(M<m){g+=C+`
`;continue}for(var P=m,A=C.split(" "),R=0;R<A.length;R++){var F=A[R],w=F+" ",B=v.measureText(w).width;if(B>P){if(R===0){for(var N=w;N.length&&(N=N.slice(0,-1),B=v.measureText(N).width,!(B<=P)););if(!N.length)throw new Error("wordWrapWidth < a single character");var U=F.substr(N.length);A[R]=U,E+=N}var D=A[R].length?R:R+1,I=A.slice(D).join(" ").replace(/[ \n]*$/gi,"");x.splice(T+1,0,I),y=x.length;break}else E+=w,P-=B}g+=E.replace(/[ \n]*$/gi,"")+`
`}return g=g.replace(/[\s|\n]*$/gi,""),g},basicWordWrap:function(f,v,m){for(var g="",x=f.split(this.splitRegExp),y=x.length-1,T=v.measureText(" ").width,C=0;C<=y;C++){for(var E=m,M=x[C].split(" "),P=M.length-1,A=0;A<=P;A++){var R=M[A],F=v.measureText(R).width,w=F;A<P&&(w+=T),w>E&&A>0&&(g+=`
`,E=m),g+=R,A<P?(g+=" ",E-=w):E-=F}C<y&&(g+=`
`)}return g},getWrappedText:function(f){f===void 0&&(f=this._text),this.style.syncFont(this.canvas,this.context);var v=this.runWordWrap(f);return v.split(this.splitRegExp)},setText:function(f){return!f&&f!==0&&(f=""),Array.isArray(f)&&(f=f.join(`
`)),f!==this._text&&(this._text=f.toString(),this.updateText()),this},appendText:function(f,v){v===void 0&&(v=!0),!f&&f!==0&&(f=""),Array.isArray(f)&&(f=f.join(`
`)),f=f.toString();var m=this._text.concat(v?`
`+f:f);return m!==this._text&&(this._text=m,this.updateText()),this},setStyle:function(f){return this.style.setStyle(f)},setFont:function(f){return this.style.setFont(f)},setFontFamily:function(f){return this.style.setFontFamily(f)},setFontSize:function(f){return this.style.setFontSize(f)},setFontStyle:function(f){return this.style.setFontStyle(f)},setFixedSize:function(f,v){return this.style.setFixedSize(f,v)},setBackgroundColor:function(f){return this.style.setBackgroundColor(f)},setFill:function(f){return this.style.setFill(f)},setColor:function(f){return this.style.setColor(f)},setStroke:function(f,v){return this.style.setStroke(f,v)},setShadow:function(f,v,m,g,x,y){return this.style.setShadow(f,v,m,g,x,y)},setShadowOffset:function(f,v){return this.style.setShadowOffset(f,v)},setShadowColor:function(f){return this.style.setShadowColor(f)},setShadowBlur:function(f){return this.style.setShadowBlur(f)},setShadowStroke:function(f){return this.style.setShadowStroke(f)},setShadowFill:function(f){return this.style.setShadowFill(f)},setWordWrapWidth:function(f,v){return this.style.setWordWrapWidth(f,v)},setWordWrapCallback:function(f,v){return this.style.setWordWrapCallback(f,v)},setAlign:function(f){return this.style.setAlign(f)},setResolution:function(f){return this.style.setResolution(f)},setLineSpacing:function(f){return this.lineSpacing=f,this.updateText()},setLetterSpacing:function(f){return this.letterSpacing=f,this.updateText()},setPadding:function(f,v,m,g){if(typeof f=="object"){var x=f,y=s(x,"x",null);y!==null?(f=y,m=y):(f=s(x,"left",0),m=s(x,"right",f));var T=s(x,"y",null);T!==null?(v=T,g=T):(v=s(x,"top",0),g=s(x,"bottom",v))}else f===void 0&&(f=0),v===void 0&&(v=f),m===void 0&&(m=f),g===void 0&&(g=v);return this.padding.left=f,this.padding.top=v,this.padding.right=m,this.padding.bottom=g,this.updateText()},setMaxLines:function(f){return this.style.setMaxLines(f)},setRTL:function(f){f===void 0&&(f=!0);var v=this.style;return v.rtl===f?this:(v.rtl=f,f?(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",d(this.canvas,this.scene.sys.canvas)):(this.canvas.dir="ltr",this.context.direction="ltr"),v.align==="left"?v.align="right":v.align==="right"&&(v.align="left"),this)},updateText:function(){var f=this.canvas,v=this.context,m=this.style,g=m.resolution,x=m.metrics;m.syncFont(f,v);var y=this._text;(m.wordWrapWidth||m.wordWrapCallback)&&(y=this.runWordWrap(this._text));var T=y.split(this.splitRegExp),C=e(this,x,T),E=this.padding,M;m.fixedWidth===0?(this.width=C.width+E.left+E.right,M=C.width):(this.width=m.fixedWidth,M=this.width-E.left-E.right,M<C.width&&(M=C.width)),m.fixedHeight===0?this.height=C.height+E.top+E.bottom:this.height=m.fixedHeight;var P=this.width,A=this.height;this.updateDisplayOrigin(),P*=g,A*=g,P=Math.max(P,1),A=Math.max(A,1),f.width!==P||f.height!==A?(f.width=P,f.height=A,this.frame.setSize(P,A),m.syncFont(f,v),m.rtl&&(v.direction="rtl")):v.clearRect(0,0,P,A),v.save(),v.scale(g,g),m.backgroundColor&&(v.fillStyle=m.backgroundColor,v.fillRect(0,0,P,A)),m.syncStyle(f,v),v.translate(E.left,E.top);for(var R,F,w=0;w<C.lines;w++){if(R=m.strokeThickness/2,F=m.strokeThickness/2+w*C.lineHeight+x.ascent,w>0&&(F+=C.lineSpacing*w),m.rtl)R=P-R-E.left-E.right;else if(m.align==="right")R+=M-C.lineWidths[w];else if(m.align==="center")R+=(M-C.lineWidths[w])/2;else if(m.align==="justify"){var B=.85;if(C.lineWidths[w]/C.width>=B){var N=C.width-C.lineWidths[w],U=v.measureText(" ").width,D=T[w].trim(),I=D.split(" ");N+=(T[w].length-D.length)*U;for(var O=Math.floor(N/U),L=0;O>0;)I[L]+=" ",L=(L+1)%(I.length-1||1),--O;T[w]=I.join(" ")}}this.autoRound&&(R=Math.round(R),F=Math.round(F));var G=this.letterSpacing;if(m.strokeThickness&&G===0&&(m.syncShadow(v,m.shadowStroke),v.strokeText(T[w],R,F)),m.color)if(m.syncShadow(v,m.shadowFill),G!==0)for(var z=0,X=T[w].split(""),V=0;V<X.length;V++)m.strokeThickness&&(m.syncShadow(v,m.shadowStroke),v.strokeText(X[V],R+z,F),m.syncShadow(v,m.shadowFill)),v.fillText(X[V],R+z,F),z+=v.measureText(X[V]).width+G;else v.fillText(T[w],R,F)}v.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(f,this.frame.source.glTexture,!0));var Y=this.input;return Y&&!Y.customHitArea&&(Y.hitArea.width=this.width,Y.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(f){this.setText(f)}},toJSON:function(){var f=r.ToJSON(this),v={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 f.data=v,f},preDestroy:function(){o(this.canvas),c.remove(this.canvas);var f=this.texture;f&&f.destroy()}});p.exports=u},79724:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){d.width===0||d.height===0||(c.addToRenderList(d),t.batchSprite(d,d.frame,c,h))};p.exports=S},71259:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(44603),h=t(23568),r=t(50171);c.register("text",function(n,e){n===void 0&&(n={});var s=h(n,"text",""),o=h(n,"style",null),i=h(n,"padding",null);i!==null&&(o.padding=i);var a=new r(this.scene,0,0,s,o);return e!==void 0&&(n.add=e),d(this.scene,a,n),a.autoRound=h(n,"autoRound",!0),a.resolution=h(n,"resolution",1),a})},68005:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(50171),c=t(39429);c.register("text",function(h,r,n,e){return this.displayList.add(new d(this.scene,h,r,n,e))})},61771:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(34397),h=t(79724),p.exports={renderWebGL:c,renderCanvas:h}},35762:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23568),h=t(35154),r=t(79557),n={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]},e=new d({initialize:function(o,i){this.parent=o,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(i,!1,!0)},setStyle:function(s,o,i){o===void 0&&(o=!0),i===void 0&&(i=!1);for(var a in n){var l=i?n[a][1]:this[a];a==="wordWrapCallback"||a==="wordWrapCallbackScope"?this[a]=h(s,n[a][0],l):s&&a==="fontSize"&&typeof s.fontSize=="number"?this[a]=s.fontSize.toString()+"px":this[a]=c(s,n[a][0],l)}var u=h(s,"font",null);u!==null&&this.setFont(u,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var f=h(s,"fill",null);f!==null&&(this.color=f);var v=h(s,"metrics",!1);return v?this.metrics={ascent:h(v,"ascent",0),descent:h(v,"descent",0),fontSize:h(v,"fontSize",0)}:(o||!this.metrics)&&(this.metrics=r(this)),o?this.parent.updateText():this.parent},syncFont:function(s,o){o.font=this._font},syncStyle:function(s,o){o.textBaseline="alphabetic",o.fillStyle=this.color,o.strokeStyle=this.stroke,o.lineWidth=this.strokeThickness,o.lineCap="round",o.lineJoin="round"},syncShadow:function(s,o){o?(s.shadowOffsetX=this.shadowOffsetX,s.shadowOffsetY=this.shadowOffsetY,s.shadowColor=this.shadowColor,s.shadowBlur=this.shadowBlur):(s.shadowOffsetX=0,s.shadowOffsetY=0,s.shadowColor=0,s.shadowBlur=0)},update:function(s){return s&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=r(this)),this.parent.updateText()},setFont:function(s,o){o===void 0&&(o=!0);var i=s,a="",l="";if(typeof s!="string")i=h(s,"fontFamily","Courier"),a=h(s,"fontSize","16px"),l=h(s,"fontStyle","");else{var u=s.split(" "),f=0;l=u.length>2?u[f++]:"",a=u[f++]||"16px",i=u[f++]||"Courier"}return(i!==this.fontFamily||a!==this.fontSize||l!==this.fontStyle)&&(this.fontFamily=i,this.fontSize=a,this.fontStyle=l,o&&this.update(!0)),this.parent},setFontFamily:function(s){return this.fontFamily!==s&&(this.fontFamily=s,this.update(!0)),this.parent},setFontStyle:function(s){return this.fontStyle!==s&&(this.fontStyle=s,this.update(!0)),this.parent},setFontSize:function(s){return typeof s=="number"&&(s=s.toString()+"px"),this.fontSize!==s&&(this.fontSize=s,this.update(!0)),this.parent},setTestString:function(s){return this.testString=s,this.update(!0)},setFixedSize:function(s,o){return this.fixedWidth=s,this.fixedHeight=o,s&&(this.parent.width=s),o&&(this.parent.height=o),this.update(!1)},setBackgroundColor:function(s){return this.backgroundColor=s,this.update(!1)},setFill:function(s){return this.color=s,this.update(!1)},setColor:function(s){return this.color=s,this.update(!1)},setResolution:function(s){return this.resolution=s,this.update(!1)},setStroke:function(s,o){return o===void 0&&(o=this.strokeThickness),s===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==s||this.strokeThickness!==o)&&(this.stroke=s,this.strokeThickness=o,this.update(!0)),this.parent},setShadow:function(s,o,i,a,l,u){return s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i="#000"),a===void 0&&(a=0),l===void 0&&(l=!1),u===void 0&&(u=!0),this.shadowOffsetX=s,this.shadowOffsetY=o,this.shadowColor=i,this.shadowBlur=a,this.shadowStroke=l,this.shadowFill=u,this.update(!1)},setShadowOffset:function(s,o){return s===void 0&&(s=0),o===void 0&&(o=s),this.shadowOffsetX=s,this.shadowOffsetY=o,this.update(!1)},setShadowColor:function(s){return s===void 0&&(s="#000"),this.shadowColor=s,this.update(!1)},setShadowBlur:function(s){return s===void 0&&(s=0),this.shadowBlur=s,this.update(!1)},setShadowStroke:function(s){return this.shadowStroke=s,this.update(!1)},setShadowFill:function(s){return this.shadowFill=s,this.update(!1)},setWordWrapWidth:function(s,o){return o===void 0&&(o=!1),this.wordWrapWidth=s,this.wordWrapUseAdvanced=o,this.update(!1)},setWordWrapCallback:function(s,o){return o===void 0&&(o=null),this.wordWrapCallback=s,this.wordWrapCallbackScope=o,this.update(!1)},setAlign:function(s){return s===void 0&&(s="left"),this.align=s,this.update(!1)},setMaxLines:function(s){return s===void 0&&(s=0),this.maxLines=s,this.update(!1)},getTextMetrics:function(){var s=this.metrics;return{ascent:s.ascent,descent:s.descent,fontSize:s.fontSize}},toJSON:function(){var s={};for(var o in n)s[o]=this[o];return s.metrics=this.getTextMetrics(),s},destroy:function(){this.parent=void 0}});p.exports=e},34397:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(70554),c=function(h,r,n,e){if(!(r.width===0||r.height===0)){n.addToRenderList(r);var s=r.frame,o=s.width,i=s.height,a=d.getTintAppendFloatAlpha,l=h.pipelines.set(r.pipeline,r),u=l.setTexture2D(s.glTexture,r);l.batchTexture(r,s.glTexture,o,i,r.x,r.y,o/r.style.resolution,i/r.style.resolution,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.displayOriginX,r.displayOriginY,0,0,o,i,a(r.tintTopLeft,n.alpha*r._alphaTL),a(r.tintTopRight,n.alpha*r._alphaTR),a(r.tintBottomLeft,n.alpha*r._alphaBL),a(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,0,0,n,e,!1,u)}};p.exports=c},20839:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(27919),c=t(83419),h=t(31401),r=t(95643),n=t(98439),e=t(68703),s=t(56295),o=t(45650),i=t(26099),a=8,l=new c({Extends:r,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Crop,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.Tint,h.Transform,h.Visible,s],initialize:function(f,v,m,g,x,y,T){var C=f.sys.renderer;r.call(this,f,"TileSprite");var E=f.sys.textures.get(y),M=E.get(T);M.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),E=f.sys.textures.get("__MISSING"),M=E.get()),E.type==="DynamicTexture"&&(console.warn("TileSprite cannot use Dynamic Texture"),E=f.sys.textures.get("__MISSING"),M=E.get()),!g||!x?(g=g||M.width,x=x||M.height):(g=Math.floor(g),x=Math.floor(x)),this._tilePosition=new i,this._tileScale=new i(1,1),this.dirty=!1,this.renderer=C,this.canvas=d.create(this,g,x),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=E,this.displayFrame=M,this._crop=this.resetCropObject(),this._textureKey=o(),this.texture=f.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=n(M.width),this.potHeight=n(M.height),this.fillCanvas=d.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(v,m),this.setSize(g,x),this.setFrame(T),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(u,f){return this.displayTexture=this.scene.sys.textures.get(u),this.setFrame(f)},setFrame:function(u){var f=this.displayTexture.get(u);return this.potWidth=n(f.width),this.potHeight=n(f.height),this.canvas.width=0,!f.cutWidth||!f.cutHeight?this.renderFlags&=~a:this.renderFlags|=a,this.displayFrame=f,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(u,f){return u!==void 0&&(this.tilePositionX=u),f!==void 0&&(this.tilePositionY=f),this},setTileScale:function(u,f){return u===void 0&&(u=this.tileScaleX),f===void 0&&(f=u),this.tileScaleX=u,this.tileScaleY=f,this},updateTileTexture:function(){if(!(!this.dirty||!this.renderer)){var u=this.displayFrame;if(u.source.isRenderTexture||u.source.isGLTexture){console.warn("TileSprites can only use Image or Canvas based textures"),this.dirty=!1;return}var f=this.fillContext,v=this.fillCanvas,m=this.potWidth,g=this.potHeight;(!this.renderer||!this.renderer.gl)&&(m=u.cutWidth,g=u.cutHeight),f.clearRect(0,0,m,g),v.width=m,v.height=g,f.drawImage(u.source.image,u.cutX,u.cutY,u.cutWidth,u.cutHeight,0,0,m,g),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(v,this.fillPattern):this.fillPattern=f.createPattern(v,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var u=this.canvas;if((u.width!==this.width||u.height!==this.height)&&(u.width=this.width,u.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl){this.dirty=!1;return}var f=this.context;this.scene.sys.game.config.antialias||e.disable(f);var v=this._tileScale.x,m=this._tileScale.y,g=this._tilePosition.x,x=this._tilePosition.y;f.clearRect(0,0,this.width,this.height),f.save(),f.scale(v,m),f.translate(-g,-x),f.fillStyle=this.fillPattern,f.fillRect(g,x,this.width/v,this.height/m),f.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),d.remove(this.canvas),d.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var u=this.texture;u&&u.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(u){this._tilePosition.x=u,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(u){this._tilePosition.y=u,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(u){this._tileScale.x=u,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(u){this._tileScale.y=u,this.dirty=!0}}});p.exports=l},46992:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){d.updateCanvas(),c.addToRenderList(d),t.batchSprite(d,d.frame,c,h)};p.exports=S},14167:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(44603),h=t(23568),r=t(20839);c.register("tileSprite",function(n,e){n===void 0&&(n={});var s=h(n,"x",0),o=h(n,"y",0),i=h(n,"width",512),a=h(n,"height",512),l=h(n,"key",""),u=h(n,"frame",""),f=new r(this.scene,s,o,i,a,l,u);return e!==void 0&&(n.add=e),d(this.scene,f,n),f})},91681:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(20839),c=t(39429);c.register("tileSprite",function(h,r,n,e,s,o){return this.displayList.add(new d(this.scene,h,r,n,e,s,o))})},56295:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(18553),h=t(46992),p.exports={renderWebGL:c,renderCanvas:h}},18553:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(70554),c=function(h,r,n,e){r.updateCanvas();var s=r.width,o=r.height;if(!(s===0||o===0)){n.addToRenderList(r);var i=d.getTintAppendFloatAlpha,a=h.pipelines.set(r.pipeline,r),l=a.setTexture2D(r.fillPattern,r);a.batchTexture(r,r.fillPattern,r.displayFrame.width*r.tileScaleX,r.displayFrame.height*r.tileScaleY,r.x,r.y,s,o,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.originX*s,r.originY*o,0,0,s,o,i(r.tintTopLeft,n.alpha*r._alphaTL),i(r.tintTopRight,n.alpha*r._alphaTR),i(r.tintBottomLeft,n.alpha*r._alphaBL),i(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,r.tilePositionX%r.displayFrame.width/r.displayFrame.width,r.tilePositionY%r.displayFrame.height/r.displayFrame.height,n,e,!1,l)}};p.exports=c},18471:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45319),c=t(83419),h=t(31401),r=t(51708),n=t(8443),e=t(95643),s=t(36383),o=t(14463),i=t(45650),a=t(10247),l=new c({Extends:e,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.TextureCrop,h.Tint,h.Transform,h.Visible,a],initialize:function(f,v,m,g){e.call(this,f,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=i(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.metadata,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._metadataCallbackHandler=this.metadataHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._getFrame=!1,this._rfvCallbackId=0;var x=f.sys.game;this._device=x.device.video,this.setPosition(v,m),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),x.events.on(n.PAUSE,this.globalPause,this),x.events.on(n.RESUME,this.globalResume,this);var y=f.sys.sound;y&&y.on(o.GLOBAL_MUTE,this.globalMute,this),g&&this.load(g)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(u){var f=this.scene.sys.cache.video.get(u);return f?(this.cacheKey=u,this.loadHandler(f.url,f.noAudio,f.crossOrigin)):console.warn("No video in cache for key: "+u),this},changeSource:function(u,f,v,m,g){f===void 0&&(f=!0),v===void 0&&(v=!1),this.cacheKey!==u&&(this.load(u),f&&this.play(v,m,g))},getVideoKey:function(){return this.cacheKey},loadURL:function(u,f,v){f===void 0&&(f=!1);var m=this._device.getVideoURL(u);return m?(this.cacheKey="",this.loadHandler(m.url,f,v)):console.warn("No supported video format found for "+u),this},loadMediaStream:function(u,f,v){return this.loadHandler(null,f,v,u)},loadHandler:function(u,f,v,m){f||(f=!1);var g=this.video;if(g?(this.removeLoadEventHandlers(),this.stop()):(g=document.createElement("video"),g.controls=!1,g.setAttribute("playsinline","playsinline"),g.setAttribute("preload","auto"),g.setAttribute("disablePictureInPicture","true")),f?(g.muted=!0,g.defaultMuted=!0,g.setAttribute("autoplay","autoplay")):(g.muted=!1,g.defaultMuted=!1,g.removeAttribute("autoplay")),v?g.setAttribute("crossorigin",v):g.removeAttribute("crossorigin"),m)if("srcObject"in g)try{g.srcObject=m}catch(y){if(y.name!=="TypeError")throw y;g.src=URL.createObjectURL(m)}else g.src=URL.createObjectURL(m);else g.src=u;this.retry=0,this.video=g,this._playCalled=!1,g.load(),this.addLoadEventHandlers();var x=this.scene.sys.textures.get(this._key);return this.setTexture(x),this},requestVideoFrame:function(u,f){var v=this.video;if(v){var m=f.width,g=f.height,x=this.videoTexture,y=this.videoTextureSource,T=!x||y.source!==v;T?(this._codePaused=v.paused,this._codeMuted=v.muted,x?(y.source=v,y.width=m,y.height=g,x.get().setSize(m,g)):(x=this.scene.sys.textures.create(this._key,v,m,g),x.add("__BASE",0,0,0,m,g),this.setTexture(x),this.videoTexture=x,this.videoTextureSource=x.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(r.VIDEO_TEXTURE,this,x)),this.setSizeToFrame(),this.updateDisplayOrigin()):y.update(),this.isStalled=!1,this.metadata=f;var C=f.mediaTime;T&&(this._lastUpdate=C,this.emit(r.VIDEO_CREATED,this,m,g),this.frameReady||(this.frameReady=!0,this.emit(r.VIDEO_PLAY,this))),this._playingMarker?C>=this._markerOut&&(v.loop?(v.currentTime=this._markerIn,this.emit(r.VIDEO_LOOP,this)):(this.stop(!1),this.emit(r.VIDEO_COMPLETE,this))):C<this._lastUpdate&&this.emit(r.VIDEO_LOOP,this),this._lastUpdate=C,this._getFrame?(this.removeEventHandlers(),v.pause(),this._getFrame=!1):this._rfvCallbackId=this.video.requestVideoFrameCallback(this.requestVideoFrame.bind(this))}},play:function(u,f,v){f===void 0&&(f=-1),v===void 0&&(v=s.MAX_SAFE_INTEGER);var m=this.video;return!m||this.isPlaying()?(m||console.warn("Video not loaded"),this):(u===void 0&&(u=m.loop),m.loop=u,this._markerIn=f,this._markerOut=v,this._playingMarker=f>-1&&v>f&&v<s.MAX_SAFE_INTEGER,this._playCalled||(this._getFrame=!1,this._rfvCallbackId=m.requestVideoFrameCallback(this.requestVideoFrame.bind(this)),this._playCalled=!0,this.createPlayPromise()),this)},getFirstFrame:function(){var u=this.video;return!u||this.isPlaying()?(u||console.warn("Video not loaded"),this):(this._playCalled||(this._getFrame=!0,this._rfvCallbackId=u.requestVideoFrameCallback(this.requestVideoFrame.bind(this)),this.createPlayPromise()),this)},addLoadEventHandlers:function(){var u=this.video;u&&(u.addEventListener("error",this._loadCallbackHandler),u.addEventListener("abort",this._loadCallbackHandler),u.addEventListener("loadedmetadata",this._metadataCallbackHandler))},removeLoadEventHandlers:function(){var u=this.video;u&&(u.removeEventListener("error",this._loadCallbackHandler),u.removeEventListener("abort",this._loadCallbackHandler))},addEventHandlers:function(){var u=this.video;if(u){var f=this._callbacks;for(var v in f)u.addEventListener(v,f[v])}},removeEventHandlers:function(){var u=this.video;if(u){var f=this._callbacks;for(var v in f)u.removeEventListener(v,f[v])}},createPlayPromise:function(u){u===void 0&&(u=!0);var f=this.video,v=f.play();if(v!==void 0){var m=this.playSuccess.bind(this),g=this.playError.bind(this);if(!u){var x=this;g=function(){x.failedPlayAttempts++}}v.then(m).catch(g)}else f.addEventListener("playing",this._callbacks.legacy),u||this.failedPlayAttempts++},addMarker:function(u,f,v){return!isNaN(f)&&f>=0&&!isNaN(v)&&v>f&&(this.markers[u]=[f,v]),this},playMarker:function(u,f){var v=this.markers[u];return v&&this.play(f,v[0],v[1]),this},removeMarker:function(u){return delete this.markers[u],this},snapshot:function(u,f){return u===void 0&&(u=this.width),f===void 0&&(f=this.height),this.snapshotArea(0,0,this.width,this.height,u,f)},snapshotArea:function(u,f,v,m,g,x){u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=this.width),m===void 0&&(m=this.height),g===void 0&&(g=v),x===void 0&&(x=m);var y=this.video,T=this.snapshotTexture;return T?(T.setSize(g,x),y&&T.context.drawImage(y,u,f,v,m,0,0,g,x)):(T=this.scene.sys.textures.createCanvas(i(),g,x),this.snapshotTexture=T,y&&T.context.drawImage(y,u,f,v,m,0,0,g,x)),T.update()},saveSnapshotTexture:function(u){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,u):this.snapshotTexture=this.scene.sys.textures.createCanvas(u,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(r.VIDEO_UNLOCKED,this));var u=this.scene.sys.sound;u&&u.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(u){var f=u.name;f==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(r.VIDEO_LOCKED,this)):f==="NotSupportedError"?(this.stop(!1),this.emit(r.VIDEO_UNSUPPORTED,this,u)):(this.stop(!1),this.emit(r.VIDEO_ERROR,this,u))},legacyPlayHandler:function(){var u=this.video;u&&(this.playSuccess(),u.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(r.VIDEO_PLAYING,this)},loadErrorHandler:function(u){this.stop(!1),this.emit(r.VIDEO_ERROR,this,u)},metadataHandler:function(u){this.emit(r.VIDEO_METADATA,this,u)},setSizeToFrame:function(u){u||(u=this.frame),this.width=u.realWidth,this.height=u.realHeight,this.scaleX!==1&&(this.scaleX=this.displayWidth/this.width),this.scaleY!==1&&(this.scaleY=this.displayHeight/this.height);var f=this.input;return f&&!f.customHitArea&&(f.hitArea.width=this.width,f.hitArea.height=this.height),this},stalledHandler:function(u){this.isStalled=!0,this.emit(r.VIDEO_STALLED,this,u)},completeHandler:function(){this._playCalled=!1,this.emit(r.VIDEO_COMPLETE,this)},preUpdate:function(u,f){var v=this.video;!v||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=f,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(u){var f=this.video;if(f){var v=f.duration;if(v!==1/0&&!isNaN(v)){var m=v*u;this.setCurrentTime(m)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(u){var f=this.video;if(f){if(typeof u=="string"){var v=u[0],m=parseFloat(u.substr(1));v==="+"?u=f.currentTime+m:v==="-"&&(u=f.currentTime-m)}f.currentTime=u}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(r.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(r.VIDEO_SEEKED,this)},getProgress:function(){var u=this.video;if(u){var f=u.duration;if(f!==1/0&&!isNaN(f))return u.currentTime/f}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(u){u===void 0&&(u=!0),this._codeMuted=u;var f=this.video;return f&&(f.muted=this._systemMuted?!0:u),this},isMuted:function(){return this._codeMuted},globalMute:function(u,f){this._systemMuted=f;var v=this.video;v&&(v.muted=this._codeMuted?!0:f)},globalPause:function(){this._systemPaused=!0,this.video&&!this.video.ended&&(this.removeEventHandlers(),this.video.pause())},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&!this.video.ended&&this.createPlayPromise()},setPaused:function(u){u===void 0&&(u=!0);var f=this.video;return this._codePaused=u,f&&!f.ended&&(u?f.paused||(this.removeEventHandlers(),f.pause()):u||(this._playCalled?f.paused&&!this._systemPaused&&this.createPlayPromise():this.play())),this},pause:function(){return this.setPaused(!0)},resume:function(){return this.setPaused(!1)},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(u){return u===void 0&&(u=1),this.video&&(this.video.volume=d(u,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(u){return this.video&&(this.video.playbackRate=u),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(u){return u===void 0&&(u=!0),this.video&&(this.video.loop=u),this},isPlaying:function(){return this.video?!(this.video.paused||this.video.ended):!1},isPaused:function(){return this.video&&this._playCalled&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(u,f){return f===void 0&&(f=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,u),this.videoTextureSource.setFlipY(f)),this._key=u,this.flipY=f,!!this.videoTexture},stop:function(u){u===void 0&&(u=!0);var f=this.video;return f&&(this.removeEventHandlers(),f.cancelVideoFrameCallback(this._rfvCallbackId),f.pause()),this.retry=0,this._playCalled=!1,u&&this.emit(r.VIDEO_STOP,this),this},removeVideoElement:function(){var u=this.video;if(u){for(u.parentNode&&u.parentNode.removeChild(u);u.hasChildNodes();)u.removeChild(u.firstChild);u.removeAttribute("autoplay"),u.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var u=this.scene.sys.game.events;u.off(n.PAUSE,this.globalPause,this),u.off(n.RESUME,this.globalResume,this);var f=this.scene.sys.sound;f&&f.off(o.GLOBAL_MUTE,this.globalMute,this)}});p.exports=l},58352:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){d.videoTexture&&(c.addToRenderList(d),t.batchSprite(d,d.frame,c,h))};p.exports=S},11511:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25305),c=t(44603),h=t(23568),r=t(18471);c.register("video",function(n,e){n===void 0&&(n={});var s=h(n,"key",null),o=new r(this.scene,0,0,s);return e!==void 0&&(n.add=e),d(this.scene,o,n),o})},89025:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(18471),c=t(39429);c.register("video",function(h,r,n){return this.displayList.add(new d(this.scene,h,r,n))})},10247:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(29849),h=t(58352),p.exports={renderWebGL:c,renderCanvas:h}},29849:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){d.videoTexture&&(c.addToRenderList(d),d.pipeline.batchSprite(d,c,h))};p.exports=S},41481:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(10312),c=t(96503),h=t(87902),r=t(83419),n=t(31401),e=t(95643),s=t(87841),o=t(37303),i=new r({Extends:e,Mixins:[n.Depth,n.GetBounds,n.Origin,n.Transform,n.ScrollFactor,n.Visible],initialize:function(l,u,f,v,m){v===void 0&&(v=1),m===void 0&&(m=v),e.call(this,l,"Zone"),this.setPosition(u,f),this.width=v,this.height=m,this.blendMode=d.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(a){this.scaleX=a/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(a){this.scaleY=a/this.height}},setSize:function(a,l,u){u===void 0&&(u=!0),this.width=a,this.height=l,this.updateDisplayOrigin();var f=this.input;return u&&f&&!f.customHitArea&&(f.hitArea.width=a,f.hitArea.height=l),this},setDisplaySize:function(a,l){return this.displayWidth=a,this.displayHeight=l,this},setCircleDropZone:function(a){return this.setDropZone(new c(0,0,a),h)},setRectangleDropZone:function(a,l){return this.setDropZone(new s(0,0,a,l),o)},setDropZone:function(a,l){return this.input||this.setInteractive(a,l,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(a,l,u){u.addToRenderList(l)},renderWebGL:function(a,l,u){u.addToRenderList(l)}});p.exports=i},95261:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(44603),c=t(23568),h=t(41481);d.register("zone",function(r){var n=c(r,"x",0),e=c(r,"y",0),s=c(r,"width",1),o=c(r,"height",s);return new h(this.scene,n,e,s,o)})},84175:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(41481),c=t(39429);c.register("zone",function(h,r,n,e){return this.displayList.add(new d(this.scene,h,r,n,e))})},95166:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0};p.exports=S},96503:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(87902),h=t(26241),r=t(79124),n=t(23777),e=t(28176),s=new d({initialize:function(i,a,l){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),this.type=n.CIRCLE,this.x=i,this.y=a,this._radius=l,this._diameter=l*2},contains:function(o,i){return c(this,o,i)},getPoint:function(o,i){return h(this,o,i)},getPoints:function(o,i,a){return r(this,o,i,a)},getRandomPoint:function(o){return e(this,o)},setTo:function(o,i,a){return this.x=o,this.y=i,this._radius=a,this._diameter=a*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(o,i){return i===void 0&&(i=o),this.x=o,this.y=i,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(o){this._radius=o,this._diameter=o*2}},diameter:{get:function(){return this._diameter},set:function(o){this._diameter=o,this._radius=o*.5}},left:{get:function(){return this.x-this._radius},set:function(o){this.x=o+this._radius}},right:{get:function(){return this.x+this._radius},set:function(o){this.x=o-this._radius}},top:{get:function(){return this.y-this._radius},set:function(o){this.y=o+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(o){this.y=o-this._radius}}});p.exports=s},71562:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return 2*(Math.PI*t.radius)};p.exports=S},92110:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r,n){return n===void 0&&(n=new d),n.x=h.x+h.radius*Math.cos(r),n.y=h.y+h.radius*Math.sin(r),n};p.exports=c},42250:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(96503),c=function(h){return new d(h.x,h.y,h.radius)};p.exports=c},87902:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){if(t.radius>0&&d>=t.left&&d<=t.right&&c>=t.top&&c<=t.bottom){var h=(t.x-d)*(t.x-d),r=(t.y-c)*(t.y-c);return h+r<=t.radius*t.radius}else return!1};p.exports=S},5698:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87902),c=function(h,r){return d(h,r.x,r.y)};p.exports=c},70588:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87902),c=function(h,r){return d(h,r.x,r.y)&&d(h,r.right,r.y)&&d(h,r.x,r.bottom)&&d(h,r.right,r.bottom)};p.exports=c},26394:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d.setTo(t.x,t.y,t.radius)};p.exports=S},76278:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.radius===d.radius};p.exports=S},2074:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87841),c=function(h,r){return r===void 0&&(r=new d),r.x=h.left,r.y=h.top,r.width=h.diameter,r.height=h.diameter,r};p.exports=c},26241:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(92110),c=t(62945),h=t(36383),r=t(2141),n=function(e,s,o){o===void 0&&(o=new r);var i=c(s,0,h.PI2);return d(e,i,o)};p.exports=n},79124:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(71562),c=t(92110),h=t(62945),r=t(36383),n=function(e,s,o,i){i===void 0&&(i=[]),!s&&o>0&&(s=d(e)/o);for(var a=0;a<s;a++){var l=h(a/s,0,r.PI2);i.push(c(e,l))}return i};p.exports=n},50884:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S},39212:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S},28176:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r){r===void 0&&(r=new d);var n=2*Math.PI*Math.random(),e=Math.random()+Math.random(),s=e>1?2-e:e,o=s*Math.cos(n),i=s*Math.sin(n);return r.x=h.x+o*h.radius,r.y=h.y+i*h.radius,r};p.exports=c},88911:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(96503);d.Area=t(95166),d.Circumference=t(71562),d.CircumferencePoint=t(92110),d.Clone=t(42250),d.Contains=t(87902),d.ContainsPoint=t(5698),d.ContainsRect=t(70588),d.CopyFrom=t(26394),d.Equals=t(76278),d.GetBounds=t(2074),d.GetPoint=t(26241),d.GetPoints=t(79124),d.Offset=t(50884),d.OffsetPoint=t(39212),d.Random=t(28176),p.exports=d},23777:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};p.exports=S},78874:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI};p.exports=S},92990:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d=t.width/2,c=t.height/2,h=Math.pow(d-c,2)/Math.pow(d+c,2);return Math.PI*(d+c)*(1+3*h/(10+Math.sqrt(4-3*h)))};p.exports=S},79522:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r,n){n===void 0&&(n=new d);var e=h.width/2,s=h.height/2;return n.x=h.x+e*Math.cos(r),n.y=h.y+s*Math.sin(r),n};p.exports=c},58102:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(8497),c=function(h){return new d(h.x,h.y,h.width,h.height)};p.exports=c},81154:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){if(t.width<=0||t.height<=0)return!1;var h=(d-t.x)/t.width,r=(c-t.y)/t.height;return h*=h,r*=r,h+r<.25};p.exports=S},46662:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(81154),c=function(h,r){return d(h,r.x,r.y)};p.exports=c},1632:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(81154),c=function(h,r){return d(h,r.x,r.y)&&d(h,r.right,r.y)&&d(h,r.x,r.bottom)&&d(h,r.right,r.bottom)};p.exports=c},65534:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d.setTo(t.x,t.y,t.width,t.height)};p.exports=S},8497:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(81154),h=t(90549),r=t(48320),n=t(23777),e=t(24820),s=new d({initialize:function(i,a,l,u){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),u===void 0&&(u=0),this.type=n.ELLIPSE,this.x=i,this.y=a,this.width=l,this.height=u},contains:function(o,i){return c(this,o,i)},getPoint:function(o,i){return h(this,o,i)},getPoints:function(o,i,a){return r(this,o,i,a)},getRandomPoint:function(o){return e(this,o)},setTo:function(o,i,a,l){return this.x=o,this.y=i,this.width=a,this.height=l,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(o,i){return i===void 0&&(i=o),this.x=o,this.y=i,this},setSize:function(o,i){return i===void 0&&(i=o),this.width=o,this.height=i,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(o){this.x=o+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(o){this.x=o-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(o){this.y=o+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(o){this.y=o-this.height/2}}});p.exports=s},36146:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.width===d.width&&t.height===d.height};p.exports=S},23694:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87841),c=function(h,r){return r===void 0&&(r=new d),r.x=h.left,r.y=h.top,r.width=h.width,r.height=h.height,r};p.exports=c},90549:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(79522),c=t(62945),h=t(36383),r=t(2141),n=function(e,s,o){o===void 0&&(o=new r);var i=c(s,0,h.PI2);return d(e,i,o)};p.exports=n},48320:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(92990),c=t(79522),h=t(62945),r=t(36383),n=function(e,s,o,i){i===void 0&&(i=[]),!s&&o>0&&(s=d(e)/o);for(var a=0;a<s;a++){var l=h(a/s,0,r.PI2);i.push(c(e,l))}return i};p.exports=n},73424:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S},44808:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S},24820:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r){r===void 0&&(r=new d);var n=Math.random()*Math.PI*2,e=Math.sqrt(Math.random());return r.x=h.x+e*Math.cos(n)*h.width/2,r.y=h.y+e*Math.sin(n)*h.height/2,r};p.exports=c},49203:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(8497);d.Area=t(78874),d.Circumference=t(92990),d.CircumferencePoint=t(79522),d.Clone=t(58102),d.Contains=t(81154),d.ContainsPoint=t(46662),d.ContainsRect=t(1632),d.CopyFrom=t(65534),d.Equals=t(36146),d.GetBounds=t(23694),d.GetPoint=t(90549),d.GetPoints=t(48320),d.Offset=t(73424),d.OffsetPoint=t(44808),d.Random=t(24820),p.exports=d},55738:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(23777),c=t(79291),h={Circle:t(88911),Ellipse:t(49203),Intersects:t(91865),Line:t(2529),Mesh:t(73090),Point:t(43711),Polygon:t(58423),Rectangle:t(93232),Triangle:t(84435)};h=c(!1,h,d),p.exports=h},2044:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(20339),c=function(h,r){return d(h.x,h.y,r.x,r.y)<=h.radius+r.radius};p.exports=c},81491:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=d.width/2,h=d.height/2,r=Math.abs(t.x-d.x-c),n=Math.abs(t.y-d.y-h),e=c+t.radius,s=h+t.radius;if(r>e||n>s)return!1;if(r<=c||n<=h)return!0;var o=r-c,i=n-h,a=o*o,l=i*i,u=t.radius*t.radius;return a+l<=u};p.exports=S},63376:(p,S,t)=>{/**
* @author Florian Vazelle
* @author Geoffrey Glaive
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=t(2044),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.x,o=r.y,i=r.radius,a=n.x,l=n.y,u=n.radius,f,v,m,g,x;if(o===l)x=(u*u-i*i-a*a+s*s)/(2*(s-a)),f=1,v=-2*l,m=a*a+x*x-2*a*x+l*l-u*u,g=v*v-4*f*m,g===0?e.push(new d(x,-v/(2*f))):g>0&&(e.push(new d(x,(-v+Math.sqrt(g))/(2*f))),e.push(new d(x,(-v-Math.sqrt(g))/(2*f))));else{var y=(s-a)/(o-l),T=(u*u-i*i-a*a+s*s-l*l+o*o)/(2*(o-l));f=y*y+1,v=2*o*y-2*T*y-2*s,m=s*s+o*o+T*T-i*i-2*o*T,g=v*v-4*f*m,g===0?(x=-v/(2*f),e.push(new d(x,T-x*y))):g>0&&(x=(-v+Math.sqrt(g))/(2*f),e.push(new d(x,T-x*y)),x=(-v-Math.sqrt(g))/(2*f),e.push(new d(x,T-x*y)))}}return e};p.exports=h},97439:(p,S,t)=>{/**
* @author Florian Vazelle
* @author Geoffrey Glaive
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(4042),c=t(81491),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=n.getLineA(),o=n.getLineB(),i=n.getLineC(),a=n.getLineD();d(s,r,e),d(o,r,e),d(i,r,e),d(a,r,e)}return e};p.exports=h},4042:(p,S,t)=>{/**
* @author Florian Vazelle
* @author Geoffrey Glaive
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=t(80462),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.x1,o=r.y1,i=r.x2,a=r.y2,l=n.x,u=n.y,f=n.radius,v=i-s,m=a-o,g=s-l,x=o-u,y=v*v+m*m,T=2*(v*g+m*x),C=g*g+x*x-f*f,E=T*T-4*y*C,M,P;if(E===0){var A=-T/(2*y);M=s+A*v,P=o+A*m,A>=0&&A<=1&&e.push(new d(M,P))}else if(E>0){var R=(-T-Math.sqrt(E))/(2*y);M=s+R*v,P=o+R*m,R>=0&&R<=1&&e.push(new d(M,P));var F=(-T+Math.sqrt(E))/(2*y);M=s+F*v,P=o+F*m,F>=0&&F<=1&&e.push(new d(M,P))}}return e};p.exports=h},36100:(p,S,t)=>{/**
* @author Richard Davey
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25836),c=function(h,r,n,e){n===void 0&&(n=!1);var s=h.x1,o=h.y1,i=h.x2,a=h.y2,l=r.x1,u=r.y1,f=r.x2,v=r.y2,m=i-s,g=a-o,x=f-l,y=v-u,T=m*y-g*x;if(T===0)return null;var C,E,M;if(n){if(C=(m*(u-o)+g*(s-l))/(x*g-y*m),m!==0)E=(l+x*C-s)/m;else if(g!==0)E=(u+y*C-o)/g;else return null;if(E<0||C<0||C>1)return null;M=E}else{if(C=((l-s)*y-(u-o)*x)/T,E=((o-u)*m-(s-l)*g)/T,C<0||C>1||E<0||E>1)return null;M=C}return e===void 0&&(e=new d),e.set(s+m*M,o+g*M,M)};p.exports=c},3073:(p,S,t)=>{/**
* @author Richard Davey
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(36100),c=t(23031),h=t(25836),r=new c,n=new h,e=function(s,o,i,a){i===void 0&&(i=!1),a===void 0&&(a=new h);var l=!1;a.set(),n.set();for(var u=o[o.length-1],f=0;f<o.length;f++){var v=o[f];r.setTo(u.x,u.y,v.x,v.y),u=v,d(s,r,i,n)&&(!l||n.z<a.z)&&(a.copy(n),l=!0)}return l?a:null};p.exports=e},56362:(p,S,t)=>{/**
* @author Richard Davey
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25836),c=t(61369),h=t(3073),r=new d,n=function(e,s,o,i){i===void 0&&(i=new c),Array.isArray(s)||(s=[s]);var a=!1;i.set(),r.set();for(var l=0;l<s.length;l++)h(e,s[l].points,o,r)&&(!a||r.z<i.z)&&(i.set(r.x,r.y,r.z,l),a=!0);return a?i:null};p.exports=n},60646:(p,S,t)=>{/**
* @author Florian Vazelle
* @author Geoffrey Glaive
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=t(76112),h=t(92773),r=function(n,e,s){if(s===void 0&&(s=[]),h(n,e))for(var o=e.getLineA(),i=e.getLineB(),a=e.getLineC(),l=e.getLineD(),u=[new d,new d,new d,new d],f=[c(o,n,u[0]),c(i,n,u[1]),c(a,n,u[2]),c(l,n,u[3])],v=0;v<4;v++)f[v]&&s.push(u[v]);return s};p.exports=r},71147:(p,S,t)=>{/**
* @author Richard Davey
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(61369),c=t(56362),h=t(23031),r=new h;function n(o,i,a,l,u){var f=Math.cos(o),v=Math.sin(o);r.setTo(i,a,i+f,a+v);var m=c(r,l,!0);m&&u.push(new d(m.x,m.y,o,m.w))}function e(o,i){return o.z-i.z}var s=function(o,i,a){Array.isArray(a)||(a=[a]);for(var l=[],u=[],f=0;f<a.length;f++)for(var v=a[f].points,m=0;m<v.length;m++){var g=Math.atan2(v[m].y-i,v[m].x-o);u.indexOf(g)===-1&&(n(g,o,i,a,l),n(g-1e-5,o,i,a,l),n(g+1e-5,o,i,a,l),u.push(g))}return l.sort(e)};p.exports=s},68389:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87841),c=t(59996),h=function(r,n,e){return e===void 0&&(e=new d),c(r,n)&&(e.x=Math.max(r.x,n.x),e.y=Math.max(r.y,n.y),e.width=Math.min(r.right,n.right)-e.x,e.height=Math.min(r.bottom,n.bottom)-e.y),e};p.exports=h},52784:(p,S,t)=>{/**
* @author Florian Vazelle
* @author Geoffrey Glaive
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(60646),c=t(59996),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.getLineA(),o=r.getLineB(),i=r.getLineC(),a=r.getLineD();d(s,n,e),d(o,n,e),d(i,n,e),d(a,n,e)}return e};p.exports=h},26341:(p,S,t)=>{/**
* @author Florian Vazelle
* @author Geoffrey Glaive
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(89265),c=t(60646),h=function(r,n,e){if(e===void 0&&(e=[]),d(r,n)){var s=n.getLineA(),o=n.getLineB(),i=n.getLineC();c(s,r,e),c(o,r,e),c(i,r,e)}return e};p.exports=h},38720:(p,S,t)=>{/**
* @author Florian Vazelle
* @author Geoffrey Glaive
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(4042),c=t(67636),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.getLineA(),o=r.getLineB(),i=r.getLineC();d(s,n,e),d(o,n,e),d(i,n,e)}return e};p.exports=h},13882:(p,S,t)=>{/**
* @author Florian Vazelle
* @author Geoffrey Glaive
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=t(2822),h=t(76112),r=function(n,e,s){if(s===void 0&&(s=[]),c(n,e))for(var o=n.getLineA(),i=n.getLineB(),a=n.getLineC(),l=[new d,new d,new d],u=[h(o,e,l[0]),h(i,e,l[1]),h(a,e,l[2])],f=0;f<3;f++)u[f]&&s.push(l[f]);return s};p.exports=r},75636:(p,S,t)=>{/**
* @author Florian Vazelle
* @author Geoffrey Glaive
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(82944),c=t(13882),h=function(r,n,e){if(e===void 0&&(e=[]),d(r,n)){var s=n.getLineA(),o=n.getLineB(),i=n.getLineC();c(r,s,e),c(r,o,e),c(r,i,e)}return e};p.exports=h},80462:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87902),c=t(2141),h=new c,r=function(n,e,s){if(s===void 0&&(s=h),d(e,n.x1,n.y1))return s.x=n.x1,s.y=n.y1,!0;if(d(e,n.x2,n.y2))return s.x=n.x2,s.y=n.y2,!0;var o=n.x2-n.x1,i=n.y2-n.y1,a=e.x-n.x1,l=e.y-n.y1,u=o*o+i*i,f=o,v=i;if(u>0){var m=(a*o+l*i)/u;f*=m,v*=m}s.x=n.x1+f,s.y=n.y1+v;var g=f*f+v*v;return g<=u&&f*o+v*i>=0&&d(e,s.x,s.y)};p.exports=r},76112:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=t.x1,r=t.y1,n=t.x2,e=t.y2,s=d.x1,o=d.y1,i=d.x2,a=d.y2;if(h===n&&r===e||s===i&&o===a)return!1;var l=(a-o)*(n-h)-(i-s)*(e-r);if(l===0)return!1;var u=((i-s)*(r-o)-(a-o)*(h-s))/l,f=((n-h)*(r-o)-(e-r)*(h-s))/l;return u<0||u>1||f<0||f>1?!1:(c&&(c.x=h+u*(n-h),c.y=r+u*(e-r)),!0)};p.exports=S},92773:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=t.x1,h=t.y1,r=t.x2,n=t.y2,e=d.x,s=d.y,o=d.right,i=d.bottom,a=0;if(c>=e&&c<=o&&h>=s&&h<=i||r>=e&&r<=o&&n>=s&&n<=i)return!0;if(c<e&&r>=e){if(a=h+(n-h)*(e-c)/(r-c),a>s&&a<=i)return!0}else if(c>o&&r<=o&&(a=h+(n-h)*(o-c)/(r-c),a>=s&&a<=i))return!0;if(h<s&&n>=s){if(a=c+(r-c)*(s-h)/(n-h),a>=e&&a<=o)return!0}else if(h>i&&n<=i&&(a=c+(r-c)*(i-h)/(n-h),a>=e&&a<=o))return!0;return!1};p.exports=S},16204:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Florian Mertens
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){c===void 0&&(c=1);var h=d.x1,r=d.y1,n=d.x2,e=d.y2,s=t.x,o=t.y,i=(n-h)*(n-h)+(e-r)*(e-r);if(i===0)return!1;var a=((s-h)*(n-h)+(o-r)*(e-r))/i;if(a<0)return Math.sqrt((h-s)*(h-s)+(r-o)*(r-o))<=c;if(a>=0&&a<=1){var l=((r-o)*(n-h)-(h-s)*(e-r))/i;return Math.abs(l)*Math.sqrt(i)<=c}else return Math.sqrt((n-s)*(n-s)+(e-o)*(e-o))<=c};p.exports=S},14199:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(16204),c=function(h,r){if(!d(h,r))return!1;var n=Math.min(r.x1,r.x2),e=Math.max(r.x1,r.x2),s=Math.min(r.y1,r.y2),o=Math.max(r.y1,r.y2);return h.x>=n&&h.x<=e&&h.y>=s&&h.y<=o};p.exports=c},59996:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.width<=0||t.height<=0||d.width<=0||d.height<=0?!1:!(t.right<d.x||t.bottom<d.y||t.x>d.right||t.y>d.bottom)};p.exports=S},89265:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(76112),c=t(37303),h=t(48653),r=t(77493),n=function(e,s){if(s.left>e.right||s.right<e.left||s.top>e.bottom||s.bottom<e.top)return!1;var o=s.getLineA(),i=s.getLineB(),a=s.getLineC();if(c(e,o.x1,o.y1)||c(e,o.x2,o.y2)||c(e,i.x1,i.y1)||c(e,i.x2,i.y2)||c(e,a.x1,a.y1)||c(e,a.x2,a.y2))return!0;var l=e.getLineA(),u=e.getLineB(),f=e.getLineC(),v=e.getLineD();if(d(o,l)||d(o,u)||d(o,f)||d(o,v)||d(i,l)||d(i,u)||d(i,f)||d(i,v)||d(a,l)||d(a,u)||d(a,f)||d(a,v))return!0;var m=r(e),g=h(s,m,!0);return g.length>0};p.exports=n},84411:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h,r,n){return n===void 0&&(n=0),!(d>t.right+n||c<t.left-n||h>t.bottom+n||r<t.top-n)};p.exports=S},67636:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(80462),c=t(10690),h=function(r,n){return r.left>n.right||r.right<n.left||r.top>n.bottom||r.bottom<n.top?!1:!!(c(r,n.x,n.y)||d(r.getLineA(),n)||d(r.getLineB(),n)||d(r.getLineC(),n))};p.exports=h},2822:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(76112),c=function(h,r){return!!(h.contains(r.x1,r.y1)||h.contains(r.x2,r.y2)||d(h.getLineA(),r)||d(h.getLineB(),r)||d(h.getLineC(),r))};p.exports=c},82944:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(48653),c=t(71694),h=t(76112),r=function(n,e){if(n.left>e.right||n.right<e.left||n.top>e.bottom||n.bottom<e.top)return!1;var s=n.getLineA(),o=n.getLineB(),i=n.getLineC(),a=e.getLineA(),l=e.getLineB(),u=e.getLineC();if(h(s,a)||h(s,l)||h(s,u)||h(o,a)||h(o,l)||h(o,u)||h(i,a)||h(i,l)||h(i,u))return!0;var f=c(n),v=d(e,f,!0);return v.length>0||(f=c(e),v=d(n,f,!0),v.length>0)};p.exports=r},91865:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={CircleToCircle:t(2044),CircleToRectangle:t(81491),GetCircleToCircle:t(63376),GetCircleToRectangle:t(97439),GetLineToCircle:t(4042),GetLineToLine:t(36100),GetLineToPoints:t(3073),GetLineToPolygon:t(56362),GetLineToRectangle:t(60646),GetRaysFromPointToPolygon:t(71147),GetRectangleIntersection:t(68389),GetRectangleToRectangle:t(52784),GetRectangleToTriangle:t(26341),GetTriangleToCircle:t(38720),GetTriangleToLine:t(13882),GetTriangleToTriangle:t(75636),LineToCircle:t(80462),LineToLine:t(76112),LineToRectangle:t(92773),PointToLine:t(16204),PointToLineSegment:t(14199),RectangleToRectangle:t(59996),RectangleToTriangle:t(89265),RectangleToValues:t(84411),TriangleToCircle:t(67636),TriangleToLine:t(2822),TriangleToTriangle:t(82944)}},91938:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)};p.exports=S},84993:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){d===void 0&&(d=1),c===void 0&&(c=[]);var h=Math.round(t.x1),r=Math.round(t.y1),n=Math.round(t.x2),e=Math.round(t.y2),s=Math.abs(n-h),o=Math.abs(e-r),i=h<n?1:-1,a=r<e?1:-1,l=s-o;c.push({x:h,y:r});for(var u=1;!(h===n&&r===e);){var f=l<<1;f>-o&&(l-=o,h+=i),f<s&&(l+=s,r+=a),u%d===0&&c.push({x:h,y:r}),u++}return c};p.exports=S},36469:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=d-(t.x1+t.x2)/2,r=c-(t.y1+t.y2)/2;return t.x1+=h,t.y1+=r,t.x2+=h,t.y2+=r,t};p.exports=S},31116:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(23031),c=function(h){return new d(h.x1,h.y1,h.x2,h.y2)};p.exports=c},59944:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d.setTo(t.x1,t.y1,t.x2,t.y2)};p.exports=S},59220:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.x1===d.x1&&t.y1===d.y1&&t.x2===d.x2&&t.y2===d.y2};p.exports=S},78177:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(35001),c=function(h,r,n){n===void 0&&(n=r);var e=d(h),s=h.x2-h.x1,o=h.y2-h.y1;return r&&(h.x1=h.x1-s/e*r,h.y1=h.y1-o/e*r),n&&(h.x2=h.x2+s/e*n,h.y2=h.y2+o/e*n),h};p.exports=c},26708:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(52816),c=t(6113),h=t(2141),r=function(n,e,s,o,i){o===void 0&&(o=0),i===void 0&&(i=[]);var a=[],l=n.x1,u=n.y1,f=n.x2-l,v=n.y2-u,m=c(e,i),g,x,y=s-1;for(g=0;g<y;g++)x=m(g/y),a.push(new h(l+f*x,u+v*x));if(x=m(1),a.push(new h(l+f*x,u+v*x)),o>0){var T=a[0],C=[T];for(g=1;g<a.length-1;g++){var E=a[g];d(T,E)>=o&&(C.push(E),T=E)}var M=a[a.length-1];return d(T,M)<o&&C.pop(),C.push(M),C}else return a};p.exports=r},32125:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=(h.x1+h.x2)/2,r.y=(h.y1+h.y2)/2,r};p.exports=c},99569:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Florian Mertens
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r,n){n===void 0&&(n=new d);var e=h.x1,s=h.y1,o=h.x2,i=h.y2,a=(o-e)*(o-e)+(i-s)*(i-s);if(a===0)return n;var l=((r.x-e)*(o-e)+(r.y-s)*(i-s))/a;return n.x=e+l*(o-e),n.y=s+l*(i-s),n};p.exports=c},34638:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(36383),c=t(91938),h=t(2141),r=function(n,e){e===void 0&&(e=new h);var s=c(n)-d.TAU;return e.x=Math.cos(s),e.y=Math.sin(s),e};p.exports=r},13151:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r,n){return n===void 0&&(n=new d),n.x=h.x1+(h.x2-h.x1)*r,n.y=h.y1+(h.y2-h.y1)*r,n};p.exports=c},15258:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(35001),c=t(2141),h=function(r,n,e,s){s===void 0&&(s=[]),!n&&e>0&&(n=d(r)/e);for(var o=r.x1,i=r.y1,a=r.x2,l=r.y2,u=0;u<n;u++){var f=u/n,v=o+(a-o)*f,m=i+(l-i)*f;s.push(new c(v,m))}return s};p.exports=h},26408:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Florian Mertens
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=t.x1,h=t.y1,r=t.x2,n=t.y2,e=(r-c)*(r-c)+(n-h)*(n-h);if(e===0)return!1;var s=((h-d.y)*(r-c)-(c-d.x)*(n-h))/e;return Math.abs(s)*Math.sqrt(e)};p.exports=S},98770:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return Math.abs(t.y1-t.y2)};p.exports=S},35001:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))};p.exports=S},23031:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(13151),h=t(15258),r=t(23777),n=t(65822),e=t(26099),s=new d({initialize:function(i,a,l,u){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),u===void 0&&(u=0),this.type=r.LINE,this.x1=i,this.y1=a,this.x2=l,this.y2=u},getPoint:function(o,i){return c(this,o,i)},getPoints:function(o,i,a){return h(this,o,i,a)},getRandomPoint:function(o){return n(this,o)},setTo:function(o,i,a,l){return o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),this.x1=o,this.y1=i,this.x2=a,this.y2=l,this},setFromObjects:function(o,i){return this.x1=o.x,this.y1=o.y,this.x2=i.x,this.y2=i.y,this},getPointA:function(o){return o===void 0&&(o=new e),o.set(this.x1,this.y1),o},getPointB:function(o){return o===void 0&&(o=new e),o.set(this.x2,this.y2),o},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(o){this.x1<=this.x2?this.x1=o:this.x2=o}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(o){this.x1>this.x2?this.x1=o:this.x2=o}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(o){this.y1<=this.y2?this.y1=o:this.y2=o}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(o){this.y1>this.y2?this.y1=o:this.y2=o}}});p.exports=s},64795:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(36383),c=t(15994),h=t(91938),r=function(n){var e=h(n)-d.TAU;return c(e,-Math.PI,Math.PI)};p.exports=r},52616:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(36383),c=t(91938),h=function(r){return Math.cos(c(r)-d.TAU)};p.exports=h},87231:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(36383),c=t(91938),h=function(r){return Math.sin(c(r)-d.TAU)};p.exports=h},89662:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return t.x1+=d,t.y1+=c,t.x2+=d,t.y2+=c,t};p.exports=S},71165:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return-((t.x2-t.x1)/(t.y2-t.y1))};p.exports=S},65822:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r){r===void 0&&(r=new d);var n=Math.random();return r.x=h.x1+n*(h.x2-h.x1),r.y=h.y1+n*(h.y2-h.y1),r};p.exports=c},69777:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91938),c=t(64795),h=function(r,n){return 2*c(n)-Math.PI-d(r)};p.exports=h},39706:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(64400),c=function(h,r){var n=(h.x1+h.x2)/2,e=(h.y1+h.y2)/2;return d(h,n,e,r)};p.exports=c},82585:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(64400),c=function(h,r,n){return d(h,r.x,r.y,n)};p.exports=c},64400:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){var r=Math.cos(h),n=Math.sin(h),e=t.x1-d,s=t.y1-c;return t.x1=e*r-s*n+d,t.y1=e*n+s*r+c,e=t.x2-d,s=t.y2-c,t.x2=e*r-s*n+d,t.y2=e*n+s*r+c,t};p.exports=S},62377:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h,r){return t.x1=d,t.y1=c,t.x2=d+Math.cos(h)*r,t.y2=c+Math.sin(h)*r,t};p.exports=S},71366:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return(t.y2-t.y1)/(t.x2-t.x1)};p.exports=S},10809:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return Math.abs(t.x1-t.x2)};p.exports=S},2529:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(23031);d.Angle=t(91938),d.BresenhamPoints=t(84993),d.CenterOn=t(36469),d.Clone=t(31116),d.CopyFrom=t(59944),d.Equals=t(59220),d.Extend=t(78177),d.GetEasedPoints=t(26708),d.GetMidPoint=t(32125),d.GetNearestPoint=t(99569),d.GetNormal=t(34638),d.GetPoint=t(13151),d.GetPoints=t(15258),d.GetShortestDistance=t(26408),d.Height=t(98770),d.Length=t(35001),d.NormalAngle=t(64795),d.NormalX=t(52616),d.NormalY=t(87231),d.Offset=t(89662),d.PerpSlope=t(71165),d.Random=t(65822),d.ReflectAngle=t(69777),d.Rotate=t(39706),d.RotateAroundPoint=t(82585),d.RotateAroundXY=t(64400),d.SetToAngle=t(62377),d.Slope=t(71366),d.Width=t(10809),p.exports=d},83997:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(87841),h=t(26099);function r(e,s,o,i){var a=e-o,l=s-i,u=a*a+l*l;return Math.sqrt(u)}var n=new d({initialize:function(s,o,i){this.vertex1=s,this.vertex2=o,this.vertex3=i,this.bounds=new c,this._inCenter=new h},getInCenter:function(e){e===void 0&&(e=!0);var s=this.vertex1,o=this.vertex2,i=this.vertex3,a,l,u,f,v,m;e?(a=s.x,l=s.y,u=o.x,f=o.y,v=i.x,m=i.y):(a=s.vx,l=s.vy,u=o.vx,f=o.vy,v=i.vx,m=i.vy);var g=r(v,m,u,f),x=r(a,l,v,m),y=r(u,f,a,l),T=g+x+y;return this._inCenter.set((a*g+u*x+v*y)/T,(l*g+f*x+m*y)/T)},contains:function(e,s,o){var i=this.vertex1,a=this.vertex2,l=this.vertex3,u=i.vx,f=i.vy,v=a.vx,m=a.vy,g=l.vx,x=l.vy;if(o){var y=o.a,T=o.b,C=o.c,E=o.d,M=o.e,P=o.f;u=i.vx*y+i.vy*C+M,f=i.vx*T+i.vy*E+P,v=a.vx*y+a.vy*C+M,m=a.vx*T+a.vy*E+P,g=l.vx*y+l.vy*C+M,x=l.vx*T+l.vy*E+P}var A=g-u,R=x-f,F=v-u,w=m-f,B=e-u,N=s-f,U=A*A+R*R,D=A*F+R*w,I=A*B+R*N,O=F*F+w*w,L=F*B+w*N,G=U*O-D*D,z=G===0?0:1/G,X=(O*I-D*L)*z,V=(U*L-D*I)*z;return X>=0&&V>=0&&X+V<1},isCounterClockwise:function(e){var s=this.vertex1,o=this.vertex2,i=this.vertex3,a=(o.vx-s.vx)*(i.vy-s.vy)-(o.vy-s.vy)*(i.vx-s.vx);return e<=0?a>=0:a<0},load:function(e,s,o,i,a){return o=this.vertex1.load(e,s,o,i,a),o=this.vertex2.load(e,s,o,i,a),o=this.vertex3.load(e,s,o,i,a),o},transformCoordinatesLocal:function(e,s,o,i){return this.vertex1.transformCoordinatesLocal(e,s,o,i),this.vertex2.transformCoordinatesLocal(e,s,o,i),this.vertex3.transformCoordinatesLocal(e,s,o,i),this},updateBounds:function(){var e=this.vertex1,s=this.vertex2,o=this.vertex3,i=this.bounds;return i.x=Math.min(e.vx,s.vx,o.vx),i.y=Math.min(e.vy,s.vy,o.vy),i.width=Math.max(e.vx,s.vx,o.vx)-i.x,i.height=Math.max(e.vy,s.vy,o.vy)-i.y,this},isInView:function(e,s,o,i,a,l,u,f,v,m,g){this.update(i,a,l,u,f,v,m,g);var x=this.vertex1,y=this.vertex2,T=this.vertex3;if(x.ta<=0&&y.ta<=0&&T.ta<=0||s&&!this.isCounterClockwise(o))return!1;var C=this.bounds;C.x=Math.min(x.tx,y.tx,T.tx),C.y=Math.min(x.ty,y.ty,T.ty),C.width=Math.max(x.tx,y.tx,T.tx)-C.x,C.height=Math.max(x.ty,y.ty,T.ty)-C.y;var E=e.x+e.width,M=e.y+e.height;return C.width<=0||C.height<=0||e.width<=0||e.height<=0?!1:!(C.right<e.x||C.bottom<e.y||C.x>E||C.y>M)},scrollUV:function(e,s){return this.vertex1.scrollUV(e,s),this.vertex2.scrollUV(e,s),this.vertex3.scrollUV(e,s),this},scaleUV:function(e,s){return this.vertex1.scaleUV(e,s),this.vertex2.scaleUV(e,s),this.vertex3.scaleUV(e,s),this},setColor:function(e){return this.vertex1.color=e,this.vertex2.color=e,this.vertex3.color=e,this},update:function(e,s,o,i,a,l,u,f){return this.vertex1.update(s,o,i,a,l,u,f,e),this.vertex2.update(s,o,i,a,l,u,f,e),this.vertex3.update(s,o,i,a,l,u,f,e),this},translate:function(e,s){s===void 0&&(s=0);var o=this.vertex1,i=this.vertex2,a=this.vertex3;return o.x+=e,o.y+=s,i.x+=e,i.y+=s,a.x+=e,a.y+=s,this},x:{get:function(){return this.getInCenter().x},set:function(e){var s=this.getInCenter();this.translate(e-s.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(e){var s=this.getInCenter();this.translate(0,e-s.y)}},alpha:{get:function(){var e=this.vertex1,s=this.vertex2,o=this.vertex3;return(e.alpha+s.alpha+o.alpha)/3},set:function(e){this.vertex1.alpha=e,this.vertex2.alpha=e,this.vertex3.alpha=e}},depth:{get:function(){var e=this.vertex1,s=this.vertex2,o=this.vertex3;return(e.vz+s.vz+o.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});p.exports=n},48803:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83997),c=t(95540),h=t(37867),r=t(25836),n=t(39318),e=new r,s=new r,o=new h,i=function(a){var l=c(a,"mesh"),u=c(a,"texture",null),f=c(a,"frame"),v=c(a,"width",1),m=c(a,"height",v),g=c(a,"widthSegments",1),x=c(a,"heightSegments",g),y=c(a,"x",0),T=c(a,"y",0),C=c(a,"z",0),E=c(a,"rotateX",0),M=c(a,"rotateY",0),P=c(a,"rotateZ",0),A=c(a,"zIsUp",!0),R=c(a,"isOrtho",l?l.dirtyCache[11]:!1),F=c(a,"colors",[16777215]),w=c(a,"alphas",[1]),B=c(a,"tile",!1),N=c(a,"flipY",!1),U=c(a,"width",null),D={faces:[],verts:[]};e.set(y,T,C),s.set(E,M,P),o.fromRotationXYTranslation(s,e,A);var I;if(!u&&l)u=l.texture,f||(I=l.frame);else if(l&&typeof u=="string")u=l.scene.sys.textures.get(u);else if(!u)return D;I||(I=u.get(f)),!U&&R&&u&&l&&(v=I.width/l.height,m=I.height/l.height);var O=v/2,L=m/2,G=Math.floor(g),z=Math.floor(x),X=G+1,V=z+1,Y=v/G,W=m/z,H=[],b=[],K,Q,Z=0,$=1,q=0,_=1;I&&(Z=I.u0,$=I.u1,N?(q=I.v1,_=I.v0):(q=I.v0,_=I.v1));var tt=$-Z,J=_-q;for(Q=0;Q<V;Q++){var j=Q*W-L;for(K=0;K<X;K++){var k=K*Y-O;b.push(k,-j);var et=Z+tt*(K/G),it=q+J*(Q/z);H.push(et,it)}}Array.isArray(F)||(F=[F]),Array.isArray(w)||(w=[w]);var ht=0,at=0;for(Q=0;Q<z;Q++)for(K=0;K<G;K++){var ft=(K+X*Q)*2,rt=(K+X*(Q+1))*2,dt=(K+1+X*(Q+1))*2,st=(K+1+X*Q)*2,vt=F[at],lt=w[ht],pt=new n(b[ft],b[ft+1],0,H[ft],H[ft+1],vt,lt).transformMat4(o),St=new n(b[rt],b[rt+1],0,H[rt],H[rt+1],vt,lt).transformMat4(o),Ct=new n(b[st],b[st+1],0,H[st],H[st+1],vt,lt).transformMat4(o),ct=new n(b[rt],b[rt+1],0,H[rt],H[rt+1],vt,lt).transformMat4(o),ot=new n(b[dt],b[dt+1],0,H[dt],H[dt+1],vt,lt).transformMat4(o),yt=new n(b[st],b[st+1],0,H[st],H[st+1],vt,lt).transformMat4(o);B&&(pt.setUVs(Z,_),St.setUVs(Z,q),Ct.setUVs($,_),ct.setUVs(Z,q),ot.setUVs($,q),yt.setUVs($,_)),at++,at===F.length&&(at=0),ht++,ht===w.length&&(ht=0),D.verts.push(pt,St,Ct,ct,ot,yt),D.faces.push(new d(pt,St,Ct),new d(ct,ot,yt))}return l&&(l.faces=l.faces.concat(D.faces),l.vertices=l.vertices.concat(D.verts)),D};p.exports=i},34684:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83997),c=t(37867),h=t(25836),r=t(39318),n=new h,e=new h,s=new c,o=function(i,a,l,u,f,v,m,g,x,y){l===void 0&&(l=1),u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=0),m===void 0&&(m=0),g===void 0&&(g=0),x===void 0&&(x=0),y===void 0&&(y=!0);var T={faces:[],verts:[]},C=i.materials;n.set(u,f,v),e.set(m,g,x),s.fromRotationXYTranslation(e,n,y);for(var E=0;E<i.models.length;E++)for(var M=i.models[E],P=M.vertices,A=M.textureCoords,R=M.faces,F=0;F<R.length;F++){var w=R[F],B=w.vertices[0],N=w.vertices[1],U=w.vertices[2],D=P[B.vertexIndex],I=P[N.vertexIndex],O=P[U.vertexIndex],L=B.textureCoordsIndex,G=N.textureCoordsIndex,z=U.textureCoordsIndex,X=L===-1?{u:0,v:1}:A[L],V=G===-1?{u:0,v:0}:A[G],Y=z===-1?{u:1,v:1}:A[z],W=16777215;w.material!==""&&C[w.material]&&(W=C[w.material]);var H=new r(D.x*l,D.y*l,D.z*l,X.u,X.v,W).transformMat4(s),b=new r(I.x*l,I.y*l,I.z*l,V.u,V.v,W).transformMat4(s),K=new r(O.x*l,O.y*l,O.z*l,Y.u,Y.v,W).transformMat4(s);T.verts.push(H,b,K),T.faces.push(new d(H,b,K))}return a&&(a.faces=a.faces.concat(T.faces),a.vertices=a.vertices.concat(T.verts)),T};p.exports=o},92515:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83997),c=t(39318),h=function(r,n,e,s,o,i,a,l){if(s===void 0&&(s=!1),i===void 0&&(i=16777215),a===void 0&&(a=1),l===void 0&&(l=!1),r.length!==n.length&&!s){console.warn("GenerateVerts: vertices and uvs count not equal");return}var u={faces:[],vertices:[]},f,v,m,g,x,y,T,C,E,M,P,A=s?3:2,R=Array.isArray(i),F=Array.isArray(a);if(Array.isArray(e)&&e.length>0)for(f=0;f<e.length;f++){var w=e[f],B=e[f]*2,N=e[f]*A;v=r[N],m=r[N+1],g=s?r[N+2]:0,x=n[B],y=n[B+1],l&&(y=1-y),T=R?i[w]:i,C=F?a[w]:a,E=0,M=0,P=0,o&&(E=o[N],M=o[N+1],P=s?o[N+2]:0),u.vertices.push(new c(v,m,g,x,y,T,C,E,M,P))}else{var U=0,D=0;for(f=0;f<r.length;f+=A)v=r[f],m=r[f+1],g=s?r[f+2]:0,x=n[U],y=n[U+1],T=R?i[D]:i,C=F?a[D]:a,E=0,M=0,P=0,o&&(E=o[f],M=o[f+1],P=s?o[f+2]:0),u.vertices.push(new c(v,m,g,x,y,T,C,E,M,P)),U+=2,D++}for(f=0;f<u.vertices.length;f+=3){var I=u.vertices[f],O=u.vertices[f+1],L=u.vertices[f+2];u.faces.push(new d(I,O,L))}return u};p.exports=h},85048:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=!0,t="untitled",d="",c="";function h(v){var m=v.indexOf("#");return m>-1?v.substring(0,m):v}function r(v){return v.models.length===0&&v.models.push({faces:[],name:t,textureCoords:[],vertexNormals:[],vertices:[]}),d="",v.models[v.models.length-1]}function n(v,m){var g=v.length>=2?v[1]:t;m.models.push({faces:[],name:g,textureCoords:[],vertexNormals:[],vertices:[]}),d=""}function e(v){v.length===2&&(d=v[1])}function s(v,m){var g=v.length,x=g>=2?parseFloat(v[1]):0,y=g>=3?parseFloat(v[2]):0,T=g>=4?parseFloat(v[3]):0;r(m).vertices.push({x,y,z:T})}function o(v,m){var g=v.length,x=g>=2?parseFloat(v[1]):0,y=g>=3?parseFloat(v[2]):0,T=g>=4?parseFloat(v[3]):0;isNaN(x)&&(x=0),isNaN(y)&&(y=0),isNaN(T)&&(T=0),S&&(y=1-y),r(m).textureCoords.push({u:x,v:y,w:T})}function i(v,m){var g=v.length,x=g>=2?parseFloat(v[1]):0,y=g>=3?parseFloat(v[2]):0,T=g>=4?parseFloat(v[3]):0;r(m).vertexNormals.push({x,y,z:T})}function a(v,m){var g=v.length-1;if(!(g<3)){for(var x={group:d,material:c,vertices:[]},y=0;y<g;y++){var T=v[y+1],C=T.split("/"),E=C.length;if(!(E<1||E>3)){var M=0,P=0,A=0;M=parseInt(C[0],10),E>1&&C[1]!==""&&(P=parseInt(C[1],10)),E>2&&(A=parseInt(C[2],10)),M!==0&&(M<0&&(M=r(m).vertices.length+1+M),P-=1,M-=1,A-=1,x.vertices.push({textureCoordsIndex:P,vertexIndex:M,vertexNormalIndex:A}))}}r(m).faces.push(x)}}function l(v,m){v.length>=2&&m.materialLibraries.push(v[1])}function u(v){v.length>=2&&(c=v[1])}var f=function(v,m){m===void 0&&(m=!0),S=m;var g={materials:{},materialLibraries:[],models:[]};d="",c="";for(var x=v.split(`
`),y=0;y<x.length;y++){var T=h(x[y]),C=T.replace(/\s\s+/g," ").trim().split(" ");switch(C[0].toLowerCase()){case"o":n(C,g);break;case"g":e(C);break;case"v":s(C,g);break;case"vt":o(C,g);break;case"vn":i(C,g);break;case"f":a(C,g);break;case"mtllib":l(C,g);break;case"usemtl":u(C);break}}return g};p.exports=f},61485:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(37589),c=function(h){for(var r={},n=h.split(`
`),e="",s=0;s<n.length;s++){var o=n[s].trim();if(!(o.indexOf("#")===0||o==="")){var i=o.replace(/\s\s+/g," ").trim().split(" ");switch(i[0].toLowerCase()){case"newmtl":{e=i[1];break}case"kd":{var a=Math.floor(i[1]*255),l=i.length>=2?Math.floor(i[2]*255):a,u=i.length>=3?Math.floor(i[3]*255):a;r[e]=d(a,l,u);break}}}}return r};p.exports=c},92570:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){var r,n;if(c===void 0&&h===void 0){var e=t.getInCenter();r=e.x,n=e.y}var s=Math.cos(d),o=Math.sin(d),i=t.vertex1,a=t.vertex2,l=t.vertex3,u=i.x-r,f=i.y-n;i.set(u*s-f*o+r,u*o+f*s+n),u=a.x-r,f=a.y-n,a.set(u*s-f*o+r,u*o+f*s+n),u=l.x-r,f=l.y-n,l.set(u*s-f*o+r,u*o+f*s+n)};p.exports=S},39318:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(70554),h=t(25836),r=new d({Extends:h,initialize:function(e,s,o,i,a,l,u,f,v,m){l===void 0&&(l=16777215),u===void 0&&(u=1),f===void 0&&(f=0),v===void 0&&(v=0),m===void 0&&(m=0),h.call(this,e,s,o),this.vx=0,this.vy=0,this.vz=0,this.nx=f,this.ny=v,this.nz=m,this.u=i,this.v=a,this.color=l,this.alpha=u,this.tx=0,this.ty=0,this.ta=0,this.tu=i,this.tv=a},setUVs:function(n,e){return this.u=n,this.v=e,this.tu=n,this.tv=e,this},scrollUV:function(n,e){return this.tu+=n,this.tv+=e,this},scaleUV:function(n,e){return this.tu=this.u*n,this.tv=this.v*e,this},transformCoordinatesLocal:function(n,e,s,o){var i=this.x,a=this.y,l=this.z,u=n.val,f=i*u[0]+a*u[4]+l*u[8]+u[12],v=i*u[1]+a*u[5]+l*u[9]+u[13],m=i*u[2]+a*u[6]+l*u[10]+u[14],g=i*u[3]+a*u[7]+l*u[11]+u[15];this.vx=f/g*e,this.vy=-(v/g)*s,o<=0?this.vz=m/g:this.vz=-(m/g)},resize:function(n,e,s,o,i,a){return this.x=n,this.y=e,this.vx=this.x*s,this.vy=-this.y*o,this.vz=0,i<.5?this.vx+=s*(.5-i):i>.5&&(this.vx-=s*(i-.5)),a<.5?this.vy+=o*(.5-a):a>.5&&(this.vy-=o*(a-.5)),this},update:function(n,e,s,o,i,a,l,u){var f=this.vx*n+this.vy*s+i,v=this.vx*e+this.vy*o+a;return l&&(f=Math.round(f),v=Math.round(v)),this.tx=f,this.ty=v,this.ta=this.alpha*u,this},load:function(n,e,s,o,i){return n[++s]=this.tx,n[++s]=this.ty,n[++s]=this.tu,n[++s]=this.tv,n[++s]=o,n[++s]=i,e[++s]=c.getTintAppendFloatAlpha(this.color,this.ta),s}});p.exports=r},73090:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d={Face:t(83997),GenerateGridVerts:t(48803),GenerateObjVerts:t(34684),GenerateVerts:t(92515),ParseObj:t(85048),ParseObjMaterial:t(61485),RotateFace:t(92570),Vertex:t(39318)};p.exports=d},96550:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))};p.exports=S},99706:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h){return new d(h.x,h.y)};p.exports=c},68010:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d.setTo(t.x,t.y)};p.exports=S},27814:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.x===d.x&&t.y===d.y};p.exports=S},73565:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))};p.exports=S},87555:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r){if(r===void 0&&(r=new d),!Array.isArray(h))throw new Error("GetCentroid points argument must be an array");var n=h.length;if(n<1)throw new Error("GetCentroid points array must not be empty");if(n===1)r.x=h[0].x,r.y=h[0].y;else{for(var e=0;e<n;e++)r.x+=h[e].x,r.y+=h[e].y;r.x/=n,r.y/=n}return r};p.exports=c},28793:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)};p.exports=S},44405:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.x*t.x+t.y*t.y};p.exports=S},20873:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87841),c=function(h,r){r===void 0&&(r=new d);for(var n=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=0;i<h.length;i++){var a=h[i];a.x>n&&(n=a.x),a.x<e&&(e=a.x),a.y>s&&(s=a.y),a.y<o&&(o=a.y)}return r.x=e,r.y=o,r.width=n-e,r.height=s-o,r};p.exports=c},26152:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r,n,e){return n===void 0&&(n=0),e===void 0&&(e=new d),e.x=h.x+(r.x-h.x)*n,e.y=h.y+(r.y-h.y)*n,e};p.exports=c},55767:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.setTo(t.y,t.x)};p.exports=S},79432:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.setTo(-h.x,-h.y)};p.exports=c},2141:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23777),h=new d({initialize:function(n,e){n===void 0&&(n=0),e===void 0&&(e=n),this.type=c.POINT,this.x=n,this.y=e},setTo:function(r,n){return r===void 0&&(r=0),n===void 0&&(n=r),this.x=r,this.y=n,this}});p.exports=h},72930:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=t(44405),h=function(r,n,e){e===void 0&&(e=new d);var s=r.x*n.x+r.y*n.y,o=s/c(n);return o!==0&&(e.x=o*n.x,e.y=o*n.y),e};p.exports=h},62880:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r,n){n===void 0&&(n=new d);var e=h.x*r.x+h.y*r.y;return e!==0&&(n.x=e*r.x,n.y=e*r.y),n};p.exports=c},15093:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(28793),c=function(h,r){if(h.x!==0||h.y!==0){var n=d(h);h.x/=n,h.y/=n}return h.x*=r,h.y*=r,h};p.exports=c},43711:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141);d.Ceil=t(96550),d.Clone=t(99706),d.CopyFrom=t(68010),d.Equals=t(27814),d.Floor=t(73565),d.GetCentroid=t(87555),d.GetMagnitude=t(28793),d.GetMagnitudeSq=t(44405),d.GetRectangleFromPoints=t(20873),d.Interpolate=t(26152),d.Invert=t(55767),d.Negative=t(79432),d.Project=t(72930),d.ProjectUnit=t(62880),d.SetMagnitude=t(15093),p.exports=d},12306:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25717),c=function(h){return new d(h.points)};p.exports=c},63814:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){for(var h=!1,r=-1,n=t.points.length-1;++r<t.points.length;n=r){var e=t.points[r].x,s=t.points[r].y,o=t.points[n].x,i=t.points[n].y;(s<=c&&c<i||i<=c&&c<s)&&d<(o-e)*(c-s)/(i-s)+e&&(h=!h)}return h};p.exports=S},99338:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(63814),c=function(h,r){return d(h,r.x,r.y)};p.exports=c},94811:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/function S(D,I,O){O=O||2;var L=I&&I.length,G=L?I[0]*O:D.length,z=t(D,0,G,O,!0),X=[];if(!z||z.next===z.prev)return X;var V,Y,W,H,b,K,Q;if(L&&(z=s(D,I,z,O)),D.length>80*O){V=W=D[0],Y=H=D[1];for(var Z=O;Z<G;Z+=O)b=D[Z],K=D[Z+1],b<V&&(V=b),K<Y&&(Y=K),b>W&&(W=b),K>H&&(H=K);Q=Math.max(W-V,H-Y),Q=Q!==0?32767/Q:0}return c(z,X,O,V,Y,Q,0),X}function t(D,I,O,L,G){var z,X;if(G===U(D,I,O,L)>0)for(z=I;z<O;z+=L)X=w(z,D[z],D[z+1],X);else for(z=O-L;z>=I;z-=L)X=w(z,D[z],D[z+1],X);return X&&T(X,X.next)&&(B(X),X=X.next),X}function d(D,I){if(!D)return D;I||(I=D);var O=D,L;do if(L=!1,!O.steiner&&(T(O,O.next)||y(O.prev,O,O.next)===0)){if(B(O),O=I=O.prev,O===O.next)break;L=!0}else O=O.next;while(L||O!==I);return I}function c(D,I,O,L,G,z,X){if(D){!X&&z&&u(D,L,G,z);for(var V=D,Y,W;D.prev!==D.next;){if(Y=D.prev,W=D.next,z?r(D,L,G,z):h(D)){I.push(Y.i/O|0),I.push(D.i/O|0),I.push(W.i/O|0),B(D),D=W.next,V=W.next;continue}if(D=W,D===V){X?X===1?(D=n(d(D),I,O),c(D,I,O,L,G,z,2)):X===2&&e(D,I,O,L,G,z):c(d(D),I,O,L,G,z,1);break}}}}function h(D){var I=D.prev,O=D,L=D.next;if(y(I,O,L)>=0)return!1;for(var G=I.x,z=O.x,X=L.x,V=I.y,Y=O.y,W=L.y,H=G<z?G<X?G:X:z<X?z:X,b=V<Y?V<W?V:W:Y<W?Y:W,K=G>z?G>X?G:X:z>X?z:X,Q=V>Y?V>W?V:W:Y>W?Y:W,Z=L.next;Z!==I;){if(Z.x>=H&&Z.x<=K&&Z.y>=b&&Z.y<=Q&&g(G,V,z,Y,X,W,Z.x,Z.y)&&y(Z.prev,Z,Z.next)>=0)return!1;Z=Z.next}return!0}function r(D,I,O,L){var G=D.prev,z=D,X=D.next;if(y(G,z,X)>=0)return!1;for(var V=G.x,Y=z.x,W=X.x,H=G.y,b=z.y,K=X.y,Q=V<Y?V<W?V:W:Y<W?Y:W,Z=H<b?H<K?H:K:b<K?b:K,$=V>Y?V>W?V:W:Y>W?Y:W,q=H>b?H>K?H:K:b>K?b:K,_=v(Q,Z,I,O,L),tt=v($,q,I,O,L),J=D.prevZ,j=D.nextZ;J&&J.z>=_&&j&&j.z<=tt;){if(J.x>=Q&&J.x<=$&&J.y>=Z&&J.y<=q&&J!==G&&J!==X&&g(V,H,Y,b,W,K,J.x,J.y)&&y(J.prev,J,J.next)>=0||(J=J.prevZ,j.x>=Q&&j.x<=$&&j.y>=Z&&j.y<=q&&j!==G&&j!==X&&g(V,H,Y,b,W,K,j.x,j.y)&&y(j.prev,j,j.next)>=0))return!1;j=j.nextZ}for(;J&&J.z>=_;){if(J.x>=Q&&J.x<=$&&J.y>=Z&&J.y<=q&&J!==G&&J!==X&&g(V,H,Y,b,W,K,J.x,J.y)&&y(J.prev,J,J.next)>=0)return!1;J=J.prevZ}for(;j&&j.z<=tt;){if(j.x>=Q&&j.x<=$&&j.y>=Z&&j.y<=q&&j!==G&&j!==X&&g(V,H,Y,b,W,K,j.x,j.y)&&y(j.prev,j,j.next)>=0)return!1;j=j.nextZ}return!0}function n(D,I,O){var L=D;do{var G=L.prev,z=L.next.next;!T(G,z)&&C(G,L,L.next,z)&&A(G,z)&&A(z,G)&&(I.push(G.i/O|0),I.push(L.i/O|0),I.push(z.i/O|0),B(L),B(L.next),L=D=z),L=L.next}while(L!==D);return d(L)}function e(D,I,O,L,G,z){var X=D;do{for(var V=X.next.next;V!==X.prev;){if(X.i!==V.i&&x(X,V)){var Y=F(X,V);X=d(X,X.next),Y=d(Y,Y.next),c(X,I,O,L,G,z,0),c(Y,I,O,L,G,z,0);return}V=V.next}X=X.next}while(X!==D)}function s(D,I,O,L){var G=[],z,X,V,Y,W;for(z=0,X=I.length;z<X;z++)V=I[z]*L,Y=z<X-1?I[z+1]*L:D.length,W=t(D,V,Y,L,!1),W===W.next&&(W.steiner=!0),G.push(m(W));for(G.sort(o),z=0;z<G.length;z++)O=i(G[z],O);return O}function o(D,I){return D.x-I.x}function i(D,I){var O=a(D,I);if(!O)return I;var L=F(O,D);return d(L,L.next),d(O,O.next)}function a(D,I){var O=I,L=D.x,G=D.y,z=-1/0,X;do{if(G<=O.y&&G>=O.next.y&&O.next.y!==O.y){var V=O.x+(G-O.y)*(O.next.x-O.x)/(O.next.y-O.y);if(V<=L&&V>z&&(z=V,X=O.x<O.next.x?O:O.next,V===L))return X}O=O.next}while(O!==I);if(!X)return null;var Y=X,W=X.x,H=X.y,b=1/0,K;O=X;do L>=O.x&&O.x>=W&&L!==O.x&&g(G<H?L:z,G,W,H,G<H?z:L,G,O.x,O.y)&&(K=Math.abs(G-O.y)/(L-O.x),A(O,D)&&(K<b||K===b&&(O.x>X.x||O.x===X.x&&l(X,O)))&&(X=O,b=K)),O=O.next;while(O!==Y);return X}function l(D,I){return y(D.prev,D,I.prev)<0&&y(I.next,D,D.next)<0}function u(D,I,O,L){var G=D;do G.z===0&&(G.z=v(G.x,G.y,I,O,L)),G.prevZ=G.prev,G.nextZ=G.next,G=G.next;while(G!==D);G.prevZ.nextZ=null,G.prevZ=null,f(G)}function f(D){var I,O,L,G,z,X,V,Y,W=1;do{for(O=D,D=null,z=null,X=0;O;){for(X++,L=O,V=0,I=0;I<W&&(V++,L=L.nextZ,!!L);I++);for(Y=W;V>0||Y>0&&L;)V!==0&&(Y===0||!L||O.z<=L.z)?(G=O,O=O.nextZ,V--):(G=L,L=L.nextZ,Y--),z?z.nextZ=G:D=G,G.prevZ=z,z=G;O=L}z.nextZ=null,W*=2}while(X>1);return D}function v(D,I,O,L,G){return D=(D-O)*G|0,I=(I-L)*G|0,D=(D|D<<8)&16711935,D=(D|D<<4)&252645135,D=(D|D<<2)&858993459,D=(D|D<<1)&1431655765,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,D|I<<1}function m(D){var I=D,O=D;do(I.x<O.x||I.x===O.x&&I.y<O.y)&&(O=I),I=I.next;while(I!==D);return O}function g(D,I,O,L,G,z,X,V){return(G-X)*(I-V)>=(D-X)*(z-V)&&(D-X)*(L-V)>=(O-X)*(I-V)&&(O-X)*(z-V)>=(G-X)*(L-V)}function x(D,I){return D.next.i!==I.i&&D.prev.i!==I.i&&!P(D,I)&&(A(D,I)&&A(I,D)&&R(D,I)&&(y(D.prev,D,I.prev)||y(D,I.prev,I))||T(D,I)&&y(D.prev,D,D.next)>0&&y(I.prev,I,I.next)>0)}function y(D,I,O){return(I.y-D.y)*(O.x-I.x)-(I.x-D.x)*(O.y-I.y)}function T(D,I){return D.x===I.x&&D.y===I.y}function C(D,I,O,L){var G=M(y(D,I,O)),z=M(y(D,I,L)),X=M(y(O,L,D)),V=M(y(O,L,I));return!!(G!==z&&X!==V||G===0&&E(D,O,I)||z===0&&E(D,L,I)||X===0&&E(O,D,L)||V===0&&E(O,I,L))}function E(D,I,O){return I.x<=Math.max(D.x,O.x)&&I.x>=Math.min(D.x,O.x)&&I.y<=Math.max(D.y,O.y)&&I.y>=Math.min(D.y,O.y)}function M(D){return D>0?1:D<0?-1:0}function P(D,I){var O=D;do{if(O.i!==D.i&&O.next.i!==D.i&&O.i!==I.i&&O.next.i!==I.i&&C(O,O.next,D,I))return!0;O=O.next}while(O!==D);return!1}function A(D,I){return y(D.prev,D,D.next)<0?y(D,I,D.next)>=0&&y(D,D.prev,I)>=0:y(D,I,D.prev)<0||y(D,D.next,I)<0}function R(D,I){var O=D,L=!1,G=(D.x+I.x)/2,z=(D.y+I.y)/2;do O.y>z!=O.next.y>z&&O.next.y!==O.y&&G<(O.next.x-O.x)*(z-O.y)/(O.next.y-O.y)+O.x&&(L=!L),O=O.next;while(O!==D);return L}function F(D,I){var O=new N(D.i,D.x,D.y),L=new N(I.i,I.x,I.y),G=D.next,z=I.prev;return D.next=I,I.prev=D,O.next=G,G.prev=O,L.next=O,O.prev=L,z.next=L,L.prev=z,L}function w(D,I,O,L){var G=new N(D,I,O);return L?(G.next=L.next,G.prev=L,L.next.prev=G,L.next=G):(G.prev=G,G.next=G),G}function B(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function N(D,I,O){this.i=D,this.x=I,this.y=O,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}S.deviation=function(D,I,O,L){var G=I&&I.length,z=G?I[0]*O:D.length,X=Math.abs(U(D,0,z,O));if(G)for(var V=0,Y=I.length;V<Y;V++){var W=I[V]*O,H=V<Y-1?I[V+1]*O:D.length;X-=Math.abs(U(D,W,H,O))}var b=0;for(V=0;V<L.length;V+=3){var K=L[V]*O,Q=L[V+1]*O,Z=L[V+2]*O;b+=Math.abs((D[K]-D[Z])*(D[Q+1]-D[K+1])-(D[K]-D[Q])*(D[Z+1]-D[K+1]))}return X===0&&b===0?0:Math.abs((b-X)/X)};function U(D,I,O,L){for(var G=0,z=I,X=O-L;z<O;z+=L)G+=(D[X]-D[z])*(D[z+1]+D[X+1]),X=z;return G}S.flatten=function(D){for(var I=D[0][0].length,O={vertices:[],holes:[],dimensions:I},L=0,G=0;G<D.length;G++){for(var z=0;z<D[G].length;z++)for(var X=0;X<I;X++)O.vertices.push(D[G][z][X]);G>0&&(L+=D[G-1].length,O.holes.push(L))}return O},p.exports=S},13829:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87841),c=function(h,r){r===void 0&&(r=new d);for(var n=1/0,e=1/0,s=-n,o=-e,i,a=0;a<h.points.length;a++)i=h.points[a],n=Math.min(n,i.x),e=Math.min(e,i.y),s=Math.max(s,i.x),o=Math.max(o,i.y);return r.x=n,r.y=e,r.width=s-n,r.height=o-e,r};p.exports=c},26173:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){d===void 0&&(d=[]);for(var c=0;c<t.points.length;c++)d.push(t.points[c].x),d.push(t.points[c].y);return d};p.exports=S},9564:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(35001),c=t(23031),h=t(30052),r=function(n,e,s,o){o===void 0&&(o=[]);var i=n.points,a=h(n);!e&&s>0&&(e=a/s);for(var l=0;l<e;l++)for(var u=a*(l/e),f=0,v=0;v<i.length;v++){var m=i[v],g=i[(v+1)%i.length],x=new c(m.x,m.y,g.x,g.y),y=d(x);if(u<f||u>f+y){f+=y;continue}var T=x.getPoint((u-f)/y);o.push(T);break}return o};p.exports=r},30052:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(35001),c=t(23031),h=function(r){for(var n=r.points,e=0,s=0;s<n.length;s++){var o=n[s],i=n[(s+1)%n.length],a=new c(o.x,o.y,i.x,i.y);e+=d(a)}return e};p.exports=h},25717:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(63814),h=t(9564),r=t(23777),n=new d({initialize:function(s){this.type=r.POLYGON,this.area=0,this.points=[],s&&this.setTo(s)},contains:function(e,s){return c(this,e,s)},setTo:function(e){if(this.area=0,this.points=[],typeof e=="string"&&(e=e.split(" ")),!Array.isArray(e))return this;for(var s,o=0;o<e.length;o++)s={x:0,y:0},typeof e[o]=="number"||typeof e[o]=="string"?(s.x=parseFloat(e[o]),s.y=parseFloat(e[o+1]),o++):Array.isArray(e[o])?(s.x=e[o][0],s.y=e[o][1]):(s.x=e[o].x,s.y=e[o].y),this.points.push(s);return this.calculateArea(),this},calculateArea:function(){if(this.points.length<3)return this.area=0,this.area;for(var e=0,s,o,i=0;i<this.points.length-1;i++)s=this.points[i],o=this.points[i+1],e+=(o.x-s.x)*(s.y+o.y);return s=this.points[0],o=this.points[this.points.length-1],e+=(s.x-o.x)*(o.y+s.y),this.area=-e*.5,this.area},getPoints:function(e,s,o){return h(this,e,s,o)}});p.exports=n},8133:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.points.reverse(),t};p.exports=S},29524:p=>{function S(n,e){var s=n.x-e.x,o=n.y-e.y;return s*s+o*o}function t(n,e,s){var o=e.x,i=e.y,a=s.x-o,l=s.y-i;if(a!==0||l!==0){var u=((n.x-o)*a+(n.y-i)*l)/(a*a+l*l);u>1?(o=s.x,i=s.y):u>0&&(o+=a*u,i+=l*u)}return a=n.x-o,l=n.y-i,a*a+l*l}function d(n,e){for(var s=n[0],o=[s],i,a=1,l=n.length;a<l;a++)i=n[a],S(i,s)>e&&(o.push(i),s=i);return s!==i&&o.push(i),o}function c(n,e,s,o,i){for(var a=o,l,u=e+1;u<s;u++){var f=t(n[u],n[e],n[s]);f>a&&(l=u,a=f)}a>o&&(l-e>1&&c(n,e,l,o,i),i.push(n[l]),s-l>1&&c(n,l,s,o,i))}function h(n,e){var s=n.length-1,o=[n[0]];return c(n,0,s,e,o),o.push(n[s]),o}var r=function(n,e,s){e===void 0&&(e=1),s===void 0&&(s=!1);var o=n.points;if(o.length>2){var i=e*e;s||(o=d(o,i)),n.setTo(h(o,i))}return n};p.exports=r},5469:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Igor Ognichenko <ognichenko.igor@gmail.com>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(d,c){return d[0]=c[0],d[1]=c[1],d},t=function(d){var c,h=[],r=d.points;for(c=0;c<r.length;c++)h.push([r[c].x,r[c].y]);var n=[];for(h.length>0&&n.push(S([0,0],h[0])),c=0;c<h.length-1;c++){var e=h[c],s=h[c+1],o=e[0],i=e[1],a=s[0],l=s[1];n.push([.85*o+.15*a,.85*i+.15*l]),n.push([.15*o+.85*a,.15*i+.85*l])}return h.length>1&&n.push(S([0,0],h[h.length-1])),d.setTo(n)};p.exports=t},24709:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){for(var h=t.points,r=0;r<h.length;r++)h[r].x+=d,h[r].y+=c;return t};p.exports=S},58423:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25717);d.Clone=t(12306),d.Contains=t(63814),d.ContainsPoint=t(99338),d.Earcut=t(94811),d.GetAABB=t(13829),d.GetNumberArray=t(26173),d.GetPoints=t(9564),d.Perimeter=t(30052),d.Reverse=t(8133),d.Simplify=t(29524),d.Smooth=t(5469),d.Translate=t(24709),p.exports=d},62224:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.width*t.height};p.exports=S},98615:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t};p.exports=S},31688:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t};p.exports=S},67502:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return t.x=d-t.width/2,t.y=c-t.height/2,t};p.exports=S},65085:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87841),c=function(h){return new d(h.x,h.y,h.width,h.height)};p.exports=c},37303:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return t.width<=0||t.height<=0?!1:t.x<=d&&t.x+t.width>=d&&t.y<=c&&t.y+t.height>=c};p.exports=S},96553:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(37303),c=function(h,r){return d(h,r.x,r.y)};p.exports=c},70273:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d.width*d.height>t.width*t.height?!1:d.x>t.x&&d.x<t.right&&d.right>t.x&&d.right<t.right&&d.y>t.y&&d.y<t.bottom&&d.bottom>t.y&&d.bottom<t.bottom};p.exports=S},43459:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d.setTo(t.x,t.y,t.width,t.height)};p.exports=S},77493:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d===void 0&&(d=[]),d.push({x:t.x,y:t.y}),d.push({x:t.right,y:t.y}),d.push({x:t.right,y:t.bottom}),d.push({x:t.x,y:t.bottom}),d};p.exports=S},9219:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.width===d.width&&t.height===d.height};p.exports=S},53751:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(8249),c=function(h,r){var n=d(h);return n<d(r)?h.setSize(r.height*n,r.height):h.setSize(r.width,r.width/n),h.setPosition(r.centerX-h.width/2,r.centerY-h.height/2)};p.exports=c},16088:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(8249),c=function(h,r){var n=d(h);return n>d(r)?h.setSize(r.height*n,r.height):h.setSize(r.width,r.width/n),h.setPosition(r.centerX-h.width/2,r.centerY-h.height/2)};p.exports=c},80774:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t};p.exports=S},83859:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=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};p.exports=S},19217:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87841),c=t(36383),h=function(r,n){if(n===void 0&&(n=new d),r.length===0)return n;for(var e=Number.MAX_VALUE,s=Number.MAX_VALUE,o=c.MIN_SAFE_INTEGER,i=c.MIN_SAFE_INTEGER,a,l,u,f=0;f<r.length;f++)a=r[f],Array.isArray(a)?(l=a[0],u=a[1]):(l=a.x,u=a.y),e=Math.min(e,l),s=Math.min(s,u),o=Math.max(o,l),i=Math.max(i,u);return n.x=e,n.y=s,n.width=o-e,n.height=i-s,n};p.exports=h},9477:(p,S,t)=>{/**
* @author samme
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87841),c=function(h,r,n,e,s){return s===void 0&&(s=new d),s.setTo(Math.min(h,n),Math.min(r,e),Math.abs(h-n),Math.abs(r-e))};p.exports=c},8249:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.height===0?NaN:t.width/t.height};p.exports=S},27165:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=h.centerX,r.y=h.centerY,r};p.exports=c},20812:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(13019),c=t(2141),h=function(r,n,e){if(e===void 0&&(e=new c),n<=0||n>=1)return e.x=r.x,e.y=r.y,e;var s=d(r)*n;return n>.5?(s-=r.width+r.height,s<=r.width?(e.x=r.right-s,e.y=r.bottom):(e.x=r.x,e.y=r.bottom-(s-r.width))):s<=r.width?(e.x=r.x+s,e.y=r.y):(e.x=r.right,e.y=r.y+(s-r.width)),e};p.exports=h},34819:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(20812),c=t(13019),h=function(r,n,e,s){s===void 0&&(s=[]),!n&&e>0&&(n=c(r)/e);for(var o=0;o<n;o++){var i=o/n;s.push(d(r,i))}return s};p.exports=h},51313:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=h.width,r.y=h.height,r};p.exports=c},86091:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(67502),c=function(h,r,n){var e=h.centerX,s=h.centerY;return h.setSize(h.width+r*2,h.height+n*2),d(h,e,s)};p.exports=c},53951:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87841),c=t(59996),h=function(r,n,e){return e===void 0&&(e=new d),c(r,n)?(e.x=Math.max(r.x,n.x),e.y=Math.max(r.y,n.y),e.width=Math.min(r.right,n.right)-e.x,e.height=Math.min(r.bottom,n.bottom)-e.y):e.setEmpty(),e};p.exports=h},14649:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(13019),c=t(2141),h=function(r,n,e,s){if(s===void 0&&(s=[]),!n&&!e)return s;n?e=Math.round(d(r)/n):n=d(r)/e;for(var o=r.x,i=r.y,a=0,l=0;l<e;l++)switch(s.push(new c(o,i)),a){case 0:o+=n,o>=r.right&&(a=1,i+=o-r.right,o=r.right);break;case 1:i+=n,i>=r.bottom&&(a=2,o-=i-r.bottom,i=r.bottom);break;case 2:o-=n,o<=r.left&&(a=3,i-=r.left-o,o=r.left);break;case 3:i-=n,i<=r.top&&(a=0,i=r.top);break}return s};p.exports=h},33595:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){for(var c=t.x,h=t.right,r=t.y,n=t.bottom,e=0;e<d.length;e++)c=Math.min(c,d[e].x),h=Math.max(h,d[e].x),r=Math.min(r,d[e].y),n=Math.max(n,d[e].y);return t.x=c,t.y=r,t.width=h-c,t.height=n-r,t};p.exports=S},20074:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=Math.min(t.x,d.x),h=Math.max(t.right,d.right);t.x=c,t.width=h-c;var r=Math.min(t.y,d.y),n=Math.max(t.bottom,d.bottom);return t.y=r,t.height=n-r,t};p.exports=S},92171:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=Math.min(t.x,d),r=Math.max(t.right,d);t.x=h,t.width=r-h;var n=Math.min(t.y,c),e=Math.max(t.bottom,c);return t.y=n,t.height=e-n,t};p.exports=S},42981:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S},46907:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S},60170:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.x<d.right&&t.right>d.x&&t.y<d.bottom&&t.bottom>d.y};p.exports=S},13019:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return 2*(t.width+t.height)};p.exports=S},85133:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=t(39506),h=function(r,n,e){e===void 0&&(e=new d),n=c(n);var s=Math.sin(n),o=Math.cos(n),i=o>0?r.width/2:r.width/-2,a=s>0?r.height/2:r.height/-2;return Math.abs(i*s)<Math.abs(a*o)?a=i*s/o:i=a*o/s,e.x=i+r.centerX,e.y=a+r.centerY,e};p.exports=h},26597:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=h.x+Math.random()*h.width,r.y=h.y+Math.random()*h.height,r};p.exports=c},86470:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(30976),c=t(70273),h=t(2141),r=function(n,e,s){if(s===void 0&&(s=new h),c(n,e))switch(d(0,3)){case 0:s.x=n.x+Math.random()*(e.right-n.x),s.y=n.y+Math.random()*(e.top-n.y);break;case 1:s.x=e.x+Math.random()*(n.right-e.x),s.y=e.bottom+Math.random()*(n.bottom-e.bottom);break;case 2:s.x=n.x+Math.random()*(e.x-n.x),s.y=e.y+Math.random()*(n.bottom-e.y);break;case 3:s.x=e.right+Math.random()*(n.right-e.right),s.y=n.y+Math.random()*(e.bottom-n.y);break}return s};p.exports=r},87841:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(37303),h=t(20812),r=t(34819),n=t(23777),e=t(23031),s=t(26597),o=new d({initialize:function(a,l,u,f){a===void 0&&(a=0),l===void 0&&(l=0),u===void 0&&(u=0),f===void 0&&(f=0),this.type=n.RECTANGLE,this.x=a,this.y=l,this.width=u,this.height=f},contains:function(i,a){return c(this,i,a)},getPoint:function(i,a){return h(this,i,a)},getPoints:function(i,a,l){return r(this,i,a,l)},getRandomPoint:function(i){return s(this,i)},setTo:function(i,a,l,u){return this.x=i,this.y=a,this.width=l,this.height=u,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(i,a){return a===void 0&&(a=i),this.x=i,this.y=a,this},setSize:function(i,a){return a===void 0&&(a=i),this.width=i,this.height=a,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(i){return i===void 0&&(i=new e),i.setTo(this.x,this.y,this.right,this.y),i},getLineB:function(i){return i===void 0&&(i=new e),i.setTo(this.right,this.y,this.right,this.bottom),i},getLineC:function(i){return i===void 0&&(i=new e),i.setTo(this.right,this.bottom,this.x,this.bottom),i},getLineD:function(i){return i===void 0&&(i=new e),i.setTo(this.x,this.bottom,this.x,this.y),i},left:{get:function(){return this.x},set:function(i){i>=this.right?this.width=0:this.width=this.right-i,this.x=i}},right:{get:function(){return this.x+this.width},set:function(i){i<=this.x?this.width=0:this.width=i-this.x}},top:{get:function(){return this.y},set:function(i){i>=this.bottom?this.height=0:this.height=this.bottom-i,this.y=i}},bottom:{get:function(){return this.y+this.height},set:function(i){i<=this.y?this.height=0:this.height=i-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(i){this.x=i-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(i){this.y=i-this.height/2}}});p.exports=o},94845:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.width===d.width&&t.height===d.height};p.exports=S},31730:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return c===void 0&&(c=d),t.width*=d,t.height*=c,t};p.exports=S},36899:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87841),c=function(h,r,n){n===void 0&&(n=new d);var e=Math.min(h.x,r.x),s=Math.min(h.y,r.y),o=Math.max(h.right,r.right)-e,i=Math.max(h.bottom,r.bottom)-s;return n.setTo(e,s,o,i)};p.exports=c},93232:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87841);d.Area=t(62224),d.Ceil=t(98615),d.CeilAll=t(31688),d.CenterOn=t(67502),d.Clone=t(65085),d.Contains=t(37303),d.ContainsPoint=t(96553),d.ContainsRect=t(70273),d.CopyFrom=t(43459),d.Decompose=t(77493),d.Equals=t(9219),d.FitInside=t(53751),d.FitOutside=t(16088),d.Floor=t(80774),d.FloorAll=t(83859),d.FromPoints=t(19217),d.FromXY=t(9477),d.GetAspectRatio=t(8249),d.GetCenter=t(27165),d.GetPoint=t(20812),d.GetPoints=t(34819),d.GetSize=t(51313),d.Inflate=t(86091),d.Intersection=t(53951),d.MarchingAnts=t(14649),d.MergePoints=t(33595),d.MergeRect=t(20074),d.MergeXY=t(92171),d.Offset=t(42981),d.OffsetPoint=t(46907),d.Overlaps=t(60170),d.Perimeter=t(13019),d.PerimeterPoint=t(85133),d.Random=t(26597),d.RandomOutside=t(86470),d.SameDimensions=t(94845),d.Scale=t(31730),d.Union=t(36899),p.exports=d},41658:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d=t.x1,c=t.y1,h=t.x2,r=t.y2,n=t.x3,e=t.y3;return Math.abs(((n-d)*(r-c)-(h-d)*(e-c))/2)};p.exports=S},39208:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(16483),c=function(h,r,n){var e=n*(Math.sqrt(3)/2),s=h,o=r,i=h+n/2,a=r+e,l=h-n/2,u=r+e;return new d(s,o,i,a,l,u)};p.exports=c},39545:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(94811),c=t(16483),h=function(r,n,e,s,o){n===void 0&&(n=null),e===void 0&&(e=1),s===void 0&&(s=1),o===void 0&&(o=[]);for(var i=d(r,n),a,l,u,f,v,m,g,x,y,T=0;T<i.length;T+=3)a=i[T],l=i[T+1],u=i[T+2],f=r[a*2]*e,v=r[a*2+1]*s,m=r[l*2]*e,g=r[l*2+1]*s,x=r[u*2]*e,y=r[u*2+1]*s,o.push(new c(f,v,m,g,x,y));return o};p.exports=h},90301:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(16483),c=function(h,r,n,e){e===void 0&&(e=n);var s=h,o=r,i=h,a=r-e,l=h+n,u=r;return new d(s,o,i,a,l,u)};p.exports=c},23707:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(97523),c=t(13584),h=function(r,n,e,s){s===void 0&&(s=d);var o=s(r),i=n-o.x,a=e-o.y;return c(r,i,a)};p.exports=h},97523:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=(h.x1+h.x2+h.x3)/3,r.y=(h.y1+h.y2+h.y3)/3,r};p.exports=c},24951:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26099);function c(r,n,e,s){return r*s-n*e}var h=function(r,n){n===void 0&&(n=new d);var e=r.x3,s=r.y3,o=r.x1-e,i=r.y1-s,a=r.x2-e,l=r.y2-s,u=2*c(o,i,a,l),f=c(i,o*o+i*i,l,a*a+l*l),v=c(o,o*o+i*i,a,a*a+l*l);return n.x=e-f/u,n.y=s+v/u,n};p.exports=h},85614:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(96503),c=function(h,r){r===void 0&&(r=new d);var n=h.x1,e=h.y1,s=h.x2,o=h.y2,i=h.x3,a=h.y3,l=s-n,u=o-e,f=i-n,v=a-e,m=l*(n+s)+u*(e+o),g=f*(n+i)+v*(e+a),x=2*(l*(a-o)-u*(i-s)),y,T;if(Math.abs(x)<1e-6){var C=Math.min(n,s,i),E=Math.min(e,o,a);y=(Math.max(n,s,i)-C)*.5,T=(Math.max(e,o,a)-E)*.5,r.x=C+y,r.y=E+T,r.radius=Math.sqrt(y*y+T*T)}else r.x=(v*m-u*g)/x,r.y=(l*g-f*m)/x,y=r.x-n,T=r.y-e,r.radius=Math.sqrt(y*y+T*T);return r};p.exports=c},74422:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(16483),c=function(h){return new d(h.x1,h.y1,h.x2,h.y2,h.x3,h.y3)};p.exports=c},10690:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=t.x3-t.x1,r=t.y3-t.y1,n=t.x2-t.x1,e=t.y2-t.y1,s=d-t.x1,o=c-t.y1,i=h*h+r*r,a=h*n+r*e,l=h*s+r*o,u=n*n+e*e,f=n*s+e*o,v=i*u-a*a,m=v===0?0:1/v,g=(u*l-a*f)*m,x=(i*f-a*l)*m;return g>=0&&x>=0&&g+x<1};p.exports=S},48653:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){c===void 0&&(c=!1),h===void 0&&(h=[]);for(var r=t.x3-t.x1,n=t.y3-t.y1,e=t.x2-t.x1,s=t.y2-t.y1,o=r*r+n*n,i=r*e+n*s,a=e*e+s*s,l=o*a-i*i,u=l===0?0:1/l,f,v,m,g,x,y,T=t.x1,C=t.y1,E=0;E<d.length&&(m=d[E].x-T,g=d[E].y-C,x=r*m+n*g,y=e*m+s*g,f=(a*x-i*y)*u,v=(o*y-i*x)*u,!(f>=0&&v>=0&&f+v<1&&(h.push({x:d[E].x,y:d[E].y}),c)));E++);return h};p.exports=S},96006:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(10690),c=function(h,r){return d(h,r.x,r.y)};p.exports=c},71326:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)};p.exports=S},71694:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d===void 0&&(d=[]),d.push({x:t.x1,y:t.y1}),d.push({x:t.x2,y:t.y2}),d.push({x:t.x3,y:t.y3}),d};p.exports=S},33522:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.x1===d.x1&&t.y1===d.y1&&t.x2===d.x2&&t.y2===d.y2&&t.x3===d.x3&&t.y3===d.y3};p.exports=S},20437:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=t(35001),h=function(r,n,e){e===void 0&&(e=new d);var s=r.getLineA(),o=r.getLineB(),i=r.getLineC();if(n<=0||n>=1)return e.x=s.x1,e.y=s.y1,e;var a=c(s),l=c(o),u=c(i),f=a+l+u,v=f*n,m=0;return v<a?(m=v/a,e.x=s.x1+(s.x2-s.x1)*m,e.y=s.y1+(s.y2-s.y1)*m):v>a+l?(v-=a+l,m=v/u,e.x=i.x1+(i.x2-i.x1)*m,e.y=i.y1+(i.y2-i.y1)*m):(v-=a,m=v/l,e.x=o.x1+(o.x2-o.x1)*m,e.y=o.y1+(o.y2-o.y1)*m),e};p.exports=h},80672:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(35001),c=t(2141),h=function(r,n,e,s){s===void 0&&(s=[]);var o=r.getLineA(),i=r.getLineB(),a=r.getLineC(),l=d(o),u=d(i),f=d(a),v=l+u+f;!n&&e>0&&(n=v/e);for(var m=0;m<n;m++){var g=v*(m/n),x=0,y=new c;g<l?(x=g/l,y.x=o.x1+(o.x2-o.x1)*x,y.y=o.y1+(o.y2-o.y1)*x):g>l+u?(g-=l+u,x=g/f,y.x=a.x1+(a.x2-a.x1)*x,y.y=a.y1+(a.y2-a.y1)*x):(g-=l,x=g/u,y.x=i.x1+(i.x2-i.x1)*x,y.y=i.y1+(i.y2-i.y1)*x),s.push(y)}return s};p.exports=h},39757:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141);function c(r,n,e,s){var o=r-e,i=n-s,a=o*o+i*i;return Math.sqrt(a)}var h=function(r,n){n===void 0&&(n=new d);var e=r.x1,s=r.y1,o=r.x2,i=r.y2,a=r.x3,l=r.y3,u=c(a,l,o,i),f=c(e,s,a,l),v=c(o,i,e,s),m=u+f+v;return n.x=(e*u+o*f+a*v)/m,n.y=(s*u+i*f+l*v)/m,n};p.exports=h},13584:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return t.x1+=d,t.y1+=c,t.x2+=d,t.y2+=c,t.x3+=d,t.y3+=c,t};p.exports=S},1376:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(35001),c=function(h){var r=h.getLineA(),n=h.getLineB(),e=h.getLineC();return d(r)+d(n)+d(e)};p.exports=c},90260:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2141),c=function(h,r){r===void 0&&(r=new d);var n=h.x2-h.x1,e=h.y2-h.y1,s=h.x3-h.x1,o=h.y3-h.y1,i=Math.random(),a=Math.random();return i+a>=1&&(i=1-i,a=1-a),r.x=h.x1+(n*i+s*a),r.y=h.y1+(e*i+o*a),r};p.exports=c},52172:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(99614),c=t(39757),h=function(r,n){var e=c(r);return d(r,e.x,e.y,n)};p.exports=h},49907:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(99614),c=function(h,r,n){return d(h,r.x,r.y,n)};p.exports=c},99614:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){var r=Math.cos(h),n=Math.sin(h),e=t.x1-d,s=t.y1-c;return t.x1=e*r-s*n+d,t.y1=e*n+s*r+c,e=t.x2-d,s=t.y2-c,t.x2=e*r-s*n+d,t.y2=e*n+s*r+c,e=t.x3-d,s=t.y3-c,t.x3=e*r-s*n+d,t.y3=e*n+s*r+c,t};p.exports=S},16483:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(10690),h=t(20437),r=t(80672),n=t(23777),e=t(23031),s=t(90260),o=new d({initialize:function(a,l,u,f,v,m){a===void 0&&(a=0),l===void 0&&(l=0),u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=0),m===void 0&&(m=0),this.type=n.TRIANGLE,this.x1=a,this.y1=l,this.x2=u,this.y2=f,this.x3=v,this.y3=m},contains:function(i,a){return c(this,i,a)},getPoint:function(i,a){return h(this,i,a)},getPoints:function(i,a,l){return r(this,i,a,l)},getRandomPoint:function(i){return s(this,i)},setTo:function(i,a,l,u,f,v){return i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=0),this.x1=i,this.y1=a,this.x2=l,this.y2=u,this.x3=f,this.y3=v,this},getLineA:function(i){return i===void 0&&(i=new e),i.setTo(this.x1,this.y1,this.x2,this.y2),i},getLineB:function(i){return i===void 0&&(i=new e),i.setTo(this.x2,this.y2,this.x3,this.y3),i},getLineC:function(i){return i===void 0&&(i=new e),i.setTo(this.x3,this.y3,this.x1,this.y1),i},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(i){var a=0;this.x1<=this.x2&&this.x1<=this.x3?a=this.x1-i:this.x2<=this.x1&&this.x2<=this.x3?a=this.x2-i:a=this.x3-i,this.x1-=a,this.x2-=a,this.x3-=a}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(i){var a=0;this.x1>=this.x2&&this.x1>=this.x3?a=this.x1-i:this.x2>=this.x1&&this.x2>=this.x3?a=this.x2-i:a=this.x3-i,this.x1-=a,this.x2-=a,this.x3-=a}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(i){var a=0;this.y1<=this.y2&&this.y1<=this.y3?a=this.y1-i:this.y2<=this.y1&&this.y2<=this.y3?a=this.y2-i:a=this.y3-i,this.y1-=a,this.y2-=a,this.y3-=a}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(i){var a=0;this.y1>=this.y2&&this.y1>=this.y3?a=this.y1-i:this.y2>=this.y1&&this.y2>=this.y3?a=this.y2-i:a=this.y3-i,this.y1-=a,this.y2-=a,this.y3-=a}}});p.exports=o},84435:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(16483);d.Area=t(41658),d.BuildEquilateral=t(39208),d.BuildFromPolygon=t(39545),d.BuildRight=t(90301),d.CenterOn=t(23707),d.Centroid=t(97523),d.CircumCenter=t(24951),d.CircumCircle=t(85614),d.Clone=t(74422),d.Contains=t(10690),d.ContainsArray=t(48653),d.ContainsPoint=t(96006),d.CopyFrom=t(71326),d.Decompose=t(71694),d.Equals=t(33522),d.GetPoint=t(20437),d.GetPoints=t(80672),d.InCenter=t(39757),d.Perimeter=t(1376),d.Offset=t(13584),d.Random=t(90260),d.Rotate=t(52172),d.RotateAroundPoint=t(49907),d.RotateAroundXY=t(99614),p.exports=d},74457:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:d,hitAreaCallback:c,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragStartCamera:null,dragX:0,dragY:0}};p.exports=S},84409:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return function(c,h,r,n){var e=t.getPixelAlpha(h,r,n.texture.key,n.frame.name);return e&&e>=d}};p.exports=S},7003:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(93301),h=t(50792),r=t(8214),n=t(8443),e=t(78970),s=t(85098),o=t(42515),i=t(36210),a=t(61340),l=t(85955),u=new d({initialize:function(v,m){this.game=v,this.scaleManager,this.canvas,this.config=m,this.enabled=!0,this.events=new h,this.isOver=!0,this.defaultCursor="",this.keyboard=m.inputKeyboard?new e(this):null,this.mouse=m.inputMouse?new s(this):null,this.touch=m.inputTouch?new i(this):null,this.pointers=[],this.pointersTotal=m.inputActivePointers;for(var g=0;g<=this.pointersTotal;g++){var x=new o(this,g);x.smoothFactor=m.inputSmoothFactor,this.pointers.push(x)}this.mousePointer=m.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 a,this._tempMatrix2=new a,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],v.events.once(n.BOOT,this.boot,this)},boot:function(){var f=this.game,v=f.events;this.canvas=f.canvas,this.scaleManager=f.scale,this.events.emit(r.MANAGER_BOOT),v.on(n.PRE_RENDER,this.preRender,this),v.once(n.DESTROY,this.destroy,this)},setCanvasOver:function(f){this.isOver=!0,this.events.emit(r.GAME_OVER,f)},setCanvasOut:function(f){this.isOver=!1,this.events.emit(r.GAME_OUT,f)},preRender:function(){var f=this.game.loop.now,v=this.game.loop.delta,m=this.game.scene.getScenes(!0,!0);this.time=f,this.events.emit(r.MANAGER_UPDATE);for(var g=0;g<m.length;g++){var x=m[g];if(x.sys.input&&x.sys.input.updatePoll(f,v)&&this.globalTopOnly)return}},setDefaultCursor:function(f){this.defaultCursor=f,this.canvas.style.cursor!==f&&(this.canvas.style.cursor=f)},setCursor:function(f){f.cursor&&(this.canvas.style.cursor=f.cursor)},resetCursor:function(f,v){(v||f&&f.cursor)&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(f){f===void 0&&(f=1);var v=[];this.pointersTotal+f>10&&(f=10-this.pointersTotal);for(var m=0;m<f;m++){var g=this.pointers.length,x=new o(this,g);x.smoothFactor=this.config.inputSmoothFactor,this.pointers.push(x),this.pointersTotal++,v.push(x)}return v},updateInputPlugins:function(f,v){var m=this.game.scene.getScenes(!1,!0);this._tempSkip=!1;for(var g=0;g<m.length;g++){var x=m[g];if(x.sys.input){var y=x.sys.input.update(f,v);if(y&&this.globalTopOnly||this._tempSkip)return}}},onTouchStart:function(f){for(var v=this.pointers,m=[],g=0;g<f.changedTouches.length;g++)for(var x=f.changedTouches[g],y=1;y<v.length;y++){var T=v[y];if(!T.active){T.touchstart(x,f),this.activePointer=T,m.push(T);break}}this.updateInputPlugins(c.TOUCH_START,m)},onTouchMove:function(f){for(var v=this.pointers,m=[],g=0;g<f.changedTouches.length;g++)for(var x=f.changedTouches[g],y=1;y<v.length;y++){var T=v[y];if(T.active&&T.identifier===x.identifier){var C=document.elementFromPoint(x.clientX,x.clientY),E=C===this.canvas;!this.isOver&&E?this.setCanvasOver(f):this.isOver&&!E&&this.setCanvasOut(f),this.isOver&&(T.touchmove(x,f),this.activePointer=T,m.push(T));break}}this.updateInputPlugins(c.TOUCH_MOVE,m)},onTouchEnd:function(f){for(var v=this.pointers,m=[],g=0;g<f.changedTouches.length;g++)for(var x=f.changedTouches[g],y=1;y<v.length;y++){var T=v[y];if(T.active&&T.identifier===x.identifier){T.touchend(x,f),m.push(T);break}}this.updateInputPlugins(c.TOUCH_END,m)},onTouchCancel:function(f){for(var v=this.pointers,m=[],g=0;g<f.changedTouches.length;g++)for(var x=f.changedTouches[g],y=1;y<v.length;y++){var T=v[y];if(T.active&&T.identifier===x.identifier){T.touchcancel(x,f),m.push(T);break}}this.updateInputPlugins(c.TOUCH_CANCEL,m)},onMouseDown:function(f){var v=this.mousePointer;v.down(f),v.updateMotion(),this.activePointer=v,this.updateInputPlugins(c.MOUSE_DOWN,this.mousePointerContainer)},onMouseMove:function(f){var v=this.mousePointer;v.move(f),v.updateMotion(),this.activePointer=v,this.updateInputPlugins(c.MOUSE_MOVE,this.mousePointerContainer)},onMouseUp:function(f){var v=this.mousePointer;v.up(f),v.updateMotion(),this.activePointer=v,this.updateInputPlugins(c.MOUSE_UP,this.mousePointerContainer)},onMouseWheel:function(f){var v=this.mousePointer;v.wheel(f),this.activePointer=v,this.updateInputPlugins(c.MOUSE_WHEEL,this.mousePointerContainer)},onPointerLockChange:function(f){var v=this.mouse.locked;this.mousePointer.locked=v,this.events.emit(r.POINTERLOCK_CHANGE,f,v)},inputCandidate:function(f,v){var m=f.input;if(!m||!m.enabled||!f.willRender(v))return!1;var g=!0,x=f.parentContainer;if(x)do{if(!x.willRender(v)){g=!1;break}x=x.parentContainer}while(x);return g},hitTest:function(f,v,m,g){g===void 0&&(g=this._tempHitTest);var x=this._tempPoint,y=m.scrollX,T=m.scrollY;g.length=0;var C=f.x,E=f.y;m.getWorldPoint(C,E,x),f.worldX=x.x,f.worldY=x.y;for(var M={x:0,y:0},P=this._tempMatrix,A=this._tempMatrix2,R=0;R<v.length;R++){var F=v[R];if(this.inputCandidate(F,m)){var w=x.x+y*F.scrollFactorX-y,B=x.y+T*F.scrollFactorY-T;F.parentContainer?(F.getWorldTransformMatrix(P,A),P.applyInverse(w,B,M)):l(w,B,F.x,F.y,F.rotation,F.scaleX,F.scaleY,M),this.pointWithinHitArea(F,M.x,M.y)&&g.push(F)}}return g},pointWithinHitArea:function(f,v,m){v+=f.displayOriginX,m+=f.displayOriginY;var g=f.input;return g&&g.hitAreaCallback(g.hitArea,v,m,f)?(g.localX=v,g.localY=m,!0):!1},pointWithinInteractiveObject:function(f,v,m){return f.hitArea?(v+=f.gameObject.displayOriginX,m+=f.gameObject.displayOriginY,f.localX=v,f.localY=m,f.hitAreaCallback(f.hitArea,v,m,f)):!1},transformPointer:function(f,v,m,g){var x=f.position,y=f.prevPosition;y.x=x.x,y.y=x.y;var T=this.scaleManager.transformX(v),C=this.scaleManager.transformY(m),E=f.smoothFactor;!g||E===0?(x.x=T,x.y=C):(x.x=T*E+y.x*(1-E),x.y=C*E+y.y*(1-E))},destroy:function(){this.events.removeAllListeners(),this.game.events.off(n.PRE_RENDER),this.keyboard&&this.keyboard.destroy(),this.mouse&&this.mouse.destroy(),this.touch&&this.touch.destroy();for(var f=0;f<this.pointers.length;f++)this.pointers[f].destroy();this.pointers=[],this._tempHitTest=[],this._tempMatrix.destroy(),this.canvas=null,this.game=null}});p.exports=u},48205:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(96503),c=t(87902),h=t(83419),r=t(93301),n=t(74457),e=t(84409),s=t(20339),o=t(8497),i=t(81154),a=t(8214),l=t(50792),u=t(95540),f=t(23777),v=t(89639),m=t(41212),g=t(37277),x=t(87841),y=t(37303),T=t(44594),C=t(16483),E=t(10690),M=new h({Extends:l,initialize:function(A){l.call(this),this.scene=A,this.systems=A.sys,this.settings=A.sys.settings,this.manager=A.sys.game.input,this.pluginEvents=new l,this.enabled=!0,this.displayList,this.cameras,v.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var R={cancelled:!1};this._eventContainer={stopPropagation:function(){R.cancelled=!0}},this._eventData=R,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,A.sys.events.once(T.BOOT,this.boot,this),A.sys.events.on(T.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(T.DESTROY,this.destroy,this),this.pluginEvents.emit(a.BOOT)},start:function(){var P=this.systems.events;P.on(T.TRANSITION_START,this.transitionIn,this),P.on(T.TRANSITION_OUT,this.transitionOut,this),P.on(T.TRANSITION_COMPLETE,this.transitionComplete,this),P.on(T.PRE_UPDATE,this.preUpdate,this),P.once(T.SHUTDOWN,this.shutdown,this),this.manager.events.on(a.GAME_OUT,this.onGameOut,this),this.manager.events.on(a.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(a.START)},onGameOver:function(P){this.isActive()&&this.emit(a.GAME_OVER,P.timeStamp,P)},onGameOut:function(P){this.isActive()&&this.emit(a.GAME_OUT,P.timeStamp,P)},preUpdate:function(){this.pluginEvents.emit(a.PRE_UPDATE);var P=this._pendingRemoval,A=this._pendingInsertion,R=P.length,F=A.length;if(!(R===0&&F===0)){for(var w=this._list,B=0;B<R;B++){var N=P[B],U=w.indexOf(N);U>-1&&(w.splice(U,1),this.clear(N,!0))}this._pendingRemoval.length=0,this._list=w.concat(A.splice(0))}},isActive:function(){return this.manager&&this.manager.enabled&&this.enabled&&this.scene.sys.canInput()},setCursor:function(P){this.manager&&this.manager.setCursor(P)},resetCursor:function(){this.manager&&this.manager.resetCursor(null,!0)},updatePoll:function(P,A){if(!this.isActive())return!1;if(this.pluginEvents.emit(a.UPDATE,P,A),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var R,F=this.manager,w=F.pointers;for(R=0;R<w.length;R++)w[R].updateMotion();if(this._list.length===0)return!1;var B=this.pollRate;if(B===-1)return!1;if(B>0)if(this._pollTimer-=A,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var N=!1;for(R=0;R<w.length;R++){var U=0,D=w[R];this._tempZones=[],this._temp=this.hitTestPointer(D),this.sortGameObjects(this._temp,D),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),U+=this.processOverOutEvents(D),this.getDragState(D)===2&&this.processDragThresholdEvent(D,P),U>0&&(N=!0)}return N},update:function(P,A){if(!this.isActive())return!1;for(var R=!1,F=0;F<A.length;F++){var w=0,B=A[F];switch(this._tempZones=[],this._temp=this.hitTestPointer(B),this.sortGameObjects(this._temp,B),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),P){case r.MOUSE_DOWN:w+=this.processDragDownEvent(B),w+=this.processDownEvents(B),w+=this.processOverOutEvents(B);break;case r.MOUSE_UP:w+=this.processDragUpEvent(B),w+=this.processUpEvents(B),w+=this.processOverOutEvents(B);break;case r.TOUCH_START:w+=this.processDragDownEvent(B),w+=this.processDownEvents(B),w+=this.processOverEvents(B);break;case r.TOUCH_END:case r.TOUCH_CANCEL:w+=this.processDragUpEvent(B),w+=this.processUpEvents(B),w+=this.processOutEvents(B);break;case r.MOUSE_MOVE:case r.TOUCH_MOVE:w+=this.processDragMoveEvent(B),w+=this.processMoveEvents(B),w+=this.processOverOutEvents(B);break;case r.MOUSE_WHEEL:w+=this.processWheelEvent(B);break}w>0&&(R=!0)}return this._updatedThisFrame=!0,R},clear:function(P,A){A===void 0&&(A=!1),this.disable(P);var R=P.input;R&&(this.removeDebug(P),this.manager.resetCursor(R),R.gameObject=void 0,R.target=void 0,R.hitArea=void 0,R.hitAreaCallback=void 0,R.callbackContext=void 0,P.input=null),A||this.queueForRemoval(P);var F=this._draggable.indexOf(P);return F>-1&&this._draggable.splice(F,1),P},disable:function(P,A){A===void 0&&(A=!1);var R=P.input;R&&(R.enabled=!1,R.dragState=0);for(var F=this._drag,w=this._over,B=this.manager,N=0,U;N<B.pointers.length;N++)U=F[N].indexOf(P),U>-1&&F[N].splice(U,1),U=w[N].indexOf(P),U>-1&&w[N].splice(U,1);return A&&this.resetCursor(),this},enable:function(P,A,R,F){return F===void 0&&(F=!1),P.input?P.input.enabled=!0:this.setHitArea(P,A,R),P.input&&F&&!P.input.dropZone&&(P.input.dropZone=F),this},hitTestPointer:function(P){for(var A=this.cameras.getCamerasBelowPointer(P),R=0;R<A.length;R++){for(var F=A[R],w=this.manager.hitTest(P,this._list,F),B=0;B<w.length;B++){var N=w[B];N.input.dropZone&&this._tempZones.push(N)}if(w.length>0)return P.camera=F,w}return P.camera=A[0],[]},processDownEvents:function(P){var A=0,R=this._temp,F=this._eventData,w=this._eventContainer;F.cancelled=!1;for(var B=0;B<R.length;B++){var N=R[B];if(!(!N.input||!N.input.enabled)&&(A++,N.emit(a.GAMEOBJECT_POINTER_DOWN,P,N.input.localX,N.input.localY,w),F.cancelled||!this.isActive()||N.input&&N.input.enabled&&(this.emit(a.GAMEOBJECT_DOWN,P,N,w),F.cancelled||!this.isActive())))break}return!F.cancelled&&this.isActive()&&(P.downElement===this.manager.game.canvas?this.emit(a.POINTER_DOWN,P,R):this.emit(a.POINTER_DOWN_OUTSIDE,P)),A},getDragState:function(P){return this._dragState[P.id]},setDragState:function(P,A){this._dragState[P.id]=A},processDragThresholdEvent:function(P,A){var R=!1,F=this.dragTimeThreshold,w=this.dragDistanceThreshold;if((w>0&&s(P.x,P.y,P.downX,P.downY)>=w||F>0&&A>=P.downTime+F)&&(R=!0),R)return this.setDragState(P,3),this.processDragStartList(P)},processDragStartList:function(P){if(this.getDragState(P)!==3)return 0;var A=this._drag[P.id];A.length>1&&(A=A.slice(0));for(var R=0;R<A.length;R++){var F=A[R],w=F.input;w.dragState=2,w.dragStartX=F.x,w.dragStartY=F.y,w.dragStartXGlobal=P.worldX,w.dragStartYGlobal=P.worldY,w.dragStartCamera=P.camera,w.dragX=w.dragStartXGlobal-w.dragStartX,w.dragY=w.dragStartYGlobal-w.dragStartY,F.emit(a.GAMEOBJECT_DRAG_START,P,w.dragX,w.dragY),this.emit(a.DRAG_START,P,F)}return this.setDragState(P,4),A.length},processDragDownEvent:function(P){var A=this._temp;if(this._draggable.length===0||A.length===0||!P.primaryDown||this.getDragState(P)!==0)return 0;this.setDragState(P,1);for(var R=[],F=0;F<A.length;F++){var w=A[F];w.input.draggable&&w.input.dragState===0&&R.push(w)}return R.length===0?(this.setDragState(P,0),0):(R.length>1&&(this.sortGameObjects(R,P),this.topOnly&&R.splice(1)),this._drag[P.id]=R,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(P,3),this.processDragStartList(P)):(this.setDragState(P,2),0))},processDragMoveEvent:function(P){if(this.getDragState(P)===2&&this.processDragThresholdEvent(P,this.manager.game.loop.now),this.getDragState(P)!==4)return 0;var A=this._tempZones,R=this._drag[P.id];R.length>1&&(R=R.slice(0));for(var F=0;F<R.length;F++){var w=R[F],B=w.input,N=B.target;if(N){var U=A.indexOf(N);U===0?(w.emit(a.GAMEOBJECT_DRAG_OVER,P,N),this.emit(a.DRAG_OVER,P,w,N)):U>0?(w.emit(a.GAMEOBJECT_DRAG_LEAVE,P,N),this.emit(a.DRAG_LEAVE,P,w,N),B.target=A[0],N=B.target,w.emit(a.GAMEOBJECT_DRAG_ENTER,P,N),this.emit(a.DRAG_ENTER,P,w,N)):(w.emit(a.GAMEOBJECT_DRAG_LEAVE,P,N),this.emit(a.DRAG_LEAVE,P,w,N),A[0]?(B.target=A[0],N=B.target,w.emit(a.GAMEOBJECT_DRAG_ENTER,P,N),this.emit(a.DRAG_ENTER,P,w,N)):B.target=null)}else!N&&A[0]&&(B.target=A[0],N=B.target,w.emit(a.GAMEOBJECT_DRAG_ENTER,P,N),this.emit(a.DRAG_ENTER,P,w,N));var D,I,O=P.positionToCamera(B.dragStartCamera);if(!w.parentContainer)D=O.x-B.dragX,I=O.y-B.dragY;else{var L=O.x-B.dragStartXGlobal,G=O.y-B.dragStartYGlobal,z=w.getParentRotation(),X=L*Math.cos(z)+G*Math.sin(z),V=G*Math.cos(z)-L*Math.sin(z);X*=1/w.parentContainer.scaleX,V*=1/w.parentContainer.scaleY,D=X+B.dragStartX,I=V+B.dragStartY}w.emit(a.GAMEOBJECT_DRAG,P,D,I),this.emit(a.DRAG,P,w,D,I)}return R.length},processDragUpEvent:function(P){var A=this._drag[P.id];A.length>1&&(A=A.slice(0));for(var R=0;R<A.length;R++){var F=A[R],w=F.input;if(w&&w.dragState===2){w.dragState=0,w.dragX=w.localX-F.displayOriginX,w.dragY=w.localY-F.displayOriginY,w.dragStartCamera=null;var B=!1,N=w.target;N&&(F.emit(a.GAMEOBJECT_DROP,P,N),this.emit(a.DROP,P,F,N),w.target=null,B=!0),F.input&&F.input.enabled&&(F.emit(a.GAMEOBJECT_DRAG_END,P,w.dragX,w.dragY,B),this.emit(a.DRAG_END,P,F,B))}}return this.setDragState(P,0),A.splice(0),0},processMoveEvents:function(P){var A=0,R=this._temp,F=this._eventData,w=this._eventContainer;F.cancelled=!1;for(var B=0;B<R.length;B++){var N=R[B];if(!(!N.input||!N.input.enabled)&&(A++,N.emit(a.GAMEOBJECT_POINTER_MOVE,P,N.input.localX,N.input.localY,w),F.cancelled||!this.isActive()||N.input&&N.input.enabled&&(this.emit(a.GAMEOBJECT_MOVE,P,N,w),F.cancelled||!this.isActive()||this.topOnly)))break}return!F.cancelled&&this.isActive()&&this.emit(a.POINTER_MOVE,P,R),A},processWheelEvent:function(P){var A=0,R=this._temp,F=this._eventData,w=this._eventContainer;F.cancelled=!1;for(var B=P.deltaX,N=P.deltaY,U=P.deltaZ,D=0;D<R.length;D++){var I=R[D];if(!(!I.input||!I.input.enabled)&&(A++,I.emit(a.GAMEOBJECT_POINTER_WHEEL,P,B,N,U,w),F.cancelled||!this.isActive()||I.input&&I.input.enabled&&(this.emit(a.GAMEOBJECT_WHEEL,P,I,B,N,U,w),F.cancelled||!this.isActive())))break}return!F.cancelled&&this.isActive()&&this.emit(a.POINTER_WHEEL,P,R,B,N,U),A},processOverEvents:function(P){var A=this._temp,R=0,F=A.length,w=[];if(F>0){var B=this.manager,N=this._eventData,U=this._eventContainer;N.cancelled=!1;for(var D=0;D<F;D++){var I=A[D];if(!(!I.input||!I.input.enabled)&&(w.push(I),B.setCursor(I.input),I.emit(a.GAMEOBJECT_POINTER_OVER,P,I.input.localX,I.input.localY,U),R++,N.cancelled||!this.isActive()||I.input&&I.input.enabled&&(this.emit(a.GAMEOBJECT_OVER,P,I,U),N.cancelled||!this.isActive())))break}!N.cancelled&&this.isActive()&&this.emit(a.POINTER_OVER,P,w)}return this._over[P.id]=w,R},processOutEvents:function(P){var A=this._over[P.id],R=0,F=A.length;if(F>0){var w=this.manager,B=this._eventData,N=this._eventContainer;B.cancelled=!1,this.sortGameObjects(A,P);for(var U=0;U<F;U++){var D=A[U];if(D=A[U],!(!D.input||!D.input.enabled)&&(w.resetCursor(D.input),D.emit(a.GAMEOBJECT_POINTER_OUT,P,N),R++,B.cancelled||!this.isActive()||D.input&&D.input.enabled&&(this.emit(a.GAMEOBJECT_OUT,P,D,N),B.cancelled||!this.isActive())))break}!B.cancelled&&this.isActive()&&this.emit(a.POINTER_OUT,P,A),this._over[P.id]=[]}return R},processOverOutEvents:function(P){var A=this._temp,R,F,w=[],B=[],N=[],U=this._over[P.id],D=this._drag[P.id],I=this.manager;for(R=0;R<U.length;R++)F=U[R],A.indexOf(F)===-1&&D.indexOf(F)===-1?w.push(F):N.push(F);for(R=0;R<A.length;R++)F=A[R],U.indexOf(F)===-1&&B.push(F);var O=w.length,L=0,G=this._eventData,z=this._eventContainer;if(G.cancelled=!1,O>0){for(this.sortGameObjects(w,P),R=0;R<O&&(F=w[R],!(!(!F.input||!F.input.enabled)&&(I.resetCursor(F.input),F.emit(a.GAMEOBJECT_POINTER_OUT,P,z),L++,G.cancelled||!this.isActive()||F.input&&F.input.enabled&&(this.emit(a.GAMEOBJECT_OUT,P,F,z),G.cancelled||!this.isActive()))));R++);(!G.cancelled||this.isActive())&&this.emit(a.POINTER_OUT,P,w)}if(O=B.length,G.cancelled=!1,O>0){for(this.sortGameObjects(B,P),R=0;R<O&&(F=B[R],!(!(!F.input||!F.input.enabled)&&(I.setCursor(F.input),F.emit(a.GAMEOBJECT_POINTER_OVER,P,F.input.localX,F.input.localY,z),L++,G.cancelled||!this.isActive()||F.input&&F.input.enabled&&(this.emit(a.GAMEOBJECT_OVER,P,F,z),G.cancelled||!this.isActive()))));R++);!G.cancelled&&this.isActive()&&this.emit(a.POINTER_OVER,P,B)}return U=N.concat(B),this._over[P.id]=this.sortGameObjects(U,P),L},processUpEvents:function(P){var A=this._temp,R=this._eventData,F=this._eventContainer;R.cancelled=!1;for(var w=0;w<A.length;w++){var B=A[w];if(!(!B.input||!B.input.enabled)&&(B.emit(a.GAMEOBJECT_POINTER_UP,P,B.input.localX,B.input.localY,F),R.cancelled||!this.isActive()||B.input&&B.input.enabled&&(this.emit(a.GAMEOBJECT_UP,P,B,F),R.cancelled||!this.isActive())))break}return!R.cancelled&&this.isActive()&&(P.upElement===this.manager.game.canvas?this.emit(a.POINTER_UP,P,A):this.emit(a.POINTER_UP_OUTSIDE,P)),A.length},forceDownState:function(P,A){this.forceState(P,A,a.GAMEOBJECT_POINTER_DOWN,a.GAMEOBJECT_DOWN,!1)},forceUpState:function(P,A){this.forceState(P,A,a.GAMEOBJECT_POINTER_UP,a.GAMEOBJECT_UP,!1)},forceOverState:function(P,A){this.forceState(P,A,a.GAMEOBJECT_POINTER_OVER,a.GAMEOBJECT_OVER,!0)},forceOutState:function(P,A){this.forceState(P,A,a.GAMEOBJECT_POINTER_OUT,a.GAMEOBJECT_OUT,!1)},forceState:function(P,A,R,F,w){var B=this._eventData,N=this._eventContainer;B.cancelled=!1,A.input&&A.input.enabled&&(A.emit(R,P,A.input.localX,A.input.localY,N),w&&this.setCursor(A.input),!B.cancelled&&this.isActive()&&A.input&&A.input.enabled&&this.emit(F,P,A,N))},queueForInsertion:function(P){return this._pendingInsertion.indexOf(P)===-1&&this._list.indexOf(P)===-1&&this._pendingInsertion.push(P),this},queueForRemoval:function(P){return this._pendingRemoval.push(P),this},setDraggable:function(P,A){A===void 0&&(A=!0),Array.isArray(P)||(P=[P]);for(var R=0;R<P.length;R++){var F=P[R];F.input.draggable=A;var w=this._draggable.indexOf(F);A&&w===-1?this._draggable.push(F):!A&&w>-1&&this._draggable.splice(w,1)}return this},makePixelPerfect:function(P){P===void 0&&(P=1);var A=this.systems.textures;return e(A,P)},setHitArea:function(P,A,R){if(A===void 0)return this.setHitAreaFromTexture(P);Array.isArray(P)||(P=[P]);var F=!1,w=!1,B=!1,N=!1,U=!1,D=!0;if(m(A)&&Object.keys(A).length){var I=A,O=P.some(function(V){return V.hasOwnProperty("faces")});if(!O){A=u(I,"hitArea",null),R=u(I,"hitAreaCallback",null),U=u(I,"pixelPerfect",!1);var L=u(I,"alphaTolerance",1);U&&(A={},R=this.makePixelPerfect(L))}F=u(I,"draggable",!1),w=u(I,"dropZone",!1),B=u(I,"cursor",!1),N=u(I,"useHandCursor",!1),(!A||!R)&&(this.setHitAreaFromTexture(P),D=!1)}else typeof A=="function"&&!R&&(R=A,A={});for(var G=0;G<P.length;G++){var z=P[G];if(U&&z.type==="Container"){console.warn("Cannot pixelPerfect test a Container. Use a custom callback.");continue}var X=z.input?z.input:n(z,A,R);X.customHitArea=D,X.dropZone=w,X.cursor=N?"pointer":B,z.input=X,F&&this.setDraggable(z),this.queueForInsertion(z)}return this},setHitAreaCircle:function(P,A,R,F,w){w===void 0&&(w=c);var B=new d(A,R,F);return this.setHitArea(P,B,w)},setHitAreaEllipse:function(P,A,R,F,w,B){B===void 0&&(B=i);var N=new o(A,R,F,w);return this.setHitArea(P,N,B)},setHitAreaFromTexture:function(P,A){A===void 0&&(A=y),Array.isArray(P)||(P=[P]);for(var R=0;R<P.length;R++){var F=P[R],w=F.frame,B=0,N=0;if(F.width?(B=F.width,N=F.height):w&&(B=w.realWidth,N=w.realHeight),F.type==="Container"&&(B===0||N===0)){console.warn("Container.setInteractive must specify a Shape or call setSize() first");continue}B!==0&&N!==0&&(F.input=n(F,new x(0,0,B,N),A),this.queueForInsertion(F))}return this},setHitAreaRectangle:function(P,A,R,F,w,B){B===void 0&&(B=y);var N=new x(A,R,F,w);return this.setHitArea(P,N,B)},setHitAreaTriangle:function(P,A,R,F,w,B,N,U){U===void 0&&(U=E);var D=new C(A,R,F,w,B,N);return this.setHitArea(P,D,U)},enableDebug:function(P,A){A===void 0&&(A=65280);var R=P.input;if(!R||!R.hitArea)return this;var F=R.hitArea,w=F.type,B=R.hitAreaDebug,N=this.systems.add,U=this.systems.updateList;B&&(U.remove(B),B.destroy(),B=null);var D=0,I=0;switch(w){case f.CIRCLE:B=N.arc(0,0,F.radius),D=F.x-F.radius,I=F.y-F.radius;break;case f.ELLIPSE:B=N.ellipse(0,0,F.width,F.height),D=F.x-F.width/2,I=F.y-F.height/2;break;case f.LINE:B=N.line(0,0,F.x1,F.y1,F.x2,F.y2);break;case f.POLYGON:B=N.polygon(0,0,F.points);break;case f.RECTANGLE:B=N.rectangle(0,0,F.width,F.height),D=F.x,I=F.y;break;case f.TRIANGLE:B=N.triangle(0,0,F.x1,F.y1,F.x2,F.y2,F.x3,F.y3);break}return B&&(B.isFilled=!1,B.strokeColor=A,B.preUpdate=function(){B.setVisible(P.visible),B.setStrokeStyle(1/P.scale,B.strokeColor),B.setDisplayOrigin(P.displayOriginX,P.displayOriginY);var O=P.x,L=P.y,G=P.rotation,z=P.scaleX,X=P.scaleY;if(P.parentContainer){var V=P.getWorldTransformMatrix();O=V.tx,L=V.ty,G=V.rotation,z=V.scaleX,X=V.scaleY}B.setRotation(G),B.setScale(z,X),B.setPosition(O+D*z,L+I*X),B.setScrollFactor(P.scrollFactorX,P.scrollFactorY),B.setDepth(P.depth)},U.add(B),R.hitAreaDebug=B),this},removeDebug:function(P){var A=P.input;if(A&&A.hitAreaDebug){var R=A.hitAreaDebug;R.destroy(),A.hitAreaDebug=null}return this},setPollAlways:function(){return this.setPollRate(0)},setPollOnMove:function(){return this.setPollRate(-1)},setPollRate:function(P){return this.pollRate=P,this._pollTimer=0,this},setGlobalTopOnly:function(P){return this.manager.globalTopOnly=P,this},setTopOnly:function(P){return this.topOnly=P,this},sortGameObjects:function(P,A){if(P.length<2||!A.camera)return P;var R=A.camera.renderList;return P.sort(function(F,w){var B=Math.max(R.indexOf(F),0),N=Math.max(R.indexOf(w),0);return N-B})},sortDropZones:function(P){return P.length<2?P:(this.scene.sys.depthSort(),P.sort(this.sortDropZoneHandler.bind(this)))},sortDropZoneHandler:function(P,A){if(!P.parentContainer&&!A.parentContainer)return this.displayList.getIndex(A)-this.displayList.getIndex(P);if(P.parentContainer===A.parentContainer)return A.parentContainer.getIndex(A)-P.parentContainer.getIndex(P);if(P.parentContainer===A)return-1;if(A.parentContainer===P)return 1;for(var R=P.getIndexList(),F=A.getIndexList(),w=Math.min(R.length,F.length),B=0;B<w;B++){var N=R[B],U=F[B];if(N!==U)return U-N}return F.length-R.length},stopPropagation:function(){return this.manager._tempSkip=!0,this},addPointer:function(P){return this.manager.addPointer(P)},setDefaultCursor:function(P){return this.manager.setDefaultCursor(P),this},transitionIn:function(){this.enabled=this.settings.transitionAllowInput},transitionComplete:function(){this.settings.transitionAllowInput||(this.enabled=!0)},transitionOut:function(){this.enabled=this.settings.transitionAllowInput},shutdown:function(){this.pluginEvents.emit(a.SHUTDOWN),this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0,this._dragState.length=0;for(var P=0;P<10;P++)this._drag[P]=[],this._over[P]=[];this.removeAllListeners();var A=this.manager;A.canvas.style.cursor=A.defaultCursor;var R=this.systems.events;R.off(T.TRANSITION_START,this.transitionIn,this),R.off(T.TRANSITION_OUT,this.transitionOut,this),R.off(T.TRANSITION_COMPLETE,this.transitionComplete,this),R.off(T.PRE_UPDATE,this.preUpdate,this),A.events.off(a.GAME_OUT,this.onGameOut,this),A.events.off(a.GAME_OVER,this.onGameOver,this),R.off(T.SHUTDOWN,this.shutdown,this)},resetPointers:function(){for(var P=this.manager.pointers,A=0;A<P.length;A++)P[A].reset()},destroy:function(){this.shutdown(),this.pluginEvents.emit(a.DESTROY),this.pluginEvents.removeAllListeners(),this.scene.sys.events.off(T.START,this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.mouse=null},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}},isOver:{get:function(){return this.manager.isOver}},mousePointer:{get:function(){return this.manager.mousePointer}},activePointer:{get:function(){return this.manager.activePointer}},pointer1:{get:function(){return this.manager.pointers[1]}},pointer2:{get:function(){return this.manager.pointers[2]}},pointer3:{get:function(){return this.manager.pointers[3]}},pointer4:{get:function(){return this.manager.pointers[4]}},pointer5:{get:function(){return this.manager.pointers[5]}},pointer6:{get:function(){return this.manager.pointers[6]}},pointer7:{get:function(){return this.manager.pointers[7]}},pointer8:{get:function(){return this.manager.pointers[8]}},pointer9:{get:function(){return this.manager.pointers[9]}},pointer10:{get:function(){return this.manager.pointers[10]}}});g.register("InputPlugin",M,"input"),p.exports=M},89639:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(35154),c={},h={};h.register=function(r,n,e,s,o){c[r]={plugin:n,mapping:e,settingsKey:s,configKey:o}},h.getPlugin=function(r){return c[r]},h.install=function(r){var n=r.scene.sys,e=n.settings.input,s=n.game.config;for(var o in c){var i=c[o].plugin,a=c[o].mapping,l=c[o].settingsKey,u=c[o].configKey;d(e,l,s[u])&&(r[a]=new i(r))}},h.remove=function(r){c.hasOwnProperty(r)&&delete c[r]},p.exports=h},42515:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(31040),c=t(83419),h=t(20339),r=t(43855),n=t(47235),e=t(26099),s=t(25892),o=new c({initialize:function(a,l){this.manager=a,this.id=l,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new e,this.prevPosition=new e,this.midPoint=new e(-1,-1),this.velocity=new e,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=l===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(i){var a=i.getWorldPoint(this.x,this.y);return this.worldX=a.x,this.worldY=a.y,this},positionToCamera:function(i,a){return i.getWorldPoint(this.x,this.y,a)},updateMotion:function(){var i=this.position.x,a=this.position.y,l=this.midPoint.x,u=this.midPoint.y;if(!(i===l&&a===u)){var f=n(this.motionFactor,l,i),v=n(this.motionFactor,u,a);r(f,i,.1)&&(f=i),r(v,a,.1)&&(v=a),this.midPoint.set(f,v);var m=i-f,g=a-v;this.velocity.set(m,g),this.angle=d(f,v,i,a),this.distance=Math.sqrt(m*m+g*g)}},up:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.button=i.button,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),i.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=i.timeStamp,this.wasTouch=!1)},down:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.button=i.button,this.downElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),i.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),s.macOS&&i.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=i.timeStamp),this.wasTouch=!1},move:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.manager.transformPointer(this,i.pageX,i.pageY,!0),this.locked&&(this.movementX=i.movementX||i.mozMovementX||i.webkitMovementX||0,this.movementY=i.movementY||i.mozMovementY||i.webkitMovementY||0),this.moveTime=i.timeStamp,this.wasTouch=!1},wheel:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.deltaX=i.deltaX,this.deltaY=i.deltaY,this.deltaZ=i.deltaZ,this.wasTouch=!1},touchstart:function(i,a){i.pointerId&&(this.pointerId=i.pointerId),this.identifier=i.identifier,this.target=i.target,this.active=!0,this.buttons=1,this.event=a,this.downElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=a.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(i,a){this.event=a,this.manager.transformPointer(this,i.pageX,i.pageY,!0),this.moveTime=a.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(i,a){this.buttons=0,this.event=a,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=a.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(i,a){this.buttons=0,this.event=a,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=a.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return this.buttons===0},leftButtonDown:function(){return!!(this.buttons&1)},rightButtonDown:function(){return!!(this.buttons&2)},middleButtonDown:function(){return!!(this.buttons&4)},backButtonDown:function(){return!!(this.buttons&8)},forwardButtonDown:function(){return!!(this.buttons&16)},leftButtonReleased:function(){return this.buttons===0?this.button===0&&!this.isDown:this.button===0},rightButtonReleased:function(){return this.buttons===0?this.button===2&&!this.isDown:this.button===2},middleButtonReleased:function(){return this.buttons===0?this.button===1&&!this.isDown:this.button===1},backButtonReleased:function(){return this.buttons===0?this.button===3&&!this.isDown:this.button===3},forwardButtonReleased:function(){return this.buttons===0?this.button===4&&!this.isDown:this.button===4},getDistance:function(){return this.isDown?h(this.downX,this.downY,this.x,this.y):h(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?d(this.downX,this.downY,this.x,this.y):d(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(i,a){i===void 0&&(i=10),a===void 0&&(a=[]);for(var l=this.prevPosition.x,u=this.prevPosition.y,f=this.position.x,v=this.position.y,m=0;m<i;m++){var g=1/i*m;a[m]={x:n(g,l,f),y:n(g,u,v)}}return a},reset:function(){this.event=null,this.downElement=null,this.upElement=null,this.button=0,this.buttons=0,this.position.set(0,0),this.prevPosition.set(0,0),this.midPoint.set(-1,-1),this.velocity.set(0,0),this.angle=0,this.distance=0,this.worldX=0,this.worldY=0,this.downX=0,this.downY=0,this.upX=0,this.upY=0,this.moveTime=0,this.upTime=0,this.downTime=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.deltaX=0,this.deltaY=0,this.deltaZ=0,this.active=this.id===0},destroy:function(){this.camera=null,this.manager=null,this.position=null},x:{get:function(){return this.position.x},set:function(i){this.position.x=i}},y:{get:function(){return this.position.y},set:function(i){this.position.y=i}},time:{get:function(){return this.event?this.event.timeStamp:0}}});p.exports=o},93301:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};p.exports=S},7179:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="boot"},85375:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="destroy"},39843:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="dragend"},23388:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="dragenter"},16133:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="drag"},27829:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="dragleave"},53904:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="dragover"},56058:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="dragstart"},2642:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="drop"},88171:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="gameobjectdown"},36147:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="dragend"},71692:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="dragenter"},96149:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="drag"},81285:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="dragleave"},74048:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="dragover"},21322:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="dragstart"},49378:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="drop"},86754:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="gameobjectmove"},86433:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="gameobjectout"},60709:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="gameobjectover"},24081:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pointerdown"},11172:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pointermove"},18907:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pointerout"},95579:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pointerover"},35368:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pointerup"},26972:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="wheel"},47078:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="gameobjectup"},73802:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="gameobjectwheel"},56718:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="gameout"},25936:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="gameover"},27503:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="boot"},50852:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="process"},96438:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="update"},59152:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pointerlockchange"},47777:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pointerdown"},27957:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pointerdownoutside"},19444:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pointermove"},54251:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pointerout"},18667:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pointerover"},27192:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pointerup"},24652:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pointerupoutside"},45132:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="wheel"},44512:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="preupdate"},15757:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="shutdown"},41637:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="start"},93802:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="update"},8214:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={BOOT:t(7179),DESTROY:t(85375),DRAG_END:t(39843),DRAG_ENTER:t(23388),DRAG:t(16133),DRAG_LEAVE:t(27829),DRAG_OVER:t(53904),DRAG_START:t(56058),DROP:t(2642),GAME_OUT:t(56718),GAME_OVER:t(25936),GAMEOBJECT_DOWN:t(88171),GAMEOBJECT_DRAG_END:t(36147),GAMEOBJECT_DRAG_ENTER:t(71692),GAMEOBJECT_DRAG:t(96149),GAMEOBJECT_DRAG_LEAVE:t(81285),GAMEOBJECT_DRAG_OVER:t(74048),GAMEOBJECT_DRAG_START:t(21322),GAMEOBJECT_DROP:t(49378),GAMEOBJECT_MOVE:t(86754),GAMEOBJECT_OUT:t(86433),GAMEOBJECT_OVER:t(60709),GAMEOBJECT_POINTER_DOWN:t(24081),GAMEOBJECT_POINTER_MOVE:t(11172),GAMEOBJECT_POINTER_OUT:t(18907),GAMEOBJECT_POINTER_OVER:t(95579),GAMEOBJECT_POINTER_UP:t(35368),GAMEOBJECT_POINTER_WHEEL:t(26972),GAMEOBJECT_UP:t(47078),GAMEOBJECT_WHEEL:t(73802),MANAGER_BOOT:t(27503),MANAGER_PROCESS:t(50852),MANAGER_UPDATE:t(96438),POINTER_DOWN:t(47777),POINTER_DOWN_OUTSIDE:t(27957),POINTER_MOVE:t(19444),POINTER_OUT:t(54251),POINTER_OVER:t(18667),POINTER_UP:t(27192),POINTER_UP_OUTSIDE:t(24652),POINTER_WHEEL:t(45132),POINTERLOCK_CHANGE:t(59152),PRE_UPDATE:t(44512),SHUTDOWN:t(15757),START:t(41637),UPDATE:t(93802)}},97421:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n){this.pad=r,this.events=r.events,this.index=n,this.value=0,this.threshold=.1},update:function(h){this.value=h},getValue:function(){return Math.abs(this.value)<this.threshold?0:this.value},destroy:function(){this.pad=null,this.events=null}});p.exports=c},28884:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(92734),h=new d({initialize:function(n,e){this.pad=n,this.events=n.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(r){this.value=r;var n=this.pad,e=this.index;r>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(c.BUTTON_DOWN,n,this,r),this.pad.emit(c.GAMEPAD_BUTTON_DOWN,e,r,this)):this.pressed&&(this.pressed=!1,this.events.emit(c.BUTTON_UP,n,this,r),this.pad.emit(c.GAMEPAD_BUTTON_UP,e,r,this))},destroy:function(){this.pad=null,this.events=null}});p.exports=h},99125:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(97421),c=t(28884),h=t(83419),r=t(50792),n=t(26099),e=new h({Extends:r,initialize:function(o,i){r.call(this),this.manager=o,this.pad=i,this.id=i.id,this.index=i.index;for(var a=[],l=0;l<i.buttons.length;l++)a.push(new c(this,l));this.buttons=a;var u=[];for(l=0;l<i.axes.length;l++)u.push(new d(this,l));this.axes=u,this.vibration=i.vibrationActuator;var f={value:0,pressed:!1};this._LCLeft=a[14]?a[14]:f,this._LCRight=a[15]?a[15]:f,this._LCTop=a[12]?a[12]:f,this._LCBottom=a[13]?a[13]:f,this._RCLeft=a[2]?a[2]:f,this._RCRight=a[1]?a[1]:f,this._RCTop=a[3]?a[3]:f,this._RCBottom=a[0]?a[0]:f,this._FBLeftTop=a[4]?a[4]:f,this._FBLeftBottom=a[6]?a[6]:f,this._FBRightTop=a[5]?a[5]:f,this._FBRightBottom=a[7]?a[7]:f;var v={value:0};this._HAxisLeft=u[0]?u[0]:v,this._VAxisLeft=u[1]?u[1]:v,this._HAxisRight=u[2]?u[2]:v,this._VAxisRight=u[3]?u[3]:v,this.leftStick=new n,this.rightStick=new n,this._created=performance.now()},getAxisTotal:function(){return this.axes.length},getAxisValue:function(s){return this.axes[s].getValue()},setAxisThreshold:function(s){for(var o=0;o<this.axes.length;o++)this.axes[o].threshold=s},getButtonTotal:function(){return this.buttons.length},getButtonValue:function(s){return this.buttons[s].value},isButtonDown:function(s){return this.buttons[s].pressed},update:function(s){if(!(s.timestamp<this._created)){var o,i=this.buttons,a=s.buttons,l=i.length;for(o=0;o<l;o++)i[o].update(a[o].value);var u=this.axes,f=s.axes;for(l=u.length,o=0;o<l;o++)u[o].update(f[o]);l>=2&&(this.leftStick.set(u[0].getValue(),u[1].getValue()),l>=4&&this.rightStick.set(u[2].getValue(),u[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var s;for(s=0;s<this.buttons.length;s++)this.buttons[s].destroy();for(s=0;s<this.axes.length;s++)this.axes[s].destroy();this.buttons=[],this.axes=[]},connected:{get:function(){return this.pad.connected}},timestamp:{get:function(){return this.pad.timestamp}},left:{get:function(){return this._LCLeft.pressed}},right:{get:function(){return this._LCRight.pressed}},up:{get:function(){return this._LCTop.pressed}},down:{get:function(){return this._LCBottom.pressed}},A:{get:function(){return this._RCBottom.pressed}},Y:{get:function(){return this._RCTop.pressed}},X:{get:function(){return this._RCLeft.pressed}},B:{get:function(){return this._RCRight.pressed}},L1:{get:function(){return this._FBLeftTop.value}},L2:{get:function(){return this._FBLeftBottom.value}},R1:{get:function(){return this._FBRightTop.value}},R2:{get:function(){return this._FBRightBottom.value}}});p.exports=e},56654:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(50792),h=t(92734),r=t(99125),n=t(35154),e=t(89639),s=t(8214),o=new d({Extends:c,initialize:function(a){c.call(this),this.scene=a.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=a,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,a.pluginEvents.once(s.BOOT,this.boot,this),a.pluginEvents.on(s.START,this.start,this)},boot:function(){var i=this.scene.sys.game,a=this.settings.input,l=i.config;this.enabled=n(a,"gamepad",l.inputGamepad)&&i.device.input.gamepads,this.target=n(a,"gamepad.target",l.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(s.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(s.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var i=this,a=this.target,l=function(u){u.defaultPrevented||!i.isActive()||(i.refreshPads(),i.queue.push(u))};this.onGamepadHandler=l,a.addEventListener("gamepadconnected",l,!1),a.addEventListener("gamepaddisconnected",l,!1),this.sceneInputPlugin.pluginEvents.on(s.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(s.UPDATE,this.update);for(var i=0;i<this.gamepads.length;i++)this.gamepads[i].removeAllListeners()},disconnectAll:function(){for(var i=0;i<this.gamepads.length;i++)this.gamepads[i].pad.connected=!1},refreshPads:function(){var i=navigator.getGamepads();if(!i)this.disconnectAll();else for(var a=this.gamepads,l=0;l<i.length;l++){var u=i[l];if(u){var f=u.id,v=u.index,m=a[v];if(m)m.id!==f?(m.destroy(),a[v]=new r(this,u)):m.update(u);else{var g=new r(this,u);a[v]=g,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=g):this._pad3=g:this._pad2=g:this._pad1=g}}}},getAll:function(){for(var i=[],a=this.gamepads,l=0;l<a.length;l++)a[l]&&i.push(a[l]);return i},getPad:function(i){for(var a=this.gamepads,l=0;l<a.length;l++)if(a[l]&&a[l].index===i)return a[l]},update:function(){if(this.enabled){this.refreshPads();var i=this.queue.length;if(i!==0)for(var a=this.queue.splice(0,i),l=0;l<i;l++){var u=a[l],f=this.getPad(u.gamepad.index);u.type==="gamepadconnected"?this.emit(h.CONNECTED,f,u):u.type==="gamepaddisconnected"&&this.emit(h.DISCONNECTED,f,u)}}},shutdown:function(){this.stopListeners(),this.removeAllListeners()},destroy:function(){this.shutdown();for(var i=0;i<this.gamepads.length;i++)this.gamepads[i]&&this.gamepads[i].destroy();this.gamepads=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.target=null},total:{get:function(){return this.gamepads.length}},pad1:{get:function(){return this._pad1}},pad2:{get:function(){return this._pad2}},pad3:{get:function(){return this._pad3}},pad4:{get:function(){return this._pad4}}});e.register("GamepadPlugin",o,"gamepad","gamepad","inputGamepad"),p.exports=o},89651:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},65294:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},90089:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},64894:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={DUALSHOCK_4:t(65294),SNES_USB:t(89651),XBOX_360:t(90089)}},46008:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="down"},7629:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="up"},42206:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="connected"},86544:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="disconnected"},94784:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="down"},14325:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="up"},92734:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={BUTTON_DOWN:t(46008),BUTTON_UP:t(7629),CONNECTED:t(42206),DISCONNECTED:t(86544),GAMEPAD_BUTTON_DOWN:t(94784),GAMEPAD_BUTTON_UP:t(14325)}},48646:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Axis:t(97421),Button:t(28884),Events:t(92734),Gamepad:t(99125),GamepadPlugin:t(56654),Configs:t(64894)}},14350:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(93301),c=t(79291),h={CreatePixelPerfectHandler:t(84409),CreateInteractiveObject:t(74457),Events:t(8214),Gamepad:t(48646),InputManager:t(7003),InputPlugin:t(48205),InputPluginCache:t(89639),Keyboard:t(51442),Mouse:t(87078),Pointer:t(42515),Touch:t(95618)};h=c(!1,h,d),p.exports=h},78970:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(72905),c=t(83419),h=t(8443),r=t(8214),n=t(46032),e=t(29747),s=new c({initialize:function(i){this.manager=i,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=e,this.onKeyUp=e,i.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var o=this.manager.config;this.enabled=o.inputKeyboard,this.target=o.inputKeyboardEventTarget,this.addCapture(o.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(h.POST_STEP,this.postUpdate,this)},startListeners:function(){var o=this;this.onKeyDown=function(a){if(!(a.defaultPrevented||!o.enabled||!o.manager)){o.queue.push(a),o.manager.events.emit(r.MANAGER_PROCESS);var l=a.altKey||a.ctrlKey||a.shiftKey||a.metaKey;o.preventDefault&&!l&&o.captures.indexOf(a.keyCode)>-1&&a.preventDefault()}},this.onKeyUp=function(a){if(!(a.defaultPrevented||!o.enabled||!o.manager)){o.queue.push(a),o.manager.events.emit(r.MANAGER_PROCESS);var l=a.altKey||a.ctrlKey||a.shiftKey||a.metaKey;o.preventDefault&&!l&&o.captures.indexOf(a.keyCode)>-1&&a.preventDefault()}};var i=this.target;i&&(i.addEventListener("keydown",this.onKeyDown,!1),i.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var o=this.target;o.removeEventListener("keydown",this.onKeyDown,!1),o.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(o){typeof o=="string"&&(o=o.split(",")),Array.isArray(o)||(o=[o]);for(var i=this.captures,a=0;a<o.length;a++){var l=o[a];typeof l=="string"&&(l=n[l.trim().toUpperCase()]),i.indexOf(l)===-1&&i.push(l)}this.preventDefault=i.length>0},removeCapture:function(o){typeof o=="string"&&(o=o.split(",")),Array.isArray(o)||(o=[o]);for(var i=this.captures,a=0;a<o.length;a++){var l=o[a];typeof l=="string"&&(l=n[l.toUpperCase()]),d(i,l)}this.preventDefault=i.length>0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(h.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});p.exports=s},28846:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(50792),h=t(95922),r=t(8443),n=t(35154),e=t(8214),s=t(89639),o=t(30472),i=t(46032),a=t(87960),l=t(74600),u=t(44594),f=t(56583),v=new d({Extends:c,initialize:function(g){c.call(this),this.game=g.systems.game,this.scene=g.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=g,this.manager=g.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,g.pluginEvents.once(e.BOOT,this.boot,this),g.pluginEvents.on(e.START,this.start,this)},boot:function(){var m=this.settings.input;this.enabled=n(m,"keyboard",!0);var g=n(m,"keyboard.capture",null);g&&this.addCaptures(g),this.sceneInputPlugin.pluginEvents.once(e.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(e.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(e.SHUTDOWN,this.shutdown,this),this.game.events.on(r.BLUR,this.resetKeys,this),this.scene.sys.events.on(u.PAUSE,this.resetKeys,this),this.scene.sys.events.on(u.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(m){return this.manager.addCapture(m),this},removeCapture:function(m){return this.manager.removeCapture(m),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:i.UP,down:i.DOWN,left:i.LEFT,right:i.RIGHT,space:i.SPACE,shift:i.SHIFT})},addKeys:function(m,g,x){g===void 0&&(g=!0),x===void 0&&(x=!1);var y={};if(typeof m=="string"){m=m.split(",");for(var T=0;T<m.length;T++){var C=m[T].trim();C&&(y[C]=this.addKey(C,g,x))}}else for(var E in m)y[E]=this.addKey(m[E],g,x);return y},addKey:function(m,g,x){g===void 0&&(g=!0),x===void 0&&(x=!1);var y=this.keys;if(m instanceof o){var T=y.indexOf(m);return T>-1?y[T]=m:y[m.keyCode]=m,g&&this.addCapture(m.keyCode),m.setEmitOnRepeat(x),m}return typeof m=="string"&&(m=i[m.toUpperCase()]),y[m]||(y[m]=new o(this,m),g&&this.addCapture(m),y[m].setEmitOnRepeat(x)),y[m]},removeKey:function(m,g,x){g===void 0&&(g=!1),x===void 0&&(x=!1);var y=this.keys,T;if(m instanceof o){var C=y.indexOf(m);C>-1&&(T=this.keys[C],this.keys[C]=void 0)}else typeof m=="string"&&(m=i[m.toUpperCase()]);return y[m]&&(T=y[m],y[m]=void 0),T&&(T.plugin=null,x&&this.removeCapture(T.keyCode),g&&T.destroy()),this},removeAllKeys:function(m,g){m===void 0&&(m=!1),g===void 0&&(g=!1);for(var x=this.keys,y=0;y<x.length;y++){var T=x[y];T&&(x[y]=void 0,g&&this.removeCapture(T.keyCode),m&&T.destroy())}return this},createCombo:function(m,g){return new a(this,m,g)},checkDown:function(m,g){if(g===void 0&&(g=0),this.enabled&&m.isDown){var x=f(this.time-m.timeDown,g);if(x>m._tick)return m._tick=x,!0}return!1},update:function(){var m=this.manager.queue,g=m.length;if(!(!this.isActive()||g===0))for(var x=this.keys,y=0;y<g;y++){var T=m[y],C=T.keyCode,E=x[C],M=!1;T.cancelled===void 0&&(T.cancelled=0,T.stopImmediatePropagation=function(){T.cancelled=1},T.stopPropagation=function(){T.cancelled=-1}),T.cancelled!==-1&&(C===this.prevCode&&T.timeStamp===this.prevTime&&T.type===this.prevType||(this.prevCode=C,this.prevTime=T.timeStamp,this.prevType=T.type,T.type==="keydown"?(E&&(M=E.isDown,E.onDown(T)),!T.cancelled&&(!E||!M)&&(l[C]&&this.emit(h.KEY_DOWN+l[C],T),T.cancelled||this.emit(h.ANY_KEY_DOWN,T))):(E&&E.onUp(T),T.cancelled||(l[C]&&this.emit(h.KEY_UP+l[C],T),T.cancelled||this.emit(h.ANY_KEY_UP,T))),T.cancelled===1&&(T.cancelled=0)))}},resetKeys:function(){for(var m=this.keys,g=0;g<m.length;g++)m[g]&&m[g].reset();return this},shutdown:function(){this.removeAllKeys(!0),this.removeAllListeners(),this.sceneInputPlugin.manager.events.off(e.MANAGER_PROCESS,this.update,this),this.game.events.off(r.BLUR,this.resetKeys),this.scene.sys.events.off(u.PAUSE,this.resetKeys,this),this.scene.sys.events.off(u.SLEEP,this.resetKeys,this),this.queue=[]},destroy:function(){this.shutdown();for(var m=this.keys,g=0;g<m.length;g++)m[g]&&m[g].destroy();this.keys=[],this.combos=[],this.queue=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.manager=null},time:{get:function(){return this.sceneInputPlugin.manager.time}}});s.register("KeyboardPlugin",v,"keyboard","keyboard","inputKeyboard"),p.exports=v},66970:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d.timeLastMatched=t.timeStamp,d.index++,d.index===d.size?!0:(d.current=d.keyCodes[d.index],!1)};p.exports=S},87960:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(95922),h=t(95540),r=t(68769),n=t(92803),e=new d({initialize:function(o,i,a){if(a===void 0&&(a={}),i.length<2)return!1;this.manager=o,this.enabled=!0,this.keyCodes=[];for(var l=0;l<i.length;l++){var u=i[l];typeof u=="string"?this.keyCodes.push(u.toUpperCase().charCodeAt(0)):typeof u=="number"?this.keyCodes.push(u):u.hasOwnProperty("keyCode")&&this.keyCodes.push(u.keyCode)}this.current=this.keyCodes[0],this.index=0,this.size=this.keyCodes.length,this.timeLastMatched=0,this.matched=!1,this.timeMatched=0,this.resetOnWrongKey=h(a,"resetOnWrongKey",!0),this.maxKeyDelay=h(a,"maxKeyDelay",0),this.resetOnMatch=h(a,"resetOnMatch",!1),this.deleteOnMatch=h(a,"deleteOnMatch",!1);var f=this,v=function(m){if(!(f.matched||!f.enabled)){var g=r(m,f);g&&(f.manager.emit(c.COMBO_MATCH,f,m),f.resetOnMatch?n(f):f.deleteOnMatch&&f.destroy())}};this.onKeyDown=v,this.manager.on(c.ANY_KEY_DOWN,this.onKeyDown)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off(c.ANY_KEY_DOWN,this.onKeyDown),this.manager=null}});p.exports=e},68769:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66970),c=function(h,r){if(r.matched)return!0;var n=!1,e=!1;if(h.keyCode===r.current)if(r.index>0&&r.maxKeyDelay>0){var s=r.timeLastMatched+r.maxKeyDelay;h.timeStamp<=s&&(e=!0,n=d(h,r))}else e=!0,n=d(h,r);return!e&&r.resetOnWrongKey&&(r.index=0,r.current=r.keyCodes[0]),n&&(r.timeLastMatched=h.timeStamp,r.matched=!0,r.timeMatched=h.timeStamp),n};p.exports=c},92803:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t};p.exports=S},92612:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="keydown"},23345:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="keyup"},21957:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="keycombomatch"},44743:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="down"},3771:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="keydown-"},46358:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="keyup-"},75674:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="up"},95922:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={ANY_KEY_DOWN:t(92612),ANY_KEY_UP:t(23345),COMBO_MATCH:t(21957),DOWN:t(44743),KEY_DOWN:t(3771),KEY_UP:t(46358),UP:t(75674)}},51442:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Events:t(95922),KeyboardManager:t(78970),KeyboardPlugin:t(28846),Key:t(30472),KeyCodes:t(46032),KeyCombo:t(87960),AdvanceKeyCombo:t(66970),ProcessKeyCombo:t(68769),ResetKeyCombo:t(92803),JustDown:t(90229),JustUp:t(38796),DownDuration:t(37015),UpDuration:t(41170)}},37015:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){d===void 0&&(d=50);var c=t.plugin.game.loop.time-t.timeDown;return t.isDown&&c<d};p.exports=S},90229:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t._justDown?(t._justDown=!1,!0):!1};p.exports=S},38796:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t._justUp?(t._justUp=!1,!0):!1};p.exports=S},30472:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(50792),h=t(95922),r=new d({Extends:c,initialize:function(e,s){c.call(this),this.plugin=e,this.keyCode=s,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(n){return this.emitOnRepeat=n,this},onDown:function(n){this.originalEvent=n,this.enabled&&(this.altKey=n.altKey,this.ctrlKey=n.ctrlKey,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.location=n.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(h.DOWN,this,n):(this.isDown=!0,this.isUp=!1,this.timeDown=n.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(h.DOWN,this,n)))},onUp:function(n){this.originalEvent=n,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=n.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(h.UP,this,n))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});p.exports=r},46032:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={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};p.exports=S},74600:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(46032),c={};for(var h in d)c[d[h]]=h;p.exports=c},41170:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){d===void 0&&(d=50);var c=t.plugin.game.loop.time-t.timeUp;return t.isUp&&c<d};p.exports=S},85098:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(89357),h=t(8214),r=t(29747),n=new d({initialize:function(s){this.manager=s,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=r,this.onMouseDown=r,this.onMouseUp=r,this.onMouseDownWindow=r,this.onMouseUpWindow=r,this.onMouseOver=r,this.onMouseOut=r,this.onMouseWheel=r,this.pointerLockChange=r,this.isTop=!0,s.events.once(h.MANAGER_BOOT,this.boot,this)},boot:function(){var e=this.manager.config;this.enabled=e.inputMouse,this.target=e.inputMouseEventTarget,this.passive=e.inputMousePassive,this.preventDefaultDown=e.inputMousePreventDefaultDown,this.preventDefaultUp=e.inputMousePreventDefaultUp,this.preventDefaultMove=e.inputMousePreventDefaultMove,this.preventDefaultWheel=e.inputMousePreventDefaultWheel,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,e.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(e){return e.preventDefault(),!1}),this},requestPointerLock:function(){if(c.pointerLock){var e=this.target;e.requestPointerLock=e.requestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock()}},releasePointerLock:function(){c.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var e=this.target;if(e){var s=this,o=this.manager,i=o.canvas,a=window&&window.focus&&o.game.config.autoFocus;this.onMouseMove=function(u){!u.defaultPrevented&&s.enabled&&o&&o.enabled&&(o.onMouseMove(u),s.preventDefaultMove&&u.preventDefault())},this.onMouseDown=function(u){a&&window.focus(),!u.defaultPrevented&&s.enabled&&o&&o.enabled&&(o.onMouseDown(u),s.preventDefaultDown&&u.target===i&&u.preventDefault())},this.onMouseDownWindow=function(u){u.sourceCapabilities&&u.sourceCapabilities.firesTouchEvents||!u.defaultPrevented&&s.enabled&&o&&o.enabled&&u.target!==i&&o.onMouseDown(u)},this.onMouseUp=function(u){!u.defaultPrevented&&s.enabled&&o&&o.enabled&&(o.onMouseUp(u),s.preventDefaultUp&&u.target===i&&u.preventDefault())},this.onMouseUpWindow=function(u){u.sourceCapabilities&&u.sourceCapabilities.firesTouchEvents||!u.defaultPrevented&&s.enabled&&o&&o.enabled&&u.target!==i&&o.onMouseUp(u)},this.onMouseOver=function(u){!u.defaultPrevented&&s.enabled&&o&&o.enabled&&o.setCanvasOver(u)},this.onMouseOut=function(u){!u.defaultPrevented&&s.enabled&&o&&o.enabled&&o.setCanvasOut(u)},this.onMouseWheel=function(u){!u.defaultPrevented&&s.enabled&&o&&o.enabled&&o.onMouseWheel(u),s.preventDefaultWheel&&u.target===i&&u.preventDefault()};var l={passive:!0};if(e.addEventListener("mousemove",this.onMouseMove),e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),e.addEventListener("mouseover",this.onMouseOver,l),e.addEventListener("mouseout",this.onMouseOut,l),this.preventDefaultWheel?e.addEventListener("wheel",this.onMouseWheel,{passive:!1}):e.addEventListener("wheel",this.onMouseWheel,l),window&&o.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,l),window.top.addEventListener("mouseup",this.onMouseUpWindow,l)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,l),window.addEventListener("mouseup",this.onMouseUpWindow,l),this.isTop=!1}c.pointerLock&&(this.pointerLockChange=function(u){var f=s.target;s.locked=document.pointerLockElement===f||document.mozPointerLockElement===f||document.webkitPointerLockElement===f,o.onPointerLockChange(u)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var e=this.target;e.removeEventListener("mousemove",this.onMouseMove),e.removeEventListener("mousedown",this.onMouseDown),e.removeEventListener("mouseup",this.onMouseUp),e.removeEventListener("mouseover",this.onMouseOver),e.removeEventListener("mouseout",this.onMouseOut),window&&(e=this.isTop?window.top:window,e.removeEventListener("mousedown",this.onMouseDownWindow),e.removeEventListener("mouseup",this.onMouseUpWindow)),c.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}});p.exports=n},87078:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={MouseManager:t(85098)}},36210:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(8214),h=t(29747),r=new d({initialize:function(e){this.manager=e,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=h,this.onTouchStartWindow=h,this.onTouchMove=h,this.onTouchEnd=h,this.onTouchEndWindow=h,this.onTouchCancel=h,this.onTouchCancelWindow=h,this.isTop=!0,e.events.once(c.MANAGER_BOOT,this.boot,this)},boot:function(){var n=this.manager.config;this.enabled=n.inputTouch,this.target=n.inputTouchEventTarget,this.capture=n.inputTouchCapture,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,n.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(n){return n.preventDefault(),!1}),this},startListeners:function(){var n=this.target;if(n){var e=this,s=this.manager,o=s.canvas,i=window&&window.focus&&s.game.config.autoFocus;this.onTouchMove=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchMove(f),e.capture&&f.cancelable&&f.preventDefault())},this.onTouchStart=function(f){i&&window.focus(),!f.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchStart(f),e.capture&&f.cancelable&&f.target===o&&f.preventDefault())},this.onTouchStartWindow=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&f.target!==o&&s.onTouchStart(f)},this.onTouchEnd=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchEnd(f),e.capture&&f.cancelable&&f.target===o&&f.preventDefault())},this.onTouchEndWindow=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&f.target!==o&&s.onTouchEnd(f)},this.onTouchCancel=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchCancel(f),e.capture&&f.preventDefault())},this.onTouchCancelWindow=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&s.onTouchCancel(f)};var a=this.capture,l={passive:!0},u={passive:!1};if(n.addEventListener("touchstart",this.onTouchStart,a?u:l),n.addEventListener("touchmove",this.onTouchMove,a?u:l),n.addEventListener("touchend",this.onTouchEnd,a?u:l),n.addEventListener("touchcancel",this.onTouchCancel,a?u:l),window&&s.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,u),window.top.addEventListener("touchend",this.onTouchEndWindow,u),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,u)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,u),window.addEventListener("touchend",this.onTouchEndWindow,u),window.addEventListener("touchcancel",this.onTouchCancelWindow,u),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var n=this.target;n.removeEventListener("touchstart",this.onTouchStart),n.removeEventListener("touchmove",this.onTouchMove),n.removeEventListener("touchend",this.onTouchEnd),n.removeEventListener("touchcancel",this.onTouchCancel),window&&(n=this.isTop?window.top:window,n.removeEventListener("touchstart",this.onTouchStartWindow),n.removeEventListener("touchend",this.onTouchEndWindow),n.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});p.exports=r},95618:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={TouchManager:t(36210)}},41299:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(54899),r=t(95540),n=t(98356),e=t(3374),s=t(84376),o=t(92638),i=new d({initialize:function(l,u){if(this.loader=l,this.cache=r(u,"cache",!1),this.type=r(u,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=r(u,"key",!1);var f=this.key;if(l.prefix&&l.prefix!==""&&(this.key=l.prefix+f),!this.key)throw new Error("Invalid File key: "+this.key);var v=r(u,"url");v===void 0?v=l.path+f+"."+r(u,"extension",""):typeof v=="string"&&!v.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(v=l.path+v),this.url=v,this.src="",this.xhrSettings=o(r(u,"responseType",void 0)),r(u,"xhrSettings",!1)&&(this.xhrSettings=e(this.xhrSettings,r(u,"xhrSettings",{}))),this.xhrLoader=null,this.state=typeof this.url=="function"?c.FILE_POPULATED:c.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=r(u,"config",{}),this.multiFile,this.linkFile,this.base64=typeof v=="string"&&v.indexOf("data:")===0,this.retryAttempts=r(u,"maxRetries",l.maxRetries)},setLink:function(a){this.linkFile=a,a.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){if(this.state===c.FILE_POPULATED)this.loader.nextFile(this,!0);else{if(this.state=c.FILE_LOADING,this.src=n(this,this.loader.baseURL),!this.src)throw new Error("URL Error in File: "+this.key+" from: "+this.url);this.src.indexOf("data:")===0&&(this.base64=!0),this.xhrLoader=s(this,this.loader.xhr)}},onLoad:function(a,l){var u=a.responseURL&&this.loader.localSchemes.some(function(m){return a.responseURL.indexOf(m)===0}),f=u&&l.target.status===0,v=!(l.target&&l.target.status!==200)||f;a.readyState===4&&a.status>=400&&a.status<=599&&(v=!1),this.state=c.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,v)},onBase64Load:function(a){this.xhrLoader=a,this.state=c.FILE_LOADED,this.percentComplete=1,this.loader.emit(h.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.retryAttempts>0?(this.retryAttempts--,this.load()):this.loader.nextFile(this,!1)},onProgress:function(a){a.lengthComputable&&(this.bytesLoaded=a.loaded,this.bytesTotal=a.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(h.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=c.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=c.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=c.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.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(a){if(this.state!==c.FILE_PENDING_DESTROY){a===void 0&&(a=this.data);var l=this.key,u=this.type;this.loader.emit(h.FILE_COMPLETE,l,u,a),this.loader.emit(h.FILE_KEY_COMPLETE+u+"-"+l,l,u,a),this.loader.flagForRemoval(this),this.state=c.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});i.createObjectURL=function(a,l,u){if(typeof URL=="function")a.src=URL.createObjectURL(l);else{var f=new FileReader;f.onload=function(){a.removeAttribute("crossOrigin"),a.src="data:"+(l.type||u)+";base64,"+f.result.split(",")[1]},f.onerror=a.onerror,f.readAsDataURL(l)}},i.revokeObjectURL=function(a){typeof URL=="function"&&URL.revokeObjectURL(a.src)},p.exports=i},74099:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={},t={install:function(d){for(var c in S)d[c]=S[c]},register:function(d,c){S[d]=c},destroy:function(){S={}}};p.exports=t},98356:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.url?t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:d+t.url:!1};p.exports=S},74261:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(35072),r=t(50792),n=t(54899),e=t(74099),s=t(95540),o=t(35154),i=t(41212),a=t(37277),l=t(44594),u=t(92638),f=new d({Extends:r,initialize:function(m){r.call(this);var g=m.sys.game.config,x=m.sys.settings.loader;this.scene=m,this.systems=m.sys,this.cacheManager=m.sys.cache,this.textureManager=m.sys.textures,this.sceneManager=m.sys.game.scene,e.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(s(x,"baseURL",g.loaderBaseURL)),this.setPath(s(x,"path",g.loaderPath)),this.setPrefix(s(x,"prefix",g.loaderPrefix)),this.maxParallelDownloads=s(x,"maxParallelDownloads",g.loaderMaxParallelDownloads),this.xhr=u(s(x,"responseType",g.loaderResponseType),s(x,"async",g.loaderAsync),s(x,"user",g.loaderUser),s(x,"password",g.loaderPassword),s(x,"timeout",g.loaderTimeout),s(x,"withCredentials",g.loaderWithCredentials)),this.crossOrigin=s(x,"crossOrigin",g.loaderCrossOrigin),this.imageLoadType=s(x,"imageLoadType",g.loaderImageLoadType),this.localSchemes=s(x,"localScheme",g.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new h,this.inflight=new h,this.queue=new h,this._deleteQueue=new h,this.totalFailed=0,this.totalComplete=0,this.state=c.LOADER_IDLE,this.multiKeyIndex=0,this.maxRetries=s(x,"maxRetries",g.loaderMaxRetries),m.sys.events.once(l.BOOT,this.boot,this),m.sys.events.on(l.START,this.pluginStart,this)},boot:function(){this.systems.events.once(l.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(l.SHUTDOWN,this.shutdown,this)},setBaseURL:function(v){return v===void 0&&(v=""),v!==""&&v.substr(-1)!=="/"&&(v=v.concat("/")),this.baseURL=v,this},setPath:function(v){return v===void 0&&(v=""),v!==""&&v.substr(-1)!=="/"&&(v=v.concat("/")),this.path=v,this},setPrefix:function(v){return v===void 0&&(v=""),this.prefix=v,this},setCORS:function(v){return this.crossOrigin=v,this},addFile:function(v){Array.isArray(v)||(v=[v]);for(var m=0;m<v.length;m++){var g=v[m];this.keyExists(g)||(this.list.set(g),this.emit(n.ADD,g.key,g.type,this,g),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(v){var m=v.hasCacheConflict();return m||this.list.iterate(function(g){if(g.type===v.type&&g.key===v.key)return m=!0,!1}),!m&&this.isLoading()&&(this.inflight.iterate(function(g){if(g.type===v.type&&g.key===v.key)return m=!0,!1}),this.queue.iterate(function(g){if(g.type===v.type&&g.key===v.key)return m=!0,!1})),m},addPack:function(v,m){if(typeof m=="string"){var g=o(v,m);g&&(v={packKey:g})}var x=0,y=this.baseURL,T=this.path,C=this.prefix;for(var E in v)if(Object.prototype.hasOwnProperty.call(v,E)){var M=v[E],P=s(M,"baseURL",y),A=s(M,"path",T),R=s(M,"prefix",C),F=s(M,"files",null),w=s(M,"defaultType","void");if(Array.isArray(F)){this.setBaseURL(P),this.setPath(A),this.setPrefix(R);for(var B=0;B<F.length;B++){var N=F[B],U=N.hasOwnProperty("type")?N.type:w;this[U]&&(this[U](N),x++)}}}return this.setBaseURL(y),this.setPath(T),this.setPrefix(C),x>0},removePack:function(v,m){var g=this.systems.anims,x=this.cacheManager,y=this.textureManager,T={animation:"json",aseprite:"json",audio:"audio",audioSprite:"audio",binary:"binary",bitmapFont:"bitmapFont",css:null,glsl:"shader",html:"html",json:"json",obj:"obj",plugin:null,scenePlugin:null,script:null,spine:"json",text:"text",tilemapCSV:"tilemap",tilemapImpact:"tilemap",tilemapTiledJSON:"tilemap",video:"video",xml:"xml"},C;if(i(v))C=v;else if(C=x.json.get(v),!C){console.warn("Asset Pack not found in JSON cache:",v);return}m&&(C={_:C[m]});for(var E in C){var M=C[E],P=s(M,"prefix",""),A=s(M,"files"),R=s(M,"defaultType");if(Array.isArray(A))for(var F=0;F<A.length;F++){var w=A[F],B=w.hasOwnProperty("type")?w.type:R;if(!B){console.warn("No type:",w);continue}var N=P+w.key;if(B==="animation"&&g.remove(N),!((B==="aseprite"||B==="atlas"||B==="atlasXML"||B==="htmlTexture"||B==="image"||B==="multiatlas"||B==="spritesheet"||B==="svg"||B==="texture"||B==="unityAtlas")&&(y.remove(N),!T[B]))){if(B==="pack"){this.removePack(N,w.dataKey);continue}if(B==="spine"){var U=x.custom.spine.get(N);if(!U)continue;var D=U.prefix===void 0?"":U.prefix;x.custom.spine.remove(N);var I=x.custom.spineTextures.get(N);if(!I)continue;x.custom.spineTextures.remove(N);for(var O=0;O<I.pages.length;O++){var L=I.pages[O],G=D+L.name,z=N+":"+G;y.exists(z)?y.remove(z):y.remove(G)}}var X=T[B];if(X!==null){if(!X){console.warn("Unknown type:",B);continue}var V=x[X];V.remove(N)}}}}},isLoading:function(){return this.state===c.LOADER_LOADING||this.state===c.LOADER_PROCESSING},isReady:function(){return this.state===c.LOADER_IDLE||this.state===c.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(n.START,this),this.list.size===0?this.loadComplete():(this.state=c.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(l.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(n.PROGRESS,this.progress)},update:function(){this.state===c.LOADER_LOADING&&this.list.size>0&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.each(function(v){if((v.state===c.FILE_POPULATED||v.state===c.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.set(v),this.list.delete(v),v.crossOrigin||(v.crossOrigin=this.crossOrigin),v.load()),this.inflight.size===this.maxParallelDownloads)return!1},this)},nextFile:function(v,m){this.inflight&&(this.inflight.delete(v),this.updateProgress(),m?(this.totalComplete++,this.queue.set(v),this.emit(n.FILE_LOAD,v),v.onProcess()):(this.totalFailed++,this._deleteQueue.set(v),this.emit(n.FILE_LOAD_ERROR,v),this.fileProcessComplete(v)))},fileProcessComplete:function(v){!this.scene||!this.systems||!this.systems.game||this.systems.game.pendingDestroy||(v.state===c.FILE_ERRORED?v.multiFile&&v.multiFile.onFileFailed(v):v.state===c.FILE_COMPLETE&&(v.multiFile?v.multiFile.isReadyToProcess()&&(v.multiFile.addToCache(),v.multiFile.pendingDestroy()):(v.addToCache(),v.pendingDestroy())),this.queue.delete(v),this.list.size===0&&this.inflight.size===0&&this.queue.size===0&&this.loadComplete())},loadComplete:function(){this.emit(n.POST_PROCESS,this),this.list.clear(),this.inflight.clear(),this.queue.clear(),this.progress=1,this.state=c.LOADER_COMPLETE,this.systems.events.off(l.UPDATE,this.update,this),this._deleteQueue.iterateLocal("destroy"),this._deleteQueue.clear(),this.emit(n.COMPLETE,this,this.totalComplete,this.totalFailed)},flagForRemoval:function(v){this._deleteQueue.set(v)},saveJSON:function(v,m){return this.save(JSON.stringify(v),m)},save:function(v,m,g){m===void 0&&(m="file.json"),g===void 0&&(g="application/json");var x=new Blob([v],{type:g}),y=URL.createObjectURL(x),T=document.createElement("a");return T.download=m,T.textContent="Download "+m,T.href=y,T.click(),this},reset:function(){this.list.clear(),this.inflight.clear(),this.queue.clear();var v=this.systems.game.config,m=this.systems.settings.loader;this.setBaseURL(s(m,"baseURL",v.loaderBaseURL)),this.setPath(s(m,"path",v.loaderPath)),this.setPrefix(s(m,"prefix",v.loaderPrefix)),this.state=c.LOADER_IDLE},shutdown:function(){this.reset(),this.state=c.LOADER_SHUTDOWN,this.removeAllListeners(),this.systems.events.off(l.UPDATE,this.update,this),this.systems.events.off(l.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.state=c.LOADER_DESTROYED,this.systems.events.off(l.UPDATE,this.update,this),this.systems.events.off(l.START,this.pluginStart,this),this.list=null,this.inflight=null,this.queue=null,this.scene=null,this.systems=null,this.textureManager=null,this.cacheManager=null,this.sceneManager=null}});a.register("Loader",f,"load"),p.exports=f},3374:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(79291),c=t(92638),h=function(r,n){var e=r===void 0?c():d({},r);if(n)for(var s in n)n[s]!==void 0&&(e[s]=n[s]);return e};p.exports=h},26430:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(54899),r=new d({initialize:function(e,s,o,i){var a=[];i.forEach(function(f){f&&a.push(f)}),this.loader=e,this.type=s,this.key=o;var l=this.key;e.prefix&&e.prefix!==""&&(this.key=e.prefix+l),this.multiKeyIndex=e.multiKeyIndex++,this.files=a,this.state=c.FILE_PENDING,this.complete=!1,this.pending=a.length,this.failed=0,this.config={},this.baseURL=e.baseURL,this.path=e.path,this.prefix=e.prefix;for(var u=0;u<a.length;u++)a[u].multiFile=this},isReadyToProcess:function(){return this.pending===0&&this.failed===0&&!this.complete},addToMultiFile:function(n){return this.files.push(n),n.multiFile=this,this.pending++,this.complete=!1,this},onFileComplete:function(n){var e=this.files.indexOf(n);e!==-1&&this.pending--},onFileFailed:function(n){var e=this.files.indexOf(n);e!==-1&&(this.failed++,console.error('File failed: %s "%s" (via %s "%s")',this.type,this.key,n.type,n.key))},pendingDestroy:function(){if(this.state!==c.FILE_PENDING_DESTROY){var n=this.key,e=this.type;this.loader.emit(h.FILE_COMPLETE,n,e),this.loader.emit(h.FILE_KEY_COMPLETE+e+"-"+n,n,e),this.loader.flagForRemoval(this);for(var s=0;s<this.files.length;s++)this.files[s].pendingDestroy();this.state=c.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.files=null,this.config=null}});p.exports=r},84376:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(3374),c=function(h,r){var n=d(r,h.xhrSettings);if(h.base64){var e=h.url.split(";base64,").pop()||h.url.split(",").pop(),s={responseText:atob(e)};h.onBase64Load(s);return}var o=new XMLHttpRequest;if(o.open("GET",h.src,n.async,n.user,n.password),o.responseType=h.xhrSettings.responseType,o.timeout=n.timeout,n.headers)for(var i in n.headers)o.setRequestHeader(i,n.headers[i]);return n.header&&n.headerValue&&o.setRequestHeader(n.header,n.headerValue),n.requestedWith&&o.setRequestHeader("X-Requested-With",n.requestedWith),n.overrideMimeType&&o.overrideMimeType(n.overrideMimeType),n.withCredentials&&(o.withCredentials=!0),o.onload=h.onLoad.bind(h,o),o.onerror=h.onError.bind(h,o),o.onprogress=h.onProgress.bind(h),o.ontimeout=h.onError.bind(h,o),o.send(),o};p.exports=c},92638:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h,r,n){return t===void 0&&(t=""),d===void 0&&(d=!0),c===void 0&&(c=""),h===void 0&&(h=""),r===void 0&&(r=0),n===void 0&&(n=!1),{responseType:t,async:d,user:c,password:h,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}};p.exports=S},23906:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20};p.exports=S},42155:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="addfile"},38991:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="complete"},27540:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="filecomplete"},87464:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="filecomplete-"},94486:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="loaderror"},13035:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="load"},38144:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="fileprogress"},97520:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="postprocess"},85595:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="progress"},55680:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="start"},54899:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={ADD:t(42155),COMPLETE:t(38991),FILE_COMPLETE:t(27540),FILE_KEY_COMPLETE:t(87464),FILE_LOAD_ERROR:t(94486),FILE_LOAD:t(13035),FILE_PROGRESS:t(38144),POST_PROCESS:t(97520),PROGRESS:t(85595),START:t(55680)}},14135:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(74099),h=t(518),r=t(54899),n=new d({Extends:h,initialize:function(s,o,i,a,l){h.call(this,s,o,i,a,l),this.type="animationJSON"},onProcess:function(){this.loader.once(r.POST_PROCESS,this.onLoadComplete,this),h.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});c.register("animation",function(e,s,o,i){if(Array.isArray(e))for(var a=0;a<e.length;a++)this.addFile(new n(this,e[a]));else this.addFile(new n(this,e,s,i,o));return this}),p.exports=n},76272:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(518),s=t(26430),o=new d({Extends:s,initialize:function(a,l,u,f,v,m){var g,x;if(n(l)){var y=l;l=h(y,"key"),g=new r(a,{key:l,url:h(y,"textureURL"),extension:h(y,"textureExtension","png"),normalMap:h(y,"normalMap"),xhrSettings:h(y,"textureXhrSettings")}),x=new e(a,{key:l,url:h(y,"atlasURL"),extension:h(y,"atlasExtension","json"),xhrSettings:h(y,"atlasXhrSettings")})}else g=new r(a,l,u,v),x=new e(a,l,f,m);g.linkFile?s.call(this,a,"atlasjson",l,[g,x,g.linkFile]):s.call(this,a,"atlasjson",l,[g,x])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],l=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,a.data,l),a.addToCache(),this.complete=!0}}});c.register("aseprite",function(i,a,l,u,f){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new o(this,i[m]),this.addFile(v.files);else v=new o(this,i,a,l,u,f),this.addFile(v.files);return this}),p.exports=o},38734:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(518),s=t(26430),o=new d({Extends:s,initialize:function(a,l,u,f,v,m){var g,x;if(n(l)){var y=l;l=h(y,"key"),g=new r(a,{key:l,url:h(y,"textureURL"),extension:h(y,"textureExtension","png"),normalMap:h(y,"normalMap"),xhrSettings:h(y,"textureXhrSettings")}),x=new e(a,{key:l,url:h(y,"atlasURL"),extension:h(y,"atlasExtension","json"),xhrSettings:h(y,"atlasXhrSettings")})}else g=new r(a,l,u,v),x=new e(a,l,f,m);g.linkFile?s.call(this,a,"atlasjson",l,[g,x,g.linkFile]):s.call(this,a,"atlasjson",l,[g,x])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],l=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,a.data,l),this.complete=!0}}});c.register("atlas",function(i,a,l,u,f){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new o(this,i[m]),this.addFile(v.files);else v=new o(this,i,a,l,u,f),this.addFile(v.files);return this}),p.exports=o},74599:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(26430),s=t(57318),o=new d({Extends:e,initialize:function(a,l,u,f,v,m){var g,x;if(n(l)){var y=l;l=h(y,"key"),g=new r(a,{key:l,url:h(y,"textureURL"),extension:h(y,"textureExtension","png"),normalMap:h(y,"normalMap"),xhrSettings:h(y,"textureXhrSettings")}),x=new s(a,{key:l,url:h(y,"atlasURL"),extension:h(y,"atlasExtension","xml"),xhrSettings:h(y,"atlasXhrSettings")})}else g=new r(a,l,u,v),x=new s(a,l,f,m);g.linkFile?e.call(this,a,"atlasxml",l,[g,x,g.linkFile]):e.call(this,a,"atlasxml",l,[g,x])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],l=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(i.key,i.data,a.data,l),this.complete=!0}}});c.register("atlasXML",function(i,a,l,u,f){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new o(this,i[m]),this.addFile(v.files);else v=new o(this,i,a,l,u,f),this.addFile(v.files);return this}),p.exports=o},21097:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(89749),s=t(41212),o=new d({Extends:h,initialize:function(a,l,u,f,v){if(s(l)){var m=l;l=n(m,"key"),f=n(m,"xhrSettings"),v=n(m,"context",v)}var g={type:"audio",cache:a.cacheManager.audio,extension:u.type,responseType:"arraybuffer",key:l,url:u.url,xhrSettings:f,config:{context:v}};h.call(this,a,g)},onProcess:function(){this.state=c.FILE_PROCESSING;var i=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(a){i.data=a,i.onProcessComplete()},function(a){console.error("Error decoding audio: "+i.key+" - ",a?a.message:null),i.onProcessError()}),this.config.context=null}});o.create=function(i,a,l,u,f){var v=i.systems.game,m=v.config.audio,g=v.device.audio;s(a)&&(l=n(a,"url",[]),u=n(a,"config",{}));var x=o.getAudioURL(v,l);return x?g.webAudio&&!m.disableWebAudio?new o(i,a,x,f,v.sound.context):new e(i,a,x,u):(console.warn('No audio URLs for "%s" can play on this device',a),null)},o.getAudioURL=function(i,a){Array.isArray(a)||(a=[a]);for(var l=0;l<a.length;l++){var u=n(a[l],"url",a[l]);if(u.indexOf("blob:")===0||u.indexOf("data:")===0)return{url:u,type:""};var f=u.match(/\.([a-zA-Z0-9]+)($|\?)/);if(f=n(a[l],"type",f?f[1]:"").toLowerCase(),i.device.audio[f])return{url:u,type:f}}return null},r.register("audio",function(i,a,l,u){var f=this.systems.game,v=f.config.audio,m=f.device.audio;if(v.noAudio||!m.webAudio&&!m.audioData)return this;var g;if(Array.isArray(i))for(var x=0;x<i.length;x++)g=o.create(this,i[x]),g&&this.addFile(g);else g=o.create(this,i,a,l,u),g&&this.addFile(g);return this}),p.exports=o},89524:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(21097),c=t(83419),h=t(74099),r=t(95540),n=t(41212),e=t(518),s=t(26430),o=new c({Extends:s,initialize:function(a,l,u,f,v,m,g){if(n(l)){var x=l;l=r(x,"key"),u=r(x,"jsonURL"),f=r(x,"audioURL"),v=r(x,"audioConfig"),m=r(x,"audioXhrSettings"),g=r(x,"jsonXhrSettings")}var y;if(!f)y=new e(a,l,u,g),s.call(this,a,"audiosprite",l,[y]),this.config.resourceLoad=!0,this.config.audioConfig=v,this.config.audioXhrSettings=m;else{var T=d.create(a,l,f,v,m);T&&(y=new e(a,l,u,g),s.call(this,a,"audiosprite",l,[T,y]),this.config.resourceLoad=!1)}},onFileComplete:function(i){var a=this.files.indexOf(i);if(a!==-1&&(this.pending--,this.config.resourceLoad&&i.type==="json"&&i.data.hasOwnProperty("resources"))){var l=i.data.resources,u=r(this.config,"audioConfig"),f=r(this.config,"audioXhrSettings"),v=d.create(this.loader,i.key,l,u,f);v&&(this.addToMultiFile(v),this.loader.addFile(v))}},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1];i.addToCache(),a.addToCache(),this.complete=!0}}});h.register("audioSprite",function(i,a,l,u,f,v){var m=this.systems.game,g=m.config.audio,x=m.device.audio;if(g&&g.noAudio||!x.webAudio&&!x.audioData)return this;var y;if(Array.isArray(i))for(var T=0;T<i.length;T++)y=new o(this,i[T]),y.files&&this.addFile(y.files);else y=new o(this,i,a,l,u,f,v),y.files&&this.addFile(y.files);return this})},85722:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,u,f){var v="bin";if(e(a)){var m=a;a=n(m,"key"),l=n(m,"url"),u=n(m,"xhrSettings"),v=n(m,"extension",v),f=n(m,"dataType",f)}var g={type:"binary",cache:i.cacheManager.binary,extension:v,responseType:"arraybuffer",key:a,url:l,xhrSettings:u,config:{dataType:f}};h.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING;var o=this.config.dataType;this.data=o?new o(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});r.register("binary",function(o,i,a,l){if(Array.isArray(o))for(var u=0;u<o.length;u++)this.addFile(new s(this,o[u]));else this.addFile(new s(this,o,i,l,a));return this}),p.exports=s},97025:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(26430),s=t(21859),o=t(57318),i=new d({Extends:e,initialize:function(l,u,f,v,m,g){var x,y;if(n(u)){var T=u;u=h(T,"key"),x=new r(l,{key:u,url:h(T,"textureURL"),extension:h(T,"textureExtension","png"),normalMap:h(T,"normalMap"),xhrSettings:h(T,"textureXhrSettings")}),y=new o(l,{key:u,url:h(T,"fontDataURL"),extension:h(T,"fontDataExtension","xml"),xhrSettings:h(T,"fontDataXhrSettings")})}else x=new r(l,u,f,m),y=new o(l,u,v,g);x.linkFile?e.call(this,l,"bitmapfont",u,[x,y,x.linkFile]):e.call(this,l,"bitmapfont",u,[x,y])},addToCache:function(){if(this.isReadyToProcess()){var a=this.files[0],l=this.files[1];a.addToCache();var u=a.cache.get(a.key),f=s(l.data,a.cache.getFrame(a.key),0,0,u);this.loader.cacheManager.bitmapFont.add(a.key,{data:f,texture:a.key,frame:null}),this.complete=!0}}});c.register("bitmapFont",function(a,l,u,f,v){var m;if(Array.isArray(a))for(var g=0;g<a.length;g++)m=new i(this,a[g]),this.addFile(m.files);else m=new i(this,a,l,u,f,v),this.addFile(m.files);return this}),p.exports=i},16024:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,u){var f="css";if(e(a)){var v=a;a=n(v,"key"),l=n(v,"url"),u=n(v,"xhrSettings"),f=n(v,"extension",f)}var m={type:"script",cache:!1,extension:f,responseType:"text",key:a,url:l,xhrSettings:u};h.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});r.register("css",function(o,i,a){if(Array.isArray(o))for(var l=0;l<o.length;l++)this.addFile(new s(this,o[l]));else this.addFile(new s(this,o,i,a));return this}),p.exports=s},69559:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2021 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(38734),c=t(85722),h=t(83419),r=t(74099),n=t(95540),e=t(19550),s=t(41212),o=t(518),i=t(31403),a=t(46975),l=t(59327),u=t(26430),f=t(82038),v=t(55222),m=new h({Extends:u,initialize:function(x,y,T,C){if(T.multiAtlasURL){var E=new o(x,{key:y,url:T.multiAtlasURL,xhrSettings:C,config:T});u.call(this,x,"texture",y,[E])}else{var M=T.textureURL.substr(T.textureURL.length-3);T.type||(T.type=M.toLowerCase()==="ktx"?"KTX":"PVR");var P=new c(x,{key:y,url:T.textureURL,extension:M,xhrSettings:C,config:T});if(T.atlasURL){var A=new o(x,{key:y,url:T.atlasURL,xhrSettings:C,config:T});u.call(this,x,"texture",y,[P,A])}else u.call(this,x,"texture",y,[P])}this.config=T},onFileComplete:function(g){var x=this.files.indexOf(g);if(x!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(g.type==="json"&&g.data.hasOwnProperty("textures")){var y=g.data.textures,T=this.config,C=this.loader,E=C.baseURL,M=C.path,P=C.prefix,A=n(T,"multiBaseURL",this.baseURL),R=n(T,"multiPath",this.path),F=n(T,"prefix",this.prefix),w=n(T,"textureXhrSettings");A&&C.setBaseURL(A),R&&C.setPath(R),F&&C.setPrefix(F);for(var B=0;B<y.length;B++){var N=y[B].image,U="CMA"+this.multiKeyIndex+"_"+N,D=new c(C,U,N,w);if(this.addToMultiFile(D),C.addFile(D),y[B].normalMap){var I=new c(C,U,y[B].normalMap,w);I.type="normalMap",D.setLink(I),this.addToMultiFile(I),C.addFile(I)}}C.setBaseURL(E),C.setPath(M),C.setPrefix(P)}}},addToCache:function(){function g(A){console.warn('Compressed Texture Invalid: "'+E.key+'". '+A)}if(this.isReadyToProcess()){var x=this.config;if(x.multiAtlasURL)this.addMultiToCache();else{var y=this.loader.systems.renderer,T=this.loader.textureManager,C,E=this.files[0],M=this.files[1];if(x.type==="PVR"?C=f(E.data):x.type==="KTX"&&(C=i(E.data),C||g("KTX file contains unsupported format.")),C&&!v(C)&&(g("Texture dimensions failed verification. Check the texture format specifications for "+x.format+" 0x"+C.internalFormat.toString(16)+"."),C=null),C&&!y.supportsCompressedTexture(x.format,C.internalFormat)&&(g("Texture format "+x.format+" with internal format "+C.internalFormat+" not supported by the GPU. Texture invalid. This is often due to the texture using sRGB instead of linear RGB."),C=null),C){C.format=y.getCompressedTextureName(x.format,C.internalFormat);var P=M&&M.data?M.data:null;T.addCompressedTexture(E.key,C,P)}}this.complete=!0}},addMultiToCache:function(){for(var g=this.config,x=this.files[0],y=[],T=[],C=[],E=this.loader.systems.renderer,M=this.loader.textureManager,P,A=1;A<this.files.length;A++){var R=this.files[A];if(R.type!=="normalMap")for(var F=R.key.indexOf("_"),w=R.key.substr(F+1),B=R.data,N=0;N<x.data.textures.length;N++){var U=x.data.textures[N];if(U.image===w){g.type==="PVR"?P=f(B):g.type==="KTX"&&(P=i(B)),P&&E.supportsCompressedTexture(g.format,P.internalFormat)&&(P.format=E.getCompressedTextureName(g.format,P.internalFormat),T.push(P),y.push(U),R.linkFile&&C.push(R.linkFile.data));break}}}C.length===0&&(C=void 0),M.addAtlasJSONArray(this.key,T,y,C),this.complete=!0}});r.register("texture",function(g,x,y){var T=this.systems.renderer,C=function(M,P,A,R){var F={format:null,type:null,textureURL:void 0,atlasURL:void 0,multiAtlasURL:void 0,multiPath:void 0,multiBaseURL:void 0};if(s(P)){var w=P;P=n(w,"key"),A=n(w,"url"),R=n(w,"xhrSettings")}var B=!1;for(var N in A)if(T.supportsCompressedTexture(N)){var U=A[N];typeof U=="string"?F.textureURL=U:F=a(U,F),F.format=N.toUpperCase(),B=!0;break}if(!B)console.warn("No supported compressed texture format or IMG fallback",P);else if(F.format==="IMG"){var D,I;F.multiAtlasURL?(I=new l(M,P,F.multiAtlasURL,F.multiPath,F.multiBaseURL,R),D=I.files):F.atlasURL?(I=new d(M,P,F.textureURL,F.atlasURL,R),D=I.files):D=new e(M,P,F.textureURL,R),M.addFile(D)}else{var O=new m(M,P,F,R);M.addFile(O.files)}};if(Array.isArray(g))for(var E=0;E<g.length;E++)C(this,g[E]);else C(this,g,x,y);return this}),p.exports=m},47931:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(73894),o=new d({Extends:h,initialize:function(a,l,u,f,v){var m="glsl";if(e(l)){var g=l;l=n(g,"key"),u=n(g,"url"),f=n(g,"shaderType","fragment"),v=n(g,"xhrSettings"),m=n(g,"extension",m)}else f===void 0&&(f="fragment");var x={type:"glsl",cache:a.cacheManager.shader,extension:m,responseType:"text",key:l,url:u,config:{shaderType:f},xhrSettings:v};h.call(this,a,x)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var i=this.data.split(`
`),a=this.extractBlock(i,0);if(a)for(;a;){var l=this.getShaderName(a.header),u=this.getShaderType(a.header),f=this.getShaderUniforms(a.header),v=a.shader;if(this.cache.has(l)){var m=this.cache.get(l);u==="fragment"?m.fragmentSrc=v:m.vertexSrc=v,m.uniforms||(m.uniforms=f)}else u==="fragment"?this.cache.add(l,new s(l,v,"",f)):this.cache.add(l,new s(l,"",v,f));a=this.extractBlock(i,a.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new s(this.key,this.data)):this.cache.add(this.key,new s(this.key,"",this.data))},getShaderName:function(i){for(var a=0;a<i.length;a++){var l=i[a].trim();if(l.substring(0,5)==="name:")return l.substring(5).trim()}return this.key},getShaderType:function(i){for(var a=0;a<i.length;a++){var l=i[a].trim();if(l.substring(0,5)==="type:")return l.substring(5).trim()}return this.config.shaderType},getShaderUniforms:function(i){for(var a={},l=0;l<i.length;l++){var u=i[l].trim();if(u.substring(0,8)==="uniform."){var f=u.indexOf(":");if(f){var v=u.substring(8,f);try{a[v]=JSON.parse(u.substring(f+1))}catch{console.warn("Invalid uniform JSON: "+v)}}}}return a},extractBlock:function(i,a){for(var l=-1,u=-1,f=-1,v=!1,m=!1,g=[],x=[],y=a;y<i.length;y++){var T=i[y].trim();if(T==="---")if(l===-1)l=y,v=!0;else if(v)u=y,v=!1,m=!0;else{m=!1;break}else v?g.push(T):m&&(x.push(T),f=y)}return!v&&u!==-1?{header:g,shader:x.join(`
`),offset:f}:null}});r.register("glsl",function(i,a,l,u){if(Array.isArray(i))for(var f=0;f<i.length;f++)this.addFile(new o(this,i[f]));else this.addFile(new o(this,i,a,l,u));return this}),p.exports=o},89749:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(54899),h=t(41299),r=t(95540),n=t(98356),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,u){if(e(a)){var f=a;a=r(f,"key"),u=r(f,"config",u)}var v={type:"audio",cache:i.cacheManager.audio,extension:l.type,key:a,url:l.url,config:u};h.call(this,i,v),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var o=0;o<this.data.length;o++){var i=this.data[o];i.oncanplaythrough=null,i.onerror=null}this.loader.nextFile(this,!1)},onProgress:function(o){var i=o.target;i.oncanplaythrough=null,i.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(c.FILE_PROGRESS,this,this.percentComplete),this.filesLoaded===this.filesTotal&&this.onLoad()},load:function(){this.data=[];var o=this.config&&this.config.instances||1;this.filesTotal=o,this.filesLoaded=0,this.percentComplete=0;for(var i=0;i<o;i++){var a=new Audio;a.dataset||(a.dataset={}),a.dataset.name=this.key+("0"+i).slice(-2),a.dataset.used="false",this.locked?a.dataset.locked="true":(a.dataset.locked="false",a.preload="auto",a.oncanplaythrough=this.onProgress.bind(this),a.onerror=this.onError.bind(this)),this.data.push(a)}for(i=0;i<this.data.length;i++)a=this.data[i],a.src=n(this,this.loader.baseURL),this.locked||a.load();this.locked&&setTimeout(this.onLoad.bind(this))}});p.exports=s},88470:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,u){var f="html";if(e(a)){var v=a;a=n(v,"key"),l=n(v,"url"),u=n(v,"xhrSettings"),f=n(v,"extension",f)}var m={type:"text",cache:i.cacheManager.html,extension:f,responseType:"text",key:a,url:l,xhrSettings:u};h.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("html",function(o,i,a){if(Array.isArray(o))for(var l=0;l<o.length;l++)this.addFile(new s(this,o[l]));else this.addFile(new s(this,o,i,a));return this}),p.exports=s},14643:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,u,f,v){u===void 0&&(u=512),f===void 0&&(f=512);var m="html";if(e(a)){var g=a;a=n(g,"key"),l=n(g,"url"),v=n(g,"xhrSettings"),m=n(g,"extension",m),u=n(g,"width",u),f=n(g,"height",f)}var x={type:"html",cache:i.textureManager,extension:m,responseType:"text",key:a,url:l,xhrSettings:v,config:{width:u,height:f}};h.call(this,i,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var o=this.config.width,i=this.config.height,a=[];a.push('<svg width="'+o+'px" height="'+i+'px" viewBox="0 0 '+o+" "+i+'" xmlns="http://www.w3.org/2000/svg">'),a.push('<foreignObject width="100%" height="100%">'),a.push('<body xmlns="http://www.w3.org/1999/xhtml">'),a.push(this.xhrLoader.responseText),a.push("</body>"),a.push("</foreignObject>"),a.push("</svg>");var l=[a.join(`
`)],u=this;try{var f=new window.Blob(l,{type:"image/svg+xml;charset=utf-8"})}catch{u.state=c.FILE_ERRORED,u.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){h.revokeObjectURL(u.data),u.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(u.data),u.onProcessError()},h.createObjectURL(this.data,f,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("htmlTexture",function(o,i,a,l,u){if(Array.isArray(o))for(var f=0;f<o.length;f++)this.addFile(new s(this,o[f]));else this.addFile(new s(this,o,i,a,l,u));return this}),p.exports=s},19550:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(98356),o=new d({Extends:h,initialize:function i(a,l,u,f,v){var m="png",g;if(e(l)){var x=l;l=n(x,"key"),u=n(x,"url"),g=n(x,"normalMap"),f=n(x,"xhrSettings"),m=n(x,"extension",m),v=n(x,"frameConfig")}Array.isArray(u)&&(g=u[1],u=u[0]);var y={type:"image",cache:a.textureManager,extension:m,responseType:"blob",key:l,url:u,xhrSettings:f,config:v};if(h.call(this,a,y),g){var T=new i(a,this.key,g,f,v);T.type="normalMap",this.setLink(T),a.addFile(T)}this.useImageElementLoad=a.imageLoadType==="HTMLImageElement"||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var i=this;this.data.onload=function(){h.revokeObjectURL(i.data),i.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(i.data),i.onProcessError()},h.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var i=this.state;this.state=c.FILE_PROCESSING,i===c.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=c.FILE_LOADING,this.src=s(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var i=this;this.data.onload=function(){i.state=c.FILE_LOADED,i.loader.nextFile(i,!0)},this.data.onerror=function(){i.loader.nextFile(i,!1)},this.data.src=this.src},addToCache:function(){var i=this.linkFile;i?i.state>=c.FILE_COMPLETE&&(i.type==="spritesheet"?i.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,i.data,this.data):this.cache.addImage(this.key,this.data,i.data)):this.cache.addImage(this.key,this.data)}});r.register("image",function(i,a,l){if(Array.isArray(i))for(var u=0;u<i.length;u++)this.addFile(new o(this,i[u]));else this.addFile(new o(this,i,a,l));return this}),p.exports=o},518:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(35154),s=t(41212),o=new d({Extends:h,initialize:function(a,l,u,f,v){var m="json";if(s(l)){var g=l;l=n(g,"key"),u=n(g,"url"),f=n(g,"xhrSettings"),m=n(g,"extension",m),v=n(g,"dataKey",v)}var x={type:"json",cache:a.cacheManager.json,extension:m,responseType:"text",key:l,url:u,xhrSettings:f,config:v};h.call(this,a,x),s(u)&&(v?this.data=e(u,v):this.data=u,this.state=c.FILE_POPULATED)},onProcess:function(){if(this.state!==c.FILE_POPULATED){this.state=c.FILE_PROCESSING;try{var i=JSON.parse(this.xhrLoader.responseText)}catch(l){throw this.onProcessError(),l}var a=this.config;typeof a=="string"?this.data=e(i,a,i):this.data=i}this.onProcessComplete()}});r.register("json",function(i,a,l,u){if(Array.isArray(i))for(var f=0;f<i.length;f++)this.addFile(new o(this,i[f]));else this.addFile(new o(this,i,a,u,l));return this}),p.exports=o},59327:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(518),s=t(26430),o=new d({Extends:s,initialize:function(a,l,u,f,v,m,g){if(n(l)){var x=l;l=h(x,"key"),h(x,"url",!1)?u=h(x,"url"):u=h(x,"atlasURL"),m=h(x,"xhrSettings"),f=h(x,"path"),v=h(x,"baseURL"),g=h(x,"textureXhrSettings")}var y=new e(a,l,u,m);s.call(this,a,"multiatlas",l,[y]),this.config.path=f,this.config.baseURL=v,this.config.textureXhrSettings=g},onFileComplete:function(i){var a=this.files.indexOf(i);if(a!==-1&&(this.pending--,i.type==="json"&&i.data.hasOwnProperty("textures"))){var l=i.data.textures,u=this.config,f=this.loader,v=f.baseURL,m=f.path,g=f.prefix,x=h(u,"baseURL",this.baseURL),y=h(u,"path",this.path),T=h(u,"prefix",this.prefix),C=h(u,"textureXhrSettings");f.setBaseURL(x),f.setPath(y),f.setPrefix(T);for(var E=0;E<l.length;E++){var M=l[E].image,P="MA"+this.multiKeyIndex+"_"+M,A=new r(f,P,M,C);if(this.addToMultiFile(A),f.addFile(A),l[E].normalMap){var R=new r(f,P,l[E].normalMap,C);R.type="normalMap",A.setLink(R),this.addToMultiFile(R),f.addFile(R)}}f.setBaseURL(v),f.setPath(m),f.setPrefix(g)}},addToCache:function(){if(this.isReadyToProcess()){for(var i=this.files[0],a=[],l=[],u=[],f=1;f<this.files.length;f++){var v=this.files[f];if(v.type!=="normalMap")for(var m=v.key.indexOf("_"),g=v.key.substr(m+1),x=v.data,y=0;y<i.data.textures.length;y++){var T=i.data.textures[y];if(T.image===g){l.push(x),a.push(T),v.linkFile&&u.push(v.linkFile.data);break}}}u.length===0&&(u=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,l,a,u),this.complete=!0}}});c.register("multiatlas",function(i,a,l,u,f){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new o(this,i[m]),this.addFile(v.files);else v=new o(this,i,a,l,u,f),this.addFile(v.files);return this}),p.exports=o},99297:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(74099),h=t(95540),r=t(41212),n=t(26430),e=t(34328),s=new d({Extends:n,initialize:function(i,a,l,u){var f="js",v=[];if(r(a)){var m=a;a=h(m,"key"),l=h(m,"url"),u=h(m,"xhrSettings"),f=h(m,"extension",f)}Array.isArray(l)||(l=[l]);for(var g=0;g<l.length;g++){var x=new e(i,{key:a+"_"+g.toString(),url:l[g],extension:f,xhrSettings:u});x.onProcess=function(){this.onProcessComplete()},v.push(x)}n.call(this,i,"scripts",a,v)},addToCache:function(){if(this.isReadyToProcess()){for(var o=0;o<this.files.length;o++){var i=this.files[o];i.data=document.createElement("script"),i.data.language="javascript",i.data.type="text/javascript",i.data.defer=!1,i.data.text=i.xhrLoader.responseText,document.head.appendChild(i.data)}this.complete=!0}}});c.register("scripts",function(o,i,a){var l;if(Array.isArray(o))for(var u=0;u<o.length;u++)l=new s(this,o[u]),this.addFile(l.files);else l=new s(this,o,i,a),this.addFile(l.files);return this}),p.exports=s},41846:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(74099),h=t(95540),r=t(41212),n=t(26430),e=t(85048),s=t(61485),o=t(78776),i=new d({Extends:n,initialize:function(l,u,f,v,m,g){var x,y,T=l.cacheManager.obj;if(r(u)){var C=u;u=h(C,"key"),x=new o(l,{key:u,type:"obj",cache:T,url:h(C,"url"),extension:h(C,"extension","obj"),xhrSettings:h(C,"xhrSettings"),config:{flipUV:h(C,"flipUV",m)}}),v=h(C,"matURL"),v&&(y=new o(l,{key:u,type:"mat",cache:T,url:v,extension:h(C,"matExtension","mat"),xhrSettings:h(C,"xhrSettings")}))}else x=new o(l,{key:u,url:f,type:"obj",cache:T,extension:"obj",xhrSettings:g,config:{flipUV:m}}),v&&(y=new o(l,{key:u,url:v,type:"mat",cache:T,extension:"mat",xhrSettings:g}));n.call(this,l,"obj",u,[x,y])},addToCache:function(){if(this.isReadyToProcess()){var a=this.files[0],l=this.files[1],u=e(a.data,a.config.flipUV);l&&(u.materials=s(l.data)),a.cache.add(a.key,u),this.complete=!0}}});c.register("obj",function(a,l,u,f,v){var m;if(Array.isArray(a))for(var g=0;g<a.length;g++)m=new i(this,a[g]),this.addFile(m.files);else m=new i(this,a,l,u,f,v),this.addFile(m.files);return this}),p.exports=i},58610:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(74099),r=t(518),n=new d({Extends:r,initialize:function(s,o,i,a,l){r.call(this,s,o,i,a,l),this.type="packfile"},onProcess:function(){if(this.state!==c.FILE_POPULATED&&(this.state=c.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var e={};e[this.config]=this.data,this.data=e}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});h.register("pack",function(e,s,o,i){if(Array.isArray(e))for(var a=0;a<e.length;a++)this.addFile(new n(this,e[a]));else this.addFile(new n(this,e,s,i,o));return this}),p.exports=n},48988:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,u,f,v){var m="js";if(e(a)){var g=a;a=n(g,"key"),l=n(g,"url"),v=n(g,"xhrSettings"),m=n(g,"extension",m),u=n(g,"start"),f=n(g,"mapping")}var x={type:"plugin",cache:!1,extension:m,responseType:"text",key:a,url:l,xhrSettings:v,config:{start:u,mapping:f}};h.call(this,i,x),typeof l=="function"&&(this.data=l,this.state=c.FILE_POPULATED)},onProcess:function(){var o=this.loader.systems.plugins,i=this.config,a=n(i,"start",!1),l=n(i,"mapping",null);if(this.state===c.FILE_POPULATED)o.install(this.key,this.data,a,l);else{this.state=c.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var u=o.install(this.key,window[this.key],a,l);(a||l)&&(this.loader.systems[l]=u,this.loader.scene[l]=u)}this.onProcessComplete()}});r.register("plugin",function(o,i,a,l,u){if(Array.isArray(o))for(var f=0;f<o.length;f++)this.addFile(new s(this,o[f]));else this.addFile(new s(this,o,i,a,l,u));return this}),p.exports=s},67397:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,u,f){var v="svg";if(e(a)){var m=a;a=n(m,"key"),l=n(m,"url"),u=n(m,"svgConfig",{}),f=n(m,"xhrSettings"),v=n(m,"extension",v)}var g={type:"svg",cache:i.textureManager,extension:v,responseType:"text",key:a,url:l,xhrSettings:f,config:{width:n(u,"width"),height:n(u,"height"),scale:n(u,"scale")}};h.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING;var o=this.xhrLoader.responseText,i=[o],a=this.config.width,l=this.config.height,u=this.config.scale;t:if(a&&l||u){var f=null,v=new DOMParser;f=v.parseFromString(o,"text/xml");var m=f.getElementsByTagName("svg")[0],g=m.hasAttribute("viewBox"),x=parseFloat(m.getAttribute("width")),y=parseFloat(m.getAttribute("height"));if(!g&&x&&y)m.setAttribute("viewBox","0 0 "+x+" "+y);else if(g&&!x&&!y){var T=m.getAttribute("viewBox").split(/\s+|,/);x=T[2],y=T[3]}if(u)if(x&&y)a=x*u,l=y*u;else break t;m.setAttribute("width",a.toString()+"px"),m.setAttribute("height",l.toString()+"px"),i=[new XMLSerializer().serializeToString(m)]}try{var C=new window.Blob(i,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var E=this,M=!1;this.data.onload=function(){M||h.revokeObjectURL(E.data),E.onProcessComplete()},this.data.onerror=function(){M?E.onProcessError():(M=!0,h.revokeObjectURL(E.data),E.data.src="data:image/svg+xml,"+encodeURIComponent(i.join("")))},h.createObjectURL(this.data,C,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("svg",function(o,i,a,l){if(Array.isArray(o))for(var u=0;u<o.length;u++)this.addFile(new s(this,o[u]));else this.addFile(new s(this,o,i,a,l));return this}),p.exports=s},88423:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,u){var f="js";if(e(a)){var v=a;a=n(v,"key"),l=n(v,"url"),u=n(v,"xhrSettings"),f=n(v,"extension",f)}var m={type:"text",extension:f,responseType:"text",key:a,url:l,xhrSettings:u};h.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var o=this.data.concat(`(function(){
return new `+this.key+`();
}).call(this);`),i=eval;this.loader.sceneManager.add(this.key,i(o)),this.complete=!0}});r.register("sceneFile",function(o,i,a){if(Array.isArray(o))for(var l=0;l<o.length;l++)this.addFile(new s(this,o[l]));else this.addFile(new s(this,o,i,a));return this}),p.exports=s},56812:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,u,f,v){var m="js";if(e(a)){var g=a;a=n(g,"key"),l=n(g,"url"),v=n(g,"xhrSettings"),m=n(g,"extension",m),u=n(g,"systemKey"),f=n(g,"sceneKey")}var x={type:"scenePlugin",cache:!1,extension:m,responseType:"text",key:a,url:l,xhrSettings:v,config:{systemKey:u,sceneKey:f}};h.call(this,i,x),typeof l=="function"&&(this.data=l,this.state=c.FILE_POPULATED)},onProcess:function(){var o=this.loader.systems.plugins,i=this.config,a=this.key,l=n(i,"systemKey",a),u=n(i,"sceneKey",a);this.state===c.FILE_POPULATED?o.installScenePlugin(l,this.data,u,this.loader.scene,!0):(this.state=c.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),o.installScenePlugin(l,window[this.key],u,this.loader.scene,!0)),this.onProcessComplete()}});r.register("scenePlugin",function(o,i,a,l,u){if(Array.isArray(o))for(var f=0;f<o.length;f++)this.addFile(new s(this,o[f]));else this.addFile(new s(this,o,i,a,l,u));return this}),p.exports=s},34328:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,u,f){var v="js";if(e(a)){var m=a;a=n(m,"key"),l=n(m,"url"),u=n(m,"type","script"),f=n(m,"xhrSettings"),v=n(m,"extension",v)}else u===void 0&&(u="script");var g={type:u,cache:!1,extension:v,responseType:"text",key:a,url:l,xhrSettings:f};h.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});r.register("script",function(o,i,a,l){if(Array.isArray(o))for(var u=0;u<o.length;u++)this.addFile(new s(this,o[u]));else this.addFile(new s(this,o,i,a,l));return this}),p.exports=s},85035:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(74099),r=t(19550),n=new d({Extends:r,initialize:function(s,o,i,a,l){r.call(this,s,o,i,l,a),this.type="spritesheet"},addToCache:function(){var e=this.linkFile;e?e.state>=c.FILE_COMPLETE&&(this.type==="normalMap"?this.cache.addSpriteSheet(this.key,e.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,e.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});h.register("spritesheet",function(e,s,o,i){if(Array.isArray(e))for(var a=0;a<e.length;a++)this.addFile(new n(this,e[a]));else this.addFile(new n(this,e,s,o,i));return this}),p.exports=n},78776:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,u){var f="text",v="txt",m=i.cacheManager.text;if(e(a)){var g=a;a=n(g,"key"),l=n(g,"url"),u=n(g,"xhrSettings"),v=n(g,"extension",v),f=n(g,"type",f),m=n(g,"cache",m)}var x={type:f,cache:m,extension:v,responseType:"text",key:a,url:l,xhrSettings:u};h.call(this,i,x)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("text",function(o,i,a){if(Array.isArray(o))for(var l=0;l<o.length;l++)this.addFile(new s(this,o[l]));else this.addFile(new s(this,o,i,a));return this}),p.exports=s},49477:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(80341),o=new d({Extends:h,initialize:function(a,l,u,f){var v="csv";if(e(l)){var m=l;l=n(m,"key"),u=n(m,"url"),f=n(m,"xhrSettings"),v=n(m,"extension",v)}var g={type:"tilemapCSV",cache:a.cacheManager.tilemap,extension:v,responseType:"text",key:l,url:u,xhrSettings:f};h.call(this,a,g),this.tilemapFormat=s.CSV},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var i={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,i)}});r.register("tilemapCSV",function(i,a,l){if(Array.isArray(i))for(var u=0;u<i.length;u++)this.addFile(new o(this,i[u]));else this.addFile(new o(this,i,a,l));return this}),p.exports=o},40807:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(74099),h=t(518),r=t(80341),n=new d({Extends:h,initialize:function(s,o,i,a){h.call(this,s,o,i,a),this.type="tilemapJSON",this.cache=s.cacheManager.tilemap},addToCache:function(){var e={format:r.WELTMEISTER,data:this.data};this.cache.add(this.key,e)}});c.register("tilemapImpact",function(e,s,o){if(Array.isArray(e))for(var i=0;i<e.length;i++)this.addFile(new n(this,e[i]));else this.addFile(new n(this,e,s,o));return this}),p.exports=n},56775:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(74099),h=t(518),r=t(80341),n=new d({Extends:h,initialize:function(s,o,i,a){h.call(this,s,o,i,a),this.type="tilemapJSON",this.cache=s.cacheManager.tilemap},addToCache:function(){var e={format:r.TILED_JSON,data:this.data};this.cache.add(this.key,e)}});c.register("tilemapTiledJSON",function(e,s,o){if(Array.isArray(e))for(var i=0;i<e.length;i++)this.addFile(new n(this,e[i]));else this.addFile(new n(this,e,s,o));return this}),p.exports=n},25771:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(26430),s=t(78776),o=new d({Extends:e,initialize:function(a,l,u,f,v,m){var g,x;if(n(l)){var y=l;l=h(y,"key"),g=new r(a,{key:l,url:h(y,"textureURL"),extension:h(y,"textureExtension","png"),normalMap:h(y,"normalMap"),xhrSettings:h(y,"textureXhrSettings")}),x=new s(a,{key:l,url:h(y,"atlasURL"),extension:h(y,"atlasExtension","txt"),xhrSettings:h(y,"atlasXhrSettings")})}else g=new r(a,l,u,v),x=new s(a,l,f,m);g.linkFile?e.call(this,a,"unityatlas",l,[g,x,g.linkFile]):e.call(this,a,"unityatlas",l,[g,x])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],l=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(i.key,i.data,a.data,l),this.complete=!0}}});c.register("unityAtlas",function(i,a,l,u,f){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new o(this,i[m]),this.addFile(v.files);else v=new o(this,i,a,l,u,f),this.addFile(v.files);return this}),p.exports=o},33720:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(98356),e=t(95540),s=t(41212),o=new d({Extends:h,initialize:function(a,l,u,f){if(f===void 0&&(f=!1),s(l)){var v=l;l=e(v,"key"),u=e(v,"url",[]),f=e(v,"noAudio",!1)}var m=a.systems.game.device.video.getVideoURL(u);m||console.warn("VideoFile: No supported format for "+l);var g={type:"video",cache:a.cacheManager.video,extension:m.type,key:l,url:m.url,config:{noAudio:f}};h.call(this,a,g)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=n(this,this.loader.baseURL),this.state=c.FILE_LOADED,this.loader.nextFile(this,!0)}});r.register("video",function(i,a,l){if(Array.isArray(i))for(var u=0;u<i.length;u++)this.addFile(new o(this,i[u]));else this.addFile(new o(this,i,a,l));return this}),p.exports=o},57318:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(56836),o=new d({Extends:h,initialize:function(a,l,u,f){var v="xml";if(e(l)){var m=l;l=n(m,"key"),u=n(m,"url"),f=n(m,"xhrSettings"),v=n(m,"extension",v)}var g={type:"xml",cache:a.cacheManager.xml,extension:v,responseType:"text",key:l,url:u,xhrSettings:f};h.call(this,a,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=s(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});r.register("xml",function(i,a,l){if(Array.isArray(i))for(var u=0;u<i.length;u++)this.addFile(new o(this,i[u]));else this.addFile(new o(this,i,a,l));return this}),p.exports=o},64589:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={AnimationJSONFile:t(14135),AsepriteFile:t(76272),AtlasJSONFile:t(38734),AtlasXMLFile:t(74599),AudioFile:t(21097),AudioSpriteFile:t(89524),BinaryFile:t(85722),BitmapFontFile:t(97025),CompressedTextureFile:t(69559),CSSFile:t(16024),GLSLFile:t(47931),HTML5AudioFile:t(89749),HTMLFile:t(88470),HTMLTextureFile:t(14643),ImageFile:t(19550),JSONFile:t(518),MultiAtlasFile:t(59327),MultiScriptFile:t(99297),OBJFile:t(41846),PackFile:t(58610),PluginFile:t(48988),SceneFile:t(88423),ScenePluginFile:t(56812),ScriptFile:t(34328),SpriteSheetFile:t(85035),SVGFile:t(67397),TextFile:t(78776),TilemapCSVFile:t(49477),TilemapImpactFile:t(40807),TilemapJSONFile:t(56775),UnityAtlasFile:t(25771),VideoFile:t(33720),XMLFile:t(57318)}},57777:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(23906),c=t(79291),h={Events:t(54899),FileTypes:t(64589),File:t(41299),FileTypesManager:t(74099),GetURL:t(98356),LoaderPlugin:t(74261),MergeXHRSettings:t(3374),MultiFile:t(26430),XHRLoader:t(84376),XHRSettings:t(92638)};h=c(!1,h,d),p.exports=h},53307:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){for(var d=0,c=0;c<t.length;c++)d+=+t[c];return d/t.length};p.exports=S},85710:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(6411),c=function(h,r){return d(h)/d(r)/d(h-r)};p.exports=c},30976:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return Math.floor(Math.random()*(d-t+1)+t)};p.exports=S},87842:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h,r){var n=(h-d)*.5,e=(r-c)*.5,s=t*t,o=t*s;return(2*c-2*h+n+e)*o+(-3*c+3*h-2*n-e)*s+n*t+c};p.exports=S},26302:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var h=Math.pow(c,-d);return Math.ceil(t*h)/h};p.exports=S},45319:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return Math.max(d,Math.min(c,t))};p.exports=S},39506:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(36383),c=function(h){return h*d.DEG_TO_RAD};p.exports=c},61241:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return Math.abs(t-d)};p.exports=S},38857:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45319),c=t(83419),h=t(37867),r=t(29747),n=new h,e=new c({initialize:function s(o,i,a,l){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=s.DefaultOrder),this._x=o,this._y=i,this._z=a,this._order=l,this.onChangeCallback=r},x:{get:function(){return this._x},set:function(s){this._x=s,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(s){this._y=s,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(s){this._z=s,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(s){this._order=s,this.onChangeCallback(this)}},set:function(s,o,i,a){return a===void 0&&(a=this._order),this._x=s,this._y=o,this._z=i,this._order=a,this.onChangeCallback(this),this},copy:function(s){return this.set(s.x,s.y,s.z,s.order)},setFromQuaternion:function(s,o,i){return o===void 0&&(o=this._order),i===void 0&&(i=!1),n.fromQuat(s),this.setFromRotationMatrix(n,o,i)},setFromRotationMatrix:function(s,o,i){o===void 0&&(o=this._order),i===void 0&&(i=!1);var a=s.val,l=a[0],u=a[4],f=a[8],v=a[1],m=a[5],g=a[9],x=a[2],y=a[6],T=a[10],C=0,E=0,M=0,P=.99999;switch(o){case"XYZ":{E=Math.asin(d(f,-1,1)),Math.abs(f)<P?(C=Math.atan2(-g,T),M=Math.atan2(-u,l)):C=Math.atan2(y,m);break}case"YXZ":{C=Math.asin(-d(g,-1,1)),Math.abs(g)<P?(E=Math.atan2(f,T),M=Math.atan2(v,m)):E=Math.atan2(-x,l);break}case"ZXY":{C=Math.asin(d(y,-1,1)),Math.abs(y)<P?(E=Math.atan2(-x,T),M=Math.atan2(-u,m)):M=Math.atan2(v,l);break}case"ZYX":{E=Math.asin(-d(x,-1,1)),Math.abs(x)<P?(C=Math.atan2(y,T),M=Math.atan2(v,l)):M=Math.atan2(-u,m);break}case"YZX":{M=Math.asin(d(v,-1,1)),Math.abs(v)<P?(C=Math.atan2(-g,m),E=Math.atan2(-x,l)):E=Math.atan2(f,T);break}case"XZY":{M=Math.asin(-d(u,-1,1)),Math.abs(u)<P?(C=Math.atan2(y,m),E=Math.atan2(f,l)):C=Math.atan2(-g,T);break}}return this._x=C,this._y=E,this._z=M,this._order=o,i&&this.onChangeCallback(this),this}});e.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],e.DefaultOrder="XYZ",p.exports=e},6411:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){if(t===0)return 1;for(var d=t;--t;)d*=t;return d};p.exports=S},99472:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return Math.random()*(d-t)+t};p.exports=S},77623:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var h=Math.pow(c,-d);return Math.floor(t*h)/h};p.exports=S},62945:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45319),c=function(h,r,n){return h=d(h,0,1),(n-r)*h+r};p.exports=c},38265:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t/d/1e3};p.exports=S},78702:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t==parseFloat(t)?!(t%2):void 0};p.exports=S},94883:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t===parseFloat(t)?!(t%2):void 0};p.exports=S},28915:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return(d-t)*c+t};p.exports=S},94908:p=>{/**
* @author Greg McLean <GregDevProjects>
* @copyright 2021 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return c===void 0&&(c=0),t.clone().lerp(d,c)};p.exports=S},94434:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r){this.val=new Float32Array(9),r?this.copy(r):this.identity()},clone:function(){return new c(this)},set:function(h){return this.copy(h)},copy:function(h){var r=this.val,n=h.val;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],this},fromMat4:function(h){var r=h.val,n=this.val;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[4],n[4]=r[5],n[5]=r[6],n[6]=r[8],n[7]=r[9],n[8]=r[10],this},fromArray:function(h){var r=this.val;return r[0]=h[0],r[1]=h[1],r[2]=h[2],r[3]=h[3],r[4]=h[4],r[5]=h[5],r[6]=h[6],r[7]=h[7],r[8]=h[8],this},identity:function(){var h=this.val;return h[0]=1,h[1]=0,h[2]=0,h[3]=0,h[4]=1,h[5]=0,h[6]=0,h[7]=0,h[8]=1,this},transpose:function(){var h=this.val,r=h[1],n=h[2],e=h[5];return h[1]=h[3],h[2]=h[6],h[3]=r,h[5]=h[7],h[6]=n,h[7]=e,this},invert:function(){var h=this.val,r=h[0],n=h[1],e=h[2],s=h[3],o=h[4],i=h[5],a=h[6],l=h[7],u=h[8],f=u*o-i*l,v=-u*s+i*a,m=l*s-o*a,g=r*f+n*v+e*m;return g?(g=1/g,h[0]=f*g,h[1]=(-u*n+e*l)*g,h[2]=(i*n-e*o)*g,h[3]=v*g,h[4]=(u*r-e*a)*g,h[5]=(-i*r+e*s)*g,h[6]=m*g,h[7]=(-l*r+n*a)*g,h[8]=(o*r-n*s)*g,this):null},adjoint:function(){var h=this.val,r=h[0],n=h[1],e=h[2],s=h[3],o=h[4],i=h[5],a=h[6],l=h[7],u=h[8];return h[0]=o*u-i*l,h[1]=e*l-n*u,h[2]=n*i-e*o,h[3]=i*a-s*u,h[4]=r*u-e*a,h[5]=e*s-r*i,h[6]=s*l-o*a,h[7]=n*a-r*l,h[8]=r*o-n*s,this},determinant:function(){var h=this.val,r=h[0],n=h[1],e=h[2],s=h[3],o=h[4],i=h[5],a=h[6],l=h[7],u=h[8];return r*(u*o-i*l)+n*(-u*s+i*a)+e*(l*s-o*a)},multiply:function(h){var r=this.val,n=r[0],e=r[1],s=r[2],o=r[3],i=r[4],a=r[5],l=r[6],u=r[7],f=r[8],v=h.val,m=v[0],g=v[1],x=v[2],y=v[3],T=v[4],C=v[5],E=v[6],M=v[7],P=v[8];return r[0]=m*n+g*o+x*l,r[1]=m*e+g*i+x*u,r[2]=m*s+g*a+x*f,r[3]=y*n+T*o+C*l,r[4]=y*e+T*i+C*u,r[5]=y*s+T*a+C*f,r[6]=E*n+M*o+P*l,r[7]=E*e+M*i+P*u,r[8]=E*s+M*a+P*f,this},translate:function(h){var r=this.val,n=h.x,e=h.y;return r[6]=n*r[0]+e*r[3]+r[6],r[7]=n*r[1]+e*r[4]+r[7],r[8]=n*r[2]+e*r[5]+r[8],this},rotate:function(h){var r=this.val,n=r[0],e=r[1],s=r[2],o=r[3],i=r[4],a=r[5],l=Math.sin(h),u=Math.cos(h);return r[0]=u*n+l*o,r[1]=u*e+l*i,r[2]=u*s+l*a,r[3]=u*o-l*n,r[4]=u*i-l*e,r[5]=u*a-l*s,this},scale:function(h){var r=this.val,n=h.x,e=h.y;return r[0]=n*r[0],r[1]=n*r[1],r[2]=n*r[2],r[3]=e*r[3],r[4]=e*r[4],r[5]=e*r[5],this},fromQuat:function(h){var r=h.x,n=h.y,e=h.z,s=h.w,o=r+r,i=n+n,a=e+e,l=r*o,u=r*i,f=r*a,v=n*i,m=n*a,g=e*a,x=s*o,y=s*i,T=s*a,C=this.val;return C[0]=1-(v+g),C[3]=u+T,C[6]=f-y,C[1]=u-T,C[4]=1-(l+g),C[7]=m+x,C[2]=f+y,C[5]=m-x,C[8]=1-(l+v),this},normalFromMat4:function(h){var r=h.val,n=this.val,e=r[0],s=r[1],o=r[2],i=r[3],a=r[4],l=r[5],u=r[6],f=r[7],v=r[8],m=r[9],g=r[10],x=r[11],y=r[12],T=r[13],C=r[14],E=r[15],M=e*l-s*a,P=e*u-o*a,A=e*f-i*a,R=s*u-o*l,F=s*f-i*l,w=o*f-i*u,B=v*T-m*y,N=v*C-g*y,U=v*E-x*y,D=m*C-g*T,I=m*E-x*T,O=g*E-x*C,L=M*O-P*I+A*D+R*U-F*N+w*B;return L?(L=1/L,n[0]=(l*O-u*I+f*D)*L,n[1]=(u*U-a*O-f*N)*L,n[2]=(a*I-l*U+f*B)*L,n[3]=(o*I-s*O-i*D)*L,n[4]=(e*O-o*U+i*N)*L,n[5]=(s*U-e*I-i*B)*L,n[6]=(T*w-C*F+E*R)*L,n[7]=(C*A-y*w-E*P)*L,n[8]=(y*F-T*A+E*M)*L,this):null}});p.exports=c},37867:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(25836),h=1e-6,r=new d({initialize:function(l){this.val=new Float32Array(16),l?this.copy(l):this.identity()},clone:function(){return new r(this)},set:function(a){return this.copy(a)},setValues:function(a,l,u,f,v,m,g,x,y,T,C,E,M,P,A,R){var F=this.val;return F[0]=a,F[1]=l,F[2]=u,F[3]=f,F[4]=v,F[5]=m,F[6]=g,F[7]=x,F[8]=y,F[9]=T,F[10]=C,F[11]=E,F[12]=M,F[13]=P,F[14]=A,F[15]=R,this},copy:function(a){var l=a.val;return this.setValues(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[15])},fromArray:function(a){return this.setValues(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(a,l,u){var f=n.fromQuat(u),v=f.val,m=l.x,g=l.y,x=l.z;return this.setValues(v[0]*m,v[1]*m,v[2]*m,0,v[4]*g,v[5]*g,v[6]*g,0,v[8]*x,v[9]*x,v[10]*x,0,a.x,a.y,a.z,1)},xyz:function(a,l,u){this.identity();var f=this.val;return f[12]=a,f[13]=l,f[14]=u,this},scaling:function(a,l,u){this.zero();var f=this.val;return f[0]=a,f[5]=l,f[10]=u,f[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 a=this.val,l=a[1],u=a[2],f=a[3],v=a[6],m=a[7],g=a[11];return a[1]=a[4],a[2]=a[8],a[3]=a[12],a[4]=l,a[6]=a[9],a[7]=a[13],a[8]=u,a[9]=v,a[11]=a[14],a[12]=f,a[13]=m,a[14]=g,this},getInverse:function(a){return this.copy(a),this.invert()},invert:function(){var a=this.val,l=a[0],u=a[1],f=a[2],v=a[3],m=a[4],g=a[5],x=a[6],y=a[7],T=a[8],C=a[9],E=a[10],M=a[11],P=a[12],A=a[13],R=a[14],F=a[15],w=l*g-u*m,B=l*x-f*m,N=l*y-v*m,U=u*x-f*g,D=u*y-v*g,I=f*y-v*x,O=T*A-C*P,L=T*R-E*P,G=T*F-M*P,z=C*R-E*A,X=C*F-M*A,V=E*F-M*R,Y=w*V-B*X+N*z+U*G-D*L+I*O;return Y?(Y=1/Y,this.setValues((g*V-x*X+y*z)*Y,(f*X-u*V-v*z)*Y,(A*I-R*D+F*U)*Y,(E*D-C*I-M*U)*Y,(x*G-m*V-y*L)*Y,(l*V-f*G+v*L)*Y,(R*N-P*I-F*B)*Y,(T*I-E*N+M*B)*Y,(m*X-g*G+y*O)*Y,(u*G-l*X-v*O)*Y,(P*D-A*N+F*w)*Y,(C*N-T*D-M*w)*Y,(g*L-m*z-x*O)*Y,(l*z-u*L+f*O)*Y,(A*B-P*U-R*w)*Y,(T*U-C*B+E*w)*Y)):this},adjoint:function(){var a=this.val,l=a[0],u=a[1],f=a[2],v=a[3],m=a[4],g=a[5],x=a[6],y=a[7],T=a[8],C=a[9],E=a[10],M=a[11],P=a[12],A=a[13],R=a[14],F=a[15];return this.setValues(g*(E*F-M*R)-C*(x*F-y*R)+A*(x*M-y*E),-(u*(E*F-M*R)-C*(f*F-v*R)+A*(f*M-v*E)),u*(x*F-y*R)-g*(f*F-v*R)+A*(f*y-v*x),-(u*(x*M-y*E)-g*(f*M-v*E)+C*(f*y-v*x)),-(m*(E*F-M*R)-T*(x*F-y*R)+P*(x*M-y*E)),l*(E*F-M*R)-T*(f*F-v*R)+P*(f*M-v*E),-(l*(x*F-y*R)-m*(f*F-v*R)+P*(f*y-v*x)),l*(x*M-y*E)-m*(f*M-v*E)+T*(f*y-v*x),m*(C*F-M*A)-T*(g*F-y*A)+P*(g*M-y*C),-(l*(C*F-M*A)-T*(u*F-v*A)+P*(u*M-v*C)),l*(g*F-y*A)-m*(u*F-v*A)+P*(u*y-v*g),-(l*(g*M-y*C)-m*(u*M-v*C)+T*(u*y-v*g)),-(m*(C*R-E*A)-T*(g*R-x*A)+P*(g*E-x*C)),l*(C*R-E*A)-T*(u*R-f*A)+P*(u*E-f*C),-(l*(g*R-x*A)-m*(u*R-f*A)+P*(u*x-f*g)),l*(g*E-x*C)-m*(u*E-f*C)+T*(u*x-f*g))},determinant:function(){var a=this.val,l=a[0],u=a[1],f=a[2],v=a[3],m=a[4],g=a[5],x=a[6],y=a[7],T=a[8],C=a[9],E=a[10],M=a[11],P=a[12],A=a[13],R=a[14],F=a[15],w=l*g-u*m,B=l*x-f*m,N=l*y-v*m,U=u*x-f*g,D=u*y-v*g,I=f*y-v*x,O=T*A-C*P,L=T*R-E*P,G=T*F-M*P,z=C*R-E*A,X=C*F-M*A,V=E*F-M*R;return w*V-B*X+N*z+U*G-D*L+I*O},multiply:function(a){var l=this.val,u=l[0],f=l[1],v=l[2],m=l[3],g=l[4],x=l[5],y=l[6],T=l[7],C=l[8],E=l[9],M=l[10],P=l[11],A=l[12],R=l[13],F=l[14],w=l[15],B=a.val,N=B[0],U=B[1],D=B[2],I=B[3];return l[0]=N*u+U*g+D*C+I*A,l[1]=N*f+U*x+D*E+I*R,l[2]=N*v+U*y+D*M+I*F,l[3]=N*m+U*T+D*P+I*w,N=B[4],U=B[5],D=B[6],I=B[7],l[4]=N*u+U*g+D*C+I*A,l[5]=N*f+U*x+D*E+I*R,l[6]=N*v+U*y+D*M+I*F,l[7]=N*m+U*T+D*P+I*w,N=B[8],U=B[9],D=B[10],I=B[11],l[8]=N*u+U*g+D*C+I*A,l[9]=N*f+U*x+D*E+I*R,l[10]=N*v+U*y+D*M+I*F,l[11]=N*m+U*T+D*P+I*w,N=B[12],U=B[13],D=B[14],I=B[15],l[12]=N*u+U*g+D*C+I*A,l[13]=N*f+U*x+D*E+I*R,l[14]=N*v+U*y+D*M+I*F,l[15]=N*m+U*T+D*P+I*w,this},multiplyLocal:function(a){var l=this.val,u=a.val;return this.setValues(l[0]*u[0]+l[1]*u[4]+l[2]*u[8]+l[3]*u[12],l[0]*u[1]+l[1]*u[5]+l[2]*u[9]+l[3]*u[13],l[0]*u[2]+l[1]*u[6]+l[2]*u[10]+l[3]*u[14],l[0]*u[3]+l[1]*u[7]+l[2]*u[11]+l[3]*u[15],l[4]*u[0]+l[5]*u[4]+l[6]*u[8]+l[7]*u[12],l[4]*u[1]+l[5]*u[5]+l[6]*u[9]+l[7]*u[13],l[4]*u[2]+l[5]*u[6]+l[6]*u[10]+l[7]*u[14],l[4]*u[3]+l[5]*u[7]+l[6]*u[11]+l[7]*u[15],l[8]*u[0]+l[9]*u[4]+l[10]*u[8]+l[11]*u[12],l[8]*u[1]+l[9]*u[5]+l[10]*u[9]+l[11]*u[13],l[8]*u[2]+l[9]*u[6]+l[10]*u[10]+l[11]*u[14],l[8]*u[3]+l[9]*u[7]+l[10]*u[11]+l[11]*u[15],l[12]*u[0]+l[13]*u[4]+l[14]*u[8]+l[15]*u[12],l[12]*u[1]+l[13]*u[5]+l[14]*u[9]+l[15]*u[13],l[12]*u[2]+l[13]*u[6]+l[14]*u[10]+l[15]*u[14],l[12]*u[3]+l[13]*u[7]+l[14]*u[11]+l[15]*u[15])},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,l){var u=a.val,f=l.val,v=u[0],m=u[4],g=u[8],x=u[12],y=u[1],T=u[5],C=u[9],E=u[13],M=u[2],P=u[6],A=u[10],R=u[14],F=u[3],w=u[7],B=u[11],N=u[15],U=f[0],D=f[4],I=f[8],O=f[12],L=f[1],G=f[5],z=f[9],X=f[13],V=f[2],Y=f[6],W=f[10],H=f[14],b=f[3],K=f[7],Q=f[11],Z=f[15];return this.setValues(v*U+m*L+g*V+x*b,y*U+T*L+C*V+E*b,M*U+P*L+A*V+R*b,F*U+w*L+B*V+N*b,v*D+m*G+g*Y+x*K,y*D+T*G+C*Y+E*K,M*D+P*G+A*Y+R*K,F*D+w*G+B*Y+N*K,v*I+m*z+g*W+x*Q,y*I+T*z+C*W+E*Q,M*I+P*z+A*W+R*Q,F*I+w*z+B*W+N*Q,v*O+m*X+g*H+x*Z,y*O+T*X+C*H+E*Z,M*O+P*X+A*H+R*Z,F*O+w*X+B*H+N*Z)},translate:function(a){return this.translateXYZ(a.x,a.y,a.z)},translateXYZ:function(a,l,u){var f=this.val;return f[12]=f[0]*a+f[4]*l+f[8]*u+f[12],f[13]=f[1]*a+f[5]*l+f[9]*u+f[13],f[14]=f[2]*a+f[6]*l+f[10]*u+f[14],f[15]=f[3]*a+f[7]*l+f[11]*u+f[15],this},scale:function(a){return this.scaleXYZ(a.x,a.y,a.z)},scaleXYZ:function(a,l,u){var f=this.val;return f[0]=f[0]*a,f[1]=f[1]*a,f[2]=f[2]*a,f[3]=f[3]*a,f[4]=f[4]*l,f[5]=f[5]*l,f[6]=f[6]*l,f[7]=f[7]*l,f[8]=f[8]*u,f[9]=f[9]*u,f[10]=f[10]*u,f[11]=f[11]*u,this},makeRotationAxis:function(a,l){var u=Math.cos(l),f=Math.sin(l),v=1-u,m=a.x,g=a.y,x=a.z,y=v*m,T=v*g;return this.setValues(y*m+u,y*g-f*x,y*x+f*g,0,y*g+f*x,T*g+u,T*x-f*m,0,y*x-f*g,T*x+f*m,v*x*x+u,0,0,0,0,1)},rotate:function(a,l){var u=this.val,f=l.x,v=l.y,m=l.z,g=Math.sqrt(f*f+v*v+m*m);if(Math.abs(g)<h)return this;g=1/g,f*=g,v*=g,m*=g;var x=Math.sin(a),y=Math.cos(a),T=1-y,C=u[0],E=u[1],M=u[2],P=u[3],A=u[4],R=u[5],F=u[6],w=u[7],B=u[8],N=u[9],U=u[10],D=u[11],I=u[12],O=u[13],L=u[14],G=u[15],z=f*f*T+y,X=v*f*T+m*x,V=m*f*T-v*x,Y=f*v*T-m*x,W=v*v*T+y,H=m*v*T+f*x,b=f*m*T+v*x,K=v*m*T-f*x,Q=m*m*T+y;return this.setValues(C*z+A*X+B*V,E*z+R*X+N*V,M*z+F*X+U*V,P*z+w*X+D*V,C*Y+A*W+B*H,E*Y+R*W+N*H,M*Y+F*W+U*H,P*Y+w*W+D*H,C*b+A*K+B*Q,E*b+R*K+N*Q,M*b+F*K+U*Q,P*b+w*K+D*Q,I,O,L,G)},rotateX:function(a){var l=this.val,u=Math.sin(a),f=Math.cos(a),v=l[4],m=l[5],g=l[6],x=l[7],y=l[8],T=l[9],C=l[10],E=l[11];return l[4]=v*f+y*u,l[5]=m*f+T*u,l[6]=g*f+C*u,l[7]=x*f+E*u,l[8]=y*f-v*u,l[9]=T*f-m*u,l[10]=C*f-g*u,l[11]=E*f-x*u,this},rotateY:function(a){var l=this.val,u=Math.sin(a),f=Math.cos(a),v=l[0],m=l[1],g=l[2],x=l[3],y=l[8],T=l[9],C=l[10],E=l[11];return l[0]=v*f-y*u,l[1]=m*f-T*u,l[2]=g*f-C*u,l[3]=x*f-E*u,l[8]=v*u+y*f,l[9]=m*u+T*f,l[10]=g*u+C*f,l[11]=x*u+E*f,this},rotateZ:function(a){var l=this.val,u=Math.sin(a),f=Math.cos(a),v=l[0],m=l[1],g=l[2],x=l[3],y=l[4],T=l[5],C=l[6],E=l[7];return l[0]=v*f+y*u,l[1]=m*f+T*u,l[2]=g*f+C*u,l[3]=x*f+E*u,l[4]=y*f-v*u,l[5]=T*f-m*u,l[6]=C*f-g*u,l[7]=E*f-x*u,this},fromRotationTranslation:function(a,l){var u=a.x,f=a.y,v=a.z,m=a.w,g=u+u,x=f+f,y=v+v,T=u*g,C=u*x,E=u*y,M=f*x,P=f*y,A=v*y,R=m*g,F=m*x,w=m*y;return this.setValues(1-(M+A),C+w,E-F,0,C-w,1-(T+A),P+R,0,E+F,P-R,1-(T+M),0,l.x,l.y,l.z,1)},fromQuat:function(a){var l=a.x,u=a.y,f=a.z,v=a.w,m=l+l,g=u+u,x=f+f,y=l*m,T=l*g,C=l*x,E=u*g,M=u*x,P=f*x,A=v*m,R=v*g,F=v*x;return this.setValues(1-(E+P),T+F,C-R,0,T-F,1-(y+P),M+A,0,C+R,M-A,1-(y+E),0,0,0,0,1)},frustum:function(a,l,u,f,v,m){var g=1/(l-a),x=1/(f-u),y=1/(v-m);return this.setValues(v*2*g,0,0,0,0,v*2*x,0,0,(l+a)*g,(f+u)*x,(m+v)*y,-1,0,0,m*v*2*y,0)},perspective:function(a,l,u,f){var v=1/Math.tan(a/2),m=1/(u-f);return this.setValues(v/l,0,0,0,0,v,0,0,0,0,(f+u)*m,-1,0,0,2*f*u*m,0)},perspectiveLH:function(a,l,u,f){return this.setValues(2*u/a,0,0,0,0,2*u/l,0,0,0,0,-f/(u-f),1,0,0,u*f/(u-f),0)},ortho:function(a,l,u,f,v,m){var g=a-l,x=u-f,y=v-m;return g=g===0?g:1/g,x=x===0?x:1/x,y=y===0?y:1/y,this.setValues(-2*g,0,0,0,0,-2*x,0,0,0,0,2*y,0,(a+l)*g,(f+u)*x,(m+v)*y,1)},lookAtRH:function(a,l,u){var f=this.val;return i.subVectors(a,l),i.lengthSq()===0&&(i.z=1),i.normalize(),s.crossVectors(u,i),s.lengthSq()===0&&(Math.abs(u.z)===1?i.x+=1e-4:i.z+=1e-4,i.normalize(),s.crossVectors(u,i)),s.normalize(),o.crossVectors(i,s),f[0]=s.x,f[1]=s.y,f[2]=s.z,f[4]=o.x,f[5]=o.y,f[6]=o.z,f[8]=i.x,f[9]=i.y,f[10]=i.z,this},lookAt:function(a,l,u){var f=a.x,v=a.y,m=a.z,g=u.x,x=u.y,y=u.z,T=l.x,C=l.y,E=l.z;if(Math.abs(f-T)<h&&Math.abs(v-C)<h&&Math.abs(m-E)<h)return this.identity();var M=f-T,P=v-C,A=m-E,R=1/Math.sqrt(M*M+P*P+A*A);M*=R,P*=R,A*=R;var F=x*A-y*P,w=y*M-g*A,B=g*P-x*M;R=Math.sqrt(F*F+w*w+B*B),R?(R=1/R,F*=R,w*=R,B*=R):(F=0,w=0,B=0);var N=P*B-A*w,U=A*F-M*B,D=M*w-P*F;return R=Math.sqrt(N*N+U*U+D*D),R?(R=1/R,N*=R,U*=R,D*=R):(N=0,U=0,D=0),this.setValues(F,N,M,0,w,U,P,0,B,D,A,0,-(F*f+w*v+B*m),-(N*f+U*v+D*m),-(M*f+P*v+A*m),1)},yawPitchRoll:function(a,l,u){this.zero(),n.zero(),e.zero();var f=this.val,v=n.val,m=e.val,g=Math.sin(u),x=Math.cos(u);return f[10]=1,f[15]=1,f[0]=x,f[1]=g,f[4]=-g,f[5]=x,g=Math.sin(l),x=Math.cos(l),v[0]=1,v[15]=1,v[5]=x,v[10]=x,v[9]=-g,v[6]=g,g=Math.sin(a),x=Math.cos(a),m[5]=1,m[15]=1,m[0]=x,m[2]=-g,m[8]=g,m[10]=x,this.multiplyLocal(n),this.multiplyLocal(e),this},setWorldMatrix:function(a,l,u,f,v){return this.yawPitchRoll(a.y,a.x,a.z),n.scaling(u.x,u.y,u.z),e.xyz(l.x,l.y,l.z),this.multiplyLocal(n),this.multiplyLocal(e),f&&this.multiplyLocal(f),v&&this.multiplyLocal(v),this},multiplyToMat4:function(a,l){var u=this.val,f=a.val,v=u[0],m=u[1],g=u[2],x=u[3],y=u[4],T=u[5],C=u[6],E=u[7],M=u[8],P=u[9],A=u[10],R=u[11],F=u[12],w=u[13],B=u[14],N=u[15],U=f[0],D=f[1],I=f[2],O=f[3],L=f[4],G=f[5],z=f[6],X=f[7],V=f[8],Y=f[9],W=f[10],H=f[11],b=f[12],K=f[13],Q=f[14],Z=f[15];return l.setValues(U*v+D*y+I*M+O*F,D*m+D*T+I*P+O*w,I*g+D*C+I*A+O*B,O*x+D*E+I*R+O*N,L*v+G*y+z*M+X*F,L*m+G*T+z*P+X*w,L*g+G*C+z*A+X*B,L*x+G*E+z*R+X*N,V*v+Y*y+W*M+H*F,V*m+Y*T+W*P+H*w,V*g+Y*C+W*A+H*B,V*x+Y*E+W*R+H*N,b*v+K*y+Q*M+Z*F,b*m+K*T+Q*P+Z*w,b*g+K*C+Q*A+Z*B,b*x+K*E+Q*R+Z*N)},fromRotationXYTranslation:function(a,l,u){var f=l.x,v=l.y,m=l.z,g=Math.sin(a.x),x=Math.cos(a.x),y=Math.sin(a.y),T=Math.cos(a.y),C=f,E=v,M=m,P=-g,A=0-P*y,R=0-x*y,F=P*T,w=x*T;return u||(C=T*f+y*m,E=A*f+x*v+F*m,M=R*f+g*v+w*m),this.setValues(T,A,R,0,0,x,g,0,y,F,w,0,C,E,M,1)},getMaxScaleOnAxis:function(){var a=this.val,l=a[0]*a[0]+a[1]*a[1]+a[2]*a[2],u=a[4]*a[4]+a[5]*a[5]+a[6]*a[6],f=a[8]*a[8]+a[9]*a[9]+a[10]*a[10];return Math.sqrt(Math.max(l,u,f))}}),n=new r,e=new r,s=new c,o=new c,i=new c;p.exports=r},86883:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return Math.min(t+d,c)};p.exports=S},50040:p=>{/**
* @author Vladislav Forsh <vlad@robowhale.com>
* @copyright 2021 RoboWhale
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d=t.length;if(d===0)return 0;t.sort(function(h,r){return h-r});var c=Math.floor(d/2);return d%2===0?(t[c]+t[c-1])/2:t[c]};p.exports=S},37204:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return Math.max(t-d,c)};p.exports=S},65201:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){c===void 0&&(c=d+1);var r=(t-d)/(c-d);return r>1?h!==void 0?(r=(h-t)/(h-c),r<0&&(r=0)):r=1:r<0&&(r=0),r};p.exports=S},15746:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(94434),h=t(29747),r=t(25836),n=1e-6,e=new Int8Array([1,2,0]),s=new Float32Array([0,0,0]),o=new r(1,0,0),i=new r(0,1,0),a=new r,l=new c,u=new d({initialize:function(v,m,g,x){this.onChangeCallback=h,this.set(v,m,g,x)},x:{get:function(){return this._x},set:function(f){this._x=f,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(f){this._y=f,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(f){this._z=f,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(f){this._w=f,this.onChangeCallback(this)}},copy:function(f){return this.set(f)},set:function(f,v,m,g,x){return x===void 0&&(x=!0),typeof f=="object"?(this._x=f.x||0,this._y=f.y||0,this._z=f.z||0,this._w=f.w||0):(this._x=f||0,this._y=v||0,this._z=m||0,this._w=g||0),x&&this.onChangeCallback(this),this},add:function(f){return this._x+=f.x,this._y+=f.y,this._z+=f.z,this._w+=f.w,this.onChangeCallback(this),this},subtract:function(f){return this._x-=f.x,this._y-=f.y,this._z-=f.z,this._w-=f.w,this.onChangeCallback(this),this},scale:function(f){return this._x*=f,this._y*=f,this._z*=f,this._w*=f,this.onChangeCallback(this),this},length:function(){var f=this.x,v=this.y,m=this.z,g=this.w;return Math.sqrt(f*f+v*v+m*m+g*g)},lengthSq:function(){var f=this.x,v=this.y,m=this.z,g=this.w;return f*f+v*v+m*m+g*g},normalize:function(){var f=this.x,v=this.y,m=this.z,g=this.w,x=f*f+v*v+m*m+g*g;return x>0&&(x=1/Math.sqrt(x),this._x=f*x,this._y=v*x,this._z=m*x,this._w=g*x),this.onChangeCallback(this),this},dot:function(f){return this.x*f.x+this.y*f.y+this.z*f.z+this.w*f.w},lerp:function(f,v){v===void 0&&(v=0);var m=this.x,g=this.y,x=this.z,y=this.w;return this.set(m+v*(f.x-m),g+v*(f.y-g),x+v*(f.z-x),y+v*(f.w-y))},rotationTo:function(f,v){var m=f.x*v.x+f.y*v.y+f.z*v.z;return m<-.999999?(a.copy(o).cross(f).length()<n&&a.copy(i).cross(f),a.normalize(),this.setAxisAngle(a,Math.PI)):m>.999999?this.set(0,0,0,1):(a.copy(f).cross(v),this._x=a.x,this._y=a.y,this._z=a.z,this._w=1+m,this.normalize())},setAxes:function(f,v,m){var g=l.val;return g[0]=v.x,g[3]=v.y,g[6]=v.z,g[1]=m.x,g[4]=m.y,g[7]=m.z,g[2]=-f.x,g[5]=-f.y,g[8]=-f.z,this.fromMat3(l).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(f,v){v=v*.5;var m=Math.sin(v);return this.set(m*f.x,m*f.y,m*f.z,Math.cos(v))},multiply:function(f){var v=this.x,m=this.y,g=this.z,x=this.w,y=f.x,T=f.y,C=f.z,E=f.w;return this.set(v*E+x*y+m*C-g*T,m*E+x*T+g*y-v*C,g*E+x*C+v*T-m*y,x*E-v*y-m*T-g*C)},slerp:function(f,v){var m=this.x,g=this.y,x=this.z,y=this.w,T=f.x,C=f.y,E=f.z,M=f.w,P=m*T+g*C+x*E+y*M;P<0&&(P=-P,T=-T,C=-C,E=-E,M=-M);var A=1-v,R=v;if(1-P>n){var F=Math.acos(P),w=Math.sin(F);A=Math.sin((1-v)*F)/w,R=Math.sin(v*F)/w}return this.set(A*m+R*T,A*g+R*C,A*x+R*E,A*y+R*M)},invert:function(){var f=this.x,v=this.y,m=this.z,g=this.w,x=f*f+v*v+m*m+g*g,y=x?1/x:0;return this.set(-f*y,-v*y,-m*y,g*y)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(f){f*=.5;var v=this.x,m=this.y,g=this.z,x=this.w,y=Math.sin(f),T=Math.cos(f);return this.set(v*T+x*y,m*T+g*y,g*T-m*y,x*T-v*y)},rotateY:function(f){f*=.5;var v=this.x,m=this.y,g=this.z,x=this.w,y=Math.sin(f),T=Math.cos(f);return this.set(v*T-g*y,m*T+x*y,g*T+v*y,x*T-m*y)},rotateZ:function(f){f*=.5;var v=this.x,m=this.y,g=this.z,x=this.w,y=Math.sin(f),T=Math.cos(f);return this.set(v*T+m*y,m*T-v*y,g*T+x*y,x*T-g*y)},calculateW:function(){var f=this.x,v=this.y,m=this.z;return this.w=-Math.sqrt(1-f*f-v*v-m*m),this},setFromEuler:function(f,v){var m=f.x/2,g=f.y/2,x=f.z/2,y=Math.cos(m),T=Math.cos(g),C=Math.cos(x),E=Math.sin(m),M=Math.sin(g),P=Math.sin(x);switch(f.order){case"XYZ":{this.set(E*T*C+y*M*P,y*M*C-E*T*P,y*T*P+E*M*C,y*T*C-E*M*P,v);break}case"YXZ":{this.set(E*T*C+y*M*P,y*M*C-E*T*P,y*T*P-E*M*C,y*T*C+E*M*P,v);break}case"ZXY":{this.set(E*T*C-y*M*P,y*M*C+E*T*P,y*T*P+E*M*C,y*T*C-E*M*P,v);break}case"ZYX":{this.set(E*T*C-y*M*P,y*M*C+E*T*P,y*T*P-E*M*C,y*T*C+E*M*P,v);break}case"YZX":{this.set(E*T*C+y*M*P,y*M*C+E*T*P,y*T*P-E*M*C,y*T*C-E*M*P,v);break}case"XZY":{this.set(E*T*C-y*M*P,y*M*C-E*T*P,y*T*P+E*M*C,y*T*C+E*M*P,v);break}}return this},setFromRotationMatrix:function(f){var v=f.val,m=v[0],g=v[4],x=v[8],y=v[1],T=v[5],C=v[9],E=v[2],M=v[6],P=v[10],A=m+T+P,R;return A>0?(R=.5/Math.sqrt(A+1),this.set((M-C)*R,(x-E)*R,(y-g)*R,.25/R)):m>T&&m>P?(R=2*Math.sqrt(1+m-T-P),this.set(.25*R,(g+y)/R,(x+E)/R,(M-C)/R)):T>P?(R=2*Math.sqrt(1+T-m-P),this.set((g+y)/R,.25*R,(C+M)/R,(x-E)/R)):(R=2*Math.sqrt(1+P-m-T),this.set((x+E)/R,(C+M)/R,.25*R,(y-g)/R)),this},fromMat3:function(f){var v=f.val,m=v[0]+v[4]+v[8],g;if(m>0)g=Math.sqrt(m+1),this.w=.5*g,g=.5/g,this._x=(v[7]-v[5])*g,this._y=(v[2]-v[6])*g,this._z=(v[3]-v[1])*g;else{var x=0;v[4]>v[0]&&(x=1),v[8]>v[x*3+x]&&(x=2);var y=e[x],T=e[y];g=Math.sqrt(v[x*3+x]-v[y*3+y]-v[T*3+T]+1),s[x]=.5*g,g=.5/g,s[y]=(v[y*3+x]+v[x*3+y])*g,s[T]=(v[T*3+x]+v[x*3+T])*g,this._x=s[0],this._y=s[1],this._z=s[2],this._w=(v[T*3+y]-v[y*3+T])*g}return this.onChangeCallback(this),this}});p.exports=u},43396:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(36383),c=function(h){return h*d.RAD_TO_DEG};p.exports=c},74362:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){d===void 0&&(d=1);var c=Math.random()*2*Math.PI;return t.x=Math.cos(c)*d,t.y=Math.sin(c)*d,t};p.exports=S},60706:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){d===void 0&&(d=1);var c=Math.random()*2*Math.PI,h=Math.random()*2-1,r=Math.sqrt(1-h*h)*d;return t.x=Math.cos(c)*r,t.y=Math.sin(c)*r,t.z=h*d,t};p.exports=S},67421:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d===void 0&&(d=1),t.x=(Math.random()*2-1)*d,t.y=(Math.random()*2-1)*d,t.z=(Math.random()*2-1)*d,t.w=(Math.random()*2-1)*d,t};p.exports=S},36305:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=t.x,h=t.y;return t.x=c*Math.cos(d)-h*Math.sin(d),t.y=c*Math.sin(d)+h*Math.cos(d),t};p.exports=S},11520:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){var r=Math.cos(h),n=Math.sin(h),e=t.x-d,s=t.y-c;return t.x=e*r-s*n+d,t.y=e*n+s*r+c,t};p.exports=S},1163:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h,r){var n=h+Math.atan2(t.y-c,t.x-d);return t.x=d+r*Math.cos(n),t.y=c+r*Math.sin(n),t};p.exports=S},70336:p=>{/**
* @author samme
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h,r){return t.x=d+r*Math.cos(h),t.y=c+r*Math.sin(h),t};p.exports=S},72678:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(25836),c=t(37867),h=t(15746),r=new c,n=new h,e=new d,s=function(o,i,a){return n.setAxisAngle(i,a),r.fromRotationTranslation(n,e.set(0,0,0)),o.transformMat4(r)};p.exports=s},2284:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t>0?Math.ceil(t):Math.floor(t)};p.exports=S},41013:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var h=Math.pow(c,-d);return Math.round(t*h)/h};p.exports=S},16922:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){d===void 0&&(d=1),c===void 0&&(c=1),h===void 0&&(h=1),h*=Math.PI/t;for(var r=[],n=[],e=0;e<t;e++)c-=d*h,d+=c*h,r[e]=c,n[e]=d;return{sin:n,cos:r,length:t}};p.exports=S},7602:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return t<=d?0:t>=c?1:(t=(t-d)/(c-d),t*t*(3-2*t))};p.exports=S},54261:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return t=Math.max(0,Math.min(1,(t-d)/(c-d))),t*t*t*(t*(t*6-15)+10)};p.exports=S},44408:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26099),c=function(h,r,n,e){e===void 0&&(e=new d);var s=0,o=0,i=r*n;return h>0&&h<=i&&(h>r-1?(o=Math.floor(h/r),s=h-o*r):s=h),e.set(s,o)};p.exports=c},85955:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26099),c=function(h,r,n,e,s,o,i,a){a===void 0&&(a=new d);var l=Math.sin(s),u=Math.cos(s),f=u*o,v=l*o,m=-l*i,g=u*i,x=1/(f*g+m*-v);return a.x=g*x*h+-m*x*r+(e*m-n*g)*x,a.y=f*x*r+-v*x*h+(-e*f+n*v)*x,a};p.exports=c},26099:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(43855),h=new d({initialize:function(n,e){this.x=0,this.y=0,typeof n=="object"?(this.x=n.x||0,this.y=n.y||0):(e===void 0&&(e=n),this.x=n||0,this.y=e||0)},clone:function(){return new h(this.x,this.y)},copy:function(r){return this.x=r.x||0,this.y=r.y||0,this},setFromObject:function(r){return this.x=r.x||0,this.y=r.y||0,this},set:function(r,n){return n===void 0&&(n=r),this.x=r,this.y=n,this},setTo:function(r,n){return this.set(r,n)},setToPolar:function(r,n){return n==null&&(n=1),this.x=Math.cos(r)*n,this.y=Math.sin(r)*n,this},equals:function(r){return this.x===r.x&&this.y===r.y},fuzzyEquals:function(r,n){return c(this.x,r.x,n)&&c(this.y,r.y,n)},angle:function(){var r=Math.atan2(this.y,this.x);return r<0&&(r+=2*Math.PI),r},setAngle:function(r){return this.setToPolar(r,this.length())},add:function(r){return this.x+=r.x,this.y+=r.y,this},subtract:function(r){return this.x-=r.x,this.y-=r.y,this},multiply:function(r){return this.x*=r.x,this.y*=r.y,this},scale:function(r){return isFinite(r)?(this.x*=r,this.y*=r):(this.x=0,this.y=0),this},divide:function(r){return this.x/=r.x,this.y/=r.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(r){var n=r.x-this.x,e=r.y-this.y;return Math.sqrt(n*n+e*e)},distanceSq:function(r){var n=r.x-this.x,e=r.y-this.y;return n*n+e*e},length:function(){var r=this.x,n=this.y;return Math.sqrt(r*r+n*n)},setLength:function(r){return this.normalize().scale(r)},lengthSq:function(){var r=this.x,n=this.y;return r*r+n*n},normalize:function(){var r=this.x,n=this.y,e=r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=r*e,this.y=n*e),this},normalizeRightHand:function(){var r=this.x;return this.x=this.y*-1,this.y=r,this},normalizeLeftHand:function(){var r=this.x;return this.x=this.y,this.y=r*-1,this},dot:function(r){return this.x*r.x+this.y*r.y},cross:function(r){return this.x*r.y-this.y*r.x},lerp:function(r,n){n===void 0&&(n=0);var e=this.x,s=this.y;return this.x=e+n*(r.x-e),this.y=s+n*(r.y-s),this},transformMat3:function(r){var n=this.x,e=this.y,s=r.val;return this.x=s[0]*n+s[3]*e+s[6],this.y=s[1]*n+s[4]*e+s[7],this},transformMat4:function(r){var n=this.x,e=this.y,s=r.val;return this.x=s[0]*n+s[4]*e+s[12],this.y=s[1]*n+s[5]*e+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(r){var n=this.length();return n&&n>r&&this.scale(r/n),this},reflect:function(r){return r=r.clone().normalize(),this.subtract(r.scale(2*this.dot(r)))},mirror:function(r){return this.reflect(r).negate()},rotate:function(r){var n=Math.cos(r),e=Math.sin(r);return this.set(n*this.x-e*this.y,e*this.x+n*this.y)},project:function(r){var n=this.dot(r)/r.dot(r);return this.copy(r).scale(n)}});h.ZERO=new h,h.RIGHT=new h(1,0),h.LEFT=new h(-1,0),h.UP=new h(0,-1),h.DOWN=new h(0,1),h.ONE=new h(1,1),p.exports=h},25836:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n,e){this.x=0,this.y=0,this.z=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0,this.z=r.z||0):(this.x=r||0,this.y=n||0,this.z=e||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(h){return this.x=Math.min(this.x,h.x),this.y=Math.min(this.y,h.y),this.z=Math.min(this.z,h.z),this},max:function(h){return this.x=Math.max(this.x,h.x),this.y=Math.max(this.y,h.y),this.z=Math.max(this.z,h.z),this},clone:function(){return new c(this.x,this.y,this.z)},addVectors:function(h,r){return this.x=h.x+r.x,this.y=h.y+r.y,this.z=h.z+r.z,this},subVectors:function(h,r){return this.x=h.x-r.x,this.y=h.y-r.y,this.z=h.z-r.z,this},crossVectors:function(h,r){var n=h.x,e=h.y,s=h.z,o=r.x,i=r.y,a=r.z;return this.x=e*a-s*i,this.y=s*o-n*a,this.z=n*i-e*o,this},equals:function(h){return this.x===h.x&&this.y===h.y&&this.z===h.z},copy:function(h){return this.x=h.x,this.y=h.y,this.z=h.z||0,this},set:function(h,r,n){return typeof h=="object"?(this.x=h.x||0,this.y=h.y||0,this.z=h.z||0):(this.x=h||0,this.y=r||0,this.z=n||0),this},setFromMatrixPosition:function(h){return this.fromArray(h.val,12)},setFromMatrixColumn:function(h,r){return this.fromArray(h.val,r*4)},fromArray:function(h,r){return r===void 0&&(r=0),this.x=h[r],this.y=h[r+1],this.z=h[r+2],this},add:function(h){return this.x+=h.x,this.y+=h.y,this.z+=h.z||0,this},addScalar:function(h){return this.x+=h,this.y+=h,this.z+=h,this},addScale:function(h,r){return this.x+=h.x*r,this.y+=h.y*r,this.z+=h.z*r||0,this},subtract:function(h){return this.x-=h.x,this.y-=h.y,this.z-=h.z||0,this},multiply:function(h){return this.x*=h.x,this.y*=h.y,this.z*=h.z||1,this},scale:function(h){return isFinite(h)?(this.x*=h,this.y*=h,this.z*=h):(this.x=0,this.y=0,this.z=0),this},divide:function(h){return this.x/=h.x,this.y/=h.y,this.z/=h.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0;return Math.sqrt(r*r+n*n+e*e)},distanceSq:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0;return r*r+n*n+e*e},length:function(){var h=this.x,r=this.y,n=this.z;return Math.sqrt(h*h+r*r+n*n)},lengthSq:function(){var h=this.x,r=this.y,n=this.z;return h*h+r*r+n*n},normalize:function(){var h=this.x,r=this.y,n=this.z,e=h*h+r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=h*e,this.y=r*e,this.z=n*e),this},dot:function(h){return this.x*h.x+this.y*h.y+this.z*h.z},cross:function(h){var r=this.x,n=this.y,e=this.z,s=h.x,o=h.y,i=h.z;return this.x=n*i-e*o,this.y=e*s-r*i,this.z=r*o-n*s,this},lerp:function(h,r){r===void 0&&(r=0);var n=this.x,e=this.y,s=this.z;return this.x=n+r*(h.x-n),this.y=e+r*(h.y-e),this.z=s+r*(h.z-s),this},applyMatrix3:function(h){var r=this.x,n=this.y,e=this.z,s=h.val;return this.x=s[0]*r+s[3]*n+s[6]*e,this.y=s[1]*r+s[4]*n+s[7]*e,this.z=s[2]*r+s[5]*n+s[8]*e,this},applyMatrix4:function(h){var r=this.x,n=this.y,e=this.z,s=h.val,o=1/(s[3]*r+s[7]*n+s[11]*e+s[15]);return this.x=(s[0]*r+s[4]*n+s[8]*e+s[12])*o,this.y=(s[1]*r+s[5]*n+s[9]*e+s[13])*o,this.z=(s[2]*r+s[6]*n+s[10]*e+s[14])*o,this},transformMat3:function(h){var r=this.x,n=this.y,e=this.z,s=h.val;return this.x=r*s[0]+n*s[3]+e*s[6],this.y=r*s[1]+n*s[4]+e*s[7],this.z=r*s[2]+n*s[5]+e*s[8],this},transformMat4:function(h){var r=this.x,n=this.y,e=this.z,s=h.val;return this.x=s[0]*r+s[4]*n+s[8]*e+s[12],this.y=s[1]*r+s[5]*n+s[9]*e+s[13],this.z=s[2]*r+s[6]*n+s[10]*e+s[14],this},transformCoordinates:function(h){var r=this.x,n=this.y,e=this.z,s=h.val,o=r*s[0]+n*s[4]+e*s[8]+s[12],i=r*s[1]+n*s[5]+e*s[9]+s[13],a=r*s[2]+n*s[6]+e*s[10]+s[14],l=r*s[3]+n*s[7]+e*s[11]+s[15];return this.x=o/l,this.y=i/l,this.z=a/l,this},transformQuat:function(h){var r=this.x,n=this.y,e=this.z,s=h.x,o=h.y,i=h.z,a=h.w,l=a*r+o*e-i*n,u=a*n+i*r-s*e,f=a*e+s*n-o*r,v=-s*r-o*n-i*e;return this.x=l*a+v*-s+u*-i-f*-o,this.y=u*a+v*-o+f*-s-l*-i,this.z=f*a+v*-i+l*-o-u*-s,this},project:function(h){var r=this.x,n=this.y,e=this.z,s=h.val,o=s[0],i=s[1],a=s[2],l=s[3],u=s[4],f=s[5],v=s[6],m=s[7],g=s[8],x=s[9],y=s[10],T=s[11],C=s[12],E=s[13],M=s[14],P=s[15],A=1/(r*l+n*m+e*T+P);return this.x=(r*o+n*u+e*g+C)*A,this.y=(r*i+n*f+e*x+E)*A,this.z=(r*a+n*v+e*y+M)*A,this},projectViewMatrix:function(h,r){return this.applyMatrix4(h).applyMatrix4(r)},unprojectViewMatrix:function(h,r){return this.applyMatrix4(h).applyMatrix4(r)},unproject:function(h,r){var n=h.x,e=h.y,s=h.z,o=h.w,i=this.x-n,a=o-this.y-1-e,l=this.z;return this.x=2*i/s-1,this.y=2*a/o-1,this.z=2*l-1,this.project(r)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});c.ZERO=new c,c.RIGHT=new c(1,0,0),c.LEFT=new c(-1,0,0),c.UP=new c(0,-1,0),c.DOWN=new c(0,1,0),c.FORWARD=new c(0,0,1),c.BACK=new c(0,0,-1),c.ONE=new c(1,1,1),p.exports=c},61369:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n,e,s){this.x=0,this.y=0,this.z=0,this.w=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0,this.z=r.z||0,this.w=r.w||0):(this.x=r||0,this.y=n||0,this.z=e||0,this.w=s||0)},clone:function(){return new c(this.x,this.y,this.z,this.w)},copy:function(h){return this.x=h.x,this.y=h.y,this.z=h.z||0,this.w=h.w||0,this},equals:function(h){return this.x===h.x&&this.y===h.y&&this.z===h.z&&this.w===h.w},set:function(h,r,n,e){return typeof h=="object"?(this.x=h.x||0,this.y=h.y||0,this.z=h.z||0,this.w=h.w||0):(this.x=h||0,this.y=r||0,this.z=n||0,this.w=e||0),this},add:function(h){return this.x+=h.x,this.y+=h.y,this.z+=h.z||0,this.w+=h.w||0,this},subtract:function(h){return this.x-=h.x,this.y-=h.y,this.z-=h.z||0,this.w-=h.w||0,this},scale:function(h){return this.x*=h,this.y*=h,this.z*=h,this.w*=h,this},length:function(){var h=this.x,r=this.y,n=this.z,e=this.w;return Math.sqrt(h*h+r*r+n*n+e*e)},lengthSq:function(){var h=this.x,r=this.y,n=this.z,e=this.w;return h*h+r*r+n*n+e*e},normalize:function(){var h=this.x,r=this.y,n=this.z,e=this.w,s=h*h+r*r+n*n+e*e;return s>0&&(s=1/Math.sqrt(s),this.x=h*s,this.y=r*s,this.z=n*s,this.w=e*s),this},dot:function(h){return this.x*h.x+this.y*h.y+this.z*h.z+this.w*h.w},lerp:function(h,r){r===void 0&&(r=0);var n=this.x,e=this.y,s=this.z,o=this.w;return this.x=n+r*(h.x-n),this.y=e+r*(h.y-e),this.z=s+r*(h.z-s),this.w=o+r*(h.w-o),this},multiply:function(h){return this.x*=h.x,this.y*=h.y,this.z*=h.z||1,this.w*=h.w||1,this},divide:function(h){return this.x/=h.x,this.y/=h.y,this.z/=h.z||1,this.w/=h.w||1,this},distance:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0,s=h.w-this.w||0;return Math.sqrt(r*r+n*n+e*e+s*s)},distanceSq:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0,s=h.w-this.w||0;return r*r+n*n+e*e+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(h){var r=this.x,n=this.y,e=this.z,s=this.w,o=h.val;return this.x=o[0]*r+o[4]*n+o[8]*e+o[12]*s,this.y=o[1]*r+o[5]*n+o[9]*e+o[13]*s,this.z=o[2]*r+o[6]*n+o[10]*e+o[14]*s,this.w=o[3]*r+o[7]*n+o[11]*e+o[15]*s,this},transformQuat:function(h){var r=this.x,n=this.y,e=this.z,s=h.x,o=h.y,i=h.z,a=h.w,l=a*r+o*e-i*n,u=a*n+i*r-s*e,f=a*e+s*n-o*r,v=-s*r-o*n-i*e;return this.x=l*a+v*-s+u*-i-f*-o,this.y=u*a+v*-o+f*-s-l*-i,this.z=f*a+v*-i+l*-o-u*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});c.prototype.sub=c.prototype.subtract,c.prototype.mul=c.prototype.multiply,c.prototype.div=c.prototype.divide,c.prototype.dist=c.prototype.distance,c.prototype.distSq=c.prototype.distanceSq,c.prototype.len=c.prototype.length,c.prototype.lenSq=c.prototype.lengthSq,p.exports=c},60417:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return Math.abs(t-d)<=c};p.exports=S},15994:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=c-d;return d+((t-d)%h+h)%h};p.exports=S},31040:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){return Math.atan2(h-d,c-t)};p.exports=S},55495:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return Math.atan2(d.y-t.y,d.x-t.x)};p.exports=S},128:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return Math.atan2(d.x-t.x,d.y-t.y)};p.exports=S},41273:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){return Math.atan2(c-t,h-d)};p.exports=S},1432:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(36383),c=function(h){return h>Math.PI&&(h-=d.PI2),Math.abs(((h+d.TAU)%d.PI2-d.PI2)%d.PI2)};p.exports=c},12407:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t=t%(2*Math.PI),t>=0?t:t+2*Math.PI};p.exports=S},53993:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author @samme
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(99472),c=function(){return d(-Math.PI,Math.PI)};p.exports=c},86564:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author @samme
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(99472),c=function(){return d(-180,180)};p.exports=c},90154:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(12407),c=function(h){return d(h+Math.PI)};p.exports=c},48736:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(36383),c=function(h,r,n){return n===void 0&&(n=.05),h===r||(Math.abs(r-h)<=n||Math.abs(r-h)>=d.PI2-n?h=r:(Math.abs(r-h)>Math.PI&&(r<h?r+=d.PI2:r-=d.PI2),r>h?h+=n:r<h&&(h-=n))),h};p.exports=c},61430:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=d-t;if(c===0)return 0;var h=Math.floor((c- -180)/360);return c-h*360};p.exports=S},86554:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(15994),c=function(h){return d(h,-Math.PI,Math.PI)};p.exports=c},30954:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(15994),c=function(h){return d(h,-180,180)};p.exports=c},25588:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Between:t(31040),BetweenPoints:t(55495),BetweenPointsY:t(128),BetweenY:t(41273),CounterClockwise:t(1432),Normalize:t(12407),Random:t(53993),RandomDegrees:t(86564),Reverse:t(90154),RotateTo:t(48736),ShortestBetween:t(61430),Wrap:t(86554),WrapDegrees:t(30954)}},36383:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={PI2:Math.PI*2,TAU:Math.PI*.5,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};p.exports=S},20339:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){var r=t-c,n=d-h;return Math.sqrt(r*r+n*n)};p.exports=S},52816:p=>{/**
* @author samme
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=t.x-d.x,h=t.y-d.y;return Math.sqrt(c*c+h*h)};p.exports=S},64559:p=>{/**
* @author samme
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=t.x-d.x,h=t.y-d.y;return c*c+h*h};p.exports=S},82340:p=>{/**
* @author samme
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){return Math.max(Math.abs(t-c),Math.abs(d-h))};p.exports=S},14390:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h,r){return r===void 0&&(r=2),Math.sqrt(Math.pow(c-t,r)+Math.pow(h-d,r))};p.exports=S},2243:p=>{/**
* @author samme
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){return Math.abs(t-c)+Math.abs(d-h)};p.exports=S},89774:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){var r=t-c,n=d-h;return r*r+n*n};p.exports=S},50994:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Between:t(20339),BetweenPoints:t(52816),BetweenPointsSquared:t(64559),Chebyshev:t(82340),Power:t(14390),Snake:t(2243),Squared:t(89774)}},62640:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(54178),c=t(41521),h=t(79980),r=t(85433),n=t(99140),e=t(48857),s=t(81596),o=t(59133),i=t(98516),a=t(35248),l=t(82500),u=t(49752);p.exports={Power0:s,Power1:o.Out,Power2:r.Out,Power3:i.Out,Power4:a.Out,Linear:s,Quad:o.Out,Cubic:r.Out,Quart:i.Out,Quint:a.Out,Sine:l.Out,Expo:e.Out,Circ:h.Out,Elastic:n.Out,Back:d.Out,Bounce:c.Out,Stepped:u,"Quad.easeIn":o.In,"Cubic.easeIn":r.In,"Quart.easeIn":i.In,"Quint.easeIn":a.In,"Sine.easeIn":l.In,"Expo.easeIn":e.In,"Circ.easeIn":h.In,"Elastic.easeIn":n.In,"Back.easeIn":d.In,"Bounce.easeIn":c.In,"Quad.easeOut":o.Out,"Cubic.easeOut":r.Out,"Quart.easeOut":i.Out,"Quint.easeOut":a.Out,"Sine.easeOut":l.Out,"Expo.easeOut":e.Out,"Circ.easeOut":h.Out,"Elastic.easeOut":n.Out,"Back.easeOut":d.Out,"Bounce.easeOut":c.Out,"Quad.easeInOut":o.InOut,"Cubic.easeInOut":r.InOut,"Quart.easeInOut":i.InOut,"Quint.easeInOut":a.InOut,"Sine.easeInOut":l.InOut,"Expo.easeInOut":e.InOut,"Circ.easeInOut":h.InOut,"Elastic.easeInOut":n.InOut,"Back.easeInOut":d.InOut,"Bounce.easeInOut":c.InOut}},1639:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d===void 0&&(d=1.70158),t*t*((d+1)*t-d)};p.exports=S},50099:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){d===void 0&&(d=1.70158);var c=d*1.525;return(t*=2)<1?.5*(t*t*((c+1)*t-c)):.5*((t-=2)*t*((c+1)*t+c)+2)};p.exports=S},41286:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d===void 0&&(d=1.70158),--t*t*((d+1)*t+d)+1};p.exports=S},54178:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={In:t(1639),Out:t(41286),InOut:t(50099)}},59590:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t=1-t,t<.36363636363636365?1-7.5625*t*t:t<.7272727272727273?1-(7.5625*(t-=.5454545454545454)*t+.75):t<.9090909090909091?1-(7.5625*(t-=.8181818181818182)*t+.9375):1-(7.5625*(t-=.9545454545454546)*t+.984375)};p.exports=S},41788:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d=!1;return t<.5?(t=1-t*2,d=!0):t=t*2-1,t<.36363636363636365?t=7.5625*t*t:t<.7272727272727273?t=7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?t=7.5625*(t-=.8181818181818182)*t+.9375:t=7.5625*(t-=.9545454545454546)*t+.984375,d?(1-t)*.5:t*.5+.5};p.exports=S},69905:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375};p.exports=S},41521:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={In:t(59590),Out:t(69905),InOut:t(41788)}},91861:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return 1-Math.sqrt(1-t*t)};p.exports=S},4177:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)};p.exports=S},57512:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return Math.sqrt(1- --t*t)};p.exports=S},79980:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={In:t(91861),Out:t(57512),InOut:t(4177)}},51150:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t*t*t};p.exports=S},82820:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};p.exports=S},35033:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return--t*t*t+1};p.exports=S},85433:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={In:t(51150),Out:t(35033),InOut:t(82820)}},69965:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var h=c/4;return d<1?d=1:h=c*Math.asin(1/d)/(2*Math.PI),-(d*Math.pow(2,10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/c))};p.exports=S},50665:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var h=c/4;return d<1?d=1:h=c*Math.asin(1/d)/(2*Math.PI),(t*=2)<1?-.5*(d*Math.pow(2,10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/c)):d*Math.pow(2,-10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/c)*.5+1};p.exports=S},7744:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var h=c/4;return d<1?d=1:h=c*Math.asin(1/d)/(2*Math.PI),d*Math.pow(2,-10*t)*Math.sin((t-h)*(2*Math.PI)/c)+1};p.exports=S},99140:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={In:t(69965),Out:t(7744),InOut:t(50665)}},24590:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return Math.pow(2,10*(t-1))-.001};p.exports=S},87844:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))};p.exports=S},89433:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return 1-Math.pow(2,-10*t)};p.exports=S},48857:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={In:t(24590),Out:t(89433),InOut:t(87844)}},48820:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Back:t(54178),Bounce:t(41521),Circular:t(79980),Cubic:t(85433),Elastic:t(99140),Expo:t(48857),Linear:t(81596),Quadratic:t(59133),Quartic:t(98516),Quintic:t(35248),Sine:t(82500),Stepped:t(49752)}},7147:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t};p.exports=S},81596:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports=t(7147)},34826:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t*t};p.exports=S},20544:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)};p.exports=S},92029:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t*(2-t)};p.exports=S},59133:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={In:t(34826),Out:t(92029),InOut:t(20544)}},64413:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t*t*t*t};p.exports=S},78137:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)};p.exports=S},45840:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return 1- --t*t*t*t};p.exports=S},98516:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={In:t(64413),Out:t(45840),InOut:t(78137)}},87745:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t*t*t*t*t};p.exports=S},16509:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)};p.exports=S},17868:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return--t*t*t*t*t+1};p.exports=S},35248:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={In:t(87745),Out:t(17868),InOut:t(16509)}},80461:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t===0?0:t===1?1:1-Math.cos(t*Math.PI/2)};p.exports=S},34025:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t===0?0:t===1?1:.5*(1-Math.cos(Math.PI*t))};p.exports=S},52768:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t===0?0:t===1?1:Math.sin(t*Math.PI/2)};p.exports=S},82500:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={In:t(80461),Out:t(52768),InOut:t(34025)}},72251:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d===void 0&&(d=1),t<=0?0:t>=1?1:((d*t|0)+1)*(1/d)};p.exports=S},49752:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports=t(72251)},75698:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d===void 0&&(d=1e-4),Math.ceil(t-d)};p.exports=S},43855:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return c===void 0&&(c=1e-4),Math.abs(t-d)<c};p.exports=S},25777:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d===void 0&&(d=1e-4),Math.floor(t+d)};p.exports=S},5470:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return c===void 0&&(c=1e-4),t>d-c};p.exports=S},94977:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return c===void 0&&(c=1e-4),t<d+c};p.exports=S},48379:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Ceil:t(75698),Equal:t(43855),Floor:t(25777),GreaterThan:t(5470),LessThan:t(94977)}},75508:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(36383),c=t(79291),h={Angle:t(25588),Distance:t(50994),Easing:t(48820),Fuzzy:t(48379),Interpolation:t(38289),Pow2:t(49001),Snap:t(73697),RandomDataGenerator:t(28453),Average:t(53307),Bernstein:t(85710),Between:t(30976),CatmullRom:t(87842),CeilTo:t(26302),Clamp:t(45319),DegToRad:t(39506),Difference:t(61241),Euler:t(38857),Factorial:t(6411),FloatBetween:t(99472),FloorTo:t(77623),FromPercent:t(62945),GetSpeed:t(38265),IsEven:t(78702),IsEvenStrict:t(94883),Linear:t(28915),LinearXY:t(94908),MaxAdd:t(86883),Median:t(50040),MinSub:t(37204),Percent:t(65201),RadToDeg:t(43396),RandomXY:t(74362),RandomXYZ:t(60706),RandomXYZW:t(67421),Rotate:t(36305),RotateAround:t(11520),RotateAroundDistance:t(1163),RotateTo:t(70336),RoundAwayFromZero:t(2284),RoundTo:t(41013),SinCosTableGenerator:t(16922),SmootherStep:t(54261),SmoothStep:t(7602),ToXY:t(44408),TransformXY:t(85955),Within:t(60417),Wrap:t(15994),Vector2:t(26099),Vector3:t(25836),Vector4:t(61369),Matrix3:t(94434),Matrix4:t(37867),Quaternion:t(15746),RotateVec3:t(72678)};h=c(!1,h,d),p.exports=h},89318:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(85710),c=function(h,r){for(var n=0,e=h.length-1,s=0;s<=e;s++)n+=Math.pow(1-r,e-s)*Math.pow(r,s)*h[s]*d(e,s);return n};p.exports=c},77259:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87842),c=function(h,r){var n=h.length-1,e=n*r,s=Math.floor(e);return h[0]===h[n]?(r<0&&(s=Math.floor(e=n*(1+r))),d(e-s,h[(s-1+n)%n],h[s],h[(s+1)%n],h[(s+2)%n])):r<0?h[0]-(d(-e,h[0],h[0],h[1],h[1])-h[0]):r>1?h[n]-(d(e-n,h[n],h[n],h[n-1],h[n-1])-h[n]):d(e-s,h[s?s-1:0],h[s],h[n<s+1?n:s+1],h[n<s+2?n:s+2])};p.exports=c},36316:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/function S(r,n){var e=1-r;return e*e*e*n}function t(r,n){var e=1-r;return 3*e*e*r*n}function d(r,n){return 3*(1-r)*r*r*n}function c(r,n){return r*r*r*n}var h=function(r,n,e,s,o){return S(r,n)+t(r,e)+d(r,s)+c(r,o)};p.exports=h},28392:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(28915),c=function(h,r){var n=h.length-1,e=n*r,s=Math.floor(e);return r<0?d(h[0],h[1],e):r>1?d(h[n],h[n-1],n-e):d(h[s],h[s+1>n?n:s+1],e-s)};p.exports=c},32112:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/function S(h,r){var n=1-h;return n*n*r}function t(h,r){return 2*(1-h)*h*r}function d(h,r){return h*h*r}var c=function(h,r,n,e){return S(h,r)+t(h,n)+d(h,e)};p.exports=c},47235:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7602),c=function(h,r,n){return r+(n-r)*d(h,0,1)};p.exports=c},50178:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(54261),c=function(h,r,n){return r+(n-r)*d(h,0,1)};p.exports=c},38289:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Bezier:t(89318),CatmullRom:t(77259),CubicBezier:t(36316),Linear:t(28392),QuadraticBezier:t(32112),SmoothStep:t(47235),SmootherStep:t(50178)}},98439:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d=Math.log(t)/.6931471805599453;return 1<<Math.ceil(d)};p.exports=S},50030:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t>0&&(t&t-1)===0&&d>0&&(d&d-1)===0};p.exports=S},81230:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t>0&&(t&t-1)===0};p.exports=S},49001:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={GetNext:t(98439),IsSize:t(50030),IsValue:t(81230)}},28453:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r){r===void 0&&(r=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],r&&this.init(r)},rnd:function(){var h=2091639*this.s0+this.c*23283064365386963e-26;return this.c=h|0,this.s0=this.s1,this.s1=this.s2,this.s2=h-this.c,this.s2},hash:function(h){var r,n=this.n;h=h.toString();for(var e=0;e<h.length;e++)n+=h.charCodeAt(e),r=.02519603282416938*n,n=r>>>0,r-=n,r*=n,n=r>>>0,r-=n,n+=r*4294967296;return this.n=n,(n>>>0)*23283064365386963e-26},init:function(h){typeof h=="string"?this.state(h):this.sow(h)},sow:function(h){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!h)for(var r=0;r<h.length&&h[r]!=null;r++){var n=h[r];this.s0-=this.hash(n),this.s0+=~~(this.s0<0),this.s1-=this.hash(n),this.s1+=~~(this.s1<0),this.s2-=this.hash(n),this.s2+=~~(this.s2<0)}},integer:function(){return this.rnd()*4294967296},frac:function(){return this.rnd()+(this.rnd()*2097152|0)*11102230246251565e-32},real:function(){return this.integer()+this.frac()},integerInRange:function(h,r){return Math.floor(this.realInRange(0,r-h+1)+h)},between:function(h,r){return Math.floor(this.realInRange(0,r-h+1)+h)},realInRange:function(h,r){return this.frac()*(r-h)+h},normal:function(){return 1-2*this.frac()},uuid:function(){var h="",r="";for(r=h="";h++<36;r+=~h%5|h*3&4?(h^15?8^this.frac()*(h^20?16:4):4).toString(16):"-");return r},pick:function(h){return h[this.integerInRange(0,h.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(h){return h[~~(Math.pow(this.frac(),2)*(h.length-.5)+.5)]},timestamp:function(h,r){return this.realInRange(h||9466848e5,r||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(h){return typeof h=="string"&&h.match(/^!rnd/)&&(h=h.split(","),this.c=parseFloat(h[1]),this.s0=parseFloat(h[2]),this.s1=parseFloat(h[3]),this.s2=parseFloat(h[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(h){for(var r=h.length-1,n=r;n>0;n--){var e=Math.floor(this.frac()*(n+1)),s=h[e];h[e]=h[n],h[n]=s}return h}});p.exports=c},63448:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.ceil(t/d),h?(c+t)/d:c+t)};p.exports=S},56583:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.floor(t/d),h?(c+t)/d:c+t)};p.exports=S},77720:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.round(t/d),h?(c+t)/d:c+t)};p.exports=S},73697:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Ceil:t(63448),Floor:t(56583),To:t(77720)}},85454:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/t(63595);var d=t(8054),c=t(79291),h={Actions:t(61061),Animations:t(60421),BlendModes:t(10312),Cache:t(83388),Cameras:t(26638),Core:t(42857),Class:t(83419),Create:t(15822),Curves:t(25410),Data:t(44965),Display:t(27460),DOM:t(84902),Events:t(93055),FX:t(66064),Game:t(50127),GameObjects:t(77856),Geom:t(55738),Input:t(14350),Loader:t(57777),Math:t(75508),Physics:t(44563),Plugins:t(18922),Renderer:t(36909),Scale:t(93364),ScaleModes:t(29795),Scene:t(97482),Scenes:t(62194),Structs:t(41392),Textures:t(27458),Tilemaps:t(62501),Time:t(90291),Tweens:t(43066),Utils:t(91799)};h.Sound=t(23717),h=c(!1,h,d),p.exports=h,t.g.Phaser=h},71289:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(92209),h=t(88571),r=new d({Extends:h,Mixins:[c.Acceleration,c.Angular,c.Bounce,c.Collision,c.Debug,c.Drag,c.Enable,c.Friction,c.Gravity,c.Immovable,c.Mass,c.Pushable,c.Size,c.Velocity],initialize:function(e,s,o,i,a){h.call(this,e,s,o,i,a),this.body=null}});p.exports=r},86689:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(39506),h=t(20339),r=t(89774),n=t(66022),e=t(95540),s=t(46975),o=t(72441),i=t(47956),a=t(37277),l=t(44594),u=t(26099),f=t(82248),v=new d({initialize:function(g){this.scene=g,this.systems=g.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,g.sys.events.once(l.BOOT,this.boot,this),g.sys.events.on(l.START,this.start,this)},boot:function(){this.world=new f(this.scene,this.config),this.add=new n(this.world),this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new f(this.scene,this.config),this.add=new n(this.world));var m=this.systems.events;e(this.config,"customUpdate",!1)||m.on(l.UPDATE,this.world.update,this.world),m.on(l.POST_UPDATE,this.world.postUpdate,this.world),m.once(l.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(l.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(l.UPDATE,this.world.update,this.world)},getConfig:function(){var m=this.systems.game.config.physics,g=this.systems.settings.physics,x=s(e(g,"arcade",{}),e(m,"arcade",{}));return x},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(m,g,x,y,T){return x===void 0&&(x=null),y===void 0&&(y=null),T===void 0&&(T=x),this.world.collideObjects(m,g,x,y,T,!0)},collide:function(m,g,x,y,T){return x===void 0&&(x=null),y===void 0&&(y=null),T===void 0&&(T=x),this.world.collideObjects(m,g,x,y,T,!1)},collideTiles:function(m,g,x,y,T){return this.world.collideTiles(m,g,x,y,T)},overlapTiles:function(m,g,x,y,T){return this.world.overlapTiles(m,g,x,y,T)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(m,g,x,y,T,C){y===void 0&&(y=60);var E=Math.atan2(x-m.y,g-m.x);return m.body.acceleration.setToPolar(E,y),T!==void 0&&C!==void 0&&m.body.maxVelocity.set(T,C),E},accelerateToObject:function(m,g,x,y,T){return this.accelerateTo(m,g.x,g.y,x,y,T)},closest:function(m,g){g||(g=this.world.bodies.entries);for(var x=Number.MAX_VALUE,y=null,T=m.x,C=m.y,E=g.length,M=0;M<E;M++){var P=g[M],A=P.body||P;if(!(m===P||m===A||m===A.gameObject||m===A.center)){var R=r(T,C,A.center.x,A.center.y);R<x&&(y=P,x=R)}}return y},furthest:function(m,g){g||(g=this.world.bodies.entries);for(var x=-1,y=null,T=m.x,C=m.y,E=g.length,M=0;M<E;M++){var P=g[M],A=P.body||P;if(!(m===P||m===A||m===A.gameObject||m===A.center)){var R=r(T,C,A.center.x,A.center.y);R>x&&(y=P,x=R)}}return y},moveTo:function(m,g,x,y,T){y===void 0&&(y=60),T===void 0&&(T=0);var C=Math.atan2(x-m.y,g-m.x);return T>0&&(y=h(m.x,m.y,g,x)/(T/1e3)),m.body.velocity.setToPolar(C,y),C},moveToObject:function(m,g,x,y){return this.moveTo(m,g.x,g.y,x,y)},velocityFromAngle:function(m,g,x){return g===void 0&&(g=60),x===void 0&&(x=new u),x.setToPolar(c(m),g)},velocityFromRotation:function(m,g,x){return g===void 0&&(g=60),x===void 0&&(x=new u),x.setToPolar(m,g)},overlapRect:function(m,g,x,y,T,C){return i(this.world,m,g,x,y,T,C)},overlapCirc:function(m,g,x,y,T){return o(this.world,m,g,x,y,T)},shutdown:function(){if(this.world){var m=this.systems.events;m.off(l.UPDATE,this.world.update,this.world),m.off(l.POST_UPDATE,this.world.postUpdate,this.world),m.off(l.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null,this._category=1}},destroy:function(){this.shutdown(),this.scene.sys.events.off(l.START,this.start,this),this.scene=null,this.systems=null}});a.register("ArcadePhysics",v,"arcadePhysics"),p.exports=v},13759:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(92209),h=t(68287),r=new d({Extends:h,Mixins:[c.Acceleration,c.Angular,c.Bounce,c.Collision,c.Debug,c.Drag,c.Enable,c.Friction,c.Gravity,c.Immovable,c.Mass,c.Pushable,c.Size,c.Velocity],initialize:function(e,s,o,i,a){h.call(this,e,s,o,i,a),this.body=null}});p.exports=r},37742:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(78389),h=t(37747),r=t(63012),n=t(43396),e=t(87841),s=t(37303),o=t(95829),i=t(26099),a=new d({Mixins:[c],initialize:function(u,f){var v=64,m=64,g={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},x=f!==void 0;x&&f.displayWidth&&(v=f.displayWidth,m=f.displayHeight),x||(f=g),this.world=u,this.gameObject=x?f:void 0,this.isBody=!0,this.transform={x:f.x,y:f.y,rotation:f.angle,scaleX:f.scaleX,scaleY:f.scaleY,displayOriginX:f.displayOriginX,displayOriginY:f.displayOriginY},this.debugShowBody=u.defaults.debugShowBody,this.debugShowVelocity=u.defaults.debugShowVelocity,this.debugBodyColor=u.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new i,this.position=new i(f.x-f.scaleX*f.displayOriginX,f.y-f.scaleY*f.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=f.angle,this.preRotation=f.angle,this.width=v,this.height=m,this.sourceWidth=v,this.sourceHeight=m,f.frame&&(this.sourceWidth=f.frame.realWidth,this.sourceHeight=f.frame.realHeight),this.halfWidth=Math.abs(v/2),this.halfHeight=Math.abs(m/2),this.center=new i(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new i,this.newVelocity=new i,this.deltaMax=new i,this.acceleration=new i,this.allowDrag=!0,this.drag=new i,this.allowGravity=!0,this.gravity=new i,this.bounce=new i,this.worldBounce=null,this.customBoundsRectangle=u.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new i(1e4,1e4),this.maxSpeed=-1,this.friction=new i(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=h.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new i(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=o(!1),this.touching=o(!0),this.wasTouching=o(!0),this.blocked=o(!0),this.syncBounds=!1,this.physicsType=h.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=f.scaleX,this._sy=f.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new e,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var l=this.gameObject,u=this.transform;if(l.parentContainer){var f=l.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);u.x=f.tx,u.y=f.ty,u.rotation=n(f.rotation),u.scaleX=f.scaleX,u.scaleY=f.scaleY,u.displayOriginX=l.displayOriginX,u.displayOriginY=l.displayOriginY}else u.x=l.x,u.y=l.y,u.rotation=l.angle,u.scaleX=l.scaleX,u.scaleY=l.scaleY,u.displayOriginX=l.displayOriginX,u.displayOriginY=l.displayOriginY;var v=!1;if(this.syncBounds){var m=l.getBounds(this._bounds);this.width=m.width,this.height=m.height,v=!0}else{var g=Math.abs(u.scaleX),x=Math.abs(u.scaleY);(this._sx!==g||this._sy!==x)&&(this.width=this.sourceWidth*g,this.height=this.sourceHeight*x,this._sx=g,this._sy=x,v=!0)}v&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var l=this.transform;this.position.x=l.x+l.scaleX*(this.offset.x-l.displayOriginX),this.position.y=l.y+l.scaleY*(this.offset.y-l.displayOriginY),this.updateCenter()},resetFlags:function(l){l===void 0&&(l=!1);var u=this.wasTouching,f=this.touching,v=this.blocked;l?o(!0,u):(u.none=f.none,u.up=f.up,u.down=f.down,u.left=f.left,u.right=f.right),o(!0,f),o(!0,v),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(l,u){if(l&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var f=this.position;this.prev.x=f.x,this.prev.y=f.y,this.prevFrame.x=f.x,this.prevFrame.y=f.y}l&&this.update(u)},update:function(l){var u=this.prev,f=this.position,v=this.velocity;if(u.set(f.x,f.y),!this.moves){this._dx=f.x-u.x,this._dy=f.y-u.y;return}if(this.directControl){var m=this.autoFrame;v.set((f.x-m.x)/l,(f.y-m.y)/l),this.world.updateMotion(this,l),this._dx=f.x-m.x,this._dy=f.y-m.y}else this.world.updateMotion(this,l),this.newVelocity.set(v.x*l,v.y*l),f.add(this.newVelocity),this._dx=f.x-u.x,this._dy=f.y-u.y;var g=v.x,x=v.y;if(this.updateCenter(),this.angle=Math.atan2(x,g),this.speed=Math.sqrt(g*g+x*x),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var y=this.blocked;this.world.emit(r.WORLD_BOUNDS,this,y.up,y.down,y.left,y.right)}},postUpdate:function(){var l=this.position,u=l.x-this.prevFrame.x,f=l.y-this.prevFrame.y,v=this.gameObject;if(this.moves){var m=this.deltaMax.x,g=this.deltaMax.y;m!==0&&u!==0&&(u<0&&u<-m?u=-m:u>0&&u>m&&(u=m)),g!==0&&f!==0&&(f<0&&f<-g?f=-g:f>0&&f>g&&(f=g)),v&&(v.x+=u,v.y+=f)}u<0?this.facing=h.FACING_LEFT:u>0&&(this.facing=h.FACING_RIGHT),f<0?this.facing=h.FACING_UP:f>0&&(this.facing=h.FACING_DOWN),this.allowRotation&&v&&(v.angle+=this.deltaZ()),this._tx=u,this._ty=f,this.autoFrame.set(l.x,l.y)},setBoundsRectangle:function(l){return this.customBoundsRectangle=l||this.world.bounds,this},checkWorldBounds:function(){var l=this.position,u=this.velocity,f=this.blocked,v=this.customBoundsRectangle,m=this.world.checkCollision,g=this.worldBounce?-this.worldBounce.x:-this.bounce.x,x=this.worldBounce?-this.worldBounce.y:-this.bounce.y,y=!1;return l.x<v.x&&m.left?(l.x=v.x,u.x*=g,f.left=!0,y=!0):this.right>v.right&&m.right&&(l.x=v.right-this.width,u.x*=g,f.right=!0,y=!0),l.y<v.y&&m.up?(l.y=v.y,u.y*=x,f.up=!0,y=!0):this.bottom>v.bottom&&m.down&&(l.y=v.bottom-this.height,u.y*=x,f.down=!0,y=!0),y&&(this.blocked.none=!1,this.updateCenter()),y},setOffset:function(l,u){return u===void 0&&(u=l),this.offset.set(l,u),this},setGameObject:function(l,u){return u===void 0&&(u=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=l,l.body&&(l.body=this),this.setSize(),this.world.add(this),this.enable=u,this},setSize:function(l,u,f){f===void 0&&(f=!0);var v=this.gameObject;if(v&&(!l&&v.frame&&(l=v.frame.realWidth),!u&&v.frame&&(u=v.frame.realHeight)),this.sourceWidth=l,this.sourceHeight=u,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),f&&v&&v.getCenter){var m=(v.width-l)/2,g=(v.height-u)/2;this.offset.set(m,g)}return this.isCircle=!1,this.radius=0,this},setCircle:function(l,u,f){return u===void 0&&(u=this.offset.x),f===void 0&&(f=this.offset.y),l>0?(this.isCircle=!0,this.radius=l,this.sourceWidth=l*2,this.sourceHeight=l*2,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(u,f),this.updateCenter()):this.isCircle=!1,this},reset:function(l,u){this.stop();var f=this.gameObject;f&&(f.setPosition(l,u),this.rotation=f.angle,this.preRotation=f.angle);var v=this.position;f&&f.getTopLeft?f.getTopLeft(v):v.set(l,u),this.prev.copy(v),this.prevFrame.copy(v),this.autoFrame.copy(v),f&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),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(l){return l.x=this.x,l.y=this.y,l.right=this.right,l.bottom=this.bottom,l},hitTest:function(l,u){if(!this.isCircle)return s(this,l,u);if(this.radius>0&&l>=this.left&&l<=this.right&&u>=this.top&&u<=this.bottom){var f=(this.center.x-l)*(this.center.x-l),v=(this.center.y-u)*(this.center.y-u);return f+v<=this.radius*this.radius}return!1},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(l){var u=this.position,f=u.x+this.halfWidth,v=u.y+this.halfHeight;this.debugShowBody&&(l.lineStyle(l.defaultStrokeWidth,this.debugBodyColor),this.isCircle?l.strokeCircle(f,v,this.width/2):(this.checkCollision.up&&l.lineBetween(u.x,u.y,u.x+this.width,u.y),this.checkCollision.right&&l.lineBetween(u.x+this.width,u.y,u.x+this.width,u.y+this.height),this.checkCollision.down&&l.lineBetween(u.x,u.y+this.height,u.x+this.width,u.y+this.height),this.checkCollision.left&&l.lineBetween(u.x,u.y,u.x,u.y+this.height))),this.debugShowVelocity&&(l.lineStyle(l.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),l.lineBetween(f,v,f+this.velocity.x/2,v+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(l){return l===void 0&&(l=!0),this.directControl=l,this},setCollideWorldBounds:function(l,u,f,v){l===void 0&&(l=!0),this.collideWorldBounds=l;var m=u!==void 0,g=f!==void 0;return(m||g)&&(this.worldBounce||(this.worldBounce=new i),m&&(this.worldBounce.x=u),g&&(this.worldBounce.y=f)),v!==void 0&&(this.onWorldBounds=v),this},setVelocity:function(l,u){return this.velocity.set(l,u),l=this.velocity.x,u=this.velocity.y,this.speed=Math.sqrt(l*l+u*u),this},setVelocityX:function(l){return this.setVelocity(l,this.velocity.y)},setVelocityY:function(l){return this.setVelocity(this.velocity.x,l)},setMaxVelocity:function(l,u){return this.maxVelocity.set(l,u),this},setMaxVelocityX:function(l){return this.maxVelocity.x=l,this},setMaxVelocityY:function(l){return this.maxVelocity.y=l,this},setMaxSpeed:function(l){return this.maxSpeed=l,this},setSlideFactor:function(l,u){return this.slideFactor.set(l,u),this},setBounce:function(l,u){return this.bounce.set(l,u),this},setBounceX:function(l){return this.bounce.x=l,this},setBounceY:function(l){return this.bounce.y=l,this},setAcceleration:function(l,u){return this.acceleration.set(l,u),this},setAccelerationX:function(l){return this.acceleration.x=l,this},setAccelerationY:function(l){return this.acceleration.y=l,this},setAllowDrag:function(l){return l===void 0&&(l=!0),this.allowDrag=l,this},setAllowGravity:function(l){return l===void 0&&(l=!0),this.allowGravity=l,this},setAllowRotation:function(l){return l===void 0&&(l=!0),this.allowRotation=l,this},setDrag:function(l,u){return this.drag.set(l,u),this},setDamping:function(l){return this.useDamping=l,this},setDragX:function(l){return this.drag.x=l,this},setDragY:function(l){return this.drag.y=l,this},setGravity:function(l,u){return this.gravity.set(l,u),this},setGravityX:function(l){return this.gravity.x=l,this},setGravityY:function(l){return this.gravity.y=l,this},setFriction:function(l,u){return this.friction.set(l,u),this},setFrictionX:function(l){return this.friction.x=l,this},setFrictionY:function(l){return this.friction.y=l,this},setAngularVelocity:function(l){return this.angularVelocity=l,this},setAngularAcceleration:function(l){return this.angularAcceleration=l,this},setAngularDrag:function(l){return this.angularDrag=l,this},setMass:function(l){return this.mass=l,this},setImmovable:function(l){return l===void 0&&(l=!0),this.immovable=l,this},setEnable:function(l){return l===void 0&&(l=!0),this.enable=l,this},processX:function(l,u,f,v){this.x+=l,this.updateCenter(),u!==null&&(this.velocity.x=u*this.slideFactor.x);var m=this.blocked;f&&(m.left=!0,m.none=!1),v&&(m.right=!0,m.none=!1)},processY:function(l,u,f,v){this.y+=l,this.updateCenter(),u!==null&&(this.velocity.y=u*this.slideFactor.y);var m=this.blocked;f&&(m.up=!0,m.none=!1),v&&(m.down=!0,m.none=!1)},x:{get:function(){return this.position.x},set:function(l){this.position.x=l}},y:{get:function(){return this.position.y},set:function(l){this.position.y=l}},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}}});p.exports=a},79342:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n,e,s,o,i,a){this.world=r,this.name="",this.active=!0,this.overlapOnly=n,this.object1=e,this.object2=s,this.collideCallback=o,this.processCallback=i,this.callbackContext=a},setName:function(h){return this.name=h,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}});p.exports=c},66022:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(71289),c=t(13759),h=t(37742),r=t(83419),n=t(37747),e=t(60758),s=t(72624),o=t(71464),i=new r({initialize:function(l){this.world=l,this.scene=l.scene,this.sys=l.scene.sys},collider:function(a,l,u,f,v){return this.world.addCollider(a,l,u,f,v)},overlap:function(a,l,u,f,v){return this.world.addOverlap(a,l,u,f,v)},existing:function(a,l){var u=l?n.STATIC_BODY:n.DYNAMIC_BODY;return this.world.enableBody(a,u),a},staticImage:function(a,l,u,f){var v=new d(this.scene,a,l,u,f);return this.sys.displayList.add(v),this.world.enableBody(v,n.STATIC_BODY),v},image:function(a,l,u,f){var v=new d(this.scene,a,l,u,f);return this.sys.displayList.add(v),this.world.enableBody(v,n.DYNAMIC_BODY),v},staticSprite:function(a,l,u,f){var v=new c(this.scene,a,l,u,f);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,n.STATIC_BODY),v},sprite:function(a,l,u,f){var v=new c(this.scene,a,l,u,f);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,n.DYNAMIC_BODY),v},staticGroup:function(a,l){return this.sys.updateList.add(new o(this.world,this.world.scene,a,l))},group:function(a,l){return this.sys.updateList.add(new e(this.world,this.world.scene,a,l))},body:function(a,l,u,f){var v=new h(this.world);return v.position.set(a,l),u&&f&&v.setSize(u,f),this.world.add(v,n.DYNAMIC_BODY),v},staticBody:function(a,l,u,f){var v=new s(this.world);return v.position.set(a,l),u&&f&&v.setSize(u,f),this.world.add(v,n.STATIC_BODY),v},destroy:function(){this.world=null,this.scene=null,this.sys=null}});p.exports=i},79599:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d=0;if(!Array.isArray(t))d=t;else for(var c=0;c<t.length;c++)d|=t[c];return d};p.exports=S},64897:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(37747),c=function(h,r,n,e){var s=0,o=h.deltaAbsX()+r.deltaAbsX()+e;return h._dx===0&&r._dx===0?(h.embedded=!0,r.embedded=!0):h._dx>r._dx?(s=h.right-r.x,s>o&&!n||h.checkCollision.right===!1||r.checkCollision.left===!1?s=0:(h.touching.none=!1,h.touching.right=!0,r.touching.none=!1,r.touching.left=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.right=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.left=!0))):h._dx<r._dx&&(s=h.x-r.width-r.x,-s>o&&!n||h.checkCollision.left===!1||r.checkCollision.right===!1?s=0:(h.touching.none=!1,h.touching.left=!0,r.touching.none=!1,r.touching.right=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.left=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.right=!0))),h.overlapX=s,r.overlapX=s,s};p.exports=c},45170:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(37747),c=function(h,r,n,e){var s=0,o=h.deltaAbsY()+r.deltaAbsY()+e;return h._dy===0&&r._dy===0?(h.embedded=!0,r.embedded=!0):h._dy>r._dy?(s=h.bottom-r.y,s>o&&!n||h.checkCollision.down===!1||r.checkCollision.up===!1?s=0:(h.touching.none=!1,h.touching.down=!0,r.touching.none=!1,r.touching.up=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.down=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.up=!0))):h._dy<r._dy&&(s=h.y-r.bottom,-s>o&&!n||h.checkCollision.up===!1||r.checkCollision.down===!1?s=0:(h.touching.none=!1,h.touching.up=!0,r.touching.none=!1,r.touching.down=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.up=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.down=!0))),h.overlapY=s,r.overlapY=s,s};p.exports=c},60758:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(13759),c=t(83419),h=t(78389),r=t(37747),n=t(95540),e=t(26479),s=t(41212),o=new c({Extends:e,Mixins:[h],initialize:function(a,l,u,f){if(!u&&!f)f={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(s(u))f=u,u=null,f.internalCreateCallback=this.createCallbackHandler,f.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(u)&&s(u[0])){var v=this;u.forEach(function(m){m.internalCreateCallback=v.createCallbackHandler,m.internalRemoveCallback=v.removeCallbackHandler,m.classType=n(m,"classType",d)}),f=null}else f={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=a,f&&(f.classType=n(f,"classType",d)),this.physicsType=r.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=2147483647,this.defaults={setCollideWorldBounds:n(f,"collideWorldBounds",!1),setBoundsRectangle:n(f,"customBoundsRectangle",null),setAccelerationX:n(f,"accelerationX",0),setAccelerationY:n(f,"accelerationY",0),setAllowDrag:n(f,"allowDrag",!0),setAllowGravity:n(f,"allowGravity",!0),setAllowRotation:n(f,"allowRotation",!0),setDamping:n(f,"useDamping",!1),setBounceX:n(f,"bounceX",0),setBounceY:n(f,"bounceY",0),setDragX:n(f,"dragX",0),setDragY:n(f,"dragY",0),setEnable:n(f,"enable",!0),setGravityX:n(f,"gravityX",0),setGravityY:n(f,"gravityY",0),setFrictionX:n(f,"frictionX",0),setFrictionY:n(f,"frictionY",0),setMaxSpeed:n(f,"maxSpeed",-1),setMaxVelocityX:n(f,"maxVelocityX",1e4),setMaxVelocityY:n(f,"maxVelocityY",1e4),setVelocityX:n(f,"velocityX",0),setVelocityY:n(f,"velocityY",0),setAngularVelocity:n(f,"angularVelocity",0),setAngularAcceleration:n(f,"angularAcceleration",0),setAngularDrag:n(f,"angularDrag",0),setMass:n(f,"mass",1),setImmovable:n(f,"immovable",!1)},e.call(this,l,u,f),this.type="PhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,r.DYNAMIC_BODY);var a=i.body;for(var l in this.defaults)a[l](this.defaults[l])},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},setVelocity:function(i,a,l){l===void 0&&(l=0);for(var u=this.getChildren(),f=0;f<u.length;f++)u[f].body.velocity.set(i+f*l,a+f*l);return this},setVelocityX:function(i,a){a===void 0&&(a=0);for(var l=this.getChildren(),u=0;u<l.length;u++)l[u].body.velocity.x=i+u*a;return this},setVelocityY:function(i,a){a===void 0&&(a=0);for(var l=this.getChildren(),u=0;u<l.length;u++)l[u].body.velocity.y=i+u*a;return this}});p.exports=o},3017:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S,t,d,c,h,r,n,e,s,o,i,a,l,u,f,v,m,g=function(M,P,A){S=M,t=P;var R=S.velocity.x,F=t.velocity.x;return d=S.pushable,s=S._dx<0,o=S._dx>0,i=S._dx===0,f=Math.abs(S.right-t.x)<=Math.abs(t.right-S.x),n=F-R*S.bounce.x,c=t.pushable,a=t._dx<0,l=t._dx>0,u=t._dx===0,v=!f,e=R-F*t.bounce.x,m=Math.abs(A),x()},x=function(){return o&&f&&t.blocked.right?(S.processX(-m,n,!1,!0),1):s&&v&&t.blocked.left?(S.processX(m,n,!0),1):l&&v&&S.blocked.right?(t.processX(-m,e,!1,!0),2):a&&f&&S.blocked.left?(t.processX(m,e,!0),2):0},y=function(){var M=S.velocity.x,P=t.velocity.x,A=Math.sqrt(P*P*t.mass/S.mass)*(P>0?1:-1),R=Math.sqrt(M*M*S.mass/t.mass)*(M>0?1:-1),F=(A+R)*.5;return A-=F,R-=F,h=F+A*S.bounce.x,r=F+R*t.bounce.x,s&&v?T(0):a&&f?T(1):o&&f?T(2):l&&v?T(3):!1},T=function(M){if(d&&c)m*=.5,M===0||M===3?(S.processX(m,h),t.processX(-m,r)):(S.processX(-m,h),t.processX(m,r));else if(d&&!c)M===0||M===3?S.processX(m,n,!0):S.processX(-m,n,!1,!0);else if(!d&&c)M===0||M===3?t.processX(-m,e,!1,!0):t.processX(m,e,!0);else{var P=m*.5;M===0?u?(S.processX(m,0,!0),t.processX(0,null,!1,!0)):l?(S.processX(P,0,!0),t.processX(-P,0,!1,!0)):(S.processX(P,t.velocity.x,!0),t.processX(-P,null,!1,!0)):M===1?i?(S.processX(0,null,!1,!0),t.processX(m,0,!0)):o?(S.processX(-P,0,!1,!0),t.processX(P,0,!0)):(S.processX(-P,null,!1,!0),t.processX(P,S.velocity.x,!0)):M===2?u?(S.processX(-m,0,!1,!0),t.processX(0,null,!0)):a?(S.processX(-P,0,!1,!0),t.processX(P,0,!0)):(S.processX(-P,t.velocity.x,!1,!0),t.processX(P,null,!0)):M===3&&(i?(S.processX(0,null,!0),t.processX(-m,0,!1,!0)):s?(S.processX(P,0,!0),t.processX(-P,0,!1,!0)):(S.processX(P,t.velocity.y,!0),t.processX(-P,null,!1,!0)))}return!0},C=function(M){if(M===1?t.velocity.x=0:f?t.processX(m,e,!0):t.processX(-m,e,!1,!0),S.moves){var P=S.directControl?S.y-S.autoFrame.y:S.y-S.prev.y;t.y+=P*S.friction.y,t._dy=t.y-t.prev.y}},E=function(M){if(M===2?S.velocity.x=0:v?S.processX(m,n,!0):S.processX(-m,n,!1,!0),t.moves){var P=t.directControl?t.y-t.autoFrame.y:t.y-t.prev.y;S.y+=P*t.friction.y,S._dy=S.y-S.prev.y}};p.exports={BlockCheck:x,Check:y,Set:g,Run:T,RunImmovableBody1:C,RunImmovableBody2:E}},47962:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S,t,d,c,h,r,n,e,s,o,i,a,l,u,f,v,m,g=function(M,P,A){S=M,t=P;var R=S.velocity.y,F=t.velocity.y;return d=S.pushable,s=S._dy<0,o=S._dy>0,i=S._dy===0,f=Math.abs(S.bottom-t.y)<=Math.abs(t.bottom-S.y),n=F-R*S.bounce.y,c=t.pushable,a=t._dy<0,l=t._dy>0,u=t._dy===0,v=!f,e=R-F*t.bounce.y,m=Math.abs(A),x()},x=function(){return o&&f&&t.blocked.down?(S.processY(-m,n,!1,!0),1):s&&v&&t.blocked.up?(S.processY(m,n,!0),1):l&&v&&S.blocked.down?(t.processY(-m,e,!1,!0),2):a&&f&&S.blocked.up?(t.processY(m,e,!0),2):0},y=function(){var M=S.velocity.y,P=t.velocity.y,A=Math.sqrt(P*P*t.mass/S.mass)*(P>0?1:-1),R=Math.sqrt(M*M*S.mass/t.mass)*(M>0?1:-1),F=(A+R)*.5;return A-=F,R-=F,h=F+A*S.bounce.y,r=F+R*t.bounce.y,s&&v?T(0):a&&f?T(1):o&&f?T(2):l&&v?T(3):!1},T=function(M){if(d&&c)m*=.5,M===0||M===3?(S.processY(m,h),t.processY(-m,r)):(S.processY(-m,h),t.processY(m,r));else if(d&&!c)M===0||M===3?S.processY(m,n,!0):S.processY(-m,n,!1,!0);else if(!d&&c)M===0||M===3?t.processY(-m,e,!1,!0):t.processY(m,e,!0);else{var P=m*.5;M===0?u?(S.processY(m,0,!0),t.processY(0,null,!1,!0)):l?(S.processY(P,0,!0),t.processY(-P,0,!1,!0)):(S.processY(P,t.velocity.y,!0),t.processY(-P,null,!1,!0)):M===1?i?(S.processY(0,null,!1,!0),t.processY(m,0,!0)):o?(S.processY(-P,0,!1,!0),t.processY(P,0,!0)):(S.processY(-P,null,!1,!0),t.processY(P,S.velocity.y,!0)):M===2?u?(S.processY(-m,0,!1,!0),t.processY(0,null,!0)):a?(S.processY(-P,0,!1,!0),t.processY(P,0,!0)):(S.processY(-P,t.velocity.y,!1,!0),t.processY(P,null,!0)):M===3&&(i?(S.processY(0,null,!0),t.processY(-m,0,!1,!0)):s?(S.processY(P,0,!0),t.processY(-P,0,!1,!0)):(S.processY(P,t.velocity.y,!0),t.processY(-P,null,!1,!0)))}return!0},C=function(M){if(M===1?t.velocity.y=0:f?t.processY(m,e,!0):t.processY(-m,e,!1,!0),S.moves){var P=S.directControl?S.x-S.autoFrame.x:S.x-S.prev.x;t.x+=P*S.friction.x,t._dx=t.x-t.prev.x}},E=function(M){if(M===2?S.velocity.y=0:v?S.processY(m,n,!0):S.processY(-m,n,!1,!0),t.moves){var P=t.directControl?t.x-t.autoFrame.x:t.x-t.prev.x;S.x+=P*t.friction.x,S._dx=S.x-S.prev.x}};p.exports={BlockCheck:x,Check:y,Set:g,Run:T,RunImmovableBody1:C,RunImmovableBody2:E}},14087:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(64897),c=t(3017),h=function(r,n,e,s,o){o===void 0&&(o=d(r,n,e,s));var i=r.immovable,a=n.immovable;if(e||o===0||i&&a||r.customSeparateX||n.customSeparateX)return o!==0||r.embedded&&n.embedded;var l=c.Set(r,n,o);return!i&&!a?l>0?!0:c.Check():(i?c.RunImmovableBody1(l):a&&c.RunImmovableBody2(l),!0)};p.exports=h},89936:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45170),c=t(47962),h=function(r,n,e,s,o){o===void 0&&(o=d(r,n,e,s));var i=r.immovable,a=n.immovable;if(e||o===0||i&&a||r.customSeparateY||n.customSeparateY)return o!==0||r.embedded&&n.embedded;var l=c.Set(r,n,o);return!i&&!a?l>0?!0:c.Check():(i?c.RunImmovableBody1(l):a&&c.RunImmovableBody2(l),!0)};p.exports=h},95829:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d===void 0&&(d={}),d.none=t,d.up=!1,d.down=!1,d.left=!1,d.right=!1,t||(d.up=!0,d.down=!0,d.left=!0,d.right=!0),d};p.exports=S},72624:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87902),c=t(83419),h=t(78389),r=t(37747),n=t(37303),e=t(95829),s=t(26099),o=new c({Mixins:[h],initialize:function(a,l){var u=64,f=64,v={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},m=l!==void 0;m&&l.displayWidth&&(u=l.displayWidth,f=l.displayHeight),m||(l=v),this.world=a,this.gameObject=m?l:void 0,this.isBody=!0,this.debugShowBody=a.defaults.debugShowStaticBody,this.debugBodyColor=a.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new s,this.position=new s(l.x-u*l.originX,l.y-f*l.originY),this.width=u,this.height=f,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new s(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=s.ZERO,this.allowGravity=!1,this.gravity=s.ZERO,this.bounce=s.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=e(!1),this.touching=e(!0),this.wasTouching=e(!0),this.blocked=e(!0),this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(i,a){return i&&i!==this.gameObject&&(this.gameObject.body=null,i.body=this,this.gameObject=i),a&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var i=this.gameObject;return i.getTopLeft(this.position),this.width=i.displayWidth,this.height=i.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(i,a){return a===void 0&&(a=i),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(i,a),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(i,a,l){l===void 0&&(l=!0);var u=this.gameObject;if(u&&u.frame&&(i||(i=u.frame.realWidth),a||(a=u.frame.realHeight)),this.world.staticTree.remove(this),this.width=i,this.height=a,this.halfWidth=Math.floor(i/2),this.halfHeight=Math.floor(a/2),l&&u&&u.getCenter){var f=u.displayWidth/2,v=u.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(f-this.halfWidth,v-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(i,a,l){return a===void 0&&(a=this.offset.x),l===void 0&&(l=this.offset.y),i>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=i,this.width=i*2,this.height=i*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(a,l),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(i,a){var l=this.gameObject;i===void 0&&(i=l.x),a===void 0&&(a=l.y),this.world.staticTree.remove(this),l.setPosition(i,a),l.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(i){return i.x=this.x,i.y=this.y,i.right=this.right,i.bottom=this.bottom,i},hitTest:function(i,a){return this.isCircle?d(this,i,a):n(this,i,a)},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(i){var a=this.position,l=a.x+this.halfWidth,u=a.y+this.halfHeight;this.debugShowBody&&(i.lineStyle(i.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?i.strokeCircle(l,u,this.width/2):i.strokeRect(a.x,a.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(i){return i<=0&&(i=.1),this.mass=i,this},x:{get:function(){return this.position.x},set:function(i){this.world.staticTree.remove(this),this.position.x=i,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(i){this.world.staticTree.remove(this),this.position.y=i,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}}});p.exports=o},71464:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(13759),c=t(83419),h=t(78389),r=t(37747),n=t(95540),e=t(26479),s=t(41212),o=new c({Extends:e,Mixins:[h],initialize:function(a,l,u,f){!u&&!f?f={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:d}:s(u)?(f=u,u=null,f.internalCreateCallback=this.createCallbackHandler,f.internalRemoveCallback=this.removeCallbackHandler,f.createMultipleCallback=this.createMultipleCallbackHandler,f.classType=n(f,"classType",d)):Array.isArray(u)&&s(u[0])?(f=u,u=null,f.forEach(function(v){v.internalCreateCallback=this.createCallbackHandler,v.internalRemoveCallback=this.removeCallbackHandler,v.createMultipleCallback=this.createMultipleCallbackHandler,v.classType=n(v,"classType",d)})):f={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=a,this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,e.call(this,l,u,f),this.type="StaticPhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,r.STATIC_BODY)},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var i=this.children.entries,a=0;a<i.length;a++)i[a].body.reset();return this}});p.exports=o},82248:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(55495),c=t(37742),h=t(45319),r=t(83419),n=t(79342),e=t(37747),s=t(20339),o=t(52816),i=t(50792),a=t(63012),l=t(43855),u=t(5470),f=t(94977),v=t(64897),m=t(45170),g=t(96523),x=t(35154),y=t(36383),T=t(25774),C=t(96602),E=t(87841),M=t(59542),P=t(40012),A=t(14087),R=t(89936),F=t(35072),w=t(72624),B=t(2483),N=t(61340),U=t(26099),D=t(15994),I=new r({Extends:i,initialize:function(L,G){i.call(this),this.scene=L,this.bodies=new F,this.staticBodies=new F,this.pendingDestroy=new F,this.colliders=new T,this.gravity=new U(x(G,"gravity.x",0),x(G,"gravity.y",0)),this.bounds=new E(x(G,"x",0),x(G,"y",0),x(G,"width",L.sys.scale.width),x(G,"height",L.sys.scale.height)),this.checkCollision={up:x(G,"checkCollision.up",!0),down:x(G,"checkCollision.down",!0),left:x(G,"checkCollision.left",!0),right:x(G,"checkCollision.right",!0)},this.fps=x(G,"fps",60),this.fixedStep=x(G,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=x(G,"timeScale",1),this.OVERLAP_BIAS=x(G,"overlapBias",4),this.TILE_BIAS=x(G,"tileBias",16),this.forceX=x(G,"forceX",!1),this.isPaused=x(G,"isPaused",!1),this._total=0,this.drawDebug=x(G,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:x(G,"debugShowBody",!0),debugShowStaticBody:x(G,"debugShowStaticBody",!0),debugShowVelocity:x(G,"debugShowVelocity",!0),bodyDebugColor:x(G,"debugBodyColor",16711935),staticBodyDebugColor:x(G,"debugStaticBodyColor",255),velocityDebugColor:x(G,"debugVelocityColor",65280)},this.maxEntries=x(G,"maxEntries",16),this.useTree=x(G,"useTree",!0),this.tree=new M(this.maxEntries),this.staticTree=new M(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new N,this._tempMatrix2=new N,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(O,L){L===void 0&&(L=e.DYNAMIC_BODY),Array.isArray(O)||(O=[O]);for(var G=0;G<O.length;G++){var z=O[G];if(z.isParent)for(var X=z.getChildren(),V=0;V<X.length;V++){var Y=X[V];Y.isParent?this.enable(Y,L):this.enableBody(Y,L)}else this.enableBody(z,L)}},enableBody:function(O,L){return L===void 0&&(L=e.DYNAMIC_BODY),O.hasTransformComponent&&(O.body||(L===e.DYNAMIC_BODY?O.body=new c(this,O):L===e.STATIC_BODY&&(O.body=new w(this,O))),this.add(O.body)),O},add:function(O){return O.physicsType===e.DYNAMIC_BODY?this.bodies.set(O):O.physicsType===e.STATIC_BODY&&(this.staticBodies.set(O),this.staticTree.insert(O)),O.enable=!0,O},disable:function(O){Array.isArray(O)||(O=[O]);for(var L=0;L<O.length;L++){var G=O[L];if(G.isParent)for(var z=G.getChildren(),X=0;X<z.length;X++){var V=z[X];V.isParent?this.disable(V):this.disableBody(V.body)}else this.disableBody(G.body)}},disableBody:function(O){this.remove(O),O.enable=!1},remove:function(O){O.physicsType===e.DYNAMIC_BODY?(this.tree.remove(O),this.bodies.delete(O)):O.physicsType===e.STATIC_BODY&&(this.staticBodies.delete(O),this.staticTree.remove(O))},createDebugGraphic:function(){var O=this.scene.sys.add.graphics({x:0,y:0});return O.setDepth(Number.MAX_VALUE),this.debugGraphic=O,this.drawDebug=!0,O},setBounds:function(O,L,G,z,X,V,Y,W){return this.bounds.setTo(O,L,G,z),X!==void 0&&this.setBoundsCollision(X,V,Y,W),this},setBoundsCollision:function(O,L,G,z){return O===void 0&&(O=!0),L===void 0&&(L=!0),G===void 0&&(G=!0),z===void 0&&(z=!0),this.checkCollision.left=O,this.checkCollision.right=L,this.checkCollision.up=G,this.checkCollision.down=z,this},pause:function(){return this.isPaused=!0,this.emit(a.PAUSE),this},resume:function(){return this.isPaused=!1,this.emit(a.RESUME),this},addCollider:function(O,L,G,z,X){G===void 0&&(G=null),z===void 0&&(z=null),X===void 0&&(X=G);var V=new n(this,!1,O,L,G,z,X);return this.colliders.add(V),V},addOverlap:function(O,L,G,z,X){G===void 0&&(G=null),z===void 0&&(z=null),X===void 0&&(X=G);var V=new n(this,!0,O,L,G,z,X);return this.colliders.add(V),V},removeCollider:function(O){return this.colliders.remove(O),this},setFPS:function(O){return this.fps=O,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this},update:function(O,L){if(!(this.isPaused||this.bodies.size===0)){var G,z=this._frameTime,X=this._frameTimeMS*this.timeScale;this._elapsed+=L;var V,Y=this.bodies.entries,W=this._elapsed>=X;for(this.fixedStep||(z=L*.001,W=!0,this._elapsed=0),G=0;G<Y.length;G++)V=Y[G],V.enable&&V.preUpdate(W,z);if(W){this._elapsed-=X,this.stepsLastFrame=1,this.useTree&&(this.tree.clear(),this.tree.load(Y));var H=this.colliders.update();for(G=0;G<H.length;G++){var b=H[G];b.active&&b.update()}this.emit(a.WORLD_STEP,z)}for(;this._elapsed>=X;)this._elapsed-=X,this.step(z)}},step:function(O){var L,G,z=this.bodies.entries,X=z.length;for(L=0;L<X;L++)G=z[L],G.enable&&G.update(O);this.useTree&&(this.tree.clear(),this.tree.load(z));var V=this.colliders.update();for(L=0;L<V.length;L++){var Y=V[L];Y.active&&Y.update()}this.emit(a.WORLD_STEP,O),this.stepsLastFrame++},singleStep:function(){this.update(0,this._frameTimeMS),this.postUpdate()},postUpdate:function(){var O,L,G=this.bodies.entries,z=G.length,X=this.bodies,V=this.staticBodies;if(this.stepsLastFrame)for(this.stepsLastFrame=0,O=0;O<z;O++)L=G[O],L.enable&&L.postUpdate();if(this.drawDebug){var Y=this.debugGraphic;for(Y.clear(),O=0;O<z;O++)L=G[O],L.willDrawDebug()&&L.drawDebug(Y);for(G=V.entries,z=G.length,O=0;O<z;O++)L=G[O],L.willDrawDebug()&&L.drawDebug(Y)}var W=this.pendingDestroy;if(W.size>0){var H=this.tree,b=this.staticTree;for(G=W.entries,z=G.length,O=0;O<z;O++)L=G[O],L.physicsType===e.DYNAMIC_BODY?(H.remove(L),X.delete(L)):L.physicsType===e.STATIC_BODY&&(b.remove(L),V.delete(L)),L.world=void 0,L.gameObject=void 0;W.clear()}},updateMotion:function(O,L){O.allowRotation&&this.computeAngularVelocity(O,L),this.computeVelocity(O,L)},computeAngularVelocity:function(O,L){var G=O.angularVelocity,z=O.angularAcceleration,X=O.angularDrag,V=O.maxAngular;z?G+=z*L:O.allowDrag&&X&&(X*=L,u(G-X,0,.1)?G-=X:f(G+X,0,.1)?G+=X:G=0),G=h(G,-V,V);var Y=G-O.angularVelocity;O.angularVelocity+=Y,O.rotation+=O.angularVelocity*L},computeVelocity:function(O,L){var G=O.velocity.x,z=O.acceleration.x,X=O.drag.x,V=O.maxVelocity.x,Y=O.velocity.y,W=O.acceleration.y,H=O.drag.y,b=O.maxVelocity.y,K=O.speed,Q=O.maxSpeed,Z=O.allowDrag,$=O.useDamping;O.allowGravity&&(G+=(this.gravity.x+O.gravity.x)*L,Y+=(this.gravity.y+O.gravity.y)*L),z?G+=z*L:Z&&X&&($?(X=Math.pow(X,L),G*=X,K=Math.sqrt(G*G+Y*Y),l(K,0,.001)&&(G=0)):(X*=L,u(G-X,0,.01)?G-=X:f(G+X,0,.01)?G+=X:G=0)),W?Y+=W*L:Z&&H&&($?(H=Math.pow(H,L),Y*=H,K=Math.sqrt(G*G+Y*Y),l(K,0,.001)&&(Y=0)):(H*=L,u(Y-H,0,.01)?Y-=H:f(Y+H,0,.01)?Y+=H:Y=0)),G=h(G,-V,V),Y=h(Y,-b,b),O.velocity.set(G,Y),Q>-1&&O.velocity.length()>Q&&(O.velocity.normalize().scale(Q),K=Q),O.speed=K},separate:function(O,L,G,z,X){var V,Y,W=!1,H=!0;if(!O.enable||!L.enable||O.checkCollision.none||L.checkCollision.none||!this.intersects(O,L)||G&&G.call(z,O.gameObject||O,L.gameObject||L)===!1)return W;if(O.isCircle||L.isCircle){var b=this.separateCircle(O,L,X);b.result?(W=!0,H=!1):(V=b.x,Y=b.y,H=!0)}if(H){var K=!1,Q=!1,Z=this.OVERLAP_BIAS;X?(K=A(O,L,X,Z,V),Q=R(O,L,X,Z,Y)):this.forceX||Math.abs(this.gravity.y+O.gravity.y)<Math.abs(this.gravity.x+O.gravity.x)?(K=A(O,L,X,Z,V),this.intersects(O,L)&&(Q=R(O,L,X,Z,Y))):(Q=R(O,L,X,Z,Y),this.intersects(O,L)&&(K=A(O,L,X,Z,V))),W=K||Q}return W&&(X?(O.onOverlap||L.onOverlap)&&this.emit(a.OVERLAP,O.gameObject,L.gameObject,O,L):(O.onCollide||L.onCollide)&&this.emit(a.COLLIDE,O.gameObject,L.gameObject,O,L)),W},separateCircle:function(O,L,G){v(O,L,!1,0),m(O,L,!1,0);var z=O.isCircle,X=L.isCircle,V=O.center,Y=L.center,W=O.immovable,H=L.immovable,b=O.velocity,K=L.velocity,Q=0,Z=!0;if(z!==X){Z=!1;var $=V.x,q=V.y,_=O.halfWidth,tt=L.position.x,J=L.position.y,j=L.right,k=L.bottom;X&&($=Y.x,q=Y.y,_=L.halfWidth,tt=O.position.x,J=O.position.y,j=O.right,k=O.bottom),q<J?$<tt?Q=s($,q,tt,J)-_:$>j&&(Q=s($,q,j,J)-_):q>k&&($<tt?Q=s($,q,tt,k)-_:$>j&&(Q=s($,q,j,k)-_)),Q*=-1}else Q=O.halfWidth+L.halfWidth-o(V,Y);O.overlapR=Q,L.overlapR=Q;var et=d(V,Y),it=(Q+y.EPSILON)*Math.cos(et),ht=(Q+y.EPSILON)*Math.sin(et),at={overlap:Q,result:!1,x:it,y:ht};if(G&&(!Z||Z&&Q!==0))return at.result=!0,at;if(!Z&&Q===0||W&&H||O.customSeparateX||L.customSeparateX)return at.x=void 0,at.y=void 0,at;var ft=!O.pushable&&!L.pushable;if(Z){var rt=V.x-Y.x,dt=V.y-Y.y,st=Math.sqrt(Math.pow(rt,2)+Math.pow(dt,2)),vt=(Y.x-V.x)/st||0,lt=(Y.y-V.y)/st||0,pt=2*(b.x*vt+b.y*lt-K.x*vt-K.y*lt)/(O.mass+L.mass);(W||H||!O.pushable||!L.pushable)&&(pt*=2),!W&&O.pushable&&(b.x=b.x-pt/O.mass*vt,b.y=b.y-pt/O.mass*lt,b.multiply(O.bounce)),!H&&L.pushable&&(K.x=K.x+pt/L.mass*vt,K.y=K.y+pt/L.mass*lt,K.multiply(L.bounce)),!W&&!H&&(it*=.5,ht*=.5),!W||O.pushable||ft?(O.x-=it,O.y-=ht,O.updateCenter()):(!H||L.pushable||ft)&&(L.x+=it,L.y+=ht,L.updateCenter()),at.result=!0}else!W||O.pushable||ft?(O.x-=it,O.y-=ht,O.updateCenter()):(!H||L.pushable||ft)&&(L.x+=it,L.y+=ht,L.updateCenter()),at.x=void 0,at.y=void 0;return at},intersects:function(O,L){return O===L?!1:!O.isCircle&&!L.isCircle?!(O.right<=L.left||O.bottom<=L.top||O.left>=L.right||O.top>=L.bottom):O.isCircle?L.isCircle?o(O.center,L.center)<=O.halfWidth+L.halfWidth:this.circleBodyIntersects(O,L):this.circleBodyIntersects(L,O)},circleBodyIntersects:function(O,L){var G=h(O.center.x,L.left,L.right),z=h(O.center.y,L.top,L.bottom),X=(O.center.x-G)*(O.center.x-G),V=(O.center.y-z)*(O.center.y-z);return X+V<=O.halfWidth*O.halfWidth},overlap:function(O,L,G,z,X){return G===void 0&&(G=null),z===void 0&&(z=null),X===void 0&&(X=G),this.collideObjects(O,L,G,z,X,!0)},collide:function(O,L,G,z,X){return G===void 0&&(G=null),z===void 0&&(z=null),X===void 0&&(X=G),this.collideObjects(O,L,G,z,X,!1)},collideObjects:function(O,L,G,z,X,V){var Y,W;O.isParent&&(O.physicsType===void 0||L===void 0||O===L)&&(O=O.children.entries),L&&L.isParent&&L.physicsType===void 0&&(L=L.children.entries);var H=Array.isArray(O),b=Array.isArray(L);if(this._total=0,!H&&!b)this.collideHandler(O,L,G,z,X,V);else if(!H&&b)for(Y=0;Y<L.length;Y++)this.collideHandler(O,L[Y],G,z,X,V);else if(H&&!b)if(L)for(Y=0;Y<O.length;Y++)this.collideHandler(O[Y],L,G,z,X,V);else for(Y=0;Y<O.length;Y++){var K=O[Y];for(W=Y+1;W<O.length;W++)Y!==W&&this.collideHandler(K,O[W],G,z,X,V)}else for(Y=0;Y<O.length;Y++)for(W=0;W<L.length;W++)this.collideHandler(O[Y],L[W],G,z,X,V);return this._total>0},collideHandler:function(O,L,G,z,X,V){if(L===void 0&&O.isParent)return this.collideGroupVsGroup(O,O,G,z,X,V);if(!O||!L)return!1;if(O.body||O.isBody){if(L.body||L.isBody)return this.collideSpriteVsSprite(O,L,G,z,X,V);if(L.isParent)return this.collideSpriteVsGroup(O,L,G,z,X,V);if(L.isTilemap)return this.collideSpriteVsTilemapLayer(O,L,G,z,X,V)}else if(O.isParent){if(L.body||L.isBody)return this.collideSpriteVsGroup(L,O,G,z,X,V);if(L.isParent)return this.collideGroupVsGroup(O,L,G,z,X,V);if(L.isTilemap)return this.collideGroupVsTilemapLayer(O,L,G,z,X,V)}else if(O.isTilemap){if(L.body||L.isBody)return this.collideSpriteVsTilemapLayer(L,O,G,z,X,V);if(L.isParent)return this.collideGroupVsTilemapLayer(L,O,G,z,X,V)}},canCollide:function(O,L){return O&&L&&(O.collisionMask&L.collisionCategory)!==0&&(L.collisionMask&O.collisionCategory)!==0},collideSpriteVsSprite:function(O,L,G,z,X,V){var Y=O.isBody?O:O.body,W=L.isBody?L:L.body;return this.canCollide(Y,W)?(this.separate(Y,W,z,X,V)&&(G&&G.call(X,O,L),this._total++),!0):!1},collideSpriteVsGroup:function(O,L,G,z,X,V){var Y=O.isBody?O:O.body;if(!(L.getLength()===0||!Y||!Y.enable||Y.checkCollision.none||!this.canCollide(Y,L))){var W,H,b;if(this.useTree||L.physicsType===e.STATIC_BODY){var K=this.treeMinMax;K.minX=Y.left,K.minY=Y.top,K.maxX=Y.right,K.maxY=Y.bottom;var Q=L.physicsType===e.DYNAMIC_BODY?this.tree.search(K):this.staticTree.search(K);for(H=Q.length,W=0;W<H;W++)b=Q[W],!(Y===b||!b.enable||b.checkCollision.none||!L.contains(b.gameObject))&&this.separate(Y,b,z,X,V)&&(G&&G.call(X,Y.gameObject,b.gameObject),this._total++)}else{var Z=L.getChildren(),$=L.children.entries.indexOf(O);for(H=Z.length,W=0;W<H;W++)b=Z[W].body,!(!b||W===$||!b.enable)&&this.separate(Y,b,z,X,V)&&(G&&G.call(X,Y.gameObject,b.gameObject),this._total++)}}},collideGroupVsTilemapLayer:function(O,L,G,z,X,V){if(!this.canCollide(O,L))return!1;var Y=O.getChildren();if(Y.length===0)return!1;for(var W=!1,H=0;H<Y.length;H++)(Y[H].body||Y[H].isBody)&&this.collideSpriteVsTilemapLayer(Y[H],L,G,z,X,V)&&(W=!0);return W},collideTiles:function(O,L,G,z,X){return L.length===0||O.body&&!O.body.enable||O.isBody&&!O.enable?!1:this.collideSpriteVsTilesHandler(O,L,G,z,X,!1,!1)},overlapTiles:function(O,L,G,z,X){return L.length===0||O.body&&!O.body.enable||O.isBody&&!O.enable?!1:this.collideSpriteVsTilesHandler(O,L,G,z,X,!0,!1)},collideSpriteVsTilemapLayer:function(O,L,G,z,X,V){var Y=O.isBody?O:O.body;if(!Y.enable||Y.checkCollision.none||!this.canCollide(Y,L))return!1;var W=L.layer,H=Y.x-W.tileWidth*L.scaleX,b=Y.y-W.tileHeight*L.scaleY,K=Y.width+W.tileWidth*L.scaleX,Q=Y.height+W.tileHeight*L.scaleY,Z=V?null:this.tileFilterOptions,$=g(H,b,K,Q,Z,L.scene.cameras.main,L.layer);return $.length===0?!1:this.collideSpriteVsTilesHandler(O,$,G,z,X,V,!0)},collideSpriteVsTilesHandler:function(O,L,G,z,X,V,Y){for(var W=O.isBody?O:O.body,H,b={left:0,right:0,top:0,bottom:0},K,Q=!1,Z=0;Z<L.length;Z++){H=L[Z],K=H.tilemapLayer;var $=K.tileToWorldXY(H.x,H.y);b.left=$.x,b.top=$.y,b.right=b.left+H.width*K.scaleX,b.bottom=b.top+H.height*K.scaleY,B(b,W)&&(!z||z.call(X,O,H))&&C(H,O)&&(V||P(Z,W,H,b,K,this.TILE_BIAS,Y))&&(this._total++,Q=!0,G&&G.call(X,O,H),V&&W.onOverlap?this.emit(a.TILE_OVERLAP,O,H,W):W.onCollide&&this.emit(a.TILE_COLLIDE,O,H,W))}return Q},collideGroupVsGroup:function(O,L,G,z,X,V){if(!(O.getLength()===0||L.getLength()===0||!this.canCollide(O,L)))for(var Y=O.getChildren(),W=0;W<Y.length;W++)this.collideSpriteVsGroup(Y[W],L,G,z,X,V)},wrap:function(O,L){O.body?this.wrapObject(O,L):O.getChildren?this.wrapArray(O.getChildren(),L):Array.isArray(O)?this.wrapArray(O,L):this.wrapObject(O,L)},wrapArray:function(O,L){for(var G=0;G<O.length;G++)this.wrapObject(O[G],L)},wrapObject:function(O,L){L===void 0&&(L=0),O.x=D(O.x,this.bounds.left-L,this.bounds.right+L),O.y=D(O.y,this.bounds.top-L,this.bounds.bottom+L)},shutdown:function(){this.tree.clear(),this.staticTree.clear(),this.bodies.clear(),this.staticBodies.clear(),this.colliders.destroy(),this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=null,this.debugGraphic&&(this.debugGraphic.destroy(),this.debugGraphic=null)}});p.exports=I},1093:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setAcceleration:function(t,d){return this.body.acceleration.set(t,d),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}};p.exports=S},59023:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={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}};p.exports=S},62069:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setBounce:function(t,d){return this.body.bounce.set(t,d),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,d,c,h){return this.body.setCollideWorldBounds(t,d,c,h),this}};p.exports=S},78389:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(79599),c={setCollisionCategory:function(h){var r=this.body?this.body:this;return r.collisionCategory=h,this},willCollideWith:function(h){var r=this.body?this.body:this;return(r.collisionMask&h)!==0},addCollidesWith:function(h){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask|h,this},removeCollidesWith:function(h){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask&~h,this},setCollidesWith:function(h){var r=this.body?this.body:this;return r.collisionMask=d(h),this},resetCollisionCategory:function(){var h=this.body?this.body:this;return h.collisionCategory=1,h.collisionMask=2147483647,this}};p.exports=c},87118:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setDebug:function(t,d,c){return this.debugShowBody=t,this.debugShowVelocity=d,this.debugBodyColor=c,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}}};p.exports=S},52819:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setDrag:function(t,d){return this.body.drag.set(t,d),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}};p.exports=S},4074:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,d,c,h,r){return t&&this.body.reset(d,c),h&&(this.body.gameObject.active=!0),r&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,d){return t===void 0&&(t=!1),d===void 0&&(d=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),d&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};p.exports=S},40831:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setFriction:function(t,d){return this.body.friction.set(t,d),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}};p.exports=S},26775:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setGravity:function(t,d){return this.body.gravity.set(t,d),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}};p.exports=S},9437:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setImmovable:function(t){return t===void 0&&(t=!0),this.body.immovable=t,this}};p.exports=S},30621:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setMass:function(t){return this.body.mass=t,this}};p.exports=S},72441:(p,S,t)=>{var d=t(47956),c=t(96503),h=t(2044),r=t(81491),n=function(e,s,o,i,a,l){var u=d(e,s-i,o-i,2*i,2*i,a,l);if(u.length===0)return u;for(var f=new c(s,o,i),v=new c,m=[],g=0;g<u.length;g++){var x=u[g];x.isCircle?(v.setTo(x.center.x,x.center.y,x.halfWidth),h(f,v)&&m.push(x)):r(f,x)&&m.push(x)}return m};p.exports=n},47956:p=>{var S=function(t,d,c,h,r,n,e){n===void 0&&(n=!0),e===void 0&&(e=!1);var s=[],o=[],i=t.treeMinMax;if(i.minX=d,i.minY=c,i.maxX=d+h,i.maxY=c+r,e&&(o=t.staticTree.search(i)),n&&t.useTree)s=t.tree.search(i);else if(n){var a=t.bodies,l={position:{x:d,y:c},left:d,top:c,right:d+h,bottom:c+r,isCircle:!1},u=t.intersects;a.iterate(function(f){u(f,l)&&s.push(f)})}return o.concat(s)};p.exports=S},62121:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setPushable:function(t){return t===void 0&&(t=!0),this.body.pushable=t,this}};p.exports=S},29384:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setOffset:function(t,d){return this.body.setOffset(t,d),this},setSize:function(t,d,c){return this.body.setSize(t,d,c),this},setBodySize:function(t,d,c){return this.body.setSize(t,d,c),this},setCircle:function(t,d,c){return this.body.setCircle(t,d,c),this}};p.exports=S},15098:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setVelocity:function(t,d){return this.body.setVelocity(t,d),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,d){return this.body.maxVelocity.set(t,d),this}};p.exports=S},92209:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Acceleration:t(1093),Angular:t(59023),Bounce:t(62069),Collision:t(78389),Debug:t(87118),Drag:t(52819),Enable:t(4074),Friction:t(40831),Gravity:t(26775),Immovable:t(9437),Mass:t(30621),OverlapCirc:t(72441),OverlapRect:t(47956),Pushable:t(62121),Size:t(29384),Velocity:t(15098)}},37747:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14};p.exports=S},20009:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="collide"},36768:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="overlap"},60473:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pause"},89954:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="resume"},61804:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="tilecollide"},7161:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="tileoverlap"},34689:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="worldbounds"},16006:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="worldstep"},63012:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={COLLIDE:t(20009),OVERLAP:t(36768),PAUSE:t(60473),RESUME:t(89954),TILE_COLLIDE:t(61804),TILE_OVERLAP:t(7161),WORLD_BOUNDS:t(34689),WORLD_STEP:t(16006)}},27064:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(37747),c=t(79291),h={ArcadePhysics:t(86689),Body:t(37742),Collider:t(79342),Components:t(92209),Events:t(63012),Factory:t(66022),GetCollidesWith:t(79599),GetOverlapX:t(64897),GetOverlapY:t(45170),SeparateX:t(14087),SeparateY:t(89936),Group:t(60758),Image:t(71289),Sprite:t(13759),StaticBody:t(72624),StaticGroup:t(71464),Tilemap:t(55173),World:t(82248)};h=c(!1,h,d),p.exports=h},96602:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,d,t):t.layer.callbacks[t.index]?!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,d,t):!0};p.exports=S},36294:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){d<0?(t.blocked.none=!1,t.blocked.left=!0):d>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=d,t.updateCenter(),t.bounce.x===0?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x};p.exports=S},67013:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){d<0?(t.blocked.none=!1,t.blocked.up=!0):d>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=d,t.updateCenter(),t.bounce.y===0?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y};p.exports=S},40012:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(21329),c=t(53442),h=t(2483),r=function(n,e,s,o,i,a,l){var u=o.left,f=o.top,v=o.right,m=o.bottom,g=s.faceLeft||s.faceRight,x=s.faceTop||s.faceBottom;if(l||(g=!0,x=!0),!g&&!x)return!1;var y=0,T=0,C=0,E=1;if(e.deltaAbsX()>e.deltaAbsY()?C=-1:e.deltaAbsX()<e.deltaAbsY()&&(E=-1),e.deltaX()!==0&&e.deltaY()!==0&&g&&x&&(C=Math.min(Math.abs(e.position.x-v),Math.abs(e.right-u)),E=Math.min(Math.abs(e.position.y-m),Math.abs(e.bottom-f))),C<E){if(g&&(y=d(e,s,u,v,a,l),y!==0&&!h(o,e)))return!0;x&&(T=c(e,s,f,m,a,l))}else{if(x&&(T=c(e,s,f,m,a,l),T!==0&&!h(o,e)))return!0;g&&(y=d(e,s,u,v,a,l))}return y!==0||T!==0};p.exports=r},21329:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(36294),c=function(h,r,n,e,s,o){var i=0,a=r.faceLeft,l=r.faceRight,u=r.collideLeft,f=r.collideRight;return o||(a=!0,l=!0,u=!0,f=!0),h.deltaX()<0&&f&&h.checkCollision.left?l&&h.x<e&&(i=h.x-e,i<-s&&(i=0)):h.deltaX()>0&&u&&h.checkCollision.right&&a&&h.right>n&&(i=h.right-n,i>s&&(i=0)),i!==0&&(h.customSeparateX?h.overlapX=i:d(h,i)),i};p.exports=c},53442:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(67013),c=function(h,r,n,e,s,o){var i=0,a=r.faceTop,l=r.faceBottom,u=r.collideUp,f=r.collideDown;return o||(a=!0,l=!0,u=!0,f=!0),h.deltaY()<0&&f&&h.checkCollision.up?l&&h.y<e&&(i=h.y-e,i<-s&&(i=0)):h.deltaY()>0&&u&&h.checkCollision.down&&a&&h.bottom>n&&(i=h.bottom-n,i>s&&(i=0)),i!==0&&(h.customSeparateY?h.overlapY=i:d(h,i)),i};p.exports=c},2483:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return!(d.right<=t.left||d.bottom<=t.top||d.position.x>=t.right||d.position.y>=t.bottom)};p.exports=S},55173:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d={ProcessTileCallbacks:t(96602),ProcessTileSeparationX:t(36294),ProcessTileSeparationY:t(67013),SeparateTile:t(40012),TileCheckX:t(21329),TileCheckY:t(53442),TileIntersectsBody:t(2483)};p.exports=d},44563:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Arcade:t(27064),Matter:t(3875)}},68174:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(26099),h=new d({initialize:function(){this.boundsCenter=new c,this.centerDiff=new c},parseBody:function(r){if(r=r.hasOwnProperty("body")?r.body:r,!r.hasOwnProperty("bounds")||!r.hasOwnProperty("centerOfMass"))return!1;var n=this.boundsCenter,e=this.centerDiff,s=r.bounds.max.x-r.bounds.min.x,o=r.bounds.max.y-r.bounds.min.y,i=s*r.centerOfMass.x,a=o*r.centerOfMass.y;return n.set(s/2,o/2),e.set(i-n.x,a-n.y),!0},getTopLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+s.x+o.x,e+s.y+o.y)}return!1},getTopCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+o.x,e+s.y+o.y)}return!1},getTopRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n-(s.x-o.x),e+s.y+o.y)}return!1},getLeftCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+s.x+o.x,e+o.y)}return!1},getCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.centerDiff;return new c(n+s.x,e+s.y)}return!1},getRightCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n-(s.x-o.x),e+o.y)}return!1},getBottomLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+s.x+o.x,e-(s.y-o.y))}return!1},getBottomCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+o.x,e-(s.y-o.y))}return!1},getBottomRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n-(s.x-o.x),e-(s.y-o.y))}return!1}});p.exports=h},19933:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(6790);d.Body=t(22562),d.Composite=t(69351),d.World=t(4372),d.Collision=t(52284),d.Detector=t(81388),d.Pairs=t(99561),d.Pair=t(4506),d.Query=t(73296),d.Resolver=t(66272),d.Constraint=t(48140),d.Common=t(53402),d.Engine=t(48413),d.Events=t(35810),d.Sleeping=t(53614),d.Plugin=t(73832),d.Bodies=t(66280),d.Composites=t(74116),d.Axes=t(66615),d.Bounds=t(15647),d.Svg=t(74058),d.Vector=t(31725),d.Vertices=t(41598),d.World.add=d.Composite.add,d.World.remove=d.Composite.remove,d.World.addComposite=d.Composite.addComposite,d.World.addBody=d.Composite.addBody,d.World.addConstraint=d.Composite.addConstraint,d.World.clear=d.Composite.clear,p.exports=d},28137:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66280),c=t(83419),h=t(74116),r=t(48140),n=t(74058),e=t(75803),s=t(23181),o=t(34803),i=t(73834),a=t(19496),l=t(85791),u=t(98713),f=t(41598),v=new c({initialize:function(g){this.world=g,this.scene=g.scene,this.sys=g.scene.sys},rectangle:function(m,g,x,y,T){var C=d.rectangle(m,g,x,y,T);return this.world.add(C),C},trapezoid:function(m,g,x,y,T,C){var E=d.trapezoid(m,g,x,y,T,C);return this.world.add(E),E},circle:function(m,g,x,y,T){var C=d.circle(m,g,x,y,T);return this.world.add(C),C},polygon:function(m,g,x,y,T){var C=d.polygon(m,g,x,y,T);return this.world.add(C),C},fromVertices:function(m,g,x,y,T,C,E){typeof x=="string"&&(x=f.fromPath(x));var M=d.fromVertices(m,g,x,y,T,C,E);return this.world.add(M),M},fromPhysicsEditor:function(m,g,x,y,T){T===void 0&&(T=!0);var C=a.parseBody(m,g,x,y);return T&&!this.world.has(C)&&this.world.add(C),C},fromSVG:function(m,g,x,y,T,C){y===void 0&&(y=1),T===void 0&&(T={}),C===void 0&&(C=!0);for(var E=x.getElementsByTagName("path"),M=[],P=0;P<E.length;P++){var A=n.pathToVertices(E[P],30);y!==1&&f.scale(A,y,y),M.push(A)}var R=d.fromVertices(m,g,M,T);return C&&this.world.add(R),R},fromJSON:function(m,g,x,y,T){y===void 0&&(y={}),T===void 0&&(T=!0);var C=l.parseBody(m,g,x,y);return C&&T&&this.world.add(C),C},imageStack:function(m,g,x,y,T,C,E,M,P){E===void 0&&(E=0),M===void 0&&(M=0),P===void 0&&(P={});var A=this.world,R=this.sys.displayList;P.addToWorld=!1;var F=h.stack(x,y,T,C,E,M,function(w,B){var N=new s(A,w,B,m,g,P);return R.add(N),N.body});return A.add(F),F},stack:function(m,g,x,y,T,C,E){var M=h.stack(m,g,x,y,T,C,E);return this.world.add(M),M},pyramid:function(m,g,x,y,T,C,E){var M=h.pyramid(m,g,x,y,T,C,E);return this.world.add(M),M},chain:function(m,g,x,y,T,C){return h.chain(m,g,x,y,T,C)},mesh:function(m,g,x,y,T){return h.mesh(m,g,x,y,T)},newtonsCradle:function(m,g,x,y,T){var C=h.newtonsCradle(m,g,x,y,T);return this.world.add(C),C},car:function(m,g,x,y,T){var C=h.car(m,g,x,y,T);return this.world.add(C),C},softBody:function(m,g,x,y,T,C,E,M,P,A){var R=h.softBody(m,g,x,y,T,C,E,M,P,A);return this.world.add(R),R},joint:function(m,g,x,y,T){return this.constraint(m,g,x,y,T)},spring:function(m,g,x,y,T){return this.constraint(m,g,x,y,T)},constraint:function(m,g,x,y,T){y===void 0&&(y=1),T===void 0&&(T={}),T.bodyA=m.type==="body"?m:m.body,T.bodyB=g.type==="body"?g:g.body,isNaN(x)||(T.length=x),T.stiffness=y;var C=r.create(T);return this.world.add(C),C},worldConstraint:function(m,g,x,y){x===void 0&&(x=1),y===void 0&&(y={}),y.bodyB=m.type==="body"?m:m.body,isNaN(g)||(y.length=g),y.stiffness=x;var T=r.create(y);return this.world.add(T),T},mouseSpring:function(m){return this.pointerConstraint(m)},pointerConstraint:function(m){m===void 0&&(m={}),m.hasOwnProperty("render")||(m.render={visible:!1});var g=new u(this.scene,this.world,m);return this.world.add(g.constraint),g},image:function(m,g,x,y,T){var C=new s(this.world,m,g,x,y,T);return this.sys.displayList.add(C),C},tileBody:function(m,g){return new i(this.world,m,g)},sprite:function(m,g,x,y,T){var C=new o(this.world,m,g,x,y,T);return this.sys.displayList.add(C),this.sys.updateList.add(C),C},gameObject:function(m,g,x){return e(this.world,m,g,x)},destroy:function(){this.world=null,this.scene=null,this.sys=null}});p.exports=v},75803:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(31884),c=t(95540),h=t(26099);function r(e){return!!e.get&&typeof e.get=="function"||!!e.set&&typeof e.set=="function"}var n=function(e,s,o,i){o===void 0&&(o={}),i===void 0&&(i=!0);var a=s.x,l=s.y;s.body={temp:!0,position:{x:a,y:l}};var u=[d.Bounce,d.Collision,d.Force,d.Friction,d.Gravity,d.Mass,d.Sensor,d.SetBody,d.Sleep,d.Static,d.Transform,d.Velocity];if(u.forEach(function(v){for(var m in v)r(v[m])?Object.defineProperty(s,m,{get:v[m].get,set:v[m].set}):Object.defineProperty(s,m,{value:v[m]})}),s.world=e,s._tempVec2=new h(a,l),o.hasOwnProperty("type")&&o.type==="body")s.setExistingBody(o,i);else{var f=c(o,"shape",null);f||(f="rectangle"),o.addToWorld=i,s.setBody(f,o)}return s};p.exports=n},23181:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(31884),h=t(95643),r=t(95540),n=t(88571),e=t(72699),s=t(26099),o=new d({Extends:n,Mixins:[c.Bounce,c.Collision,c.Force,c.Friction,c.Gravity,c.Mass,c.Sensor,c.SetBody,c.Sleep,c.Static,c.Transform,c.Velocity,e],initialize:function(a,l,u,f,v,m){h.call(this,a.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(f,v),this.setSizeToFrame(),this.setOrigin(),this.world=a,this._tempVec2=new s(l,u);var g=r(m,"shape",null);g?this.setBody(g,m):this.setRectangle(this.width,this.height,m),this.setPosition(l,u),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=o},42045:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(60461),c=t(66615),h=t(66280),r=t(22562),n=t(68174),e=t(15647),s=t(83419),o=t(52284),i=t(53402),a=t(69351),l=t(74116),u=t(48140),f=t(81388),v=t(20339),m=t(28137),g=t(95540),x=t(35154),y=t(46975),T=t(4506),C=t(99561),E=t(37277),M=t(73296),P=t(66272),A=t(44594),R=t(74058),F=t(31725),w=t(41598),B=t(68243);i.setDecomp(t(55973));var N=new s({initialize:function(D){this.scene=D,this.systems=D.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=r,this.composite=a,this.collision=o,this.detector=f,this.pair=T,this.pairs=C,this.query=M,this.resolver=P,this.constraint=u,this.bodies=h,this.composites=l,this.axes=c,this.bounds=e,this.svg=R,this.vector=F,this.vertices=w,this.verts=w,this._tempVec2=F.create(),P._restingThresh=x(this.config,"restingThresh",4),P._restingThreshTangent=x(this.config,"restingThreshTangent",6),P._positionDampen=x(this.config,"positionDampen",.9),P._positionWarming=x(this.config,"positionWarming",.8),P._frictionNormalMultiplier=x(this.config,"frictionNormalMultiplier",5),D.sys.events.once(A.BOOT,this.boot,this),D.sys.events.on(A.START,this.start,this)},boot:function(){this.world=new B(this.scene,this.config),this.add=new m(this.world),this.bodyBounds=new n,this.systems.events.once(A.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new B(this.scene,this.config),this.add=new m(this.world));var U=this.systems.events;U.on(A.UPDATE,this.world.update,this.world),U.on(A.POST_UPDATE,this.world.postUpdate,this.world),U.once(A.SHUTDOWN,this.shutdown,this)},getConfig:function(){var U=this.systems.game.config.physics,D=this.systems.settings.physics,I=y(g(D,"matter",{}),g(U,"matter",{}));return I},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(U,D){this.world.step(U,D)},containsPoint:function(U,D,I){U=this.getMatterBodies(U);var O=F.create(D,I),L=M.point(U,O);return L.length>0},intersectPoint:function(U,D,I){I=this.getMatterBodies(I);var O=F.create(U,D),L=[],G=M.point(I,O);return G.forEach(function(z){L.indexOf(z)===-1&&L.push(z)}),L},intersectRect:function(U,D,I,O,L,G){L===void 0&&(L=!1),G=this.getMatterBodies(G);var z={min:{x:U,y:D},max:{x:U+I,y:D+O}},X=[],V=M.region(G,z,L);return V.forEach(function(Y){X.indexOf(Y)===-1&&X.push(Y)}),X},intersectRay:function(U,D,I,O,L,G){L===void 0&&(L=1),G=this.getMatterBodies(G);for(var z=[],X=M.ray(G,F.create(U,D),F.create(I,O),L),V=0;V<X.length;V++)z.push(X[V].body);return z},intersectBody:function(U,D){D=this.getMatterBodies(D);for(var I=[],O=M.collides(U,D),L=0;L<O.length;L++){var G=O[L];G.bodyA===U?I.push(G.bodyB):I.push(G.bodyA)}return I},overlap:function(U,D,I,O,L){I===void 0&&(I=null),O===void 0&&(O=null),L===void 0&&(L=I),Array.isArray(U)||(U=[U]),U=this.getMatterBodies(U),D=this.getMatterBodies(D);for(var G=!1,z=0;z<U.length;z++)for(var X=U[z],V=M.collides(X,D),Y=0;Y<V.length;Y++){var W=V[Y],H=W.bodyA.id===X.id?W.bodyB:W.bodyA;if(!O||O.call(L,X,H,W)){if(G=!0,I)I.call(L,X,H,W);else if(!O)return!0}}return G},setCollisionCategory:function(U,D){return U=this.getMatterBodies(U),U.forEach(function(I){I.collisionFilter.category=D}),this},setCollisionGroup:function(U,D){return U=this.getMatterBodies(U),U.forEach(function(I){I.collisionFilter.group=D}),this},setCollidesWith:function(U,D){U=this.getMatterBodies(U);var I=0;if(!Array.isArray(D))I=D;else for(var O=0;O<D.length;O++)I|=D[O];return U.forEach(function(L){L.collisionFilter.mask=I}),this},getMatterBodies:function(U){if(!U)return this.world.getAllBodies();Array.isArray(U)||(U=[U]);for(var D=[],I=0;I<U.length;I++){var O=U[I].hasOwnProperty("body")?U[I].body:U[I];D.push(O)}return D},setVelocity:function(U,D,I){U=this.getMatterBodies(U);var O=this._tempVec2;return O.x=D,O.y=I,U.forEach(function(L){r.setVelocity(L,O)}),this},setVelocityX:function(U,D){U=this.getMatterBodies(U);var I=this._tempVec2;return I.x=D,U.forEach(function(O){I.y=O.velocity.y,r.setVelocity(O,I)}),this},setVelocityY:function(U,D){U=this.getMatterBodies(U);var I=this._tempVec2;return I.y=D,U.forEach(function(O){I.x=O.velocity.x,r.setVelocity(O,I)}),this},setAngularVelocity:function(U,D){return U=this.getMatterBodies(U),U.forEach(function(I){r.setAngularVelocity(I,D)}),this},applyForce:function(U,D){U=this.getMatterBodies(U);var I=this._tempVec2;return U.forEach(function(O){I.x=O.position.x,I.y=O.position.y,r.applyForce(O,I,D)}),this},applyForceFromPosition:function(U,D,I,O){U=this.getMatterBodies(U);var L=this._tempVec2;return U.forEach(function(G){O===void 0&&(O=G.angle),L.x=I*Math.cos(O),L.y=I*Math.sin(O),r.applyForce(G,D,L)}),this},applyForceFromAngle:function(U,D,I){U=this.getMatterBodies(U);var O=this._tempVec2;return U.forEach(function(L){I===void 0&&(I=L.angle),O.x=D*Math.cos(I),O.y=D*Math.sin(I),r.applyForce(L,{x:L.position.x,y:L.position.y},O)}),this},getConstraintLength:function(U){var D=U.pointA.x,I=U.pointA.y,O=U.pointB.x,L=U.pointB.y;return U.bodyA&&(D+=U.bodyA.position.x,I+=U.bodyA.position.y),U.bodyB&&(O+=U.bodyB.position.x,L+=U.bodyB.position.y),v(D,I,O,L)},alignBody:function(U,D,I,O){U=U.hasOwnProperty("body")?U.body:U;var L;switch(O){case d.TOP_LEFT:case d.LEFT_TOP:L=this.bodyBounds.getTopLeft(U,D,I);break;case d.TOP_CENTER:L=this.bodyBounds.getTopCenter(U,D,I);break;case d.TOP_RIGHT:case d.RIGHT_TOP:L=this.bodyBounds.getTopRight(U,D,I);break;case d.LEFT_CENTER:L=this.bodyBounds.getLeftCenter(U,D,I);break;case d.CENTER:L=this.bodyBounds.getCenter(U,D,I);break;case d.RIGHT_CENTER:L=this.bodyBounds.getRightCenter(U,D,I);break;case d.LEFT_BOTTOM:case d.BOTTOM_LEFT:L=this.bodyBounds.getBottomLeft(U,D,I);break;case d.BOTTOM_CENTER:L=this.bodyBounds.getBottomCenter(U,D,I);break;case d.BOTTOM_RIGHT:case d.RIGHT_BOTTOM:L=this.bodyBounds.getBottomRight(U,D,I);break}return L&&r.setPosition(U,L),this},shutdown:function(){var U=this.systems.events;this.world&&(U.off(A.UPDATE,this.world.update,this.world),U.off(A.POST_UPDATE,this.world.postUpdate,this.world)),U.off(A.SHUTDOWN,this.shutdown,this),this.add&&this.add.destroy(),this.world&&this.world.destroy(),this.add=null,this.world=null},destroy:function(){this.shutdown(),this.scene.sys.events.off(A.START,this.start,this),this.scene=null,this.systems=null}});E.register("MatterPhysics",N,"matterPhysics"),p.exports=N},34803:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(9674),c=t(83419),h=t(31884),r=t(95643),n=t(95540),e=t(72699),s=t(68287),o=t(26099),i=new c({Extends:s,Mixins:[h.Bounce,h.Collision,h.Force,h.Friction,h.Gravity,h.Mass,h.Sensor,h.SetBody,h.Sleep,h.Static,h.Transform,h.Velocity,e],initialize:function(l,u,f,v,m,g){r.call(this,l.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new d(this),this.setTexture(v,m),this.setSizeToFrame(),this.setOrigin(),this.world=l,this._tempVec2=new o(u,f);var x=n(g,"shape",null);x?this.setBody(x,g):this.setRectangle(this.width,this.height,g),this.setPosition(u,f),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=i},73834:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66280),c=t(22562),h=t(83419),r=t(31884),n=t(62644),e=t(50792),s=t(95540),o=t(97022),i=t(41598),a=new h({Extends:e,Mixins:[r.Bounce,r.Collision,r.Friction,r.Gravity,r.Mass,r.Sensor,r.Sleep,r.Static],initialize:function(u,f,v){e.call(this),this.tile=f,this.world=u,f.physics.matterBody&&f.physics.matterBody.destroy(),f.physics.matterBody=this;var m=s(v,"body",null),g=s(v,"addToWorld",!0);if(m)this.setBody(m,g);else{var x=f.getCollisionGroup(),y=s(x,"objects",[]);y.length>0?this.setFromTileCollision(v):this.setFromTileRectangle(v)}if(f.flipX||f.flipY){var T={x:f.getCenterX(),y:f.getCenterY()},C=f.flipX?-1:1,E=f.flipY?-1:1;c.scale(m,C,E,T)}},setFromTileRectangle:function(l){l===void 0&&(l={}),o(l,"isStatic")||(l.isStatic=!0),o(l,"addToWorld")||(l.addToWorld=!0);var u=this.tile.getBounds(),f=u.x+u.width/2,v=u.y+u.height/2,m=d.rectangle(f,v,u.width,u.height,l);return this.setBody(m,l.addToWorld),this},setFromTileCollision:function(l){l===void 0&&(l={}),o(l,"isStatic")||(l.isStatic=!0),o(l,"addToWorld")||(l.addToWorld=!0);for(var u=this.tile.tilemapLayer.scaleX,f=this.tile.tilemapLayer.scaleY,v=this.tile.getLeft(),m=this.tile.getTop(),g=this.tile.getCollisionGroup(),x=s(g,"objects",[]),y=[],T=0;T<x.length;T++){var C=x[T],E=v+C.x*u,M=m+C.y*f,P=C.width*u,A=C.height*f,R=null;if(C.rectangle)R=d.rectangle(E+P/2,M+A/2,P,A,l);else if(C.ellipse)R=d.circle(E+P/2,M+A/2,P/2,l);else if(C.polygon||C.polyline){var F=C.polygon?C.polygon:C.polyline,w=F.map(function(D){return{x:D.x*u,y:D.y*f}}),B=i.create(w),N=i.centre(B);E+=N.x,M+=N.y,R=d.fromVertices(E,M,B,l)}R&&y.push(R)}if(y.length===1)this.setBody(y[0],l.addToWorld);else if(y.length>1){var U=n(l);U.parts=y,this.setBody(c.create(U),U.addToWorld)}return this},setBody:function(l,u){return u===void 0&&(u=!0),this.body&&this.removeBody(),this.body=l,this.body.gameObject=this,u&&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()}});p.exports=a},19496:(p,S,t)=>{/**
* @author Joachim Grill <joachim@codeandweb.com>
* @author Richard Davey <rich@phaser.io>
* @copyright 2018 CodeAndWeb GmbH
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66280),c=t(22562),h=t(53402),r=t(95540),n=t(41598),e={parseBody:function(s,o,i,a){a===void 0&&(a={});for(var l=r(i,"fixtures",[]),u=[],f=0;f<l.length;f++)for(var v=this.parseFixture(l[f]),m=0;m<v.length;m++)u.push(v[m]);var g=h.clone(i,!0);h.extend(g,a,!0),delete g.fixtures,delete g.type;var x=c.create(g);return c.setParts(x,u),c.setPosition(x,{x:s,y:o}),x},parseFixture:function(s){var o=h.extend({},!1,s);delete o.circle,delete o.vertices;var i;if(s.circle){var a=r(s.circle,"x"),l=r(s.circle,"y"),u=r(s.circle,"radius");i=[d.circle(a,l,u,o)]}else s.vertices&&(i=this.parseVertices(s.vertices,o));return i},parseVertices:function(s,o){o===void 0&&(o={});for(var i=[],a=0;a<s.length;a++)n.clockwiseSort(s[a]),i.push(c.create(h.extend({position:n.centre(s[a]),vertices:s[a]},o)));return d.flagCoincidentParts(i)}};p.exports=e},85791:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66280),c=t(22562),h={parseBody:function(r,n,e,s){s===void 0&&(s={});var o,i=e.vertices;if(i.length===1)s.vertices=i[0],o=c.create(s),d.flagCoincidentParts(o.parts);else{for(var a=[],l=0;l<i.length;l++){var u=c.create({vertices:i[l]});a.push(u)}d.flagCoincidentParts(a),s.parts=a,o=c.create(s)}return o.label=e.label,c.setPosition(o,{x:r,y:n}),o}};p.exports=h},98713:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(15647),c=t(83419),h=t(69351),r=t(48140),n=t(81388),e=t(1121),s=t(8214),o=t(46975),i=t(53614),a=t(26099),l=t(41598),u=new c({initialize:function(v,m,g){g===void 0&&(g={});var x={label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}};this.scene=v,this.world=m,this.camera=null,this.pointer=null,this.active=!0,this.position=new a,this.body=null,this.part=null,this.constraint=r.create(o(g,x)),this.world.on(e.BEFORE_UPDATE,this.update,this),v.sys.input.on(s.POINTER_DOWN,this.onDown,this),v.sys.input.on(s.POINTER_UP,this.onUp,this)},onDown:function(f){this.pointer||(this.pointer=f,this.camera=f.camera)},onUp:function(f){f===this.pointer&&(this.pointer=null)},getBody:function(f){var v=this.position,m=this.constraint;this.camera.getWorldPoint(f.x,f.y,v);for(var g=h.allBodies(this.world.localWorld),x=0;x<g.length;x++){var y=g[x];if(!y.ignorePointer&&d.contains(y.bounds,v)&&n.canCollide(y.collisionFilter,m.collisionFilter)&&this.hitTestBody(y,v))return this.world.emit(e.DRAG_START,y,this.part,this),!0}return!1},hitTestBody:function(f,v){for(var m=this.constraint,g=f.parts.length,x=g>1?1:0,y=x;y<g;y++){var T=f.parts[y];if(l.contains(T.vertices,v))return m.pointA=v,m.pointB={x:v.x-f.position.x,y:v.y-f.position.y},m.bodyB=f,m.angleB=f.angle,i.set(f,!1),this.part=T,this.body=f,!0}return!1},update:function(){var f=this.pointer,v=this.body;if(!this.active||!f){v&&this.stopDrag();return}if(!f.isDown&&v){this.stopDrag();return}else if(f.isDown){if(!this.camera||!v&&!this.getBody(f))return;v=this.body;var m=this.position,g=this.constraint;this.camera.getWorldPoint(f.x,f.y,m),g.pointA.x=m.x,g.pointA.y=m.y,i.set(v,!1),this.world.emit(e.DRAG,v,this)}},stopDrag:function(){var f=this.body,v=this.constraint;v.bodyB=null,v.pointB=null,this.pointer=null,this.body=null,this.part=null,f&&this.world.emit(e.DRAG_END,f,this)},destroy:function(){this.world.removeConstraint(this.constraint),this.pointer=null,this.constraint=null,this.body=null,this.part=null,this.world.off(e.BEFORE_UPDATE,this.update),this.scene.sys.input.off(s.POINTER_DOWN,this.onDown,this),this.scene.sys.input.off(s.POINTER_UP,this.onUp,this)}});p.exports=u},68243:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66280),c=t(22562),h=t(83419),r=t(53402),n=t(69351),e=t(48413),s=t(50792),o=t(1121),i=t(95540),a=t(35154),l=t(22562),u=t(35810),f=t(73834),v=t(4372),m=t(13037),g=t(31725),x=new h({Extends:s,initialize:function(T,C){s.call(this),this.scene=T,this.engine=e.create(C),this.localWorld=this.engine.world;var E=a(C,"gravity",null);E?this.setGravity(E.x,E.y,E.scale):E===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=a(C,"enabled",!0),this.getDelta=a(C,"getDelta",this.update60Hz);var M=i(C,"runner",{}),P=i(M,"fps",!1),A=i(M,"fps",60),R=i(M,"delta",1e3/A),F=i(M,"deltaMin",1e3/A),w=i(M,"deltaMax",1e3/(A*.5));P||(A=1e3/R),this.runner={fps:A,deltaSampleSize:i(M,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,timeBuffer:0,isFixed:i(M,"isFixed",!1),delta:R,deltaMin:F,deltaMax:w},this.autoUpdate=a(C,"autoUpdate",!0);var B=a(C,"debug",!1);if(this.drawDebug=typeof B=="object"?!0:B,this.debugGraphic,this.debugConfig={showAxes:i(B,"showAxes",!1),showAngleIndicator:i(B,"showAngleIndicator",!1),angleColor:i(B,"angleColor",15208787),showBroadphase:i(B,"showBroadphase",!1),broadphaseColor:i(B,"broadphaseColor",16757760),showBounds:i(B,"showBounds",!1),boundsColor:i(B,"boundsColor",16777215),showVelocity:i(B,"showVelocity",!1),velocityColor:i(B,"velocityColor",44783),showCollisions:i(B,"showCollisions",!1),collisionColor:i(B,"collisionColor",16094476),showSeparations:i(B,"showSeparations",!1),separationColor:i(B,"separationColor",16753920),showBody:i(B,"showBody",!0),showStaticBody:i(B,"showStaticBody",!0),showInternalEdges:i(B,"showInternalEdges",!1),renderFill:i(B,"renderFill",!1),renderLine:i(B,"renderLine",!0),fillColor:i(B,"fillColor",1075465),fillOpacity:i(B,"fillOpacity",1),lineColor:i(B,"lineColor",2678297),lineOpacity:i(B,"lineOpacity",1),lineThickness:i(B,"lineThickness",1),staticFillColor:i(B,"staticFillColor",857979),staticLineColor:i(B,"staticLineColor",1255396),showSleeping:i(B,"showSleeping",!1),staticBodySleepOpacity:i(B,"staticBodySleepOpacity",.7),sleepFillColor:i(B,"sleepFillColor",4605510),sleepLineColor:i(B,"sleepLineColor",10066585),showSensors:i(B,"showSensors",!0),sensorFillColor:i(B,"sensorFillColor",857979),sensorLineColor:i(B,"sensorLineColor",1255396),showPositions:i(B,"showPositions",!0),positionSize:i(B,"positionSize",4),positionColor:i(B,"positionColor",14697178),showJoint:i(B,"showJoint",!0),jointColor:i(B,"jointColor",14737474),jointLineOpacity:i(B,"jointLineOpacity",1),jointLineThickness:i(B,"jointLineThickness",2),pinSize:i(B,"pinSize",4),pinColor:i(B,"pinColor",4382944),springColor:i(B,"springColor",14697184),anchorColor:i(B,"anchorColor",15724527),anchorSize:i(B,"anchorSize",4),showConvexHulls:i(B,"showConvexHulls",!1),hullColor:i(B,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),i(C,"setBounds",!1)){var N=C.setBounds;if(typeof N=="boolean")this.setBounds();else{var U=i(N,"x",0),D=i(N,"y",0),I=i(N,"width",T.sys.scale.width),O=i(N,"height",T.sys.scale.height),L=i(N,"thickness",64),G=i(N,"left",!0),z=i(N,"right",!0),X=i(N,"top",!0),V=i(N,"bottom",!0);this.setBounds(U,D,I,O,L,G,z,X,V)}}},setCompositeRenderStyle:function(y){var T=y.bodies,C=y.constraints,E=y.composites,M,P,A;for(M=0;M<T.length;M++)P=T[M],A=P.render,this.setBodyRenderStyle(P,A.lineColor,A.lineOpacity,A.lineThickness,A.fillColor,A.fillOpacity);for(M=0;M<C.length;M++)P=C[M],A=P.render,this.setConstraintRenderStyle(P,A.lineColor,A.lineOpacity,A.lineThickness,A.pinSize,A.anchorColor,A.anchorSize);for(M=0;M<E.length;M++)P=E[M],this.setCompositeRenderStyle(P);return this},setBodyRenderStyle:function(y,T,C,E,M,P){var A=y.render,R=this.debugConfig;return A?(T==null&&(T=y.isStatic?R.staticLineColor:R.lineColor),C==null&&(C=R.lineOpacity),E==null&&(E=R.lineThickness),M==null&&(M=y.isStatic?R.staticFillColor:R.fillColor),P==null&&(P=R.fillOpacity),T!==!1&&(A.lineColor=T),C!==!1&&(A.lineOpacity=C),E!==!1&&(A.lineThickness=E),M!==!1&&(A.fillColor=M),P!==!1&&(A.fillOpacity=P),this):this},setConstraintRenderStyle:function(y,T,C,E,M,P,A){var R=y.render,F=this.debugConfig;if(!R)return this;if(T==null){var w=R.type;w==="line"?T=F.jointColor:w==="pin"?T=F.pinColor:w==="spring"&&(T=F.springColor)}return C==null&&(C=F.jointLineOpacity),E==null&&(E=F.jointLineThickness),M==null&&(M=F.pinSize),P==null&&(P=F.anchorColor),A==null&&(A=F.anchorSize),T!==!1&&(R.lineColor=T),C!==!1&&(R.lineOpacity=C),E!==!1&&(R.lineThickness=E),M!==!1&&(R.pinSize=M),P!==!1&&(R.anchorColor=P),A!==!1&&(R.anchorSize=A),this},setEventsProxy:function(){var y=this,T=this.engine,C=this.localWorld;this.drawDebug&&(u.on(C,"compositeModified",function(E){y.setCompositeRenderStyle(E)}),u.on(C,"beforeAdd",function(E){for(var M=[].concat(E.object),P=0;P<M.length;P++){var A=M[P],R=A.render;A.type==="body"?y.setBodyRenderStyle(A,R.lineColor,R.lineOpacity,R.lineThickness,R.fillColor,R.fillOpacity):A.type==="composite"?y.setCompositeRenderStyle(A):A.type==="constraint"&&y.setConstraintRenderStyle(A,R.lineColor,R.lineOpacity,R.lineThickness,R.pinSize,R.anchorColor,R.anchorSize)}})),u.on(C,"beforeAdd",function(E){y.emit(o.BEFORE_ADD,E)}),u.on(C,"afterAdd",function(E){y.emit(o.AFTER_ADD,E)}),u.on(C,"beforeRemove",function(E){y.emit(o.BEFORE_REMOVE,E)}),u.on(C,"afterRemove",function(E){y.emit(o.AFTER_REMOVE,E)}),u.on(T,"beforeUpdate",function(E){y.emit(o.BEFORE_UPDATE,E)}),u.on(T,"afterUpdate",function(E){y.emit(o.AFTER_UPDATE,E)}),u.on(T,"collisionStart",function(E){var M=E.pairs,P,A;M.length>0&&M.map(function(R){P=R.bodyA,A=R.bodyB,P.gameObject&&P.gameObject.emit("collide",P,A,R),A.gameObject&&A.gameObject.emit("collide",A,P,R),u.trigger(P,"onCollide",{pair:R}),u.trigger(A,"onCollide",{pair:R}),P.onCollideCallback&&P.onCollideCallback(R),A.onCollideCallback&&A.onCollideCallback(R),P.onCollideWith[A.id]&&P.onCollideWith[A.id](A,R),A.onCollideWith[P.id]&&A.onCollideWith[P.id](P,R)}),y.emit(o.COLLISION_START,E,P,A)}),u.on(T,"collisionActive",function(E){var M=E.pairs,P,A;M.length>0&&M.map(function(R){P=R.bodyA,A=R.bodyB,P.gameObject&&P.gameObject.emit("collideActive",P,A,R),A.gameObject&&A.gameObject.emit("collideActive",A,P,R),u.trigger(P,"onCollideActive",{pair:R}),u.trigger(A,"onCollideActive",{pair:R}),P.onCollideActiveCallback&&P.onCollideActiveCallback(R),A.onCollideActiveCallback&&A.onCollideActiveCallback(R)}),y.emit(o.COLLISION_ACTIVE,E,P,A)}),u.on(T,"collisionEnd",function(E){var M=E.pairs,P,A;M.length>0&&M.map(function(R){P=R.bodyA,A=R.bodyB,P.gameObject&&P.gameObject.emit("collideEnd",P,A,R),A.gameObject&&A.gameObject.emit("collideEnd",A,P,R),u.trigger(P,"onCollideEnd",{pair:R}),u.trigger(A,"onCollideEnd",{pair:R}),P.onCollideEndCallback&&P.onCollideEndCallback(R),A.onCollideEndCallback&&A.onCollideEndCallback(R)}),y.emit(o.COLLISION_END,E,P,A)})},setBounds:function(y,T,C,E,M,P,A,R,F){return y===void 0&&(y=0),T===void 0&&(T=0),C===void 0&&(C=this.scene.sys.scale.width),E===void 0&&(E=this.scene.sys.scale.height),M===void 0&&(M=64),P===void 0&&(P=!0),A===void 0&&(A=!0),R===void 0&&(R=!0),F===void 0&&(F=!0),this.updateWall(P,"left",y-M,T-M,M,E+M*2),this.updateWall(A,"right",y+C,T-M,M,E+M*2),this.updateWall(R,"top",y,T-M,C,M),this.updateWall(F,"bottom",y,T+E,C,M),this},updateWall:function(y,T,C,E,M,P){var A=this.walls[T];y?(A&&v.remove(this.localWorld,A),C+=M/2,E+=P/2,this.walls[T]=this.create(C,E,M,P,{isStatic:!0,friction:0,frictionStatic:0})):(A&&v.remove(this.localWorld,A),this.walls[T]=null)},createDebugGraphic:function(){var y=this.scene.sys.add.graphics({x:0,y:0});return y.setDepth(Number.MAX_VALUE),this.debugGraphic=y,this.drawDebug=!0,y},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(y,T,C){return y===void 0&&(y=0),T===void 0&&(T=1),C===void 0&&(C=.001),this.localWorld.gravity.x=y,this.localWorld.gravity.y=T,this.localWorld.gravity.scale=C,this},create:function(y,T,C,E,M){var P=d.rectangle(y,T,C,E,M);return v.add(this.localWorld,P),P},add:function(y){return v.add(this.localWorld,y),this},remove:function(y,T){Array.isArray(y)||(y=[y]);for(var C=0;C<y.length;C++){var E=y[C],M=E.body?E.body:E;n.remove(this.localWorld,M,T)}return this},removeConstraint:function(y,T){return n.remove(this.localWorld,y,T),this},convertTilemapLayer:function(y,T){var C=y.layer,E=y.getTilesWithin(0,0,C.width,C.height,{isColliding:!0});return this.convertTiles(E,T),this},convertTiles:function(y,T){if(y.length===0)return this;for(var C=0;C<y.length;C++)new f(this,y[C],T);return this},nextGroup:function(y){return l.nextGroup(y)},nextCategory:function(){return l.nextCategory()},pause:function(){return this.enabled=!1,this.emit(o.PAUSE),this},resume:function(){return this.enabled=!0,this.runner.timeLastTick=r.now(),this.emit(o.RESUME),this},update:function(y){if(!(!this.enabled||!this.autoUpdate)){var T=this.engine,C=this.runner,E=r.now(),M=C.delta,P=0,A=y-C.timeLastTick;if((!A||!C.timeLastTick||A>Math.max(m._maxFrameDelta,C.maxFrameTime))&&(A=C.frameDelta||m._frameDeltaFallback),C.frameDeltaSmoothing){C.frameDeltaHistory.push(A),C.frameDeltaHistory=C.frameDeltaHistory.slice(-C.frameDeltaHistorySize);var R=C.frameDeltaHistory.slice(0).sort(),F=C.frameDeltaHistory.slice(R.length*m._smoothingLowerBound,R.length*m._smoothingUpperBound),w=m._mean(F);A=w||A}C.frameDeltaSnapping&&(A=1e3/Math.round(1e3/A)),C.frameDelta=A,C.timeLastTick=y,C.timeBuffer+=C.frameDelta,C.timeBuffer=r.clamp(C.timeBuffer,0,C.frameDelta+M*m._timeBufferMargin),C.lastUpdatesDeferred=0;for(var B=C.maxUpdates||Math.ceil(C.maxFrameTime/M),N=r.now();M>0&&C.timeBuffer>=M*m._timeBufferMargin;){e.update(T,M),C.timeBuffer-=M,P+=1;var U=r.now()-E,D=r.now()-N,I=U+m._elapsedNextEstimate*D/P;if(P>=B||I>C.maxFrameTime){C.lastUpdatesDeferred=Math.round(Math.max(0,C.timeBuffer/M-m._timeBufferMargin));break}}}},step:function(y){e.update(this.engine,y)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(y){var T=y.hasOwnProperty("body")?y.body:y;return n.get(this.localWorld,T.id,T.type)!==null},getAllBodies:function(){return n.allBodies(this.localWorld)},getAllConstraints:function(){return n.allConstraints(this.localWorld)},getAllComposites:function(){return n.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var y=this.debugConfig,T=this.engine,C=this.debugGraphic,E=n.allBodies(this.localWorld);this.debugGraphic.clear(),y.showBroadphase&&T.broadphase.controller&&this.renderGrid(T.broadphase,C,y.broadphaseColor,.5),y.showBounds&&this.renderBodyBounds(E,C,y.boundsColor,.5),(y.showBody||y.showStaticBody)&&this.renderBodies(E),y.showJoint&&this.renderJoints(),(y.showAxes||y.showAngleIndicator)&&this.renderBodyAxes(E,C,y.showAxes,y.angleColor,.5),y.showVelocity&&this.renderBodyVelocity(E,C,y.velocityColor,1,2),y.showSeparations&&this.renderSeparations(T.pairs.list,C,y.separationColor),y.showCollisions&&this.renderCollisions(T.pairs.list,C,y.collisionColor)}},renderGrid:function(y,T,C,E){T.lineStyle(1,C,E);for(var M=r.keys(y.buckets),P=0;P<M.length;P++){var A=M[P];if(!(y.buckets[A].length<2)){var R=A.split(/C|R/);T.strokeRect(parseInt(R[1],10)*y.bucketWidth,parseInt(R[2],10)*y.bucketHeight,y.bucketWidth,y.bucketHeight)}}return this},renderSeparations:function(y,T,C){T.lineStyle(1,C,1);for(var E=0;E<y.length;E++){var M=y[E];if(M.isActive){var P=M.collision,A=P.bodyA,R=P.bodyB,F=A.position,w=R.position,B=P.penetration,N=!A.isStatic&&!R.isStatic?4:1;R.isStatic&&(N=0),T.lineBetween(w.x,w.y,w.x-B.x*N,w.y-B.y*N),N=!A.isStatic&&!R.isStatic?4:1,A.isStatic&&(N=0),T.lineBetween(F.x,F.y,F.x-B.x*N,F.y-B.y*N)}}return this},renderCollisions:function(y,T,C){T.lineStyle(1,C,.5),T.fillStyle(C,1);var E,M;for(E=0;E<y.length;E++)if(M=y[E],!!M.isActive)for(var P=0;P<M.contactCount;P++){var A=M.contacts[P],R=A.vertex;R&&T.fillRect(R.x-2,R.y-2,5,5)}for(E=0;E<y.length;E++)if(M=y[E],!!M.isActive){var F=M.collision,w=M.contacts;if(M.contactCount>0){var B=w[0].vertex.x,N=w[0].vertex.y;M.contactCount===2&&(B=(w[0].vertex.x+w[1].vertex.x)/2,N=(w[0].vertex.y+w[1].vertex.y)/2),F.bodyB===F.supports[0].body||F.bodyA.isStatic?T.lineBetween(B-F.normal.x*8,N-F.normal.y*8,B,N):T.lineBetween(B+F.normal.x*8,N+F.normal.y*8,B,N)}}return this},renderBodyBounds:function(y,T,C,E){T.lineStyle(1,C,E);for(var M=0;M<y.length;M++){var P=y[M];if(P.render.visible){var A=P.bounds;if(A)T.strokeRect(A.min.x,A.min.y,A.max.x-A.min.x,A.max.y-A.min.y);else for(var R=P.parts,F=R.length>1?1:0;F<R.length;F++){var w=R[F];T.strokeRect(w.bounds.min.x,w.bounds.min.y,w.bounds.max.x-w.bounds.min.x,w.bounds.max.y-w.bounds.min.y)}}}return this},renderBodyAxes:function(y,T,C,E,M){T.lineStyle(1,E,M);for(var P=0;P<y.length;P++){var A=y[P],R=A.parts;if(A.render.visible){var F,w,B;if(C)for(w=R.length>1?1:0;w<R.length;w++)for(F=R[w],B=0;B<F.axes.length;B++){var N=F.axes[B];T.lineBetween(F.position.x,F.position.y,F.position.x+N.x*20,F.position.y+N.y*20)}else for(w=R.length>1?1:0;w<R.length;w++)for(F=R[w],B=0;B<F.axes.length;B++)T.lineBetween(F.position.x,F.position.y,(F.vertices[0].x+F.vertices[F.vertices.length-1].x)/2,(F.vertices[0].y+F.vertices[F.vertices.length-1].y)/2)}}return this},renderBodyVelocity:function(y,T,C,E,M){T.lineStyle(M,C,E);for(var P=0;P<y.length;P++){var A=y[P];A.render.visible&&T.lineBetween(A.position.x,A.position.y,A.position.x+(A.position.x-A.positionPrev.x)*2,A.position.y+(A.position.y-A.positionPrev.y)*2)}return this},renderBodies:function(y){for(var T=this.debugGraphic,C=this.debugConfig,E=C.showBody,M=C.showStaticBody,P=C.showSleeping,A=C.showInternalEdges,R=C.showConvexHulls,F=C.renderFill,w=C.renderLine,B=C.staticBodySleepOpacity,N=C.sleepFillColor,U=C.sleepLineColor,D=C.hullColor,I=0;I<y.length;I++){var O=y[I];if(O.render.visible&&!(!M&&O.isStatic||!E&&!O.isStatic)){var L=O.render.lineColor,G=O.render.lineOpacity,z=O.render.lineThickness,X=O.render.fillColor,V=O.render.fillOpacity;P&&O.isSleeping&&(O.isStatic?(G*=B,V*=B):(L=U,X=N)),F||(X=null),w||(L=null),this.renderBody(O,T,A,L,G,z,X,V);var Y=O.parts.length;R&&Y>1&&this.renderConvexHull(O,T,D,z)}}},renderBody:function(y,T,C,E,M,P,A,R){E===void 0&&(E=null),M===void 0&&(M=null),P===void 0&&(P=1),A===void 0&&(A=null),R===void 0&&(R=null);for(var F=this.debugConfig,w=F.sensorFillColor,B=F.sensorLineColor,N=y.parts,U=N.length,D=U>1?1:0;D<U;D++){var I=N[D],O=I.render,L=O.opacity;if(!(!O.visible||L===0||I.isSensor&&!F.showSensors)){var G=I.circleRadius;if(T.beginPath(),I.isSensor?(A!==null&&T.fillStyle(w,R*L),E!==null&&T.lineStyle(P,B,M*L)):(A!==null&&T.fillStyle(A,R*L),E!==null&&T.lineStyle(P,E,M*L)),G)T.arc(I.position.x,I.position.y,G,0,2*Math.PI);else{var z=I.vertices,X=z.length;T.moveTo(z[0].x,z[0].y);for(var V=1;V<X;V++){var Y=z[V];if(!z[V-1].isInternal||C?T.lineTo(Y.x,Y.y):T.moveTo(Y.x,Y.y),V<X&&Y.isInternal&&!C){var W=(V+1)%X;T.moveTo(z[W].x,z[W].y)}}T.closePath()}A!==null&&T.fillPath(),E!==null&&T.strokePath()}}if(F.showPositions&&!y.isStatic){var H=y.position.x,b=y.position.y,K=Math.ceil(F.positionSize/2);T.fillStyle(F.positionColor,1),T.fillRect(H-K,b-K,F.positionSize,F.positionSize)}return this},renderConvexHull:function(y,T,C,E){E===void 0&&(E=1);var M=y.parts,P=M.length;if(P>1){var A=y.vertices;T.lineStyle(E,C),T.beginPath(),T.moveTo(A[0].x,A[0].y);for(var R=1;R<A.length;R++)T.lineTo(A[R].x,A[R].y);T.lineTo(A[0].x,A[0].y),T.strokePath()}return this},renderJoints:function(){for(var y=this.debugGraphic,T=n.allConstraints(this.localWorld),C=0;C<T.length;C++){var E=T[C].render,M=E.lineColor,P=E.lineOpacity,A=E.lineThickness,R=E.pinSize,F=E.anchorColor,w=E.anchorSize;this.renderConstraint(T[C],y,M,P,A,R,F,w)}},renderConstraint:function(y,T,C,E,M,P,A,R){var F=y.render;if(!F.visible||!y.pointA||!y.pointB)return this;T.lineStyle(M,C,E);var w=y.bodyA,B=y.bodyB,N,U;if(w?N=g.add(w.position,y.pointA):N=y.pointA,F.type==="pin")T.strokeCircle(N.x,N.y,P);else{if(B?U=g.add(B.position,y.pointB):U=y.pointB,T.beginPath(),T.moveTo(N.x,N.y),F.type==="spring")for(var D=g.sub(U,N),I=g.perp(g.normalise(D)),O=Math.ceil(r.clamp(y.length/5,12,20)),L,G=1;G<O;G+=1)L=G%2===0?1:-1,T.lineTo(N.x+D.x*(G/O)+I.x*L*4,N.y+D.y*(G/O)+I.y*L*4);T.lineTo(U.x,U.y)}return T.strokePath(),F.anchors&&R>0&&(T.fillStyle(A),T.fillCircle(N.x,N.y,R),T.fillCircle(U.x,U.y,R)),this},resetCollisionIDs:function(){return c._nextCollidingGroupId=1,c._nextNonCollidingGroupId=-1,c._nextCategory=1,this},shutdown:function(){u.off(this.engine),this.removeAllListeners(),v.clear(this.localWorld,!1),e.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});p.exports=x},70410:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setBounce:function(t){return this.body.restitution=t,this}};p.exports=S},66968:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var d=0;if(!Array.isArray(t))d=t;else for(var c=0;c<t.length;c++)d|=t[c];return this.body.collisionFilter.mask=d,this},setOnCollide:function(t){return this.body.onCollideCallback=t,this},setOnCollideEnd:function(t){return this.body.onCollideEndCallback=t,this},setOnCollideActive:function(t){return this.body.onCollideActiveCallback=t,this},setOnCollideWith:function(t,d){Array.isArray(t)||(t=[t]);for(var c=0;c<t.length;c++){var h=t[c].hasOwnProperty("body")?t[c].body:t[c];this.body.setOnCollideWith(h,d)}return this}};p.exports=S},51607:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(22562),c={applyForce:function(h){return this._tempVec2.set(this.body.position.x,this.body.position.y),d.applyForce(this.body,this._tempVec2,h),this},applyForceFrom:function(h,r){return d.applyForce(this.body,h,r),this},thrust:function(h){var r=this.body.angle;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(h){var r=this.body.angle-Math.PI/2;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(h){var r=this.body.angle+Math.PI/2;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(h){var r=this.body.angle-Math.PI;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};p.exports=c},5436:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setFriction:function(t,d,c){return this.body.friction=t,d!==void 0&&(this.body.frictionAir=d),c!==void 0&&(this.body.frictionStatic=c),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};p.exports=S},39858:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}};p.exports=S},37302:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(22562),c=t(26099),h={setMass:function(r){return d.setMass(this.body,r),this},setDensity:function(r){return d.setDensity(this.body,r),this},centerOfMass:{get:function(){return new c(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};p.exports=h},39132:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}};p.exports=S},57772:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(66280),c=t(22562),h=t(43855),r=t(95540),n=t(19496),e=t(85791),s=t(41598),o={setRectangle:function(i,a,l){return this.setBody({type:"rectangle",width:i,height:a},l)},setCircle:function(i,a){return this.setBody({type:"circle",radius:i},a)},setPolygon:function(i,a,l){return this.setBody({type:"polygon",sides:a,radius:i},l)},setTrapezoid:function(i,a,l,u){return this.setBody({type:"trapezoid",width:i,height:a,slope:l},u)},setExistingBody:function(i,a){a===void 0&&(a=!0),this.body&&this.world.remove(this.body,!0),this.body=i;for(var l=0;l<i.parts.length;l++)i.parts[l].gameObject=this;var u=this;if(i.destroy=function(){u.world.remove(u.body,!0),u.body.gameObject=null},a&&(this.world.has(i)&&this.world.remove(i,!0),this.world.add(i)),this._originComponent){var f=i.render.sprite.xOffset,v=i.render.sprite.yOffset,m=i.centerOfMass.x,g=i.centerOfMass.y;if(h(m,.5)&&h(g,.5))this.setOrigin(f+.5,v+.5);else{var x=i.centerOffset.x,y=i.centerOffset.y;this.setOrigin(f+x/this.displayWidth,v+y/this.displayHeight)}}return this},setBody:function(i,a){if(!i)return this;var l;typeof i=="string"&&(i={type:i});var u=r(i,"type","rectangle"),f=r(i,"x",this._tempVec2.x),v=r(i,"y",this._tempVec2.y),m=r(i,"width",this.width),g=r(i,"height",this.height);switch(u){case"rectangle":l=d.rectangle(f,v,m,g,a);break;case"circle":var x=r(i,"radius",Math.max(m,g)/2),y=r(i,"maxSides",25);l=d.circle(f,v,x,a,y);break;case"trapezoid":var T=r(i,"slope",.5);l=d.trapezoid(f,v,m,g,T,a);break;case"polygon":var C=r(i,"sides",5),E=r(i,"radius",Math.max(m,g)/2);l=d.polygon(f,v,C,E,a);break;case"fromVertices":case"fromVerts":var M=r(i,"verts",null);if(M)if(typeof M=="string"&&(M=s.fromPath(M)),this.body&&!this.body.hasOwnProperty("temp"))c.setVertices(this.body,M),l=this.body;else{var P=r(i,"flagInternal",!1),A=r(i,"removeCollinear",.01),R=r(i,"minimumArea",10);l=d.fromVertices(f,v,M,a,P,A,R)}break;case"fromPhysicsEditor":l=n.parseBody(f,v,i,a);break;case"fromPhysicsTracer":l=e.parseBody(f,v,i,a);break}return l&&this.setExistingBody(l,i.addToWorld),this}};p.exports=o},38083:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(1121),c=t(53614),h=t(35810),r={setToSleep:function(){return c.set(this.body,!0),this},setAwake:function(){return c.set(this.body,!1),this},setSleepThreshold:function(n){return n===void 0&&(n=60),this.body.sleepThreshold=n,this},setSleepEvents:function(n,e){return this.setSleepStartEvent(n),this.setSleepEndEvent(e),this},setSleepStartEvent:function(n){if(n){var e=this.world;h.on(this.body,"sleepStart",function(s){e.emit(d.SLEEP_START,s,this)})}else h.off(this.body,"sleepStart");return this},setSleepEndEvent:function(n){if(n){var e=this.world;h.on(this.body,"sleepEnd",function(s){e.emit(d.SLEEP_END,s,this)})}else h.off(this.body,"sleepEnd");return this}};p.exports=r},90556:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(22562),c={setStatic:function(h){return d.setStatic(this.body,h),this},isStatic:function(){return this.body.isStatic}};p.exports=c},85436:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(22562),c=t(36383),h=t(86554),r=t(30954),n=4,e={x:{get:function(){return this.body.position.x},set:function(s){this._tempVec2.set(s,this.y),d.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(s){this._tempVec2.set(this.x,s),d.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(s){var o=1/this._scaleX,i=1/this._scaleY;this._scaleX=s,this._scaleX===0?this.renderFlags&=~n:this.renderFlags|=n,d.scale(this.body,o,i),d.scale(this.body,s,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(s){var o=1/this._scaleX,i=1/this._scaleY;this._scaleY=s,this._scaleY===0?this.renderFlags&=~n:this.renderFlags|=n,d.scale(this.body,o,i),d.scale(this.body,this._scaleX,s)}},angle:{get:function(){return r(this.body.angle*c.RAD_TO_DEG)},set:function(s){this.rotation=r(s)*c.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(s){this._rotation=h(s),d.setAngle(this.body,this._rotation)}},setPosition:function(s,o){return s===void 0&&(s=0),o===void 0&&(o=s),this._tempVec2.set(s,o),d.setPosition(this.body,this._tempVec2),this},setRotation:function(s){return s===void 0&&(s=0),this._rotation=h(s),d.setAngle(this.body,s),this},setFixedRotation:function(){return d.setInertia(this.body,1/0),this},setAngle:function(s){return s===void 0&&(s=0),this.angle=s,d.setAngle(this.body,this.rotation),this},setScale:function(s,o,i){s===void 0&&(s=1),o===void 0&&(o=s);var a=1/this._scaleX,l=1/this._scaleY;return this._scaleX=s,this._scaleY=o,d.scale(this.body,a,l,i),d.scale(this.body,s,o,i),this}};p.exports=e},42081:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(22562),c={setVelocityX:function(h){return this._tempVec2.set(h,this.body.velocity.y),d.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(h){return this._tempVec2.set(this.body.velocity.x,h),d.setVelocity(this.body,this._tempVec2),this},setVelocity:function(h,r){return this._tempVec2.set(h,r),d.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return d.getVelocity(this.body)},setAngularVelocity:function(h){return d.setAngularVelocity(this.body,h),this},getAngularVelocity:function(){return d.getAngularVelocity(this.body)},setAngularSpeed:function(h){return d.setAngularSpeed(this.body,h),this},getAngularSpeed:function(){return d.getAngularSpeed(this.body)}};p.exports=c},31884:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Bounce:t(70410),Collision:t(66968),Force:t(51607),Friction:t(5436),Gravity:t(39858),Mass:t(37302),Sensor:t(39132),SetBody:t(57772),Sleep:t(38083),Static:t(90556),Transform:t(85436),Velocity:t(42081)}},85608:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="afteradd"},1213:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="afterremove"},25968:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="afterupdate"},67205:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="beforeadd"},39438:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="beforeremove"},44823:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="beforeupdate"},92593:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="collisionactive"},60128:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="collisionend"},76861:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="collisionstart"},92362:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="dragend"},76408:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="drag"},93971:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="dragstart"},5656:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pause"},47861:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="resume"},79099:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="sleepend"},35906:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="sleepstart"},1121:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={AFTER_ADD:t(85608),AFTER_REMOVE:t(1213),AFTER_UPDATE:t(25968),BEFORE_ADD:t(67205),BEFORE_REMOVE:t(39438),BEFORE_UPDATE:t(44823),COLLISION_ACTIVE:t(92593),COLLISION_END:t(60128),COLLISION_START:t(76861),DRAG_END:t(92362),DRAG:t(76408),DRAG_START:t(93971),PAUSE:t(5656),RESUME:t(47861),SLEEP_END:t(79099),SLEEP_START:t(35906)}},3875:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={BodyBounds:t(68174),Components:t(31884),Events:t(1121),Factory:t(28137),MatterGameObject:t(75803),Image:t(23181),Matter:t(19933),MatterPhysics:t(42045),PolyDecomp:t(55973),Sprite:t(34803),TileBody:t(73834),PhysicsEditorParser:t(19496),PhysicsJSONParser:t(85791),PointerConstraint:t(98713),World:t(68243)}},22562:(p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(31725),r=t(53614),n=t(53402),e=t(15647),s=t(66615);(function(){d._timeCorrection=!0,d._inertiaScale=4,d._nextCollidingGroupId=1,d._nextNonCollidingGroupId=-1,d._nextCategory=1,d._baseDelta=16.666666666666668,d.create=function(i){var a={id:n.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:i.attractors||[],wrapBounds:null,angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{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,deltaTime:16.666666666666668,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:{}};!i.hasOwnProperty("position")&&i.hasOwnProperty("vertices")?i.position=c.centre(i.vertices):i.hasOwnProperty("vertices")||(a.vertices=c.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var l=n.extend(a,i);return o(l,i),l.setOnCollideWith=function(u,f){return f?this.onCollideWith[u.id]=f:delete this.onCollideWith[u.id],this},l},d.nextGroup=function(i){return i?d._nextNonCollidingGroupId--:d._nextCollidingGroupId++},d.nextCategory=function(){return d._nextCategory=d._nextCategory<<1,d._nextCategory};var o=function(i,a){if(a=a||{},d.set(i,{bounds:i.bounds||e.create(i.vertices),positionPrev:i.positionPrev||h.clone(i.position),anglePrev:i.anglePrev||i.angle,vertices:i.vertices,parts:i.parts||[i],isStatic:i.isStatic,isSleeping:i.isSleeping,parent:i.parent||i}),c.rotate(i.vertices,i.angle,i.position),s.rotate(i.axes,i.angle),e.update(i.bounds,i.vertices,i.velocity),d.set(i,{axes:a.axes||i.axes,area:a.area||i.area,mass:a.mass||i.mass,inertia:a.inertia||i.inertia}),i.parts.length===1){var l=i.bounds,u=i.centerOfMass,f=i.centerOffset,v=l.max.x-l.min.x,m=l.max.y-l.min.y;u.x=-(l.min.x-i.position.x)/v,u.y=-(l.min.y-i.position.y)/m,f.x=v*u.x,f.y=m*u.y}};d.set=function(i,a,l){var u;typeof a=="string"&&(u=a,a={},a[u]=l);for(u in a)if(Object.prototype.hasOwnProperty.call(a,u))switch(l=a[u],u){case"isStatic":d.setStatic(i,l);break;case"isSleeping":r.set(i,l);break;case"mass":d.setMass(i,l);break;case"density":d.setDensity(i,l);break;case"inertia":d.setInertia(i,l);break;case"vertices":d.setVertices(i,l);break;case"position":d.setPosition(i,l);break;case"angle":d.setAngle(i,l);break;case"velocity":d.setVelocity(i,l);break;case"angularVelocity":d.setAngularVelocity(i,l);break;case"speed":d.setSpeed(i,l);break;case"angularSpeed":d.setAngularSpeed(i,l);break;case"parts":d.setParts(i,l);break;case"centre":d.setCentre(i,l);break;default:i[u]=l}},d.setStatic=function(i,a){for(var l=0;l<i.parts.length;l++){var u=i.parts[l];a?(u.isStatic||(u._original={restitution:u.restitution,friction:u.friction,mass:u.mass,inertia:u.inertia,density:u.density,inverseMass:u.inverseMass,inverseInertia:u.inverseInertia}),u.restitution=0,u.friction=1,u.mass=u.inertia=u.density=1/0,u.inverseMass=u.inverseInertia=0,u.positionPrev.x=u.position.x,u.positionPrev.y=u.position.y,u.anglePrev=u.angle,u.angularVelocity=0,u.speed=0,u.angularSpeed=0,u.motion=0):u._original&&(u.restitution=u._original.restitution,u.friction=u._original.friction,u.mass=u._original.mass,u.inertia=u._original.inertia,u.density=u._original.density,u.inverseMass=u._original.inverseMass,u.inverseInertia=u._original.inverseInertia,u._original=null),u.isStatic=a}},d.setMass=function(i,a){var l=i.inertia/(i.mass/6);i.inertia=l*(a/6),i.inverseInertia=1/i.inertia,i.mass=a,i.inverseMass=1/i.mass,i.density=i.mass/i.area},d.setDensity=function(i,a){d.setMass(i,a*i.area),i.density=a},d.setInertia=function(i,a){i.inertia=a,i.inverseInertia=1/i.inertia},d.setVertices=function(i,a){a[0].body===i?i.vertices=a:i.vertices=c.create(a,i),i.axes=s.fromVertices(i.vertices),i.area=c.area(i.vertices),d.setMass(i,i.density*i.area);var l=c.centre(i.vertices);c.translate(i.vertices,l,-1),d.setInertia(i,d._inertiaScale*c.inertia(i.vertices,i.mass)),c.translate(i.vertices,i.position),e.update(i.bounds,i.vertices,i.velocity)},d.setParts=function(i,a,l){var u;for(a=a.slice(0),i.parts.length=0,i.parts.push(i),i.parent=i,u=0;u<a.length;u++){var f=a[u];f!==i&&(f.parent=i,i.parts.push(f))}if(i.parts.length!==1){if(l=typeof l<"u"?l:!0,l){var v=[];for(u=0;u<a.length;u++)v=v.concat(a[u].vertices);c.clockwiseSort(v);var m=c.hull(v),g=c.centre(m);d.setVertices(i,m),c.translate(i.vertices,g)}var x=d._totalProperties(i),y=x.centre.x,T=x.centre.y,C=i.bounds,E=i.centerOfMass,M=i.centerOffset;e.update(C,i.vertices,i.velocity),E.x=-(C.min.x-y)/(C.max.x-C.min.x),E.y=-(C.min.y-T)/(C.max.y-C.min.y),M.x=y,M.y=T,i.area=x.area,i.parent=i,i.position.x=y,i.position.y=T,i.positionPrev.x=y,i.positionPrev.y=T,d.setMass(i,x.mass),d.setInertia(i,x.inertia),d.setPosition(i,x.centre)}},d.setCentre=function(i,a,l){l?(i.positionPrev.x+=a.x,i.positionPrev.y+=a.y,i.position.x+=a.x,i.position.y+=a.y):(i.positionPrev.x=a.x-(i.position.x-i.positionPrev.x),i.positionPrev.y=a.y-(i.position.y-i.positionPrev.y),i.position.x=a.x,i.position.y=a.y)},d.setPosition=function(i,a,l){var u=h.sub(a,i.position);l?(i.positionPrev.x=i.position.x,i.positionPrev.y=i.position.y,i.velocity.x=u.x,i.velocity.y=u.y,i.speed=h.magnitude(u)):(i.positionPrev.x+=u.x,i.positionPrev.y+=u.y);for(var f=0;f<i.parts.length;f++){var v=i.parts[f];v.position.x+=u.x,v.position.y+=u.y,c.translate(v.vertices,u),e.update(v.bounds,v.vertices,i.velocity)}},d.setAngle=function(i,a,l){var u=a-i.angle;l?(i.anglePrev=i.angle,i.angularVelocity=u,i.angularSpeed=Math.abs(u)):i.anglePrev+=u;for(var f=0;f<i.parts.length;f++){var v=i.parts[f];v.angle+=u,c.rotate(v.vertices,u,i.position),s.rotate(v.axes,u),e.update(v.bounds,v.vertices,i.velocity),f>0&&h.rotateAbout(v.position,u,i.position,v.position)}},d.setVelocity=function(i,a){var l=i.deltaTime/d._baseDelta;i.positionPrev.x=i.position.x-a.x*l,i.positionPrev.y=i.position.y-a.y*l,i.velocity.x=(i.position.x-i.positionPrev.x)/l,i.velocity.y=(i.position.y-i.positionPrev.y)/l,i.speed=h.magnitude(i.velocity)},d.getVelocity=function(i){var a=d._baseDelta/i.deltaTime;return{x:(i.position.x-i.positionPrev.x)*a,y:(i.position.y-i.positionPrev.y)*a}},d.getSpeed=function(i){return h.magnitude(d.getVelocity(i))},d.setSpeed=function(i,a){d.setVelocity(i,h.mult(h.normalise(d.getVelocity(i)),a))},d.setAngularVelocity=function(i,a){var l=i.deltaTime/d._baseDelta;i.anglePrev=i.angle-a*l,i.angularVelocity=(i.angle-i.anglePrev)/l,i.angularSpeed=Math.abs(i.angularVelocity)},d.getAngularVelocity=function(i){return(i.angle-i.anglePrev)*d._baseDelta/i.deltaTime},d.getAngularSpeed=function(i){return Math.abs(d.getAngularVelocity(i))},d.setAngularSpeed=function(i,a){d.setAngularVelocity(i,n.sign(d.getAngularVelocity(i))*a)},d.translate=function(i,a,l){d.setPosition(i,h.add(i.position,a),l)},d.rotate=function(i,a,l,u){if(!l)d.setAngle(i,i.angle+a,u);else{var f=Math.cos(a),v=Math.sin(a),m=i.position.x-l.x,g=i.position.y-l.y;d.setPosition(i,{x:l.x+(m*f-g*v),y:l.y+(m*v+g*f)},u),d.setAngle(i,i.angle+a,u)}},d.scale=function(i,a,l,u){var f=0,v=0;u=u||i.position;for(var m=i.inertia===1/0,g=0;g<i.parts.length;g++){var x=i.parts[g];x.scale.x=a,x.scale.y=l,c.scale(x.vertices,a,l,u),x.axes=s.fromVertices(x.vertices),x.area=c.area(x.vertices),d.setMass(x,i.density*x.area),c.translate(x.vertices,{x:-x.position.x,y:-x.position.y}),d.setInertia(x,d._inertiaScale*c.inertia(x.vertices,x.mass)),c.translate(x.vertices,{x:x.position.x,y:x.position.y}),g>0&&(f+=x.area,v+=x.inertia),x.position.x=u.x+(x.position.x-u.x)*a,x.position.y=u.y+(x.position.y-u.y)*l,e.update(x.bounds,x.vertices,i.velocity)}i.parts.length>1&&(i.area=f,i.isStatic||(d.setMass(i,i.density*f),d.setInertia(i,v))),i.circleRadius&&(a===l?i.circleRadius*=a:i.circleRadius=null),m&&d.setInertia(i,1/0)},d.update=function(i,a){a=(typeof a<"u"?a:16.666666666666668)*i.timeScale;var l=a*a,u=d._timeCorrection?a/(i.deltaTime||a):1,f=1-i.frictionAir*(a/n._baseDelta),v=(i.position.x-i.positionPrev.x)*u,m=(i.position.y-i.positionPrev.y)*u;i.velocity.x=v*f+i.force.x/i.mass*l,i.velocity.y=m*f+i.force.y/i.mass*l,i.positionPrev.x=i.position.x,i.positionPrev.y=i.position.y,i.position.x+=i.velocity.x,i.position.y+=i.velocity.y,i.deltaTime=a,i.angularVelocity=(i.angle-i.anglePrev)*f*u+i.torque/i.inertia*l,i.anglePrev=i.angle,i.angle+=i.angularVelocity,i.speed=h.magnitude(i.velocity),i.angularSpeed=Math.abs(i.angularVelocity);for(var g=0;g<i.parts.length;g++){var x=i.parts[g];c.translate(x.vertices,i.velocity),g>0&&(x.position.x+=i.velocity.x,x.position.y+=i.velocity.y),i.angularVelocity!==0&&(c.rotate(x.vertices,i.angularVelocity,i.position),s.rotate(x.axes,i.angularVelocity),g>0&&h.rotateAbout(x.position,i.angularVelocity,i.position,x.position)),e.update(x.bounds,x.vertices,i.velocity)}},d.updateVelocities=function(i){var a=d._baseDelta/i.deltaTime,l=i.velocity;l.x=(i.position.x-i.positionPrev.x)*a,l.y=(i.position.y-i.positionPrev.y)*a,i.speed=Math.sqrt(l.x*l.x+l.y*l.y),i.angularVelocity=(i.angle-i.anglePrev)*a,i.angularSpeed=Math.abs(i.angularVelocity)},d.applyForce=function(i,a,l){var u={x:a.x-i.position.x,y:a.y-i.position.y};i.force.x+=l.x,i.force.y+=l.y,i.torque+=u.x*l.y-u.y*l.x},d._totalProperties=function(i){for(var a={mass:0,area:0,inertia:0,centre:{x:0,y:0}},l=i.parts.length===1?0:1;l<i.parts.length;l++){var u=i.parts[l],f=u.mass!==1/0?u.mass:1;a.mass+=f,a.area+=u.area,a.inertia+=u.inertia,a.centre=h.add(a.centre,h.mult(u.position,f))}return a.centre=h.div(a.centre,a.mass),a},d.wrap=function(i,a){var l=e.wrap(i.bounds,a);return l&&d.translate(i,l),l}})()},69351:(p,S,t)=>{var d={};p.exports=d;var c=t(35810),h=t(53402),r=t(15647),n=t(22562);(function(){d.create=function(e){return h.extend({id:h.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},d.setModified=function(e,s,o,i){if(c.trigger(e,"compositeModified",e),e.isModified=s,s&&e.cache&&(e.cache.allBodies=null,e.cache.allConstraints=null,e.cache.allComposites=null),o&&e.parent&&d.setModified(e.parent,s,o,i),i)for(var a=0;a<e.composites.length;a++){var l=e.composites[a];d.setModified(l,s,o,i)}},d.add=function(e,s){var o=[].concat(s);c.trigger(e,"beforeAdd",{object:s});for(var i=0;i<o.length;i++){var a=o[i];switch(a.type){case"body":if(a.parent!==a){h.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)");break}d.addBody(e,a);break;case"constraint":d.addConstraint(e,a);break;case"composite":d.addComposite(e,a);break;case"mouseConstraint":d.addConstraint(e,a.constraint);break}}return c.trigger(e,"afterAdd",{object:s}),e},d.remove=function(e,s,o){var i=[].concat(s);c.trigger(e,"beforeRemove",{object:s});for(var a=0;a<i.length;a++){var l=i[a];switch(l.type){case"body":d.removeBody(e,l,o);break;case"constraint":d.removeConstraint(e,l,o);break;case"composite":d.removeComposite(e,l,o);break;case"mouseConstraint":d.removeConstraint(e,l.constraint);break}}return c.trigger(e,"afterRemove",{object:s}),e},d.addComposite=function(e,s){return e.composites.push(s),s.parent=e,d.setModified(e,!0,!0,!1),e},d.removeComposite=function(e,s,o){var i=h.indexOf(e.composites,s);if(i!==-1){var a=d.allBodies(s);d.removeCompositeAt(e,i);for(var l=0;l<a.length;l++)a[l].sleepCounter=0}if(o)for(var l=0;l<e.composites.length;l++)d.removeComposite(e.composites[l],s,!0);return e},d.removeCompositeAt=function(e,s){return e.composites.splice(s,1),d.setModified(e,!0,!0,!1),e},d.addBody=function(e,s){return e.bodies.push(s),d.setModified(e,!0,!0,!1),e},d.removeBody=function(e,s,o){var i=h.indexOf(e.bodies,s);if(i!==-1&&(d.removeBodyAt(e,i),s.sleepCounter=0),o)for(var a=0;a<e.composites.length;a++)d.removeBody(e.composites[a],s,!0);return e},d.removeBodyAt=function(e,s){return e.bodies.splice(s,1),d.setModified(e,!0,!0,!1),e},d.addConstraint=function(e,s){return e.constraints.push(s),d.setModified(e,!0,!0,!1),e},d.removeConstraint=function(e,s,o){var i=h.indexOf(e.constraints,s);if(i!==-1&&d.removeConstraintAt(e,i),o)for(var a=0;a<e.composites.length;a++)d.removeConstraint(e.composites[a],s,!0);return e},d.removeConstraintAt=function(e,s){return e.constraints.splice(s,1),d.setModified(e,!0,!0,!1),e},d.clear=function(e,s,o){if(o)for(var i=0;i<e.composites.length;i++)d.clear(e.composites[i],s,!0);return s?e.bodies=e.bodies.filter(function(a){return a.isStatic}):e.bodies.length=0,e.constraints.length=0,e.composites.length=0,d.setModified(e,!0,!0,!1),e},d.allBodies=function(e){if(e.cache&&e.cache.allBodies)return e.cache.allBodies;for(var s=[].concat(e.bodies),o=0;o<e.composites.length;o++)s=s.concat(d.allBodies(e.composites[o]));return e.cache&&(e.cache.allBodies=s),s},d.allConstraints=function(e){if(e.cache&&e.cache.allConstraints)return e.cache.allConstraints;for(var s=[].concat(e.constraints),o=0;o<e.composites.length;o++)s=s.concat(d.allConstraints(e.composites[o]));return e.cache&&(e.cache.allConstraints=s),s},d.allComposites=function(e){if(e.cache&&e.cache.allComposites)return e.cache.allComposites;for(var s=[].concat(e.composites),o=0;o<e.composites.length;o++)s=s.concat(d.allComposites(e.composites[o]));return e.cache&&(e.cache.allComposites=s),s},d.get=function(e,s,o){var i,a;switch(o){case"body":i=d.allBodies(e);break;case"constraint":i=d.allConstraints(e);break;case"composite":i=d.allComposites(e).concat(e);break}return i?(a=i.filter(function(l){return l.id.toString()===s.toString()}),a.length===0?null:a[0]):null},d.move=function(e,s,o){return d.remove(e,s),d.add(o,s),e},d.rebase=function(e){for(var s=d.allBodies(e).concat(d.allConstraints(e)).concat(d.allComposites(e)),o=0;o<s.length;o++)s[o].id=h.nextId();return e},d.translate=function(e,s,o){for(var i=o?d.allBodies(e):e.bodies,a=0;a<i.length;a++)n.translate(i[a],s);return e},d.rotate=function(e,s,o,i){for(var a=Math.cos(s),l=Math.sin(s),u=i?d.allBodies(e):e.bodies,f=0;f<u.length;f++){var v=u[f],m=v.position.x-o.x,g=v.position.y-o.y;n.setPosition(v,{x:o.x+(m*a-g*l),y:o.y+(m*l+g*a)}),n.rotate(v,s)}return e},d.scale=function(e,s,o,i,a){for(var l=a?d.allBodies(e):e.bodies,u=0;u<l.length;u++){var f=l[u],v=f.position.x-i.x,m=f.position.y-i.y;n.setPosition(f,{x:i.x+v*s,y:i.y+m*o}),n.scale(f,s,o)}return e},d.bounds=function(e){for(var s=d.allBodies(e),o=[],i=0;i<s.length;i+=1){var a=s[i];o.push(a.bounds.min,a.bounds.max)}return r.create(o)},d.wrap=function(e,s){var o=r.wrap(d.bounds(e),s);return o&&d.translate(e,o),o}})()},4372:(p,S,t)=>{var d={};p.exports=d;var c=t(69351);(function(){d.create=c.create,d.add=c.add,d.remove=c.remove,d.clear=c.clear,d.addComposite=c.addComposite,d.addBody=c.addBody,d.addConstraint=c.addConstraint})()},52284:(p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(4506);(function(){var r=[],n={overlap:0,axis:null},e={overlap:0,axis:null};d.create=function(s,o){return{pair:null,collided:!1,bodyA:s,bodyB:o,parentA:s.parent,parentB:o.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},d.collides=function(s,o,i){if(d._overlapAxes(n,s.vertices,o.vertices,s.axes),n.overlap<=0||(d._overlapAxes(e,o.vertices,s.vertices,o.axes),e.overlap<=0))return null;var a=i&&i.table[h.id(s,o)],l;a?l=a.collision:(l=d.create(s,o),l.collided=!0,l.bodyA=s.id<o.id?s:o,l.bodyB=s.id<o.id?o:s,l.parentA=l.bodyA.parent,l.parentB=l.bodyB.parent),s=l.bodyA,o=l.bodyB;var u;n.overlap<e.overlap?u=n:u=e;var f=l.normal,v=l.tangent,m=l.penetration,g=l.supports,x=u.overlap,y=u.axis,T=y.x,C=y.y,E=o.position.x-s.position.x,M=o.position.y-s.position.y;T*E+C*M>=0&&(T=-T,C=-C),f.x=T,f.y=C,v.x=-C,v.y=T,m.x=T*x,m.y=C*x,l.depth=x;var P=d._findSupports(s,o,f,1),A=0;if(c.contains(s.vertices,P[0])&&(g[A++]=P[0]),c.contains(s.vertices,P[1])&&(g[A++]=P[1]),A<2){var R=d._findSupports(o,s,f,-1);c.contains(o.vertices,R[0])&&(g[A++]=R[0]),A<2&&c.contains(o.vertices,R[1])&&(g[A++]=R[1])}return A===0&&(g[A++]=P[0]),l.supportCount=A,l},d._overlapAxes=function(s,o,i,a){var l=o.length,u=i.length,f=o[0].x,v=o[0].y,m=i[0].x,g=i[0].y,x=a.length,y=Number.MAX_VALUE,T=0,C,E,M,P,A,R;for(A=0;A<x;A++){var F=a[A],w=F.x,B=F.y,N=f*w+v*B,U=m*w+g*B,D=N,I=U;for(R=1;R<l;R+=1)P=o[R].x*w+o[R].y*B,P>D?D=P:P<N&&(N=P);for(R=1;R<u;R+=1)P=i[R].x*w+i[R].y*B,P>I?I=P:P<U&&(U=P);if(E=D-U,M=I-N,C=E<M?E:M,C<y&&(y=C,T=A,C<=0))break}s.axis=a[T],s.overlap=y},d._findSupports=function(s,o,i,a){var l=o.vertices,u=l.length,f=s.position.x,v=s.position.y,m=i.x*a,g=i.y*a,x=l[0],y=x,T=m*(f-y.x)+g*(v-y.y),C,E,M;for(M=1;M<u;M+=1)y=l[M],E=m*(f-y.x)+g*(v-y.y),E<T&&(T=E,x=y);return C=l[(u+x.index-1)%u],T=m*(f-C.x)+g*(v-C.y),y=l[(x.index+1)%u],m*(f-y.x)+g*(v-y.y)<T?(r[0]=x,r[1]=y,r):(r[0]=x,r[1]=C,r)}})()},43424:p=>{var S={};p.exports=S,function(){S.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}}()},81388:(p,S,t)=>{var d={};p.exports=d;var c=t(53402),h=t(52284);(function(){d.create=function(r){var n={bodies:[],collisions:[],pairs:null};return c.extend(n,r)},d.setBodies=function(r,n){r.bodies=n.slice(0)},d.clear=function(r){r.bodies=[],r.collisions=[]},d.collisions=function(r){var n=r.pairs,e=r.bodies,s=e.length,o=d.canCollide,i=h.collides,a=r.collisions,l=0,u,f;for(e.sort(d._compareBoundsX),u=0;u<s;u++){var v=e[u],m=v.bounds,g=v.bounds.max.x,x=v.bounds.max.y,y=v.bounds.min.y,T=v.isStatic||v.isSleeping,C=v.parts.length,E=C===1;for(f=u+1;f<s;f++){var M=e[f],P=M.bounds;if(P.min.x>g)break;if(!(x<P.min.y||y>P.max.y)&&!(T&&(M.isStatic||M.isSleeping))&&o(v.collisionFilter,M.collisionFilter)){var A=M.parts.length;if(E&&A===1){var R=i(v,M,n);R&&(a[l++]=R)}else for(var F=C>1?1:0,w=A>1?1:0,B=F;B<C;B++)for(var N=v.parts[B],m=N.bounds,U=w;U<A;U++){var D=M.parts[U],P=D.bounds;if(!(m.min.x>P.max.x||m.max.x<P.min.x||m.max.y<P.min.y||m.min.y>P.max.y)){var R=i(N,D,n);R&&(a[l++]=R)}}}}}return a.length!==l&&(a.length=l),a},d.canCollide=function(r,n){return r.group===n.group&&r.group!==0?r.group>0:(r.mask&n.category)!==0&&(n.mask&r.category)!==0},d._compareBoundsX=function(r,n){return r.bounds.min.x-n.bounds.min.x}})()},4506:(p,S,t)=>{var d={};p.exports=d;var c=t(43424);(function(){d.create=function(h,r){var n=h.bodyA,e=h.bodyB,s={id:d.id(n,e),bodyA:n,bodyB:e,collision:h,contacts:[c.create(),c.create()],contactCount:0,separation:0,isActive:!0,isSensor:n.isSensor||e.isSensor,timeCreated:r,timeUpdated:r,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return d.update(s,h,r),s},d.update=function(h,r,n){var e=r.supports,s=r.supportCount,o=h.contacts,i=r.parentA,a=r.parentB;h.isActive=!0,h.timeUpdated=n,h.collision=r,h.separation=r.depth,h.inverseMass=i.inverseMass+a.inverseMass,h.friction=i.friction<a.friction?i.friction:a.friction,h.frictionStatic=i.frictionStatic>a.frictionStatic?i.frictionStatic:a.frictionStatic,h.restitution=i.restitution>a.restitution?i.restitution:a.restitution,h.slop=i.slop>a.slop?i.slop:a.slop,h.contactCount=s,r.pair=h;var l=e[0],u=o[0],f=e[1],v=o[1];(v.vertex===l||u.vertex===f)&&(o[1]=u,o[0]=u=v,v=o[1]),u.vertex=l,v.vertex=f},d.setActive=function(h,r,n){r?(h.isActive=!0,h.timeUpdated=n):(h.isActive=!1,h.contactCount=0)},d.id=function(h,r){return h.id<r.id?h.id.toString(36)+":"+r.id.toString(36):r.id.toString(36)+":"+h.id.toString(36)}})()},99561:(p,S,t)=>{var d={};p.exports=d;var c=t(4506),h=t(53402);(function(){d.create=function(r){return h.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},r)},d.update=function(r,n,e){var s=c.update,o=c.create,i=c.setActive,a=r.table,l=r.list,u=l.length,f=u,v=r.collisionStart,m=r.collisionEnd,g=r.collisionActive,x=n.length,y=0,T=0,C=0,E,M,P;for(P=0;P<x;P++)E=n[P],M=E.pair,M?(M.isActive&&(g[C++]=M),s(M,E,e)):(M=o(E,e),a[M.id]=M,v[y++]=M,l[f++]=M);for(f=0,u=l.length,P=0;P<u;P++)M=l[P],M.timeUpdated>=e?l[f++]=M:(i(M,!1,e),M.collision.bodyA.sleepCounter>0&&M.collision.bodyB.sleepCounter>0?l[f++]=M:(m[T++]=M,delete a[M.id]));l.length!==f&&(l.length=f),v.length!==y&&(v.length=y),m.length!==T&&(m.length=T),g.length!==C&&(g.length=C)},d.clear=function(r){return r.table={},r.list.length=0,r.collisionStart.length=0,r.collisionActive.length=0,r.collisionEnd.length=0,r}})()},73296:(p,S,t)=>{var d={};p.exports=d;var c=t(31725),h=t(52284),r=t(15647),n=t(66280),e=t(41598);(function(){d.collides=function(s,o){for(var i=[],a=o.length,l=s.bounds,u=h.collides,f=r.overlaps,v=0;v<a;v++){var m=o[v],g=m.parts.length,x=g===1?0:1;if(s!==m&&f(m.bounds,l))for(var y=x;y<g;y++){var T=m.parts[y];if(f(T.bounds,l)){var C=u(T,s);if(C){i.push(C);break}}}}return i},d.ray=function(s,o,i,a){a=a||1e-100;for(var l=c.angle(o,i),u=c.magnitude(c.sub(o,i)),f=(i.x+o.x)*.5,v=(i.y+o.y)*.5,m=n.rectangle(f,v,u,a,{angle:l}),g=d.collides(m,s),x=0;x<g.length;x+=1){var y=g[x];y.body=y.bodyB=y.bodyA}return g},d.region=function(s,o,i){for(var a=[],l=0;l<s.length;l++){var u=s[l],f=r.overlaps(u.bounds,o);(f&&!i||!f&&i)&&a.push(u)}return a},d.point=function(s,o){for(var i=[],a=0;a<s.length;a++){var l=s[a];if(r.contains(l.bounds,o))for(var u=l.parts.length===1?0:1;u<l.parts.length;u++){var f=l.parts[u];if(r.contains(f.bounds,o)&&e.contains(f.vertices,o)){i.push(l);break}}}return i}})()},66272:(p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(53402),r=t(15647);(function(){d._restingThresh=2,d._restingThreshTangent=Math.sqrt(6),d._positionDampen=.9,d._positionWarming=.8,d._frictionNormalMultiplier=5,d._frictionMaxStatic=Number.MAX_VALUE,d.preSolvePosition=function(n){var e,s,o,i=n.length;for(e=0;e<i;e++)s=n[e],s.isActive&&(o=s.contactCount,s.collision.parentA.totalContacts+=o,s.collision.parentB.totalContacts+=o)},d.solvePosition=function(n,e,s){var o,i,a,l,u,f,v,m,g=d._positionDampen*(s||1),x=h.clamp(e/h._baseDelta,0,1),y=n.length;for(o=0;o<y;o++)i=n[o],!(!i.isActive||i.isSensor)&&(a=i.collision,l=a.parentA,u=a.parentB,f=a.normal,i.separation=a.depth+f.x*(u.positionImpulse.x-l.positionImpulse.x)+f.y*(u.positionImpulse.y-l.positionImpulse.y));for(o=0;o<y;o++)i=n[o],!(!i.isActive||i.isSensor)&&(a=i.collision,l=a.parentA,u=a.parentB,f=a.normal,m=i.separation-i.slop*x,(l.isStatic||u.isStatic)&&(m*=2),l.isStatic||l.isSleeping||(v=g/l.totalContacts,l.positionImpulse.x+=f.x*m*v,l.positionImpulse.y+=f.y*m*v),u.isStatic||u.isSleeping||(v=g/u.totalContacts,u.positionImpulse.x-=f.x*m*v,u.positionImpulse.y-=f.y*m*v))},d.postSolvePosition=function(n){for(var e=d._positionWarming,s=n.length,o=c.translate,i=r.update,a=0;a<s;a++){var l=n[a],u=l.positionImpulse,f=u.x,v=u.y,m=l.velocity;if(l.totalContacts=0,f!==0||v!==0){for(var g=0;g<l.parts.length;g++){var x=l.parts[g];o(x.vertices,u),i(x.bounds,x.vertices,m),x.position.x+=f,x.position.y+=v}l.positionPrev.x+=f,l.positionPrev.y+=v,f*m.x+v*m.y<0?(u.x=0,u.y=0):(u.x*=e,u.y*=e)}}},d.preSolveVelocity=function(n){var e=n.length,s,o;for(s=0;s<e;s++){var i=n[s];if(!(!i.isActive||i.isSensor)){var a=i.contacts,l=i.contactCount,u=i.collision,f=u.parentA,v=u.parentB,m=u.normal,g=u.tangent;for(o=0;o<l;o++){var x=a[o],y=x.vertex,T=x.normalImpulse,C=x.tangentImpulse;if(T!==0||C!==0){var E=m.x*T+g.x*C,M=m.y*T+g.y*C;f.isStatic||f.isSleeping||(f.positionPrev.x+=E*f.inverseMass,f.positionPrev.y+=M*f.inverseMass,f.anglePrev+=f.inverseInertia*((y.x-f.position.x)*M-(y.y-f.position.y)*E)),v.isStatic||v.isSleeping||(v.positionPrev.x-=E*v.inverseMass,v.positionPrev.y-=M*v.inverseMass,v.anglePrev-=v.inverseInertia*((y.x-v.position.x)*M-(y.y-v.position.y)*E))}}}}},d.solveVelocity=function(n,e){var s=e/h._baseDelta,o=s*s,i=o*s,a=-d._restingThresh*s,l=d._restingThreshTangent,u=d._frictionNormalMultiplier*s,f=d._frictionMaxStatic,v=n.length,m,g,x,y;for(x=0;x<v;x++){var T=n[x];if(!(!T.isActive||T.isSensor)){var C=T.collision,E=C.parentA,M=C.parentB,P=C.normal.x,A=C.normal.y,R=C.tangent.x,F=C.tangent.y,w=T.inverseMass,B=T.friction*T.frictionStatic*u,N=T.contacts,U=T.contactCount,D=1/U,I=E.position.x-E.positionPrev.x,O=E.position.y-E.positionPrev.y,L=E.angle-E.anglePrev,G=M.position.x-M.positionPrev.x,z=M.position.y-M.positionPrev.y,X=M.angle-M.anglePrev;for(y=0;y<U;y++){var V=N[y],Y=V.vertex,W=Y.x-E.position.x,H=Y.y-E.position.y,b=Y.x-M.position.x,K=Y.y-M.position.y,Q=I-H*L,Z=O+W*L,$=G-K*X,q=z+b*X,_=Q-$,tt=Z-q,J=P*_+A*tt,j=R*_+F*tt,k=T.separation+J,et=Math.min(k,1);et=k<0?0:et;var it=et*B;j<-it||j>it?(g=j>0?j:-j,m=T.friction*(j>0?1:-1)*i,m<-g?m=-g:m>g&&(m=g)):(m=j,g=f);var ht=W*A-H*P,at=b*A-K*P,ft=D/(w+E.inverseInertia*ht*ht+M.inverseInertia*at*at),rt=(1+T.restitution)*J*ft;if(m*=ft,J<a)V.normalImpulse=0;else{var dt=V.normalImpulse;V.normalImpulse+=rt,V.normalImpulse>0&&(V.normalImpulse=0),rt=V.normalImpulse-dt}if(j<-l||j>l)V.tangentImpulse=0;else{var st=V.tangentImpulse;V.tangentImpulse+=m,V.tangentImpulse<-g&&(V.tangentImpulse=-g),V.tangentImpulse>g&&(V.tangentImpulse=g),m=V.tangentImpulse-st}var vt=P*rt+R*m,lt=A*rt+F*m;E.isStatic||E.isSleeping||(E.positionPrev.x+=vt*E.inverseMass,E.positionPrev.y+=lt*E.inverseMass,E.anglePrev+=(W*lt-H*vt)*E.inverseInertia),M.isStatic||M.isSleeping||(M.positionPrev.x-=vt*M.inverseMass,M.positionPrev.y-=lt*M.inverseMass,M.anglePrev-=(b*lt-K*vt)*M.inverseInertia)}}}}})()},48140:(p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(31725),r=t(53614),n=t(15647),e=t(66615),s=t(53402);(function(){d._warming=.4,d._torqueDampen=1,d._minLength=1e-6,d.create=function(o){var i=o;i.bodyA&&!i.pointA&&(i.pointA={x:0,y:0}),i.bodyB&&!i.pointB&&(i.pointB={x:0,y:0});var a=i.bodyA?h.add(i.bodyA.position,i.pointA):i.pointA,l=i.bodyB?h.add(i.bodyB.position,i.pointB):i.pointB,u=h.magnitude(h.sub(a,l));i.length=typeof i.length<"u"?i.length:u,i.id=i.id||s.nextId(),i.label=i.label||"Constraint",i.type="constraint",i.stiffness=i.stiffness||(i.length>0?1:.7),i.damping=i.damping||0,i.angularStiffness=i.angularStiffness||0,i.angleA=i.bodyA?i.bodyA.angle:i.angleA,i.angleB=i.bodyB?i.bodyB.angle:i.angleB,i.plugin={};var f={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return i.length===0&&i.stiffness>.1?(f.type="pin",f.anchors=!1):i.stiffness<.9&&(f.type="spring"),i.render=s.extend(f,i.render),i},d.preSolveAll=function(o){for(var i=0;i<o.length;i+=1){var a=o[i],l=a.constraintImpulse;a.isStatic||l.x===0&&l.y===0&&l.angle===0||(a.position.x+=l.x,a.position.y+=l.y,a.angle+=l.angle)}},d.solveAll=function(o,i){for(var a=s.clamp(i/s._baseDelta,0,1),l=0;l<o.length;l+=1){var u=o[l],f=!u.bodyA||u.bodyA&&u.bodyA.isStatic,v=!u.bodyB||u.bodyB&&u.bodyB.isStatic;(f||v)&&d.solve(o[l],a)}for(l=0;l<o.length;l+=1)u=o[l],f=!u.bodyA||u.bodyA&&u.bodyA.isStatic,v=!u.bodyB||u.bodyB&&u.bodyB.isStatic,!f&&!v&&d.solve(o[l],a)},d.solve=function(o,i){var a=o.bodyA,l=o.bodyB,u=o.pointA,f=o.pointB;if(!(!a&&!l)){a&&!a.isStatic&&(h.rotate(u,a.angle-o.angleA,u),o.angleA=a.angle),l&&!l.isStatic&&(h.rotate(f,l.angle-o.angleB,f),o.angleB=l.angle);var v=u,m=f;if(a&&(v=h.add(a.position,u)),l&&(m=h.add(l.position,f)),!(!v||!m)){var g=h.sub(v,m),x=h.magnitude(g);x<d._minLength&&(x=d._minLength);var y=(x-o.length)/x,T=o.stiffness>=1||o.length===0,C=T?o.stiffness*i:o.stiffness*i*i,E=o.damping*i,M=h.mult(g,y*C),P=(a?a.inverseMass:0)+(l?l.inverseMass:0),A=(a?a.inverseInertia:0)+(l?l.inverseInertia:0),R=P+A,F,w,B,N,U;if(E>0){var D=h.create();B=h.div(g,x),U=h.sub(l&&h.sub(l.position,l.positionPrev)||D,a&&h.sub(a.position,a.positionPrev)||D),N=h.dot(B,U)}a&&!a.isStatic&&(w=a.inverseMass/P,a.constraintImpulse.x-=M.x*w,a.constraintImpulse.y-=M.y*w,a.position.x-=M.x*w,a.position.y-=M.y*w,E>0&&(a.positionPrev.x-=E*B.x*N*w,a.positionPrev.y-=E*B.y*N*w),F=h.cross(u,M)/R*d._torqueDampen*a.inverseInertia*(1-o.angularStiffness),a.constraintImpulse.angle-=F,a.angle-=F),l&&!l.isStatic&&(w=l.inverseMass/P,l.constraintImpulse.x+=M.x*w,l.constraintImpulse.y+=M.y*w,l.position.x+=M.x*w,l.position.y+=M.y*w,E>0&&(l.positionPrev.x+=E*B.x*N*w,l.positionPrev.y+=E*B.y*N*w),F=h.cross(f,M)/R*d._torqueDampen*l.inverseInertia*(1-o.angularStiffness),l.constraintImpulse.angle+=F,l.angle+=F)}}},d.postSolveAll=function(o){for(var i=0;i<o.length;i++){var a=o[i],l=a.constraintImpulse;if(!(a.isStatic||l.x===0&&l.y===0&&l.angle===0)){r.set(a,!1);for(var u=0;u<a.parts.length;u++){var f=a.parts[u];c.translate(f.vertices,l),u>0&&(f.position.x+=l.x,f.position.y+=l.y),l.angle!==0&&(c.rotate(f.vertices,l.angle,a.position),e.rotate(f.axes,l.angle),u>0&&h.rotateAbout(f.position,l.angle,a.position,f.position)),n.update(f.bounds,f.vertices,a.velocity)}l.angle*=d._warming,l.x*=d._warming,l.y*=d._warming}}},d.pointAWorld=function(o){return{x:(o.bodyA?o.bodyA.position.x:0)+(o.pointA?o.pointA.x:0),y:(o.bodyA?o.bodyA.position.y:0)+(o.pointA?o.pointA.y:0)}},d.pointBWorld=function(o){return{x:(o.bodyB?o.bodyB.position.x:0)+(o.pointB?o.pointB.x:0),y:(o.bodyB?o.bodyB.position.y:0)+(o.pointB?o.pointB.y:0)}},d.currentLength=function(o){var i=(o.bodyA?o.bodyA.position.x:0)+(o.pointA?o.pointA.x:0),a=(o.bodyA?o.bodyA.position.y:0)+(o.pointA?o.pointA.y:0),l=(o.bodyB?o.bodyB.position.x:0)+(o.pointB?o.pointB.x:0),u=(o.bodyB?o.bodyB.position.y:0)+(o.pointB?o.pointB.y:0),f=i-l,v=a-u;return Math.sqrt(f*f+v*v)}})()},53402:(p,S,t)=>{var d={};p.exports=d,function(){d._baseDelta=16.666666666666668,d._nextId=0,d._seed=0,d._nowStartTime=+new Date,d._warnedOnce={},d._decomp=null,d.extend=function(h,r){var n,e;typeof r=="boolean"?(n=2,e=r):(n=1,e=!0);for(var s=n;s<arguments.length;s++){var o=arguments[s];if(o)for(var i in o)e&&o[i]&&o[i].constructor===Object&&(!h[i]||h[i].constructor===Object)?(h[i]=h[i]||{},d.extend(h[i],e,o[i])):h[i]=o[i]}return h},d.clone=function(h,r){return d.extend({},r,h)},d.keys=function(h){if(Object.keys)return Object.keys(h);var r=[];for(var n in h)r.push(n);return r},d.values=function(h){var r=[];if(Object.keys){for(var n=Object.keys(h),e=0;e<n.length;e++)r.push(h[n[e]]);return r}for(var s in h)r.push(h[s]);return r},d.get=function(h,r,n,e){r=r.split(".").slice(n,e);for(var s=0;s<r.length;s+=1)h=h[r[s]];return h},d.set=function(h,r,n,e,s){var o=r.split(".").slice(e,s);return d.get(h,r,0,-1)[o[o.length-1]]=n,n},d.shuffle=function(h){for(var r=h.length-1;r>0;r--){var n=Math.floor(d.random()*(r+1)),e=h[r];h[r]=h[n],h[n]=e}return h},d.choose=function(h){return h[Math.floor(d.random()*h.length)]},d.isElement=function(h){return typeof HTMLElement<"u"?h instanceof HTMLElement:!!(h&&h.nodeType&&h.nodeName)},d.isArray=function(h){return Object.prototype.toString.call(h)==="[object Array]"},d.isFunction=function(h){return typeof h=="function"},d.isPlainObject=function(h){return typeof h=="object"&&h.constructor===Object},d.isString=function(h){return toString.call(h)==="[object String]"},d.clamp=function(h,r,n){return h<r?r:h>n?n:h},d.sign=function(h){return h<0?-1:1},d.now=function(){if(typeof window<"u"&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-d._nowStartTime},d.random=function(h,r){return h=typeof h<"u"?h:0,r=typeof r<"u"?r:1,h+c()*(r-h)};var c=function(){return d._seed=(d._seed*9301+49297)%233280,d._seed/233280};d.colorToNumber=function(h){return h=h.replace("#",""),h.length==3&&(h=h.charAt(0)+h.charAt(0)+h.charAt(1)+h.charAt(1)+h.charAt(2)+h.charAt(2)),parseInt(h,16)},d.logLevel=1,d.log=function(){console&&d.logLevel>0&&d.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.info=function(){console&&d.logLevel>0&&d.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.warn=function(){console&&d.logLevel>0&&d.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.warnOnce=function(){var h=Array.prototype.slice.call(arguments).join(" ");d._warnedOnce[h]||(d.warn(h),d._warnedOnce[h]=!0)},d.deprecated=function(h,r,n){h[r]=d.chain(function(){d.warnOnce("🔅 deprecated 🔅",n)},h[r])},d.nextId=function(){return d._nextId++},d.indexOf=function(h,r){if(h.indexOf)return h.indexOf(r);for(var n=0;n<h.length;n++)if(h[n]===r)return n;return-1},d.map=function(h,r){if(h.map)return h.map(r);for(var n=[],e=0;e<h.length;e+=1)n.push(r(h[e]));return n},d.topologicalSort=function(h){var r=[],n=[],e=[];for(var s in h)!n[s]&&!e[s]&&d._topologicalSort(s,n,e,h,r);return r},d._topologicalSort=function(h,r,n,e,s){var o=e[h]||[];n[h]=!0;for(var i=0;i<o.length;i+=1){var a=o[i];n[a]||r[a]||d._topologicalSort(a,r,n,e,s)}n[h]=!1,r[h]=!0,s.push(h)},d.chain=function(){for(var h=[],r=0;r<arguments.length;r+=1){var n=arguments[r];n._chained?h.push.apply(h,n._chained):h.push(n)}var e=function(){for(var s,o=new Array(arguments.length),i=0,a=arguments.length;i<a;i++)o[i]=arguments[i];for(i=0;i<h.length;i+=1){var l=h[i].apply(s,o);typeof l<"u"&&(s=l)}return s};return e._chained=h,e},d.chainPathBefore=function(h,r,n){return d.set(h,r,d.chain(n,d.get(h,r)))},d.chainPathAfter=function(h,r,n){return d.set(h,r,d.chain(d.get(h,r),n))},d.setDecomp=function(h){d._decomp=h},d.getDecomp=function(){var h=d._decomp;try{!h&&typeof window<"u"&&(h=window.decomp),!h&&typeof t.g<"u"&&(h=t.g.decomp)}catch{h=null}return h}}()},48413:(p,S,t)=>{var d={};p.exports=d;var c=t(53614),h=t(66272),r=t(81388),n=t(99561),e=t(35810),s=t(69351),o=t(48140),i=t(53402),a=t(22562);(function(){d._deltaMax=16.666666666666668,d.create=function(l){l=l||{};var u={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0,lastUpdatesPerFrame:0}},f=i.extend(u,l);return f.world=l.world||s.create({label:"World"}),f.pairs=l.pairs||n.create(),f.detector=l.detector||r.create(),f.detector.pairs=f.pairs,f.grid={buckets:[]},f.world.gravity=f.gravity,f.broadphase=f.grid,f.metrics={},f},d.update=function(l,u){var f=i.now(),v=l.world,m=l.detector,g=l.pairs,x=l.timing,y=x.timestamp,T;u>d._deltaMax&&i.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",d._deltaMax.toFixed(3),"ms."),u=typeof u<"u"?u:i._baseDelta,u*=x.timeScale,x.timestamp+=u,x.lastDelta=u;var C={timestamp:x.timestamp,delta:u};e.trigger(l,"beforeUpdate",C);var E=s.allBodies(v),M=s.allConstraints(v),P=s.allComposites(v);for(v.isModified&&(r.setBodies(m,E),s.setModified(v,!1,!1,!0)),l.enableSleeping&&c.update(E,u),d._bodiesApplyGravity(E,l.gravity),d.wrap(E,P),d.attractors(E),u>0&&d._bodiesUpdate(E,u),e.trigger(l,"beforeSolve",C),o.preSolveAll(E),T=0;T<l.constraintIterations;T++)o.solveAll(M,u);o.postSolveAll(E);var A=r.collisions(m);n.update(g,A,y),l.enableSleeping&&c.afterCollisions(g.list),g.collisionStart.length>0&&e.trigger(l,"collisionStart",{pairs:g.collisionStart,timestamp:x.timestamp,delta:u});var R=i.clamp(20/l.positionIterations,0,1);for(h.preSolvePosition(g.list),T=0;T<l.positionIterations;T++)h.solvePosition(g.list,u,R);for(h.postSolvePosition(E),o.preSolveAll(E),T=0;T<l.constraintIterations;T++)o.solveAll(M,u);for(o.postSolveAll(E),h.preSolveVelocity(g.list),T=0;T<l.velocityIterations;T++)h.solveVelocity(g.list,u);return d._bodiesUpdateVelocities(E),g.collisionActive.length>0&&e.trigger(l,"collisionActive",{pairs:g.collisionActive,timestamp:x.timestamp,delta:u}),g.collisionEnd.length>0&&e.trigger(l,"collisionEnd",{pairs:g.collisionEnd,timestamp:x.timestamp,delta:u}),d._bodiesClearForces(E),e.trigger(l,"afterUpdate",C),l.timing.lastElapsed=i.now()-f,l},d.merge=function(l,u){if(i.extend(l,u),u.world){l.world=u.world,d.clear(l);for(var f=s.allBodies(l.world),v=0;v<f.length;v++){var m=f[v];c.set(m,!1),m.id=i.nextId()}}},d.clear=function(l){n.clear(l.pairs),r.clear(l.detector)},d._bodiesClearForces=function(l){for(var u=l.length,f=0;f<u;f++){var v=l[f];v.force.x=0,v.force.y=0,v.torque=0}},d._bodiesApplyGravity=function(l,u){var f=typeof u.scale<"u"?u.scale:.001,v=l.length;if(!(u.x===0&&u.y===0||f===0))for(var m=0;m<v;m++){var g=l[m];g.ignoreGravity||g.isStatic||g.isSleeping||(g.force.y+=g.mass*u.y*f,g.force.x+=g.mass*u.x*f)}},d._bodiesUpdate=function(l,u){for(var f=l.length,v=0;v<f;v++){var m=l[v];m.isStatic||m.isSleeping||a.update(m,u)}},d._bodiesUpdateVelocities=function(l){for(var u=l.length,f=0;f<u;f++)a.updateVelocities(l[f])},d.wrap=function(l,u){for(var f=0;f<l.length;f+=1){var v=l[f];v.wrapBounds!==null&&a.wrap(v,v.wrapBounds)}for(f=0;f<u.length;f+=1){var m=u[f];m.wrapBounds!==null&&s.wrap(m,m.wrapBounds)}},d.attractors=function(l){for(var u=0;u<l.length;u++){var f=l[u],v=f.attractors;if(v&&v.length>0)for(var m=0;m<l.length;m++){var g=l[m];if(u!==m)for(var x=0;x<v.length;x++){var y=v[x],T=y;i.isFunction(y)&&(T=y(f,g)),T&&a.applyForce(g,g.position,T)}}}}})()},35810:(p,S,t)=>{var d={};p.exports=d;var c=t(53402);(function(){d.on=function(h,r,n){for(var e=r.split(" "),s,o=0;o<e.length;o++)s=e[o],h.events=h.events||{},h.events[s]=h.events[s]||[],h.events[s].push(n);return n},d.off=function(h,r,n){if(!r){h.events={};return}typeof r=="function"&&(n=r,r=c.keys(h.events).join(" "));for(var e=r.split(" "),s=0;s<e.length;s++){var o=h.events[e[s]],i=[];if(n&&o)for(var a=0;a<o.length;a++)o[a]!==n&&i.push(o[a]);h.events[e[s]]=i}},d.trigger=function(h,r,n){var e,s,o,i,a=h.events;if(a&&c.keys(a).length>0){n||(n={}),e=r.split(" ");for(var l=0;l<e.length;l++)if(s=e[l],o=a[s],o){i=c.clone(n,!1),i.name=s,i.source=h;for(var u=0;u<o.length;u++)o[u].apply(h,[i])}}}})()},6790:(p,S,t)=>{var d={};p.exports=d;var c=t(73832),h=t(53402);(function(){d.name="matter-js",d.version="0.20.0",d.uses=[],d.used=[],d.use=function(){c.use(d,Array.prototype.slice.call(arguments))},d.before=function(r,n){return r=r.replace(/^Matter./,""),h.chainPathBefore(d,r,n)},d.after=function(r,n){return r=r.replace(/^Matter./,""),h.chainPathAfter(d,r,n)}})()},73832:(p,S,t)=>{var d={};p.exports=d;var c=t(53402);(function(){d._registry={},d.register=function(h){if(d.isPlugin(h)||c.warn("Plugin.register:",d.toString(h),"does not implement all required fields."),h.name in d._registry){var r=d._registry[h.name],n=d.versionParse(h.version).number,e=d.versionParse(r.version).number;n>e?(c.warn("Plugin.register:",d.toString(r),"was upgraded to",d.toString(h)),d._registry[h.name]=h):n<e?c.warn("Plugin.register:",d.toString(r),"can not be downgraded to",d.toString(h)):h!==r&&c.warn("Plugin.register:",d.toString(h),"is already registered to different plugin object")}else d._registry[h.name]=h;return h},d.resolve=function(h){return d._registry[d.dependencyParse(h).name]},d.toString=function(h){return typeof h=="string"?h:(h.name||"anonymous")+"@"+(h.version||h.range||"0.0.0")},d.isPlugin=function(h){return h&&h.name&&h.version&&h.install},d.isUsed=function(h,r){return h.used.indexOf(r)>-1},d.isFor=function(h,r){var n=h.for&&d.dependencyParse(h.for);return!h.for||r.name===n.name&&d.versionSatisfies(r.version,n.range)},d.use=function(h,r){if(h.uses=(h.uses||[]).concat(r||[]),h.uses.length===0){c.warn("Plugin.use:",d.toString(h),"does not specify any dependencies to install.");return}for(var n=d.dependencies(h),e=c.topologicalSort(n),s=[],o=0;o<e.length;o+=1)if(e[o]!==h.name){var i=d.resolve(e[o]);if(!i){s.push("❌ "+e[o]);continue}d.isUsed(h,i.name)||(d.isFor(i,h)||(c.warn("Plugin.use:",d.toString(i),"is for",i.for,"but installed on",d.toString(h)+"."),i._warned=!0),i.install?i.install(h):(c.warn("Plugin.use:",d.toString(i),"does not specify an install function."),i._warned=!0),i._warned?(s.push("🔶 "+d.toString(i)),delete i._warned):s.push("✅ "+d.toString(i)),h.used.push(i.name))}s.length>0&&!i.silent&&c.info(s.join(" "))},d.dependencies=function(h,r){var n=d.dependencyParse(h),e=n.name;if(r=r||{},!(e in r)){h=d.resolve(h)||h,r[e]=c.map(h.uses||[],function(o){d.isPlugin(o)&&d.register(o);var i=d.dependencyParse(o),a=d.resolve(o);return a&&!d.versionSatisfies(a.version,i.range)?(c.warn("Plugin.dependencies:",d.toString(a),"does not satisfy",d.toString(i),"used by",d.toString(n)+"."),a._warned=!0,h._warned=!0):a||(c.warn("Plugin.dependencies:",d.toString(o),"used by",d.toString(n),"could not be resolved."),h._warned=!0),i.name});for(var s=0;s<r[e].length;s+=1)d.dependencies(r[e][s],r);return r}},d.dependencyParse=function(h){if(c.isString(h)){var r=/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-+]+)?))?$/;return r.test(h)||c.warn("Plugin.dependencyParse:",h,"is not a valid dependency string."),{name:h.split("@")[0],range:h.split("@")[1]||"*"}}return{name:h.name,range:h.range||h.version}},d.versionParse=function(h){var r=/^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;r.test(h)||c.warn("Plugin.versionParse:",h,"is not a valid version or range.");var n=r.exec(h),e=Number(n[4]),s=Number(n[5]),o=Number(n[6]);return{isRange:!!(n[1]||n[2]),version:n[3],range:h,operator:n[1]||n[2]||"",major:e,minor:s,patch:o,parts:[e,s,o],prerelease:n[7],number:e*1e8+s*1e4+o}},d.versionSatisfies=function(h,r){r=r||"*";var n=d.versionParse(r),e=d.versionParse(h);if(n.isRange){if(n.operator==="*"||h==="*")return!0;if(n.operator===">")return e.number>n.number;if(n.operator===">=")return e.number>=n.number;if(n.operator==="~")return e.major===n.major&&e.minor===n.minor&&e.patch>=n.patch;if(n.operator==="^")return n.major>0?e.major===n.major&&e.number>=n.number:n.minor>0?e.minor===n.minor&&e.patch>=n.patch:e.patch===n.patch}return h===r||h==="*"}})()},13037:(p,S,t)=>{var d={};p.exports=d;var c=t(35810),h=t(48413),r=t(53402);(function(){d._maxFrameDelta=66.66666666666667,d._frameDeltaFallback=16.666666666666668,d._timeBufferMargin=1.5,d._elapsedNextEstimate=1,d._smoothingLowerBound=.1,d._smoothingUpperBound=.9,d.create=function(e){var s={delta:16.666666666666668,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:33.333333333333336,lastUpdatesDeferred:0,enabled:!0},o=r.extend(s,e);return o.fps=0,o},d.run=function(e,s){return e.timeBuffer=d._frameDeltaFallback,function o(i){e.frameRequestId=d._onNextFrame(e,o),i&&e.enabled&&d.tick(e,s,i)}(),e},d.tick=function(e,s,o){var i=r.now(),a=e.delta,l=0,u=o-e.timeLastTick;if((!u||!e.timeLastTick||u>Math.max(d._maxFrameDelta,e.maxFrameTime))&&(u=e.frameDelta||d._frameDeltaFallback),e.frameDeltaSmoothing){e.frameDeltaHistory.push(u),e.frameDeltaHistory=e.frameDeltaHistory.slice(-e.frameDeltaHistorySize);var f=e.frameDeltaHistory.slice(0).sort(),v=e.frameDeltaHistory.slice(f.length*d._smoothingLowerBound,f.length*d._smoothingUpperBound),m=n(v);u=m||u}e.frameDeltaSnapping&&(u=1e3/Math.round(1e3/u)),e.frameDelta=u,e.timeLastTick=o,e.timeBuffer+=e.frameDelta,e.timeBuffer=r.clamp(e.timeBuffer,0,e.frameDelta+a*d._timeBufferMargin),e.lastUpdatesDeferred=0;var g=e.maxUpdates||Math.ceil(e.maxFrameTime/a),x={timestamp:s.timing.timestamp};c.trigger(e,"beforeTick",x),c.trigger(e,"tick",x);for(var y=r.now();a>0&&e.timeBuffer>=a*d._timeBufferMargin;){c.trigger(e,"beforeUpdate",x),h.update(s,a),c.trigger(e,"afterUpdate",x),e.timeBuffer-=a,l+=1;var T=r.now()-i,C=r.now()-y,E=T+d._elapsedNextEstimate*C/l;if(l>=g||E>e.maxFrameTime){e.lastUpdatesDeferred=Math.round(Math.max(0,e.timeBuffer/a-d._timeBufferMargin));break}}s.timing.lastUpdatesPerFrame=l,c.trigger(e,"afterTick",x),e.frameDeltaHistory.length>=100&&(e.lastUpdatesDeferred&&Math.round(e.frameDelta/a)>g?r.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):e.lastUpdatesDeferred&&r.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),typeof e.isFixed<"u"&&r.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(e.deltaMin||e.deltaMax)&&r.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),e.fps!==0&&r.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},d.stop=function(e){d._cancelNextFrame(e)},d._onNextFrame=function(e,s){if(typeof window<"u"&&window.requestAnimationFrame)e.frameRequestId=window.requestAnimationFrame(s);else throw new Error("Matter.Runner: missing required global window.requestAnimationFrame.");return e.frameRequestId},d._cancelNextFrame=function(e){if(typeof window<"u"&&window.cancelAnimationFrame)window.cancelAnimationFrame(e.frameRequestId);else throw new Error("Matter.Runner: missing required global window.cancelAnimationFrame.")};var n=function(e){for(var s=0,o=e.length,i=0;i<o;i+=1)s+=e[i];return s/o||0}})()},53614:(p,S,t)=>{var d={};p.exports=d;var c=t(22562),h=t(35810),r=t(53402);(function(){d._motionWakeThreshold=.18,d._motionSleepThreshold=.08,d._minBias=.9,d.update=function(n,e){for(var s=e/r._baseDelta,o=d._motionSleepThreshold,i=0;i<n.length;i++){var a=n[i],l=c.getSpeed(a),u=c.getAngularSpeed(a),f=l*l+u*u;if(a.force.x!==0||a.force.y!==0){d.set(a,!1);continue}var v=Math.min(a.motion,f),m=Math.max(a.motion,f);a.motion=d._minBias*v+(1-d._minBias)*m,a.sleepThreshold>0&&a.motion<o?(a.sleepCounter+=1,a.sleepCounter>=a.sleepThreshold/s&&d.set(a,!0)):a.sleepCounter>0&&(a.sleepCounter-=1)}},d.afterCollisions=function(n){for(var e=d._motionSleepThreshold,s=0;s<n.length;s++){var o=n[s];if(o.isActive){var i=o.collision,a=i.bodyA.parent,l=i.bodyB.parent;if(!(a.isSleeping&&l.isSleeping||a.isStatic||l.isStatic)&&(a.isSleeping||l.isSleeping)){var u=a.isSleeping&&!a.isStatic?a:l,f=u===a?l:a;!u.isStatic&&f.motion>e&&d.set(u,!1)}}}},d.set=function(n,e){var s=n.isSleeping;e?(n.isSleeping=!0,n.sleepCounter=n.sleepThreshold,n.positionImpulse.x=0,n.positionImpulse.y=0,n.positionPrev.x=n.position.x,n.positionPrev.y=n.position.y,n.anglePrev=n.angle,n.speed=0,n.angularSpeed=0,n.motion=0,s||h.trigger(n,"sleepStart")):(n.isSleeping=!1,n.sleepCounter=0,s&&h.trigger(n,"sleepEnd"))}})()},66280:(p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(53402),r=t(22562),n=t(15647),e=t(31725);(function(){d.rectangle=function(s,o,i,a,l){l=l||{};var u={label:"Rectangle Body",position:{x:s,y:o},vertices:c.fromPath("L 0 0 L "+i+" 0 L "+i+" "+a+" L 0 "+a)};if(l.chamfer){var f=l.chamfer;u.vertices=c.chamfer(u.vertices,f.radius,f.quality,f.qualityMin,f.qualityMax),delete l.chamfer}return r.create(h.extend({},u,l))},d.trapezoid=function(s,o,i,a,l,u){u=u||{},l>=1&&h.warn("Bodies.trapezoid: slope parameter must be < 1."),l*=.5;var f=(1-l*2)*i,v=i*l,m=v+f,g=m+v,x;l<.5?x="L 0 0 L "+v+" "+-a+" L "+m+" "+-a+" L "+g+" 0":x="L 0 0 L "+m+" "+-a+" L "+g+" 0";var y={label:"Trapezoid Body",position:{x:s,y:o},vertices:c.fromPath(x)};if(u.chamfer){var T=u.chamfer;y.vertices=c.chamfer(y.vertices,T.radius,T.quality,T.qualityMin,T.qualityMax),delete u.chamfer}return r.create(h.extend({},y,u))},d.circle=function(s,o,i,a,l){a=a||{};var u={label:"Circle Body",circleRadius:i};l=l||25;var f=Math.ceil(Math.max(10,Math.min(l,i)));return f%2===1&&(f+=1),d.polygon(s,o,f,i,h.extend({},u,a))},d.polygon=function(s,o,i,a,l){if(l=l||{},i<3)return d.circle(s,o,a,l);for(var u=2*Math.PI/i,f="",v=u*.5,m=0;m<i;m+=1){var g=v+m*u,x=Math.cos(g)*a,y=Math.sin(g)*a;f+="L "+x.toFixed(3)+" "+y.toFixed(3)+" "}var T={label:"Polygon Body",position:{x:s,y:o},vertices:c.fromPath(f)};if(l.chamfer){var C=l.chamfer;T.vertices=c.chamfer(T.vertices,C.radius,C.quality,C.qualityMin,C.qualityMax),delete l.chamfer}return r.create(h.extend({},T,l))},d.fromVertices=function(s,o,i,a,l,u,f,v){var m=h.getDecomp(),g,x,y,T,C,E,M,P,A,R,F;for(g=!!(m&&m.quickDecomp),a=a||{},y=[],l=typeof l<"u"?l:!1,u=typeof u<"u"?u:.01,f=typeof f<"u"?f:10,v=typeof v<"u"?v:.01,h.isArray(i[0])||(i=[i]),R=0;R<i.length;R+=1)if(E=i[R],T=c.isConvex(E),C=!T,C&&!g&&h.warnOnce("Bodies.fromVertices: Install the 'poly-decomp' library and use Common.setDecomp or provide 'decomp' as a global to decompose concave vertices."),T||!g)T?E=c.clockwiseSort(E):E=c.hull(E),y.push({position:{x:s,y:o},vertices:E});else{var w=E.map(function(V){return[V.x,V.y]});m.makeCCW(w),u!==!1&&m.removeCollinearPoints(w,u),v!==!1&&m.removeDuplicatePoints&&m.removeDuplicatePoints(w,v);var B=m.quickDecomp(w);for(M=0;M<B.length;M++){var N=B[M],U=N.map(function(V){return{x:V[0],y:V[1]}});f>0&&c.area(U)<f||y.push({position:c.centre(U),vertices:U})}}for(M=0;M<y.length;M++)y[M]=r.create(h.extend(y[M],a));if(l){var D=5;for(M=0;M<y.length;M++){var I=y[M];for(P=M+1;P<y.length;P++){var O=y[P];if(n.overlaps(I.bounds,O.bounds)){var L=I.vertices,G=O.vertices;for(A=0;A<I.vertices.length;A++)for(F=0;F<O.vertices.length;F++){var z=e.magnitudeSquared(e.sub(L[(A+1)%L.length],G[F])),X=e.magnitudeSquared(e.sub(L[A],G[(F+1)%G.length]));z<D&&X<D&&(L[A].isInternal=!0,G[F].isInternal=!0)}}}}}return y.length>1?(x=r.create(h.extend({parts:y.slice(0)},a)),r.setPosition(x,{x:s,y:o}),x):y[0]},d.flagCoincidentParts=function(s,o){o===void 0&&(o=5);for(var i=0;i<s.length;i++)for(var a=s[i],l=i+1;l<s.length;l++){var u=s[l];if(n.overlaps(a.bounds,u.bounds))for(var f=a.vertices,v=u.vertices,m=0;m<a.vertices.length;m++)for(var g=0;g<u.vertices.length;g++){var x=e.magnitudeSquared(e.sub(f[(m+1)%f.length],v[g])),y=e.magnitudeSquared(e.sub(f[m],v[(g+1)%v.length]));x<o&&y<o&&(f[m].isInternal=!0,v[g].isInternal=!0)}}return s}})()},74116:(p,S,t)=>{var d={};p.exports=d;var c=t(69351),h=t(48140),r=t(53402),n=t(22562),e=t(66280);(function(){d.stack=function(s,o,i,a,l,u,f){for(var v=c.create({label:"Stack"}),m=s,g=o,x,y=0,T=0;T<a;T++){for(var C=0,E=0;E<i;E++){var M=f(m,g,E,T,x,y);if(M){var P=M.bounds.max.y-M.bounds.min.y,A=M.bounds.max.x-M.bounds.min.x;P>C&&(C=P),n.translate(M,{x:A*.5,y:P*.5}),m=M.bounds.max.x+l,c.addBody(v,M),x=M,y+=1}else m+=l}g+=C+u,m=s}return v},d.chain=function(s,o,i,a,l,u){for(var f=s.bodies,v=1;v<f.length;v++){var m=f[v-1],g=f[v],x=m.bounds.max.y-m.bounds.min.y,y=m.bounds.max.x-m.bounds.min.x,T=g.bounds.max.y-g.bounds.min.y,C=g.bounds.max.x-g.bounds.min.x,E={bodyA:m,pointA:{x:y*o,y:x*i},bodyB:g,pointB:{x:C*a,y:T*l}},M=r.extend(E,u);c.addConstraint(s,h.create(M))}return s.label+=" Chain",s},d.mesh=function(s,o,i,a,l){var u=s.bodies,f,v,m,g,x;for(f=0;f<i;f++){for(v=1;v<o;v++)m=u[v-1+f*o],g=u[v+f*o],c.addConstraint(s,h.create(r.extend({bodyA:m,bodyB:g},l)));if(f>0)for(v=0;v<o;v++)m=u[v+(f-1)*o],g=u[v+f*o],c.addConstraint(s,h.create(r.extend({bodyA:m,bodyB:g},l))),a&&v>0&&(x=u[v-1+(f-1)*o],c.addConstraint(s,h.create(r.extend({bodyA:x,bodyB:g},l)))),a&&v<o-1&&(x=u[v+1+(f-1)*o],c.addConstraint(s,h.create(r.extend({bodyA:x,bodyB:g},l))))}return s.label+=" Mesh",s},d.pyramid=function(s,o,i,a,l,u,f){return d.stack(s,o,i,a,l,u,function(v,m,g,x,y,T){var C=Math.min(a,Math.ceil(i/2)),E=y?y.bounds.max.x-y.bounds.min.x:0;if(!(x>C)){x=C-x;var M=x,P=i-1-x;if(!(g<M||g>P)){T===1&&n.translate(y,{x:(g+(i%2===1?1:-1))*E,y:0});var A=y?g*E:0;return f(s+A+g*l,m,g,x,y,T)}}})},d.newtonsCradle=function(s,o,i,a,l){for(var u=c.create({label:"Newtons Cradle"}),f=0;f<i;f++){var v=1.9,m=e.circle(s+f*(a*v),o+l,a,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),g=h.create({pointA:{x:s+f*(a*v),y:o},bodyB:m});c.addBody(u,m),c.addConstraint(u,g)}return u},d.car=function(s,o,i,a,l){var u=n.nextGroup(!0),f=20,v=-i*.5+f,m=i*.5-f,g=0,x=c.create({label:"Car"}),y=e.rectangle(s,o,i,a,{collisionFilter:{group:u},chamfer:{radius:a*.5},density:2e-4}),T=e.circle(s+v,o+g,l,{collisionFilter:{group:u},friction:.8}),C=e.circle(s+m,o+g,l,{collisionFilter:{group:u},friction:.8}),E=h.create({bodyB:y,pointB:{x:v,y:g},bodyA:T,stiffness:1,length:0}),M=h.create({bodyB:y,pointB:{x:m,y:g},bodyA:C,stiffness:1,length:0});return c.addBody(x,y),c.addBody(x,T),c.addBody(x,C),c.addConstraint(x,E),c.addConstraint(x,M),x},d.softBody=function(s,o,i,a,l,u,f,v,m,g){m=r.extend({inertia:1/0},m),g=r.extend({stiffness:.2,render:{type:"line",anchors:!1}},g);var x=d.stack(s,o,i,a,l,u,function(y,T){return e.circle(y,T,v,m)});return d.mesh(x,i,a,f,g),x.label="Soft Body",x}})()},66615:(p,S,t)=>{var d={};p.exports=d;var c=t(31725),h=t(53402);(function(){d.fromVertices=function(r){for(var n={},e=0;e<r.length;e++){var s=(e+1)%r.length,o=c.normalise({x:r[s].y-r[e].y,y:r[e].x-r[s].x}),i=o.y===0?1/0:o.x/o.y;i=i.toFixed(3).toString(),n[i]=o}return h.values(n)},d.rotate=function(r,n){if(n!==0)for(var e=Math.cos(n),s=Math.sin(n),o=0;o<r.length;o++){var i=r[o],a;a=i.x*e-i.y*s,i.y=i.x*s+i.y*e,i.x=a}}})()},15647:p=>{var S={};p.exports=S,function(){S.create=function(t){var d={min:{x:0,y:0},max:{x:0,y:0}};return t&&S.update(d,t),d},S.update=function(t,d,c){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var h=0;h<d.length;h++){var r=d[h];r.x>t.max.x&&(t.max.x=r.x),r.x<t.min.x&&(t.min.x=r.x),r.y>t.max.y&&(t.max.y=r.y),r.y<t.min.y&&(t.min.y=r.y)}c&&(c.x>0?t.max.x+=c.x:t.min.x+=c.x,c.y>0?t.max.y+=c.y:t.min.y+=c.y)},S.contains=function(t,d){return d.x>=t.min.x&&d.x<=t.max.x&&d.y>=t.min.y&&d.y<=t.max.y},S.overlaps=function(t,d){return t.min.x<=d.max.x&&t.max.x>=d.min.x&&t.max.y>=d.min.y&&t.min.y<=d.max.y},S.translate=function(t,d){t.min.x+=d.x,t.max.x+=d.x,t.min.y+=d.y,t.max.y+=d.y},S.shift=function(t,d){var c=t.max.x-t.min.x,h=t.max.y-t.min.y;t.min.x=d.x,t.max.x=d.x+c,t.min.y=d.y,t.max.y=d.y+h},S.wrap=function(t,d,c){var h=null,r=null;if(typeof d.min.x<"u"&&typeof d.max.x<"u"&&(t.min.x>d.max.x?h=d.min.x-t.max.x:t.max.x<d.min.x&&(h=d.max.x-t.min.x)),typeof d.min.y<"u"&&typeof d.max.y<"u"&&(t.min.y>d.max.y?r=d.min.y-t.max.y:t.max.y<d.min.y&&(r=d.max.y-t.min.y)),h!==null||r!==null)return{x:h||0,y:r||0}}}()},74058:(p,S,t)=>{var d={};p.exports=d,t(15647);var c=t(53402);(function(){d.pathToVertices=function(h,r){typeof window<"u"&&!("SVGPathSeg"in window)&&c.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var n,e,s,o,i,a,l,u,f,v,m=[],g,x,y=0,T=0,C=0;r=r||15;var E=function(P,A,R){var F=R%2===1&&R>1;if(!f||P!=f.x||A!=f.y){f&&F?(g=f.x,x=f.y):(g=0,x=0);var w={x:g+P,y:x+A};(F||!f)&&(f=w),m.push(w),T=g+P,C=x+A}},M=function(P){var A=P.pathSegTypeAsLetter.toUpperCase();if(A!=="Z"){switch(A){case"M":case"L":case"T":case"C":case"S":case"Q":T=P.x,C=P.y;break;case"H":T=P.x;break;case"V":C=P.y;break}E(T,C,P.pathSegType)}};for(d._svgPathToAbsolute(h),s=h.getTotalLength(),a=[],n=0;n<h.pathSegList.numberOfItems;n+=1)a.push(h.pathSegList.getItem(n));for(l=a.concat();y<s;){if(v=h.getPathSegAtLength(y),i=a[v],i!=u){for(;l.length&&l[0]!=i;)M(l.shift());u=i}switch(i.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":o=h.getPointAtLength(y),E(o.x,o.y,0);break}y+=r}for(n=0,e=l.length;n<e;++n)M(l[n]);return m},d._svgPathToAbsolute=function(h){for(var r,n,e,s,o,i,a=h.pathSegList,l=0,u=0,f=a.numberOfItems,v=0;v<f;++v){var m=a.getItem(v),g=m.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(g))"x"in m&&(l=m.x),"y"in m&&(u=m.y);else switch("x1"in m&&(e=l+m.x1),"x2"in m&&(o=l+m.x2),"y1"in m&&(s=u+m.y1),"y2"in m&&(i=u+m.y2),"x"in m&&(l+=m.x),"y"in m&&(u+=m.y),g){case"m":a.replaceItem(h.createSVGPathSegMovetoAbs(l,u),v);break;case"l":a.replaceItem(h.createSVGPathSegLinetoAbs(l,u),v);break;case"h":a.replaceItem(h.createSVGPathSegLinetoHorizontalAbs(l),v);break;case"v":a.replaceItem(h.createSVGPathSegLinetoVerticalAbs(u),v);break;case"c":a.replaceItem(h.createSVGPathSegCurvetoCubicAbs(l,u,e,s,o,i),v);break;case"s":a.replaceItem(h.createSVGPathSegCurvetoCubicSmoothAbs(l,u,o,i),v);break;case"q":a.replaceItem(h.createSVGPathSegCurvetoQuadraticAbs(l,u,e,s),v);break;case"t":a.replaceItem(h.createSVGPathSegCurvetoQuadraticSmoothAbs(l,u),v);break;case"a":a.replaceItem(h.createSVGPathSegArcAbs(l,u,m.r1,m.r2,m.angle,m.largeArcFlag,m.sweepFlag),v);break;case"z":case"Z":l=r,u=n;break}(g=="M"||g=="m")&&(r=l,n=u)}}})()},31725:p=>{var S={};p.exports=S,function(){S.create=function(t,d){return{x:t||0,y:d||0}},S.clone=function(t){return{x:t.x,y:t.y}},S.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},S.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},S.rotate=function(t,d,c){var h=Math.cos(d),r=Math.sin(d);c||(c={});var n=t.x*h-t.y*r;return c.y=t.x*r+t.y*h,c.x=n,c},S.rotateAbout=function(t,d,c,h){var r=Math.cos(d),n=Math.sin(d);h||(h={});var e=c.x+((t.x-c.x)*r-(t.y-c.y)*n);return h.y=c.y+((t.x-c.x)*n+(t.y-c.y)*r),h.x=e,h},S.normalise=function(t){var d=S.magnitude(t);return d===0?{x:0,y:0}:{x:t.x/d,y:t.y/d}},S.dot=function(t,d){return t.x*d.x+t.y*d.y},S.cross=function(t,d){return t.x*d.y-t.y*d.x},S.cross3=function(t,d,c){return(d.x-t.x)*(c.y-t.y)-(d.y-t.y)*(c.x-t.x)},S.add=function(t,d,c){return c||(c={}),c.x=t.x+d.x,c.y=t.y+d.y,c},S.sub=function(t,d,c){return c||(c={}),c.x=t.x-d.x,c.y=t.y-d.y,c},S.mult=function(t,d){return{x:t.x*d,y:t.y*d}},S.div=function(t,d){return{x:t.x/d,y:t.y/d}},S.perp=function(t,d){return d=d===!0?-1:1,{x:d*-t.y,y:d*t.x}},S.neg=function(t){return{x:-t.x,y:-t.y}},S.angle=function(t,d){return Math.atan2(d.y-t.y,d.x-t.x)},S._temp=[S.create(),S.create(),S.create(),S.create(),S.create(),S.create()]}()},41598:(p,S,t)=>{var d={};p.exports=d;var c=t(31725),h=t(53402);(function(){d.create=function(r,n){for(var e=[],s=0;s<r.length;s++){var o=r[s],i={x:o.x,y:o.y,index:s,body:n,isInternal:!1};e.push(i)}return e},d.fromPath=function(r,n){var e=/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig,s=[];return r.replace(e,function(o,i,a){s.push({x:parseFloat(i),y:parseFloat(a)})}),d.create(s,n)},d.centre=function(r){for(var n=d.area(r,!0),e={x:0,y:0},s,o,i,a=0;a<r.length;a++)i=(a+1)%r.length,s=c.cross(r[a],r[i]),o=c.mult(c.add(r[a],r[i]),s),e=c.add(e,o);return c.div(e,6*n)},d.mean=function(r){for(var n={x:0,y:0},e=0;e<r.length;e++)n.x+=r[e].x,n.y+=r[e].y;return c.div(n,r.length)},d.area=function(r,n){for(var e=0,s=r.length-1,o=0;o<r.length;o++)e+=(r[s].x-r[o].x)*(r[s].y+r[o].y),s=o;return n?e/2:Math.abs(e)/2},d.inertia=function(r,n){for(var e=0,s=0,o=r,i,a,l=0;l<o.length;l++)a=(l+1)%o.length,i=Math.abs(c.cross(o[a],o[l])),e+=i*(c.dot(o[a],o[a])+c.dot(o[a],o[l])+c.dot(o[l],o[l])),s+=i;return n/6*(e/s)},d.translate=function(r,n,e){e=typeof e<"u"?e:1;var s=r.length,o=n.x*e,i=n.y*e,a;for(a=0;a<s;a++)r[a].x+=o,r[a].y+=i;return r},d.rotate=function(r,n,e){if(n!==0){var s=Math.cos(n),o=Math.sin(n),i=e.x,a=e.y,l=r.length,u,f,v,m;for(m=0;m<l;m++)u=r[m],f=u.x-i,v=u.y-a,u.x=i+(f*s-v*o),u.y=a+(f*o+v*s);return r}},d.contains=function(r,n){for(var e=n.x,s=n.y,o=r.length,i=r[o-1],a,l=0;l<o;l++){if(a=r[l],(e-i.x)*(a.y-i.y)+(s-i.y)*(i.x-a.x)>0)return!1;i=a}return!0},d.scale=function(r,n,e,s){if(n===1&&e===1)return r;s=s||d.centre(r);for(var o,i,a=0;a<r.length;a++)o=r[a],i=c.sub(o,s),r[a].x=s.x+i.x*n,r[a].y=s.y+i.y*e;return r},d.chamfer=function(r,n,e,s,o){typeof n=="number"?n=[n]:n=n||[8],e=typeof e<"u"?e:-1,s=s||2,o=o||14;for(var i=[],a=0;a<r.length;a++){var l=r[a-1>=0?a-1:r.length-1],u=r[a],f=r[(a+1)%r.length],v=n[a<n.length?a:n.length-1];if(v===0){i.push(u);continue}var m=c.normalise({x:u.y-l.y,y:l.x-u.x}),g=c.normalise({x:f.y-u.y,y:u.x-f.x}),x=Math.sqrt(2*Math.pow(v,2)),y=c.mult(h.clone(m),v),T=c.normalise(c.mult(c.add(m,g),.5)),C=c.sub(u,c.mult(T,x)),E=e;e===-1&&(E=Math.pow(v,.32)*1.75),E=h.clamp(E,s,o),E%2===1&&(E+=1);for(var M=Math.acos(c.dot(m,g)),P=M/E,A=0;A<E;A++)i.push(c.add(c.rotate(y,P*A),C))}return i},d.clockwiseSort=function(r){var n=d.mean(r);return r.sort(function(e,s){return c.angle(n,e)-c.angle(n,s)}),r},d.isConvex=function(r){var n=0,e=r.length,s,o,i,a;if(e<3)return null;for(s=0;s<e;s++)if(o=(s+1)%e,i=(s+2)%e,a=(r[o].x-r[s].x)*(r[i].y-r[o].y),a-=(r[o].y-r[s].y)*(r[i].x-r[o].x),a<0?n|=1:a>0&&(n|=2),n===3)return!1;return n!==0?!0:null},d.hull=function(r){var n=[],e=[],s,o;for(r=r.slice(0),r.sort(function(i,a){var l=i.x-a.x;return l!==0?l:i.y-a.y}),o=0;o<r.length;o+=1){for(s=r[o];e.length>=2&&c.cross3(e[e.length-2],e[e.length-1],s)<=0;)e.pop();e.push(s)}for(o=r.length-1;o>=0;o-=1){for(s=r[o];n.length>=2&&c.cross3(n[n.length-2],n[n.length-1],s)<=0;)n.pop();n.push(s)}return n.pop(),e.pop(),n.concat(e)}})()},55973:p=>{/**
* @author Stefan Hedman <schteppe@gmail.com> (http://steffe.se)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={decomp:M,quickDecomp:F,isSimple:A,removeCollinearPoints:w,removeDuplicatePoints:B,makeCCW:f};function S(D,I,O){O=O||0;var L=[0,0],G,z,X,V,Y,W,H;return G=D[1][1]-D[0][1],z=D[0][0]-D[1][0],X=G*D[0][0]+z*D[0][1],V=I[1][1]-I[0][1],Y=I[0][0]-I[1][0],W=V*I[0][0]+Y*I[0][1],H=G*Y-V*z,N(H,0,O)||(L[0]=(Y*X-z*W)/H,L[1]=(G*W-V*X)/H),L}function t(D,I,O,L){var G=I[0]-D[0],z=I[1]-D[1],X=L[0]-O[0],V=L[1]-O[1];if(X*z-V*G===0)return!1;var Y=(G*(O[1]-D[1])+z*(D[0]-O[0]))/(X*z-V*G),W=(X*(D[1]-O[1])+V*(O[0]-D[0]))/(V*G-X*z);return Y>=0&&Y<=1&&W>=0&&W<=1}function d(D,I,O){return(I[0]-D[0])*(O[1]-D[1])-(O[0]-D[0])*(I[1]-D[1])}function c(D,I,O){return d(D,I,O)>0}function h(D,I,O){return d(D,I,O)>=0}function r(D,I,O){return d(D,I,O)<0}function n(D,I,O){return d(D,I,O)<=0}var e=[],s=[];function o(D,I,O,L){if(L){var G=e,z=s;G[0]=I[0]-D[0],G[1]=I[1]-D[1],z[0]=O[0]-I[0],z[1]=O[1]-I[1];var X=G[0]*z[0]+G[1]*z[1],V=Math.sqrt(G[0]*G[0]+G[1]*G[1]),Y=Math.sqrt(z[0]*z[0]+z[1]*z[1]),W=Math.acos(X/(V*Y));return W<L}else return d(D,I,O)===0}function i(D,I){var O=I[0]-D[0],L=I[1]-D[1];return O*O+L*L}function a(D,I){var O=D.length;return D[I<0?I%O+O:I%O]}function l(D){D.length=0}function u(D,I,O,L){for(var G=O;G<L;G++)D.push(I[G])}function f(D){for(var I=0,O=D,L=1;L<D.length;++L)(O[L][1]<O[I][1]||O[L][1]===O[I][1]&&O[L][0]>O[I][0])&&(I=L);return c(a(D,I-1),a(D,I),a(D,I+1))?!1:(v(D),!0)}function v(D){for(var I=[],O=D.length,L=0;L!==O;L++)I.push(D.pop());for(var L=0;L!==O;L++)D[L]=I[L]}function m(D,I){return r(a(D,I-1),a(D,I),a(D,I+1))}var g=[],x=[];function y(D,I,O){var L,G,z=g,X=x;if(h(a(D,I+1),a(D,I),a(D,O))&&n(a(D,I-1),a(D,I),a(D,O)))return!1;G=i(a(D,I),a(D,O));for(var V=0;V!==D.length;++V)if(!((V+1)%D.length===I||V===I)&&h(a(D,I),a(D,O),a(D,V+1))&&n(a(D,I),a(D,O),a(D,V))&&(z[0]=a(D,I),z[1]=a(D,O),X[0]=a(D,V),X[1]=a(D,V+1),L=S(z,X),i(a(D,I),L)<G))return!1;return!0}function T(D,I,O){for(var L=0;L!==D.length;++L)if(!(L===I||L===O||(L+1)%D.length===I||(L+1)%D.length===O)&&t(a(D,I),a(D,O),a(D,L),a(D,L+1)))return!1;return!0}function C(D,I,O,L){var G=L||[];if(l(G),I<O)for(var z=I;z<=O;z++)G.push(D[z]);else{for(var z=0;z<=O;z++)G.push(D[z]);for(var z=I;z<D.length;z++)G.push(D[z])}return G}function E(D){for(var I=[],O=[],L=[],G=[],z=Number.MAX_VALUE,X=0;X<D.length;++X)if(m(D,X)){for(var V=0;V<D.length;++V)if(y(D,X,V)){O=E(C(D,X,V,G)),L=E(C(D,V,X,G));for(var Y=0;Y<L.length;Y++)O.push(L[Y]);O.length<z&&(I=O,z=O.length,I.push([a(D,X),a(D,V)]))}}return I}function M(D){var I=E(D);return I.length>0?P(D,I):[D]}function P(D,I){if(I.length===0)return[D];if(I instanceof Array&&I.length&&I[0]instanceof Array&&I[0].length===2&&I[0][0]instanceof Array){for(var O=[D],L=0;L<I.length;L++)for(var G=I[L],z=0;z<O.length;z++){var X=O[z],V=P(X,G);if(V){O.splice(z,1),O.push(V[0],V[1]);break}}return O}else{var G=I,L=D.indexOf(G[0]),z=D.indexOf(G[1]);return L!==-1&&z!==-1?[C(D,L,z),C(D,z,L)]:!1}}function A(D){var I=D,O;for(O=0;O<I.length-1;O++)for(var L=0;L<O-1;L++)if(t(I[O],I[O+1],I[L],I[L+1]))return!1;for(O=1;O<I.length-2;O++)if(t(I[0],I[I.length-1],I[O],I[O+1]))return!1;return!0}function R(D,I,O,L,G){G=G||0;var z=I[1]-D[1],X=D[0]-I[0],V=z*D[0]+X*D[1],Y=L[1]-O[1],W=O[0]-L[0],H=Y*O[0]+W*O[1],b=z*W-Y*X;return N(b,0,G)?[0,0]:[(W*V-X*H)/b,(z*H-Y*V)/b]}function F(D,I,O,L,G,z,X){z=z||100,X=X||0,G=G||25,I=typeof I<"u"?I:[],O=O||[],L=L||[];var V=[0,0],Y=[0,0],W=[0,0],H=0,b=0,K=0,Q=0,Z=0,$=0,q=0,_=[],tt=[],J=D,j=D;if(j.length<3)return I;if(X++,X>z)return console.warn("quickDecomp: max level ("+z+") reached."),I;for(var k=0;k<D.length;++k)if(m(J,k)){O.push(J[k]),H=b=Number.MAX_VALUE;for(var et=0;et<D.length;++et)c(a(J,k-1),a(J,k),a(J,et))&&n(a(J,k-1),a(J,k),a(J,et-1))&&(W=R(a(J,k-1),a(J,k),a(J,et),a(J,et-1)),r(a(J,k+1),a(J,k),W)&&(K=i(J[k],W),K<b&&(b=K,Y=W,$=et))),c(a(J,k+1),a(J,k),a(J,et+1))&&n(a(J,k+1),a(J,k),a(J,et))&&(W=R(a(J,k+1),a(J,k),a(J,et),a(J,et+1)),c(a(J,k-1),a(J,k),W)&&(K=i(J[k],W),K<H&&(H=K,V=W,Z=et)));if($===(Z+1)%D.length)W[0]=(Y[0]+V[0])/2,W[1]=(Y[1]+V[1])/2,L.push(W),k<Z?(u(_,J,k,Z+1),_.push(W),tt.push(W),$!==0&&u(tt,J,$,J.length),u(tt,J,0,k+1)):(k!==0&&u(_,J,k,J.length),u(_,J,0,Z+1),_.push(W),tt.push(W),u(tt,J,$,k+1));else{if($>Z&&(Z+=D.length),Q=Number.MAX_VALUE,Z<$)return I;for(var et=$;et<=Z;++et)h(a(J,k-1),a(J,k),a(J,et))&&n(a(J,k+1),a(J,k),a(J,et))&&(K=i(a(J,k),a(J,et)),K<Q&&T(J,k,et)&&(Q=K,q=et%D.length));k<q?(u(_,J,k,q+1),q!==0&&u(tt,J,q,j.length),u(tt,J,0,k+1)):(k!==0&&u(_,J,k,j.length),u(_,J,0,q+1),u(tt,J,q,k+1))}return _.length<tt.length?(F(_,I,O,L,G,z,X),F(tt,I,O,L,G,z,X)):(F(tt,I,O,L,G,z,X),F(_,I,O,L,G,z,X)),I}return I.push(D),I}function w(D,I){for(var O=0,L=D.length-1;D.length>3&&L>=0;--L)o(a(D,L-1),a(D,L),a(D,L+1),I)&&(D.splice(L%D.length,1),O++);return O}function B(D,I){for(var O=D.length-1;O>=1;--O)for(var L=D[O],G=O-1;G>=0;--G)if(U(L,D[G],I)){D.splice(O,1);continue}}function N(D,I,O){return O=O||0,Math.abs(D-I)<=O}function U(D,I,O){return N(D[0],I[0],O)&&N(D[1],I[1],O)}},52018:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}
*/var d=t(83419),c=new d({initialize:function(r){this.pluginManager=r,this.game=r.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});p.exports=c},42363:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};p.exports=S},37277:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={},t={},d={};d.register=function(c,h,r,n){n===void 0&&(n=!1),S[c]={plugin:h,mapping:r,custom:n}},d.registerCustom=function(c,h,r,n){t[c]={plugin:h,mapping:r,data:n}},d.hasCore=function(c){return S.hasOwnProperty(c)},d.hasCustom=function(c){return t.hasOwnProperty(c)},d.getCore=function(c){return S[c]},d.getCustom=function(c){return t[c]},d.getCustomClass=function(c){return t.hasOwnProperty(c)?t[c].plugin:null},d.remove=function(c){S.hasOwnProperty(c)&&delete S[c]},d.removeCustom=function(c){t.hasOwnProperty(c)&&delete t[c]},d.destroyCorePlugins=function(){for(var c in S)S.hasOwnProperty(c)&&delete S[c]},d.destroyCustomPlugins=function(){for(var c in t)t.hasOwnProperty(c)&&delete t[c]},p.exports=d},77332:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(8443),h=t(50792),r=t(74099),n=t(44603),e=t(39429),s=t(95540),o=t(37277),i=t(72905),a=new d({Extends:h,initialize:function(u){h.call(this),this.game=u,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],u.isBooted?this.boot():u.events.once(c.BOOT,this.boot,this)},boot:function(){var l,u,f,v,m,g,x,y=this.game.config,T=y.installGlobalPlugins;for(T=T.concat(this._pendingGlobal),l=0;l<T.length;l++)u=T[l],f=s(u,"key",null),v=s(u,"plugin",null),m=s(u,"start",!1),g=s(u,"mapping",null),x=s(u,"data",null),f&&(v?this.install(f,v,m,g,x):console.warn("Missing `plugin` for key: "+f));for(T=y.installScenePlugins,T=T.concat(this._pendingScene),l=0;l<T.length;l++)u=T[l],f=s(u,"key",null),v=s(u,"plugin",null),g=s(u,"mapping",null),f&&(v?this.installScenePlugin(f,v,g):console.warn("Missing `plugin` for key: "+f));this._pendingGlobal=[],this._pendingScene=[],this.game.events.once(c.DESTROY,this.destroy,this)},addToScene:function(l,u,f){var v,m,g,x=this.game,y=l.scene,T=l.settings.map,C=l.settings.isBooted;for(v=0;v<u.length;v++)m=u[v],x[m]?(l[m]=x[m],T.hasOwnProperty(m)&&(y[T[m]]=l[m])):m==="game"&&T.hasOwnProperty(m)&&(y[T[m]]=x);for(var E=0;E<f.length;E++)for(g=f[E],v=0;v<g.length;v++)if(m=g[v],!!o.hasCore(m)){var M=o.getCore(m),P=M.mapping,A=new M.plugin(y,this,P);l[P]=A,M.custom?y[P]=A:T.hasOwnProperty(P)&&(y[T[P]]=A),C&&A.boot()}for(g=this.plugins,v=0;v<g.length;v++){var R=g[v];R.mapping&&(y[R.mapping]=R.plugin)}},getDefaultScenePlugins:function(){var l=this.game.config.defaultPlugins;return l=l.concat(this.scenePlugins),l},installScenePlugin:function(l,u,f,v,m){if(m===void 0&&(m=!1),typeof u!="function"){console.warn("Invalid Scene Plugin: "+l);return}if(o.hasCore(l)||o.register(l,u,f,!0),this.scenePlugins.indexOf(l)===-1)this.scenePlugins.push(l);else if(!m&&o.hasCore(l)){console.warn("Scene Plugin key in use: "+l);return}if(v){var g=new u(v,this,l);v.sys[l]=g,f&&f!==""&&(v[f]=g),g.boot()}},install:function(l,u,f,v,m){if(f===void 0&&(f=!1),v===void 0&&(v=null),m===void 0&&(m=null),typeof u!="function")return console.warn("Invalid Plugin: "+l),null;if(o.hasCustom(l))return console.warn("Plugin key in use: "+l),null;if(v!==null&&(f=!0),!this.game.isBooted)this._pendingGlobal.push({key:l,plugin:u,start:f,mapping:v,data:m});else if(o.registerCustom(l,u,v,m),f)return this.start(l);return null},getIndex:function(l){for(var u=this.plugins,f=0;f<u.length;f++){var v=u[f];if(v.key===l)return f}return-1},getEntry:function(l){var u=this.getIndex(l);if(u!==-1)return this.plugins[u]},isActive:function(l){var u=this.getEntry(l);return u&&u.active},start:function(l,u){u===void 0&&(u=l);var f=this.getEntry(u);return f&&!f.active?(f.active=!0,f.plugin.start()):f||(f=this.createEntry(l,u)),f?f.plugin:null},createEntry:function(l,u){var f=o.getCustom(l);if(f){var v=new f.plugin(this);f={key:u,plugin:v,active:!0,mapping:f.mapping,data:f.data},this.plugins.push(f),v.init(f.data),v.start()}return f},stop:function(l){var u=this.getEntry(l);return u&&u.active&&(u.active=!1,u.plugin.stop()),this},get:function(l,u){u===void 0&&(u=!0);var f=this.getEntry(l);if(f)return f.plugin;var v=this.getClass(l);return v&&u?(f=this.createEntry(l,l),f?f.plugin:null):v||null},getClass:function(l){return o.getCustomClass(l)},removeGlobalPlugin:function(l){var u=this.getEntry(l);u&&i(this.plugins,u),o.removeCustom(l)},removeScenePlugin:function(l){i(this.scenePlugins,l),o.remove(l)},registerGameObject:function(l,u,f){return u&&e.register(l,u),f&&n.register(l,f),this},removeGameObject:function(l,u,f){return u===void 0&&(u=!0),f===void 0&&(f=!0),u&&e.remove(l),f&&n.remove(l),this},registerFileType:function(l,u,f){r.register(l,u),f&&f.sys.load&&(f.sys.load[l]=u)},destroy:function(){for(var l=0;l<this.plugins.length;l++)this.plugins[l].plugin.destroy();o.destroyCustomPlugins(),this.game.noReturn&&o.destroyCorePlugins(),this.game=null,this.plugins=[],this.scenePlugins=[]}});p.exports=a},45145:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}
*/var d=t(52018),c=t(83419),h=t(44594),r=new c({Extends:d,initialize:function(e,s,o){d.call(this,s),this.scene=e,this.systems=e.sys,this.pluginKey=o,e.sys.events.once(h.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});p.exports=r},18922:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={BasePlugin:t(52018),DefaultPlugins:t(42363),PluginCache:t(37277),PluginManager:t(77332),ScenePlugin:t(45145)}},63595:()=>{typeof HTMLVideoElement<"u"&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(p){const S=performance.now(),t=this.getVideoPlaybackQuality(),d=this.mozPresentedFrames||this.mozPaintedFrames||t.totalVideoFrames-t.droppedVideoFrames,c=(h,r)=>{const n=this.getVideoPlaybackQuality(),e=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames;if(e>d){const s=this.mozFrameDelay||n.totalFrameDelay-t.totalFrameDelay||0,o=r-h;p(r,{presentationTime:r+s*1e3,expectedDisplayTime:r+o,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+o/1e3,presentedFrames:e,processingDuration:s}),delete this._rvfcpolyfillmap[S]}else this._rvfcpolyfillmap[S]=requestAnimationFrame(s=>c(r,s))};return this._rvfcpolyfillmap[S]=requestAnimationFrame(h=>c(S,h)),S},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(p){cancelAnimationFrame(this._rvfcpolyfillmap[p]),delete this._rvfcpolyfillmap[p]})},10312:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},29795:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={DEFAULT:0,LINEAR:0,NEAREST:1};p.exports=S},68627:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Felipe Alfonso <@bitnenfer>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(19715),c=t(32880),h=t(83419),r=t(8054),n=t(50792),e=t(92503),s=t(56373),o=t(97480),i=t(69442),a=t(61340),l=new h({Extends:n,initialize:function(f){n.call(this);var v=f.config;this.config={clearBeforeRender:v.clearBeforeRender,backgroundColor:v.backgroundColor,antialias:v.antialias,roundPixels:v.roundPixels},this.game=f,this.type=r.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=f.canvas;var m={alpha:f.config.transparent,desynchronized:f.config.desynchronized,willReadFrequently:!1};this.gameContext=v.context?v.context:this.gameCanvas.getContext("2d",m),this.currentContext=this.gameContext,this.antialias=f.config.antialias,this.blendModes=s(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new a,this._tempMatrix2=new a,this._tempMatrix3=new a,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(i.READY,this.boot,this)},boot:function(){var u=this.game,f=u.scale.baseSize;this.width=f.width,this.height=f.height,this.isBooted=!0,u.scale.on(o.RESIZE,this.onResize,this),this.resize(f.width,f.height)},onResize:function(u,f){(f.width!==this.width||f.height!==this.height)&&this.resize(f.width,f.height)},resize:function(u,f){this.width=u,this.height=f,this.emit(e.RESIZE,u,f)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(u){return this.currentContext.globalCompositeOperation=u,this},setContext:function(u){return this.currentContext=u||this.gameContext,this},setAlpha:function(u){return this.currentContext.globalAlpha=u,this},preRender:function(){var u=this.gameContext,f=this.config,v=this.width,m=this.height;u.globalAlpha=1,u.globalCompositeOperation="source-over",u.setTransform(1,0,0,1,0,0),this.emit(e.PRE_RENDER_CLEAR),f.clearBeforeRender&&(u.clearRect(0,0,v,m),f.transparent||(u.fillStyle=f.backgroundColor.rgba,u.fillRect(0,0,v,m))),u.save(),this.drawCount=0,this.emit(e.PRE_RENDER)},render:function(u,f,v){var m=f.length;this.emit(e.RENDER,u,v);var g=v.x,x=v.y,y=v.width,T=v.height,C=v.renderToTexture?v.context:u.sys.context;C.save(),this.game.scene.customViewports&&(C.beginPath(),C.rect(g,x,y,T),C.clip()),v.emit(d.PRE_RENDER,v),this.currentContext=C;var E=v.mask;E&&E.preRenderCanvas(this,null,v._maskCamera),v.transparent||(C.fillStyle=v.backgroundColor.rgba,C.fillRect(g,x,y,T)),C.globalAlpha=v.alpha,C.globalCompositeOperation="source-over",this.drawCount+=m,v.renderToTexture&&v.emit(d.PRE_RENDER,v),v.matrix.copyToContext(C);for(var M=0;M<m;M++){var P=f[M];P.mask&&P.mask.preRenderCanvas(this,P,v),P.renderCanvas(this,P,v),P.mask&&P.mask.postRenderCanvas(this,P,v)}C.setTransform(1,0,0,1,0,0),C.globalCompositeOperation="source-over",C.globalAlpha=1,v.flashEffect.postRenderCanvas(C),v.fadeEffect.postRenderCanvas(C),v.dirty=!1,E&&E.postRenderCanvas(this),C.restore(),v.renderToTexture&&(v.emit(d.POST_RENDER,v),v.renderToGame&&u.sys.context.drawImage(v.canvas,g,x)),v.emit(d.POST_RENDER,v)},postRender:function(){var u=this.gameContext;u.restore(),this.emit(e.POST_RENDER);var f=this.snapshotState;f.callback&&(c(this.gameCanvas,f),f.callback=null)},snapshotCanvas:function(u,f,v,m,g,x,y,T,C){v===void 0&&(v=!1),this.snapshotArea(m,g,x,y,f,T,C);var E=this.snapshotState;return E.getPixel=v,c(u,E),E.callback=null,this},snapshot:function(u,f,v){return this.snapshotArea(0,0,this.gameCanvas.width,this.gameCanvas.height,u,f,v)},snapshotArea:function(u,f,v,m,g,x,y){var T=this.snapshotState;return T.callback=g,T.type=x,T.encoder=y,T.getPixel=!1,T.x=u,T.y=f,T.width=Math.min(v,this.gameCanvas.width),T.height=Math.min(m,this.gameCanvas.height),this},snapshotPixel:function(u,f,v){return this.snapshotArea(u,f,1,1,v),this.snapshotState.getPixel=!0,this},batchSprite:function(u,f,v,m){var g=v.alpha*u.alpha;if(g!==0){var x=this.currentContext,y=this._tempMatrix1,T=this._tempMatrix2,C=f.canvasData,E=C.x,M=C.y,P=f.cutWidth,A=f.cutHeight,R=f.customPivot,F=f.source.resolution,w=u.displayOriginX,B=u.displayOriginY,N=-w+f.x,U=-B+f.y;if(u.isCropped){var D=u._crop;(D.flipX!==u.flipX||D.flipY!==u.flipY)&&f.updateCropUVs(D,u.flipX,u.flipY),P=D.cw,A=D.ch,E=D.cx,M=D.cy,N=-w+D.x,U=-B+D.y,u.flipX&&(N>=0?N=-(N+P):N<0&&(N=Math.abs(N)-P)),u.flipY&&(U>=0?U=-(U+A):U<0&&(U=Math.abs(U)-A))}var I=1,O=1;u.flipX&&(R||(N+=-f.realWidth+w*2),I=-1),u.flipY&&(R||(U+=-f.realHeight+B*2),O=-1);var L=u.x,G=u.y;if(v.roundPixels&&(L=Math.floor(L),G=Math.floor(G)),T.applyITRS(L,G,u.rotation,u.scaleX*I,u.scaleY*O),y.copyFrom(v.matrix),m?(y.multiplyWithOffset(m,-v.scrollX*u.scrollFactorX,-v.scrollY*u.scrollFactorY),T.e=L,T.f=G):(T.e-=v.scrollX*u.scrollFactorX,T.f-=v.scrollY*u.scrollFactorY),y.multiply(T),v.renderRoundPixels&&(y.e=Math.floor(y.e+.5),y.f=Math.floor(y.f+.5)),x.save(),y.setToContext(x),x.globalCompositeOperation=this.blendModes[u.blendMode],x.globalAlpha=g,x.imageSmoothingEnabled=!f.source.scaleMode,u.mask&&u.mask.preRenderCanvas(this,u,v),P>0&&A>0){var z=P/F,X=A/F;v.roundPixels&&(N=Math.floor(N+.5),U=Math.floor(U+.5),z+=.5,X+=.5),x.drawImage(f.source.image,E,M,P,A,N,U,z,X)}u.mask&&u.mask.postRenderCanvas(this,u,v),x.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});p.exports=l},55830:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={CanvasRenderer:t(68627),GetBlendModes:t(56373),SetTransform:t(20926)}},56373:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(10312),c=t(89289),h=function(){var r=[],n=c.supportNewBlendModes,e="source-over";return r[d.NORMAL]=e,r[d.ADD]="lighter",r[d.MULTIPLY]=n?"multiply":e,r[d.SCREEN]=n?"screen":e,r[d.OVERLAY]=n?"overlay":e,r[d.DARKEN]=n?"darken":e,r[d.LIGHTEN]=n?"lighten":e,r[d.COLOR_DODGE]=n?"color-dodge":e,r[d.COLOR_BURN]=n?"color-burn":e,r[d.HARD_LIGHT]=n?"hard-light":e,r[d.SOFT_LIGHT]=n?"soft-light":e,r[d.DIFFERENCE]=n?"difference":e,r[d.EXCLUSION]=n?"exclusion":e,r[d.HUE]=n?"hue":e,r[d.SATURATION]=n?"saturation":e,r[d.COLOR]=n?"color":e,r[d.LUMINOSITY]=n?"luminosity":e,r[d.ERASE]="destination-out",r[d.SOURCE_IN]="source-in",r[d.SOURCE_OUT]="source-out",r[d.SOURCE_ATOP]="source-atop",r[d.DESTINATION_OVER]="destination-over",r[d.DESTINATION_IN]="destination-in",r[d.DESTINATION_OUT]="destination-out",r[d.DESTINATION_ATOP]="destination-atop",r[d.LIGHTER]="lighter",r[d.COPY]="copy",r[d.XOR]="xor",r};p.exports=h},20926:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91296),c=function(h,r,n,e,s){var o=e.alpha*n.alpha;if(o<=0)return!1;var i=d(n,e,s).calc;return r.globalCompositeOperation=h.blendModes[n.blendMode],r.globalAlpha=o,r.save(),i.setToContext(r),r.imageSmoothingEnabled=n.frame?!n.frame.source.scaleMode:h.antialias,!0};p.exports=c},63899:p=>{/**
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="losewebgl"},6119:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="postrender"},48070:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="prerender"},15640:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="render"},8912:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="resize"},87124:p=>{/**
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="restorewebgl"},92503:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={LOSE_WEBGL:t(63899),POST_RENDER:t(6119),PRE_RENDER:t(48070),RENDER:t(15640),RESIZE:t(8912),RESTORE_WEBGL:t(87124)}},36909:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Events:t(92503),Snapshot:t(89966)},p.exports.Canvas=t(55830),p.exports.WebGL=t(4159)},32880:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(27919),c=t(40987),h=t(95540),r=function(n,e){var s=h(e,"callback"),o=h(e,"type","image/png"),i=h(e,"encoder",.92),a=Math.abs(Math.round(h(e,"x",0))),l=Math.abs(Math.round(h(e,"y",0))),u=Math.floor(h(e,"width",n.width)),f=Math.floor(h(e,"height",n.height)),v=h(e,"getPixel",!1);if(v){var m=n.getContext("2d",{willReadFrequently:!1}),g=m.getImageData(a,l,1,1),x=g.data;s.call(null,new c(x[0],x[1],x[2],x[3]))}else if(a!==0||l!==0||u!==n.width||f!==n.height){var y=d.createWebGL(this,u,f),T=y.getContext("2d",{willReadFrequently:!0});u>0&&f>0&&T.drawImage(n,a,l,u,f,0,0,u,f);var C=new Image;C.onerror=function(){s.call(null),d.remove(y)},C.onload=function(){s.call(null,C),d.remove(y)},C.src=y.toDataURL(o,i)}else{var E=new Image;E.onerror=function(){s.call(null)},E.onload=function(){s.call(null,E)},E.src=n.toDataURL(o,i)}};p.exports=r},88815:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(27919),c=t(40987),h=t(95540),r=function(n,e){var s=n,o=h(e,"callback"),i=h(e,"type","image/png"),a=h(e,"encoder",.92),l=Math.abs(Math.round(h(e,"x",0))),u=Math.abs(Math.round(h(e,"y",0))),f=h(e,"getPixel",!1),v=h(e,"isFramebuffer",!1),m=v?h(e,"bufferWidth",1):s.drawingBufferWidth,g=v?h(e,"bufferHeight",1):s.drawingBufferHeight;if(f){var x=new Uint8Array(4),y=v?u:g-u;s.readPixels(l,y,1,1,s.RGBA,s.UNSIGNED_BYTE,x),o.call(null,new c(x[0],x[1],x[2],x[3]))}else{var T=Math.floor(h(e,"width",m)),C=Math.floor(h(e,"height",g)),E=T*C*4,M=new Uint8Array(E);s.readPixels(l,g-u-C,T,C,s.RGBA,s.UNSIGNED_BYTE,M);for(var P=d.createWebGL(this,T,C),A=P.getContext("2d",{willReadFrequently:!0}),R=A.getImageData(0,0,T,C),F=R.data,w=0;w<C;w++)for(var B=0;B<T;B++){var N=((C-w-1)*T+B)*4,U=v?E-(w*T+(T-B))*4:(w*T+B)*4;F[U+0]=M[N+0],F[U+1]=M[N+1],F[U+2]=M[N+2],F[U+3]=M[N+3]}A.putImageData(R,0,0);var D=new Image;D.onerror=function(){o.call(null),d.remove(P)},D.onload=function(){o.call(null,D),d.remove(P)},D.src=P.toDataURL(i,a)}};p.exports=r},89966:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Canvas:t(32880),WebGL:t(88815)}},7530:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(36060),h=t(90330),r=t(82264),n=t(95540),e=t(32302),s=t(63448),o=t(31302),i=t(58918),a=t(14811),l=t(92651),u=t(96569),f=t(56527),v=t(57516),m=t(43439),g=t(81041),x=t(12385),y=t(7589),T=t(95428),C=t(72905),E=new d({initialize:function(P){this.game=P.game,this.renderer=P,this.classes=new h([[c.UTILITY_PIPELINE,y],[c.MULTI_PIPELINE,v],[c.BITMAPMASK_PIPELINE,o],[c.SINGLE_PIPELINE,x],[c.ROPE_PIPELINE,g],[c.LIGHT_PIPELINE,u],[c.POINTLIGHT_PIPELINE,m],[c.MOBILE_PIPELINE,f]]),this.postPipelineClasses=new h,this.pipelines=new h,this.postPipelineInstances=[],this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(M,P,A){var R=this.renderer,F=this.renderTargets;this.frameInc=Math.floor(n(M,"frameInc",32));var w=R.width,B=R.height,N=this.game.config.disablePreFX,U=this.game.config.disablePostFX;if(U||this.postPipelineClasses.setAll([[String(a.BARREL),i.Barrel],[String(a.BLOOM),i.Bloom],[String(a.BLUR),i.Blur],[String(a.BOKEH),i.Bokeh],[String(a.CIRCLE),i.Circle],[String(a.COLOR_MATRIX),i.ColorMatrix],[String(a.DISPLACEMENT),i.Displacement],[String(a.GLOW),i.Glow],[String(a.GRADIENT),i.Gradient],[String(a.PIXELATE),i.Pixelate],[String(a.SHADOW),i.Shadow],[String(a.SHINE),i.Shine],[String(a.VIGNETTE),i.Vignette],[String(a.WIPE),i.Wipe]]),!N){this.classes.set(c.FX_PIPELINE,l);for(var D=Math.min(w,B),I=Math.ceil(D/this.frameInc),O=1;O<I;O++){var L=O*this.frameInc;F.push(new e(R,L,L)),F.push(new e(R,L,L)),F.push(new e(R,L,L)),this.maxDimension=L}F.push(new e(R,w,B,1,0,!0,!0)),F.push(new e(R,w,B,1,0,!0,!0)),F.push(new e(R,w,B,1,0,!0,!0))}var G,z,X=this,V=this.game;if(this.classes.each(function(W,H){G=X.add(W,new H({game:V})),W===c.UTILITY_PIPELINE&&(X.UTILITY_PIPELINE=G,X.fullFrame1=G.fullFrame1,X.fullFrame2=G.fullFrame2,X.halfFrame1=G.halfFrame1,X.halfFrame2=G.halfFrame2)}),this.MULTI_PIPELINE=this.get(c.MULTI_PIPELINE),this.BITMAPMASK_PIPELINE=this.get(c.BITMAPMASK_PIPELINE),this.MOBILE_PIPELINE=this.get(c.MOBILE_PIPELINE),N||(this.FX_PIPELINE=this.get(c.FX_PIPELINE)),M)for(z in M){var Y=M[z];G=new Y(V),G.name=z,G.isPostFX?this.postPipelineClasses.set(z,Y):this.has(z)||(this.classes.set(z,Y),this.add(z,G))}this.default=this.get(P),A&&!r.os.desktop&&(this.default=this.MOBILE_PIPELINE)},setDefaultPipeline:function(M){var P=this.get(M);return P&&(this.default=P),P},add:function(M,P){if(P.isPostFX){console.warn(M+" is a Post Pipeline. Use `addPostPipeline` instead");return}var A=this.pipelines,R=this.renderer;return A.has(M)?console.warn("Pipeline exists: "+M):(P.name=M,P.manager=this,A.set(M,P)),P.hasBooted||P.boot(),R.width!==0&&R.height!==0&&!P.isPreFX&&P.resize(R.width,R.height),P},addPostPipeline:function(M,P){this.postPipelineClasses.has(M)||this.postPipelineClasses.set(M,P)},flush:function(){this.current&&this.current.flush()},has:function(M){var P=this.pipelines;return typeof M=="string"?P.has(M):!!P.contains(M)},get:function(M){var P=this.pipelines;if(typeof M=="string")return P.get(M);if(P.contains(M))return M},getPostPipeline:function(M,P,A){var R=this.postPipelineClasses,F,w="",B=typeof M;if(B==="string"||B==="number"?(F=R.get(M),w=M):B==="function"?(R.contains(M)&&(F=M),w=M.name):B==="object"&&(F=R.get(M.name),w=M.name),F){var N=new F(this.game,A);return N.name=w,P&&(N.gameObject=P),this.postPipelineInstances.push(N),N}},removePostPipeline:function(M){C(this.postPipelineInstances,M)},remove:function(M,P,A){P===void 0&&(P=!0),A===void 0&&(A=!0),this.pipelines.delete(M),P&&this.classes.delete(M),A&&this.postPipelineClasses.delete(M)},set:function(M,P,A){if(!M.isPostFX)return this.isCurrent(M,A)||(this.flush(),this.current&&this.current.unbind(),this.current=M,M.bind(A)),M.updateProjectionMatrix(),M.onBind(P),M},preBatch:function(M){if(M.hasPostPipeline){this.flush();for(var P=M.postPipelines,A=P.length-1;A>=0;A--){var R=P[A];R.active&&R.preBatch(M)}}},postBatch:function(M){if(M.hasPostPipeline){this.flush();for(var P=M.postPipelines,A=0;A<P.length;A++){var R=P[A];R.active&&R.postBatch(M)}}},preBatchCamera:function(M){if(M.hasPostPipeline){this.flush();for(var P=M.postPipelines,A=P.length-1;A>=0;A--){var R=P[A];R.active&&R.preBatch(M)}}},postBatchCamera:function(M){if(M.hasPostPipeline){this.flush();for(var P=M.postPipelines,A=0;A<P.length;A++){var R=P[A];R.active&&R.postBatch(M)}}},isCurrent:function(M,P){var A=this.renderer,R=this.current;return R&&!P&&(P=R.currentShader),!(R!==M||P.program!==A.currentProgram)},copyFrame:function(M,P,A,R,F){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyFrame(M,P,A,R,F),this},copyToGame:function(M){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyToGame(M),this},drawFrame:function(M,P,A,R){return this.setUtility(this.UTILITY_PIPELINE.colorMatrixShader).drawFrame(M,P,A,R),this},blendFrames:function(M,P,A,R,F){return this.setUtility(this.UTILITY_PIPELINE.linearShader).blendFrames(M,P,A,R,F),this},blendFramesAdditive:function(M,P,A,R,F){return this.setUtility(this.UTILITY_PIPELINE.addShader).blendFramesAdditive(M,P,A,R,F),this},clearFrame:function(M,P){return this.UTILITY_PIPELINE.clearFrame(M,P),this},blitFrame:function(M,P,A,R,F,w){return this.setUtility(this.UTILITY_PIPELINE.copyShader).blitFrame(M,P,A,R,F,w),this},copyFrameRect:function(M,P,A,R,F,w,B,N){return this.UTILITY_PIPELINE.copyFrameRect(M,P,A,R,F,w,B,N),this},forceZero:function(){return this.current&&this.current.forceZero},setMulti:function(){return this.set(this.MULTI_PIPELINE)},setUtility:function(M){return this.UTILITY_PIPELINE.bind(M)},setFX:function(){return this.set(this.FX_PIPELINE)},restoreContext:function(){this.rebind(),this.pipelines.each(function(M,P){P.restoreContext()}),T(this.postPipelineInstances,function(M){M.restoreContext()})},rebind:function(M){M===void 0&&this.previous&&(M=this.previous);var P=this.renderer,A=P.gl;A.disable(A.DEPTH_TEST),A.disable(A.CULL_FACE),P.hasActiveStencilMask()?A.clear(A.DEPTH_BUFFER_BIT):(A.disable(A.STENCIL_TEST),A.clear(A.DEPTH_BUFFER_BIT|A.STENCIL_BUFFER_BIT)),A.viewport(0,0,P.width,P.height),P.currentProgram=null,P.setBlendMode(0,!0);var R=P.vaoExtension;R&&R.bindVertexArrayOES(null);var F=this.pipelines.entries;for(var w in F)F[w].glReset=!0;M&&(this.current=M,M.rebind())},clear:function(){var M=this.renderer;this.flush(),this.current?(this.current.unbind(),this.previous=this.current,this.current=null):this.previous=null,M.currentProgram=null,M.setBlendMode(0,!0);var P=M.vaoExtension;P&&P.bindVertexArrayOES(null)},getRenderTarget:function(M){var P=this.renderTargets,A=3;if(M>this.maxDimension)return this.targetIndex=P.length-A,P[this.targetIndex];var R=(s(M,this.frameInc,0,!0)-1)*A;return this.targetIndex=R,P[R]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});p.exports=E},32302:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(92503),h=new d({initialize:function(n,e,s,o,i,a,l,u,f){o===void 0&&(o=1),i===void 0&&(i=0),a===void 0&&(a=!0),l===void 0&&(l=!1),u===void 0&&(u=!0),f===void 0&&(f=!0),this.renderer=n,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=o,this.minFilter=i,this.autoClear=a,this.autoResize=!0,this.hasDepthBuffer=u,this.forceClamp=f,this.init(e,s),l?this.renderer.on(c.RESIZE,this.resize,this):this.autoResize=!1},init:function(r,n){var e=this.renderer;this.texture=e.createTextureFromSource(null,r,n,this.minFilter,this.forceClamp),this.framebuffer=e.createFramebuffer(r,n,this.texture,this.hasDepthBuffer),this.width=r,this.height=n},setAutoResize:function(r){return r&&!this.autoResize?(this.renderer.on(c.RESIZE,this.resize,this),this.autoResize=!0):!r&&this.autoResize&&(this.renderer.off(c.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(r,n){if(this.autoResize&&this.willResize(r,n)){var e=this.renderer;e.deleteFramebuffer(this.framebuffer),e.deleteTexture(this.texture),this.texture=e.createTextureFromSource(null,r,n,this.minFilter,this.forceClamp),this.framebuffer=e.createFramebuffer(r,n,this.texture,this.hasDepthBuffer),this.width=r,this.height=n}return this},willResize:function(r,n){return typeof r!="number"||typeof n!="number"?!1:(r=Math.round(r*this.scale),n=Math.round(n*this.scale),r=Math.max(r,1),n=Math.max(n,1),r!==this.width||n!==this.height)},bind:function(r,n,e){r===void 0&&(r=!1);var s=this.renderer;if(r&&s.flush(),n&&e&&this.resize(n,e),s.pushFramebuffer(this.framebuffer,!1,!1),r&&this.adjustViewport(),this.autoClear){var o=this.renderer.gl;o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT)}s.clearStencilMask()},adjustViewport:function(){var r=this.renderer.gl;r.viewport(0,0,this.width,this.height),r.disable(r.SCISSOR_TEST)},clear:function(r,n,e,s){var o=this.renderer,i=o.gl;o.pushFramebuffer(this.framebuffer),r!==void 0&&n!==void 0&&e!==void 0&&s!==void 0?(i.enable(i.SCISSOR_TEST),i.scissor(r,n,e,s)):i.disable(i.SCISSOR_TEST),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),o.popFramebuffer(),o.resetScissor()},unbind:function(r){r===void 0&&(r=!1);var n=this.renderer;return r&&n.flush(),n.popFramebuffer()},destroy:function(){var r=this.renderer;r.off(c.RESIZE,this.resize,this),r.deleteFramebuffer(this.framebuffer),r.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});p.exports=h},70554:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Felipe Alfonso <@bitnenfer>
* @author Matthew Groves <@doormat>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={getTintFromFloats:function(S,t,d,c){var h=(S*255|0)&255,r=(t*255|0)&255,n=(d*255|0)&255,e=(c*255|0)&255;return(e<<24|h<<16|r<<8|n)>>>0},getTintAppendFloatAlpha:function(S,t){var d=(t*255|0)&255;return(d<<24|S)>>>0},getTintAppendFloatAlphaAndSwap:function(S,t){var d=(S>>16|0)&255,c=(S>>8|0)&255,h=(S|0)&255,r=(t*255|0)&255;return(r<<24|h<<16|c<<8|d)>>>0},getFloatsFromUintRGB:function(S){var t=(S>>16|0)&255,d=(S>>8|0)&255,c=(S|0)&255;return[t/255,d/255,c/255]},checkShaderMax:function(S,t){var d=Math.min(16,S.getParameter(S.MAX_TEXTURE_IMAGE_UNITS));return!t||t===-1?d:Math.min(d,t)},parseFragmentShaderMaxTextures:function(S,t){if(!S)return"";for(var d="",c=0;c<t;c++)c>0&&(d+=`
else `),c<t-1&&(d+="if (outTexId < "+c+".5)"),d+=`
{`,d+=`
texture = texture2D(uMainSampler[`+c+"], outTexCoord);",d+=`
}`;return S=S.replace(/%count%/gi,t.toString()),S.replace(/%forloop%/gi,d)},setGlowQuality:function(S,t,d,c){return d===void 0&&(d=t.config.glowFXQuality),c===void 0&&(c=t.config.glowFXDistance),S=S.replace(/__SIZE__/gi,(1/d/c).toFixed(7)),S=S.replace(/__DIST__/gi,c.toFixed(0)+".0"),S}}},29100:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(62644),h=t(50792),r=t(77085),n=t(95540),e=t(37867),s=t(92503),o=t(32302),i=t(70554),a=t(38683),l=new d({Extends:h,initialize:function(f){h.call(this);var v=f.game,m=v.renderer,g=m.gl;this.name=n(f,"name","WebGLPipeline"),this.game=v,this.renderer=m,this.manager,this.gl=g,this.view=v.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=n(f,"topology",g.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=n(f,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isPreFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=f,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=n(f,"resizeUniform","")},boot:function(){var u,f=this.gl,v=this.config,m=this.renderer;this.isPostFX||(this.projectionMatrix=new e().identity());var g=this.renderTargets,x=n(v,"renderTarget",!1);typeof x=="boolean"&&x&&(x=1);var y=m.width,T=m.height;if(typeof x=="number")for(u=0;u<x;u++)g.push(new o(m,y,T,1,0,!0));else if(Array.isArray(x))for(u=0;u<x.length;u++){var C=n(x[u],"scale",1),E=n(x[u],"minFilter",0),M=n(x[u],"autoClear",1),P=n(x[u],"autoResize",!1),A=n(x[u],"width",null),R=n(x[u],"height",A);A?g.push(new o(m,A,R,1,E,M,P)):g.push(new o(m,y,T,C,E,M,P))}g.length&&(this.currentRenderTarget=g[0]),this.setShadersFromConfig(v);var F=this.shaders,w=0;for(u=0;u<F.length;u++)F[u].vertexSize>w&&(w=F[u].vertexSize);var B=n(v,"batchSize",m.config.batchSize);this.vertexCapacity=B*6;var N=new ArrayBuffer(this.vertexCapacity*w);this.vertexData=N,this.bytes=new Uint8Array(N),this.vertexViewF32=new Float32Array(N),this.vertexViewU32=new Uint32Array(N);var U=n(v,"vertices",null);for(U?(this.vertexViewF32.set(U),this.vertexBuffer=m.createVertexBuffer(N,f.STATIC_DRAW)):this.vertexBuffer=m.createVertexBuffer(N.byteLength,f.DYNAMIC_DRAW),this.setVertexBuffer(),u=F.length-1;u>=0;u--)F[u].rebind();this.hasBooted=!0,m.on(s.RESIZE,this.resize,this),m.on(s.PRE_RENDER,this.onPreRender,this),m.on(s.RENDER,this.onRender,this),m.on(s.POST_RENDER,this.onPostRender,this),this.emit(r.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(u,f,v){var m=this.renderer;if(u!==this.currentShader||m.currentProgram!==this.currentShader.program){this.flush();var g=this.setVertexBuffer(v);g&&!f&&(f=!0),u.bind(f,!1),this.currentShader=u}return this},getShaderByName:function(u){for(var f=this.shaders,v=0;v<f.length;v++)if(f[v].name===u)return f[v]},setShadersFromConfig:function(u){var f,v=this.shaders,m=this.renderer;for(f=0;f<v.length;f++)v[f].destroy();var g="vertShader",x="fragShader",y="attributes",T=n(u,g,null),C=i.parseFragmentShaderMaxTextures(n(u,x,null),m.maxTextures),E=n(u,y,null),M=n(u,"shaders",[]),P=M.length;if(P===0)T&&C&&(this.shaders=[new a(this,"default",T,C,c(E))]);else{var A=[];for(f=0;f<P;f++){var R=M[f],F,w,B,N;if(typeof R=="string"?(F="default",w=T,B=i.parseFragmentShaderMaxTextures(R,m.maxTextures),N=E):(F=n(R,"name","default"),w=n(R,g,T),B=i.parseFragmentShaderMaxTextures(n(R,x,C),m.maxTextures),N=n(R,y,E)),F==="default"){var U=B.split(`
`),D=U[0].trim();D.indexOf("#define SHADER_NAME")>-1&&(F=D.substring(20))}w&&B&&A.push(new a(this,F,w,B,c(N)))}this.shaders=A}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(u){return this.currentBatch={start:this.vertexCount,count:0,texture:[u],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=u,this.batch.push(this.currentBatch),0},addTextureToBatch:function(u){var f=this.currentBatch;f&&(f.texture.push(u),f.unit++,f.maxUnit++)},pushBatch:function(u){if(!this.currentBatch||this.forceZero&&u!==this.currentTexture)return this.createBatch(u);if(u===this.currentTexture)return this.currentUnit;var f=this.currentBatch,v=f.texture.indexOf(u);return v===-1?f.texture.length===this.renderer.maxTextures?this.createBatch(u):(f.unit++,f.maxUnit++,f.texture.push(u),this.currentUnit=f.unit,this.currentTexture=u,f.unit):(this.currentUnit=v,this.currentTexture=u,v)},setGameObject:function(u,f){return f===void 0&&(f=u.frame),this.pushBatch(f.source.glTexture)},shouldFlush:function(u){return u===void 0&&(u=0),this.vertexCount+u>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(u,f){(u!==this.width||f!==this.height)&&this.flush(),this.width=u,this.height=f;for(var v=this.renderTargets,m=0;m<v.length;m++)v[m].resize(u,f);return this.setProjectionMatrix(u,f),this.resizeUniform&&this.set2f(this.resizeUniform,u,f),this.emit(r.RESIZE,u,f,this),this.onResize(u,f),this},setProjectionMatrix:function(u,f){var v=this.projectionMatrix;if(!v)return this;this.projectionWidth=u,this.projectionHeight=f,v.ortho(0,u,f,0,-1e3,1e3);for(var m=this.shaders,g="uProjectionMatrix",x=0;x<m.length;x++){var y=m[x];y.hasUniform(g)&&(y.resetUniform(g),y.setMatrix4fv(g,!1,v.val,y))}return this},flipProjectionMatrix:function(u){u===void 0&&(u=!0);var f=this.projectionMatrix;if(!f)return this;var v=this.projectionWidth,m=this.projectionHeight;u?f.ortho(0,v,0,m,-1e3,1e3):f.ortho(0,v,m,0,-1e3,1e3),this.setMatrix4fv("uProjectionMatrix",!1,f.val)},updateProjectionMatrix:function(){if(this.projectionMatrix){var u=this.renderer.projectionWidth,f=this.renderer.projectionHeight;(this.projectionWidth!==u||this.projectionHeight!==f)&&this.setProjectionMatrix(u,f)}},bind:function(u){if(u===void 0&&(u=this.currentShader),this.glReset)return this.rebind(u);var f=!1,v=this.gl;return v.getParameter(v.ARRAY_BUFFER_BINDING)!==this.vertexBuffer&&(v.bindBuffer(v.ARRAY_BUFFER,this.vertexBuffer.webGLBuffer),this.activeBuffer=this.vertexBuffer,f=!0),u.bind(f),this.currentShader=u,this.activeTextures.length=0,this.emit(r.BIND,this,u),this.onActive(u),this},rebind:function(u){this.activeBuffer=null,this.setVertexBuffer();for(var f=this.shaders,v=f.length-1;v>=0;v--){var m=f[v].rebind();(!u||m===u)&&(this.currentShader=m)}return this.activeTextures.length=0,this.emit(r.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var u=this.shaders,f=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,f&&this.setVertexBuffer();for(var v=0;v<u.length;v++){var m=u[v];m.syncUniforms(),f&&m.rebind()}},setVertexBuffer:function(u){if(u===void 0&&(u=this.vertexBuffer),u!==this.activeBuffer){var f=this.gl;return this.gl.bindBuffer(f.ARRAY_BUFFER,u.webGLBuffer),this.activeBuffer=u,!0}return!1},preBatch:function(u){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(u),this},postBatch:function(u){return this.onDraw(this.currentRenderTarget),this.onPostBatch(u),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(u){if(u===void 0&&(u=!1),this.vertexCount>0){this.emit(r.BEFORE_FLUSH,this,u),this.onBeforeFlush(u);var f=this.gl,v=this.vertexCount,m=this.currentShader.vertexSize,g=this.topology;if(this.active){this.setVertexBuffer(),v===this.vertexCapacity?f.bufferData(f.ARRAY_BUFFER,this.vertexData,f.DYNAMIC_DRAW):f.bufferSubData(f.ARRAY_BUFFER,0,this.bytes.subarray(0,v*m));var x,y,T,C=this.batch,E=this.activeTextures;if(this.forceZero)for(E[0]||f.activeTexture(f.TEXTURE0),x=0;x<C.length;x++)y=C[x],T=y.texture[0],E[0]!==T&&(f.bindTexture(f.TEXTURE_2D,T.webGLTexture),E[0]=T),f.drawArrays(g,y.start,y.count);else for(x=0;x<C.length;x++){y=C[x];for(var M=0;M<=y.maxUnit;M++)T=y.texture[M],E[M]!==T&&(f.activeTexture(f.TEXTURE0+M),f.bindTexture(f.TEXTURE_2D,T.webGLTexture),E[M]=T);f.drawArrays(g,y.start,y.count)}}this.vertexCount=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.emit(r.AFTER_FLUSH,this,u),this.onAfterFlush(u)}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(u,f,v,m,g,x,y){var T=this.vertexViewF32,C=this.vertexViewU32,E=this.vertexCount*this.currentShader.vertexComponentCount-1;T[++E]=u,T[++E]=f,T[++E]=v,T[++E]=m,T[++E]=g,T[++E]=x,C[++E]=y,this.vertexCount++,this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchQuad:function(u,f,v,m,g,x,y,T,C,E,M,P,A,R,F,w,B,N,U,D){D===void 0&&(D=this.currentUnit);var I=!1;this.shouldFlush(6)&&(this.flush(),I=!0),this.currentBatch||(D=this.setTexture2D(U));var O=this.vertexViewF32,L=this.vertexViewU32,G=this.vertexCount*this.currentShader.vertexComponentCount-1;return O[++G]=f,O[++G]=v,O[++G]=E,O[++G]=M,O[++G]=D,O[++G]=N,L[++G]=R,O[++G]=m,O[++G]=g,O[++G]=E,O[++G]=A,O[++G]=D,O[++G]=N,L[++G]=w,O[++G]=x,O[++G]=y,O[++G]=P,O[++G]=A,O[++G]=D,O[++G]=N,L[++G]=B,O[++G]=f,O[++G]=v,O[++G]=E,O[++G]=M,O[++G]=D,O[++G]=N,L[++G]=R,O[++G]=x,O[++G]=y,O[++G]=P,O[++G]=A,O[++G]=D,O[++G]=N,L[++G]=B,O[++G]=T,O[++G]=C,O[++G]=P,O[++G]=M,O[++G]=D,O[++G]=N,L[++G]=F,this.vertexCount+=6,this.currentBatch.count=this.vertexCount-this.currentBatch.start,this.onBatch(u),I},batchTri:function(u,f,v,m,g,x,y,T,C,E,M,P,A,R,F,w,B){B===void 0&&(B=this.currentUnit);var N=!1;this.shouldFlush(3)&&(this.flush(),N=!0),this.currentBatch||(B=this.setTexture2D(w));var U=this.vertexViewF32,D=this.vertexViewU32,I=this.vertexCount*this.currentShader.vertexComponentCount-1;return U[++I]=f,U[++I]=v,U[++I]=T,U[++I]=C,U[++I]=B,U[++I]=F,D[++I]=P,U[++I]=m,U[++I]=g,U[++I]=T,U[++I]=M,U[++I]=B,U[++I]=F,D[++I]=A,U[++I]=x,U[++I]=y,U[++I]=E,U[++I]=M,U[++I]=B,U[++I]=F,D[++I]=R,this.vertexCount+=3,this.currentBatch.count=this.vertexCount-this.currentBatch.start,this.onBatch(u),N},drawFillRect:function(u,f,v,m,g,x,y,T){y===void 0&&(y=this.renderer.whiteTexture),T===void 0&&(T=!0),u=Math.floor(u),f=Math.floor(f);var C=Math.floor(u+v),E=Math.floor(f+m),M=this.setTexture2D(y),P=i.getTintAppendFloatAlphaAndSwap(g,x),A=0,R=0,F=1,w=1;T&&(R=1,w=0),this.batchQuad(null,u,f,u,E,C,E,C,f,A,R,F,w,P,P,P,P,0,y,M)},setTexture2D:function(u){return u===void 0&&(u=this.renderer.whiteTexture),this.pushBatch(u)},bindTexture:function(u,f){f===void 0&&(f=0);var v=this.gl;return v.activeTexture(v.TEXTURE0+f),v.bindTexture(v.TEXTURE_2D,u.webGLTexture),this},bindRenderTarget:function(u,f){return this.bindTexture(u.texture,f)},setTime:function(u,f){return this.set1f(u,this.game.loop.getDuration(),f),this},setBoolean:function(u,f,v){return v===void 0&&(v=this.currentShader),v.setBoolean(u,f),this},set1f:function(u,f,v){return v===void 0&&(v=this.currentShader),v.set1f(u,f),this},set2f:function(u,f,v,m){return m===void 0&&(m=this.currentShader),m.set2f(u,f,v),this},set3f:function(u,f,v,m,g){return g===void 0&&(g=this.currentShader),g.set3f(u,f,v,m),this},set4f:function(u,f,v,m,g,x){return x===void 0&&(x=this.currentShader),x.set4f(u,f,v,m,g),this},set1fv:function(u,f,v){return v===void 0&&(v=this.currentShader),v.set1fv(u,f),this},set2fv:function(u,f,v){return v===void 0&&(v=this.currentShader),v.set2fv(u,f),this},set3fv:function(u,f,v){return v===void 0&&(v=this.currentShader),v.set3fv(u,f),this},set4fv:function(u,f,v){return v===void 0&&(v=this.currentShader),v.set4fv(u,f),this},set1iv:function(u,f,v){return v===void 0&&(v=this.currentShader),v.set1iv(u,f),this},set2iv:function(u,f,v){return v===void 0&&(v=this.currentShader),v.set2iv(u,f),this},set3iv:function(u,f,v){return v===void 0&&(v=this.currentShader),v.set3iv(u,f),this},set4iv:function(u,f,v){return v===void 0&&(v=this.currentShader),v.set4iv(u,f),this},set1i:function(u,f,v){return v===void 0&&(v=this.currentShader),v.set1i(u,f),this},set2i:function(u,f,v,m){return m===void 0&&(m=this.currentShader),m.set2i(u,f,v),this},set3i:function(u,f,v,m,g){return g===void 0&&(g=this.currentShader),g.set3i(u,f,v,m),this},set4i:function(u,f,v,m,g,x){return x===void 0&&(x=this.currentShader),x.set4i(u,f,v,m,g),this},setMatrix2fv:function(u,f,v,m){return m===void 0&&(m=this.currentShader),m.setMatrix2fv(u,f,v),this},setMatrix3fv:function(u,f,v,m){return m===void 0&&(m=this.currentShader),m.setMatrix3fv(u,f,v),this},setMatrix4fv:function(u,f,v,m){return m===void 0&&(m=this.currentShader),m.setMatrix4fv(u,f,v),this},destroy:function(){this.emit(r.DESTROY,this);var u,f=this.shaders;for(u=0;u<f.length;u++)f[u].destroy();var v=this.renderTargets;for(u=0;u<v.length;u++)v[u].destroy();var m=this.renderer;return m.deleteBuffer(this.vertexBuffer),m.off(s.RESIZE,this.resize,this),m.off(s.PRE_RENDER,this.onPreRender,this),m.off(s.RENDER,this.onRender,this),m.off(s.POST_RENDER,this.onPostRender,this),this.removeAllListeners(),this.game=null,this.renderer=null,this.manager=null,this.gl=null,this.view=null,this.shaders=null,this.renderTargets=null,this.bytes=null,this.vertexViewF32=null,this.vertexViewU32=null,this.vertexData=null,this.vertexBuffer=null,this.currentShader=null,this.currentRenderTarget=null,this.activeTextures=null,this}});p.exports=l},74797:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Felipe Alfonso <@bitnenfer>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(95428),c=t(72905),h=t(19715),r=t(83419),n=t(8054),e=t(50792),s=t(92503),o=t(50030),i=t(37867),a=t(29747),l=t(7530),u=t(32302),f=t(97480),v=t(69442),m=t(70554),g=t(88815),x=t(26128),y=t(1482),T=t(82751),C=t(84387),E=t(93567),M=t(57183),P=new r({Extends:e,initialize:function(R){e.call(this);var F=R.config,w={alpha:F.transparent,desynchronized:F.desynchronized,depth:!0,antialias:F.antialiasGL,premultipliedAlpha:F.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:F.failIfMajorPerformanceCaveat,powerPreference:F.powerPreference,preserveDrawingBuffer:F.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:F.clearBeforeRender,antialias:F.antialias,backgroundColor:F.backgroundColor,contextCreation:w,roundPixels:F.roundPixels,maxTextures:F.maxTextures,maxTextureSize:F.maxTextureSize,batchSize:F.batchSize,maxLights:F.maxLights,mipmapFilter:F.mipmapFilter},this.game=R,this.type=n.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=R.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.maxTextures=0,this.textureIndexes,this.glBufferWrappers=[],this.glProgramWrappers=[],this.glTextureWrappers=[],this.glFramebufferWrappers=[],this.glAttribLocationWrappers=[],this.glUniformLocationWrappers=[],this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=a,this.contextRestoredHandler=a,this.previousContextLostHandler=a,this.previousContextRestoredHandler=a,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=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.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(A){var R,F=this.game,w=this.canvas,B=A.backgroundColor;if(F.config.context?R=F.config.context:R=w.getContext("webgl",A.contextCreation)||w.getContext("experimental-webgl",A.contextCreation),!R||R.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=R,this.setExtensions(),this.setContextHandlers(),F.context=R;for(var N=0;N<=27;N++)this.blendModes.push({func:[R.ONE,R.ONE_MINUS_SRC_ALPHA],equation:R.FUNC_ADD});this.blendModes[1].func=[R.ONE,R.DST_ALPHA],this.blendModes[2].func=[R.DST_COLOR,R.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[R.ONE,R.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[R.ZERO,R.ONE_MINUS_SRC_ALPHA],equation:R.FUNC_REVERSE_SUBTRACT},this.glFormats=[R.BYTE,R.SHORT,R.UNSIGNED_BYTE,R.UNSIGNED_SHORT,R.FLOAT],this.glFuncMap={mat2:{func:R.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:R.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:R.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:R.uniform1f,length:1},"1fv":{func:R.uniform1fv,length:1},"1i":{func:R.uniform1i,length:1},"1iv":{func:R.uniform1iv,length:1},"2f":{func:R.uniform2f,length:2},"2fv":{func:R.uniform2fv,length:1},"2i":{func:R.uniform2i,length:2},"2iv":{func:R.uniform2iv,length:1},"3f":{func:R.uniform3f,length:3},"3fv":{func:R.uniform3fv,length:1},"3i":{func:R.uniform3i,length:3},"3iv":{func:R.uniform3iv,length:1},"4f":{func:R.uniform4f,length:4},"4fv":{func:R.uniform4fv,length:1},"4i":{func:R.uniform4i,length:4},"4iv":{func:R.uniform4iv,length:1}},(!A.maxTextures||A.maxTextures===-1)&&(A.maxTextures=R.getParameter(R.MAX_TEXTURE_IMAGE_UNITS)),A.maxTextureSize||(A.maxTextureSize=R.getParameter(R.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),R.disable(R.DEPTH_TEST),R.disable(R.CULL_FACE),R.enable(R.BLEND),R.clearColor(B.redGL,B.greenGL,B.blueGL,B.alphaGL);var U=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return U.indexOf(A.mipmapFilter)!==-1&&(this.mipmapFilter=R[A.mipmapFilter]),this.maxTextures=m.checkShaderMax(R,A.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new l(this),this.setBlendMode(n.BlendModes.NORMAL),this.projectionMatrix=new i().identity(),F.textures.once(v.READY,this.boot,this),this},boot:function(){var A=this.game,R=this.pipelines,F=A.scale.baseSize,w=F.width,B=F.height;this.width=w,this.height=B,this.isBooted=!0,this.renderTarget=new u(this,w,B,1,0,!0,!0),this.maskTarget=new u(this,w,B,1,0,!0,!0),this.maskSource=new u(this,w,B,1,0,!0,!0);var N=A.config;R.boot(N.pipeline,N.defaultPipeline,N.autoMobilePipeline),this.blankTexture=A.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=A.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=A.textures.getFrame("__WHITE").glTexture;var U=this.gl;U.bindFramebuffer(U.FRAMEBUFFER,null),U.enable(U.SCISSOR_TEST),A.scale.on(f.RESIZE,this.onResize,this),this.resize(w,B)},setExtensions:function(){var A=this.gl,R=A.getSupportedExtensions();this.supportedExtensions=R;var F="ANGLE_instanced_arrays";this.instancedArraysExtension=R.indexOf(F)>-1?A.getExtension(F):null;var w="OES_vertex_array_object";this.vaoExtension=R.indexOf(w)>-1?A.getExtension(w):null},setContextHandlers:function(A,R){this.previousContextLostHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextLostHandler,!1),this.previousContextRestoredHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextRestoredHandler,!1),typeof A=="function"?this.contextLostHandler=A.bind(this):this.contextLostHandler=this.dispatchContextLost.bind(this),typeof R=="function"?this.contextRestoredHandler=R.bind(this):this.contextRestoredHandler=this.dispatchContextRestored.bind(this),this.canvas.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),this.previousContextLostHandler=this.contextLostHandler,this.previousContextRestoredHandler=this.contextRestoredHandler},dispatchContextLost:function(A){this.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),this.emit(s.LOSE_WEBGL,this),A.preventDefault()},dispatchContextRestored:function(A){var R=this.gl;if(R.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}this.currentProgram=null,this.currentFramebuffer=null,this.setBlendMode(n.BlendModes.NORMAL),R.disable(R.BLEND),R.disable(R.DEPTH_TEST),R.enable(R.CULL_FACE),this.compression=this.getCompressedTextures();var F=function(w){w.createResource()};d(this.glTextureWrappers,F),d(this.glBufferWrappers,F),d(this.glFramebufferWrappers,F),d(this.glProgramWrappers,F),d(this.glAttribLocationWrappers,F),d(this.glUniformLocationWrappers,F),this.createTemporaryTextures(),this.pipelines.restoreContext(),this.resize(this.game.scale.baseSize.width,this.game.scale.baseSize.height),this.setExtensions(),this.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),this.emit(s.RESTORE_WEBGL,this),A.preventDefault()},createTemporaryTextures:function(){for(var A=this.gl,R=0;R<this.maxTextures;R++){var F=A.createTexture();A.activeTexture(A.TEXTURE0+R),A.bindTexture(A.TEXTURE_2D,F),A.texImage2D(A.TEXTURE_2D,0,A.RGBA,1,1,0,A.RGBA,A.UNSIGNED_BYTE,new Uint8Array([0,0,255,255])),this.textureIndexes.push(R)}},captureFrame:function(A,R){},captureNextFrame:function(){},getFps:function(){},log:function(){},startCapture:function(A,R,F){},stopCapture:function(){},onCapture:function(A){},onResize:function(A,R){(R.width!==this.width||R.height!==this.height)&&this.resize(R.width,R.height)},beginCapture:function(A,R){A===void 0&&(A=this.width),R===void 0&&(R=this.height),this.renderTarget.bind(!0,A,R),this.setProjectionMatrix(A,R)},endCapture:function(){return this.renderTarget.unbind(!0),this.resetProjectionMatrix(),this.renderTarget},resize:function(A,R){var F=this.gl;return this.width=A,this.height=R,this.setProjectionMatrix(A,R),F.viewport(0,0,A,R),this.drawingBufferHeight=F.drawingBufferHeight,F.scissor(0,F.drawingBufferHeight-R,A,R),this.defaultScissor[2]=A,this.defaultScissor[3]=R,this.emit(s.RESIZE,A,R),this},getCompressedTextures:function(){var A="WEBGL_compressed_texture_",R="WEBKIT_"+A,F="EXT_texture_compression_",w=function(N,U){var D=N.getExtension(A+U)||N.getExtension(R+U)||N.getExtension(F+U);if(D){var I={};for(var O in D)I[D[O]]=O;return I}},B=this.gl;return{ETC:w(B,"etc"),ETC1:w(B,"etc1"),ATC:w(B,"atc"),ASTC:w(B,"astc"),BPTC:w(B,"bptc"),RGTC:w(B,"rgtc"),PVRTC:w(B,"pvrtc"),S3TC:w(B,"s3tc"),S3TCSRGB:w(B,"s3tc_srgb"),IMG:!0}},getCompressedTextureName:function(A,R){var F=this.compression[A.toUpperCase()];if(R in F)return F[R]},supportsCompressedTexture:function(A,R){var F=this.compression[A.toUpperCase()];return F?R?R in F:!0:!1},getAspectRatio:function(){return this.width/this.height},setProjectionMatrix:function(A,R){return(A!==this.projectionWidth||R!==this.projectionHeight)&&(this.projectionWidth=A,this.projectionHeight=R,this.projectionMatrix.ortho(0,A,R,0,-1e3,1e3)),this},resetProjectionMatrix:function(){return this.setProjectionMatrix(this.width,this.height)},hasExtension:function(A){return this.supportedExtensions?this.supportedExtensions.indexOf(A):!1},getExtension:function(A){return this.hasExtension(A)?(A in this.extensions||(this.extensions[A]=this.gl.getExtension(A)),this.extensions[A]):null},flush:function(){this.pipelines.flush()},pushScissor:function(A,R,F,w,B){B===void 0&&(B=this.drawingBufferHeight);var N=this.scissorStack,U=[A,R,F,w];return N.push(U),this.setScissor(A,R,F,w,B),this.currentScissor=U,U},setScissor:function(A,R,F,w,B){B===void 0&&(B=this.drawingBufferHeight);var N=this.gl,U=this.currentScissor,D=F>0&&w>0;if(U&&D){var I=U[0],O=U[1],L=U[2],G=U[3];D=I!==A||O!==R||L!==F||G!==w}D&&(this.flush(),N.scissor(A,B-R-w,F,w))},resetScissor:function(){var A=this.gl;A.enable(A.SCISSOR_TEST);var R=this.currentScissor;if(R){var F=R[0],w=R[1],B=R[2],N=R[3];B>0&&N>0&&A.scissor(F,this.drawingBufferHeight-w-N,B,N)}},popScissor:function(){var A=this.scissorStack;A.pop();var R=A[A.length-1];R&&this.setScissor(R[0],R[1],R[2],R[3]),this.currentScissor=R},hasActiveStencilMask:function(){var A=this.currentMask.mask,R=this.currentCameraMask.mask;return A&&A.isStencil||R&&R.isStencil},resetViewport:function(){var A=this.gl;A.viewport(0,0,this.width,this.height),this.drawingBufferHeight=A.drawingBufferHeight},setBlendMode:function(A,R){R===void 0&&(R=!1);var F=this.gl,w=this.blendModes[A];return R||A!==n.BlendModes.SKIP_CHECK&&this.currentBlendMode!==A?(this.flush(),F.enable(F.BLEND),F.blendEquation(w.equation),w.func.length>2?F.blendFuncSeparate(w.func[0],w.func[1],w.func[2],w.func[3]):F.blendFunc(w.func[0],w.func[1]),this.currentBlendMode=A,!0):!1},addBlendMode:function(A,R){var F=this.blendModes.push({func:A,equation:R});return F-1},updateBlendMode:function(A,R,F){return this.blendModes[A]&&(this.blendModes[A].func=R,F&&(this.blendModes[A].equation=F)),this},removeBlendMode:function(A){return A>17&&this.blendModes[A]&&this.blendModes.splice(A,1),this},pushFramebuffer:function(A,R,F,w,B){return A===this.currentFramebuffer?this:(this.fboStack.push(A),this.setFramebuffer(A,R,F,w,B))},setFramebuffer:function(A,R,F,w,B){if(R===void 0&&(R=!1),F===void 0&&(F=!0),w===void 0&&(w=null),B===void 0&&(B=!1),A===this.currentFramebuffer)return this;var N=this.gl,U=this.width,D=this.height;return A&&A.renderTexture&&F?(U=A.renderTexture.width,D=A.renderTexture.height):this.flush(),A?N.bindFramebuffer(N.FRAMEBUFFER,A.webGLFramebuffer):N.bindFramebuffer(N.FRAMEBUFFER,null),F&&N.viewport(0,0,U,D),w&&N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_2D,w.webGLTexture,0),B&&(N.clearColor(0,0,0,0),N.clear(N.COLOR_BUFFER_BIT)),R&&(A?(this.drawingBufferHeight=D,this.pushScissor(0,0,U,D)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=A,this},popFramebuffer:function(A,R){A===void 0&&(A=!1),R===void 0&&(R=!0);var F=this.fboStack;F.pop();var w=F[F.length-1];return w||(w=null),this.setFramebuffer(w,A,R),w},restoreFramebuffer:function(A,R){A===void 0&&(A=!1),R===void 0&&(R=!0);var F=this.fboStack,w=F[F.length-1];w||(w=null),this.currentFramebuffer=null,this.setFramebuffer(w,A,R)},setProgram:function(A){return A!==this.currentProgram?(this.flush(),this.gl.useProgram(A.webGLProgram),this.currentProgram=A,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(A,R,F,w,B){B===void 0&&(B=!1);var N=this.gl,U=N.NEAREST,D=N.NEAREST,I=N.CLAMP_TO_EDGE,O=null;R=A?A.width:R,F=A?A.height:F;var L=o(R,F);if(L&&!B&&(I=N.REPEAT),w===n.ScaleModes.LINEAR&&this.config.antialias){var G=A&&A.compressed,z=!G&&L||G&&A.mipmaps.length>1;U=this.mipmapFilter&&z?this.mipmapFilter:N.LINEAR,D=N.LINEAR}return!A&&typeof R=="number"&&typeof F=="number"?O=this.createTexture2D(0,U,D,I,I,N.RGBA,null,R,F):O=this.createTexture2D(0,U,D,I,I,N.RGBA,A),O},createTexture2D:function(A,R,F,w,B,N,U,D,I,O,L,G){typeof D!="number"&&(D=U?U.width:1),typeof I!="number"&&(I=U?U.height:1);var z=new T(this.gl,A,R,F,w,B,N,U,D,I,O,L,G);return this.glTextureWrappers.push(z),z},createFramebuffer:function(A,R,F,w){this.currentFramebuffer=null;var B=new C(this.gl,A,R,F,w);return this.glFramebufferWrappers.push(B),B},beginBitmapMask:function(A,R){var F=this.gl;F&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==A&&(this.currentMask.mask=A,this.currentMask.camera=R))},drawBitmapMask:function(A,R,F){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),A.renderWebGL(this,A,R),this.maskSource.unbind(!0),this.maskTarget.unbind();var w=this.gl,B=this.getCurrentStencilMask();B?(w.enable(w.STENCIL_TEST),B.mask.applyStencil(this,B.camera,!0)):this.currentMask.mask=null,this.pipelines.set(F),w.activeTexture(w.TEXTURE0),w.bindTexture(w.TEXTURE_2D,this.maskTarget.texture.webGLTexture),w.activeTexture(w.TEXTURE1),w.bindTexture(w.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(A,R){var F=new y(this.gl,A,R);return this.glProgramWrappers.push(F),F},createVertexBuffer:function(A,R){var F=this.gl,w=new x(F,A,F.ARRAY_BUFFER,R);return this.glBufferWrappers.push(w),w},createAttribLocation:function(A,R){var F=new E(this.gl,A,R);return this.glAttribLocationWrappers.push(F),F},createUniformLocation:function(A,R){var F=new M(this.gl,A,R);return this.glUniformLocationWrappers.push(F),F},createIndexBuffer:function(A,R){var F=this.gl,w=new x(F,A,F.ELEMENT_ARRAY_BUFFER,R);return this.glBufferWrappers.push(w),w},deleteTexture:function(A){if(A)return c(this.glTextureWrappers,A),A.destroy(),this},deleteFramebuffer:function(A){return A?(c(this.fboStack,A),c(this.glFramebufferWrappers,A),A.destroy(),this):this},deleteProgram:function(A){return A&&(c(this.glProgramWrappers,A),A.destroy()),this},deleteAttribLocation:function(A){return A&&(c(this.glAttribLocationWrappers,A),A.destroy()),this},deleteUniformLocation:function(A){return A&&(c(this.glUniformLocationWrappers,A),A.destroy()),this},deleteBuffer:function(A){return A?(c(this.glBufferWrappers,A),A.destroy(),this):this},preRenderCamera:function(A){var R=A.x,F=A.y,w=A.width,B=A.height,N=A.backgroundColor;if(A.emit(h.PRE_RENDER,A),this.pipelines.preBatchCamera(A),this.pushScissor(R,F,w,B),A.mask&&(this.currentCameraMask.mask=A.mask,this.currentCameraMask.camera=A._maskCamera,A.mask.preRenderWebGL(this,A,A._maskCamera)),N.alphaGL>0){var U=this.pipelines.setMulti();U.drawFillRect(R,F,w,B,m.getTintFromFloats(N.blueGL,N.greenGL,N.redGL,1),N.alphaGL)}},getCurrentStencilMask:function(){var A=null,R=this.maskStack,F=this.currentCameraMask;return R.length>0?A=R[R.length-1]:F.mask&&F.mask.isStencil&&(A=F),A},postRenderCamera:function(A){var R=A.flashEffect,F=A.fadeEffect;if(R.isRunning||F.isRunning||F.isComplete){var w=this.pipelines.setMulti();R.postRenderWebGL(w,m.getTintFromFloats),F.postRenderWebGL(w,m.getTintFromFloats)}A.dirty=!1,this.popScissor(),A.mask&&(this.currentCameraMask.mask=null,A.mask.postRenderWebGL(this,A._maskCamera)),this.pipelines.postBatchCamera(A),A.emit(h.POST_RENDER,A)},preRender:function(){if(!this.contextLost){var A=this.gl;if(A.bindFramebuffer(A.FRAMEBUFFER,null),this.emit(s.PRE_RENDER_CLEAR),this.config.clearBeforeRender){var R=this.config.backgroundColor;A.clearColor(R.redGL,R.greenGL,R.blueGL,R.alphaGL),A.clear(A.COLOR_BUFFER_BIT|A.DEPTH_BUFFER_BIT|A.STENCIL_BUFFER_BIT)}A.enable(A.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&A.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(s.PRE_RENDER)}},render:function(A,R,F){if(!this.contextLost){var w=R.length;if(this.emit(s.RENDER,A,F),this.preRenderCamera(F),w===0){this.setBlendMode(n.BlendModes.NORMAL),this.postRenderCamera(F);return}this.currentType="";for(var B=this.currentMask,N=0;N<w;N++){this.finalType=N===w-1;var U=R[N],D=U.mask;B=this.currentMask,B.mask&&B.mask!==D&&B.mask.postRenderWebGL(this,B.camera),D&&B.mask!==D&&D.preRenderWebGL(this,U,F),U.blendMode!==this.currentBlendMode&&this.setBlendMode(U.blendMode);var I=U.type;I!==this.currentType&&(this.newType=!0,this.currentType=I),this.finalType?this.nextTypeMatch=!1:this.nextTypeMatch=R[N+1].type===this.currentType,U.renderWebGL(this,U,F),this.newType=!1}B=this.currentMask,B.mask&&B.mask.postRenderWebGL(this,B.camera),this.setBlendMode(n.BlendModes.NORMAL),this.postRenderCamera(F)}},postRender:function(){if(!this.contextLost){this.flush(),this.emit(s.POST_RENDER);var A=this.snapshotState;A.callback&&(g(this.gl,A),A.callback=null)}},clearStencilMask:function(){this.gl.disable(this.gl.STENCIL_TEST)},restoreStencilMask:function(){var A=this.gl,R=this.getCurrentStencilMask();if(R){var F=R.mask;A.enable(A.STENCIL_TEST),F.invertAlpha?A.stencilFunc(A.NOTEQUAL,F.level,255):A.stencilFunc(A.EQUAL,F.level,255)}},snapshot:function(A,R,F){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,A,R,F)},snapshotArea:function(A,R,F,w,B,N,U){var D=this.snapshotState;return D.callback=B,D.type=N,D.encoder=U,D.getPixel=!1,D.x=A,D.y=R,D.width=F,D.height=w,this},snapshotPixel:function(A,R,F){return this.snapshotArea(A,R,1,1,F),this.snapshotState.getPixel=!0,this},snapshotFramebuffer:function(A,R,F,w,B,N,U,D,I,O,L){B===void 0&&(B=!1),N===void 0&&(N=0),U===void 0&&(U=0),D===void 0&&(D=R),I===void 0&&(I=F),O==="pixel"&&(B=!0,O="image/png");var G=this.currentFramebuffer;this.snapshotArea(N,U,D,I,w,O,L);var z=this.snapshotState;return z.getPixel=B,z.isFramebuffer=!0,z.bufferWidth=R,z.bufferHeight=F,z.width=Math.min(z.width,R),z.height=Math.min(z.height,F),this.setFramebuffer(A),g(this.gl,z),this.setFramebuffer(G),z.callback=null,z.isFramebuffer=!1,this},canvasToTexture:function(A,R,F,w){F===void 0&&(F=!1),w===void 0&&(w=!1);var B=this.gl,N=B.NEAREST,U=B.NEAREST,D=A.width,I=A.height,O=B.CLAMP_TO_EDGE,L=o(D,I);return!F&&L&&(O=B.REPEAT),this.config.antialias&&(N=L&&this.mipmapFilter?this.mipmapFilter:B.LINEAR,U=B.LINEAR),R?(R.update(A,D,I,w,O,O,N,U,R.format),R):this.createTexture2D(0,N,U,O,O,B.RGBA,A,D,I,!0,!1,w)},createCanvasTexture:function(A,R,F){return R===void 0&&(R=!1),F===void 0&&(F=!1),this.canvasToTexture(A,null,R,F)},updateCanvasTexture:function(A,R,F,w){return F===void 0&&(F=!1),w===void 0&&(w=!1),this.canvasToTexture(A,R,w,F)},videoToTexture:function(A,R,F,w){F===void 0&&(F=!1),w===void 0&&(w=!1);var B=this.gl,N=B.NEAREST,U=B.NEAREST,D=A.videoWidth,I=A.videoHeight,O=B.CLAMP_TO_EDGE,L=o(D,I);return!F&&L&&(O=B.REPEAT),this.config.antialias&&(N=L&&this.mipmapFilter?this.mipmapFilter:B.LINEAR,U=B.LINEAR),R?(R.update(A,D,I,w,O,O,N,U,R.format),R):this.createTexture2D(0,N,U,O,O,B.RGBA,A,D,I,!0,!0,w)},createVideoTexture:function(A,R,F){return R===void 0&&(R=!1),F===void 0&&(F=!1),this.videoToTexture(A,null,R,F)},updateVideoTexture:function(A,R,F,w){return F===void 0&&(F=!1),w===void 0&&(w=!1),this.videoToTexture(A,R,w,F)},createUint8ArrayTexture:function(A,R,F){var w=this.gl,B=w.NEAREST,N=w.NEAREST,U=w.CLAMP_TO_EDGE,D=o(R,F);return D&&(U=w.REPEAT),this.createTexture2D(0,B,N,U,U,w.RGBA,A,R,F)},setTextureFilter:function(A,R){var F=this.gl,w=R===0?F.LINEAR:F.NEAREST;F.activeTexture(F.TEXTURE0);var B=F.getParameter(F.TEXTURE_BINDING_2D);return F.bindTexture(F.TEXTURE_2D,A.webGLTexture),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_MIN_FILTER,w),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_MAG_FILTER,w),A.minFilter=w,A.magFilter=w,B&&F.bindTexture(F.TEXTURE_2D,B),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);var A=function(R){R.destroy()};d(this.glAttribLocationWrappers,A),d(this.glBufferWrappers,A),d(this.glFramebufferWrappers,A),d(this.glProgramWrappers,A),d(this.glTextureWrappers,A),d(this.glUniformLocationWrappers,A),this.maskTarget.destroy(),this.maskSource.destroy(),this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null}});p.exports=P},38683:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(95428),h=t(95540),r=t(14500),n=new d({initialize:function(s,o,i,a,l){this.pipeline=s,this.name=o,this.renderer=s.renderer,this.gl=this.renderer.gl,this.fragSrc=a,this.vertSrc=i,this.program=this.renderer.createProgram(i,a),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(l),this.createUniforms()},createAttributes:function(e){var s=0,o=0,i=[];this.vertexComponentCount=0;for(var a=0;a<e.length;a++){var l=e[a],u=l.name,f=h(l,"size",1),v=h(l,"type",r.FLOAT),m=v.enum,g=v.size,x=!!l.normalized;i.push({name:u,size:f,type:m,normalized:x,offset:o,enabled:!1,location:-1}),g===4?s+=f:s++,o+=f*g}this.vertexSize=o,this.vertexComponentCount=s,this.attributes=i},bind:function(e,s){return e===void 0&&(e=!1),s===void 0&&(s=!1),s&&this.pipeline.flush(),this.renderer.setProgram(this.program),e&&this.setAttribPointers(),this},rebind:function(){return this.renderer.setProgram(this.program),this.setAttribPointers(!0),this},setAttribPointers:function(e){e===void 0&&(e=!1);for(var s=this.gl,o=this.renderer,i=this.vertexSize,a=this.attributes,l=this.program,u=0;u<a.length;u++){var f=a[u],v=f.size,m=f.type,g=f.offset,x=f.enabled,y=f.location,T=!!f.normalized;if(e){y!==-1&&o.deleteAttribLocation(y);var C=this.renderer.createAttribLocation(l,f.name);C.webGLAttribLocation>=0?(s.enableVertexAttribArray(C.webGLAttribLocation),s.vertexAttribPointer(C.webGLAttribLocation,v,m,T,i,g),f.enabled=!0,f.location=C):C.webGLAttribLocation!==-1&&s.disableVertexAttribArray(C.webGLAttribLocation)}else x?s.vertexAttribPointer(y.webGLAttribLocation,v,m,T,i,g):!x&&y!==-1&&y.webGLAttribLocation>-1&&(s.disableVertexAttribArray(y.webGLAttribLocation),f.location=-1)}return this},createUniforms:function(){var e=this.gl,s=this.program,o=this.uniforms,i,a,l,u=e.getProgramParameter(s.webGLProgram,e.ACTIVE_UNIFORMS);for(i=0;i<u;i++){var f=e.getActiveUniform(s.webGLProgram,i);if(f){a=f.name,l=this.renderer.createUniformLocation(s,a),l!==null&&(o[a]={name:a,location:l,setter:null,value1:null,value2:null,value3:null,value4:null});var v=a.indexOf("[");v>0&&(a=a.substr(0,v),o.hasOwnProperty(a)||(l=this.renderer.createUniformLocation(s,a),l!==null&&(o[a]={name:a,location:l,setter:null,value1:null,value2:null,value3:null,value4:null})))}}return this},syncUniforms:function(){var e=this.gl;this.renderer.setProgram(this.program);for(var s in this.uniforms){var o=this.uniforms[s];o.setter&&o.setter.call(e,o.location.webGLUniformLocation,o.value1,o.value2,o.value3,o.value4)}},hasUniform:function(e){return this.uniforms.hasOwnProperty(e)},resetUniform:function(e){var s=this.uniforms[e];return s&&(s.value1=null,s.value2=null,s.value3=null,s.value4=null),this},setUniform1:function(e,s,o,i){var a=this.uniforms[s];return a?((i||a.value1!==o)&&(a.setter||(a.setter=e),a.value1=o,this.renderer.setProgram(this.program),e.call(this.gl,a.location.webGLUniformLocation,o),this.pipeline.currentShader=this),this):this},setUniform2:function(e,s,o,i,a){var l=this.uniforms[s];return l?((a||l.value1!==o||l.value2!==i)&&(l.setter||(l.setter=e),l.value1=o,l.value2=i,this.renderer.setProgram(this.program),e.call(this.gl,l.location.webGLUniformLocation,o,i),this.pipeline.currentShader=this),this):this},setUniform3:function(e,s,o,i,a,l){var u=this.uniforms[s];return u?((l||u.value1!==o||u.value2!==i||u.value3!==a)&&(u.setter||(u.setter=e),u.value1=o,u.value2=i,u.value3=a,this.renderer.setProgram(this.program),e.call(this.gl,u.location.webGLUniformLocation,o,i,a),this.pipeline.currentShader=this),this):this},setUniform4:function(e,s,o,i,a,l,u){var f=this.uniforms[s];return f?((u||f.value1!==o||f.value2!==i||f.value3!==a||f.value4!==l)&&(f.setter||(f.setter=e),f.value1=o,f.value2=i,f.value3=a,f.value4=l,this.renderer.setProgram(this.program),e.call(this.gl,f.location.webGLUniformLocation,o,i,a,l),this.pipeline.currentShader=this),this):this},setBoolean:function(e,s){return this.setUniform1(this.gl.uniform1i,e,Number(s))},set1f:function(e,s){return this.setUniform1(this.gl.uniform1f,e,s)},set2f:function(e,s,o){return this.setUniform2(this.gl.uniform2f,e,s,o)},set3f:function(e,s,o,i){return this.setUniform3(this.gl.uniform3f,e,s,o,i)},set4f:function(e,s,o,i,a){return this.setUniform4(this.gl.uniform4f,e,s,o,i,a)},set1fv:function(e,s){return this.setUniform1(this.gl.uniform1fv,e,s,!0)},set2fv:function(e,s){return this.setUniform1(this.gl.uniform2fv,e,s,!0)},set3fv:function(e,s){return this.setUniform1(this.gl.uniform3fv,e,s,!0)},set4fv:function(e,s){return this.setUniform1(this.gl.uniform4fv,e,s,!0)},set1iv:function(e,s){return this.setUniform1(this.gl.uniform1iv,e,s,!0)},set2iv:function(e,s){return this.setUniform1(this.gl.uniform2iv,e,s,!0)},set3iv:function(e,s){return this.setUniform1(this.gl.uniform3iv,e,s,!0)},set4iv:function(e,s){return this.setUniform1(this.gl.uniform4iv,e,s,!0)},set1i:function(e,s){return this.setUniform1(this.gl.uniform1i,e,s)},set2i:function(e,s,o){return this.setUniform2(this.gl.uniform2i,e,s,o)},set3i:function(e,s,o,i){return this.setUniform3(this.gl.uniform3i,e,s,o,i)},set4i:function(e,s,o,i,a){return this.setUniform4(this.gl.uniform4i,e,s,o,i,a)},setMatrix2fv:function(e,s,o){return this.setUniform2(this.gl.uniformMatrix2fv,e,s,o,!0)},setMatrix3fv:function(e,s,o){return this.setUniform2(this.gl.uniformMatrix3fv,e,s,o,!0)},setMatrix4fv:function(e,s,o){return this.setUniform2(this.gl.uniformMatrix4fv,e,s,o,!0)},createProgram:function(e,s){return e===void 0&&(e=this.vertSrc),s===void 0&&(s=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=e,this.fragSrc=s,this.program=this.renderer.createProgram(e,s),this.createUniforms(),this.rebind()},destroy:function(){var e=this.renderer;c(this.uniforms,function(s){e.deleteUniformLocation(s.location)}),this.uniforms=null,c(this.attributes,function(s){e.deleteAttribLocation(s.location)}),this.attributes=null,e.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});p.exports=n},14500:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={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}};p.exports=S},4159:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(14500),c=t(79291),h={PipelineManager:t(7530),Pipelines:t(96615),RenderTarget:t(32302),Utils:t(70554),WebGLPipeline:t(29100),WebGLRenderer:t(74797),WebGLShader:t(38683),Wrappers:t(9503)};h=c(!1,h,d),p.exports=h},31302:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Felipe Alfonso <@bitnenfer>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(95540),h=t(78908),r=t(85191),n=t(14500),e=t(29100),s=new d({Extends:e,initialize:function(i){i.fragShader=c(i,"fragShader",h),i.vertShader=c(i,"vertShader",r),i.batchSize=c(i,"batchSize",1),i.vertices=c(i,"vertices",[-1,1,-1,-7,7,1]),i.attributes=c(i,"attributes",[{name:"inPosition",size:2,type:n.FLOAT}]),e.call(this,i)},boot:function(){e.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(o,i){e.prototype.resize.call(this,o,i),this.set2f("uResolution",o,i)},beginMask:function(o,i,a){this.renderer.beginBitmapMask(o,a)},endMask:function(o,i,a){var l=this.gl,u=this.renderer,f=o.bitmapMask;f&&l&&(u.drawBitmapMask(f,i,this),a&&this.set2f("uResolution",a.width,a.height),this.set1i("uInvertMaskAlpha",o.invertAlpha),l.drawArrays(this.topology,0,3),a&&this.set2f("uResolution",this.width,this.height),l.bindTexture(l.TEXTURE_2D,null))}});p.exports=s},92651:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(58918),h=t(14811),r=t(95540),n=t(43558),e=t(89350),s=t(70554),o=new d({Extends:n,initialize:function(a){a.shaders=[s.setGlowQuality(e.FXGlowFrag,a.game),e.FXShadowFrag,e.FXPixelateFrag,e.FXVignetteFrag,e.FXShineFrag,e.FXBlurLowFrag,e.FXBlurMedFrag,e.FXBlurHighFrag,e.FXGradientFrag,e.FXBloomFrag,e.ColorMatrixFrag,e.FXCircleFrag,e.FXBarrelFrag,e.FXDisplacementFrag,e.FXWipeFrag,e.FXBokehFrag],n.call(this,a);var l=this.game;this.glow=new c.Glow(l),this.shadow=new c.Shadow(l),this.pixelate=new c.Pixelate(l),this.vignette=new c.Vignette(l),this.shine=new c.Shine(l),this.gradient=new c.Gradient(l),this.circle=new c.Circle(l),this.barrel=new c.Barrel(l),this.wipe=new c.Wipe(l),this.bokeh=new c.Bokeh(l);var u=[];u[h.GLOW]=this.onGlow,u[h.SHADOW]=this.onShadow,u[h.PIXELATE]=this.onPixelate,u[h.VIGNETTE]=this.onVignette,u[h.SHINE]=this.onShine,u[h.BLUR]=this.onBlur,u[h.GRADIENT]=this.onGradient,u[h.BLOOM]=this.onBloom,u[h.COLOR_MATRIX]=this.onColorMatrix,u[h.CIRCLE]=this.onCircle,u[h.BARREL]=this.onBarrel,u[h.DISPLACEMENT]=this.onDisplacement,u[h.WIPE]=this.onWipe,u[h.BOKEH]=this.onBokeh,this.fxHandlers=u,this.source,this.target,this.swap},onDraw:function(i,a,l){this.source=i,this.target=a,this.swap=l;var u=i.width,f=i.height,v=this.tempSprite,m=this.fxHandlers;if(v&&v.preFX)for(var g=v.preFX.list,x=0;x<g.length;x++){var y=g[x];y.active&&m[y.type].call(this,y,u,f)}this.drawToGame(this.source)},runDraw:function(){var i=this.source,a=this.target;this.copy(i,a),this.source=a,this.target=i},onGlow:function(i,a,l){var u=this.shaders[h.GLOW];this.setShader(u),this.glow.onPreRender(i,u,a,l),this.runDraw()},onShadow:function(i){var a=this.shaders[h.SHADOW];this.setShader(a),this.shadow.onPreRender(i,a),this.runDraw()},onPixelate:function(i,a,l){var u=this.shaders[h.PIXELATE];this.setShader(u),this.pixelate.onPreRender(i,u,a,l),this.runDraw()},onVignette:function(i){var a=this.shaders[h.VIGNETTE];this.setShader(a),this.vignette.onPreRender(i,a),this.runDraw()},onShine:function(i,a,l){var u=this.shaders[h.SHINE];this.setShader(u),this.shine.onPreRender(i,u,a,l),this.runDraw()},onBlur:function(i,a,l){var u=r(i,"quality"),f=this.shaders[h.BLUR+u];this.setShader(f),this.set1i("uMainSampler",0),this.set2f("resolution",a,l),this.set1f("strength",r(i,"strength")),this.set3fv("color",r(i,"glcolor"));for(var v=r(i,"x"),m=r(i,"y"),g=r(i,"steps"),x=0;x<g;x++)this.set2f("offset",v,0),this.runDraw(),this.set2f("offset",0,m),this.runDraw()},onGradient:function(i){var a=this.shaders[h.GRADIENT];this.setShader(a),this.gradient.onPreRender(i,a),this.runDraw()},onBloom:function(i,a,l){var u=this.shaders[h.BLOOM];this.copySprite(this.source,this.swap),this.setShader(u),this.set1i("uMainSampler",0),this.set1f("strength",r(i,"blurStrength")),this.set3fv("color",r(i,"glcolor"));for(var f=2/a*r(i,"offsetX"),v=2/l*r(i,"offsetY"),m=r(i,"steps"),g=0;g<m;g++)this.set2f("offset",f,0),this.runDraw(),this.set2f("offset",0,v),this.runDraw();this.blendFrames(this.swap,this.source,this.target,r(i,"strength")),this.copySprite(this.target,this.source)},onColorMatrix:function(i){this.setShader(this.colorMatrixShader),this.set1fv("uColorMatrix",i.getData()),this.set1f("uAlpha",i.alpha),this.runDraw()},onCircle:function(i,a,l){var u=this.shaders[h.CIRCLE];this.setShader(u),this.circle.onPreRender(i,u,a,l),this.runDraw()},onBarrel:function(i){var a=this.shaders[h.BARREL];this.setShader(a),this.barrel.onPreRender(i,a),this.runDraw()},onDisplacement:function(i){this.setShader(this.shaders[h.DISPLACEMENT]),this.set1i("uDisplacementSampler",1),this.set2f("amount",i.x,i.y),this.bindTexture(i.glTexture,1),this.runDraw()},onWipe:function(i){var a=this.shaders[h.WIPE];this.setShader(a),this.wipe.onPreRender(i,a),this.runDraw()},onBokeh:function(i,a,l){var u=this.shaders[h.BOKEH];this.setShader(u),this.bokeh.onPreRender(i,u,a,l),this.runDraw()},destroy:function(){return this.glow.destroy(),this.shadow.destroy(),this.pixelate.destroy(),this.vignette.destroy(),this.shine.destroy(),this.gradient.destroy(),this.circle.destroy(),this.barrel.destroy(),this.wipe.destroy(),this.bokeh.destroy(),this.fxHandlers=null,this.source=null,this.target=null,this.swap=null,n.prototype.destroy.call(this),this}});p.exports=o},96569:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Felipe Alfonso <@bitnenfer>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(95540),h=t(31063),r=t(57516),n=t(61340),e=t(26099),s=t(29100),o=new d({Extends:r,initialize:function(a){var l=c(a,"fragShader",h);a.fragShader=l.replace("%LIGHT_COUNT%",a.game.renderer.config.maxLights),r.call(this,a),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new e,this._tempMatrix=new n,this._tempMatrix2=new n},boot:function(){s.prototype.boot.call(this)},onRender:function(i,a){var l=i.sys.lights;if(this.lightsActive=!1,!(!l||!l.active)){var u=l.getLights(a),f=u.length;this.lightsActive=!0;var v,m=this.renderer,g=m.height,x=a.matrix,y=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",a.x,a.y,a.rotation,a.zoom),this.set3f("uAmbientLightColor",l.ambientColor.r,l.ambientColor.g,l.ambientColor.b),this.set1i("uLightCount",f),v=0;v<f;v++){var T=u[v].light,C=T.color,E="uLights["+v+"].";x.transformPoint(T.x,T.y,y),this.set2f(E+"position",y.x-a.scrollX*T.scrollFactorX*a.zoom,g-(y.y-a.scrollY*T.scrollFactorY*a.zoom)),this.set3f(E+"color",C.r,C.g,C.b),this.set1f(E+"intensity",T.intensity),this.set1f(E+"radius",T.radius)}this.currentNormalMapRotation=null}},setNormalMapRotation:function(i){if(i!==this.currentNormalMapRotation||this.vertexCount===0){this.vertexCount>0&&this.flush();var a=this.inverseRotationMatrix;if(i){var l=-i,u=Math.cos(l),f=Math.sin(l);a[1]=f,a[3]=-f,a[0]=a[4]=u}else a[0]=a[4]=1,a[1]=a[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,a),this.currentNormalMapRotation=i}},setTexture2D:function(i,a){var l=this.renderer;i===void 0&&(i=l.whiteTexture);var u=this.getNormalMap(a);this.isNewNormalMap(i,u)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(u),this.currentNormalMap=u);var f=0;if(a&&a.parentContainer){var v=a.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);f=v.rotationNormalized}else a&&(f=a.rotation);return this.currentBatch===null&&(this.createBatch(i),this.addTextureToBatch(u)),this.setNormalMapRotation(f),0},setGameObject:function(i,a){a===void 0&&(a=i.frame);var l=a.glTexture,u=this.getNormalMap(i);if(this.isNewNormalMap(l,u)&&(this.flush(),this.createBatch(l),this.addTextureToBatch(u),this.currentNormalMap=u),i.parentContainer){var f=i.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(f.rotationNormalized)}else this.setNormalMapRotation(i.rotation);return this.currentBatch===null&&(this.createBatch(l),this.addTextureToBatch(u)),0},isNewNormalMap:function(i,a){return this.currentTexture!==i||this.currentNormalMap!==a},getNormalMap:function(i){var a;if(i)i.displayTexture?a=i.displayTexture.dataSource[i.displayFrame.sourceIndex]:i.texture?a=i.texture.dataSource[i.frame.sourceIndex]:i.tileset&&(Array.isArray(i.tileset)?a=i.tileset[0].image.dataSource[0]:a=i.tileset.image.dataSource[0]);else return this.renderer.normalTexture;return a?a.glTexture:this.renderer.normalTexture},batchSprite:function(i,a,l){this.lightsActive&&r.prototype.batchSprite.call(this,i,a,l)},batchTexture:function(i,a,l,u,f,v,m,g,x,y,T,C,E,M,P,A,R,F,w,B,N,U,D,I,O,L,G,z,X,V,Y,W){this.lightsActive&&r.prototype.batchTexture.call(this,i,a,l,u,f,v,m,g,x,y,T,C,E,M,P,A,R,F,w,B,N,U,D,I,O,L,G,z,X,V,Y,W)},batchTextureFrame:function(i,a,l,u,f,v,m){this.lightsActive&&r.prototype.batchTextureFrame.call(this,i,a,l,u,f,v,m)}});p.exports=o},56527:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(95540),h=t(57516),r=t(45561),n=t(60722),e=t(14500),s=t(29100),o=new d({Extends:h,initialize:function(a){a.fragShader=c(a,"fragShader",r),a.vertShader=c(a,"vertShader",n),a.attributes=c(a,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),a.forceZero=!0,a.resizeUniform="uResolution",h.call(this,a)},boot:function(){s.prototype.boot.call(this);var i=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",i.width,i.height)}});p.exports=o},57516:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Felipe Alfonso <@bitnenfer>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(94811),h=t(95540),r=t(98840),n=t(44667),e=t(61340),s=t(70554),o=t(14500),i=t(29100),a=new d({Extends:i,initialize:function(u){var f=u.game.renderer,v=h(u,"fragShader",r);u.fragShader=s.parseFragmentShaderMaxTextures(v,f.maxTextures),u.vertShader=h(u,"vertShader",n),u.attributes=h(u,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:o.UNSIGNED_BYTE,normalized:!0}]),u.resizeUniform="uResolution",i.call(this,u),this._tempMatrix1=new e,this._tempMatrix2=new e,this._tempMatrix3=new e,this.calcMatrix=new e,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(){i.prototype.boot.call(this);var l=this.renderer;this.set1iv("uMainSampler",l.textureIndexes),this.set2f("uResolution",l.width,l.height)},batchSprite:function(l,u,f){this.manager.set(this,l);var v=this._tempMatrix1,m=this._tempMatrix2,g=this._tempMatrix3,x=l.frame,y=x.glTexture,T=x.u0,C=x.v0,E=x.u1,M=x.v1,P=x.x,A=x.y,R=x.cutWidth,F=x.cutHeight,w=x.customPivot,B=l.displayOriginX,N=l.displayOriginY,U=-B+P,D=-N+A;if(l.isCropped){var I=l._crop;(I.flipX!==l.flipX||I.flipY!==l.flipY)&&x.updateCropUVs(I,l.flipX,l.flipY),T=I.u0,C=I.v0,E=I.u1,M=I.v1,R=I.width,F=I.height,P=I.x,A=I.y,U=-B+P,D=-N+A}var O=1,L=1;l.flipX&&(w||(U+=-x.realWidth+B*2),O=-1),l.flipY&&(w||(D+=-x.realHeight+N*2),L=-1);var G=l.x,z=l.y;u.roundPixels&&(G=Math.floor(G),z=Math.floor(z)),m.applyITRS(G,z,l.rotation,l.scaleX*O,l.scaleY*L),v.copyFrom(u.matrix),f?(v.multiplyWithOffset(f,-u.scrollX*l.scrollFactorX,-u.scrollY*l.scrollFactorY),m.e=G,m.f=z):(m.e-=u.scrollX*l.scrollFactorX,m.f-=u.scrollY*l.scrollFactorY),v.multiply(m,g);var X=g.setQuad(U,D,U+R,D+F,u.renderRoundPixels),V=s.getTintAppendFloatAlpha,Y=u.alpha,W=V(l.tintTopLeft,Y*l._alphaTL),H=V(l.tintTopRight,Y*l._alphaTR),b=V(l.tintBottomLeft,Y*l._alphaBL),K=V(l.tintBottomRight,Y*l._alphaBR);this.shouldFlush(6)&&this.flush();var Q=this.setGameObject(l,x);this.manager.preBatch(l),this.batchQuad(l,X[0],X[1],X[2],X[3],X[4],X[5],X[6],X[7],T,C,E,M,W,H,b,K,l.tintFill,y,Q),this.manager.postBatch(l)},batchTexture:function(l,u,f,v,m,g,x,y,T,C,E,M,P,A,R,F,w,B,N,U,D,I,O,L,G,z,X,V,Y,W,H,b,K){K===void 0&&(K=!1),this.manager.set(this,l);var Q=this._tempMatrix1,Z=this._tempMatrix2,$=this._tempMatrix3,q=B/f+X,_=N/v+V,tt=(B+U)/f+X,J=(N+D)/v+V,j=x,k=y,et=-F,it=-w;if(l.isCropped){var ht=l._crop,at=ht.width,ft=ht.height;j=at,k=ft,x=at,y=ft,B=ht.x,N=ht.y;var rt=B,dt=N;M&&(rt=U-ht.x-at),P&&(dt=D-ht.y-ft),q=rt/f+X,_=dt/v+V,tt=(rt+at)/f+X,J=(dt+ft)/v+V,et=-F+B,it=-w+N}P=P^(!H&&u.isRenderTexture?1:0),M&&(j*=-1,et+=x),P&&(k*=-1,it+=y),Y.roundPixels&&(m=Math.floor(m),g=Math.floor(g)),Z.applyITRS(m,g,E,T,C),Q.copyFrom(Y.matrix),W?(Q.multiplyWithOffset(W,-Y.scrollX*A,-Y.scrollY*R),Z.e=m,Z.f=g):(Z.e-=Y.scrollX*A,Z.f-=Y.scrollY*R),Q.multiply(Z,$);var st=$.setQuad(et,it,et+j,it+k,Y.renderRoundPixels);b==null&&(b=this.setTexture2D(u)),l&&!K&&this.manager.preBatch(l),this.batchQuad(l,st[0],st[1],st[2],st[3],st[4],st[5],st[6],st[7],q,_,tt,J,I,O,L,G,z,u,b),l&&!K&&this.manager.postBatch(l)},batchTextureFrame:function(l,u,f,v,m,g,x){this.manager.set(this);var y=this._tempMatrix1.copyFrom(g),T=this._tempMatrix2;x?y.multiply(x,T):T=y;var C=T.setQuad(u,f,u+l.width,f+l.height),E=this.setTexture2D(l.source.glTexture);v=s.getTintAppendFloatAlpha(v,m),this.batchQuad(null,C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],l.u0,l.v0,l.u1,l.v1,v,v,v,v,0,l.glTexture,E)},batchFillRect:function(l,u,f,v,m,g){this.renderer.pipelines.set(this);var x=this.calcMatrix;g&&g.multiply(m,x);var y=x.setQuad(l,u,l+f,u+v),T=this.fillTint;this.batchQuad(null,y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],0,0,1,1,T.TL,T.TR,T.BL,T.BR,2)},batchFillTriangle:function(l,u,f,v,m,g,x,y){this.renderer.pipelines.set(this);var T=this.calcMatrix;y&&y.multiply(x,T);var C=T.getX(l,u),E=T.getY(l,u),M=T.getX(f,v),P=T.getY(f,v),A=T.getX(m,g),R=T.getY(m,g),F=this.fillTint;this.batchTri(null,C,E,M,P,A,R,0,0,1,1,F.TL,F.TR,F.BL,2)},batchStrokeTriangle:function(l,u,f,v,m,g,x,y,T){var C=this.tempTriangle;C[0].x=l,C[0].y=u,C[0].width=x,C[1].x=f,C[1].y=v,C[1].width=x,C[2].x=m,C[2].y=g,C[2].width=x,C[3].x=l,C[3].y=u,C[3].width=x,this.batchStrokePath(C,x,!1,y,T)},batchFillPath:function(l,u,f){this.renderer.pipelines.set(this);var v=this.calcMatrix;f&&f.multiply(u,v);for(var m=l.length,g=this.polygonCache,x,y,T=this.fillTint.TL,C=this.fillTint.TR,E=this.fillTint.BL,M=0;M<m;++M)y=l[M],g.push(y.x,y.y);x=c(g),m=x.length;for(var P=0;P<m;P+=3){var A=x[P+0]*2,R=x[P+1]*2,F=x[P+2]*2,w=g[A+0],B=g[A+1],N=g[R+0],U=g[R+1],D=g[F+0],I=g[F+1],O=v.getX(w,B),L=v.getY(w,B),G=v.getX(N,U),z=v.getY(N,U),X=v.getX(D,I),V=v.getY(D,I);this.batchTri(null,O,L,G,z,X,V,0,0,1,1,T,C,E,2)}g.length=0},batchStrokePath:function(l,u,f,v,m){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var g=l.length-1,x=0;x<g;x++){var y=l[x],T=l[x+1];this.batchLine(y.x,y.y,T.x,T.y,y.width/2,T.width/2,u,x,!f&&x===g-1,v,m)}},batchLine:function(l,u,f,v,m,g,x,y,T,C,E){this.renderer.pipelines.set(this);var M=this.calcMatrix;E&&E.multiply(C,M);var P=f-l,A=v-u,R=Math.sqrt(P*P+A*A);if(R!==0){var F=m*(v-u)/R,w=m*(l-f)/R,B=g*(v-u)/R,N=g*(l-f)/R,U=f-B,D=v-N,I=l-F,O=u-w,L=f+B,G=v+N,z=l+F,X=u+w,V=M.getX(U,D),Y=M.getY(U,D),W=M.getX(I,O),H=M.getY(I,O),b=M.getX(L,G),K=M.getY(L,G),Q=M.getX(z,X),Z=M.getY(z,X),$=this.strokeTint,q=$.TL,_=$.TR,tt=$.BL,J=$.BR;if(this.batchQuad(null,Q,Z,W,H,V,Y,b,K,0,0,1,1,q,_,tt,J,2),!(x<=2)){var j=this.prevQuad,k=this.firstQuad;y>0&&j[4]?this.batchQuad(null,Q,Z,W,H,j[0],j[1],j[2],j[3],0,0,1,1,q,_,tt,J,2):(k[0]=Q,k[1]=Z,k[2]=W,k[3]=H,k[4]=1),T&&k[4]?this.batchQuad(null,V,Y,b,K,k[0],k[1],k[2],k[3],0,0,1,1,q,_,tt,J,2):(j[0]=V,j[1]=Y,j[2]=b,j[3]=K,j[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,i.prototype.destroy.call(this),this}});p.exports=a},43439:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(95540),h=t(4127),r=t(89924),n=t(29100),e=new d({Extends:n,initialize:function(o){o.vertShader=c(o,"vertShader",r),o.fragShader=c(o,"fragShader",h),o.attributes=c(o,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),n.call(this,o)},onRender:function(s,o){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",o.zoom)},batchPointLight:function(s,o,i,a,l,u,f,v,m,g,x,y){var T=s.color,C=s.intensity,E=s.radius,M=s.attenuation,P=T.r*C,A=T.g*C,R=T.b*C,F=o.alpha*s.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,a,x,y,E,M,P,A,R,F),this.batchLightVert(l,u,x,y,E,M,P,A,R,F),this.batchLightVert(f,v,x,y,E,M,P,A,R,F),this.batchLightVert(i,a,x,y,E,M,P,A,R,F),this.batchLightVert(f,v,x,y,E,M,P,A,R,F),this.batchLightVert(m,g,x,y,E,M,P,A,R,F),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(s,o,i,a,l,u,f,v,m,g){var x=this.vertexViewF32,y=this.vertexCount*this.currentShader.vertexComponentCount-1;x[++y]=s,x[++y]=o,x[++y]=i,x[++y]=a,x[++y]=l,x[++y]=u,x[++y]=f,x[++y]=v,x[++y]=m,x[++y]=g,this.vertexCount++}});p.exports=e},84057:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(89422),h=t(95540),r=t(27681),n=t(49627),e=t(29100),s=new d({Extends:e,initialize:function(i){i.renderTarget=h(i,"renderTarget",1),i.fragShader=h(i,"fragShader",r),i.vertShader=h(i,"vertShader",n),i.attributes=h(i,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),i.batchSize=1,i.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],e.call(this,i),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new c,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){e.prototype.boot.call(this);var o=this.manager.UTILITY_PIPELINE;this.fullFrame1=o.fullFrame1,this.fullFrame2=o.fullFrame2,this.halfFrame1=o.halfFrame1,this.halfFrame2=o.halfFrame2;var i=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",i.width,i.height);for(var a=this.renderTargets,l=0;l<a.length;l++)a[l].autoResize=!0},postBatch:function(o){return this.hasBooted||(this.bootFX(),this.currentRenderTarget&&this.currentRenderTarget.bind()),this.onDraw(this.currentRenderTarget),this.onPostBatch(o),this},onDraw:function(o){this.bindAndDraw(o)},getController:function(o){return o!==void 0?o:this.controller?this.controller:this},copySprite:function(o,i,a){a===void 0&&(a=!1);var l=this.gl;l.activeTexture(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,o.texture.webGLTexture);var u=l.getParameter(l.FRAMEBUFFER_BINDING);l.bindFramebuffer(l.FRAMEBUFFER,i.framebuffer.webGLFramebuffer),l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,i.texture.webGLTexture,0),l.clearColor(0,0,0,0),l.clear(l.COLOR_BUFFER_BIT),l.bufferData(l.ARRAY_BUFFER,this.vertexData,l.STATIC_DRAW),l.drawArrays(l.TRIANGLES,0,6),a&&(l.bindTexture(l.TEXTURE_2D,null),l.bindFramebuffer(l.FRAMEBUFFER,u))},copyFrame:function(o,i,a,l,u){this.manager.copyFrame(o,i,a,l,u)},copyToGame:function(o){this.manager.copyToGame(o)},drawFrame:function(o,i,a){this.manager.drawFrame(o,i,a,this.colorMatrix)},blendFrames:function(o,i,a,l,u){this.manager.blendFrames(o,i,a,l,u)},blendFramesAdditive:function(o,i,a,l,u){this.manager.blendFramesAdditive(o,i,a,l,u)},clearFrame:function(o,i){this.manager.clearFrame(o,i)},blitFrame:function(o,i,a,l,u,f){this.manager.blitFrame(o,i,a,l,u,f)},copyFrameRect:function(o,i,a,l,u,f,v,m){this.manager.copyFrameRect(o,i,a,l,u,f,v,m)},bindAndDraw:function(o,i,a,l,u){a===void 0&&(a=!0),l===void 0&&(l=!0);var f=this.gl,v=this.renderer;this.bind(u),this.set1i("uMainSampler",0),i?(f.viewport(0,0,i.width,i.height),f.bindFramebuffer(f.FRAMEBUFFER,i.framebuffer.webGLFramebuffer),f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,i.texture.webGLTexture,0),a&&(l?f.clearColor(0,0,0,0):f.clearColor(0,0,0,1),f.clear(f.COLOR_BUFFER_BIT))):(v.popFramebuffer(!1,!1),v.currentFramebuffer||f.viewport(0,0,v.width,v.height)),v.restoreStencilMask(),f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,o.texture.webGLTexture),f.bufferData(f.ARRAY_BUFFER,this.vertexData,f.STATIC_DRAW),f.drawArrays(f.TRIANGLES,0,6),i&&(f.bindTexture(f.TEXTURE_2D,null),f.bindFramebuffer(f.FRAMEBUFFER,v.currentFramebuffer.webGLFramebuffer))},destroy:function(){return this.controller&&this.controller.destroy(),this.gameObject=null,this.controller=null,this.colorMatrix=null,this.fullFrame1=null,this.fullFrame2=null,this.halfFrame1=null,this.halfFrame2=null,this.manager.removePostPipeline(this),e.prototype.destroy.call(this),this}});p.exports=s},43558:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(10312),c=t(67502),h=t(83419),r=t(96293),n=t(95540),e=t(57516),s=t(27681),o=t(87841),i=t(32302),a=t(45561),l=t(60722),u=t(29100),f=new h({Extends:e,initialize:function(m){var g=n(m,"fragShader",s),x=n(m,"vertShader",l),y=n(m,"drawShader",s),T=[{name:"DrawSprite",fragShader:a,vertShader:l},{name:"CopySprite",fragShader:g,vertShader:x},{name:"DrawGame",fragShader:y,vertShader:l},{name:"ColorMatrix",fragShader:r}],C=n(m,"shaders",[]);m.shaders=T.concat(C),m.vertShader||(m.vertShader=x),m.batchSize=1,e.call(this,m),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new o,this.targetBounds=new o,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){u.prototype.boot.call(this);var v=this.shaders,m=this.renderer;this.drawSpriteShader=v[0],this.copyShader=v[1],this.gameShader=v[2],this.colorMatrixShader=v[3],this.fsTarget=new i(m,m.width,m.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var g=new ArrayBuffer(168);this.quadVertexData=g,this.quadVertexViewF32=new Float32Array(g),this.quadVertexBuffer=m.createVertexBuffer(g,this.gl.STATIC_DRAW),this.onResize(m.width,m.height),this.currentShader=this.copyShader,this.set2f("uResolution",m.width,m.height)},onResize:function(v,m){var g=this.quadVertexViewF32;g[1]=m,g[22]=m,g[14]=v,g[28]=v,g[35]=v,g[36]=m},batchQuad:function(v,m,g,x,y,T,C,E,M,P,A,R,F,w,B,N,U,D,I){var O=Math.min(m,x,T,E),L=Math.min(g,y,C,M),G=Math.max(m,x,T,E),z=Math.max(g,y,C,M),X=G-O,V=z-L,Y=this.spriteBounds.setTo(O,L,X,V),W=v?v.preFX.padding:0,H=X+W*2,b=V+W*2,K=Math.abs(Math.max(H,b)),Q=this.manager.getRenderTarget(K),Z=this.targetBounds.setTo(0,0,Q.width,Q.height);c(Z,Math.round(Y.centerX),Math.round(Y.centerY)),this.tempSprite=v;var $=this.gl,q=this.renderer;q.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",q.width,q.height),this.flipProjectionMatrix(!0),v&&(this.onDrawSprite(v,Q),v.preFX.onFX(this));var _=this.fsTarget;return this.flush(),$.viewport(0,0,q.width,q.height),$.bindFramebuffer($.FRAMEBUFFER,_.framebuffer.webGLFramebuffer),$.framebufferTexture2D($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,$.TEXTURE_2D,_.texture.webGLTexture,0),$.clearColor(0,0,0,0),$.clear($.COLOR_BUFFER_BIT),this.setTexture2D(I),this.batchVert(m,g,P,A,0,D,w),this.batchVert(x,y,P,F,0,D,N),this.batchVert(T,C,R,F,0,D,U),this.batchVert(m,g,P,A,0,D,w),this.batchVert(T,C,R,F,0,D,U),this.batchVert(E,M,R,A,0,D,B),this.flush(),this.flipProjectionMatrix(!1),$.activeTexture($.TEXTURE0),$.bindTexture($.TEXTURE_2D,Q.texture.webGLTexture),$.copyTexSubImage2D($.TEXTURE_2D,0,0,0,Z.x,Z.y,Z.width,Z.height),$.bindFramebuffer($.FRAMEBUFFER,null),$.bindTexture($.TEXTURE_2D,null),this.onBatch(v),this.currentShader=this.copyShader,this.onDraw(Q,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(v,m,g,x,y,T,C){g===void 0&&(g=!0),x===void 0&&(x=!0),y===void 0&&(y=!1),C===void 0&&(C=this.copyShader);var E=this.gl,M=this.tempSprite;T&&(C=this.colorMatrixShader),this.currentShader=C;var P=this.setVertexBuffer(this.quadVertexBuffer);C.bind(P,!1);var A=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",A.width,A.height),M.preFX.onFXCopy(this),this.onCopySprite(v,m,M),T&&(this.set1fv("uColorMatrix",T.getData()),this.set1f("uAlpha",T.alpha)),E.activeTexture(E.TEXTURE0),E.bindTexture(E.TEXTURE_2D,v.texture.webGLTexture),v.height>m.height)E.viewport(0,0,v.width,v.height),this.setTargetUVs(v,m);else{var R=m.height-v.height;E.viewport(0,R,v.width,v.height),this.resetUVs()}if(E.bindFramebuffer(E.FRAMEBUFFER,m.framebuffer.webGLFramebuffer),E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_2D,m.texture.webGLTexture,0),g&&(E.clearColor(0,0,0,+!x),E.clear(E.COLOR_BUFFER_BIT)),y){var F=this.renderer.currentBlendMode;this.renderer.setBlendMode(d.ERASE)}E.bufferData(E.ARRAY_BUFFER,this.quadVertexData,E.STATIC_DRAW),E.drawArrays(E.TRIANGLES,0,6),y&&this.renderer.setBlendMode(F),E.bindFramebuffer(E.FRAMEBUFFER,null)},copy:function(v,m){var g=this.gl;this.set1i("uMainSampler",0),g.activeTexture(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,v.texture.webGLTexture),g.viewport(0,0,v.width,v.height),this.setUVs(0,0,0,1,1,1,1,0),g.bindFramebuffer(g.FRAMEBUFFER,m.framebuffer.webGLFramebuffer),g.framebufferTexture2D(g.FRAMEBUFFER,g.COLOR_ATTACHMENT0,g.TEXTURE_2D,m.texture.webGLTexture,0),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),g.bufferData(g.ARRAY_BUFFER,this.quadVertexData,g.STATIC_DRAW),g.drawArrays(g.TRIANGLES,0,6),g.bindFramebuffer(g.FRAMEBUFFER,null)},blendFrames:function(v,m,g,x,y){this.manager.blendFrames(v,m,g,x,y)},blendFramesAdditive:function(v,m,g,x,y){this.manager.blendFramesAdditive(v,m,g,x,y)},drawToGame:function(v){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(v)},copyToGame:function(v){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(v)},bindAndDraw:function(v){var m=this.gl,g=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(v.texture);var x=this._tempMatrix1.loadIdentity(),y=this.targetBounds.x,T=this.targetBounds.y,C=y+v.width,E=T+v.height,M=x.getX(y,T),P=x.getX(y,E),A=x.getX(C,E),R=x.getX(C,T),F=x.getY(y,T),w=x.getY(y,E),B=x.getY(C,E),N=x.getY(C,T),U=16777215;this.batchVert(M,F,0,0,0,0,U),this.batchVert(P,w,0,1,0,0,U),this.batchVert(A,B,1,1,0,0,U),this.batchVert(M,F,0,0,0,0,U),this.batchVert(A,B,1,1,0,0,U),this.batchVert(R,N,1,0,0,0,U),g.restoreFramebuffer(!1,!0),g.currentFramebuffer||m.viewport(0,0,g.width,g.height),g.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(v){this.drawToGame(v)},setUVs:function(v,m,g,x,y,T,C,E){var M=this.quadVertexViewF32;M[2]=v,M[3]=m,M[9]=g,M[10]=x,M[16]=y,M[17]=T,M[23]=v,M[24]=m,M[30]=y,M[31]=T,M[37]=C,M[38]=E},setTargetUVs:function(v,m){var g=m.height/v.height;g>.5?g=.5-(g-.5):g=.5+(.5-g),this.setUVs(0,g,0,1+g,1,1+g,1,g)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.renderer.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.colorMatrixShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,e.prototype.destroy.call(this),this}});p.exports=f},81041:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(95540),h=t(57516),r=new d({Extends:h,initialize:function(e){e.topology=5,e.batchSize=c(e,"batchSize",256),h.call(this,e)}});p.exports=r},12385:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(95540),h=t(57516),r=t(45561),n=t(60722),e=t(29100),s=new d({Extends:h,initialize:function(i){i.fragShader=c(i,"fragShader",r),i.vertShader=c(i,"vertShader",n),i.forceZero=!0,h.call(this,i)},boot:function(){e.prototype.boot.call(this);var o=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",o.width,o.height)}});p.exports=s},7589:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(35407),c=t(10312),h=t(83419),r=t(89422),n=t(96293),e=t(36682),s=t(95540),o=t(48247),i=t(49627),a=t(29100),l=new h({Extends:a,initialize:function(f){f.renderTarget=s(f,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),f.vertShader=s(f,"vertShader",i),f.shaders=s(f,"shaders",[{name:"Copy",fragShader:e},{name:"AddBlend",fragShader:d},{name:"LinearBlend",fragShader:o},{name:"ColorMatrix",fragShader:n}]),f.attributes=s(f,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),f.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],f.batchSize=1,a.call(this,f),this.colorMatrix=new r,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){a.prototype.boot.call(this);var u=this.shaders,f=this.renderTargets;this.copyShader=u[0],this.addShader=u[1],this.linearShader=u[2],this.colorMatrixShader=u[3],this.fullFrame1=f[0],this.fullFrame2=f[1],this.halfFrame1=f[2],this.halfFrame2=f[3]},copyFrame:function(u,f,v,m,g){v===void 0&&(v=1),m===void 0&&(m=!0),g===void 0&&(g=!0);var x=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",v),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,u.texture.webGLTexture),f?(x.viewport(0,0,f.width,f.height),x.bindFramebuffer(x.FRAMEBUFFER,f.framebuffer.webGLFramebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,f.texture.webGLTexture,0)):x.viewport(0,0,u.width,u.height),m&&(g?x.clearColor(0,0,0,0):x.clearColor(0,0,0,1),x.clear(x.COLOR_BUFFER_BIT)),x.bufferData(x.ARRAY_BUFFER,this.vertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6),x.bindFramebuffer(x.FRAMEBUFFER,null),x.bindTexture(x.TEXTURE_2D,null)},blitFrame:function(u,f,v,m,g,x,y){v===void 0&&(v=1),m===void 0&&(m=!0),g===void 0&&(g=!0),x===void 0&&(x=!1),y===void 0&&(y=!1);var T=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",v),T.activeTexture(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,u.texture.webGLTexture),u.height>f.height)T.viewport(0,0,u.width,u.height),this.setTargetUVs(u,f);else{var C=f.height-u.height;T.viewport(0,C,u.width,u.height)}if(T.bindFramebuffer(T.FRAMEBUFFER,f.framebuffer.webGLFramebuffer),T.framebufferTexture2D(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,T.TEXTURE_2D,f.texture.webGLTexture,0),m&&(g?T.clearColor(0,0,0,0):T.clearColor(0,0,0,1),T.clear(T.COLOR_BUFFER_BIT)),x){var E=this.renderer.currentBlendMode;this.renderer.setBlendMode(c.ERASE)}y&&this.flipY(),T.bufferData(T.ARRAY_BUFFER,this.vertexData,T.STATIC_DRAW),T.drawArrays(T.TRIANGLES,0,6),x&&this.renderer.setBlendMode(E),T.bindFramebuffer(T.FRAMEBUFFER,null),T.bindTexture(T.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(u,f,v,m,g,x,y,T){y===void 0&&(y=!0),T===void 0&&(T=!0);var C=this.gl;C.bindFramebuffer(C.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,u.texture.webGLTexture,0),y&&(T?C.clearColor(0,0,0,0):C.clearColor(0,0,0,1),C.clear(C.COLOR_BUFFER_BIT)),C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,f.texture.webGLTexture),C.copyTexSubImage2D(C.TEXTURE_2D,0,0,0,v,m,g,x),C.bindFramebuffer(C.FRAMEBUFFER,null),C.bindTexture(C.TEXTURE_2D,null)},copyToGame:function(u){var f=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,u.texture.webGLTexture),f.bufferData(f.ARRAY_BUFFER,this.vertexData,f.STATIC_DRAW),f.drawArrays(f.TRIANGLES,0,6)},drawFrame:function(u,f,v,m){v===void 0&&(v=!0),m===void 0&&(m=this.colorMatrix);var g=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",m.getData()),this.set1f("uAlpha",m.alpha),g.activeTexture(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,u.texture.webGLTexture),f?(g.viewport(0,0,f.width,f.height),g.bindFramebuffer(g.FRAMEBUFFER,f.framebuffer.webGLFramebuffer),g.framebufferTexture2D(g.FRAMEBUFFER,g.COLOR_ATTACHMENT0,g.TEXTURE_2D,f.texture.webGLTexture,0)):g.viewport(0,0,u.width,u.height),v?g.clearColor(0,0,0,0):g.clearColor(0,0,0,1),g.clear(g.COLOR_BUFFER_BIT),g.bufferData(g.ARRAY_BUFFER,this.vertexData,g.STATIC_DRAW),g.drawArrays(g.TRIANGLES,0,6),g.bindFramebuffer(g.FRAMEBUFFER,null),g.bindTexture(g.TEXTURE_2D,null)},blendFrames:function(u,f,v,m,g,x){m===void 0&&(m=1),g===void 0&&(g=!0),x===void 0&&(x=this.linearShader);var y=this.gl;this.setShader(x),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",m),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,u.texture.webGLTexture),y.activeTexture(y.TEXTURE1),y.bindTexture(y.TEXTURE_2D,f.texture.webGLTexture),v?(y.bindFramebuffer(y.FRAMEBUFFER,v.framebuffer.webGLFramebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,v.texture.webGLTexture,0),y.viewport(0,0,v.width,v.height)):y.viewport(0,0,u.width,u.height),g?y.clearColor(0,0,0,0):y.clearColor(0,0,0,1),y.clear(y.COLOR_BUFFER_BIT),y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),y.bindFramebuffer(y.FRAMEBUFFER,null),y.bindTexture(y.TEXTURE_2D,null)},blendFramesAdditive:function(u,f,v,m,g){this.blendFrames(u,f,v,m,g,this.addShader)},clearFrame:function(u,f){f===void 0&&(f=!0);var v=this.gl;v.viewport(0,0,u.width,u.height),v.bindFramebuffer(v.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),f?v.clearColor(0,0,0,0):v.clearColor(0,0,0,1),v.clear(v.COLOR_BUFFER_BIT);var m=this.renderer.currentFramebuffer;v.bindFramebuffer(v.FRAMEBUFFER,m.webGLFramebuffer)},setUVs:function(u,f,v,m,g,x,y,T){var C=this.vertexViewF32;C[2]=u,C[3]=f,C[6]=v,C[7]=m,C[10]=g,C[11]=x,C[14]=u,C[15]=f,C[18]=g,C[19]=x,C[22]=y,C[23]=T},setTargetUVs:function(u,f){var v=f.height/u.height;v>.5?v=.5-(v-.5):v=.5+(.5-v),this.setUVs(0,v,0,1+v,1,1+v,1,v)},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)}});p.exports=l},36060:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline",FX_PIPELINE:"FxPipeline"};p.exports=S},84817:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pipelineafterflush"},36712:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pipelinebeforeflush"},40285:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pipelinebind"},65918:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pipelineboot"},92852:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pipelinedestroy"},56072:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pipelinerebind"},57566:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pipelineresize"},77085:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={AFTER_FLUSH:t(84817),BEFORE_FLUSH:t(36712),BIND:t(40285),BOOT:t(65918),DESTROY:t(92852),REBIND:t(56072),RESIZE:t(57566)}},54812:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(99155),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.amount=1},onPreRender:function(n,e){n=this.getController(n),this.set1f("amount",n.amount,e)}});p.exports=r},67329:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(24400),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(n){n=this.getController(n),this.set1f("strength",n.blurStrength),this.set3fv("color",n.glcolor)},onDraw:function(n){var e=this.getController(),s=this.fullFrame1,o=this.fullFrame2;this.copyFrame(n,o);for(var i=2/n.width*e.offsetX,a=2/n.height*e.offsetY,l=0;l<e.steps;l++)this.set2f("offset",i,0),this.copySprite(n,s),this.set2f("offset",0,a),this.copySprite(s,n);this.blendFrames(o,n,s,e.strength),this.copyToGame(s)}});p.exports=r},8861:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(41514),h=t(51078),r=t(94328),n=t(84057),e=new d({Extends:n,initialize:function(o){n.call(this,{game:o,shaders:[{name:"Gaussian5",fragShader:c},{name:"Gaussian9",fragShader:h},{name:"Gaussian13",fragShader:r}]}),this.activeShader=this.shaders[0],this.x=2,this.y=2,this.steps=4,this.strength=1,this.glcolor=[1,1,1]},setQualityLow:function(){return this.activeShader=this.shaders[0],this},setQualityMedium:function(){return this.activeShader=this.shaders[1],this},setQualityHigh:function(){return this.activeShader=this.shaders[2],this},onDraw:function(s){var o=this.getController(),i=this.gl,a=this.fullFrame1,l=i.getParameter(i.FRAMEBUFFER_BINDING);this.bind(this.shaders[o.quality]),i.activeTexture(i.TEXTURE0),i.viewport(0,0,s.width,s.height),this.set1i("uMainSampler",0),this.set2f("resolution",s.width,s.height),this.set1f("strength",o.strength),this.set3fv("color",o.glcolor);for(var u=0;u<o.steps;u++)this.set2f("offset",o.x,0),this.copySprite(s,a),this.set2f("offset",0,o.y),this.copySprite(a,s);i.bindFramebuffer(i.FRAMEBUFFER,l),i.bindTexture(i.TEXTURE_2D,null),this.copyToGame(s)}});p.exports=e},51051:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(90610),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(n,e,s,o){n=this.getController(n),this.set1f("radius",n.radius,e),this.set1f("amount",n.amount,e),this.set1f("contrast",n.contrast,e),this.set1f("strength",n.strength,e),this.set2f("blur",n.blurX,n.blurY,e),this.setBoolean("isTiltShift",n.isTiltShift,e),s&&o&&this.set2f("resolution",s,o,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r},89428:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(91899),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(n,e,s,o){n=this.getController(n),this.set1f("scale",n.scale,e),this.set1f("feather",n.feather,e),this.set1f("thickness",n.thickness,e),this.set3fv("color",n.glcolor,e),this.set4fv("backgroundColor",n.glcolor2,e),s&&o&&this.set2f("resolution",s,o,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r},88904:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(84057),h=new d({Extends:c,initialize:function(n){c.call(this,{game:n})},onDraw:function(r){var n=this.fullFrame1;this.controller?this.manager.drawFrame(r,n,!0,this.controller):this.drawFrame(r,n),this.copyToGame(n)}});p.exports=h},63563:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(47838),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(n){var e=this.game.textures.getFrame(n);e&&(this.glTexture=e.glTexture)},onDraw:function(n){var e=this.getController(),s=this.fullFrame1;this.bind(),this.set1i("uMainSampler",0),this.set1i("uDisplacementSampler",1),this.set2f("amount",e.x,e.y),this.bindTexture(e.glTexture,1),this.copySprite(n,s),this.copyToGame(s)}});p.exports=r},94045:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(95540),h=t(98656),r=t(84057),n=t(70554),e=new d({Extends:r,initialize:function(o,i){var a=c(i,"quality",.1),l=c(i,"distance",10);r.call(this,{game:o,fragShader:n.setGlowQuality(h,o,a,l)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(s,o,i,a){s=this.getController(s),this.set1f("outerStrength",s.outerStrength,o),this.set1f("innerStrength",s.innerStrength,o),this.set4fv("glowColor",s.glcolor,o),this.setBoolean("knockout",s.knockout,o),i&&a&&this.set2f("resolution",i,a,o)},onDraw:function(s){this.set2f("resolution",s.width,s.height),this.bindAndDraw(s)}});p.exports=e},74088:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(70463),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.alpha=.2,this.size=0,this.fromX=0,this.fromY=0,this.toX=0,this.toY=1,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0]},onPreRender:function(n,e){n=this.getController(n),this.set1f("alpha",n.alpha,e),this.set1i("size",n.size,e),this.set3fv("color1",n.glcolor1,e),this.set3fv("color2",n.glcolor2,e),this.set2f("positionFrom",n.fromX,n.fromY,e),this.set2f("positionTo",n.toX,n.toY,e)}});p.exports=r},99636:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(50831),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.amount=1},onPreRender:function(n,e,s,o){n=this.getController(n),this.set1f("amount",n.amount,e),s&&o&&this.set2f("resolution",s,o,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r},34700:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(92595),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.x=0,this.y=0,this.decay=.1,this.power=1,this.glcolor=[0,0,0,1],this.samples=6,this.intensity=1},onPreRender:function(n,e){n=this.getController(n);var s=n.samples;this.set1i("samples",s,e),this.set1f("intensity",n.intensity,e),this.set1f("decay",n.decay,e),this.set1f("power",n.power/s,e),this.set2f("lightPosition",n.x,n.y,e),this.set4fv("color",n.glcolor,e)}});p.exports=r},91157:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(72464),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(n,e,s,o){n=this.getController(n),this.setTime("time",e),this.set1f("speed",n.speed,e),this.set1f("lineWidth",n.lineWidth,e),this.set1f("gradient",n.gradient,e),this.setBoolean("reveal",n.reveal,e),s&&o&&this.set2f("resolution",s,o,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r},27797:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(39249),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(n,e){n=this.getController(n),this.set1f("radius",n.radius,e),this.set1f("strength",n.strength,e),this.set2f("position",n.x,n.y,e)}});p.exports=r},67603:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(2878),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(n,e){n=this.getController(n);var s=n.progress,o=n.wipeWidth,i=n.direction,a=n.axis;this.set4f("config",s,o,i,a,e),this.setBoolean("reveal",n.reveal,e)}});p.exports=r},58918:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d={Barrel:t(54812),Bloom:t(67329),Blur:t(8861),Bokeh:t(51051),Circle:t(89428),ColorMatrix:t(88904),Displacement:t(63563),Glow:t(94045),Gradient:t(74088),Pixelate:t(99636),Shadow:t(34700),Shine:t(91157),Vignette:t(27797),Wipe:t(67603)};p.exports=d},96615:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(36060),c=t(79291),h={FX:t(58918),BitmapMaskPipeline:t(31302),Events:t(77085),FXPipeline:t(92651),LightPipeline:t(96569),MobilePipeline:t(56527),MultiPipeline:t(57516),PointLightPipeline:t(43439),PostFXPipeline:t(84057),PreFXPipeline:t(43558),RopePipeline:t(81041),SinglePipeline:t(12385),UtilityPipeline:t(7589)};h=c(!1,h,d),p.exports=h},35407:p=>{p.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(`
`)},78908:p=>{p.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);"," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }"," gl_FragColor = mainColor;","}"].join(`
`)},85191:p=>{p.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(`
`)},96293:p=>{p.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(`
`)},36682:p=>{p.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(`
`)},99155:p=>{p.exports=["#define SHADER_NAME BARREL_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join(`
`)},24400:p=>{p.exports=["#define SHADER_NAME BLOOM_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec4 sum = texture2D(uMainSampler, outTexCoord) * 0.204164 * strength;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord - offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 3.294215) * 0.093913;"," gl_FragColor = (sum + texture2D(uMainSampler, outTexCoord - offset * 3.294215) * 0.093913) * vec4(color, 1);","}"].join(`
`)},94328:p=>{p.exports=["#define SHADER_NAME BLUR_HIGH_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.411764705882353) * offset * strength;"," vec2 off2 = vec2(3.2941176470588234) * offset * strength;"," vec2 off3 = vec2(5.176470588235294) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.1964825501511404;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += texture2D(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
`)},41514:p=>{p.exports=["#define SHADER_NAME BLUR_LOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.29411764705882354;"," col += texture2D(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += texture2D(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
`)},51078:p=>{p.exports=["#define SHADER_NAME BLUR_MED_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.3846153846) * offset * strength;"," vec2 off2 = vec2(3.2307692308) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.2270270270;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
`)},90610:p=>{p.exports=["#define SHADER_NAME BOKEH_FS","precision mediump float;","#define ITERATIONS 100.0","#define ONEOVER_ITR 1.0 / ITERATIONS","#define PI 3.141596","#define GOLDEN_ANGLE 2.39996323","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float radius;","uniform float amount;","uniform float contrast;","uniform bool isTiltShift;","uniform float strength;","uniform vec2 blur;","varying vec2 outTexCoord;","vec2 Sample (in float theta, inout float r)","{"," r += 1.0 / r;"," return (r - 1.0) * vec2(cos(theta), sin(theta)) * 0.06;","}","vec3 Bokeh (sampler2D tex, vec2 uv, float radius)","{"," vec3 acc = vec3(0.0);"," vec3 div = vec3(0.0);"," vec2 pixel = vec2(resolution.y / resolution.x, 1.0) * radius * .025;"," float r = 1.0;"," for (float j = 0.0; j < GOLDEN_ANGLE * ITERATIONS; j += GOLDEN_ANGLE)"," {"," vec3 col = texture2D(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);","}"].join(`
`)},91899:p=>{p.exports=["#define SHADER_NAME CIRCLE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec3 color;","uniform vec4 backgroundColor;","uniform float thickness;","uniform float scale;","uniform float feather;","varying vec2 outTexCoord;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 position = (gl_FragCoord.xy / resolution.xy) * 2.0 - 1.0;"," float aspectRatio = resolution.x / resolution.y;"," position.x *= aspectRatio;"," float grad = length(position);"," float outer = aspectRatio;"," float inner = outer - (thickness * 2.0 / resolution.y);"," if (aspectRatio >= 1.0)"," {"," float f = 2.0 + (resolution.y / resolution.x);"," outer = 1.0;"," inner = 1.0 - (thickness * f / resolution.x);"," }"," outer *= scale;"," inner *= scale;"," float circle = smoothstep(outer, outer - 0.01, grad);"," float ring = circle - smoothstep(inner, inner - feather, grad);"," texture = mix(backgroundColor * backgroundColor.a, texture, texture.a);"," texture = (texture * (circle - ring));"," gl_FragColor = vec4(texture.rgb + (ring * color), texture.a);","}"].join(`
`)},47838:p=>{p.exports=["#define SHADER_NAME DISPLACEMENT_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rr) * amount;"," gl_FragColor = texture2D(uMainSampler, outTexCoord + disp).rgba;","}"].join(`
`)},98656:p=>{p.exports=["#define SHADER_NAME GLOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float DIST = __DIST__;","const float SIZE = min(__SIZE__, PI * 2.0);","const float STEP = ceil(PI * 2.0 / SIZE);","const float MAX_ALPHA = STEP * DIST * (DIST + 1.0) / 2.0;","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y);"," float totalAlpha = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float angle = 0.0; angle < PI * 2.0; angle += SIZE)"," {"," direction = vec2(cos(angle), sin(angle)) * px;"," for (float curDistance = 0.0; curDistance < DIST; curDistance++)"," {"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = texture2D(uMainSampler, displaced);"," totalAlpha += (DIST - curDistance) * color.a;"," }"," }"," color = texture2D(uMainSampler, outTexCoord);"," float alphaRatio = (totalAlpha / MAX_ALPHA);"," float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * color.a;"," float innerGlowStrength = min(1.0, innerGlowAlpha);"," vec4 innerColor = mix(color, glowColor, innerGlowStrength);"," float outerGlowAlpha = alphaRatio * outerStrength * (1.0 - color.a);"," float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," if (knockout)"," {"," float resultAlpha = outerGlowAlpha + innerGlowAlpha;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join(`
`)},70463:p=>{p.exports=["#define SHADER_NAME GRADIENT_FS","#define SRGB_TO_LINEAR(c) pow((c), vec3(2.2))","#define LINEAR_TO_SRGB(c) pow((c), vec3(1.0 / 2.2))","#define SRGB(r, g, b) SRGB_TO_LINEAR(vec3(float(r), float(g), float(b)) / 255.0)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 positionFrom;","uniform vec2 positionTo;","uniform vec3 color1;","uniform vec3 color2;","uniform float alpha;","uniform int size;","varying vec2 outTexCoord;","float gradientNoise(in vec2 uv)","{"," const vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189);"," return fract(magic.z * fract(dot(uv, magic.xy)));","}","float stepped (in float s, in float scale, in int steps)","{"," return steps > 0 ? floor( s / ((1.0 * scale) / float(steps))) * 1.0 / float(steps - 1) : s;","}","void main ()","{"," vec2 a = positionFrom;"," vec2 b = positionTo;"," vec2 ba = b - a;"," float d = dot(outTexCoord - a, ba) / dot(ba, ba);"," float t = size > 0 ? stepped(d, 1.0, size) : d;"," t = smoothstep(0.0, 1.0, clamp(t, 0.0, 1.0));"," vec3 color = mix(SRGB(color1.r, color1.g, color1.b), SRGB(color2.r, color2.g, color2.b), t);"," color = LINEAR_TO_SRGB(color);"," color += (1.0 / 255.0) * gradientNoise(outTexCoord) - (0.5 / 255.0);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = vec4(mix(color.rgb, texture.rgb, alpha), 1.0) * texture.a;","}"].join(`
`)},50831:p=>{p.exports=["#define SHADER_NAME PIXELATE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float amount;","varying vec2 outTexCoord;","void main ()","{"," float pixelSize = floor(2.0 + amount);"," vec2 center = pixelSize * floor(outTexCoord * resolution / pixelSize) + pixelSize * vec2(0.5, 0.5);"," vec2 corner1 = center + pixelSize * vec2(-0.5, -0.5);"," vec2 corner2 = center + pixelSize * vec2(+0.5, -0.5);"," vec2 corner3 = center + pixelSize * vec2(+0.5, +0.5);"," vec2 corner4 = center + pixelSize * vec2(-0.5, +0.5);"," vec4 pixel = 0.4 * texture2D(uMainSampler, center / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner1 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner2 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner3 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner4 / resolution);"," gl_FragColor = pixel;","}"].join(`
`)},92595:p=>{p.exports=["#define SHADER_NAME SHADOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform vec2 lightPosition;","uniform vec4 color;","uniform float decay;","uniform float power;","uniform float intensity;","uniform int samples;","const int MAX = 12;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 pc = (lightPosition - outTexCoord) * intensity;"," float shadow = 0.0;"," float limit = max(float(MAX), float(samples));"," for (int i = 0; i < MAX; ++i)"," {"," if (i >= samples)"," {"," break;"," }"," shadow += texture2D(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, shadow * mask);","}"].join(`
`)},72464:p=>{p.exports=["#define SHADER_NAME SHINE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform bool reveal;","uniform float speed;","uniform float time;","uniform float lineWidth;","uniform float gradient;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = gl_FragCoord.xy / resolution.xy;"," vec4 tex = texture2D(uMainSampler, outTexCoord);"," vec4 col1 = vec4(0.3, 0.0, 0.0, 1.0);"," vec4 col2 = vec4(0.85, 0.85, 0.85, 1.0);"," uv.x = uv.x - mod(time * speed, 2.0) + 0.5;"," float y = uv.x * gradient;"," float s = smoothstep(y - lineWidth, y, uv.y) - smoothstep(y, y + lineWidth, uv.y);"," gl_FragColor = (((s * col1) + (s * col2)) * tex);"," if (!reveal)"," {"," gl_FragColor += tex;"," }","}"].join(`
`)},39249:p=>{p.exports=["#define SHADER_NAME VIGNETTE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float radius;","uniform float strength;","uniform vec2 position;","varying vec2 outTexCoord;","void main ()","{"," vec4 col = vec4(1.0);"," float d = length(outTexCoord - position);"," if (d <= radius)"," {"," float g = d / radius;"," g = sin(g * 3.14 * strength);"," col = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join(`
`)},2878:p=>{p.exports=["#define SHADER_NAME WIPE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 config;","uniform bool reveal;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 color0;"," vec4 color1;"," if (reveal)"," {"," color0 = vec4(0);"," color1 = texture2D(uMainSampler, uv);"," }"," else"," {"," color0 = texture2D(uMainSampler, uv);"," color1 = vec4(0);"," }"," float distance = config.x;"," float width = config.y;"," float direction = config.z;"," float axis = uv.x;"," if (config.w == 1.0)"," {"," axis = uv.y;"," }"," float adjust = mix(width, -width, distance);"," float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);"," gl_FragColor = mix(color1, color0, value);","}"].join(`
`)},31063:p=>{p.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;","uniform int uLightCount;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," 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)"," {"," if (index < uLightCount)"," {"," 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(`
`)},48247:p=>{p.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(`
`)},41214:p=>{p.exports=["#define SHADER_NAME PHASER_MESH_FS","precision mediump float;","uniform vec3 uLightPosition;","uniform vec3 uLightAmbient;","uniform vec3 uLightDiffuse;","uniform vec3 uLightSpecular;","uniform vec3 uFogColor;","uniform float uFogNear;","uniform float uFogFar;","uniform vec3 uMaterialAmbient;","uniform vec3 uMaterialDiffuse;","uniform vec3 uMaterialSpecular;","uniform float uMaterialShine;","uniform vec3 uCameraPosition;","uniform sampler2D uTexture;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main (void)","{"," vec4 color = texture2D(uTexture, vTextureCoord);"," vec3 ambient = uLightAmbient * uMaterialAmbient;"," vec3 norm = normalize(vNormal);"," vec3 lightDir = normalize(uLightPosition - vPosition);"," float diff = max(dot(norm, lightDir), 0.0);"," vec3 diffuse = uLightDiffuse * (diff * uMaterialDiffuse);"," vec3 viewDir = normalize(uCameraPosition - vPosition);"," vec3 reflectDir = reflect(-lightDir, norm);"," float spec = pow(max(dot(viewDir, reflectDir), 0.0), uMaterialShine);"," vec3 specular = uLightSpecular * (spec * uMaterialSpecular);"," vec3 result = (ambient + diffuse + specular) * color.rgb;"," float depth = gl_FragCoord.z / gl_FragCoord.w;"," float fogFactor = smoothstep(uFogNear, uFogFar, depth);"," gl_FragColor.rgb = mix(result.rgb, uFogColor, fogFactor);"," gl_FragColor.a = color.a;","}"].join(`
`)},39653:p=>{p.exports=["#define SHADER_NAME PHASER_MESH_VS","precision mediump float;","attribute vec3 aVertexPosition;","attribute vec3 aVertexNormal;","attribute vec2 aTextureCoord;","uniform mat4 uViewProjectionMatrix;","uniform mat4 uModelMatrix;","uniform mat4 uNormalMatrix;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main ()","{"," vTextureCoord = aTextureCoord;"," vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0));"," vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));"," gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);","}"].join(`
`)},62143:p=>{p.exports=["#define SHADER_NAME PHASER_MOBILE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(`
`)},47940:p=>{p.exports=["#define SHADER_NAME PHASER_MOBILE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","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(`
`)},98840:p=>{p.exports=["#define SHADER_NAME PHASER_MULTI_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","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);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(`
`)},44667:p=>{p.exports=["#define SHADER_NAME PHASER_MULTI_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","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(`
`)},4127:p=>{p.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(`
`)},89924:p=>{p.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(`
`)},27681:p=>{p.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join(`
`)},49627:p=>{p.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(`
`)},45561:p=>{p.exports=["#define SHADER_NAME PHASER_SINGLE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","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);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(`
`)},60722:p=>{p.exports=["#define SHADER_NAME PHASER_SINGLE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","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(`
`)},89350:(p,S,t)=>{/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2013-2023 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={AddBlendFrag:t(35407),BitmapMaskFrag:t(78908),BitmapMaskVert:t(85191),ColorMatrixFrag:t(96293),CopyFrag:t(36682),FXBarrelFrag:t(99155),FXBloomFrag:t(24400),FXBlurHighFrag:t(94328),FXBlurLowFrag:t(41514),FXBlurMedFrag:t(51078),FXBokehFrag:t(90610),FXCircleFrag:t(91899),FXDisplacementFrag:t(47838),FXGlowFrag:t(98656),FXGradientFrag:t(70463),FXPixelateFrag:t(50831),FXShadowFrag:t(92595),FXShineFrag:t(72464),FXVignetteFrag:t(39249),FXWipeFrag:t(2878),LightFrag:t(31063),LinearBlendFrag:t(48247),MeshFrag:t(41214),MeshVert:t(39653),MobileFrag:t(62143),MobileVert:t(47940),MultiFrag:t(98840),MultiVert:t(44667),PointLightFrag:t(4127),PointLightVert:t(89924),PostFXFrag:t(27681),QuadVert:t(49627),SingleFrag:t(45561),SingleVert:t(60722)}},93567:(p,S,t)=>{/**
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n,e){this.webGLAttribLocation=-1,this.gl=r,this.program=n,this.name=e,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLAttribLocation=-1;return}var h=this.gl;h.isContextLost()||(this.webGLAttribLocation=h.getAttribLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});p.exports=c},26128:(p,S,t)=>{/**
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n,e,s){this.webGLBuffer=null,this.gl=r,this.initialDataOrSize=n,this.bufferType=e,this.bufferUsage=s,this.createResource()},createResource:function(){if(this.initialDataOrSize!==null){var h=this.gl;if(!h.isContextLost()){var r=this.bufferType,n=h.createBuffer();this.webGLBuffer=n,h.bindBuffer(r,this.webGLBuffer),h.bufferData(r,this.initialDataOrSize,this.bufferUsage),h.bindBuffer(r,null)}}},destroy:function(){var h=this.gl;h.isContextLost()||h.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});p.exports=c},84387:(p,S,t)=>{/**
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},h=new d({initialize:function(n,e,s,o,i){this.webGLFramebuffer=null,this.gl=n,this.width=e,this.height=s,this.renderTexture=o,this.addDepthStencilBuffer=!!i,this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){var n=this.renderTexture,e=0,s=r.createFramebuffer();if(this.webGLFramebuffer=s,r.bindFramebuffer(r.FRAMEBUFFER,s),n.isRenderTexture=!0,n.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,n.webGLTexture,0),e=r.checkFramebufferStatus(r.FRAMEBUFFER),e!==r.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(c[e]||e));if(this.addDepthStencilBuffer){var o=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,o),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,this.width,this.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,o)}r.bindFramebuffer(r.FRAMEBUFFER,null)}},destroy:function(){if(this.webGLFramebuffer!==null){var r=this.gl;if(!r.isContextLost()){r.bindFramebuffer(r.FRAMEBUFFER,this.webGLFramebuffer);var n=r.getFramebufferAttachmentParameter(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);n!==null&&(r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,null,0),r.deleteTexture(n));var e=r.getFramebufferAttachmentParameter(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);e!==null&&r.deleteRenderbuffer(e),r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});p.exports=h},1482:(p,S,t)=>{/**
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n,e){this.webGLProgram=null,this.gl=r,this.vertexSource=n,this.fragmentSource=e,this.createResource()},createResource:function(){var h=this.gl;if(!h.isContextLost()){var r=h.createProgram(),n=h.createShader(h.VERTEX_SHADER),e=h.createShader(h.FRAGMENT_SHADER);h.shaderSource(n,this.vertexSource),h.shaderSource(e,this.fragmentSource),h.compileShader(n),h.compileShader(e);var s=`Shader failed:
`;if(!h.getShaderParameter(n,h.COMPILE_STATUS))throw new Error("Vertex "+s+h.getShaderInfoLog(n));if(!h.getShaderParameter(e,h.COMPILE_STATUS))throw new Error("Fragment "+s+h.getShaderInfoLog(e));if(h.attachShader(r,n),h.attachShader(r,e),h.linkProgram(r),!h.getProgramParameter(r,h.LINK_STATUS))throw new Error("Link "+s+h.getProgramInfoLog(r));h.useProgram(r),this.webGLProgram=r}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});p.exports=c},82751:(p,S,t)=>{/**
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(50030),h=new d({initialize:function(n,e,s,o,i,a,l,u,f,v,m,g,x){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=n,this.mipLevel=e,this.minFilter=s,this.magFilter=o,this.wrapT=i,this.wrapS=a,this.format=l,this.pixels=u,this.width=f,this.height=v,this.pma=m??!0,this.forceSize=!!g,this.flipY=!!x,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){if(this.pixels instanceof h){this.webGLTexture=this.pixels.webGLTexture;return}var n=r.createTexture();n.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=n,this._processTexture()}},update:function(r,n,e,s,o,i,a,l,u){if(!(n===0||e===0)){this.pixels=r,this.width=n,this.height=e,this.flipY=s,this.wrapS=o,this.wrapT=i,this.minFilter=a,this.magFilter=l,this.format=u;var f=this.gl;f.isContextLost()||this._processTexture()}},_processTexture:function(){var r=this.gl;r.activeTexture(r.TEXTURE0);var n=r.getParameter(r.TEXTURE_BINDING_2D);r.bindTexture(r.TEXTURE_2D,this.webGLTexture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,this.minFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,this.magFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this.wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this.wrapT),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,this.flipY);var e=this.pixels,s=this.mipLevel,o=this.width,i=this.height,a=this.format,l=!1;if(e==null)r.texImage2D(r.TEXTURE_2D,s,a,o,i,0,a,r.UNSIGNED_BYTE,null),l=c(o,i);else if(e.compressed){o=e.width,i=e.height,l=e.generateMipmap;for(var u=0;u<e.mipmaps.length;u++)r.compressedTexImage2D(r.TEXTURE_2D,u,e.internalFormat,e.mipmaps[u].width,e.mipmaps[u].height,0,e.mipmaps[u].data)}else e instanceof Uint8Array?(r.texImage2D(r.TEXTURE_2D,s,a,o,i,0,a,r.UNSIGNED_BYTE,e),l=c(o,i)):(this.forceSize||(o=e.width,i=e.height),r.texImage2D(r.TEXTURE_2D,s,a,a,r.UNSIGNED_BYTE,e),l=c(o,i));l&&r.generateMipmap(r.TEXTURE_2D),n?r.bindTexture(r.TEXTURE_2D,n):r.bindTexture(r.TEXTURE_2D,null)},spectorMetadata:{get:function(){return this.__SPECTOR_Metadata},set:function(r){this.__SPECTOR_Metadata=r,this.gl.isContextLost()||(this.webGLTexture.__SPECTOR_Metadata=r)}},destroy:function(){this.webGLTexture!==null&&(this.gl.isContextLost()||this.pixels instanceof h||this.gl.deleteTexture(this.webGLTexture),this.pixels=null,this.webGLTexture=null,this.gl=null)}});p.exports=h},57183:(p,S,t)=>{/**
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n,e){this.webGLUniformLocation=null,this.gl=r,this.program=n,this.name=e,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLUniformLocation=null;return}var h=this.gl;h.isContextLost()||(this.webGLUniformLocation=h.getUniformLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});p.exports=c},9503:(p,S,t)=>{/**
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d={WebGLAttribLocationWrapper:t(93567),WebGLBufferWrapper:t(26128),WebGLProgramWrapper:t(1482),WebGLTextureWrapper:t(82751),WebGLFramebufferWrapper:t(84387),WebGLUniformLocationWrapper:t(57183)};p.exports=d},76531:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(13560),c=t(83419),h=t(50792),r=t(97480),n=t(8443),e=t(57811),s=t(74403),o=t(45818),i=t(29747),a=t(87841),l=t(86555),u=t(56583),f=t(26099),v=t(38058),m=new c({Extends:h,initialize:function(x){h.call(this),this.game=x,this.canvas,this.canvasBounds=new a,this.parent=null,this.parentIsWindow=!1,this.parentSize=new l,this.gameSize=new l,this.baseSize=new l,this.displaySize=new l,this.scaleMode=d.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new f(1,1),this.autoRound=!1,this.autoCenter=d.CENTER.NO_CENTER,this.orientation=d.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:i,windowResize:i,fullScreenChange:i,fullScreenError:i}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(n.BOOT,this.boot,this)},boot:function(){var g=this.game;this.canvas=g.canvas,this.fullscreen=g.device.fullscreen;var x=this.scaleMode;x!==d.SCALE_MODE.RESIZE&&x!==d.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(x),x===d.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),g.events.on(n.PRE_STEP,this.step,this),g.events.once(n.READY,this.refresh,this),g.events.once(n.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(g){this.getParent(g),this.getParentBounds();var x=g.width,y=g.height,T=g.scaleMode,C=g.zoom,E=g.autoRound;if(typeof x=="string")if(x.substr(-1)!=="%")x=parseInt(x,10);else{var M=this.parentSize.width;M===0&&(M=window.innerWidth);var P=parseInt(x,10)/100;x=Math.floor(M*P)}if(typeof y=="string")if(y.substr(-1)!=="%")y=parseInt(y,10);else{var A=this.parentSize.height;A===0&&(A=window.innerHeight);var R=parseInt(y,10)/100;y=Math.floor(A*R)}this.scaleMode=T,this.autoRound=E,this.autoCenter=g.autoCenter,this.resizeInterval=g.resizeInterval,E&&(x=Math.floor(x),y=Math.floor(y)),this.gameSize.setSize(x,y),C===d.ZOOM.MAX_ZOOM&&(C=this.getMaxZoom()),this.zoom=C,C!==1&&(this._resetZoom=!0),this.baseSize.setSize(x,y),E&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),g.minWidth>0&&this.displaySize.setMin(g.minWidth*C,g.minHeight*C),g.maxWidth>0&&this.displaySize.setMax(g.maxWidth*C,g.maxHeight*C),this.displaySize.setSize(x,y),(g.snapWidth>0||g.snapHeight>0)&&this.displaySize.setSnap(g.snapWidth,g.snapHeight),this.orientation=o(x,y)},getParent:function(g){var x=g.parent;if(x!==null){if(this.parent=s(x),this.parentIsWindow=this.parent===document.body,g.expandParent&&g.scaleMode!==d.SCALE_MODE.NONE){var y=this.parent.getBoundingClientRect();(this.parentIsWindow||y.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",y=this.parent.getBoundingClientRect(),!this.parentIsWindow&&y.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}g.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=s(g.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var g=this.parentSize,x=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(x.height=e(!0));var y=x.width,T=x.height;if(g.width!==y||g.height!==T)return g.setSize(y,T),!0;if(this.canvas){var C=this.canvasBounds,E=this.canvas.getBoundingClientRect();if(E.x!==C.x||E.y!==C.y)return!0}return!1},lockOrientation:function(g){var x=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return x?x.call(screen,g):!1},setParentSize:function(g,x){return this.parentSize.setSize(g,x),this.refresh()},setGameSize:function(g,x){var y=this.autoRound;y&&(g=Math.floor(g),x=Math.floor(x));var T=this.width,C=this.height;return this.gameSize.resize(g,x),this.baseSize.resize(g,x),y&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(g/x),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(T,C)},resize:function(g,x){var y=this.zoom,T=this.autoRound;T&&(g=Math.floor(g),x=Math.floor(x));var C=this.width,E=this.height;this.gameSize.resize(g,x),this.baseSize.resize(g,x),T&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(g*y,x*y),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var M=this.canvas.style,P=g*y,A=x*y;return T&&(P=Math.floor(P),A=Math.floor(A)),(P!==g||A!==x)&&(M.width=P+"px",M.height=A+"px"),this.refresh(C,E)},setZoom:function(g){return this.zoom=g,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(g,x){return g===void 0&&(g=0),x===void 0&&(x=g),this.displaySize.setSnap(g,x),this.refresh()},refresh:function(g,x){g===void 0&&(g=this.width),x===void 0&&(x=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var y=this.game.domContainer;if(y){this.baseSize.setCSS(y);var T=this.canvas.style,C=y.style;C.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",C.marginLeft=T.marginLeft,C.marginTop=T.marginTop}return this.emit(r.RESIZE,this.gameSize,this.baseSize,this.displaySize,g,x),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var g=o(this.width,this.height);g!==this.orientation&&(this.orientation=g,this.emit(r.ORIENTATION_CHANGE,g))}},updateScale:function(){var g=this.canvas.style,x=this.gameSize.width,y=this.gameSize.height,T,C,E=this.zoom,M=this.autoRound;if(this.scaleMode===d.SCALE_MODE.NONE)this.displaySize.setSize(x*E,y*E),T=this.displaySize.width,C=this.displaySize.height,M&&(T=Math.floor(T),C=Math.floor(C)),this._resetZoom&&(g.width=T+"px",g.height=C+"px",this._resetZoom=!1);else if(this.scaleMode===d.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,C=this.displaySize.height,M&&(T=Math.floor(T),C=Math.floor(C)),this.canvas.width=T,this.canvas.height=C;else if(this.scaleMode===d.SCALE_MODE.EXPAND){var P=this.game.config.width,A=this.game.config.height;this.displaySize.setSize(this.parentSize.width,this.parentSize.height),T=this.displaySize.width,C=this.displaySize.height,M&&(T=Math.floor(T),C=Math.floor(C)),g.width=T+"px",g.height=C+"px";var R=this.parentSize.width/P,F=this.parentSize.height/A;R<F&&R!==0?this.baseSize.setSize(P,this.parentSize.height/R):F!==0&&this.baseSize.setSize(this.displaySize.width/F,A),this.gameSize.setSize(this.baseSize.width,this.baseSize.height),T=this.baseSize.width,C=this.baseSize.height,M&&(T=Math.floor(T),C=Math.floor(C)),this.canvas.width=T,this.canvas.height=C}else this.displaySize.setSize(this.parentSize.width,this.parentSize.height),T=this.displaySize.width,C=this.displaySize.height,M&&(T=Math.floor(T),C=Math.floor(C)),g.width=T+"px",g.height=C+"px";this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var g=u(this.parentSize.width,this.gameSize.width,0,!0),x=u(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(g,x),1)},updateCenter:function(){var g=this.autoCenter;if(g!==d.CENTER.NO_CENTER){var x=this.canvas,y=x.style,T=x.getBoundingClientRect(),C=T.width,E=T.height,M=Math.floor((this.parentSize.width-C)/2),P=Math.floor((this.parentSize.height-E)/2);g===d.CENTER.CENTER_HORIZONTALLY?P=0:g===d.CENTER.CENTER_VERTICALLY&&(M=0),y.marginLeft=M+"px",y.marginTop=P+"px"}},updateBounds:function(){var g=this.canvasBounds,x=this.canvas.getBoundingClientRect();g.x=x.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),g.y=x.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),g.width=x.width,g.height=x.height},transformX:function(g){return(g-this.canvasBounds.left)*this.displayScale.x},transformY:function(g){return(g-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(g){g===void 0&&(g={navigationUI:"hide"});var x=this.fullscreen;if(!x.available){this.emit(r.FULLSCREEN_UNSUPPORTED);return}if(!x.active){var y=this.getFullscreenTarget();x.keyboard?y[x.request](Element.ALLOW_KEYBOARD_INPUT):y[x.request](g)}},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(r.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(g){this.removeFullscreenTarget(),this.emit(r.FULLSCREEN_FAILED,g)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var g=document.createElement("div");g.style.margin="0",g.style.padding="0",g.style.width="100%",g.style.height="100%",this.fullscreenTarget=g,this._createdFullscreenTarget=!0}if(this._createdFullscreenTarget){var x=this.canvas.parentNode;x.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)}return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var g=this.fullscreenTarget;if(g&&g.parentNode){var x=g.parentNode;x.insertBefore(this.canvas,g),x.removeChild(g)}}},stopFullscreen:function(){var g=this.fullscreen;if(!g.available)return this.emit(r.FULLSCREEN_UNSUPPORTED),!1;g.active&&document[g.cancel](),this.removeFullscreenTarget()},leaveFullScreenSuccessHandler:function(){this.getParentBounds(),this.emit(r.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(g){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(g)},startListeners:function(){var g=this,x=this.domlisteners;if(x.orientationChange=function(){g.updateBounds(),g._checkOrientation=!0,g.dirty=!0,g.refresh()},x.windowResize=function(){g.updateBounds(),g.dirty=!0},screen.orientation&&screen.orientation.addEventListener?screen.orientation.addEventListener("change",x.orientationChange,!1):window.addEventListener("orientationchange",x.orientationChange,!1),window.addEventListener("resize",x.windowResize,!1),this.fullscreen.available){x.fullScreenChange=function(T){return g.onFullScreenChange(T)},x.fullScreenError=function(T){return g.onFullScreenError(T)};var y=["webkit","moz",""];y.forEach(function(T){document.addEventListener(T+"fullscreenchange",x.fullScreenChange,!1),document.addEventListener(T+"fullscreenerror",x.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",x.fullScreenChange,!1),document.addEventListener("MSFullscreenError",x.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():(this.stopFullscreen(),this.leaveFullScreenSuccessHandler())},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(g,x){g instanceof v||(x=g,g=void 0),x===void 0&&(x=new a);var y=this.baseSize,T=this.parentSize,C=this.canvasBounds,E=this.displayScale,M=C.x>=0?0:-(C.x*E.x),P=C.y>=0?0:-(C.y*E.y),A;T.width>=C.width?A=y.width:A=y.width-(C.width-T.width)*E.x;var R;return T.height>=C.height?R=y.height:R=y.height-(C.height-T.height)*E.y,x.setTo(M,P,A,R),g&&(x.width/=g.zoomX,x.height/=g.zoomY,x.centerX=g.centerX+g.scrollX,x.centerY=g.centerY+g.scrollY),x},step:function(g,x){this.parent&&(this._lastCheck+=x,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var g=this.domlisteners;screen.orientation&&screen.orientation.addEventListener?screen.orientation.removeEventListener("change",g.orientationChange,!1):window.removeEventListener("orientationchange",g.orientationChange,!1),window.removeEventListener("resize",g.windowResize,!1);var x=["webkit","moz",""];x.forEach(function(y){document.removeEventListener(y+"fullscreenchange",g.fullScreenChange,!1),document.removeEventListener(y+"fullscreenerror",g.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",g.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",g.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===d.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===d.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});p.exports=m},64743:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={LANDSCAPE:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary",PORTRAIT:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary"}},81050:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d={CENTER:t(64743),ORIENTATION:t(39218),SCALE_MODE:t(81050),ZOOM:t(80805)};p.exports=d},56139:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="enterfullscreen"},2336:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="fullscreenfailed"},47412:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="fullscreenunsupported"},51452:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="leavefullscreen"},20666:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="orientationchange"},47945:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="resize"},97480:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={ENTER_FULLSCREEN:t(56139),FULLSCREEN_FAILED:t(2336),FULLSCREEN_UNSUPPORTED:t(47412),LEAVE_FULLSCREEN:t(51452),ORIENTATION_CHANGE:t(20666),RESIZE:t(47945)}},93364:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(79291),c=t(13560),h={Center:t(64743),Events:t(97480),Orientation:t(39218),ScaleManager:t(76531),ScaleModes:t(81050),Zoom:t(80805)};h=d(!1,h,c.CENTER),h=d(!1,h,c.ORIENTATION),h=d(!1,h,c.SCALE_MODE),h=d(!1,h,c.ZOOM),p.exports=h},27397:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(95540),c=t(35355),h=function(r){var n=r.game.config.defaultPhysicsSystem,e=d(r.settings,"physics",!1);if(!(!n&&!e)){var s=[];if(n&&s.push(c(n+"Physics")),e)for(var o in e)o=c(o.concat("Physics")),s.indexOf(o)===-1&&s.push(o);return s}};p.exports=h},52106:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(95540),c=function(h){var r=h.plugins.getDefaultScenePlugins(),n=d(h.settings,"plugins",!1);return Array.isArray(n)?n:r||[]};p.exports=c},87033:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={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"};p.exports=S},97482:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(2368),h=new d({initialize:function(n){this.sys=new c(this,n),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});p.exports=h},60903:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(89993),h=t(44594),r=t(8443),n=t(35154),e=t(54899),s=t(29747),o=t(97482),i=t(2368),a=new d({initialize:function(u,f){if(this.game=u,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,f){Array.isArray(f)||(f=[f]);for(var v=0;v<f.length;v++)this._pending.push({key:"default",scene:f[v],autoStart:v===0,data:{}})}u.events.once(r.READY,this.bootQueue,this)},bootQueue:function(){if(!this.isBooted){this.systemScene=this.createSceneFromInstance("__SYSTEM",new o),this.game.events.emit(r.SYSTEM_READY,this.systemScene,this);var l,u,f,v;for(l=0;l<this._pending.length;l++){u=this._pending[l],f=u.key,v=u.scene;var m;v instanceof o?m=this.createSceneFromInstance(f,v):typeof v=="object"?m=this.createSceneFromObject(f,v):typeof v=="function"&&(m=this.createSceneFromFunction(f,v)),f=m.sys.settings.key,this.keys[f]=m,this.scenes.push(m),this._data[f]&&(m.sys.settings.data=this._data[f].data,this._data[f].autoStart&&(u.autoStart=!0)),(u.autoStart||m.sys.settings.active)&&this._start.push(f)}for(this._pending.length=0,this._data={},this.isBooted=!0,l=0;l<this._start.length;l++)u=this._start[l],this.start(u);this._start.length=0}},processQueue:function(){var l=this._pending.length,u=this._queue.length;if(!(l===0&&u===0)){var f,v;if(l){for(f=0;f<l;f++)v=this._pending[f],this.add(v.key,v.scene,v.autoStart,v.data);for(f=0;f<this._start.length;f++)v=this._start[f],this.start(v);this._start.length=0,this._pending.length=0}for(f=0;f<this._queue.length;f++)v=this._queue[f],this[v.op](v.keyA,v.keyB,v.data);this._queue.length=0}},add:function(l,u,f,v){if(f===void 0&&(f=!1),v===void 0&&(v={}),this.isProcessing||!this.isBooted)return this._pending.push({key:l,scene:u,autoStart:f,data:v}),this.isBooted||(this._data[l]={data:v}),null;l=this.getKey(l,u);var m;return u instanceof o?m=this.createSceneFromInstance(l,u):typeof u=="object"?(u.key=l,m=this.createSceneFromObject(l,u)):typeof u=="function"&&(m=this.createSceneFromFunction(l,u)),m.sys.settings.data=v,l=m.sys.settings.key,this.keys[l]=m,this.scenes.push(m),(f||m.sys.settings.active)&&(this._pending.length?this._start.push(l):this.start(l)),m},remove:function(l){if(this.isProcessing)return this.queueOp("remove",l);var u=this.getScene(l);if(!u||u.sys.isTransitioning())return this;var f=this.scenes.indexOf(u),v=u.sys.settings.key;return f>-1&&(delete this.keys[v],this.scenes.splice(f,1),this._start.indexOf(v)>-1&&(f=this._start.indexOf(v),this._start.splice(f,1)),u.sys.destroy()),this},bootScene:function(l){var u=l.sys,f=u.settings;u.sceneUpdate=s,l.init&&(l.init.call(l,f.data),f.status=c.INIT,f.isTransition&&u.events.emit(h.TRANSITION_INIT,f.transitionFrom,f.transitionDuration));var v;u.load&&(v=u.load,v.reset()),v&&l.preload?(l.preload.call(l),f.status=c.LOADING,v.once(e.COMPLETE,this.loadComplete,this),v.start()):this.create(l)},loadComplete:function(l){this.create(l.scene)},payloadComplete:function(l){this.bootScene(l.scene)},update:function(l,u){this.processQueue(),this.isProcessing=!0;for(var f=this.scenes.length-1;f>=0;f--){var v=this.scenes[f].sys;v.settings.status>c.START&&v.settings.status<=c.RUNNING&&v.step(l,u),v.scenePlugin&&v.scenePlugin._target&&v.scenePlugin.step(l,u)}},render:function(l){for(var u=0;u<this.scenes.length;u++){var f=this.scenes[u].sys;f.settings.visible&&f.settings.status>=c.LOADING&&f.settings.status<c.SLEEPING&&f.render(l)}this.isProcessing=!1},create:function(l){var u=l.sys,f=u.settings;l.create&&(f.status=c.CREATING,l.create.call(l,f.data),f.status===c.DESTROYED)||(f.isTransition&&u.events.emit(h.TRANSITION_START,f.transitionFrom,f.transitionDuration),l.update&&(u.sceneUpdate=l.update),f.status=c.RUNNING,u.events.emit(h.CREATE,l))},createSceneFromFunction:function(l,u){var f=new u;if(f instanceof o){var v=f.sys.settings.key;if(v!==""&&(l=v),this.keys.hasOwnProperty(l))throw new Error("Cannot add Scene with duplicate key: "+l);return this.createSceneFromInstance(l,f)}else return f.sys=new i(f),f.sys.settings.key=l,f.sys.init(this.game),f},createSceneFromInstance:function(l,u){var f=u.sys.settings.key;return f===""&&(u.sys.settings.key=l),u.sys.init(this.game),u},createSceneFromObject:function(l,u){var f=new o(u),v=f.sys.settings.key;v!==""?l=v:f.sys.settings.key=l,f.sys.init(this.game);for(var m=["init","preload","create","update","render"],g=0;g<m.length;g++){var x=n(u,m[g],null);x&&(f[m[g]]=x)}if(u.hasOwnProperty("extend")){for(var y in u.extend)if(u.extend.hasOwnProperty(y)){var T=u.extend[y];y==="data"&&f.hasOwnProperty("data")&&typeof T=="object"?f.data.merge(T):y!=="sys"&&(f[y]=T)}}return f},getKey:function(l,u){if(l||(l="default"),typeof u=="function")return l;if(u instanceof o?l=u.sys.settings.key:typeof u=="object"&&u.hasOwnProperty("key")&&(l=u.key),this.keys.hasOwnProperty(l))throw new Error("Cannot add Scene with duplicate key: "+l);return l},getScenes:function(l,u){l===void 0&&(l=!0),u===void 0&&(u=!1);for(var f=[],v=this.scenes,m=0;m<v.length;m++){var g=v[m];g&&(!l||l&&g.sys.isActive())&&f.push(g)}return u?f.reverse():f},getScene:function(l){if(typeof l=="string"){if(this.keys[l])return this.keys[l]}else for(var u=0;u<this.scenes.length;u++)if(l===this.scenes[u])return l;return null},isActive:function(l){var u=this.getScene(l);return u?u.sys.isActive():null},isPaused:function(l){var u=this.getScene(l);return u?u.sys.isPaused():null},isVisible:function(l){var u=this.getScene(l);return u?u.sys.isVisible():null},isSleeping:function(l){var u=this.getScene(l);return u?u.sys.isSleeping():null},pause:function(l,u){var f=this.getScene(l);return f&&f.sys.pause(u),this},resume:function(l,u){var f=this.getScene(l);return f&&f.sys.resume(u),this},sleep:function(l,u){var f=this.getScene(l);return f&&!f.sys.isTransitioning()&&f.sys.sleep(u),this},wake:function(l,u){var f=this.getScene(l);return f&&f.sys.wake(u),this},run:function(l,u){var f=this.getScene(l);if(!f){for(var v=0;v<this._pending.length;v++)if(this._pending[v].key===l){this.queueOp("start",l,u);break}return this}f.sys.isSleeping()?f.sys.wake(u):f.sys.isPaused()?f.sys.resume(u):this.start(l,u)},start:function(l,u){if(!this.isBooted)return this._data[l]={autoStart:!0,data:u},this;var f=this.getScene(l);if(!f)return console.warn("Scene key not found: "+l),this;var v=f.sys,m=v.settings.status;if(m>=c.START&&m<=c.CREATING)return this;if(m>=c.RUNNING&&m<=c.SLEEPING)v.shutdown(),v.sceneUpdate=s,v.start(u);else{v.sceneUpdate=s,v.start(u);var g;if(v.load&&(g=v.load),g&&v.settings.hasOwnProperty("pack")&&(g.reset(),g.addPack({payload:v.settings.pack})))return v.settings.status=c.LOADING,g.once(e.COMPLETE,this.payloadComplete,this),g.start(),this}return this.bootScene(f),this},stop:function(l,u){var f=this.getScene(l);if(f&&!f.sys.isTransitioning()&&f.sys.settings.status!==c.SHUTDOWN){var v=f.sys.load;v&&(v.off(e.COMPLETE,this.loadComplete,this),v.off(e.COMPLETE,this.payloadComplete,this)),f.sys.shutdown(u)}return this},switch:function(l,u,f){var v=this.getScene(l),m=this.getScene(u);return v&&m&&v!==m&&(this.sleep(l),this.isSleeping(u)?this.wake(u,f):this.start(u,f)),this},getAt:function(l){return this.scenes[l]},getIndex:function(l){var u=this.getScene(l);return this.scenes.indexOf(u)},bringToTop:function(l){if(this.isProcessing)return this.queueOp("bringToTop",l);var u=this.getIndex(l),f=this.scenes;if(u!==-1&&u<f.length){var v=this.getScene(l);f.splice(u,1),f.push(v)}return this},sendToBack:function(l){if(this.isProcessing)return this.queueOp("sendToBack",l);var u=this.getIndex(l);if(u!==-1&&u>0){var f=this.getScene(l);this.scenes.splice(u,1),this.scenes.unshift(f)}return this},moveDown:function(l){if(this.isProcessing)return this.queueOp("moveDown",l);var u=this.getIndex(l);if(u>0){var f=u-1,v=this.getScene(l),m=this.getAt(f);this.scenes[u]=m,this.scenes[f]=v}return this},moveUp:function(l){if(this.isProcessing)return this.queueOp("moveUp",l);var u=this.getIndex(l);if(u<this.scenes.length-1){var f=u+1,v=this.getScene(l),m=this.getAt(f);this.scenes[u]=m,this.scenes[f]=v}return this},moveAbove:function(l,u){if(l===u)return this;if(this.isProcessing)return this.queueOp("moveAbove",l,u);var f=this.getIndex(l),v=this.getIndex(u);if(f!==-1&&v!==-1&&v<f){var m=this.getAt(v);this.scenes.splice(v,1),this.scenes.splice(f+(v>f),0,m)}return this},moveBelow:function(l,u){if(l===u)return this;if(this.isProcessing)return this.queueOp("moveBelow",l,u);var f=this.getIndex(l),v=this.getIndex(u);if(f!==-1&&v!==-1&&v>f){var m=this.getAt(v);this.scenes.splice(v,1),f===0?this.scenes.unshift(m):this.scenes.splice(f-(v<f),0,m)}return this},queueOp:function(l,u,f,v){return this._queue.push({op:l,keyA:u,keyB:f,data:v}),this},swapPosition:function(l,u){if(l===u)return this;if(this.isProcessing)return this.queueOp("swapPosition",l,u);var f=this.getIndex(l),v=this.getIndex(u);if(f!==v&&f!==-1&&v!==-1){var m=this.getAt(f);this.scenes[f]=this.scenes[v],this.scenes[v]=m}return this},dump:function(){for(var l=[],u=["pending","init","start","loading","creating","running","paused","sleeping","shutdown","destroyed"],f=0;f<this.scenes.length;f++){var v=this.scenes[f].sys,m=v.settings.visible&&(v.settings.status===c.RUNNING||v.settings.status===c.PAUSED)?"[*] ":"[-] ";m+=v.settings.key+" ("+u[v.settings.status]+")",l.push(m)}console.log(l.join(`
`))},destroy:function(){for(var l=0;l<this.scenes.length;l++){var u=this.scenes[l].sys;u.destroy()}this.systemScene.sys.destroy(),this.update=s,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null,this.systemScene=null}});p.exports=a},52209:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45319),c=t(83419),h=t(44594),r=t(95540),n=t(37277),e=new c({initialize:function(o){this.scene=o,this.systems=o.sys,this.settings=o.sys.settings,this.key=o.sys.settings.key,this.manager=o.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,o.sys.events.once(h.BOOT,this.boot,this),o.sys.events.on(h.START,this.pluginStart,this)},boot:function(){this.systems.events.once(h.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(h.SHUTDOWN,this.shutdown,this)},start:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",s,o),this},restart:function(s){var o=this.key;return this.manager.queueOp("stop",o),this.manager.queueOp("start",o,s),this},transition:function(s){s===void 0&&(s={});var o=r(s,"target",!1),i=this.manager.getScene(o);if(!o||!this.checkValidTransition(i))return!1;var a=r(s,"duration",1e3);this._elapsed=0,this._target=i,this._duration=a,this._willSleep=r(s,"sleep",!1),this._willRemove=r(s,"remove",!1);var l=r(s,"onUpdate",null);l&&(this._onUpdate=l,this._onUpdateScope=r(s,"onUpdateScope",this.scene));var u=r(s,"allowInput",!1);this.settings.transitionAllowInput=u;var f=i.sys.settings;f.isTransition=!0,f.transitionFrom=this.scene,f.transitionDuration=a,f.transitionAllowInput=u,r(s,"moveAbove",!1)?this.manager.moveAbove(this.key,o):r(s,"moveBelow",!1)&&this.manager.moveBelow(this.key,o),i.sys.isSleeping()?i.sys.wake(r(s,"data")):this.manager.start(o,r(s,"data"));var v=r(s,"onStart",null),m=r(s,"onStartScope",this.scene);return v&&v.call(m,this.scene,i,a),this.systems.events.emit(h.TRANSITION_OUT,i,a),!0},checkValidTransition:function(s){return!(!s||s.sys.isActive()||s.sys.isTransitioning()||s===this.scene||this.systems.isTransitioning())},step:function(s,o){this._elapsed+=o,this.transitionProgress=d(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var s=this._target.sys,o=this._target.sys.settings;s.events.emit(h.TRANSITION_COMPLETE,this.scene),o.isTransition=!1,o.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(s,o,i,a){return this.manager.add(s,o,i,a)},launch:function(s,o){return s&&s!==this.key&&this.manager.queueOp("start",s,o),this},run:function(s,o){return s&&s!==this.key&&this.manager.queueOp("run",s,o),this},pause:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("pause",s,o),this},resume:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("resume",s,o),this},sleep:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("sleep",s,o),this},wake:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("wake",s,o),this},switch:function(s,o){return s!==this.key&&this.manager.queueOp("switch",this.key,s,o),this},stop:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("stop",s,o),this},setActive:function(s,o,i){o===void 0&&(o=this.key);var a=this.manager.getScene(o);return a&&a.sys.setActive(s,i),this},setVisible:function(s,o){o===void 0&&(o=this.key);var i=this.manager.getScene(o);return i&&i.sys.setVisible(s),this},isSleeping:function(s){return s===void 0&&(s=this.key),this.manager.isSleeping(s)},isActive:function(s){return s===void 0&&(s=this.key),this.manager.isActive(s)},isPaused:function(s){return s===void 0&&(s=this.key),this.manager.isPaused(s)},isVisible:function(s){return s===void 0&&(s=this.key),this.manager.isVisible(s)},swapPosition:function(s,o){return o===void 0&&(o=this.key),s!==o&&this.manager.swapPosition(s,o),this},moveAbove:function(s,o){return o===void 0&&(o=this.key),s!==o&&this.manager.moveAbove(s,o),this},moveBelow:function(s,o){return o===void 0&&(o=this.key),s!==o&&this.manager.moveBelow(s,o),this},remove:function(s){return s===void 0&&(s=this.key),this.manager.remove(s),this},moveUp:function(s){return s===void 0&&(s=this.key),this.manager.moveUp(s),this},moveDown:function(s){return s===void 0&&(s=this.key),this.manager.moveDown(s),this},bringToTop:function(s){return s===void 0&&(s=this.key),this.manager.bringToTop(s),this},sendToBack:function(s){return s===void 0&&(s=this.key),this.manager.sendToBack(s),this},get:function(s){return this.manager.getScene(s)},getStatus:function(s){var o=this.manager.getScene(s);if(o)return o.sys.getStatus()},getIndex:function(s){return s===void 0&&(s=this.key),this.manager.getIndex(s)},shutdown:function(){var s=this.systems.events;s.off(h.SHUTDOWN,this.shutdown,this),s.off(h.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});n.register("ScenePlugin",e,"scenePlugin"),p.exports=e},55681:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(89993),c=t(35154),h=t(46975),r=t(87033),n={create:function(e){return typeof e=="string"?e={key:e}:e===void 0&&(e={}),{status:d.PENDING,key:c(e,"key",""),active:c(e,"active",!1),visible:c(e,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:c(e,"pack",!1),cameras:c(e,"cameras",null),map:c(e,"map",h(r,c(e,"mapAdd",{}))),physics:c(e,"physics",{}),loader:c(e,"loader",{}),plugins:c(e,"plugins",!1),input:c(e,"input",{})}}};p.exports=n},2368:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(89993),h=t(42363),r=t(44594),n=t(27397),e=t(52106),s=t(29747),o=t(55681),i=new d({initialize:function(l,u){this.scene=l,this.game,this.renderer,this.config=u,this.settings=o.create(u),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=s},init:function(a){this.settings.status=c.INIT,this.sceneUpdate=s,this.game=a,this.renderer=a.renderer,this.canvas=a.canvas,this.context=a.context;var l=a.plugins;this.plugins=l,l.addToScene(this,h.Global,[h.CoreScene,e(this),n(this)]),this.events.emit(r.BOOT,this),this.settings.isBooted=!0},step:function(a,l){var u=this.events;u.emit(r.PRE_UPDATE,a,l),u.emit(r.UPDATE,a,l),this.sceneUpdate.call(this.scene,a,l),u.emit(r.POST_UPDATE,a,l)},render:function(a){var l=this.displayList;l.depthSort(),this.events.emit(r.PRE_RENDER,a),this.cameras.render(a,l),this.events.emit(r.RENDER,a)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(a){var l=this.settings,u=this.getStatus();return u!==c.CREATING&&u!==c.RUNNING?console.warn("Cannot pause non-running Scene",l.key):this.settings.active&&(l.status=c.PAUSED,l.active=!1,this.events.emit(r.PAUSE,this,a)),this},resume:function(a){var l=this.events,u=this.settings;return this.settings.active||(u.status=c.RUNNING,u.active=!0,l.emit(r.RESUME,this,a)),this},sleep:function(a){var l=this.settings,u=this.getStatus();return u!==c.CREATING&&u!==c.RUNNING?console.warn("Cannot sleep non-running Scene",l.key):(l.status=c.SLEEPING,l.active=!1,l.visible=!1,this.events.emit(r.SLEEP,this,a)),this},wake:function(a){var l=this.events,u=this.settings;return u.status=c.RUNNING,u.active=!0,u.visible=!0,l.emit(r.WAKE,this,a),u.isTransition&&l.emit(r.TRANSITION_WAKE,u.transitionFrom,u.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var a=this.settings.status;return a>c.PENDING&&a<=c.RUNNING},isSleeping:function(){return this.settings.status===c.SLEEPING},isActive:function(){return this.settings.status===c.RUNNING},isPaused:function(){return this.settings.status===c.PAUSED},isTransitioning:function(){return this.settings.isTransition||this.scenePlugin._target!==null},isTransitionOut:function(){return this.scenePlugin._target!==null&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(a){return this.settings.visible=a,this},setActive:function(a,l){return a?this.resume(l):this.pause(l)},start:function(a){var l=this.events,u=this.settings;a&&(u.data=a),u.status=c.START,u.active=!0,u.visible=!0,l.emit(r.START,this),l.emit(r.READY,this,a)},shutdown:function(a){var l=this.events,u=this.settings;l.off(r.TRANSITION_INIT),l.off(r.TRANSITION_START),l.off(r.TRANSITION_COMPLETE),l.off(r.TRANSITION_OUT),u.status=c.SHUTDOWN,u.active=!1,u.visible=!1,l.emit(r.SHUTDOWN,this,a)},destroy:function(){var a=this.events,l=this.settings;l.status=c.DESTROYED,l.active=!1,l.visible=!1,a.emit(r.DESTROY,this),a.removeAllListeners();for(var u=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],f=0;f<u.length;f++)this[u[f]]=null}});p.exports=i},89993:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};p.exports=S},69830:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="addedtoscene"},7919:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="boot"},46763:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="create"},11763:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="destroy"},71555:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pause"},36735:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="postupdate"},3809:p=>{/**
* @author samme
* @copyright 2021 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="prerender"},90716:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="preupdate"},58262:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="ready"},91633:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="removedfromscene"},10319:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="render"},87132:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="resume"},81961:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="shutdown"},90194:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="sleep"},6265:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="start"},33178:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="transitioncomplete"},43063:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="transitioninit"},11259:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="transitionout"},61611:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="transitionstart"},45209:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="transitionwake"},22966:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="update"},21747:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="wake"},44594:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={ADDED_TO_SCENE:t(69830),BOOT:t(7919),CREATE:t(46763),DESTROY:t(11763),PAUSE:t(71555),POST_UPDATE:t(36735),PRE_RENDER:t(3809),PRE_UPDATE:t(90716),READY:t(58262),REMOVED_FROM_SCENE:t(91633),RENDER:t(10319),RESUME:t(87132),SHUTDOWN:t(81961),SLEEP:t(90194),START:t(6265),TRANSITION_COMPLETE:t(33178),TRANSITION_INIT:t(43063),TRANSITION_OUT:t(11259),TRANSITION_START:t(61611),TRANSITION_WAKE:t(45209),UPDATE:t(22966),WAKE:t(21747)}},62194:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(89993),c=t(79291),h={Events:t(44594),GetPhysicsPlugins:t(27397),GetScenePlugins:t(52106),SceneManager:t(60903),ScenePlugin:t(52209),Settings:t(55681),Systems:t(2368)};h=c(!1,h,d),p.exports=h},30341:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(50792),h=t(14463),r=t(79291),n=t(29747),e=new d({Extends:c,initialize:function(o,i,a){c.call(this),this.manager=o,this.key=i,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=r(this.config,a),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(s){return!s||!s.name||typeof s.name!="string"?!1:this.markers[s.name]?(console.error("addMarker "+s.name+" already exists in Sound"),!1):(s=r(!0,{name:"",start:0,duration:this.totalDuration-(s.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},s),this.markers[s.name]=s,!0)},updateMarker:function(s){return!s||!s.name||typeof s.name!="string"?!1:this.markers[s.name]?(this.markers[s.name]=r(!0,this.markers[s.name],s),!0):(console.warn("Audio Marker: "+s.name+" missing in Sound: "+this.key),!1)},removeMarker:function(s){var o=this.markers[s];return o?(this.markers[s]=null,o):null},play:function(s,o){if(s===void 0&&(s=""),typeof s=="object"&&(o=s,s=""),typeof s!="string")return!1;if(!s)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[s])return console.warn("Marker: "+s+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[s],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=r(this.currentConfig,o),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return this.isPaused||!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!this.isPaused||this.isPlaying?!1:(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!this.isPaused&&!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:n,calculateRate:function(){var s=1.0005777895065548,o=this.currentConfig.detune+this.manager.detune,i=Math.pow(s,o);this.totalRate=this.currentConfig.rate*this.manager.rate*i},destroy:function(){this.pendingRemove||(this.stop(),this.emit(h.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});p.exports=e},85034:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(41786),h=t(50792),r=t(14463),n=t(8443),e=t(46710),s=t(58731),o=t(29747),i=t(26099),a=new d({Extends:h,initialize:function(u){h.call(this),this.game=u,this.jsonCache=u.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,this.gameLostFocus=!1,this.listenerPosition=new i,u.events.on(n.BLUR,this.onGameBlur,this),u.events.on(n.FOCUS,this.onGameFocus,this),u.events.on(n.PRE_STEP,this.update,this),u.events.once(n.DESTROY,this.destroy,this)},add:o,addAudioSprite:function(l,u){u===void 0&&(u={});var f=this.add(l,u);f.spritemap=this.jsonCache.get(l).spritemap;for(var v in f.spritemap)if(f.spritemap.hasOwnProperty(v)){var m=c(u),g=f.spritemap[v];m.loop=g.hasOwnProperty("loop")?g.loop:!1,f.addMarker({name:v,start:g.start,duration:g.end-g.start,config:m})}return f},get:function(l){return s(this.sounds,"key",l)},getAll:function(l){return l?e(this.sounds,"key",l):e(this.sounds)},getAllPlaying:function(){return e(this.sounds,"isPlaying",!0)},play:function(l,u){var f=this.add(l);return f.once(r.COMPLETE,f.destroy,f),u?u.name?(f.addMarker(u),f.play(u.name)):f.play(u):f.play()},playAudioSprite:function(l,u,f){var v=this.addAudioSprite(l);return v.once(r.COMPLETE,v.destroy,v),v.play(u,f)},remove:function(l){var u=this.sounds.indexOf(l);return u!==-1?(l.destroy(),this.sounds.splice(u,1),!0):!1},removeAll:function(){this.sounds.forEach(function(l){l.destroy()}),this.sounds.length=0},removeByKey:function(l){for(var u=0,f=this.sounds.length-1;f>=0;f--){var v=this.sounds[f];v.key===l&&(v.destroy(),this.sounds.splice(f,1),u++)}return u},pauseAll:function(){this.forEachActiveSound(function(l){l.pause()}),this.emit(r.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(l){l.resume()}),this.emit(r.RESUME_ALL,this)},setListenerPosition:o,stopAll:function(){this.forEachActiveSound(function(l){l.stop()}),this.emit(r.STOP_ALL,this)},stopByKey:function(l){var u=0;return this.getAll(l).forEach(function(f){f.stop()&&u++}),u},isPlaying:function(l){var u=this.sounds,f=u.length-1,v;if(l===void 0){for(;f>=0;f--)if(v=this.sounds[f],v.isPlaying)return!0}else for(;f>=0;f--)if(v=this.sounds[f],v.key===l&&v.isPlaying)return!0;return!1},unlock:o,onBlur:o,onFocus:o,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(l,u){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(r.UNLOCKED,this));for(var f=this.sounds.length-1;f>=0;f--)this.sounds[f].pendingRemove&&this.sounds.splice(f,1);this.sounds.forEach(function(v){v.update(l,u)})},destroy:function(){this.game.events.off(n.BLUR,this.onGameBlur,this),this.game.events.off(n.FOCUS,this.onGameFocus,this),this.game.events.off(n.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(l,u){var f=this;this.sounds.forEach(function(v,m){v&&!v.pendingRemove&&l.call(u||f,v,m,f.sounds)})},setRate:function(l){return this.rate=l,this},rate:{get:function(){return this._rate},set:function(l){this._rate=l,this.forEachActiveSound(function(u){u.calculateRate()}),this.emit(r.GLOBAL_RATE,this,l)}},setDetune:function(l){return this.detune=l,this},detune:{get:function(){return this._detune},set:function(l){this._detune=l,this.forEachActiveSound(function(u){u.calculateRate()}),this.emit(r.GLOBAL_DETUNE,this,l)}}});p.exports=a},14747:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(33684),c=t(25960),h=t(57490),r={create:function(n){var e=n.config.audio,s=n.device.audio;return e.noAudio||!s.webAudio&&!s.audioData?new c(n):s.webAudio&&!e.disableWebAudio?new h(n):new d(n)}};p.exports=r},19723:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="complete"},98882:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="decodedall"},57506:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="decoded"},73146:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="destroy"},11305:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="detune"},40577:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="detune"},30333:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="mute"},20394:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="rate"},21802:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="volume"},1299:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="looped"},99190:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="loop"},97125:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="mute"},89259:p=>{/**
* @author pi-kei
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pan"},79986:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pauseall"},17586:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pause"},19618:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="play"},42306:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="rate"},10387:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="resumeall"},48959:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="resume"},9960:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="seek"},19180:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="stopall"},98328:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="stop"},50401:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="unlocked"},52498:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="volume"},14463:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={COMPLETE:t(19723),DECODED:t(57506),DECODED_ALL:t(98882),DESTROY:t(73146),DETUNE:t(11305),GLOBAL_DETUNE:t(40577),GLOBAL_MUTE:t(30333),GLOBAL_RATE:t(20394),GLOBAL_VOLUME:t(21802),LOOP:t(99190),LOOPED:t(1299),MUTE:t(97125),PAN:t(89259),PAUSE_ALL:t(79986),PAUSE:t(17586),PLAY:t(19618),RATE:t(42306),RESUME_ALL:t(10387),RESUME:t(48959),SEEK:t(9960),STOP_ALL:t(19180),STOP:t(98328),UNLOCKED:t(50401),VOLUME:t(52498)}},64895:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(30341),c=t(83419),h=t(14463),r=t(45319),n=new c({Extends:d,initialize:function(s,o,i){if(i===void 0&&(i={}),this.tags=s.game.cache.audio.get(o),!this.tags)throw new Error('No cached audio asset with key "'+o);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,d.call(this,s,o,i)},play:function(e,s){return this.manager.isLocked(this,"play",[e,s])||!d.prototype.play.call(this,e,s)||!this.pickAndPlayAudioTag()?!1:(this.emit(h.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!d.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(h.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!d.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(h.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!d.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(h.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var e=this.currentConfig.seek,s=this.currentConfig.delay,o=(this.currentMarker?this.currentMarker.start:0)+e;return this.previousTime=o,this.audio.currentTime=o,this.applyConfig(),s===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+s*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var e=0;e<this.tags.length;e++){var s=this.tags[e];if(s.dataset.used==="false")return s.dataset.used="true",this.audio=s,!0}if(!this.manager.override)return!1;var o=[];this.manager.forEachActiveSound(function(a){a.key===this.key&&a.audio&&o.push(a)},this),o.sort(function(a,l){return a.loop===l.loop?l.seek/l.duration-a.seek/a.duration:a.loop?1:-1});var i=o[0];return this.audio=i.audio,i.reset(),i.audio=null,i.startTime=0,i.previousTime=0,!0},playCatchPromise:function(){var e=this.audio.play();e&&e.catch(function(s){console.warn(s)})},stopAndReleaseAudioTag:function(){this.startTime=0,this.previousTime=0,this.audio&&(this.audio.pause(),this.audio.dataset.used="false",this.audio=null)},reset:function(){d.prototype.stop.call(this)},onBlur:function(){this.isPlaying=!1,this.isPaused=!0,this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.currentConfig.delay=Math.max(0,(this.startTime-window.performance.now())/1e3),this.stopAndReleaseAudioTag()},onFocus:function(){this.isPlaying=!0,this.isPaused=!1,this.pickAndPlayAudioTag()},update:function(e){if(this.isPlaying){if(this.startTime>0){this.startTime<e-this.manager.audioPlayDelay&&(this.audio.currentTime+=Math.max(0,e-this.startTime)/1e3,this.startTime=0,this.previousTime=this.audio.currentTime,this.playCatchPromise());return}var s=this.currentMarker?this.currentMarker.start:0,o=s+this.duration,i=this.audio.currentTime;if(this.currentConfig.loop)i>=o-this.manager.loopEndOffset?(this.audio.currentTime=s+Math.max(0,i-o),i=this.audio.currentTime):i<s&&(this.audio.currentTime+=s,i=this.audio.currentTime),i<this.previousTime&&this.emit(h.LOOPED,this);else if(i>=o){this.reset(),this.stopAndReleaseAudioTag(),this.emit(h.COMPLETE,this);return}this.previousTime=i}},destroy:function(){d.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=r(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){d.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(e){this.currentConfig.mute=e,!this.manager.isLocked(this,"mute",e)&&(this.updateMute(),this.emit(h.MUTE,this,e))}},setMute:function(e){return this.mute=e,this},volume:{get:function(){return this.currentConfig.volume},set:function(e){this.currentConfig.volume=e,!this.manager.isLocked(this,"volume",e)&&(this.updateVolume(),this.emit(h.VOLUME,this,e))}},setVolume:function(e){return this.volume=e,this},rate:{get:function(){return this.currentConfig.rate},set:function(e){this.currentConfig.rate=e,!this.manager.isLocked(this,h.RATE,e)&&(this.calculateRate(),this.emit(h.RATE,this,e))}},setRate:function(e){return this.rate=e,this},detune:{get:function(){return this.currentConfig.detune},set:function(e){this.currentConfig.detune=e,!this.manager.isLocked(this,h.DETUNE,e)&&(this.calculateRate(),this.emit(h.DETUNE,this,e))}},setDetune:function(e){return this.detune=e,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(e){this.manager.isLocked(this,"seek",e)||this.startTime>0||(this.isPlaying||this.isPaused)&&(e=Math.min(Math.max(0,e),this.duration),this.isPlaying?(this.previousTime=e,this.audio.currentTime=e):this.isPaused&&(this.currentConfig.seek=e),this.emit(h.SEEK,this,e))}},setSeek:function(e){return this.seek=e,this},loop:{get:function(){return this.currentConfig.loop},set:function(e){this.currentConfig.loop=e,!this.manager.isLocked(this,"loop",e)&&(this.audio&&(this.audio.loop=e),this.emit(h.LOOP,this,e))}},setLoop:function(e){return this.loop=e,this},pan:{get:function(){return this.currentConfig.pan},set:function(e){this.currentConfig.pan=e,this.emit(h.PAN,this,e)}},setPan:function(e){return this.pan=e,this}});p.exports=n},33684:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(85034),c=t(83419),h=t(14463),r=t(64895),n=new c({Extends:d,initialize:function(s){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,d.call(this,s)},add:function(e,s){var o=new r(this,e,s);return this.sounds.push(o),o},unlock:function(){this.locked=!1;var e=this;if(this.game.cache.audio.entries.each(function(a,l){for(var u=0;u<l.length;u++)if(l[u].dataset.locked==="true")return e.locked=!0,!1;return!0}),!!this.locked){var s=!1,o=function(){s=!0},i=function(){if(s){s=!1;return}document.body.removeEventListener("touchmove",o),document.body.removeEventListener("touchend",i);var a=[];if(e.game.cache.audio.entries.each(function(u,f){for(var v=0;v<f.length;v++){var m=f[v];m.dataset.locked==="true"&&a.push(m)}return!0}),a.length!==0){var l=a[a.length-1];l.oncanplaythrough=function(){l.oncanplaythrough=null,a.forEach(function(u){u.dataset.locked="false"}),e.unlocked=!0},a.forEach(function(u){u.load()})}};this.once(h.UNLOCKED,function(){for(this.forEachActiveSound(function(l){l.currentMarker===null&&l.duration===0&&(l.duration=l.tags[0].duration),l.totalDuration=l.tags[0].duration});this.lockedActionsQueue.length;){var a=this.lockedActionsQueue.shift();a.sound[a.prop].apply?a.sound[a.prop].apply(a.sound,a.value||[]):a.sound[a.prop]=a.value}},this),document.body.addEventListener("touchmove",o,!1),document.body.addEventListener("touchend",i,!1)}},onBlur:function(){this.forEachActiveSound(function(e){e.isPlaying&&(this.onBlurPausedSounds.push(e),e.onBlur())})},onFocus:function(){this.onBlurPausedSounds.forEach(function(e){e.onFocus()}),this.onBlurPausedSounds.length=0},destroy:function(){d.prototype.destroy.call(this),this.onBlurPausedSounds.length=0,this.onBlurPausedSounds=null},isLocked:function(e,s,o){return e.tags[0].dataset.locked==="true"?(this.lockedActionsQueue.push({sound:e,prop:s,value:o}),!0):!1},setMute:function(e){return this.mute=e,this},mute:{get:function(){return this._mute},set:function(e){this._mute=e,this.forEachActiveSound(function(s){s.updateMute()}),this.emit(h.GLOBAL_MUTE,this,e)}},setVolume:function(e){return this.volume=e,this},volume:{get:function(){return this._volume},set:function(e){this._volume=e,this.forEachActiveSound(function(s){s.updateVolume()}),this.emit(h.GLOBAL_VOLUME,this,e)}}});p.exports=n},23717:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={SoundManagerCreator:t(14747),Events:t(14463),BaseSound:t(30341),BaseSoundManager:t(85034),WebAudioSound:t(71741),WebAudioSoundManager:t(57490),HTML5AudioSound:t(64895),HTML5AudioSoundManager:t(33684),NoAudioSound:t(4603),NoAudioSoundManager:t(25960)}},4603:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(30341),c=t(83419),h=t(50792),r=t(79291),n=t(29747),e=function(){return!1},s=function(){return null},o=function(){return this},i=new c({Extends:h,initialize:function(l,u,f){f===void 0&&(f={}),h.call(this),this.manager=l,this.key=u,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=r({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},f),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:e,updateMarker:e,removeMarker:s,play:e,pause:e,resume:e,stop:e,setMute:o,setVolume:o,setRate:o,setDetune:o,setSeek:o,setLoop:o,setPan:o,applyConfig:s,resetConfig:s,update:n,calculateRate:s,destroy:function(){d.prototype.destroy.call(this)}});p.exports=i},25960:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(85034),c=t(83419),h=t(50792),r=t(4603),n=t(29747),e=new c({Extends:h,initialize:function(o){h.call(this),this.game=o,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(s,o){var i=new r(this,s,o);return this.sounds.push(i),i},addAudioSprite:function(s,o){var i=this.add(s,o);return i.spritemap={},i},get:function(s){return d.prototype.get.call(this,s)},getAll:function(s){return d.prototype.getAll.call(this,s)},play:function(s,o){return!1},playAudioSprite:function(s,o,i){return!1},remove:function(s){return d.prototype.remove.call(this,s)},removeAll:function(){return d.prototype.removeAll.call(this)},removeByKey:function(s){return d.prototype.removeByKey.call(this,s)},stopByKey:function(s){return d.prototype.stopByKey.call(this,s)},onBlur:n,onFocus:n,onGameBlur:n,onGameFocus:n,pauseAll:n,resumeAll:n,stopAll:n,update:n,setRate:n,setDetune:n,setMute:n,setVolume:n,unlock:n,forEachActiveSound:function(s,o){d.prototype.forEachActiveSound.call(this,s,o)},destroy:function(){d.prototype.destroy.call(this)}});p.exports=e},71741:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(30341),c=t(83419),h=t(14463),r=t(95540),n=new c({Extends:d,initialize:function(s,o,i){if(i===void 0&&(i={}),this.audioBuffer=s.game.cache.audio.get(o),!this.audioBuffer)throw new Error('Audio key "'+o+'" not found in cache');this.source=null,this.loopSource=null,this.muteNode=s.context.createGain(),this.volumeNode=s.context.createGain(),this.pannerNode=null,this.spatialNode=null,this.spatialSource=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),s.context.createPanner&&(this.spatialNode=s.context.createPanner(),this.volumeNode.connect(this.spatialNode)),s.context.createStereoPanner?(this.pannerNode=s.context.createStereoPanner(),s.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(s.destination)):s.context.createPanner?this.spatialNode.connect(s.destination):this.volumeNode.connect(s.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,d.call(this,s,o,i)},play:function(e,s){return d.prototype.play.call(this,e,s)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(h.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime<this.startTime||!d.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.getCurrentTime(),this.stopAndRemoveBufferSource(),this.emit(h.PAUSE,this),!0)},resume:function(){return this.manager.context.currentTime<this.startTime||!d.prototype.resume.call(this)?!1:(this.createAndStartBufferSource(),this.emit(h.RESUME,this),!0)},stop:function(){return d.prototype.stop.call(this)?(this.stopAndRemoveBufferSource(),this.emit(h.STOP,this),!0):!1},createAndStartBufferSource:function(){var e=this.currentConfig.seek,s=this.currentConfig.delay,o=this.manager.context.currentTime+s,i=(this.currentMarker?this.currentMarker.start:0)+e,a=this.duration-e;this.playTime=o-e,this.startTime=o,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,o),Math.max(0,i),Math.max(0,a)),this.resetConfig()},createAndStartLoopBufferSource:function(){var e=this.getLoopTime(),s=this.currentMarker?this.currentMarker.start:0,o=this.duration;this.loopTime=e,this.loopSource=this.createBufferSource(),this.loopSource.playbackRate.setValueAtTime(this.totalRate,0),this.loopSource.start(Math.max(0,e),Math.max(0,s),Math.max(0,o))},createBufferSource:function(){var e=this,s=this.manager.context.createBufferSource();return s.buffer=this.audioBuffer,s.connect(this.muteNode),s.onended=function(o){var i=o.target;(i===e.source||i===e.loopSource)&&(e.currentConfig.loop?e.hasLooped=!0:e.hasEnded=!0)},s},stopAndRemoveBufferSource:function(){if(this.source){var e=this.source;this.source=null,e.stop(),e.disconnect()}this.playTime=0,this.startTime=0,this.hasEnded=!1,this.stopAndRemoveLoopBufferSource()},stopAndRemoveLoopBufferSource:function(){this.loopSource&&(this.loopSource.stop(),this.loopSource.disconnect(),this.loopSource=null),this.loopTime=0},applyConfig:function(){this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:1});var e=this.currentConfig.source;if(e&&this.manager.context.createPanner){var s=this.spatialNode;s.panningModel=r(e,"panningModel","equalpower"),s.distanceModel=r(e,"distanceModel","inverse"),s.orientationX.value=r(e,"orientationX",0),s.orientationY.value=r(e,"orientationY",0),s.orientationZ.value=r(e,"orientationZ",-1),s.refDistance=r(e,"refDistance",1),s.maxDistance=r(e,"maxDistance",1e4),s.rolloffFactor=r(e,"rolloffFactor",1),s.coneInnerAngle=r(e,"coneInnerAngle",360),s.coneOuterAngle=r(e,"coneOuterAngle",0),s.coneOuterGain=r(e,"coneOuterGain",0),this.spatialSource=r(e,"follow",null),this.spatialSource||(s.positionX.value=r(e,"x",0),s.positionY.value=r(e,"y",0),s.positionZ.value=r(e,"z",0))}d.prototype.applyConfig.call(this)},x:{get:function(){return this.spatialNode?this.spatialNode.positionX:0},set:function(e){this.spatialNode&&(this.spatialNode.positionX.value=e)}},y:{get:function(){return this.spatialNode?this.spatialNode.positionY:0},set:function(e){this.spatialNode&&(this.spatialNode.positionY.value=e)}},update:function(){if(this.isPlaying&&this.spatialSource){var e=r(this.spatialSource,"x",null),s=r(this.spatialSource,"y",null);e&&e!==this._spatialx&&(this._spatialx=this.spatialNode.positionX.value=e),s&&s!==this._spatialy&&(this._spatialy=this.spatialNode.positionY.value=s)}this.hasEnded?(d.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit(h.COMPLETE,this)):this.hasLooped&&(this.hasLooped=!1,this.source=this.loopSource,this.loopSource=null,this.playTime=this.startTime=this.loopTime,this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:this.totalRate}),this.createAndStartLoopBufferSource(),this.emit(h.LOOPED,this))},destroy:function(){this.pendingRemove||(d.prototype.destroy.call(this),this.audioBuffer=null,this.stopAndRemoveBufferSource(),this.muteNode.disconnect(),this.muteNode=null,this.volumeNode.disconnect(),this.volumeNode=null,this.pannerNode&&(this.pannerNode.disconnect(),this.pannerNode=null),this.spatialNode&&(this.spatialNode.disconnect(),this.spatialNode=null,this.spatialSource=null),this.rateUpdates.length=0,this.rateUpdates=null)},calculateRate:function(){d.prototype.calculateRate.call(this);var e=this.manager.context.currentTime;this.source&&typeof this.totalRate=="number"&&this.source.playbackRate.setValueAtTime(this.totalRate,e),this.isPlaying&&(this.rateUpdates.push({time:Math.max(this.startTime,e)-this.playTime,rate:this.totalRate}),this.loopSource&&(this.stopAndRemoveLoopBufferSource(),this.createAndStartLoopBufferSource()))},getCurrentTime:function(){for(var e=0,s=0;s<this.rateUpdates.length;s++){var o=0;s<this.rateUpdates.length-1?o=this.rateUpdates[s+1].time:o=this.manager.context.currentTime-this.playTime,e+=(o-this.rateUpdates[s].time)*this.rateUpdates[s].rate}return e},getLoopTime:function(){for(var e=0,s=0;s<this.rateUpdates.length-1;s++)e+=(this.rateUpdates[s+1].time-this.rateUpdates[s].time)*this.rateUpdates[s].rate;var o=this.rateUpdates[this.rateUpdates.length-1];return this.playTime+o.time+(this.duration-e)/o.rate},rate:{get:function(){return this.currentConfig.rate},set:function(e){this.currentConfig.rate=e,this.calculateRate(),this.emit(h.RATE,this,e)}},setRate:function(e){return this.rate=e,this},detune:{get:function(){return this.currentConfig.detune},set:function(e){this.currentConfig.detune=e,this.calculateRate(),this.emit(h.DETUNE,this,e)}},setDetune:function(e){return this.detune=e,this},mute:{get:function(){return this.muteNode.gain.value===0},set:function(e){this.currentConfig.mute=e,this.muteNode.gain.setValueAtTime(e?0:1,0),this.emit(h.MUTE,this,e)}},setMute:function(e){return this.mute=e,this},volume:{get:function(){return this.volumeNode.gain.value},set:function(e){this.currentConfig.volume=e,this.volumeNode.gain.setValueAtTime(e,0),this.emit(h.VOLUME,this,e)}},setVolume:function(e){return this.volume=e,this},seek:{get:function(){return this.isPlaying?this.manager.context.currentTime<this.startTime?this.startTime-this.playTime:this.getCurrentTime():this.isPaused?this.currentConfig.seek:0},set:function(e){this.manager.context.currentTime<this.startTime||(this.isPlaying||this.isPaused)&&(e=Math.min(Math.max(0,e),this.duration),this.currentConfig.seek=e,this.isPlaying&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource()),this.emit(h.SEEK,this,e))}},setSeek:function(e){return this.seek=e,this},loop:{get:function(){return this.currentConfig.loop},set:function(e){this.currentConfig.loop=e,this.isPlaying&&(this.stopAndRemoveLoopBufferSource(),e&&this.createAndStartLoopBufferSource()),this.emit(h.LOOP,this,e)}},setLoop:function(e){return this.loop=e,this},pan:{get:function(){return this.pannerNode?this.pannerNode.pan.value:0},set:function(e){this.currentConfig.pan=e,this.pannerNode&&this.pannerNode.pan.setValueAtTime(e,this.manager.context.currentTime),this.emit(h.PAN,this,e)}},setPan:function(e){return this.pan=e,this}});p.exports=n},57490:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(53134),c=t(85034),h=t(83419),r=t(14463),n=t(8443),e=t(71741),s=t(95540),o=new h({Extends:c,initialize:function(a){this.context=this.createAudioContext(a),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked=this.context.state==="suspended"&&("ontouchstart"in window||"onclick"in window),c.call(this,a),this.locked&&a.isBooted?this.unlock():a.events.once(n.BOOT,this.unlock,this)},createAudioContext:function(i){var a=i.config.audio;if(a.context)return a.context.resume(),a.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(i){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=i,this.masterMuteNode=i.createGain(),this.masterVolumeNode=i.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(i.destination),this.destination=this.masterMuteNode,this},add:function(i,a){var l=new e(this,i,a);return this.sounds.push(l),l},decodeAudio:function(i,a){var l;Array.isArray(i)?l=i:l=[{key:i,data:a}];for(var u=this.game.cache.audio,f=l.length,v=0;v<l.length;v++){var m=l[v],g=m.key,x=m.data;typeof x=="string"&&(x=d(x));var y=(function(C,E){u.add(C,E),this.emit(r.DECODED,C),f--,f===0&&this.emit(r.DECODED_ALL)}).bind(this,g),T=(function(C,E){console.error("Error decoding audio: "+C+" - ",E?E.message:""),f--,f===0&&this.emit(r.DECODED_ALL)}).bind(this,g);this.context.decodeAudioData(x,y,T)}},setListenerPosition:function(i,a){return i===void 0&&(i=this.game.scale.width/2),a===void 0&&(a=this.game.scale.height/2),this.listenerPosition.set(i,a),this},unlock:function(){var i=this,a=document.body,l=function u(){if(i.context&&a){var f=a.removeEventListener.bind(a);i.context.resume().then(function(){f("touchstart",u),f("touchend",u),f("click",u),f("keydown",u),i.unlocked=!0},function(){f("touchstart",u),f("touchend",u),f("click",u),f("keydown",u)})}};a&&(a.addEventListener("touchstart",l,!1),a.addEventListener("touchend",l,!1),a.addEventListener("click",l,!1),a.addEventListener("keydown",l,!1))},onBlur:function(){this.locked||this.context.suspend()},onFocus:function(){var i=this.context;i&&!this.locked&&(i.state==="suspended"||i.state==="interrupted")&&i.resume()},update:function(i,a){var l=this.context.listener;if(l&&l.positionX!==void 0){var u=s(this.listenerPosition,"x",null),f=s(this.listenerPosition,"y",null);u&&u!==this._spatialx&&(this._spatialx=l.positionX.value=u),f&&f!==this._spatialy&&(this._spatialy=l.positionY.value=f)}c.prototype.update.call(this,i,a),this.gameLostFocus||this.onFocus()},destroy:function(){if(this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio.context)this.context.suspend();else{var i=this;this.context.close().then(function(){i.context=null})}c.prototype.destroy.call(this)},setMute:function(i){return this.mute=i,this},mute:{get:function(){return this.masterMuteNode.gain.value===0},set:function(i){this.masterMuteNode.gain.setValueAtTime(i?0:1,0),this.emit(r.GLOBAL_MUTE,this,i)}},setVolume:function(i){return this.volume=i,this},volume:{get:function(){return this.masterVolumeNode.gain.value},set:function(i){this.masterVolumeNode.gain.setValueAtTime(i,0),this.emit(r.GLOBAL_VOLUME,this,i)}}});p.exports=o},73162:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(37105),c=t(83419),h=t(29747),r=t(19186),n=new c({initialize:function(s){this.parent=s,this.list=[],this.position=0,this.addCallback=h,this.removeCallback=h,this._sortKey=""},add:function(e,s){return s?d.Add(this.list,e):d.Add(this.list,e,0,this.addCallback,this)},addAt:function(e,s,o){return o?d.AddAt(this.list,e,s):d.AddAt(this.list,e,s,0,this.addCallback,this)},getAt:function(e){return this.list[e]},getIndex:function(e){return this.list.indexOf(e)},sort:function(e,s){return e?(s===void 0&&(s=function(o,i){return o[e]-i[e]}),r(this.list,s),this):this},getByName:function(e){return d.GetFirst(this.list,"name",e)},getRandom:function(e,s){return d.GetRandom(this.list,e,s)},getFirst:function(e,s,o,i){return d.GetFirst(this.list,e,s,o,i)},getAll:function(e,s,o,i){return d.GetAll(this.list,e,s,o,i)},count:function(e,s){return d.CountAllMatching(this.list,e,s)},swap:function(e,s){d.Swap(this.list,e,s)},moveTo:function(e,s){return d.MoveTo(this.list,e,s)},moveAbove:function(e,s){return d.MoveAbove(this.list,e,s)},moveBelow:function(e,s){return d.MoveBelow(this.list,e,s)},remove:function(e,s){return s?d.Remove(this.list,e):d.Remove(this.list,e,this.removeCallback,this)},removeAt:function(e,s){return s?d.RemoveAt(this.list,e):d.RemoveAt(this.list,e,this.removeCallback,this)},removeBetween:function(e,s,o){return o?d.RemoveBetween(this.list,e,s):d.RemoveBetween(this.list,e,s,this.removeCallback,this)},removeAll:function(e){for(var s=this.list.length;s--;)this.remove(this.list[s],e);return this},bringToTop:function(e){return d.BringToTop(this.list,e)},sendToBack:function(e){return d.SendToBack(this.list,e)},moveUp:function(e){return d.MoveUp(this.list,e),e},moveDown:function(e){return d.MoveDown(this.list,e),e},reverse:function(){return this.list.reverse(),this},shuffle:function(){return d.Shuffle(this.list),this},replace:function(e,s){return d.Replace(this.list,e,s)},exists:function(e){return this.list.indexOf(e)>-1},setAll:function(e,s,o,i){return d.SetAll(this.list,e,s,o,i),this},each:function(e,s){for(var o=[null],i=2;i<arguments.length;i++)o.push(arguments[i]);for(i=0;i<this.list.length;i++)o[0]=this.list[i],e.apply(s,o)},shutdown:function(){this.removeAll(),this.list=[]},destroy:function(){this.removeAll(),this.parent=null,this.addCallback=null,this.removeCallback=null},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}}});p.exports=n},90330:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r){this.entries={},this.size=0,this.setAll(r)},setAll:function(h){if(Array.isArray(h))for(var r=0;r<h.length;r++)this.set(h[r][0],h[r][1]);return this},set:function(h,r){return this.has(h)||this.size++,this.entries[h]=r,this},get:function(h){if(this.has(h))return this.entries[h]},getArray:function(){var h=[],r=this.entries;for(var n in r)h.push(r[n]);return h},has:function(h){return this.entries.hasOwnProperty(h)},delete:function(h){return this.has(h)&&(delete this.entries[h],this.size--),this},clear:function(){return Object.keys(this.entries).forEach(function(h){delete this.entries[h]},this),this.size=0,this},keys:function(){return Object.keys(this.entries)},values:function(){var h=[],r=this.entries;for(var n in r)h.push(r[n]);return h},dump:function(){var h=this.entries;console.group("Map");for(var r in h)console.log(r,h[r]);console.groupEnd()},each:function(h){var r=this.entries;for(var n in r)if(h(n,r[n])===!1)break;return this},contains:function(h){var r=this.entries;for(var n in r)if(r[n]===h)return!0;return!1},merge:function(h,r){r===void 0&&(r=!1);var n=this.entries,e=h.entries;for(var s in e)n.hasOwnProperty(s)&&r?n[s]=e[s]:this.set(s,e[s]);return this}});p.exports=c},25774:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(50792),h=t(82348),r=new d({Extends:c,initialize:function(){c.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(n){return this._active.indexOf(n)>-1},isPending:function(n){return this._toProcess>0&&this._pending.indexOf(n)>-1},isDestroying:function(n){return this._destroy.indexOf(n)>-1},add:function(n){return this.checkQueue&&this.isActive(n)&&!this.isDestroying(n)||this.isPending(n)||(this._pending.push(n),this._toProcess++),n},remove:function(n){if(this.isPending(n)){var e=this._pending,s=e.indexOf(n);s!==-1&&e.splice(s,1)}else this.isActive(n)&&(this._destroy.push(n),this._toProcess++);return n},removeAll:function(){for(var n=this._active,e=this._destroy,s=n.length;s--;)e.push(n[s]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var n=this._destroy,e=this._active,s,o;for(s=0;s<n.length;s++){o=n[s];var i=e.indexOf(o);i!==-1&&(e.splice(i,1),this.emit(h.PROCESS_QUEUE_REMOVE,o))}for(n.length=0,n=this._pending,s=0;s<n.length;s++)o=n[s],(!this.checkQueue||this.checkQueue&&e.indexOf(o)===-1)&&(e.push(o),this.emit(h.PROCESS_QUEUE_ADD,o));return n.length=0,this._toProcess=0,e},getActive:function(){return this._active},length:{get:function(){return this._active.length}},destroy:function(){this._toProcess=0,this._pending=[],this._active=[],this._destroy=[]}});p.exports=r},59542:(p,S,t)=>{/**
* @author Vladimir Agafonkin
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(43886);function c(x){if(!(this instanceof c))return new c(x);this._maxEntries=Math.max(4,x||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}c.prototype={all:function(){return this._all(this.data,[])},search:function(x){var y=this.data,T=[],C=this.toBBox;if(!v(x,y))return T;for(var E=[],M,P,A,R;y;){for(M=0,P=y.children.length;M<P;M++)A=y.children[M],R=y.leaf?C(A):A,v(x,R)&&(y.leaf?T.push(A):f(x,R)?this._all(A,T):E.push(A));y=E.pop()}return T},collides:function(x){var y=this.data,T=this.toBBox;if(!v(x,y))return!1;for(var C=[],E,M,P,A;y;){for(E=0,M=y.children.length;E<M;E++)if(P=y.children[E],A=y.leaf?T(P):P,v(x,A)){if(y.leaf||f(x,A))return!0;C.push(P)}y=C.pop()}return!1},load:function(x){if(!(x&&x.length))return this;if(x.length<this._minEntries){for(var y=0,T=x.length;y<T;y++)this.insert(x[y]);return this}var C=this._build(x.slice(),0,x.length-1,0);if(!this.data.children.length)this.data=C;else if(this.data.height===C.height)this._splitRoot(this.data,C);else{if(this.data.height<C.height){var E=this.data;this.data=C,C=E}this._insert(C,this.data.height-C.height-1,!0)}return this},insert:function(x){return x&&this._insert(x,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(x,y){if(!x)return this;for(var T=this.data,C=this.toBBox(x),E=[],M=[],P,A,R,F;T||E.length;){if(T||(T=E.pop(),A=E[E.length-1],P=M.pop(),F=!0),T.leaf&&(R=h(x,T.children,y),R!==-1))return T.children.splice(R,1),E.push(T),this._condense(E),this;!F&&!T.leaf&&f(T,C)?(E.push(T),M.push(P),P=0,A=T,T=T.children[0]):A?(P++,T=A.children[P],F=!1):T=null}return this},toBBox:function(x){return x},compareMinX:s,compareMinY:o,toJSON:function(){return this.data},fromJSON:function(x){return this.data=x,this},_all:function(x,y){for(var T=[];x;)x.leaf?y.push.apply(y,x.children):T.push.apply(T,x.children),x=T.pop();return y},_build:function(x,y,T,C){var E=T-y+1,M=this._maxEntries,P;if(E<=M)return P=m(x.slice(y,T+1)),r(P,this.toBBox),P;C||(C=Math.ceil(Math.log(E)/Math.log(M)),M=Math.ceil(E/Math.pow(M,C-1))),P=m([]),P.leaf=!1,P.height=C;var A=Math.ceil(E/M),R=A*Math.ceil(Math.sqrt(M)),F,w,B,N;for(g(x,y,T,R,this.compareMinX),F=y;F<=T;F+=R)for(B=Math.min(F+R-1,T),g(x,F,B,A,this.compareMinY),w=F;w<=B;w+=A)N=Math.min(w+A-1,B),P.children.push(this._build(x,w,N,C-1));return r(P,this.toBBox),P},_chooseSubtree:function(x,y,T,C){for(var E,M,P,A,R,F,w,B;C.push(y),!(y.leaf||C.length-1===T);){for(w=B=1/0,E=0,M=y.children.length;E<M;E++)P=y.children[E],R=i(P),F=l(x,P)-R,F<B?(B=F,w=R<w?R:w,A=P):F===B&&R<w&&(w=R,A=P);y=A||y.children[0]}return y},_insert:function(x,y,T){var C=this.toBBox,E=T?x:C(x),M=[],P=this._chooseSubtree(E,this.data,y,M);for(P.children.push(x),e(P,E);y>=0&&M[y].children.length>this._maxEntries;)this._split(M,y),y--;this._adjustParentBBoxes(E,M,y)},_split:function(x,y){var T=x[y],C=T.children.length,E=this._minEntries;this._chooseSplitAxis(T,E,C);var M=this._chooseSplitIndex(T,E,C),P=m(T.children.splice(M,T.children.length-M));P.height=T.height,P.leaf=T.leaf,r(T,this.toBBox),r(P,this.toBBox),y?x[y-1].children.push(P):this._splitRoot(T,P)},_splitRoot:function(x,y){this.data=m([x,y]),this.data.height=x.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},_chooseSplitIndex:function(x,y,T){var C,E,M,P,A,R,F,w;for(R=F=1/0,C=y;C<=T-y;C++)E=n(x,0,C,this.toBBox),M=n(x,C,T,this.toBBox),P=u(E,M),A=i(E)+i(M),P<R?(R=P,w=C,F=A<F?A:F):P===R&&A<F&&(F=A,w=C);return w},_chooseSplitAxis:function(x,y,T){var C=x.leaf?this.compareMinX:s,E=x.leaf?this.compareMinY:o,M=this._allDistMargin(x,y,T,C),P=this._allDistMargin(x,y,T,E);M<P&&x.children.sort(C)},_allDistMargin:function(x,y,T,C){x.children.sort(C);var E=this.toBBox,M=n(x,0,y,E),P=n(x,T-y,T,E),A=a(M)+a(P),R,F;for(R=y;R<T-y;R++)F=x.children[R],e(M,x.leaf?E(F):F),A+=a(M);for(R=T-y-1;R>=y;R--)F=x.children[R],e(P,x.leaf?E(F):F),A+=a(P);return A},_adjustParentBBoxes:function(x,y,T){for(var C=T;C>=0;C--)e(y[C],x)},_condense:function(x){for(var y=x.length-1,T;y>=0;y--)x[y].children.length===0?y>0?(T=x[y-1].children,T.splice(T.indexOf(x[y]),1)):this.clear():r(x[y],this.toBBox)},compareMinX:function(x,y){return x.left-y.left},compareMinY:function(x,y){return x.top-y.top},toBBox:function(x){return{minX:x.left,minY:x.top,maxX:x.right,maxY:x.bottom}}};function h(x,y,T){if(!T)return y.indexOf(x);for(var C=0;C<y.length;C++)if(T(x,y[C]))return C;return-1}function r(x,y){n(x,0,x.children.length,y,x)}function n(x,y,T,C,E){E||(E=m(null)),E.minX=1/0,E.minY=1/0,E.maxX=-1/0,E.maxY=-1/0;for(var M=y,P;M<T;M++)P=x.children[M],e(E,x.leaf?C(P):P);return E}function e(x,y){return x.minX=Math.min(x.minX,y.minX),x.minY=Math.min(x.minY,y.minY),x.maxX=Math.max(x.maxX,y.maxX),x.maxY=Math.max(x.maxY,y.maxY),x}function s(x,y){return x.minX-y.minX}function o(x,y){return x.minY-y.minY}function i(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}function a(x){return x.maxX-x.minX+(x.maxY-x.minY)}function l(x,y){return(Math.max(y.maxX,x.maxX)-Math.min(y.minX,x.minX))*(Math.max(y.maxY,x.maxY)-Math.min(y.minY,x.minY))}function u(x,y){var T=Math.max(x.minX,y.minX),C=Math.max(x.minY,y.minY),E=Math.min(x.maxX,y.maxX),M=Math.min(x.maxY,y.maxY);return Math.max(0,E-T)*Math.max(0,M-C)}function f(x,y){return x.minX<=y.minX&&x.minY<=y.minY&&y.maxX<=x.maxX&&y.maxY<=x.maxY}function v(x,y){return y.minX<=x.maxX&&y.minY<=x.maxY&&y.maxX>=x.minX&&y.maxY>=x.minY}function m(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(x,y,T,C,E){for(var M=[y,T],P;M.length;)T=M.pop(),y=M.pop(),!(T-y<=C)&&(P=y+Math.ceil((T-y)/C/2)*C,d(x,P,y,T,E),M.push(y,P,P,T))}p.exports=c},35072:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r){if(this.entries=[],Array.isArray(r))for(var n=0;n<r.length;n++)this.set(r[n])},set:function(h){return this.entries.indexOf(h)===-1&&this.entries.push(h),this},get:function(h,r){for(var n=0;n<this.entries.length;n++){var e=this.entries[n];if(e[h]===r)return e}},getArray:function(){return this.entries.slice(0)},delete:function(h){var r=this.entries.indexOf(h);return r>-1&&this.entries.splice(r,1),this},dump:function(){console.group("Set");for(var h=0;h<this.entries.length;h++){var r=this.entries[h];console.log(r)}console.groupEnd()},each:function(h,r){var n,e=this.entries.slice(),s=e.length;if(r)for(n=0;n<s&&h.call(r,e[n],n)!==!1;n++);else for(n=0;n<s&&h(e[n],n)!==!1;n++);return this},iterate:function(h,r){var n,e=this.entries.length;if(r)for(n=0;n<e&&h.call(r,this.entries[n],n)!==!1;n++);else for(n=0;n<e&&h(this.entries[n],n)!==!1;n++);return this},iterateLocal:function(h){var r,n=[];for(r=1;r<arguments.length;r++)n.push(arguments[r]);var e=this.entries.length;for(r=0;r<e;r++){var s=this.entries[r];s[h].apply(s,n)}return this},clear:function(){return this.entries.length=0,this},contains:function(h){return this.entries.indexOf(h)>-1},union:function(h){var r=new c;return h.entries.forEach(function(n){r.set(n)}),this.entries.forEach(function(n){r.set(n)}),r},intersect:function(h){var r=new c;return this.entries.forEach(function(n){h.contains(n)&&r.set(n)}),r},difference:function(h){var r=new c;return this.entries.forEach(function(n){h.contains(n)||r.set(n)}),r},size:{get:function(){return this.entries.length},set:function(h){return h<this.entries.length?this.entries.length=h:this.entries.length}}});p.exports=c},86555:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45319),c=t(83419),h=t(56583),r=t(26099),n=new c({initialize:function(s,o,i,a){s===void 0&&(s=0),o===void 0&&(o=s),i===void 0&&(i=0),a===void 0&&(a=null),this._width=s,this._height=o,this._parent=a,this.aspectMode=i,this.aspectRatio=o===0?1:s/o,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new r},setAspectMode:function(e){return e===void 0&&(e=0),this.aspectMode=e,this.setSize(this._width,this._height)},setSnap:function(e,s){return e===void 0&&(e=0),s===void 0&&(s=e),this.snapTo.set(e,s),this.setSize(this._width,this._height)},setParent:function(e){return this._parent=e,this.setSize(this._width,this._height)},setMin:function(e,s){return e===void 0&&(e=0),s===void 0&&(s=e),this.minWidth=d(e,0,this.maxWidth),this.minHeight=d(s,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(e,s){return e===void 0&&(e=Number.MAX_VALUE),s===void 0&&(s=e),this.maxWidth=d(e,this.minWidth,Number.MAX_VALUE),this.maxHeight=d(s,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(e,s){switch(e===void 0&&(e=0),s===void 0&&(s=e),this.aspectMode){case n.NONE:this._width=this.getNewWidth(h(e,this.snapTo.x)),this._height=this.getNewHeight(h(s,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case n.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(h(e,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case n.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(h(s,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case n.FIT:this.constrain(e,s,!0);break;case n.ENVELOP:this.constrain(e,s,!1);break}return this},setAspectRatio:function(e){return this.aspectRatio=e,this.setSize(this._width,this._height)},resize:function(e,s){return this._width=this.getNewWidth(h(e,this.snapTo.x)),this._height=this.getNewHeight(h(s,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(e,s){return s===void 0&&(s=!0),e=d(e,this.minWidth,this.maxWidth),s&&this._parent&&e>this._parent.width&&(e=Math.max(this.minWidth,this._parent.width)),e},getNewHeight:function(e,s){return s===void 0&&(s=!0),e=d(e,this.minHeight,this.maxHeight),s&&this._parent&&e>this._parent.height&&(e=Math.max(this.minHeight,this._parent.height)),e},constrain:function(e,s,o){e===void 0&&(e=0),s===void 0&&(s=e),o===void 0&&(o=!0),e=this.getNewWidth(e),s=this.getNewHeight(s);var i=this.snapTo,a=s===0?1:e/s;return o&&this.aspectRatio>a||!o&&this.aspectRatio<a?(e=h(e,i.x),s=e/this.aspectRatio,i.y>0&&(s=h(s,i.y),e=s*this.aspectRatio)):(o&&this.aspectRatio<a||!o&&this.aspectRatio>a)&&(s=h(s,i.y),e=s*this.aspectRatio,i.x>0&&(e=h(e,i.x),s=e*(1/this.aspectRatio))),this._width=e,this._height=s,this},fitTo:function(e,s){return this.constrain(e,s,!0)},envelop:function(e,s){return this.constrain(e,s,!1)},setWidth:function(e){return this.setSize(e,this._height)},setHeight:function(e){return this.setSize(this._width,e)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(e){e&&e.style&&(e.style.width=this._width+"px",e.style.height=this._height+"px")},copy:function(e){return e.setAspectMode(this.aspectMode),e.aspectRatio=this.aspectRatio,e.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(e){this.setSize(e,this._height)}},height:{get:function(){return this._height},set:function(e){this.setSize(this._width,e)}}});n.NONE=0,n.WIDTH_CONTROLS_HEIGHT=1,n.HEIGHT_CONTROLS_WIDTH=2,n.FIT=3,n.ENVELOP=4,p.exports=n},15238:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="add"},56187:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="remove"},82348:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={PROCESS_QUEUE_ADD:t(15238),PROCESS_QUEUE_REMOVE:t(56187)}},41392:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Events:t(82348),List:t(73162),Map:t(90330),ProcessQueue:t(25774),RTree:t(59542),Set:t(35072),Size:t(86555)}},57382:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(45319),h=t(40987),r=t(8054),n=t(50030),e=t(79237),s=new d({Extends:e,initialize:function(i,a,l,u,f){e.call(this,i,a,l,u,f),this.add("__BASE",0,0,0,u,f),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=u,this.height=f,this.imageData=this.context.getImageData(0,0,u,f),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===r.WEBGL&&this.refresh(),this},draw:function(o,i,a,l){return l===void 0&&(l=!0),this.context.drawImage(a,o,i),l&&this.update(),this},drawFrame:function(o,i,a,l,u){a===void 0&&(a=0),l===void 0&&(l=0),u===void 0&&(u=!0);var f=this.manager.getFrame(o,i);if(f){var v=f.canvasData,m=f.cutWidth,g=f.cutHeight,x=f.source.resolution;this.context.drawImage(f.source.image,v.x,v.y,m,g,a,l,m/x,g/x),u&&this.update()}return this},setPixel:function(o,i,a,l,u,f){f===void 0&&(f=255),o=Math.abs(Math.floor(o)),i=Math.abs(Math.floor(i));var v=this.getIndex(o,i);if(v>-1){var m=this.context.getImageData(o,i,1,1);m.data[0]=a,m.data[1]=l,m.data[2]=u,m.data[3]=f,this.context.putImageData(m,o,i)}return this},putData:function(o,i,a,l,u,f,v){return l===void 0&&(l=0),u===void 0&&(u=0),f===void 0&&(f=o.width),v===void 0&&(v=o.height),this.context.putImageData(o,i,a,l,u,f,v),this},getData:function(o,i,a,l){o=c(Math.floor(o),0,this.width-1),i=c(Math.floor(i),0,this.height-1),a=c(a,1,this.width-o),l=c(l,1,this.height-i);var u=this.context.getImageData(o,i,a,l);return u},getPixel:function(o,i,a){a||(a=new h);var l=this.getIndex(o,i);if(l>-1){var u=this.data,f=u[l+0],v=u[l+1],m=u[l+2],g=u[l+3];a.setTo(f,v,m,g)}return a},getPixels:function(o,i,a,l){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=this.width),l===void 0&&(l=a),o=Math.abs(Math.round(o)),i=Math.abs(Math.round(i));for(var u=c(o,0,this.width),f=c(o+a,0,this.width),v=c(i,0,this.height),m=c(i+l,0,this.height),g=new h,x=[],y=v;y<m;y++){for(var T=[],C=u;C<f;C++)g=this.getPixel(C,y,g),T.push({x:C,y,color:g.color,alpha:g.alphaGL});x.push(T)}return x},getIndex:function(o,i){return o=Math.abs(Math.round(o)),i=Math.abs(Math.round(i)),o<this.width&&i<this.height?(o+i*this.width)*4:-1},refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(o,i,a,l,u){return o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=this.width),l===void 0&&(l=this.height),u===void 0&&(u=!0),this.context.clearRect(o,i,a,l),u&&this.update(),this},setSize:function(o,i){return i===void 0&&(i=o),(o!==this.width||i!==this.height)&&(this.canvas.width=o,this.canvas.height=i,this._source.width=o,this._source.height=i,this._source.isPowerOf2=n(o,i),this.frames.__BASE.setSize(o,i,0,0),this.width=o,this.height=i,this.refresh()),this},destroy:function(){e.prototype.destroy.call(this),this._source=null,this.canvas=null,this.context=null,this.imageData=null,this.data=null,this.pixels=null,this.buffer=null}});p.exports=s},81320:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(10312),c=t(38058),h=t(27919),r=t(83419),n=t(8054),e=t(4327),s=t(95540),o=t(36060),i=t(32302),a=t(79237),l=t(70554),u=new r({Extends:a,initialize:function(v,m,g,x){g===void 0&&(g=256),x===void 0&&(x=256),this.type="DynamicTexture";var y=v.game.renderer,T=y&&y.type===n.CANVAS,C=T?h.create2D(this,g,x):[this];a.call(this,v,m,C,g,x),this.add("__BASE",0,0,0,g,x),this.renderer=y,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=T?C:null,this.context=T?C.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new c(0,0,g,x).setScene(v.game.scene.systemScene,!1),this.renderTarget=T?null:new i(y,g,x,1,0,!1,!1,!0,!1),this.pipeline=T?null:y.pipelines.get(o.SINGLE_PIPELINE),this.setSize(g,x)},setSize:function(f,v){v===void 0&&(v=f);var m=this.get(),g=m.source;if(f!==this.width||v!==this.height){this.canvas&&(this.canvas.width=f,this.canvas.height=v);var x=this.renderTarget;x&&(x.willResize(f,v)&&x.resize(f,v),x.texture!==g.glTexture&&this.renderer.deleteTexture(g.glTexture),this.setFromRenderTarget()),this.camera.setSize(f,v),g.width=f,g.height=v,m.setSize(f,v),this.width=f,this.height=v}else{var y=this.getSourceImage();m.cutX+f>y.width&&(f=y.width-m.cutX),m.cutY+v>y.height&&(v=y.height-m.cutY),m.setSize(f,v,m.cutX,m.cutY)}return this},setFromRenderTarget:function(){var f=this.get(),v=f.source,m=this.renderTarget;return v.isRenderTexture=!0,v.isGLTexture=!0,v.glTexture=m.texture,this},setIsSpriteTexture:function(f){return this.isSpriteTexture=f,this},fill:function(f,v,m,g,x,y){var T=this.camera,C=this.renderer;v===void 0&&(v=1),m===void 0&&(m=0),g===void 0&&(g=0),x===void 0&&(x=this.width),y===void 0&&(y=this.height);var E=f>>16&255,M=f>>8&255,P=f&255,A=this.renderTarget;if(T.preRender(),A){A.bind(!0);var R=this.pipeline.manager.set(this.pipeline),F=C.width/A.width,w=C.height/A.height,B=A.height-(g+y);R.drawFillRect(m*F,B*w,x*F,y*w,l.getTintFromFloats(P/255,M/255,E/255,1),v),A.unbind(!0)}else{var N=this.context;C.setContext(N),N.globalCompositeOperation="source-over",N.fillStyle="rgba("+E+","+M+","+P+","+v+")",N.fillRect(m,g,x,y),C.setContext()}return this.dirty=!0,this},clear:function(f,v,m,g){if(this.dirty){var x=this.context,y=this.renderTarget;y?y.clear(f,v,m,g):x&&(f!==void 0&&v!==void 0&&m!==void 0&&g!==void 0?x.clearRect(f,v,m,g):(x.save(),x.setTransform(1,0,0,1,0,0),x.clearRect(0,0,this.width,this.height),x.restore())),this.dirty=!1}return this},stamp:function(f,v,m,g,x){m===void 0&&(m=0),g===void 0&&(g=0);var y=s(x,"alpha",1),T=s(x,"tint",16777215),C=s(x,"angle",0),E=s(x,"rotation",0),M=s(x,"scale",1),P=s(x,"scaleX",M),A=s(x,"scaleY",M),R=s(x,"originX",.5),F=s(x,"originY",.5),w=s(x,"blendMode",0),B=s(x,"erase",!1),N=s(x,"skipBatch",!1),U=this.manager.resetStamp(y,T);return U.setAngle(0),C!==0?U.setAngle(C):E!==0&&U.setRotation(E),U.setScale(P,A),U.setTexture(f,v),U.setOrigin(R,F),U.setBlendMode(w),B&&(this._eraseMode=!0),N?this.batchGameObject(U,m,g):this.draw(U,m,g),B&&(this._eraseMode=!1),this},erase:function(f,v,m){return this._eraseMode=!0,this.draw(f,v,m),this._eraseMode=!1,this},draw:function(f,v,m,g,x){return this.beginDraw(),this.batchDraw(f,v,m,g,x),this.endDraw(),this},drawFrame:function(f,v,m,g,x,y){return this.beginDraw(),this.batchDrawFrame(f,v,m,g,x,y),this.endDraw(),this},repeat:function(f,v,m,g,x,y,T,C,E){if(m===void 0&&(m=0),g===void 0&&(g=0),x===void 0&&(x=this.width),y===void 0&&(y=this.height),T===void 0&&(T=1),C===void 0&&(C=16777215),E===void 0&&(E=!1),f instanceof e?v=f:v=this.manager.getFrame(f,v),!v)return this;var M=this.manager.resetStamp(T,C);M.setFrame(v),M.setOrigin(0);var P=v.width,A=v.height;x=Math.floor(x),y=Math.floor(y);var R=Math.ceil(x/P),F=Math.ceil(y/A),w=R*P-x,B=F*A-y;w>0&&(w=P-w),B>0&&(B=A-B),m<0&&(R+=Math.ceil(Math.abs(m)/P)),g<0&&(F+=Math.ceil(Math.abs(g)/A));var N=m,U=g,D=!1,I=this.manager.stampCrop.setTo(0,0,P,A);E||this.beginDraw();for(var O=0;O<F;O++){if(U+A<0){U+=A;continue}for(var L=0;L<R;L++){if(D=!1,N+P<0){N+=P;continue}else N<0&&(D=!0,I.width=P+N,I.x=P-I.width);U<0&&(D=!0,I.height=A+U,I.y=A-I.height),w>0&&L===R-1&&(D=!0,I.width=w),B>0&&O===F-1&&(D=!0,I.height=B),D&&M.setCrop(I),this.batchGameObject(M,N,U),M.isCropped=!1,I.setTo(0,0,P,A),N+=P}N=m,U+=A}return E||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var f=this.camera,v=this.renderer,m=this.renderTarget;f.preRender(),m?v.beginCapture(m.width,m.height):v.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(f,v,m,g,x){return Array.isArray(f)||(f=[f]),this.batchList(f,v,m,g,x),this},batchDrawFrame:function(f,v,m,g,x,y){m===void 0&&(m=0),g===void 0&&(g=0),x===void 0&&(x=1),y===void 0&&(y=16777215);var T=this.manager.getFrame(f,v);return T&&(this.renderTarget?this.pipeline.batchTextureFrame(T,m,g,y,x,this.camera.matrix,null):this.batchTextureFrame(T,m,g,x,y)),this},endDraw:function(f){if(f===void 0&&(f=this._eraseMode),this.isDrawing){var v=this.renderer,m=this.renderTarget;if(m){var g=v.endCapture(),x=v.pipelines.setUtility();x.blitFrame(g,m,1,!1,!1,f,this.isSpriteTexture),v.resetScissor(),v.resetViewport()}else v.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(f,v,m,g,x){var y=f.length;if(y!==0)for(var T=0;T<y;T++){var C=f[T];!C||C===this||(C.renderWebGL||C.renderCanvas?this.batchGameObject(C,v,m):C.isParent||C.list?this.batchGroup(C.getChildren(),v,m):typeof C=="string"?this.batchTextureFrameKey(C,null,v,m,g,x):C instanceof e?this.batchTextureFrame(C,v,m,g,x):Array.isArray(C)&&this.batchList(C,v,m,g,x))}},batchGroup:function(f,v,m){v===void 0&&(v=0),m===void 0&&(m=0);for(var g=0;g<f.length;g++){var x=f[g];x.willRender(this.camera)&&this.batchGameObject(x,x.x+v,x.y+m)}},batchGameObject:function(f,v,m){v===void 0&&(v=f.x),m===void 0&&(m=f.y);var g=f.x,x=f.y,y=this.camera,T=this.renderer,C=this._eraseMode,E=f.mask;if(f.setPosition(v,m),this.canvas){if(C){var M=f.blendMode;f.blendMode=d.ERASE}E&&E.preRenderCanvas(T,f,y),f.renderCanvas(T,f,y,null),E&&E.postRenderCanvas(T,f,y),C&&(f.blendMode=M)}else T&&(E&&E.preRenderWebGL(T,f,y),C||T.setBlendMode(f.blendMode),f.renderWebGL(T,f,y),E&&E.postRenderWebGL(T,y,this.renderTarget));f.setPosition(g,x)},batchTextureFrameKey:function(f,v,m,g,x,y){var T=this.manager.getFrame(f,v);T&&this.batchTextureFrame(T,m,g,x,y)},batchTextureFrame:function(f,v,m,g,x){v===void 0&&(v=0),m===void 0&&(m=0),g===void 0&&(g=1),x===void 0&&(x=16777215);var y=this.camera.matrix,T=this.renderTarget;if(T)this.pipeline.batchTextureFrame(f,v,m,x,g,y,null);else{var C=this.context,E=f.canvasData,M=f.source.image;C.save(),C.globalCompositeOperation=this._eraseMode?"destination-out":"source-over",C.globalAlpha=g,y.setToContext(C),E.width>0&&E.height>0&&C.drawImage(M,E.x,E.y,E.width,E.height,v,m,E.width,E.height),C.restore()}},snapshotArea:function(f,v,m,g,x,y,T){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,x,!1,f,v,m,g,y,T):this.renderer.snapshotCanvas(this.canvas,x,!1,f,v,m,g,y,T),this},snapshot:function(f,v,m){return this.snapshotArea(0,0,this.width,this.height,f,v,m)},snapshotPixel:function(f,v,m){return this.snapshotArea(f,v,1,1,m,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(f,v,m,g){var x=this.manager.resetStamp();x.setTexture(this),x.setOrigin(0),x.renderWebGL(f,x,m,g)},renderCanvas:function(){},destroy:function(){var f=this.manager.stamp;f&&f.texture===this&&this.manager.resetStamp(),a.prototype.destroy.call(this),h.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});p.exports=u},4327:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(45319),h=t(79291),r=new d({initialize:function(e,s,o,i,a,l,u){this.texture=e,this.name=s,this.source=e.source[o],this.sourceIndex=o,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},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(l,u,i,a)},setCutPosition:function(n,e){return n===void 0&&(n=0),e===void 0&&(e=0),this.cutX=n,this.cutY=e,this.updateUVs()},setCutSize:function(n,e){return this.cutWidth=n,this.cutHeight=e,this.updateUVs()},setSize:function(n,e,s,o){s===void 0&&(s=0),o===void 0&&(o=0),this.setCutPosition(s,o),this.setCutSize(n,e),this.width=n,this.height=e,this.halfWidth=Math.floor(n*.5),this.halfHeight=Math.floor(e*.5),this.centerX=Math.floor(n/2),this.centerY=Math.floor(e/2);var i=this.data,a=i.cut;a.x=s,a.y=o,a.w=n,a.h=e,a.r=s+n,a.b=o+e,i.sourceSize.w=n,i.sourceSize.h=e,i.spriteSourceSize.w=n,i.spriteSourceSize.h=e,i.radius=.5*Math.sqrt(n*n+e*e);var l=i.drawImage;return l.x=s,l.y=o,l.width=n,l.height=e,this.updateUVs()},setTrim:function(n,e,s,o,i,a){var l=this.data,u=l.spriteSourceSize;return l.trim=!0,l.sourceSize.w=n,l.sourceSize.h=e,u.x=s,u.y=o,u.w=i,u.h=a,u.r=s+i,u.b=o+a,this.x=s,this.y=o,this.width=i,this.height=a,this.halfWidth=i*.5,this.halfHeight=a*.5,this.centerX=Math.floor(i/2),this.centerY=Math.floor(a/2),this.updateUVs()},setScale9:function(n,e,s,o){var i=this.data;return i.scale9=!0,i.is3Slice=e===0&&o===this.height,i.scale9Borders.x=n,i.scale9Borders.y=e,i.scale9Borders.w=s,i.scale9Borders.h=o,this},setCropUVs:function(n,e,s,o,i,a,l){var u=this.cutX,f=this.cutY,v=this.cutWidth,m=this.cutHeight,g=this.realWidth,x=this.realHeight;e=c(e,0,g),s=c(s,0,x),o=c(o,0,g-e),i=c(i,0,x-s);var y=u+e,T=f+s,C=o,E=i,M=this.data;if(M.trim){var P=M.spriteSourceSize;o=c(o,0,v-e),i=c(i,0,m-s);var A=e+o,R=s+i,F=!(P.r<e||P.b<s||P.x>A||P.y>R);if(F){var w=Math.max(P.x,e),B=Math.max(P.y,s),N=Math.min(P.r,A)-w,U=Math.min(P.b,R)-B;C=N,E=U,a?y=u+(v-(w-P.x)-N):y=u+(w-P.x),l?T=f+(m-(B-P.y)-U):T=f+(B-P.y),e=w,s=B,o=N,i=U}else y=0,T=0,C=0,E=0}else a&&(y=u+(v-e-o)),l&&(T=f+(m-s-i));var D=this.source.width,I=this.source.height;return n.u0=Math.max(0,y/D),n.v0=Math.max(0,T/I),n.u1=Math.min(1,(y+C)/D),n.v1=Math.min(1,(T+E)/I),n.x=e,n.y=s,n.cx=y,n.cy=T,n.cw=C,n.ch=E,n.width=o,n.height=i,n.flipX=a,n.flipY=l,n},updateCropUVs:function(n,e,s){return this.setCropUVs(n,n.x,n.y,n.width,n.height,e,s)},setUVs:function(n,e,s,o,i,a){var l=this.data.drawImage;return l.width=n,l.height=e,this.u0=s,this.v0=o,this.u1=i,this.v1=a,this},updateUVs:function(){var n=this.cutX,e=this.cutY,s=this.cutWidth,o=this.cutHeight,i=this.data.drawImage;i.width=s,i.height=o;var a=this.source.width,l=this.source.height;return this.u0=n/a,this.v0=e/l,this.u1=(n+s)/a,this.v1=(e+o)/l,this},updateUVsInverted:function(){var n=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/n,this.v0=this.cutY/e,this.u1=this.cutX/n,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var n=new r(this.texture,this.name,this.sourceIndex);return n.cutX=this.cutX,n.cutY=this.cutY,n.cutWidth=this.cutWidth,n.cutHeight=this.cutHeight,n.x=this.x,n.y=this.y,n.width=this.width,n.height=this.height,n.halfWidth=this.halfWidth,n.halfHeight=this.halfHeight,n.centerX=this.centerX,n.centerY=this.centerY,n.rotated=this.rotated,n.data=h(!0,n.data,this.data),n.updateUVs(),n},destroy:function(){this.texture=null,this.source=null,this.customData=null,this.data=null},glTexture:{get:function(){return this.source.glTexture}},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}},scale9:{get:function(){return this.data.scale9}},is3Slice:{get:function(){return this.data.is3Slice}},canvasData:{get:function(){return this.data.drawImage}}});p.exports=r},79237:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(4327),h=t(11876),r='Texture "%s" has no frame "%s"',n=new d({initialize:function(s,o,i,a,l){Array.isArray(i)||(i=[i]),this.manager=s,this.key=o,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var u=0;u<i.length;u++)this.source.push(new h(this,i[u],a,l))},add:function(e,s,o,i,a,l){if(this.has(e))return null;var u=new c(this,e,s,o,i,a,l);return this.frames[e]=u,this.firstFrame==="__BASE"&&(this.firstFrame=e),this.frameTotal++,u},remove:function(e){if(this.has(e)){var s=this.get(e);return s.destroy(),delete this.frames[e],!0}return!1},has:function(e){return this.frames.hasOwnProperty(e)},get:function(e){e||(e=this.firstFrame);var s=this.frames[e];return s||(console.warn(r,this.key,e),s=this.frames[this.firstFrame]),s},getTextureSourceIndex:function(e){for(var s=0;s<this.source.length;s++)if(this.source[s]===e)return s;return-1},getFramesFromTextureSource:function(e,s){s===void 0&&(s=!1);var o=[];for(var i in this.frames)if(!(i==="__BASE"&&!s)){var a=this.frames[i];a.sourceIndex===e&&o.push(a)}return o},getFrameBounds:function(e){e===void 0&&(e=0);for(var s=this.getFramesFromTextureSource(e,!0),o=s[0],i=o.cutX,a=o.cutY,l=o.cutX+o.cutWidth,u=o.cutY+o.cutHeight,f=1;f<s.length;f++){var v=s[f];v.cutX<i&&(i=v.cutX),v.cutY<a&&(a=v.cutY),v.cutX+v.cutWidth>l&&(l=v.cutX+v.cutWidth),v.cutY+v.cutHeight>u&&(u=v.cutY+v.cutHeight)}return{x:i,y:a,width:l-i,height:u-a}},getFrameNames:function(e){e===void 0&&(e=!1);var s=Object.keys(this.frames);if(!e){var o=s.indexOf("__BASE");o!==-1&&s.splice(o,1)}return s},getSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var s=this.frames[e];return s?s.source.image:(console.warn(r,this.key,e),this.frames.__BASE.source.image)},getDataSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var s=this.frames[e],o;return s?o=s.sourceIndex:(console.warn(r,this.key,e),o=this.frames.__BASE.sourceIndex),this.dataSource[o].image},setDataSource:function(e){Array.isArray(e)||(e=[e]);for(var s=0;s<e.length;s++){var o=this.source[s];this.dataSource.push(new h(this,e[s],o.width,o.height))}},setFilter:function(e){var s;for(s=0;s<this.source.length;s++)this.source[s].setFilter(e);for(s=0;s<this.dataSource.length;s++)this.dataSource[s].setFilter(e)},destroy:function(){var e,s=this.source,o=this.dataSource;for(e=0;e<s.length;e++)s[e]&&s[e].destroy();for(e=0;e<o.length;e++)o[e]&&o[e].destroy();for(var i in this.frames){var a=this.frames[i];a&&a.destroy()}this.source=[],this.dataSource=[],this.frames={},this.manager.removeKey(this.key),this.manager=null}});p.exports=n},17130:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(27919),c=t(57382),h=t(83419),r=t(40987),n=t(8054),e=t(81320),s=t(50792),o=t(69442),i=t(4327),a=t(8443),l=t(99584),u=t(35154),f=t(88571),v=t(41212),m=t(61309),g=t(87841),x=t(79237),y=new h({Extends:s,initialize:function(C){s.call(this),this.game=C,this.name="TextureManager",this.list={},this._tempCanvas=d.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new g,this.silentWarnings=!1,C.events.once(a.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(o.LOAD,this.updatePending,this),this.on(o.ERROR,this.updatePending,this);var T=this.game.config;T.defaultImage!==null&&this.addBase64("__DEFAULT",T.defaultImage),T.missingImage!==null&&this.addBase64("__MISSING",T.missingImage),T.whiteImage!==null&&this.addBase64("__WHITE",T.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(a.DESTROY,this.destroy,this),this.game.events.once(a.SYSTEM_READY,function(C){this.stamp=new f(C).setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(o.LOAD),this.off(o.ERROR),this.emit(o.READY))},checkKey:function(T){return!T||typeof T!="string"||this.exists(T)?(this.silentWarnings||console.error("Texture key already in use: "+T),!1):!0},remove:function(T){if(typeof T=="string")if(this.exists(T))T=this.get(T);else return this.silentWarnings||console.warn("No texture found matching key: "+T),this;var C=T.key;return this.list.hasOwnProperty(C)&&(T.destroy(),this.emit(o.REMOVE,C),this.emit(o.REMOVE_KEY+C)),this},removeKey:function(T){return this.list.hasOwnProperty(T)&&delete this.list[T],this},addBase64:function(T,C){if(this.checkKey(T)){var E=this,M=new Image;M.onerror=function(){E.emit(o.ERROR,T)},M.onload=function(){var P=E.create(T,M);m.Image(P,0),E.emit(o.ADD,T,P),E.emit(o.ADD_KEY+T,P),E.emit(o.LOAD,T,P)},M.src=C}return this},getBase64:function(T,C,E,M){E===void 0&&(E="image/png"),M===void 0&&(M=.92);var P="",A=this.getFrame(T,C);if(A&&(A.source.isRenderTexture||A.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(A){var R=A.canvasData,F=d.create2D(this,R.width,R.height),w=F.getContext("2d",{willReadFrequently:!0});R.width>0&&R.height>0&&w.drawImage(A.source.image,R.x,R.y,R.width,R.height,0,0,R.width,R.height),P=F.toDataURL(E,M),d.remove(F)}return P},addImage:function(T,C,E){var M=null;return this.checkKey(T)&&(M=this.create(T,C),m.Image(M,0),E&&M.setDataSource(E),this.emit(o.ADD,T,M),this.emit(o.ADD_KEY+T,M)),M},addGLTexture:function(T,C){var E=null;if(this.checkKey(T)){var M=C.width,P=C.height;E=this.create(T,C,M,P),E.add("__BASE",0,0,0,M,P),this.emit(o.ADD,T,E),this.emit(o.ADD_KEY+T,E)}return E},addCompressedTexture:function(T,C,E){var M=null;if(this.checkKey(T)){if(M=this.create(T,C),M.add("__BASE",0,0,0,C.width,C.height),E){var P=function(R,F,w){Array.isArray(w.textures)||Array.isArray(w.frames)?m.JSONArray(R,F,w):m.JSONHash(R,F,w)};if(Array.isArray(E))for(var A=0;A<E.length;A++)P(M,A,E[A]);else P(M,0,E)}this.emit(o.ADD,T,M),this.emit(o.ADD_KEY+T,M)}return M},addRenderTexture:function(T,C){var E=null;return this.checkKey(T)&&(E=this.create(T,C),E.add("__BASE",0,0,0,C.width,C.height),this.emit(o.ADD,T,E),this.emit(o.ADD_KEY+T,E)),E},generate:function(T,C){if(this.checkKey(T)){var E=d.create(this,1,1);return C.canvas=E,l(C),this.addCanvas(T,E)}else return null},createCanvas:function(T,C,E){if(C===void 0&&(C=256),E===void 0&&(E=256),this.checkKey(T)){var M=d.create(this,C,E,n.CANVAS,!0);return this.addCanvas(T,M)}return null},addCanvas:function(T,C,E){E===void 0&&(E=!1);var M=null;return E?M=new c(this,T,C,C.width,C.height):this.checkKey(T)&&(M=new c(this,T,C,C.width,C.height),this.list[T]=M,this.emit(o.ADD,T,M),this.emit(o.ADD_KEY+T,M)),M},addDynamicTexture:function(T,C,E){var M=null;return typeof T=="string"&&!this.exists(T)?M=new e(this,T,C,E):(M=T,T=M.key),this.checkKey(T)?(this.list[T]=M,this.emit(o.ADD,T,M),this.emit(o.ADD_KEY+T,M)):M=null,M},addAtlas:function(T,C,E,M){return Array.isArray(E.textures)||Array.isArray(E.frames)?this.addAtlasJSONArray(T,C,E,M):this.addAtlasJSONHash(T,C,E,M)},addAtlasJSONArray:function(T,C,E,M){var P=null;if(C instanceof x?(T=C.key,P=C):this.checkKey(T)&&(P=this.create(T,C)),P){if(Array.isArray(E))for(var A=E.length===1,R=0;R<P.source.length;R++){var F=A?E[0]:E[R];m.JSONArray(P,R,F)}else m.JSONArray(P,0,E);M&&P.setDataSource(M),this.emit(o.ADD,T,P),this.emit(o.ADD_KEY+T,P)}return P},addAtlasJSONHash:function(T,C,E,M){var P=null;if(C instanceof x?(T=C.key,P=C):this.checkKey(T)&&(P=this.create(T,C)),P){if(Array.isArray(E))for(var A=0;A<E.length;A++)m.JSONHash(P,A,E[A]);else m.JSONHash(P,0,E);M&&P.setDataSource(M),this.emit(o.ADD,T,P),this.emit(o.ADD_KEY+T,P)}return P},addAtlasXML:function(T,C,E,M){var P=null;return C instanceof x?(T=C.key,P=C):this.checkKey(T)&&(P=this.create(T,C)),P&&(m.AtlasXML(P,0,E),M&&P.setDataSource(M),this.emit(o.ADD,T,P),this.emit(o.ADD_KEY+T,P)),P},addUnityAtlas:function(T,C,E,M){var P=null;return C instanceof x?(T=C.key,P=C):this.checkKey(T)&&(P=this.create(T,C)),P&&(m.UnityYAML(P,0,E),M&&P.setDataSource(M),this.emit(o.ADD,T,P),this.emit(o.ADD_KEY+T,P)),P},addSpriteSheet:function(T,C,E,M){var P=null;if(C instanceof x?(T=C.key,P=C):this.checkKey(T)&&(P=this.create(T,C)),P){var A=P.source[0].width,R=P.source[0].height;m.SpriteSheet(P,0,0,0,A,R,E),M&&P.setDataSource(M),this.emit(o.ADD,T,P),this.emit(o.ADD_KEY+T,P)}return P},addSpriteSheetFromAtlas:function(T,C){if(!this.checkKey(T))return null;var E=u(C,"atlas",null),M=u(C,"frame",null);if(!(!E||!M)){var P=this.get(E),A=P.get(M);if(A){var R=A.source.image;R||(R=A.source.glTexture);var F=this.create(T,R);return A.trimmed?m.SpriteSheetFromAtlas(F,A,C):m.SpriteSheet(F,0,A.cutX,A.cutY,A.cutWidth,A.cutHeight,C),this.emit(o.ADD,T,F),this.emit(o.ADD_KEY+T,F),F}}},addUint8Array:function(T,C,E,M){if(!this.checkKey(T)||C.length/4!==E*M)return null;var P=this.create(T,C,E,M);return P.add("__BASE",0,0,0,E,M),this.emit(o.ADD,T,P),this.emit(o.ADD_KEY+T,P),P},create:function(T,C,E,M){var P=null;return this.checkKey(T)&&(P=new x(this,T,C,E,M),this.list[T]=P),P},exists:function(T){return this.list.hasOwnProperty(T)},get:function(T){return T===void 0&&(T="__DEFAULT"),this.list[T]?this.list[T]:T instanceof x?T:T instanceof i?T.texture:this.list.__MISSING},cloneFrame:function(T,C){if(this.list[T])return this.list[T].get(C).clone()},getFrame:function(T,C){if(this.list[T])return this.list[T].get(C)},parseFrame:function(T){if(T){if(typeof T=="string")return this.getFrame(T);if(Array.isArray(T)&&T.length===2)return this.getFrame(T[0],T[1]);if(v(T))return this.getFrame(T.key,T.frame);if(T instanceof x)return T.get();if(T instanceof i)return T}else return},getTextureKeys:function(){var T=[];for(var C in this.list)C!=="__DEFAULT"&&C!=="__MISSING"&&C!=="__WHITE"&&C!=="__NORMAL"&&T.push(C);return T},getPixel:function(T,C,E,M){var P=this.getFrame(E,M);if(P){T-=P.x,C-=P.y;var A=P.data.cut;if(T+=A.x,C+=A.y,T>=A.x&&T<A.r&&C>=A.y&&C<A.b){var R=this._tempContext;R.clearRect(0,0,1,1),R.drawImage(P.source.image,T,C,1,1,0,0,1,1);var F=R.getImageData(0,0,1,1);return new r(F.data[0],F.data[1],F.data[2],F.data[3])}}return null},getPixelAlpha:function(T,C,E,M){var P=this.getFrame(E,M);if(P){T-=P.x,C-=P.y;var A=P.data.cut;if(T+=A.x,C+=A.y,T>=A.x&&T<A.r&&C>=A.y&&C<A.b){var R=this._tempContext;R.clearRect(0,0,1,1),R.drawImage(P.source.image,T,C,1,1,0,0,1,1);var F=R.getImageData(0,0,1,1);return F.data[3]}}return null},setTexture:function(T,C,E){return this.list[C]&&(T.texture=this.list[C],T.frame=T.texture.get(E)),T},renameTexture:function(T,C){var E=this.get(T);return E&&T!==C?(E.key=C,this.list[C]=E,delete this.list[T],!0):!1},each:function(T,C){for(var E=[null],M=1;M<arguments.length;M++)E.push(arguments[M]);for(var P in this.list)E[0]=this.list[P],T.apply(C,E)},resetStamp:function(T,C){T===void 0&&(T=1),C===void 0&&(C=16777215);var E=this.stamp;return E.setCrop(),E.setPosition(0),E.setAngle(0),E.setScale(1),E.setAlpha(T),E.setTint(C),E.setTexture("__WHITE"),E},destroy:function(){for(var T in this.list)this.list[T].destroy();this.list={},this.stamp.destroy(),this.game=null,this.stamp=null,d.remove(this._tempCanvas)}});p.exports=y},11876:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(27919),c=t(83419),h=t(50030),r=t(29795),n=t(82751),e=new c({initialize:function(o,i,a,l,u){u===void 0&&(u=!1);var f=o.manager.game;this.renderer=f.renderer,this.texture=o,this.source=i,this.image=i.compressed?null:i,this.compressionAlgorithm=i.compressed?i.format:null,this.resolution=1,this.width=a||i.naturalWidth||i.videoWidth||i.width||0,this.height=l||i.naturalHeight||i.videoHeight||i.height||0,this.scaleMode=r.DEFAULT,this.isCanvas=i instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&i instanceof HTMLVideoElement,this.isRenderTexture=i.type==="RenderTexture"||i.type==="DynamicTexture",this.isGLTexture=i instanceof n,this.isPowerOf2=h(this.width,this.height),this.glTexture=null,this.flipY=u,this.init(f)},init:function(s){var o=this.renderer;if(o){var i=this.source;if(o.gl){var a=this.image,l=this.flipY,u=this.width,f=this.height,v=this.scaleMode;this.isCanvas?this.glTexture=o.createCanvasTexture(a,!1,l):this.isVideo?this.glTexture=o.createVideoTexture(a,!1,l):this.isRenderTexture?this.glTexture=o.createTextureFromSource(null,u,f,v):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=o.createTextureFromSource(i,void 0,void 0,v):i instanceof Uint8Array?this.glTexture=o.createUint8ArrayTexture(i,u,f,v):this.glTexture=o.createTextureFromSource(a,u,f,v)}else this.isRenderTexture&&(this.image=i.canvas)}s.config.antialias||this.setFilter(1)},setFilter:function(s){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,s),this.scaleMode=s},setFlipY:function(s){return s===void 0&&(s=!0),s===this.flipY?this:(this.flipY=s,this.update(),this)},update:function(){var s=this.renderer,o=this.image,i=this.flipY,a=s.gl;a&&this.isCanvas?s.updateCanvasTexture(o,this.glTexture,i):a&&this.isVideo&&s.updateVideoTexture(o,this.glTexture,i)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&d.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});p.exports=e},19673:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={LINEAR:0,NEAREST:1};p.exports=S},44538:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="addtexture"},63486:p=>{/**
* @author samme
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="addtexture-"},94851:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="onerror"},29099:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="onload"},8678:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="ready"},86415:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="removetexture"},30879:p=>{/**
* @author samme
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="removetexture-"},69442:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={ADD:t(44538),ADD_KEY:t(63486),ERROR:t(94851),LOAD:t(29099),READY:t(8678),REMOVE:t(86415),REMOVE_KEY:t(30879)}},27458:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(79291),c=t(19673),h={CanvasTexture:t(57382),DynamicTexture:t(81320),Events:t(69442),FilterMode:c,Frame:t(4327),Parsers:t(61309),Texture:t(79237),TextureManager:t(17130),TextureSource:t(11876)};h=d(!1,h,c),p.exports=h},89905:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){if(!c.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var h=t.source[d];t.add("__BASE",d,0,0,h.width,h.height);for(var r=c.getElementsByTagName("SubTexture"),n,e=0;e<r.length;e++){var s=r[e].attributes,o=s.name.value,i=parseInt(s.x.value,10),a=parseInt(s.y.value,10),l=parseInt(s.width.value,10),u=parseInt(s.height.value,10);if(n=t.add(o,d,i,a,l,u),s.frameX){var f=Math.abs(parseInt(s.frameX.value,10)),v=Math.abs(parseInt(s.frameY.value,10)),m=parseInt(s.frameWidth.value,10),g=parseInt(s.frameHeight.value,10);n.setTrim(l,u,f,v,m,g)}}return t};p.exports=S},72893:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=t.source[d];return t.add("__BASE",d,0,0,c.width,c.height),t};p.exports=S},4832:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=t.source[d];return t.add("__BASE",d,0,0,c.width,c.height),t};p.exports=S},78566:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(41786),c=function(h,r,n){if(!n.frames&&!n.textures){console.warn("Invalid Texture Atlas JSON Array");return}var e=h.source[r];h.add("__BASE",r,0,0,e.width,e.height);for(var s=Array.isArray(n.textures)?n.textures[r].frames:n.frames,o,i=0;i<s.length;i++){var a=s[i];if(o=h.add(a.filename,r,a.frame.x,a.frame.y,a.frame.w,a.frame.h),!o){console.warn("Invalid atlas json, frame already exists: "+a.filename);continue}a.trimmed&&o.setTrim(a.sourceSize.w,a.sourceSize.h,a.spriteSourceSize.x,a.spriteSourceSize.y,a.spriteSourceSize.w,a.spriteSourceSize.h),a.rotated&&(o.rotated=!0,o.updateUVsInverted());var l=a.anchor||a.pivot;l&&(o.customPivot=!0,o.pivotX=l.x,o.pivotY=l.y),a.scale9Borders&&o.setScale9(a.scale9Borders.x,a.scale9Borders.y,a.scale9Borders.w,a.scale9Borders.h),o.customData=d(a)}for(var u in n)u!=="frames"&&(Array.isArray(n[u])?h.customData[u]=n[u].slice(0):h.customData[u]=n[u]);return h};p.exports=c},39711:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(41786),c=function(h,r,n){if(!n.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var e=h.source[r];h.add("__BASE",r,0,0,e.width,e.height);var s=n.frames,o;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];if(o=h.add(i,r,a.frame.x,a.frame.y,a.frame.w,a.frame.h),!o){console.warn("Invalid atlas json, frame already exists: "+i);continue}a.trimmed&&o.setTrim(a.sourceSize.w,a.sourceSize.h,a.spriteSourceSize.x,a.spriteSourceSize.y,a.spriteSourceSize.w,a.spriteSourceSize.h),a.rotated&&(o.rotated=!0,o.updateUVsInverted());var l=a.anchor||a.pivot;l&&(o.customPivot=!0,o.pivotX=l.x,o.pivotY=l.y),a.scale9Borders&&o.setScale9(a.scale9Borders.x,a.scale9Borders.y,a.scale9Borders.w,a.scale9Borders.h),o.customData=d(a)}for(var u in n)u!=="frames"&&(Array.isArray(n[u])?h.customData[u]=n[u].slice(0):h.customData[u]=n[u]);return h};p.exports=c},31403:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2021 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d=[171,75,84,88,32,49,49,187,13,10,26,10],c,h=new Uint8Array(t,0,12);for(c=0;c<h.length;c++)if(h[c]!==d[c]){console.warn("KTXParser - Invalid file format");return}var r=Uint32Array.BYTES_PER_ELEMENT,n=new DataView(t,12,13*r),e=n.getUint32(0,!0)===67305985,s=n.getUint32(1*r,e);if(s!==0){console.warn("KTXParser - Only compressed formats supported");return}var o=n.getUint32(4*r,e),i=n.getUint32(6*r,e),a=n.getUint32(7*r,e),l=Math.max(1,n.getUint32(11*r,e)),u=n.getUint32(12*r,e),f=new Array(l),v=12+13*4+u,m=i,g=a;for(c=0;c<l;c++){var x=new Int32Array(t,v,1)[0];v+=4,f[c]={data:new Uint8Array(t,v,x),width:m,height:g},m=Math.max(1,m>>1),g=Math.max(1,g>>1),v+=x}return{mipmaps:f,width:i,height:a,internalFormat:o,compressed:!0,generateMipmap:!1}};p.exports=S},82038:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2021 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/function S(C,E,M,P,A,R,F){return F===void 0&&(F=16),Math.floor((C+M)/A)*Math.floor((E+P)/R)*F}function t(C,E){return C=Math.max(C,16),E=Math.max(E,8),C*E/4}function d(C,E){return C=Math.max(C,8),E=Math.max(E,8),C*E/2}function c(C,E){return Math.ceil(C/4)*Math.ceil(E/4)*16}function h(C,E){return S(C,E,3,3,4,4,8)}function r(C,E){return S(C,E,3,3,4,4)}function n(C,E){return S(C,E,4,3,5,4)}function e(C,E){return S(C,E,4,4,5,5)}function s(C,E){return S(C,E,5,4,6,5)}function o(C,E){return S(C,E,5,5,6,6)}function i(C,E){return S(C,E,7,4,8,5)}function a(C,E){return S(C,E,7,5,8,6)}function l(C,E){return S(C,E,7,7,8,8)}function u(C,E){return S(C,E,9,4,10,5)}function f(C,E){return S(C,E,9,5,10,6)}function v(C,E){return S(C,E,9,7,10,8)}function m(C,E){return S(C,E,9,9,10,10)}function g(C,E){return S(C,E,11,9,12,10)}function x(C,E){return S(C,E,11,11,12,12)}var y={0:{sizeFunc:t,glFormat:[35841]},1:{sizeFunc:t,glFormat:[35843]},2:{sizeFunc:d,glFormat:[35840]},3:{sizeFunc:d,glFormat:[35842]},6:{sizeFunc:h,glFormat:[36196]},7:{sizeFunc:h,glFormat:[33776,35916]},8:{sizeFunc:r,glFormat:[33777,35917]},9:{sizeFunc:r,glFormat:[33778,35918]},11:{sizeFunc:r,glFormat:[33779,35919]},14:{sizeFunc:c,glFormat:[36494,36495]},15:{sizeFunc:c,glFormat:[36492,36493]},22:{sizeFunc:h,glFormat:[37492,37493]},23:{sizeFunc:r,glFormat:[37496,37497]},24:{sizeFunc:h,glFormat:[37494,37495]},25:{sizeFunc:h,glFormat:[37488]},26:{sizeFunc:r,glFormat:[37490]},27:{sizeFunc:r,glFormat:[37808,37840]},28:{sizeFunc:n,glFormat:[37809,37841]},29:{sizeFunc:e,glFormat:[37810,37842]},30:{sizeFunc:s,glFormat:[37811,37843]},31:{sizeFunc:o,glFormat:[37812,37844]},32:{sizeFunc:i,glFormat:[37813,37845]},33:{sizeFunc:a,glFormat:[37814,37846]},34:{sizeFunc:l,glFormat:[37815,37847]},35:{sizeFunc:u,glFormat:[37816,37848]},36:{sizeFunc:f,glFormat:[37817,37849]},37:{sizeFunc:v,glFormat:[37818,37850]},38:{sizeFunc:m,glFormat:[37819,37851]},39:{sizeFunc:g,glFormat:[37820,37852]},40:{sizeFunc:x,glFormat:[37821,37853]}},T=function(C){for(var E=new Uint32Array(C,0,13),M=E[0],P=M===55727696,A=P?E[2]:E[3],R=E[4],F=y[A].glFormat[R],w=y[A].sizeFunc,B=E[11],N=E[7],U=E[6],D=52+E[12],I=new Uint8Array(C,D),O=new Array(B),L=0,G=N,z=U,X=0;X<B;X++){var V=w(G,z);O[X]={data:new Uint8Array(I.buffer,I.byteOffset+L,V),width:G,height:z},G=Math.max(1,G>>1),z=Math.max(1,z>>1),L+=V}return{mipmaps:O,width:N,height:U,internalFormat:F,compressed:!0,generateMipmap:!1}};p.exports=T},75549:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(95540),c=function(h,r,n,e,s,o,i){var a=d(i,"frameWidth",null),l=d(i,"frameHeight",a);if(a===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=h.source[r];h.add("__BASE",r,0,0,u.width,u.height);var f=d(i,"startFrame",0),v=d(i,"endFrame",-1),m=d(i,"margin",0),g=d(i,"spacing",0),x=Math.floor((s-m+g)/(a+g)),y=Math.floor((o-m+g)/(l+g)),T=x*y;T===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",h.key),(f>T||f<-T)&&(f=0),f<0&&(f=T+f),(v===-1||v>T||v<f)&&(v=T);for(var C=m,E=m,M=0,P=0,A=0,R=0;R<T;R++){M=0,P=0;var F=C+a,w=E+l;F>s&&(M=F-s),w>o&&(P=w-o),R>=f&&R<=v&&(h.add(A,r,n+C,e+E,a-M,l-P),A++),C+=a+g,C+a>s&&(C=m,E+=l+g)}return h};p.exports=c},47534:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(95540),c=function(h,r,n){var e=d(n,"frameWidth",null),s=d(n,"frameHeight",e);if(!e)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=h.source[0];h.add("__BASE",0,0,0,o.width,o.height),d(n,"startFrame",0),d(n,"endFrame",-1);for(var i=d(n,"margin",0),a=d(n,"spacing",0),l=r.cutX,u=r.cutY,f=r.cutWidth,v=r.cutHeight,m=r.realWidth,g=r.realHeight,x=Math.floor((m-i+a)/(e+a)),y=Math.floor((g-i+a)/(s+a)),T=r.x,C=e-T,E=e-(m-f-T),M=r.y,P=s-M,A=s-(g-v-M),R,F=i,w=i,B=0,N=0,U=0;U<y;U++){for(var D=U===0,I=U===y-1,O=0;O<x;O++){var L=O===0,G=O===x-1;if(R=h.add(B,N,l+F,u+w,e,s),L||D||G||I){var z=L?T:0,X=D?M:0,V=0,Y=0;L&&(V+=e-C),G&&(V+=e-E),D&&(Y+=s-P),I&&(Y+=s-A);var W=e-V,H=s-Y;R.cutWidth=W,R.cutHeight=H,R.setTrim(e,s,z,X,W,H)}F+=a,L?F+=C:G?F+=E:F+=e,B++}F=i,w+=a,D?w+=P:I?w+=A:w+=s}return h};p.exports=c},86147:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=0,t=function(c,h,r,n){var e=S-n.y-n.height;c.add(r,h,n.x,e,n.width,n.height)},d=function(c,h,r){var n=c.source[h];c.add("__BASE",h,0,0,n.width,n.height),S=n.height;for(var e=r.split(`
`),s=/^[ ]*(- )*(\w+)+[: ]+(.*)/,o="",i="",a={x:0,y:0,width:0,height:0},l=0;l<e.length;l++){var u=e[l].match(s);if(u){var f=u[1]==="- ",v=u[2],m=u[3];if(f&&(i!==o&&(t(c,h,i,a),o=i),a={x:0,y:0,width:0,height:0}),v==="name"){i=m;continue}switch(v){case"x":case"y":case"width":case"height":a[v]=parseInt(m,10);break}}}return i!==o&&t(c,h,i,a),c};p.exports=d},55222:(p,S,t)=>{/**
* @author Ben Richards <benjamindrichards@gmail.com>
* @copyright 2024 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(50030),c=function(o){for(var i=o.mipmaps,a=1;a<i.length;a++){var l=i[a].width,u=i[a].height;if(!d(l,u))return console.warn("Mip level "+a+" is not a power-of-two size: "+l+"x"+u),!1}var f=s[o.internalFormat];return f?f(o):(console.warn("No format checker found for internal format "+o.internalFormat+". Assuming valid."),!0)};function h(o){for(var i=o.mipmaps,a=0;a<i.length;a++){var l=i[a].width,u=i[a].height;if((l<<a)%4!==0||(u<<a)%4!==0)return console.warn("BPTC, RGTC, and S3TC dimensions must be a multiple of 4 pixels, and each successive mip level must be half the size of the previous level, rounded down. Mip level "+a+" is "+l+"x"+u),!1}return!0}function r(){return!0}function n(o){var i=o.mipmaps,a=i[0];return d(a.width,a.height)?!0:(console.warn("PVRTC base dimensions must be power of two. Base level is "+a.width+"x"+a.height),!1)}function e(o){var i=o.mipmaps,a=i[0];return a.width%4!==0||a.height%4!==0?(console.warn("S3TC SRGB base dimensions must be a multiple of 4 pixels. Base level is "+a.width+"x"+a.height+" pixels"),!1):!0}var s={37488:r,37489:r,37490:r,37491:r,37492:r,37493:r,37494:r,37495:r,37496:r,37497:r,36196:r,37808:r,37809:r,37810:r,37811:r,37812:r,37813:r,37814:r,37815:r,37816:r,37817:r,37818:r,37819:r,37820:r,37821:r,37840:r,37841:r,37842:r,37843:r,37844:r,37845:r,37846:r,37847:r,37848:r,37849:r,37850:r,37851:r,37852:r,37853:r,36492:h,36493:h,36494:h,36495:h,36283:h,36284:h,36285:h,36286:h,35840:n,35841:n,35842:n,35843:n,33776:h,33777:h,33778:h,33779:h,35916:e,35917:e,35918:e,35919:e};p.exports=c},61309:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={AtlasXML:t(89905),Canvas:t(72893),Image:t(4832),JSONArray:t(78566),JSONHash:t(39711),KTXParser:t(31403),PVRParser:t(82038),SpriteSheet:t(75549),SpriteSheetFromAtlas:t(47534),UnityYAML:t(86147)}},80341:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r,n,e,s,o,i,a){(e===void 0||e<=0)&&(e=32),(s===void 0||s<=0)&&(s=32),o===void 0&&(o=0),i===void 0&&(i=0),this.name=r,this.firstgid=n|0,this.imageWidth=e|0,this.imageHeight=s|0,this.imageMargin=o|0,this.imageSpacing=i|0,this.properties=a||{},this.images=[],this.total=0},containsImageIndex:function(h){return h>=this.firstgid&&h<this.firstgid+this.total},addImage:function(h,r){return this.images.push({gid:h,image:r}),this.total++,this}});p.exports=c},27462:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2021 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=new d({initialize:function(r){if(this.gids=[],r!==void 0)for(var n=0;n<r.length;++n)for(var e=r[n],s=0;s<e.total;++s)this.gids[e.firstgid+s]=e;this._gids=this.gids},enabled:{get:function(){return!!this.gids},set:function(h){this.gids=h?this._gids:void 0}},getTypeIncludingTile:function(h){if(h.type!==void 0&&h.type!=="")return h.type;if(!(!this.gids||h.gid===void 0)){var r=this.gids[h.gid];if(r){var n=r.getTileData(h.gid);if(n)return n.type}}},setTextureAndFrame:function(h,r,n,e){if(r===null&&this.gids&&e.gid!==void 0){var s=this.gids[e.gid];s&&(r===null&&s.image!==void 0&&(r=s.image.key),n===null&&(n=e.gid-s.firstgid),h.scene.textures.getFrame(r,n)||(r=null,n=null))}h.setTexture(r,n)},setPropertiesFromTiledObject:function(h,r){if(this.gids!==void 0&&r.gid!==void 0){var n=this.gids[r.gid];n!==void 0&&this.setFromJSON(h,n.getTileProperties(r.gid))}this.setFromJSON(h,r.properties)},setFromJSON:function(h,r){if(r){if(Array.isArray(r)){for(var n=0;n<r.length;n++){var e=r[n];h[e.name]!==void 0?h[e.name]=e.value:h.setData(e.name,e.value)}return}for(var s in r)h[s]!==void 0?h[s]=r[s]:h.setData(s,r[s])}}});p.exports=c},31989:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(80341),c=t(87010),h=t(46177),r=t(49075),n=function(e,s,o,i,a,l,u,f){o===void 0&&(o=32),i===void 0&&(i=32),a===void 0&&(a=10),l===void 0&&(l=10),f===void 0&&(f=!1);var v=null;if(Array.isArray(u)){var m=s!==void 0?s:"map";v=h(m,d.ARRAY_2D,u,o,i,f)}else if(s!==void 0){var g=e.cache.tilemap.get(s);g?v=h(s,g.format,g.data,o,i,f):console.warn("No map data found for key "+s)}return v===null&&(v=new c({tileWidth:o,tileHeight:i,width:a,height:l})),new r(e,v)};p.exports=n},23029:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(31401),h=t(91907),r=t(62644),n=t(93232),e=new d({Mixins:[c.AlphaSingle,c.Flip,c.Visible],initialize:function(o,i,a,l,u,f,v,m){this.layer=o,this.index=i,this.x=a,this.y=l,this.width=u,this.height=f,this.right,this.bottom,this.baseWidth=v!==void 0?v:u,this.baseHeight=m!==void 0?m:f,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.tintFill=!1,this.physics={}},containsPoint:function(s,o){return!(s<this.pixelX||o<this.pixelY||s>this.right||o>this.bottom)},copy:function(s){return this.index=s.index,this.alpha=s.alpha,this.properties=r(s.properties),this.visible=s.visible,this.setFlip(s.flipX,s.flipY),this.tint=s.tint,this.rotation=s.rotation,this.collideUp=s.collideUp,this.collideDown=s.collideDown,this.collideLeft=s.collideLeft,this.collideRight=s.collideRight,this.collisionCallback=s.collisionCallback,this.collisionCallbackContext=s.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(s){var o=this.tilemapLayer;if(o){var i=o.tileToWorldXY(this.x,this.y,void 0,s);return i.x}return this.x*this.baseWidth},getRight:function(s){var o=this.tilemapLayer;return o?this.getLeft(s)+this.width*o.scaleX:this.getLeft(s)+this.width},getTop:function(s){var o=this.tilemapLayer;if(o){var i=o.tileToWorldXY(this.x,this.y,void 0,s);return i.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(s){var o=this.tilemapLayer;return o?this.getTop(s)+this.height*o.scaleY:this.getTop(s)+this.height},getBounds:function(s,o){return o===void 0&&(o=new n),o.x=this.getLeft(s),o.y=this.getTop(s),o.width=this.getRight(s)-o.x,o.height=this.getBottom(s)-o.y,o},getCenterX:function(s){return(this.getLeft(s)+this.getRight(s))/2},getCenterY:function(s){return(this.getTop(s)+this.getBottom(s))/2},intersects:function(s,o,i,a){return!(i<=this.pixelX||a<=this.pixelY||s>=this.right||o>=this.bottom)},isInteresting:function(s,o){return s&&o?this.canCollide||this.hasInterestingFace:s?this.collides:o?this.hasInterestingFace:!1},resetCollision:function(s){if(s===void 0&&(s=!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,s){var o=this.tilemapLayer;o&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(s,o,i,a,l){if(o===void 0&&(o=s),i===void 0&&(i=s),a===void 0&&(a=s),l===void 0&&(l=!0),this.collideLeft=s,this.collideRight=o,this.collideUp=i,this.collideDown=a,this.faceLeft=s,this.faceRight=o,this.faceTop=i,this.faceBottom=a,l){var u=this.tilemapLayer;u&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(s,o){return s===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=s,this.collisionCallbackContext=o),this},setSize:function(s,o,i,a){return s!==void 0&&(this.width=s),o!==void 0&&(this.height=o),i!==void 0&&(this.baseWidth=i),a!==void 0&&(this.baseHeight=a),this.updatePixelXY(),this},updatePixelXY:function(){var s=this.layer.orientation;if(s===h.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(s===h.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(s===h.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(s===h.HEXAGONAL){var o=this.layer.staggerAxis,i=this.layer.staggerIndex,a=this.layer.hexSideLength,l,u;o==="y"?(u=(this.baseHeight-a)/2+a,i==="odd"?this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.pixelX=this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*u):o==="x"&&(l=(this.baseWidth-a)/2+a,this.pixelX=this.x*l,i==="odd"?this.pixelY=this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.pixelY=this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback!==void 0}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var s=this.layer.tilemapLayer;if(s){var o=s.gidMap[this.index];if(o)return o}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var s=this.tilemapLayer;return s?s.tilemap:null}}});p.exports=e},49075:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(84101),c=t(83419),h=t(39506),r=t(80341),n=t(95540),e=t(14977),s=t(27462),o=t(91907),i=t(36305),a=t(19133),l=t(68287),u=t(23029),f=t(81086),v=t(20442),m=t(33629),g=new c({initialize:function(y,T){this.scene=y,this.tileWidth=T.tileWidth,this.tileHeight=T.tileHeight,this.width=T.width,this.height=T.height,this.orientation=T.orientation,this.renderOrder=T.renderOrder,this.format=T.format,this.version=T.version,this.properties=T.properties,this.widthInPixels=T.widthInPixels,this.heightInPixels=T.heightInPixels,this.imageCollections=T.imageCollections,this.images=T.images,this.layers=T.layers,this.tiles=T.tiles,this.tilesets=T.tilesets,this.objects=T.objects,this.currentLayerIndex=0,this.hexSideLength=T.hexSideLength;var C=this.orientation;this._convert={WorldToTileXY:f.GetWorldToTileXYFunction(C),WorldToTileX:f.GetWorldToTileXFunction(C),WorldToTileY:f.GetWorldToTileYFunction(C),TileToWorldXY:f.GetTileToWorldXYFunction(C),TileToWorldX:f.GetTileToWorldXFunction(C),TileToWorldY:f.GetTileToWorldYFunction(C),GetTileCorners:f.GetTileCornersFunction(C)}},setRenderOrder:function(x){var y=["right-down","left-down","right-up","left-up"];return typeof x=="number"&&(x=y[x]),y.indexOf(x)>-1&&(this.renderOrder=x),this},addTilesetImage:function(x,y,T,C,E,M,P,A){if(x===void 0)return null;y==null&&(y=x);var R=this.scene.sys.textures;if(!R.exists(y))return console.warn('Texture key "%s" not found',y),null;var F=R.get(y),w=this.getTilesetIndex(x);if(w===null&&this.format===r.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',x,this.tilesets),null;var B=this.tilesets[w];return B?((T||C)&&B.setTileSize(T,C),(E||M)&&B.setSpacing(E,M),B.setImage(F),B):(T===void 0&&(T=this.tileWidth),C===void 0&&(C=this.tileHeight),E===void 0&&(E=0),M===void 0&&(M=0),P===void 0&&(P=0),A===void 0&&(A={x:0,y:0}),B=new m(x,P,T,C,E,M,void 0,void 0,A),B.setImage(F),this.tilesets.push(B),this.tiles=d(this),B)},copy:function(x,y,T,C,E,M,P,A){return A=this.getLayer(A),A!==null?(f.Copy(x,y,T,C,E,M,P,A),this):null},createBlankLayer:function(x,y,T,C,E,M,P,A){T===void 0&&(T=0),C===void 0&&(C=0),E===void 0&&(E=this.width),M===void 0&&(M=this.height),P===void 0&&(P=this.tileWidth),A===void 0&&(A=this.tileHeight);var R=this.getLayerIndex(x);if(R!==null)return console.warn("Invalid Tilemap Layer ID: "+x),null;for(var F=new e({name:x,tileWidth:P,tileHeight:A,width:E,height:M,orientation:this.orientation}),w,B=0;B<M;B++){w=[];for(var N=0;N<E;N++)w.push(new u(F,-1,N,B,P,A,this.tileWidth,this.tileHeight));F.data.push(w)}this.layers.push(F),this.currentLayerIndex=this.layers.length-1;var U=new v(this.scene,this,this.currentLayerIndex,y,T,C);return U.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(U),U},createLayer:function(x,y,T,C){var E=this.getLayerIndex(x);if(E===null)return console.warn("Invalid Tilemap Layer ID: "+x),typeof x=="string"&&console.warn("Valid tilelayer names: %o",this.getTileLayerNames()),null;var M=this.layers[E];if(M.tilemapLayer)return console.warn("Tilemap Layer ID already exists:"+x),null;this.currentLayerIndex=E,T===void 0&&(T=M.x),C===void 0&&(C=M.y);var P=new v(this.scene,this,E,y,T,C);return P.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(P),P},createFromObjects:function(x,y,T){T===void 0&&(T=!0);var C=[],E=this.getObjectLayer(x);if(!E)return console.warn("createFromObjects: Invalid objectLayerName given: "+x),C;var M=new s(T?this.tilesets:void 0);Array.isArray(y)||(y=[y]);for(var P=E.objects,A=0;A<y.length;A++){var R=y[A],F=n(R,"id",null),w=n(R,"gid",null),B=n(R,"name",null),N=n(R,"type",null);M.enabled=!n(R,"ignoreTileset",null);for(var U,D=[],I=0;I<P.length;I++)U=P[I],(F===null&&w===null&&B===null&&N===null||F!==null&&U.id===F||w!==null&&U.gid===w||B!==null&&U.name===B||N!==null&&M.getTypeIncludingTile(U)===N)&&D.push(U);for(var O=n(R,"classType",l),L=n(R,"scene",this.scene),G=n(R,"container",null),z=n(R,"key",null),X=n(R,"frame",null),V=0;V<D.length;V++){U=D[V];var Y=new O(L);if(Y.setName(U.name),Y.setPosition(U.x,U.y),M.setTextureAndFrame(Y,z,X,U),U.width&&(Y.displayWidth=U.width),U.height&&(Y.displayHeight=U.height),this.orientation===o.ISOMETRIC){var W=this.tileWidth/this.tileHeight,H={x:Y.x-Y.y,y:(Y.x+Y.y)/W};Y.x=H.x,Y.y=H.y}var b={x:Y.originX*U.width,y:(Y.originY-(U.gid?1:0))*U.height};if(U.rotation){var K=h(U.rotation);i(b,K),Y.rotation=K}Y.x+=b.x,Y.y+=b.y,(U.flippedHorizontal!==void 0||U.flippedVertical!==void 0)&&Y.setFlip(U.flippedHorizontal,U.flippedVertical),U.visible||(Y.visible=!1),M.setPropertiesFromTiledObject(Y,U),G?G.add(Y):L.add.existing(Y),C.push(Y)}}return C},createFromTiles:function(x,y,T,C,E,M){return M=this.getLayer(M),M===null?null:f.CreateFromTiles(x,y,T,C,E,M)},fill:function(x,y,T,C,E,M,P){return M===void 0&&(M=!0),P=this.getLayer(P),P===null?null:(f.Fill(x,y,T,C,E,M,P),this)},filterObjects:function(x,y,T){if(typeof x=="string"){var C=x;if(x=this.getObjectLayer(x),!x)return console.warn("No object layer found with the name: "+C),null}return x.objects.filter(y,T)},filterTiles:function(x,y,T,C,E,M,P,A){return A=this.getLayer(A),A===null?null:f.FilterTiles(x,y,T,C,E,M,P,A)},findByIndex:function(x,y,T,C){return C=this.getLayer(C),C===null?null:f.FindByIndex(x,y,T,C)},findObject:function(x,y,T){if(typeof x=="string"){var C=x;if(x=this.getObjectLayer(x),!x)return console.warn("No object layer found with the name: "+C),null}return x.objects.find(y,T)||null},findTile:function(x,y,T,C,E,M,P,A){return A=this.getLayer(A),A===null?null:f.FindTile(x,y,T,C,E,M,P,A)},forEachTile:function(x,y,T,C,E,M,P,A){return A=this.getLayer(A),A===null?null:(f.ForEachTile(x,y,T,C,E,M,P,A),this)},getImageIndex:function(x){return this.getIndex(this.images,x)},getImageLayerNames:function(){return!this.images||!Array.isArray(this.images)?[]:this.images.map(function(x){return x.name})},getIndex:function(x,y){for(var T=0;T<x.length;T++)if(x[T].name===y)return T;return null},getLayer:function(x){var y=this.getLayerIndex(x);return y!==null?this.layers[y]:null},getObjectLayer:function(x){var y=this.getIndex(this.objects,x);return y!==null?this.objects[y]:null},getObjectLayerNames:function(){return!this.objects||!Array.isArray(this.objects)?[]:this.objects.map(function(x){return x.name})},getLayerIndex:function(x){return x===void 0?this.currentLayerIndex:typeof x=="string"?this.getLayerIndexByName(x):typeof x=="number"&&x<this.layers.length?x:x instanceof v&&x.tilemap===this?x.layerIndex:null},getLayerIndexByName:function(x){return this.getIndex(this.layers,x)},getTileAt:function(x,y,T,C){return C=this.getLayer(C),C===null?null:f.GetTileAt(x,y,T,C)},getTileAtWorldXY:function(x,y,T,C,E){return E=this.getLayer(E),E===null?null:f.GetTileAtWorldXY(x,y,T,C,E)},getTileLayerNames:function(){return!this.layers||!Array.isArray(this.layers)?[]:this.layers.map(function(x){return x.name})},getTilesWithin:function(x,y,T,C,E,M){return M=this.getLayer(M),M===null?null:f.GetTilesWithin(x,y,T,C,E,M)},getTilesWithinShape:function(x,y,T,C){return C=this.getLayer(C),C===null?null:f.GetTilesWithinShape(x,y,T,C)},getTilesWithinWorldXY:function(x,y,T,C,E,M,P){return P=this.getLayer(P),P===null?null:f.GetTilesWithinWorldXY(x,y,T,C,E,M,P)},getTileset:function(x){var y=this.getIndex(this.tilesets,x);return y!==null?this.tilesets[y]:null},getTilesetIndex:function(x){return this.getIndex(this.tilesets,x)},hasTileAt:function(x,y,T){return T=this.getLayer(T),T===null?null:f.HasTileAt(x,y,T)},hasTileAtWorldXY:function(x,y,T,C){return C=this.getLayer(C),C===null?null:f.HasTileAtWorldXY(x,y,T,C)},layer:{get:function(){return this.layers[this.currentLayerIndex]},set:function(x){this.setLayer(x)}},putTileAt:function(x,y,T,C,E){return C===void 0&&(C=!0),E=this.getLayer(E),E===null?null:f.PutTileAt(x,y,T,C,E)},putTileAtWorldXY:function(x,y,T,C,E,M){return C===void 0&&(C=!0),M=this.getLayer(M),M===null?null:f.PutTileAtWorldXY(x,y,T,C,E,M)},putTilesAt:function(x,y,T,C,E){return C===void 0&&(C=!0),E=this.getLayer(E),E===null?null:(f.PutTilesAt(x,y,T,C,E),this)},randomize:function(x,y,T,C,E,M){return M=this.getLayer(M),M===null?null:(f.Randomize(x,y,T,C,E,M),this)},calculateFacesAt:function(x,y,T){return T=this.getLayer(T),T===null?null:(f.CalculateFacesAt(x,y,T),this)},calculateFacesWithin:function(x,y,T,C,E){return E=this.getLayer(E),E===null?null:(f.CalculateFacesWithin(x,y,T,C,E),this)},removeLayer:function(x){var y=this.getLayerIndex(x);if(y!==null){a(this.layers,y);for(var T=y;T<this.layers.length;T++)this.layers[T].tilemapLayer&&this.layers[T].tilemapLayer.layerIndex--;return this.currentLayerIndex===y&&(this.currentLayerIndex=0),this}else return null},destroyLayer:function(x){var y=this.getLayerIndex(x);return y!==null?(x=this.layers[y],x.tilemapLayer.destroy(),a(this.layers,y),this.currentLayerIndex===y&&(this.currentLayerIndex=0),this):null},removeAllLayers:function(){for(var x=this.layers,y=0;y<x.length;y++)x[y].tilemapLayer&&x[y].tilemapLayer.destroy(!1);return x.length=0,this.currentLayerIndex=0,this},removeTile:function(x,y,T){y===void 0&&(y=-1),T===void 0&&(T=!0);var C=[];Array.isArray(x)||(x=[x]);for(var E=0;E<x.length;E++){var M=x[E];C.push(this.removeTileAt(M.x,M.y,!0,T,M.tilemapLayer)),y>-1&&this.putTileAt(y,M.x,M.y,T,M.tilemapLayer)}return C},removeTileAt:function(x,y,T,C,E){return T===void 0&&(T=!0),C===void 0&&(C=!0),E=this.getLayer(E),E===null?null:f.RemoveTileAt(x,y,T,C,E)},removeTileAtWorldXY:function(x,y,T,C,E,M){return T===void 0&&(T=!0),C===void 0&&(C=!0),M=this.getLayer(M),M===null?null:f.RemoveTileAtWorldXY(x,y,T,C,E,M)},renderDebug:function(x,y,T){return T=this.getLayer(T),T===null?null:(this.orientation===o.ORTHOGONAL&&f.RenderDebug(x,y,T),this)},renderDebugFull:function(x,y){for(var T=this.layers,C=0;C<T.length;C++)f.RenderDebug(x,y,T[C]);return this},replaceByIndex:function(x,y,T,C,E,M,P){return P=this.getLayer(P),P===null?null:(f.ReplaceByIndex(x,y,T,C,E,M,P),this)},setCollision:function(x,y,T,C,E){return y===void 0&&(y=!0),T===void 0&&(T=!0),E===void 0&&(E=!0),C=this.getLayer(C),C===null?null:(f.SetCollision(x,y,T,C,E),this)},setCollisionBetween:function(x,y,T,C,E){return T===void 0&&(T=!0),C===void 0&&(C=!0),E=this.getLayer(E),E===null?null:(f.SetCollisionBetween(x,y,T,C,E),this)},setCollisionByProperty:function(x,y,T,C){return y===void 0&&(y=!0),T===void 0&&(T=!0),C=this.getLayer(C),C===null?null:(f.SetCollisionByProperty(x,y,T,C),this)},setCollisionByExclusion:function(x,y,T,C){return y===void 0&&(y=!0),T===void 0&&(T=!0),C=this.getLayer(C),C===null?null:(f.SetCollisionByExclusion(x,y,T,C),this)},setCollisionFromCollisionGroup:function(x,y,T){return x===void 0&&(x=!0),y===void 0&&(y=!0),T=this.getLayer(T),T===null?null:(f.SetCollisionFromCollisionGroup(x,y,T),this)},setTileIndexCallback:function(x,y,T,C){return C=this.getLayer(C),C===null?null:(f.SetTileIndexCallback(x,y,T,C),this)},setTileLocationCallback:function(x,y,T,C,E,M,P){return P=this.getLayer(P),P===null?null:(f.SetTileLocationCallback(x,y,T,C,E,M,P),this)},setLayer:function(x){var y=this.getLayerIndex(x);return y!==null&&(this.currentLayerIndex=y),this},setBaseTileSize:function(x,y){this.tileWidth=x,this.tileHeight=y,this.widthInPixels=this.width*x,this.heightInPixels=this.height*y;for(var T=0;T<this.layers.length;T++){this.layers[T].baseTileWidth=x,this.layers[T].baseTileHeight=y;for(var C=this.layers[T].data,E=this.layers[T].width,M=this.layers[T].height,P=0;P<M;P++)for(var A=0;A<E;A++){var R=C[P][A];R!==null&&R.setSize(void 0,void 0,x,y)}}return this},setLayerTileSize:function(x,y,T){if(T=this.getLayer(T),T===null)return this;T.tileWidth=x,T.tileHeight=y;for(var C=T.data,E=T.width,M=T.height,P=0;P<M;P++)for(var A=0;A<E;A++){var R=C[P][A];R!==null&&R.setSize(x,y)}return this},shuffle:function(x,y,T,C,E){return E=this.getLayer(E),E===null?null:(f.Shuffle(x,y,T,C,E),this)},swapByIndex:function(x,y,T,C,E,M,P){return P=this.getLayer(P),P===null?null:(f.SwapByIndex(x,y,T,C,E,M,P),this)},tileToWorldX:function(x,y,T){return T=this.getLayer(T),T===null?null:this._convert.TileToWorldX(x,y,T)},tileToWorldY:function(x,y,T){return T=this.getLayer(T),T===null?null:this._convert.TileToWorldY(x,y,T)},tileToWorldXY:function(x,y,T,C,E){return E=this.getLayer(E),E===null?null:this._convert.TileToWorldXY(x,y,T,C,E)},getTileCorners:function(x,y,T,C){return C=this.getLayer(C),C===null?null:this._convert.GetTileCorners(x,y,T,C)},weightedRandomize:function(x,y,T,C,E,M){return M=this.getLayer(M),M===null?null:(f.WeightedRandomize(y,T,C,E,x,M),this)},worldToTileX:function(x,y,T,C){return C=this.getLayer(C),C===null?null:this._convert.WorldToTileX(x,y,T,C)},worldToTileY:function(x,y,T,C){return C=this.getLayer(C),C===null?null:this._convert.WorldToTileY(x,y,T,C)},worldToTileXY:function(x,y,T,C,E,M){return M=this.getLayer(M),M===null?null:this._convert.WorldToTileXY(x,y,T,C,E,M)},destroy:function(){this.removeAllLayers(),this.tiles.length=0,this.tilesets.length=0,this.objects.length=0,this.scene=null}});p.exports=g},45939:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(44603),c=t(31989);d.register("tilemap",function(h){var r=h!==void 0?h:{};return c(this.scene,r.key,r.tileWidth,r.tileHeight,r.width,r.height,r.data,r.insertNull)})},46029:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(39429),c=t(31989);d.register("tilemap",function(h,r,n,e,s,o,i){return h===null&&(h=void 0),r===null&&(r=void 0),n===null&&(n=void 0),e===null&&(e=void 0),s===null&&(s=void 0),c(this.scene,h,r,n,e,s,o,i)})},20442:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(78389),h=t(31401),r=t(95643),n=t(81086),e=t(19218),s=t(26099),o=new d({Extends:r,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.Transform,h.Visible,h.ScrollFactor,c,e],initialize:function(a,l,u,f,v,m){r.call(this,a,"TilemapLayer"),this.isTilemap=!0,this.tilemap=l,this.layerIndex=u,this.layer=l.layers[u],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=n.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new s,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(f),this.setAlpha(this.layer.alpha),this.setPosition(v,m),this.setOrigin(0,0),this.setSize(l.tileWidth*this.layer.width,l.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(i){var a=[],l=[],u=this.tilemap;Array.isArray(i)||(i=[i]);for(var f=0;f<i.length;f++){var v=i[f];if(typeof v=="string"&&(v=u.getTileset(v)),v){l.push(v);for(var m=v.firstgid,g=0;g<v.total;g++)a[m+g]=v}}this.gidMap=a,this.tileset=l},setRenderOrder:function(i){var a=["right-down","left-down","right-up","left-up"];return typeof i=="string"&&(i=a.indexOf(i)),i>=0&&i<4&&(this._renderOrder=i),this},calculateFacesAt:function(i,a){return n.CalculateFacesAt(i,a,this.layer),this},calculateFacesWithin:function(i,a,l,u){return n.CalculateFacesWithin(i,a,l,u,this.layer),this},createFromTiles:function(i,a,l,u,f){return n.CreateFromTiles(i,a,l,u,f,this.layer)},cull:function(i){return this.cullCallback(this.layer,i,this.culledTiles,this._renderOrder)},copy:function(i,a,l,u,f,v,m){return n.Copy(i,a,l,u,f,v,m,this.layer),this},fill:function(i,a,l,u,f,v){return n.Fill(i,a,l,u,f,v,this.layer),this},filterTiles:function(i,a,l,u,f,v,m){return n.FilterTiles(i,a,l,u,f,v,m,this.layer)},findByIndex:function(i,a,l){return n.FindByIndex(i,a,l,this.layer)},findTile:function(i,a,l,u,f,v,m){return n.FindTile(i,a,l,u,f,v,m,this.layer)},forEachTile:function(i,a,l,u,f,v,m){return n.ForEachTile(i,a,l,u,f,v,m,this.layer),this},setTint:function(i,a,l,u,f,v){i===void 0&&(i=16777215);var m=function(g){g.tint=i,g.tintFill=!1};return this.forEachTile(m,this,a,l,u,f,v)},setTintFill:function(i,a,l,u,f,v){i===void 0&&(i=16777215);var m=function(g){g.tint=i,g.tintFill=!0};return this.forEachTile(m,this,a,l,u,f,v)},getTileAt:function(i,a,l){return n.GetTileAt(i,a,l,this.layer)},getTileAtWorldXY:function(i,a,l,u){return n.GetTileAtWorldXY(i,a,l,u,this.layer)},getIsoTileAtWorldXY:function(i,a,l,u,f){l===void 0&&(l=!0);var v=this.tempVec;return n.IsometricWorldToTileXY(i,a,!0,v,f,this.layer,l),this.getTileAt(v.x,v.y,u)},getTilesWithin:function(i,a,l,u,f){return n.GetTilesWithin(i,a,l,u,f,this.layer)},getTilesWithinShape:function(i,a,l){return n.GetTilesWithinShape(i,a,l,this.layer)},getTilesWithinWorldXY:function(i,a,l,u,f,v){return n.GetTilesWithinWorldXY(i,a,l,u,f,v,this.layer)},hasTileAt:function(i,a){return n.HasTileAt(i,a,this.layer)},hasTileAtWorldXY:function(i,a,l){return n.HasTileAtWorldXY(i,a,l,this.layer)},putTileAt:function(i,a,l,u){return n.PutTileAt(i,a,l,u,this.layer)},putTileAtWorldXY:function(i,a,l,u,f){return n.PutTileAtWorldXY(i,a,l,u,f,this.layer)},putTilesAt:function(i,a,l,u){return n.PutTilesAt(i,a,l,u,this.layer),this},randomize:function(i,a,l,u,f){return n.Randomize(i,a,l,u,f,this.layer),this},removeTileAt:function(i,a,l,u){return n.RemoveTileAt(i,a,l,u,this.layer)},removeTileAtWorldXY:function(i,a,l,u,f){return n.RemoveTileAtWorldXY(i,a,l,u,f,this.layer)},renderDebug:function(i,a){return n.RenderDebug(i,a,this.layer),this},replaceByIndex:function(i,a,l,u,f,v){return n.ReplaceByIndex(i,a,l,u,f,v,this.layer),this},setSkipCull:function(i){return i===void 0&&(i=!0),this.skipCull=i,this},setCullPadding:function(i,a){return i===void 0&&(i=1),a===void 0&&(a=1),this.cullPaddingX=i,this.cullPaddingY=a,this},setCollision:function(i,a,l,u){return n.SetCollision(i,a,l,this.layer,u),this},setCollisionBetween:function(i,a,l,u){return n.SetCollisionBetween(i,a,l,u,this.layer),this},setCollisionByProperty:function(i,a,l){return n.SetCollisionByProperty(i,a,l,this.layer),this},setCollisionByExclusion:function(i,a,l){return n.SetCollisionByExclusion(i,a,l,this.layer),this},setCollisionFromCollisionGroup:function(i,a){return n.SetCollisionFromCollisionGroup(i,a,this.layer),this},setTileIndexCallback:function(i,a,l){return n.SetTileIndexCallback(i,a,l,this.layer),this},setTileLocationCallback:function(i,a,l,u,f,v){return n.SetTileLocationCallback(i,a,l,u,f,v,this.layer),this},shuffle:function(i,a,l,u){return n.Shuffle(i,a,l,u,this.layer),this},swapByIndex:function(i,a,l,u,f,v){return n.SwapByIndex(i,a,l,u,f,v,this.layer),this},tileToWorldX:function(i,a){return this.tilemap.tileToWorldX(i,a,this)},tileToWorldY:function(i,a){return this.tilemap.tileToWorldY(i,a,this)},tileToWorldXY:function(i,a,l,u){return this.tilemap.tileToWorldXY(i,a,l,u,this)},getTileCorners:function(i,a,l){return this.tilemap.getTileCorners(i,a,l,this)},weightedRandomize:function(i,a,l,u,f){return n.WeightedRandomize(a,l,u,f,i,this.layer),this},worldToTileX:function(i,a,l){return this.tilemap.worldToTileX(i,a,l,this)},worldToTileY:function(i,a,l){return this.tilemap.worldToTileY(i,a,l,this)},worldToTileXY:function(i,a,l,u,f){return this.tilemap.worldToTileXY(i,a,l,u,f,this)},destroy:function(i){i===void 0&&(i=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),i&&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))}});p.exports=o},16153:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(61340),c=new d,h=new d,r=new d,n=function(e,s,o,i){var a=s.cull(o),l=a.length,u=o.alpha*s.alpha;if(!(l===0||u<=0)){var f=c,v=h,m=r;v.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY),f.copyFrom(o.matrix);var g=e.currentContext,x=s.gidMap;g.save(),i?(f.multiplyWithOffset(i,-o.scrollX*s.scrollFactorX,-o.scrollY*s.scrollFactorY),v.e=s.x,v.f=s.y,f.multiply(v,m),m.copyToContext(g)):(v.e-=o.scrollX*s.scrollFactorX,v.f-=o.scrollY*s.scrollFactorY,v.copyToContext(g)),(!e.antialias||s.scaleX>1||s.scaleY>1)&&(g.imageSmoothingEnabled=!1);for(var y=0;y<l;y++){var T=a[y],C=x[T.index];if(C){var E=C.image.getSourceImage(),M=C.getTileTextureCoordinates(T.index),P=C.tileWidth,A=C.tileHeight;if(!(M===null||P===0||A===0)){var R=P*.5,F=A*.5;M.x+=C.tileOffset.x,M.y+=C.tileOffset.y,g.save(),g.translate(T.pixelX+R,T.pixelY+F),T.rotation!==0&&g.rotate(T.rotation),(T.flipX||T.flipY)&&g.scale(T.flipX?-1:1,T.flipY?-1:1),g.globalAlpha=u*T.alpha,g.drawImage(E,M.x,M.y,P,A,-R,-F,P,A),g.restore()}}}g.restore()}};p.exports=n},19218:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(29747),c=d,h=d;c=t(99558),h=t(16153),p.exports={renderWebGL:c,renderCanvas:h}},99558:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(70554),c=function(h,r,n){var e=r.cull(n),s=e.length,o=n.alpha*r.alpha;if(!(s===0||o<=0)){var i=r.gidMap,a=h.pipelines.set(r.pipeline,r),l=d.getTintAppendFloatAlpha,u=r.scrollFactorX,f=r.scrollFactorY,v=r.x,m=r.y,g=r.scaleX,x=r.scaleY;h.pipelines.preBatch(r);for(var y=0;y<s;y++){var T=e[y],C=i[T.index];if(C){var E=C.getTileTextureCoordinates(T.index),M=C.tileWidth,P=C.tileHeight;if(!(!E||M===0||P===0)){var A=M*.5,R=P*.5,F=C.glTexture,w=a.setTexture2D(F,r),B=M,N=P,U=E.x,D=E.y,I=C.tileOffset.x,O=C.tileOffset.y,L=l(T.tint,o*T.alpha);a.batchTexture(r,F,F.width,F.height,v+T.pixelX*g+(A*g-I),m+T.pixelY*x+(R*x-O),M,P,g,x,T.rotation,T.flipX,T.flipY,u,f,A,R,U,D,B,N,L,L,L,L,T.tintFill,0,0,n,null,!0,w,!0)}}}h.pipelines.postBatch(r)}};p.exports=c},33629:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(26099),h=new d({initialize:function(n,e,s,o,i,a,l,u,f){(s===void 0||s<=0)&&(s=32),(o===void 0||o<=0)&&(o=32),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l={}),u===void 0&&(u={}),this.name=n,this.firstgid=e,this.tileWidth=s,this.tileHeight=o,this.tileMargin=i,this.tileSpacing=a,this.tileProperties=l,this.tileData=u,this.tileOffset=new c,f!==void 0&&this.tileOffset.set(f.x,f.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(r){return this.containsTileIndex(r)?this.tileProperties[r-this.firstgid]:null},getTileData:function(r){return this.containsTileIndex(r)?this.tileData[r-this.firstgid]:null},getTileCollisionGroup:function(r){var n=this.getTileData(r);return n&&n.objectgroup?n.objectgroup:null},containsTileIndex:function(r){return r>=this.firstgid&&r<this.firstgid+this.total},getTileTextureCoordinates:function(r){return this.containsTileIndex(r)?this.texCoordinates[r-this.firstgid]:null},setImage:function(r){this.image=r;var n=r.get(),e=r.getFrameBounds();return this.glTexture=n.source.glTexture,n.width>e.width||n.height>e.height?this.updateTileData(n.width,n.height):this.updateTileData(e.width,e.height,e.x,e.y),this},setTileSize:function(r,n){return r!==void 0&&(this.tileWidth=r),n!==void 0&&(this.tileHeight=n),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(r,n){return r!==void 0&&(this.tileMargin=r),n!==void 0&&(this.tileSpacing=n),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=0);var o=(n-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),i=(r-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(o%1!==0||i%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),o=Math.floor(o),i=Math.floor(i),this.rows=o,this.columns=i,this.total=o*i,this.texCoordinates.length=0;for(var a=this.tileMargin+e,l=this.tileMargin+s,u=0;u<this.rows;u++){for(var f=0;f<this.columns;f++)this.texCoordinates.push({x:a,y:l}),a+=this.tileWidth+this.tileSpacing;a=this.tileMargin+e,l+=this.tileHeight+this.tileSpacing}return this}});p.exports=h},72023:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7423),c=function(h,r,n){var e=d(h,r,!0,n),s=d(h,r-1,!0,n),o=d(h,r+1,!0,n),i=d(h-1,r,!0,n),a=d(h+1,r,!0,n),l=e&&e.collides;return l&&(e.faceTop=!0,e.faceBottom=!0,e.faceLeft=!0,e.faceRight=!0),s&&s.collides&&(l&&(e.faceTop=!1),s.faceBottom=!l),o&&o.collides&&(l&&(e.faceBottom=!1),o.faceTop=!l),i&&i.collides&&(l&&(e.faceLeft=!1),i.faceRight=!l),a&&a.collides&&(l&&(e.faceRight=!1),a.faceLeft=!l),e&&!e.collides&&e.resetFaces(),e};p.exports=c},42573:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7423),c=t(7386),h=function(r,n,e,s,o){for(var i=null,a=null,l=null,u=null,f=c(r,n,e,s,null,o),v=0;v<f.length;v++){var m=f[v];m&&(m.collides?(i=d(m.x,m.y-1,!0,o),a=d(m.x,m.y+1,!0,o),l=d(m.x-1,m.y,!0,o),u=d(m.x+1,m.y,!0,o),m.faceTop=!(i&&i.collides),m.faceBottom=!(a&&a.collides),m.faceLeft=!(l&&l.collides),m.faceRight=!(u&&u.collides)):m.resetFaces())}};p.exports=h},33528:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26099),c=new d,h=function(r,n,e,s){var o=e.tilemapLayer,i=o.cullPaddingX,a=o.cullPaddingY,l=o.tilemap.tileToWorldXY(r,n,c,s,o);return l.x>s.worldView.x+o.scaleX*e.tileWidth*(-i-.5)&&l.x<s.worldView.right+o.scaleX*e.tileWidth*(i-.5)&&l.y>s.worldView.y+o.scaleY*e.tileHeight*(-a-1)&&l.y<s.worldView.bottom+o.scaleY*e.tileHeight*(a-.5)};p.exports=h},1785:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(42573),c=t(7386),h=t(62991),r=t(23029),n=function(e,s,o,i,a,l,u,f){u===void 0&&(u=!0);var v=c(e,s,o,i,null,f),m=[];v.forEach(function(M){var P=new r(M.layer,M.index,M.x,M.y,M.width,M.height,M.baseWidth,M.baseHeight);P.copy(M),m.push(P)});for(var g=a-e,x=l-s,y=0;y<m.length;y++){var T=m[y],C=T.x+g,E=T.y+x;h(C,E,f)&&f.data[E][C]&&(T.x=C,T.y=E,T.updatePixelXY(),f.data[E][C]=T)}u&&d(a-1,l-1,o+2,i+2,f),v.length=0,m.length=0};p.exports=n},78419:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62644),c=t(7386),h=t(27987),r=function(n,e,s,o,i,a){s||(s={}),Array.isArray(n)||(n=[n]);var l=a.tilemapLayer;o||(o=l.scene),i||(i=o.cameras.main);var u=a.width,f=a.height,v=c(0,0,u,f,null,a),m=[],g,x=function(E,M,P){for(var A=0;A<P.length;A++){var R=P[A];E.hasOwnProperty(R)||(E[R]=M[R])}};for(g=0;g<v.length;g++){var y=v[g],T=d(s);if(n.indexOf(y.index)!==-1){var C=l.tileToWorldXY(y.x,y.y,void 0,i,a);T.x=C.x,T.y=C.y,x(T,y,["rotation","flipX","flipY","alpha","visible","tint"]),T.hasOwnProperty("origin")||(T.x+=y.width*.5,T.y+=y.height*.5),T.hasOwnProperty("useSpriteSheet")&&(T.key=y.tileset.image,T.frame=y.index-1),m.push(o.make.sprite(T))}}if(Array.isArray(e))for(g=0;g<n.length;g++)h(n[g],e[g],0,0,u,f,a);else if(e!==null)for(g=0;g<n.length;g++)h(n[g],e,0,0,u,f,a);return m};p.exports=r},19545:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(87841),c=t(63448),h=t(56583),r=new d,n=function(e,s){var o=e.tilemapLayer.tilemap,i=e.tilemapLayer,a=Math.floor(o.tileWidth*i.scaleX),l=Math.floor(o.tileHeight*i.scaleY),u=h(s.worldView.x-i.x,a,0,!0)-i.cullPaddingX,f=c(s.worldView.right-i.x,a,0,!0)+i.cullPaddingX,v=h(s.worldView.y-i.y,l,0,!0)-i.cullPaddingY,m=c(s.worldView.bottom-i.y,l,0,!0)+i.cullPaddingY;return r.setTo(u,v,f-u,m-v)};p.exports=n},30003:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(19545),c=t(32483),h=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var o=r.tilemapLayer,i=d(r,n);return(o.skipCull||o.scrollFactorX!==1||o.scrollFactorY!==1)&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=h},35137:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7386),c=t(42573),h=t(20576),r=function(n,e,s,o,i,a,l){for(var u=l.collideIndexes.indexOf(n)!==-1,f=d(e,s,o,i,null,l),v=0;v<f.length;v++)f[v].index=n,h(f[v],u);a&&c(e-1,s-1,o+2,i+2,l)};p.exports=r},40253:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7386),c=function(h,r,n,e,s,o,i,a){var l=d(n,e,s,o,i,a);return l.filter(h,r)};p.exports=c},52692:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){d===void 0&&(d=0),c===void 0&&(c=!1);var r=0,n,e,s;if(c){for(e=h.height-1;e>=0;e--)for(n=h.width-1;n>=0;n--)if(s=h.data[e][n],s&&s.index===t){if(r===d)return s;r+=1}}else for(e=0;e<h.height;e++)for(n=0;n<h.width;n++)if(s=h.data[e][n],s&&s.index===t){if(r===d)return s;r+=1}return null};p.exports=S},66151:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7386),c=function(h,r,n,e,s,o,i,a){var l=d(n,e,s,o,i,a);return l.find(h,r)||null};p.exports=c},97560:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7386),c=function(h,r,n,e,s,o,i,a){var l=d(n,e,s,o,i,a);l.forEach(h,r)};p.exports=c},43305:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91907),c=t(30003),h=t(9474),r=t(14018),n=t(29747),e=t(54503),s=function(o){return o===d.ORTHOGONAL?c:o===d.HEXAGONAL?h:o===d.STAGGERED?e:o===d.ISOMETRIC?r:n};p.exports=s},7423:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62991),c=function(h,r,n,e){if(d(h,r,e)){var s=e.data[r][h]||null;return s?s.index===-1?n?s:null:s:null}else return null};p.exports=c},60540:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7423),c=t(26099),h=new c,r=function(n,e,s,o,i){return i.tilemapLayer.worldToTileXY(n,e,!0,h,o),d(h.x,h.y,s,i)};p.exports=r},55826:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26099),c=function(h,r,n,e){var s=e.baseTileWidth,o=e.baseTileHeight,i=e.tilemapLayer,a=0,l=0;i&&(n||(n=i.scene.cameras.main),a=i.x+n.scrollX*(1-i.scrollFactorX),l=i.y+n.scrollY*(1-i.scrollFactorY),s*=i.scaleX,o*=i.scaleY);var u=a+h*s,f=l+r*o;return[new d(u,f),new d(u+s,f),new d(u+s,f+o),new d(u,f+o)]};p.exports=c},11758:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91907),c=t(27229),h=t(29747),r=t(55826),n=function(e){return e===d.ORTHOGONAL?r:e===d.ISOMETRIC?h:e===d.HEXAGONAL?c:(e===d.STAGGERED,h)};p.exports=n},39167:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91907),c=t(29747),h=t(97281),r=function(n){return n===d.ORTHOGONAL?h:c};p.exports=r},62e3:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91907),c=t(19951),h=t(14127),r=t(29747),n=t(97202),e=t(70326),s=function(o){return o===d.ORTHOGONAL?e:o===d.ISOMETRIC?h:o===d.HEXAGONAL?c:o===d.STAGGERED?n:r};p.exports=s},5984:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91907),c=t(29747),h=t(28054),r=t(29650),n=function(e){return e===d.ORTHOGONAL?r:e===d.STAGGERED?h:c};p.exports=n},7386:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(95540),c=function(h,r,n,e,s,o){h===void 0&&(h=0),r===void 0&&(r=0),n===void 0&&(n=o.width),e===void 0&&(e=o.height),s||(s={});var i=d(s,"isNotEmpty",!1),a=d(s,"isColliding",!1),l=d(s,"hasInterestingFace",!1);h<0&&(n+=h,h=0),r<0&&(e+=r,r=0),h+n>o.width&&(n=Math.max(o.width-h,0)),r+e>o.height&&(e=Math.max(o.height-r,0));for(var u=[],f=r;f<r+e;f++)for(var v=h;v<h+n;v++){var m=o.data[f][v];if(m!==null){if(i&&m.index===-1||a&&!m.collides||l&&!m.hasInterestingFace)continue;u.push(m)}}return u};p.exports=c},91141:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(55738),c=t(7386),h=t(91865),r=t(29747),n=t(26099),e=function(l,u){return h.RectangleToTriangle(u,l)},s=new n,o=new n,i=new n,a=function(l,u,f,v){if(l===void 0)return[];var m=r;l instanceof d.Circle?m=h.CircleToRectangle:l instanceof d.Rectangle?m=h.RectangleToRectangle:l instanceof d.Triangle?m=e:l instanceof d.Line&&(m=h.LineToRectangle),v.tilemapLayer.worldToTileXY(l.left,l.top,!0,o,f);var g=o.x,x=o.y;v.tilemapLayer.worldToTileXY(l.right,l.bottom,!1,i,f);var y=Math.ceil(i.x),T=Math.ceil(i.y),C=Math.max(y-g,1),E=Math.max(T-x,1),M=c(g,x,C,E,u,v),P=v.tileWidth,A=v.tileHeight;v.tilemapLayer&&(P*=v.tilemapLayer.scaleX,A*=v.tilemapLayer.scaleY);for(var R=[],F=new d.Rectangle(0,0,P,A),w=0;w<M.length;w++){var B=M[w];v.tilemapLayer.tileToWorldXY(B.x,B.y,s,f),F.x=s.x,F.y=s.y,m(l,F)&&R.push(B)}return R};p.exports=a},96523:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7386),c=t(26099),h=new c,r=new c,n=function(e,s,o,i,a,l,u){var f=u.tilemapLayer.tilemap._convert.WorldToTileXY;f(e,s,!0,h,l,u);var v=h.x,m=h.y;f(e+o,s+i,!1,r,l,u);var g=Math.ceil(r.x),x=Math.ceil(r.y);return d(v,m,g-v,x-m,a,u)};p.exports=n},96113:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91907),c=t(20242),h=t(10095),r=function(n){return n===d.ORTHOGONAL?h:c};p.exports=r},16926:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91907),c=t(86625),h=t(96897),r=t(29747),n=t(15108),e=t(85896),s=function(o){return o===d.ORTHOGONAL?e:o===d.ISOMETRIC?h:o===d.HEXAGONAL?c:o===d.STAGGERED?n:r};p.exports=s},55762:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91907),c=t(20242),h=t(51900),r=t(63288),n=function(e){return e===d.ORTHOGONAL?r:e===d.STAGGERED?h:c};p.exports=n},45091:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62991),c=function(h,r,n){if(d(h,r,n)){var e=n.data[r][h];return e!==null&&e.index>-1}else return!1};p.exports=c},24152:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(45091),c=t(26099),h=new c,r=function(n,e,s,o){o.tilemapLayer.worldToTileXY(n,e,!0,h,s);var i=h.x,a=h.y;return d(i,a,o)};p.exports=r},90454:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(63448),c=t(56583),h=function(r,n){var e=r.tilemapLayer.tilemap,s=r.tilemapLayer,o=Math.floor(e.tileWidth*s.scaleX),i=Math.floor(e.tileHeight*s.scaleY),a=r.hexSideLength,l,u,f,v;if(r.staggerAxis==="y"){var m=(i-a)/2+a;l=c(n.worldView.x-s.x,o,0,!0)-s.cullPaddingX,u=d(n.worldView.right-s.x,o,0,!0)+s.cullPaddingX,f=c(n.worldView.y-s.y,m,0,!0)-s.cullPaddingY,v=d(n.worldView.bottom-s.y,m,0,!0)+s.cullPaddingY}else{var g=(o-a)/2+a;l=c(n.worldView.x-s.x,g,0,!0)-s.cullPaddingX,u=d(n.worldView.right-s.x,g,0,!0)+s.cullPaddingX,f=c(n.worldView.y-s.y,i,0,!0)-s.cullPaddingY,v=d(n.worldView.bottom-s.y,i,0,!0)+s.cullPaddingY}return{left:l,right:u,top:f,bottom:v}};p.exports=h},9474:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(90454),c=t(32483),h=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var o=r.tilemapLayer,i=d(r,n);return o.skipCull&&o.scrollFactorX===1&&o.scrollFactorY===1&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=h},27229:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(19951),c=t(26099),h=new c,r=function(n,e,s,o){var i=o.baseTileWidth,a=o.baseTileHeight,l=o.tilemapLayer;l&&(i*=l.scaleX,a*=l.scaleY);var u=d(n,e,h,s,o),f=[],v=.5773502691896257,m,g;o.staggerAxis==="y"?(m=v*i,g=a/2):(m=i/2,g=v*a);for(var x=0;x<6;x++){var y=2*Math.PI*(.5-x)/6;f.push(new c(u.x+m*Math.cos(y),u.y+g*Math.sin(y)))}return f};p.exports=r},19951:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26099),c=function(h,r,n,e,s){n||(n=new d);var o=s.baseTileWidth,i=s.baseTileHeight,a=s.tilemapLayer,l=0,u=0;a&&(e||(e=a.scene.cameras.main),l=a.x+e.scrollX*(1-a.scrollFactorX),u=a.y+e.scrollY*(1-a.scrollFactorY),o*=a.scaleX,i*=a.scaleY);var f=o/2,v=i/2,m,g,x=s.staggerAxis,y=s.staggerIndex;return x==="y"?(m=l+o*h+o,g=u+1.5*r*v+v,r%2===0&&(y==="odd"?m-=f:m+=f)):x==="x"&&y==="odd"&&(m=l+1.5*h*f+f,g=u+i*h+i,h%2===0&&(y==="odd"?g-=v:g+=v)),n.set(m,g)};p.exports=c},86625:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26099),c=function(h,r,n,e,s,o){e||(e=new d);var i=o.baseTileWidth,a=o.baseTileHeight,l=o.tilemapLayer;l&&(s||(s=l.scene.cameras.main),h=h-(l.x+s.scrollX*(1-l.scrollFactorX)),r=r-(l.y+s.scrollY*(1-l.scrollFactorY)),i*=l.scaleX,a*=l.scaleY);var u=.5773502691896257,f=-.3333333333333333,v=0,m=.6666666666666666,g=i/2,x=a/2,y,T,C,E,M;o.staggerAxis==="y"?(y=(h-g)/(u*i),T=(r-x)/x,C=u*y+f*T,E=v*y+m*T):(y=(h-g)/g,T=(r-x)/(u*a),C=f*y+u*T,E=m*y+v*T),M=-C-E;var P=Math.round(C),A=Math.round(E),R=Math.round(M),F=Math.abs(P-C),w=Math.abs(A-E),B=Math.abs(R-M);F>w&&F>B?P=-A-R:w>B&&(A=-P-R);var N,U=A;return o.staggerIndex==="odd"?N=U%2===0?A/2+P:A/2+P-.5:N=U%2===0?A/2+P:A/2+P+.5,e.set(N,U)};p.exports=c},62991:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return t>=0&&t<c.width&&d>=0&&d<c.height};p.exports=S},14018:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(33528),c=function(h,r,n,e){n===void 0&&(n=[]),e===void 0&&(e=0),n.length=0;var s=h.tilemapLayer,o=h.data,i=h.width,a=h.height,l=s.skipCull,u=0,f=i,v=0,m=a,g,x,y;if(e===0)for(x=v;x<m;x++)for(g=u;g<f;g++)y=o[x][g],!(!y||y.index===-1||!y.visible||y.alpha===0)&&(!l&&!d(g,x,h,r)||n.push(y));else if(e===1)for(x=v;x<m;x++)for(g=f;g>=u;g--)y=o[x][g],!(!y||y.index===-1||!y.visible||y.alpha===0)&&(!l&&!d(g,x,h,r)||n.push(y));else if(e===2)for(x=m;x>=v;x--)for(g=u;g<f;g++)y=o[x][g],!(!y||y.index===-1||!y.visible||y.alpha===0)&&(!l&&!d(g,x,h,r)||n.push(y));else if(e===3)for(x=m;x>=v;x--)for(g=f;g>=u;g--)y=o[x][g],!(!y||y.index===-1||!y.visible||y.alpha===0)&&(!l&&!d(g,x,h,r)||n.push(y));return s.tilesDrawn=n.length,s.tilesTotal=i*a,n};p.exports=c},14127:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26099),c=function(h,r,n,e,s){n||(n=new d);var o=s.baseTileWidth,i=s.baseTileHeight,a=s.tilemapLayer,l=0,u=0;a&&(e||(e=a.scene.cameras.main),l=a.x+e.scrollX*(1-a.scrollFactorX),o*=a.scaleX,u=a.y+e.scrollY*(1-a.scrollFactorY),i*=a.scaleY);var f=l+(h-r)*(o/2),v=u+(h+r)*(i/2);return n.set(f,v)};p.exports=c},96897:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26099),c=function(h,r,n,e,s,o,i){e||(e=new d);var a=o.baseTileWidth,l=o.baseTileHeight,u=o.tilemapLayer;u&&(s||(s=u.scene.cameras.main),r=r-(u.y+s.scrollY*(1-u.scrollFactorY)),l*=u.scaleY,h=h-(u.x+s.scrollX*(1-u.scrollFactorX)),a*=u.scaleX);var f=a/2,v=l/2;h=h-f,i||(r=r-l);var m=.5*(h/f+r/v),g=.5*(-h/f+r/v);return n&&(m=Math.floor(m),g=Math.floor(g)),e.set(m,g)};p.exports=c},71558:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(23029),c=t(62991),h=t(72023),r=t(20576),n=function(e,s,o,i,a){if(i===void 0&&(i=!0),!c(s,o,a))return null;var l,u=a.data[o][s],f=u&&u.collides;e instanceof d?(a.data[o][s]===null&&(a.data[o][s]=new d(a,e.index,s,o,a.tileWidth,a.tileHeight)),a.data[o][s].copy(e)):(l=e,a.data[o][s]===null?a.data[o][s]=new d(a,l,s,o,a.tileWidth,a.tileHeight):a.data[o][s].index=l);var v=a.data[o][s],m=a.collideIndexes.indexOf(v.index)!==-1;if(l=e instanceof d?e.index:e,l===-1)v.width=a.tileWidth,v.height=a.tileHeight;else{var g=a.tilemapLayer.tilemap,x=g.tiles,y=x[l][2],T=g.tilesets[y];v.width=T.tileWidth,v.height=T.tileHeight}return r(v,m),i&&f!==v.collides&&h(s,o,a),v};p.exports=n},26303:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(71558),c=t(26099),h=new c,r=function(n,e,s,o,i,a){return a.tilemapLayer.worldToTileXY(e,s,!0,h,i,a),d(n,h.x,h.y,o,a)};p.exports=r},14051:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(42573),c=t(71558),h=function(r,n,e,s,o){if(s===void 0&&(s=!0),!Array.isArray(r))return null;Array.isArray(r[0])||(r=[r]);for(var i=r.length,a=r[0].length,l=0;l<i;l++)for(var u=0;u<a;u++){var f=r[l][u];c(f,n+u,e+l,!1,o)}s&&d(n-1,e-1,a+2,i+2,o)};p.exports=h},77389:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7386),c=t(26546),h=function(r,n,e,s,o,i){var a,l=d(r,n,e,s,{},i);if(!o)for(o=[],a=0;a<l.length;a++)o.indexOf(l[a].index)===-1&&o.push(l[a].index);for(a=0;a<l.length;a++)l[a].index=c(o)};p.exports=h},63557:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(23029),c=t(62991),h=t(72023),r=function(n,e,s,o,i){if(s===void 0&&(s=!0),o===void 0&&(o=!0),!c(n,e,i))return null;var a=i.data[e][n];if(a)i.data[e][n]=s?null:new d(i,-1,n,e,i.tileWidth,i.tileHeight);else return null;return o&&a&&a.collides&&h(n,e,i),a};p.exports=r},94178:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(63557),c=t(26099),h=new c,r=function(n,e,s,o,i,a){return a.tilemapLayer.worldToTileXY(n,e,!0,h,i,a),d(h.x,h.y,s,o,a)};p.exports=r},15533:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7386),c=t(3956),h=new c(105,210,231,150),r=new c(243,134,48,200),n=new c(40,39,37,150),e=function(s,o,i){o===void 0&&(o={});var a=o.tileColor!==void 0?o.tileColor:h,l=o.collidingTileColor!==void 0?o.collidingTileColor:r,u=o.faceColor!==void 0?o.faceColor:n,f=d(0,0,i.width,i.height,null,i);s.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),s.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var v=0;v<f.length;v++){var m=f[v],g=m.width,x=m.height,y=m.pixelX,T=m.pixelY,C=m.collides?l:a;C!==null&&(s.fillStyle(C.color,C.alpha/255),s.fillRect(y,T,g,x)),y+=1,T+=1,g-=2,x-=2,u!==null&&(s.lineStyle(1,u.color,u.alpha/255),m.faceTop&&s.lineBetween(y,T,y+g,T),m.faceRight&&s.lineBetween(y+g,T,y+g,T+x),m.faceBottom&&s.lineBetween(y,T+x,y+g,T+x),m.faceLeft&&s.lineBetween(y,T,y,T+x))}};p.exports=e},27987:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7386),c=function(h,r,n,e,s,o,i){for(var a=d(n,e,s,o,null,i),l=0;l<a.length;l++)a[l]&&a[l].index===h&&(a[l].index=r)};p.exports=c},32483:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){var r=t.data,n=t.width,e=t.height,s=t.tilemapLayer,o=Math.max(0,d.left),i=Math.min(n,d.right),a=Math.max(0,d.top),l=Math.min(e,d.bottom),u,f,v;if(c===0)for(f=a;f<l;f++)for(u=o;r[f]&&u<i;u++)v=r[f][u],!(!v||v.index===-1||!v.visible||v.alpha===0)&&h.push(v);else if(c===1)for(f=a;f<l;f++)for(u=i;r[f]&&u>=o;u--)v=r[f][u],!(!v||v.index===-1||!v.visible||v.alpha===0)&&h.push(v);else if(c===2)for(f=l;f>=a;f--)for(u=o;r[f]&&u<i;u++)v=r[f][u],!(!v||v.index===-1||!v.visible||v.alpha===0)&&h.push(v);else if(c===3)for(f=l;f>=a;f--)for(u=i;r[f]&&u>=o;u--)v=r[f][u],!(!v||v.index===-1||!v.visible||v.alpha===0)&&h.push(v);return s.tilesDrawn=h.length,s.tilesTotal=n*e,h};p.exports=S},57068:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(20576),c=t(42573),h=t(9589),r=function(n,e,s,o,i){e===void 0&&(e=!0),s===void 0&&(s=!0),i===void 0&&(i=!0),Array.isArray(n)||(n=[n]);for(var a=0;a<n.length;a++)h(n[a],e,o);if(i)for(var l=0;l<o.height;l++)for(var u=0;u<o.width;u++){var f=o.data[l][u];f&&n.indexOf(f.index)!==-1&&d(f,e)}s&&c(0,0,o.width,o.height,o)};p.exports=r},37266:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(20576),c=t(42573),h=t(9589),r=function(n,e,s,o,i,a){if(s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=!0),!(n>e)){for(var l=n;l<=e;l++)h(l,s,i);if(a)for(var u=0;u<i.height;u++)for(var f=0;f<i.width;f++){var v=i.data[u][f];v&&v.index>=n&&v.index<=e&&d(v,s)}o&&c(0,0,i.width,i.height,i)}};p.exports=r},75661:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(20576),c=t(42573),h=t(9589),r=function(n,e,s,o){e===void 0&&(e=!0),s===void 0&&(s=!0),Array.isArray(n)||(n=[n]);for(var i=0;i<o.height;i++)for(var a=0;a<o.width;a++){var l=o.data[i][a];l&&n.indexOf(l.index)===-1&&(d(l,e),h(l.index,e,o))}s&&c(0,0,o.width,o.height,o)};p.exports=r},64740:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(20576),c=t(42573),h=t(97022),r=function(n,e,s,o){e===void 0&&(e=!0),s===void 0&&(s=!0);for(var i=0;i<o.height;i++)for(var a=0;a<o.width;a++){var l=o.data[i][a];if(l){for(var u in n)if(h(l.properties,u)){var f=n[u];Array.isArray(f)||(f=[f]);for(var v=0;v<f.length;v++)l.properties[u]===f[v]&&d(l,e)}}}s&&c(0,0,o.width,o.height,o)};p.exports=r},63307:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(20576),c=t(42573),h=function(r,n,e){r===void 0&&(r=!0),n===void 0&&(n=!0);for(var s=0;s<e.height;s++)for(var o=0;o<e.width;o++){var i=e.data[s][o];if(i){var a=i.getCollisionGroup();a&&a.objects&&a.objects.length>0&&d(i,r)}}n&&c(0,0,e.width,e.height,e)};p.exports=h},9589:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=c.collideIndexes.indexOf(t);d&&h===-1?c.collideIndexes.push(t):!d&&h!==-1&&c.collideIndexes.splice(h,1)};p.exports=S},20576:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){d?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)};p.exports=S},79583:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){if(typeof t=="number")h.callbacks[t]=d!==null?{callback:d,callbackContext:c}:void 0;else for(var r=0,n=t.length;r<n;r++)h.callbacks[t[r]]=d!==null?{callback:d,callbackContext:c}:void 0};p.exports=S},93254:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7386),c=function(h,r,n,e,s,o,i){for(var a=d(h,r,n,e,null,i),l=0;l<a.length;l++)a[l].setCollisionCallback(s,o)};p.exports=c},32903:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7386),c=t(33680),h=function(r,n,e,s,o){var i=d(r,n,e,s,null,o),a=i.map(function(u){return u.index});c(a);for(var l=0;l<i.length;l++)i[l].index=a[l]};p.exports=h},61325:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(63448),c=t(56583),h=function(r,n){var e=r.tilemapLayer.tilemap,s=r.tilemapLayer,o=Math.floor(e.tileWidth*s.scaleX),i=Math.floor(e.tileHeight*s.scaleY),a=c(n.worldView.x-s.x,o,0,!0)-s.cullPaddingX,l=d(n.worldView.right-s.x,o,0,!0)+s.cullPaddingX,u=c(n.worldView.y-s.y,i/2,0,!0)-s.cullPaddingY,f=d(n.worldView.bottom-s.y,i/2,0,!0)+s.cullPaddingY;return{left:a,right:l,top:u,bottom:f}};p.exports=h},54503:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(61325),c=t(32483),h=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var o=r.tilemapLayer,i=d(r,n);return o.skipCull&&o.scrollFactorX===1&&o.scrollFactorY===1&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=h},97202:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26099),c=function(h,r,n,e,s){n||(n=new d);var o=s.baseTileWidth,i=s.baseTileHeight,a=s.tilemapLayer,l=0,u=0;a&&(e||(e=a.scene.cameras.main),l=a.x+e.scrollX*(1-a.scrollFactorX),o*=a.scaleX,u=a.y+e.scrollY*(1-a.scrollFactorY),i*=a.scaleY);var f=l+h*o+r%2*(o/2),v=u+r*(i/2);return n.set(f,v)};p.exports=c},28054:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=c.baseTileHeight,r=c.tilemapLayer,n=0;return r&&(d===void 0&&(d=r.scene.cameras.main),n=r.y+d.scrollY*(1-r.scrollFactorY),h*=r.scaleY),n+t*(h/2)+h};p.exports=S},15108:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26099),c=function(h,r,n,e,s,o){e||(e=new d);var i=o.baseTileWidth,a=o.baseTileHeight,l=o.tilemapLayer;l&&(s||(s=l.scene.cameras.main),r=r-(l.y+s.scrollY*(1-l.scrollFactorY)),a*=l.scaleY,h=h-(l.x+s.scrollX*(1-l.scrollFactorX)),i*=l.scaleX);var u=n?Math.floor(r/(a/2)):r/(a/2),f=n?Math.floor((h+u%2*.5*i)/i):(h+u%2*.5*i)/i;return e.set(f,u)};p.exports=c},51900:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){var r=h.baseTileHeight,n=h.tilemapLayer;return n&&(c||(c=n.scene.cameras.main),t=t-(n.y+c.scrollY*(1-n.scrollFactorY)),r*=n.scaleY),d?Math.floor(t/(r/2)):t/(r/2)};p.exports=S},86560:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7386),c=function(h,r,n,e,s,o,i){for(var a=d(n,e,s,o,null,i),l=0;l<a.length;l++)a[l]&&(a[l].index===h?a[l].index=r:a[l].index===r&&(a[l].index=h))};p.exports=c},97281:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=c.baseTileWidth,r=c.tilemapLayer,n=0;return r&&(d||(d=r.scene.cameras.main),n=r.x+d.scrollX*(1-r.scrollFactorX),h*=r.scaleX),n+t*h};p.exports=S},70326:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(97281),c=t(29650),h=t(26099),r=function(n,e,s,o,i){return s||(s=new h(0,0)),s.x=d(n,o,i),s.y=c(e,o,i),s};p.exports=r},29650:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=c.baseTileHeight,r=c.tilemapLayer,n=0;return r&&(d||(d=r.scene.cameras.main),n=r.y+d.scrollY*(1-r.scrollFactorY),h*=r.scaleY),n+t*h};p.exports=S},77366:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(7386),c=t(75508),h=function(r,n,e,s,o,i){if(o){var a,l=d(r,n,e,s,null,i),u=0;for(a=0;a<o.length;a++)u+=o[a].weight;if(!(u<=0))for(a=0;a<l.length;a++){for(var f=c.RND.frac()*u,v=0,m=-1,g=0;g<o.length;g++)if(v+=o[g].weight,f<=v){var x=o[g].index;m=Array.isArray(x)?x[Math.floor(c.RND.frac()*x.length)]:x;break}l[a].index=m}}};p.exports=h},10095:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(85896),c=t(26099),h=new c,r=function(n,e,s,o){return d(n,0,e,h,s,o),h.x};p.exports=r},85896:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(26099),c=function(h,r,n,e,s,o){n===void 0&&(n=!0),e||(e=new d);var i=o.baseTileWidth,a=o.baseTileHeight,l=o.tilemapLayer;l&&(s||(s=l.scene.cameras.main),h=h-(l.x+s.scrollX*(1-l.scrollFactorX)),r=r-(l.y+s.scrollY*(1-l.scrollFactorY)),i*=l.scaleX,a*=l.scaleY);var u=h/i,f=r/a;return n&&(u=Math.floor(u),f=Math.floor(f)),e.set(u,f)};p.exports=c},63288:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(85896),c=t(26099),h=new c,r=function(n,e,s,o){return d(0,n,e,h,s,o),h.y};p.exports=r},81086:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={CalculateFacesAt:t(72023),CalculateFacesWithin:t(42573),CheckIsoBounds:t(33528),Copy:t(1785),CreateFromTiles:t(78419),CullBounds:t(19545),CullTiles:t(30003),Fill:t(35137),FilterTiles:t(40253),FindByIndex:t(52692),FindTile:t(66151),ForEachTile:t(97560),GetCullTilesFunction:t(43305),GetTileAt:t(7423),GetTileAtWorldXY:t(60540),GetTileCorners:t(55826),GetTileCornersFunction:t(11758),GetTilesWithin:t(7386),GetTilesWithinShape:t(91141),GetTilesWithinWorldXY:t(96523),GetTileToWorldXFunction:t(39167),GetTileToWorldXYFunction:t(62e3),GetTileToWorldYFunction:t(5984),GetWorldToTileXFunction:t(96113),GetWorldToTileXYFunction:t(16926),GetWorldToTileYFunction:t(55762),HasTileAt:t(45091),HasTileAtWorldXY:t(24152),HexagonalCullBounds:t(90454),HexagonalCullTiles:t(9474),HexagonalGetTileCorners:t(27229),HexagonalTileToWorldXY:t(19951),HexagonalWorldToTileXY:t(86625),IsInLayerBounds:t(62991),IsometricCullTiles:t(14018),IsometricTileToWorldXY:t(14127),IsometricWorldToTileXY:t(96897),PutTileAt:t(71558),PutTileAtWorldXY:t(26303),PutTilesAt:t(14051),Randomize:t(77389),RemoveTileAt:t(63557),RemoveTileAtWorldXY:t(94178),RenderDebug:t(15533),ReplaceByIndex:t(27987),RunCull:t(32483),SetCollision:t(57068),SetCollisionBetween:t(37266),SetCollisionByExclusion:t(75661),SetCollisionByProperty:t(64740),SetCollisionFromCollisionGroup:t(63307),SetLayerCollisionIndex:t(9589),SetTileCollision:t(20576),SetTileIndexCallback:t(79583),SetTileLocationCallback:t(93254),Shuffle:t(32903),StaggeredCullBounds:t(61325),StaggeredCullTiles:t(54503),StaggeredTileToWorldXY:t(97202),StaggeredTileToWorldY:t(28054),StaggeredWorldToTileXY:t(15108),StaggeredWorldToTileY:t(51900),SwapByIndex:t(86560),TileToWorldX:t(97281),TileToWorldXY:t(70326),TileToWorldY:t(29650),WeightedRandomize:t(77366),WorldToTileX:t(10095),WorldToTileXY:t(85896),WorldToTileY:t(63288)}},91907:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d={ORIENTATION:t(91907)};p.exports=d},62501:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(79291),c=t(21829),h={Components:t(81086),Parsers:t(57442),Formats:t(80341),ImageCollection:t(16536),ParseToTilemap:t(31989),Tile:t(23029),Tilemap:t(49075),TilemapCreator:t(45939),TilemapFactory:t(46029),Tileset:t(33629),TilemapLayer:t(20442),Orientation:t(91907),LayerData:t(14977),MapData:t(87010),ObjectLayer:t(48700)};h=d(!1,h,c.ORIENTATION),p.exports=h},14977:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(91907),h=t(95540),r=new d({initialize:function(e){e===void 0&&(e={}),this.name=h(e,"name","layer"),this.id=h(e,"id",0),this.x=h(e,"x",0),this.y=h(e,"y",0),this.width=h(e,"width",0),this.height=h(e,"height",0),this.tileWidth=h(e,"tileWidth",0),this.tileHeight=h(e,"tileHeight",0),this.baseTileWidth=h(e,"baseTileWidth",this.tileWidth),this.baseTileHeight=h(e,"baseTileHeight",this.tileHeight),this.orientation=h(e,"orientation",c.ORTHOGONAL),this.widthInPixels=h(e,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=h(e,"heightInPixels",this.height*this.baseTileHeight),this.alpha=h(e,"alpha",1),this.visible=h(e,"visible",!0),this.properties=h(e,"properties",[]),this.indexes=h(e,"indexes",[]),this.collideIndexes=h(e,"collideIndexes",[]),this.callbacks=h(e,"callbacks",[]),this.bodies=h(e,"bodies",[]),this.data=h(e,"data",[]),this.tilemapLayer=h(e,"tilemapLayer",null),this.hexSideLength=h(e,"hexSideLength",0),this.staggerAxis=h(e,"staggerAxis","y"),this.staggerIndex=h(e,"staggerIndex","odd")}});p.exports=r},87010:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(91907),h=t(95540),r=new d({initialize:function(e){e===void 0&&(e={}),this.name=h(e,"name","map"),this.width=h(e,"width",0),this.height=h(e,"height",0),this.infinite=h(e,"infinite",!1),this.tileWidth=h(e,"tileWidth",0),this.tileHeight=h(e,"tileHeight",0),this.widthInPixels=h(e,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=h(e,"heightInPixels",this.height*this.tileHeight),this.format=h(e,"format",null),this.orientation=h(e,"orientation",c.ORTHOGONAL),this.renderOrder=h(e,"renderOrder","right-down"),this.version=h(e,"version","1"),this.properties=h(e,"properties",{}),this.layers=h(e,"layers",[]),this.images=h(e,"images",[]),this.objects=h(e,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=h(e,"collision",{}),this.tilesets=h(e,"tilesets",[]),this.imageCollections=h(e,"imageCollections",[]),this.tiles=h(e,"tiles",[]),this.hexSideLength=h(e,"hexSideLength",0),this.staggerAxis=h(e,"staggerAxis","y"),this.staggerIndex=h(e,"staggerIndex","odd")}});p.exports=r},48700:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(95540),h=new d({initialize:function(n){n===void 0&&(n={}),this.name=c(n,"name","object layer"),this.id=c(n,"id",0),this.opacity=c(n,"opacity",1),this.properties=c(n,"properties",{}),this.propertyTypes=c(n,"propertytypes",{}),this.type=c(n,"type","objectgroup"),this.visible=c(n,"visible",!0),this.objects=c(n,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});p.exports=h},6641:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(91907),c=function(h){return h=h.toLowerCase(),h==="isometric"?d.ISOMETRIC:h==="staggered"?d.STAGGERED:h==="hexagonal"?d.HEXAGONAL:d.ORTHOGONAL};p.exports=c},46177:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(80341),c=t(2342),h=t(82593),r=t(46594),n=t(87021),e=function(s,o,i,a,l,u){var f;switch(o){case d.ARRAY_2D:f=c(s,i,a,l,u);break;case d.CSV:f=h(s,i,a,l,u);break;case d.TILED_JSON:f=r(s,i,u);break;case d.WELTMEISTER:f=n(s,i,u);break;default:console.warn("Unrecognized tilemap data format: "+o),f=null}return f};p.exports=e},2342:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(80341),c=t(14977),h=t(87010),r=t(23029),n=function(e,s,o,i,a){for(var l=new c({tileWidth:o,tileHeight:i}),u=new h({name:e,tileWidth:o,tileHeight:i,format:d.ARRAY_2D,layers:[l]}),f=[],v=s.length,m=0,g=0;g<s.length;g++){f[g]=[];for(var x=s[g],y=0;y<x.length;y++){var T=parseInt(x[y],10);isNaN(T)||T===-1?f[g][y]=a?null:new r(l,-1,y,g,o,i):f[g][y]=new r(l,T,y,g,o,i)}m===0&&(m=x.length)}return u.width=l.width=m,u.height=l.height=v,u.widthInPixels=l.widthInPixels=m*o,u.heightInPixels=l.heightInPixels=v*i,l.data=f,u};p.exports=n},82593:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(80341),c=t(2342),h=function(r,n,e,s,o){var i=n.trim().split(`
`).map(function(l){return l.split(",")}),a=c(r,i,e,s,o);return a.format=d.CSV,a};p.exports=h},6656:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(14977),c=t(23029),h=function(r,n){for(var e=[],s=0;s<r.layer.length;s++){for(var o=r.layer[s],i=new d({name:o.name,width:o.width,height:o.height,tileWidth:o.tilesize,tileHeight:o.tilesize,visible:o.visible===1}),a=[],l=[],u=0;u<o.data.length;u++){for(var f=0;f<o.data[u].length;f++){var v=o.data[u][f]-1,m;v>-1?m=new c(i,v,f,u,o.tilesize,o.tilesize):m=n?null:new c(i,-1,f,u,o.tilesize,o.tilesize),a.push(m)}l.push(a),a=[]}i.data=l,e.push(i)}return e};p.exports=h},96483:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(33629),c=function(h){for(var r=[],n=[],e=0;e<h.layer.length;e++){var s=h.layer[e],o=s.tilesetName;o!==""&&n.indexOf(o)===-1&&(n.push(o),r.push(new d(o,0,s.tilesize,s.tilesize,0,0)))}return r};p.exports=c},87021:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(80341),c=t(87010),h=t(6656),r=t(96483),n=function(e,s,o){if(s.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+e),null;for(var i=0,a=0,l=0;l<s.layer.length;l++)s.layer[l].width>i&&(i=s.layer[l].width),s.layer[l].height>a&&(a=s.layer[l].height);var u=new c({width:i,height:a,name:e,tileWidth:s.layer[0].tilesize,tileHeight:s.layer[0].tilesize,format:d.WELTMEISTER});return u.layers=h(s,o),u.tilesets=r(s),u};p.exports=n},52833:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={ParseTileLayers:t(6656),ParseTilesets:t(96483),ParseWeltmeister:t(87021)}},57442:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={FromOrientationString:t(6641),Parse:t(46177),Parse2DArray:t(2342),ParseCSV:t(82593),Impact:t(52833),Tiled:t(96761)}},51233:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(79291),c=function(h){for(var r,n,e,s,o,i=0;i<h.layers.length;i++){r=h.layers[i],s=null;for(var a=0;a<r.data.length;a++){o=r.data[a];for(var l=0;l<o.length;l++)n=o[l],!(n===null||n.index<0)&&(e=h.tiles[n.index][2],s=h.tilesets[e],n.width=s.tileWidth,n.height=s.tileHeight,s.tileProperties&&s.tileProperties[n.index-s.firstgid]&&(n.properties=d(n.properties,s.tileProperties[n.index-s.firstgid])))}}};p.exports=c},41868:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){for(var d=window.atob(t),c=d.length,h=new Array(c/4),r=0;r<c;r+=4)h[r/4]=(d.charCodeAt(r)|d.charCodeAt(r+1)<<8|d.charCodeAt(r+2)<<16|d.charCodeAt(r+3)<<24)>>>0;return h};p.exports=S},84101:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(33629),c=function(h){var r,n,e=[];for(r=0;r<h.imageCollections.length;r++)for(var s=h.imageCollections[r],o=s.images,i=0;i<o.length;i++){var a=o[i];n=new d(a.image,a.gid,s.imageWidth,s.imageHeight,0,0),n.updateTileData(s.imageWidth,s.imageHeight),h.tilesets.push(n)}for(r=0;r<h.tilesets.length;r++){n=h.tilesets[r];for(var l=n.tileMargin,u=n.tileMargin,f=0,v=0,m=0,g=n.firstgid;g<n.firstgid+n.total&&(e[g]=[l,u,r],l+=n.tileWidth+n.tileSpacing,f++,!(f===n.total||(v++,v===n.columns&&(l=n.tileMargin,u+=n.tileHeight+n.tileSpacing,v=0,m++,m===n.rows))));g++);}return e};p.exports=c},79677:(p,S,t)=>{/**
* @author Seth Berrier <berriers@uwstout.edu>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(95540),c=function(h,r,n){if(!r)return{i:0,layers:h.layers,name:"",opacity:1,visible:!0,x:0,y:0};var e=r.x+d(r,"startx",0)*h.tilewidth+d(r,"offsetx",0),s=r.y+d(r,"starty",0)*h.tileheight+d(r,"offsety",0);return{i:0,layers:r.layers,name:n.name+r.name+"/",opacity:n.opacity*r.opacity,visible:n.visible&&r.visible,x:n.x+e,y:n.y+s}};p.exports=c},29920:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=2147483648,t=1073741824,d=536870912,c=function(h){var r=!!(h&S),n=!!(h&t),e=!!(h&d);h=h&~(S|t|d);var s=0,o=!1;return r&&n&&e?(s=Math.PI/2,o=!0):r&&n&&!e?(s=Math.PI,o=!1):r&&!n&&e?(s=Math.PI/2,o=!1):r&&!n&&!e?(s=0,o=!0):!r&&n&&e?(s=3*Math.PI/2,o=!1):!r&&n&&!e?(s=Math.PI,o=!0):!r&&!n&&e?(s=3*Math.PI/2,o=!0):!r&&!n&&!e&&(s=0,o=!1),{gid:h,flippedHorizontal:r,flippedVertical:n,flippedAntiDiagonal:e,rotation:s,flipped:o}};p.exports=c},12635:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(95540),c=t(79677),h=function(r){for(var n=[],e=[],s=c(r);s.i<s.layers.length||e.length>0;){if(s.i>=s.layers.length){if(e.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=e.pop();continue}var o=s.layers[s.i];if(s.i++,o.type!=="imagelayer"){if(o.type==="group"){var i=c(r,o,s);e.push(s),s=i}continue}var a=d(o,"offsetx",0)+d(o,"startx",0),l=d(o,"offsety",0)+d(o,"starty",0);n.push({name:s.name+o.name,image:o.image,x:s.x+a+o.x,y:s.y+l+o.y,alpha:s.opacity*o.opacity,visible:s.visible&&o.visible,properties:d(o,"properties",{})})}return n};p.exports=h},46594:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(51233),c=t(84101),h=t(91907),r=t(62644),n=t(80341),e=t(6641),s=t(87010),o=t(12635),i=t(22611),a=t(28200),l=t(24619),u=function(f,v,m){var g=r(v),x=new s({width:g.width,height:g.height,name:f,tileWidth:g.tilewidth,tileHeight:g.tileheight,orientation:e(g.orientation),format:n.TILED_JSON,version:g.version,properties:g.properties,renderOrder:g.renderorder,infinite:g.infinite});x.orientation===h.HEXAGONAL&&(x.hexSideLength=g.hexsidelength,x.staggerAxis=g.staggeraxis,x.staggerIndex=g.staggerindex),x.layers=a(g,m),x.images=o(g);var y=l(g);return x.tilesets=y.tilesets,x.imageCollections=y.imageCollections,x.objects=i(g),x.tiles=c(x),d(x),x};p.exports=u},52205:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(18254),c=t(29920),h=function(e){return{x:e.x,y:e.y}},r=["id","name","type","rotation","properties","visible","x","y","width","height"],n=function(e,s,o){s===void 0&&(s=0),o===void 0&&(o=0);var i=d(e,r);if(i.x+=s,i.y+=o,e.gid){var a=c(e.gid);i.gid=a.gid,i.flippedHorizontal=a.flippedHorizontal,i.flippedVertical=a.flippedVertical,i.flippedAntiDiagonal=a.flippedAntiDiagonal}else e.polyline?i.polyline=e.polyline.map(h):e.polygon?i.polygon=e.polygon.map(h):e.ellipse?i.ellipse=e.ellipse:e.text?i.text=e.text:e.point?i.point=!0:i.rectangle=!0;return i};p.exports=n},22611:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(95540),c=t(52205),h=t(48700),r=t(79677),n=function(e){for(var s=[],o=[],i=r(e);i.i<i.layers.length||o.length>0;){if(i.i>=i.layers.length){if(o.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}i=o.pop();continue}var a=i.layers[i.i];if(i.i++,a.opacity*=i.opacity,a.visible=i.visible&&a.visible,a.type!=="objectgroup"){if(a.type==="group"){var l=r(e,a,i);o.push(i),i=l}continue}a.name=i.name+a.name;for(var u=i.x+d(a,"startx",0)+d(a,"offsetx",0),f=i.y+d(a,"starty",0)+d(a,"offsety",0),v=[],m=0;m<a.objects.length;m++){var g=c(a.objects[m],u,f);v.push(g)}var x=new h(a);x.objects=v,s.push(x)}return s};p.exports=n},28200:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(41868),c=t(91907),h=t(79677),r=t(6641),n=t(95540),e=t(14977),s=t(29920),o=t(23029),i=function(a,l){for(var u=n(a,"infinite",!1),f=[],v=[],m=h(a);m.i<m.layers.length||v.length>0;){if(m.i>=m.layers.length){if(v.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}m=v.pop();continue}var g=m.layers[m.i];if(m.i++,g.type!=="tilelayer"){if(g.type==="group"){var x=h(a,g,m);v.push(m),m=x}continue}if(g.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+g.name+"'");continue}else if(g.encoding&&g.encoding==="base64"){if(g.chunks)for(var y=0;y<g.chunks.length;y++)g.chunks[y].data=d(g.chunks[y].data);g.data&&(g.data=d(g.data)),delete g.encoding}var T,C,E,M,P=[],A=0;if(u){var R=n(g,"startx",0)+g.x,F=n(g,"starty",0)+g.y;T=new e({name:m.name+g.name,id:g.id,x:m.x+n(g,"offsetx",0)+R*a.tilewidth,y:m.y+n(g,"offsety",0)+F*a.tileheight,width:g.width,height:g.height,tileWidth:a.tilewidth,tileHeight:a.tileheight,alpha:m.opacity*g.opacity,visible:m.visible&&g.visible,properties:n(g,"properties",[]),orientation:r(a.orientation)}),T.orientation===c.HEXAGONAL&&(T.hexSideLength=a.hexsidelength,T.staggerAxis=a.staggeraxis,T.staggerIndex=a.staggerindex);for(var w=0;w<g.height;w++){P[w]=[null];for(var B=0;B<g.width;B++)P[w][B]=null}for(w=0,Y=g.chunks.length;w<Y;w++)for(var N=g.chunks[w],U=N.x-R,D=N.y-F,I=0,O=0,L=N.data.length;O<L;O++){var G=A+U,z=I+D;C=s(N.data[O]),C.gid>0?(E=new o(T,C.gid,G,z,a.tilewidth,a.tileheight),E.rotation=C.rotation,E.flipX=C.flipped,P[z][G]=E):(M=l?null:new o(T,-1,G,z,a.tilewidth,a.tileheight),P[z][G]=M),A++,A===N.width&&(I++,A=0)}}else{T=new e({name:m.name+g.name,id:g.id,x:m.x+n(g,"offsetx",0)+g.x,y:m.y+n(g,"offsety",0)+g.y,width:g.width,height:g.height,tileWidth:a.tilewidth,tileHeight:a.tileheight,alpha:m.opacity*g.opacity,visible:m.visible&&g.visible,properties:n(g,"properties",[]),orientation:r(a.orientation)}),T.orientation===c.HEXAGONAL&&(T.hexSideLength=a.hexsidelength,T.staggerAxis=a.staggeraxis,T.staggerIndex=a.staggerindex);for(var X=[],V=0,Y=g.data.length;V<Y;V++)C=s(g.data[V]),C.gid>0?(E=new o(T,C.gid,A,P.length,a.tilewidth,a.tileheight),E.rotation=C.rotation,E.flipX=C.flipped,X.push(E)):(M=l?null:new o(T,-1,A,P.length,a.tilewidth,a.tileheight),X.push(M)),A++,A===g.width&&(P.push(X),A=0,X=[])}T.data=P,f.push(T)}return f};p.exports=i},24619:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(33629),c=t(16536),h=t(52205),r=t(57880),n=function(e){for(var s=[],o=[],i=null,a,l=0;l<e.tilesets.length;l++){var u=e.tilesets[l];if(u.source)console.warn("External tilesets unsupported. Use Embed Tileset and re-export");else if(u.image){var f=new d(u.name,u.firstgid,u.tilewidth,u.tileheight,u.margin,u.spacing,void 0,void 0,u.tileoffset);if(e.version>1){var v=void 0,m=void 0;if(Array.isArray(u.tiles)){v=v||{},m=m||{};for(var g=0;g<u.tiles.length;g++){var x=u.tiles[g];if(x.properties){var y={};x.properties.forEach(function(w){y[w.name]=w.value}),m[x.id]=y}if(x.objectgroup&&((v[x.id]||(v[x.id]={})).objectgroup=x.objectgroup,x.objectgroup.objects)){var T=x.objectgroup.objects.map(function(w){return h(w)});v[x.id].objectgroup.objects=T}x.animation&&((v[x.id]||(v[x.id]={})).animation=x.animation),x.type&&((v[x.id]||(v[x.id]={})).type=x.type)}}Array.isArray(u.wangsets)&&(v=v||{},m=m||{},r(u.wangsets,v)),v&&(f.tileData=v,f.tileProperties=m)}else if(u.tileproperties&&(f.tileProperties=u.tileproperties),u.tiles){f.tileData=u.tiles;for(a in f.tileData){var C=f.tileData[a].objectgroup;if(C&&C.objects){var E=C.objects.map(function(w){return h(w)});f.tileData[a].objectgroup.objects=E}}}f.updateTileData(u.imagewidth,u.imageheight),s.push(f)}else{var M=new c(u.name,u.firstgid,u.tilewidth,u.tileheight,u.margin,u.spacing,u.properties),P=0;for(g=0;g<u.tiles.length;g++){x=u.tiles[g];var A=x.image,R=parseInt(x.id,10),F=u.firstgid+R;M.addImage(F,A),P=Math.max(R,P)}M.maxId=P,o.push(M)}i&&(i.lastgid=u.firstgid-1),i=u}return{tilesets:s,imageCollections:o}};p.exports=n},57880:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){for(var c=0;c<t.length;c++){var h=t[c],r=c;if(h.name&&h.name!==""&&(r=h.name),Array.isArray(h.wangtiles)&&h.wangtiles.length>0){var n={},e={},s,o,i;if(Array.isArray(h.edgecolors))for(s=0;s<h.edgecolors.length;s++)i=1+s,o=h.edgecolors[s],o.name!==""&&(n[i]=o.name);if(Array.isArray(h.cornercolors))for(s=0;s<h.cornercolors.length;s++)i=1+s,o=h.cornercolors[s],o.name!==""&&(e[i]=o.name);if(Array.isArray(h.colors))for(s=0;s<h.colors.length;s++)o=h.colors[s],i=1+s,o.name!==""&&(n[i]=e[i]=o.name);for(var a=[n,e,n,e,n,e,n,e],l=0;l<h.wangtiles.length;l++){var u=h.wangtiles[l],f=d[u.tileid]||(d[u.tileid]={});f=f.wangid||(f.wangid={});for(var v=[],m=0;m<Math.min(a.length,u.wangid.length);m++){if(o=u.wangid[m],o===0){v.push(void 0);continue}var g=a[m][o];if(g!==void 0){v.push(g);continue}v.push(o)}f[r]=v}}}};p.exports=S},96761:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={AssignTileProperties:t(51233),Base64Decode:t(41868),BuildTilesetIndex:t(84101),CreateGroupLayer:t(79677),ParseGID:t(29920),ParseImageLayers:t(12635),ParseJSONTiled:t(46594),ParseObject:t(52205),ParseObjectLayers:t(22611),ParseTileLayers:t(28200),ParseTilesets:t(24619)}},33385:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(37277),h=t(44594),r=t(94880),n=t(72905),e=new d({initialize:function(o){this.scene=o,this.systems=o.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],o.sys.events.once(h.BOOT,this.boot,this),o.sys.events.on(h.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(h.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var s=this.systems.events;s.on(h.PRE_UPDATE,this.preUpdate,this),s.on(h.UPDATE,this.update,this),s.once(h.SHUTDOWN,this.shutdown,this)},addEvent:function(s){var o;return s instanceof r?(o=s,this.removeEvent(o),o.elapsed=o.startAt,o.hasDispatched=!1,o.repeatCount=o.repeat===-1||o.loop?999999999999:o.repeat):o=new r(s),this._pendingInsertion.push(o),o},delayedCall:function(s,o,i,a){return this.addEvent({delay:s,callback:o,args:i,callbackScope:a})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(s){Array.isArray(s)||(s=[s]);for(var o=0;o<s.length;o++){var i=s[o];n(this._pendingRemoval,i),n(this._pendingInsertion,i),n(this._active,i)}return this},removeAllEvents:function(){return this._pendingRemoval=this._pendingRemoval.concat(this._active),this},preUpdate:function(){var s=this._pendingRemoval.length,o=this._pendingInsertion.length;if(!(s===0&&o===0)){var i,a;for(i=0;i<s;i++){a=this._pendingRemoval[i];var l=this._active.indexOf(a);l>-1&&this._active.splice(l,1),a.destroy()}for(i=0;i<o;i++)a=this._pendingInsertion[i],this._active.push(a);this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(s,o){if(this.now=s,!this.paused){o*=this.timeScale;for(var i=0;i<this._active.length;i++){var a=this._active[i];if(!a.paused&&(a.elapsed+=o*a.timeScale,a.elapsed>=a.delay)){var l=a.elapsed-a.delay;if(a.elapsed=a.delay,!a.hasDispatched&&a.callback&&(a.hasDispatched=!0,a.callback.apply(a.callbackScope,a.args)),a.repeatCount>0){if(a.repeatCount--,l>=a.delay)for(;l>=a.delay&&a.repeatCount>0;)a.callback&&a.callback.apply(a.callbackScope,a.args),l-=a.delay,a.repeatCount--;a.elapsed=l,a.hasDispatched=!1}else a.hasDispatched&&this._pendingRemoval.push(a)}}}},shutdown:function(){var s;for(s=0;s<this._pendingInsertion.length;s++)this._pendingInsertion[s].destroy();for(s=0;s<this._active.length;s++)this._active[s].destroy();for(s=0;s<this._pendingRemoval.length;s++)this._pendingRemoval[s].destroy();this._active.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var o=this.systems.events;o.off(h.PRE_UPDATE,this.preUpdate,this),o.off(h.UPDATE,this.update,this),o.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(h.START,this.start,this),this.scene=null,this.systems=null}});c.register("Clock",e,"time"),p.exports=e},96120:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(50792),h=t(39429),r=t(95540),n=t(44594),e=t(89809),s=new d({Extends:c,initialize:function(i,a){c.call(this),this.scene=i,this.systems=i.sys,this.elapsed=0,this.timeScale=1,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var l=this.systems.events;l.on(n.PRE_UPDATE,this.preUpdate,this),l.on(n.UPDATE,this.update,this),l.once(n.SHUTDOWN,this.destroy,this),a&&this.add(a)},preUpdate:function(o,i){this.paused||(this.elapsed+=i*this.timeScale)},update:function(){if(!(this.paused||this.complete)){var o,i=this.events,a=!1,l=this.systems,u;for(o=0;o<i.length;o++){var f=i[o];if(!f.complete&&f.time<=this.elapsed){if(f.complete=!0,this.totalComplete++,u=f.target?f.target:this,f.if&&!f.if.call(u,f))continue;if(f.once&&(a=!0),f.set&&f.target)for(var v in f.set)f.target[v]=f.set[v];this.iteration&&f.repeat++,f.loop&&f.repeat&&f.loop.call(u),f.tween&&(f.tweenInstance=l.tweens.add(f.tween)),f.sound&&(typeof f.sound=="string"?l.sound.play(f.sound):l.sound.play(f.sound.key,f.sound.config)),f.event&&this.emit(f.event,u),f.run&&f.run.call(u),f.stop&&this.stop()}}if(a)for(o=0;o<i.length;o++)i[o].complete&&i[o].once&&(i.splice(o,1),o--);this.totalComplete>=i.length&&(this.loop!==0&&(this.loop===-1||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(e.COMPLETE,this)}},play:function(o){return o===void 0&&(o=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,o&&this.reset(),this},pause:function(){this.paused=!0;for(var o=this.events,i=0;i<o.length;i++){var a=o[i];a.tweenInstance&&(a.tweenInstance.paused=!0)}return this},repeat:function(o){return(o===void 0||o===!0)&&(o=-1),o===!1&&(o=0),this.loop=o,this},resume:function(){this.paused=!1;for(var o=this.events,i=0;i<o.length;i++){var a=o[i];a.tweenInstance&&(a.tweenInstance.paused=!1)}return this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(o){o===void 0&&(o=!1),this.elapsed=0,o||(this.iteration=0);for(var i=this.events,a=0;a<i.length;a++){var l=i[a];l.complete=!1,o||(l.repeat=0),l.tweenInstance&&l.tweenInstance.stop()}return this.play(!1)},add:function(o){Array.isArray(o)||(o=[o]);var i=this.events,a=0;i.length>0&&(a=i[i.length-1].time);for(var l=0;l<o.length;l++){var u=o[l],f=r(u,"at",0),v=r(u,"in",null);v!==null&&(f=this.elapsed+v);var m=r(u,"from",null);m!==null&&(f=a+m),i.push({complete:!1,time:f,repeat:0,if:r(u,"if",null),run:r(u,"run",null),loop:r(u,"loop",null),event:r(u,"event",null),target:r(u,"target",null),set:r(u,"set",null),tween:r(u,"tween",null),sound:r(u,"sound",null),once:r(u,"once",!1),stop:r(u,"stop",!1)}),a=f}return this.complete=!1,this},clear:function(){for(var o=this.events,i=0;i<o.length;i++){var a=o[i];a.tweenInstance&&a.tweenInstance.stop()}return o=[],this.elapsed=0,this.paused=!0,this},isPlaying:function(){return!this.paused&&!this.complete},getProgress:function(){var o=Math.min(this.totalComplete,this.events.length);return o/this.events.length},destroy:function(){var o=this.systems.events;o.off(n.PRE_UPDATE,this.preUpdate,this),o.off(n.UPDATE,this.update,this),o.off(n.SHUTDOWN,this.destroy,this),this.clear(),this.scene=null,this.systems=null}});h.register("timeline",function(o){return new s(this.scene,o)}),p.exports=s},94880:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(95540),h=new d({initialize:function(n){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(n)},reset:function(r){if(this.delay=c(r,"delay",0),this.repeat=c(r,"repeat",0),this.loop=c(r,"loop",!1),this.callback=c(r,"callback",void 0),this.callbackScope=c(r,"callbackScope",this),this.args=c(r,"args",[]),this.timeScale=c(r,"timeScale",1),this.startAt=c(r,"startAt",0),this.paused=c(r,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=this.repeat===-1||this.loop?999999999999:this.repeat,this.delay===0&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var r=this.delay+this.delay*this.repeat,n=this.elapsed+this.delay*(this.repeat-this.repeatCount);return n/r}else return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return this.elapsed*.001},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return this.getRemaining()*.001},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return this.getOverallRemaining()*.001},remove:function(r){r===void 0&&(r=!1),this.elapsed=this.delay,this.hasDispatched=!r,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});p.exports=h},35945:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="complete"},89809:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={COMPLETE:t(35945)}},90291:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Clock:t(33385),Events:t(89809),Timeline:t(96120),TimerEvent:t(94880)}},40382:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(72905),c=t(83419),h=t(43491),r=t(88032),n=t(37277),e=t(44594),s=t(93109),o=t(86081),i=t(8357),a=t(43960),l=t(26012),u=new c({initialize:function(v){this.scene=v,this.events=v.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(e.BOOT,this.boot,this),this.events.on(e.START,this.start,this)},boot:function(){this.events.once(e.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(e.UPDATE,this.update,this),this.events.once(e.SHUTDOWN,this.shutdown,this)},create:function(f){Array.isArray(f)||(f=[f]);for(var v=[],m=0;m<f.length;m++){var g=f[m];g instanceof o||g instanceof a?v.push(g):Array.isArray(g.tweens)?v.push(l(this,g)):v.push(i(this,g))}return v.length===1?v[0]:v},add:function(f){var v=f,m=this.tweens;return v instanceof o||v instanceof a||(Array.isArray(v.tweens)?v=l(this,v):v=i(this,v)),m.push(v.reset()),v},addMultiple:function(f){for(var v,m=[],g=this.tweens,x=0;x<f.length;x++)v=f[x],v instanceof o||v instanceof a||(Array.isArray(v.tweens)?v=l(this,v):v=i(this,v)),g.push(v.reset()),m.push(v);return m},chain:function(f){var v=l(this,f);return this.tweens.push(v.init()),v},getChainedTweens:function(f){return f.getChainedTweens()},has:function(f){return this.tweens.indexOf(f)>-1},existing:function(f){return this.has(f)||this.tweens.push(f.reset()),this},addCounter:function(f){var v=r(this,f);return this.tweens.push(v.reset()),v},stagger:function(f,v){return s(f,v)},setLagSmooth:function(f,v){return f===void 0&&(f=1/1e-8),v===void 0&&(v=0),this.maxLag=f,this.lagSkip=Math.min(v,this.maxLag),this},setFps:function(f){return f===void 0&&(f=240),this.gap=1e3/f,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(f){var v=Date.now()-this.prevTime;v>this.maxLag&&(this.startTime+=v-this.lagSkip),this.prevTime+=v;var m=this.prevTime-this.startTime,g=m-this.nextTime,x=m-this.time*1e3;return g>0||f?(m/=1e3,this.time=m,this.nextTime+=g+(g>=this.gap?4:this.gap-g)):x=0,x},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(f){f===void 0&&(f=!1);var v=this.getDelta(f);if(!(v<=0)){this.processing=!0;var m,g,x=[],y=this.tweens;for(m=0;m<y.length;m++)g=y[m],g.update(v)&&x.push(g);var T=x.length;if(T&&y.length>0){for(m=0;m<T;m++){g=x[m];var C=y.indexOf(g);C>-1&&(g.isPendingRemove()||g.isDestroyed())&&(y.splice(C,1),g.destroy())}x.length=0}this.processing=!1}},remove:function(f){return this.processing?f.setPendingRemoveState():(d(this.tweens,f),f.setRemovedState()),this},reset:function(f){return this.existing(f),f.seek(),f.setActiveState(),this},makeActive:function(f){return this.existing(f),f.setActiveState(),this},each:function(f,v){var m,g=[null];for(m=1;m<arguments.length;m++)g.push(arguments[m]);return this.tweens.forEach(function(x){g[0]=x,f.apply(v,g)}),this},getTweens:function(){return this.tweens.slice()},getTweensOf:function(f){var v=[],m=this.tweens;Array.isArray(f)?f=h(f):f=[f];for(var g=f.length,x=0;x<m.length;x++)for(var y=m[x],T=0;T<g;T++)!y.isDestroyed()&&y.hasTarget(f[T])&&v.push(y);return v},getGlobalTimeScale:function(){return this.timeScale},setGlobalTimeScale:function(f){return this.timeScale=f,this},isTweening:function(f){for(var v=this.tweens,m,g=0;g<v.length;g++)if(m=v[g],m.isPlaying()&&m.hasTarget(f))return!0;return!1},killAll:function(){for(var f=this.processing?this.getTweens():this.tweens,v=0;v<f.length;v++)f[v].destroy();return this.processing||(f.length=0),this},killTweensOf:function(f){for(var v=this.getTweensOf(f),m=0;m<v.length;m++)v[m].destroy();return this},pauseAll:function(){return this.paused=!0,this},resumeAll:function(){return this.paused=!1,this},shutdown:function(){this.killAll(),this.tweens=[],this.events.off(e.UPDATE,this.update,this),this.events.off(e.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(e.START,this.start,this),this.scene=null,this.events=null}});n.register("TweenManager",u,"tweens"),p.exports=u},57355:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){return t&&t.hasOwnProperty(d)?t[d]:c};p.exports=S},6113:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(62640),c=t(35355),h=function(r,n){var e=d.Power0;if(typeof r=="string")if(d.hasOwnProperty(r))e=d[r];else{var s="";if(r.indexOf(".")){s=r.substring(r.indexOf(".")+1);var o=s.toLowerCase();o==="in"?s="easeIn":o==="out"?s="easeOut":o==="inout"&&(s="easeInOut")}r=c(r.substring(0,r.indexOf(".")+1)+s),d.hasOwnProperty(r)&&(e=d[r])}else typeof r=="function"&&(e=r);if(!n)return e;var i=n.slice(0);return i.unshift(0),function(a){return i[0]=a,e.apply(this,i)}};p.exports=h},91389:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(89318),c=t(77259),h=t(28392),r={bezier:d,catmull:c,catmullrom:c,linear:h},n=function(e){if(e===null)return null;var s=r.linear;return typeof e=="string"?r.hasOwnProperty(e)&&(s=r[e]):typeof e=="function"&&(s=e),s};p.exports=n},55292:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h;if(t.hasOwnProperty(d)){var r=typeof t[d];r==="function"?h=function(n,e,s,o,i,a){return t[d](n,e,s,o,i,a)}:h=function(){return t[d]}}else typeof c=="function"?h=c:h=function(){return c};return h};p.exports=S},82985:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(81076),c=function(h){var r,n=[];if(h.hasOwnProperty("props"))for(r in h.props)r.substring(0,1)!=="_"&&n.push({key:r,value:h.props[r]});else for(r in h)d.indexOf(r)===-1&&r.substring(0,1)!=="_"&&n.push({key:r,value:h[r]});return n};p.exports=c},62329:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(35154),c=function(h){var r=d(h,"targets",null);return r===null||(typeof r=="function"&&(r=r.call()),Array.isArray(r)||(r=[r])),r};p.exports=c},17777:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(30976),c=t(99472);function h(o){return!!o.getActive&&typeof o.getActive=="function"}function r(o){return!!o.getStart&&typeof o.getStart=="function"}function n(o){return!!o.getEnd&&typeof o.getEnd=="function"}function e(o){return r(o)||n(o)||h(o)}var s=function(o,i){var a,l=function(N,U,D){return D},u=function(N,U,D){return D},f=null,v=typeof i;if(v==="number")l=function(){return i};else if(Array.isArray(i))u=function(){return i[0]},l=function(){return i[i.length-1]};else if(v==="string"){var m=i.toLowerCase(),g=m.substring(0,6)==="random",x=m.substring(0,3)==="int";if(g||x){var y=m.indexOf("("),T=m.indexOf(")"),C=m.indexOf(",");if(y&&T&&C){var E=parseFloat(m.substring(y+1,C)),M=parseFloat(m.substring(C+1,T));g?l=function(){return c(E,M)}:l=function(){return d(E,M)}}else throw new Error("invalid random() format")}else{m=m[0];var P=parseFloat(i.substr(2));switch(m){case"+":l=function(N,U,D){return D+P};break;case"-":l=function(N,U,D){return D-P};break;case"*":l=function(N,U,D){return D*P};break;case"/":l=function(N,U,D){return D/P};break;default:l=function(){return parseFloat(i)}}}}else if(v==="function")l=i;else if(v==="object")if(e(i))h(i)&&(f=i.getActive),n(i)&&(l=i.getEnd),r(i)&&(u=i.getStart);else if(i.hasOwnProperty("value"))a=s(o,i.value);else{var A=i.hasOwnProperty("to"),R=i.hasOwnProperty("from"),F=i.hasOwnProperty("start");if(A&&(R||F)){if(a=s(o,i.to),F){var w=s(o,i.start);a.getActive=w.getEnd}if(R){var B=s(o,i.from);a.getStart=B.getEnd}}}return a||(a={getActive:f,getEnd:l,getStart:u}),a};p.exports=s},88032:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(70402),c=t(69902),h=t(23568),r=t(57355),n=t(6113),e=t(55292),s=t(35154),o=t(17777),i=t(269),a=t(86081),l=function(u,f,v){if(f instanceof a)return f.parent=u,f;v===void 0?v=c:v=i(c,v);var m=s(f,"from",0),g=s(f,"to",1),x=[{value:m}],y=s(f,"delay",v.delay),T=s(f,"easeParams",v.easeParams),C=s(f,"ease",v.ease),E=o("value",g),M=new a(u,x),P=M.add(0,"value",E.getEnd,E.getStart,E.getActive,n(s(f,"ease",C),s(f,"easeParams",T)),e(f,"delay",y),s(f,"duration",v.duration),r(f,"yoyo",v.yoyo),s(f,"hold",v.hold),s(f,"repeat",v.repeat),s(f,"repeatDelay",v.repeatDelay),!1,!1);P.start=m,P.current=m,M.completeDelay=h(f,"completeDelay",0),M.loop=Math.round(h(f,"loop",0)),M.loopDelay=Math.round(h(f,"loopDelay",0)),M.paused=r(f,"paused",!1),M.persist=r(f,"persist",!1),M.callbackScope=s(f,"callbackScope",M);for(var A=d.TYPES,R=0;R<A.length;R++){var F=A[R],w=s(f,F,!1);if(w){var B=s(f,F+"Params",[]);M.setCallback(F,w,B)}}return M};p.exports=l},93109:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(6113),c=t(35154),h=t(36383),r=function(n,e){e===void 0&&(e={});var s,o=c(e,"start",0),i=c(e,"ease",null),a=c(e,"grid",null),l=c(e,"from",0),u=l==="first",f=l==="center",v=l==="last",m=typeof l=="number",g=Array.isArray(n),x=parseFloat(g?n[0]:n),y=g?parseFloat(n[1]):0,T=Math.max(x,y);if(g&&(o+=x),a){var C=a[0],E=a[1],M=0,P=0,A=0,R=0,F=[];v?(M=C-1,P=E-1):m?(M=l%C,P=Math.floor(l/C)):f&&(M=(C-1)/2,P=(E-1)/2);for(var w=h.MIN_SAFE_INTEGER,B=0;B<E;B++){F[B]=[];for(var N=0;N<C;N++){A=M-N,R=P-B;var U=Math.sqrt(A*A+R*R);U>w&&(w=U),F[B][N]=U}}}var D=i?d(i):null;return a?s=function(I,O,L,G){var z=0,X=G%C,V=Math.floor(G/C);X>=0&&X<C&&V>=0&&V<E&&(z=F[V][X]);var Y;if(g){var W=y-x;D?Y=z/w*W*D(z/w):Y=z/w*W}else D?Y=z*x*D(z/w):Y=z*x;return Y+o}:s=function(I,O,L,G,z){z--;var X;u?X=G:f?X=Math.abs(z/2-G):v?X=z-G:m&&(X=Math.abs(l-G));var V;if(g){var Y;f?Y=(y-x)/z*(X*2):Y=(y-x)/z*X,D?V=Y*D(X/z):V=Y}else D?V=z*T*D(X/z):V=X*x;return V+o},s};p.exports=r},8357:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(70402),c=t(69902),h=t(23568),r=t(57355),n=t(6113),e=t(91389),s=t(55292),o=t(82985),i=t(62329),a=t(35154),l=t(17777),u=t(269),f=t(86081),v=function(m,g,x){if(g instanceof f)return g.parent=m,g;x===void 0?x=c:x=u(c,x);var y=i(g);!y&&x.targets&&(y=x.targets);for(var T=o(g),C=a(g,"delay",x.delay),E=a(g,"duration",x.duration),M=a(g,"easeParams",x.easeParams),P=a(g,"ease",x.ease),A=a(g,"hold",x.hold),R=a(g,"repeat",x.repeat),F=a(g,"repeatDelay",x.repeatDelay),w=r(g,"yoyo",x.yoyo),B=r(g,"flipX",x.flipX),N=r(g,"flipY",x.flipY),U=a(g,"interpolation",x.interpolation),D=function(b,K,Q,Z){if(Q==="texture"){var $=Z,q=void 0;Array.isArray(Z)?($=Z[0],q=Z[1]):Z.hasOwnProperty("value")?($=Z.value,Array.isArray(Z.value)?($=Z.value[0],q=Z.value[1]):typeof Z.value=="string"&&($=Z.value)):typeof Z=="string"&&($=Z),b.addFrame(K,$,q,s(Z,"delay",C),a(Z,"duration",E),a(Z,"hold",A),a(Z,"repeat",R),a(Z,"repeatDelay",F),r(Z,"flipX",B),r(Z,"flipY",N))}else{var _=l(Q,Z),tt=e(a(Z,"interpolation",U));b.add(K,Q,_.getEnd,_.getStart,_.getActive,n(a(Z,"ease",P),a(Z,"easeParams",M)),s(Z,"delay",C),a(Z,"duration",E),r(Z,"yoyo",w),a(Z,"hold",A),a(Z,"repeat",R),a(Z,"repeatDelay",F),r(Z,"flipX",B),r(Z,"flipY",N),tt,tt?Z:null)}},I=new f(m,y),O=0;O<T.length;O++)for(var L=T[O].key,G=T[O].value,z=0;z<y.length;z++)L==="scale"&&!y[z].hasOwnProperty("scale")?(D(I,z,"scaleX",G),D(I,z,"scaleY",G)):D(I,z,L,G);I.completeDelay=h(g,"completeDelay",0),I.loop=Math.round(h(g,"loop",0)),I.loopDelay=Math.round(h(g,"loopDelay",0)),I.paused=r(g,"paused",!1),I.persist=r(g,"persist",!1),I.callbackScope=a(g,"callbackScope",I);for(var X=d.TYPES,V=0;V<X.length;V++){var Y=X[V],W=a(g,Y,!1);if(W){var H=a(g,Y+"Params",[]);I.setCallback(Y,W,H)}}return I};p.exports=v},26012:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(70402),c=t(23568),h=t(57355),r=t(62329),n=t(35154),e=t(8357),s=t(43960),o=function(i,a){if(a instanceof s)return a.parent=i,a;var l=new s(i);l.startDelay=n(a,"delay",0),l.completeDelay=c(a,"completeDelay",0),l.loop=Math.round(c(a,"loop",n(a,"repeat",0))),l.loopDelay=Math.round(c(a,"loopDelay",n(a,"repeatDelay",0))),l.paused=h(a,"paused",!1),l.persist=h(a,"persist",!1),l.callbackScope=n(a,"callbackScope",l);var u,f=d.TYPES;for(u=0;u<f.length;u++){var v=f[u],m=n(a,v,!1);if(m){var g=n(a,v+"Params",[]);l.setCallback(v,m,g)}}var x=n(a,"tweens",null);if(Array.isArray(x)){var y=[],T=r(a),C=void 0;for(T&&(C={targets:T}),u=0;u<x.length;u++)y.push(e(l,x[u],C));l.add(y)}return l};p.exports=o},30231:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={GetBoolean:t(57355),GetEaseFunction:t(6113),GetInterpolationFunction:t(91389),GetNewValue:t(55292),GetProps:t(82985),GetTargets:t(62329),GetValueOp:t(17777),NumberTweenBuilder:t(88032),StaggerBuilder:t(93109),TweenBuilder:t(8357)}},73685:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="active"},98540:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="complete"},67233:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="loop"},2859:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="pause"},98336:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="repeat"},25764:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="resume"},32193:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="start"},84371:p=>{/**
* @author samme
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="stop"},70766:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="update"},55659:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports="yoyo"},842:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={TWEEN_ACTIVE:t(73685),TWEEN_COMPLETE:t(98540),TWEEN_LOOP:t(67233),TWEEN_PAUSE:t(2859),TWEEN_RESUME:t(25764),TWEEN_REPEAT:t(98336),TWEEN_START:t(32193),TWEEN_STOP:t(84371),TWEEN_UPDATE:t(70766),TWEEN_YOYO:t(55659)}},43066:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d={States:t(86353),Builders:t(30231),Events:t(842),TweenManager:t(40382),Tween:t(86081),TweenData:t(48177),TweenFrameData:t(42220),BaseTween:t(70402),TweenChain:t(43960)};p.exports=d},70402:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(50792),h=t(842),r=t(86353),n=new d({Extends:c,initialize:function(s){c.call(this),this.parent=s,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=r.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(e){return this.timeScale=e,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(h.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(h.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(h.TWEEN_COMPLETE,"onComplete")},complete:function(e){return e===void 0&&(e=0),e?(this.setCompleteDelayState(),this.countdown=e):this.onCompleteHandler(),this},completeAfterLoop:function(e){return e===void 0&&(e=0),this.loopCounter>e&&(this.loopCounter=e),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return this.parent&&!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(h.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(e){this.countdown-=e,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(h.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(e){return this.countdown-=e,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(h.TWEEN_START,"onStart"),e=0),e},updateCompleteDelay:function(e){this.countdown-=e,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(e,s,o){return o===void 0&&(o=[]),this.callbacks.hasOwnProperty(e)&&(this.callbacks[e]={func:s,params:o}),this},setPendingState:function(){this.state=r.PENDING},setActiveState:function(){this.state=r.ACTIVE,this.hasStarted=!1},setLoopDelayState:function(){this.state=r.LOOP_DELAY},setCompleteDelayState:function(){this.state=r.COMPLETE_DELAY},setStartDelayState:function(){this.state=r.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=r.PENDING_REMOVE},setRemovedState:function(){this.state=r.REMOVED},setFinishedState:function(){this.state=r.FINISHED},setDestroyedState:function(){this.state=r.DESTROYED},isPending:function(){return this.state===r.PENDING},isActive:function(){return this.state===r.ACTIVE},isLoopDelayed:function(){return this.state===r.LOOP_DELAY},isCompleteDelayed:function(){return this.state===r.COMPLETE_DELAY},isStartDelayed:function(){return this.state===r.START_DELAY},isPendingRemove:function(){return this.state===r.PENDING_REMOVE},isRemoved:function(){return this.state===r.REMOVED},isFinished:function(){return this.state===r.FINISHED},isDestroyed:function(){return this.state===r.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(e){e.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});n.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],p.exports=n},95042:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(83419),c=t(842),h=t(86353),r=new d({initialize:function(e,s,o,i,a,l,u,f,v,m){this.tween=e,this.targetIndex=s,this.duration=i,this.totalDuration=0,this.delay=0,this.getDelay=o,this.yoyo=a,this.hold=l,this.repeat=u,this.repeatDelay=f,this.repeatCounter=0,this.flipX=v,this.flipY=m,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(n){n===void 0&&(n=this.current),this.tween.targets[this.targetIndex][this.key]=n},setCreatedState:function(){this.state=h.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=h.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=h.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=h.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=h.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=h.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=h.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=h.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===h.CREATED},isDelayed:function(){return this.state===h.DELAY},isPendingRender:function(){return this.state===h.PENDING_RENDER},isPlayingForward:function(){return this.state===h.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===h.PLAYING_BACKWARD},isHolding:function(){return this.state===h.HOLD_DELAY},isRepeating:function(){return this.state===h.REPEAT_DELAY},isComplete:function(){return this.state===h.COMPLETE},setStateFromEnd:function(n){this.yoyo?this.onRepeat(n,!0,!0):this.repeatCounter>0?this.onRepeat(n,!0,!1):this.setCompleteState()},setStateFromStart:function(n){this.repeatCounter>0?this.onRepeat(n,!1):this.setCompleteState()},reset:function(){var n=this.tween,e=n.totalTargets,s=this.targetIndex,o=n.targets[s],i=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(o,i,0,s,e,n),this.repeatCounter=this.repeat===-1?h.MAX:this.repeat,this.setPendingRenderState();var a=this.duration+this.hold;this.yoyo&&(a+=this.duration);var l=a+this.repeatDelay;this.totalDuration=this.delay+a,this.repeat===-1?(this.totalDuration+=l*h.MAX,n.isInfinite=!0):this.repeat>0&&(this.totalDuration+=l*this.repeat),this.totalDuration>n.duration&&(n.duration=this.totalDuration),this.delay<n.startDelay&&(n.startDelay=this.delay),this.delay>0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(n,e,s){var o=this.tween,i=o.totalTargets,a=this.targetIndex,l=o.targets[a],u=this.key,f=u!=="texture";if(this.elapsed=n,this.progress=n/this.duration,this.flipX&&l.toggleFlipX(),this.flipY&&l.toggleFlipY(),f&&(e||s)&&(this.start=this.getStartValue(l,u,this.start,a,i,o)),s){this.setPlayingBackwardState(),this.dispatchEvent(c.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,f&&(this.end=this.getEndValue(l,u,this.start,a,i,o)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-n,f&&(this.current=this.start,l[u]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(c.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});p.exports=r},69902:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null};p.exports=S},81076:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},86081:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(70402),c=t(83419),h=t(842),r=t(44603),n=t(39429),e=t(36383),s=t(86353),o=t(48177),i=t(42220),a=new c({Extends:d,initialize:function(u,f){d.call(this,u),this.targets=f,this.totalTargets=f.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(l,u,f,v,m,g,x,y,T,C,E,M,P,A,R,F){var w=new o(this,l,u,f,v,m,g,x,y,T,C,E,M,P,A,R,F);return this.totalData=this.data.push(w),w},addFrame:function(l,u,f,v,m,g,x,y,T,C){var E=new i(this,l,u,f,v,m,g,x,y,T,C);return this.totalData=this.data.push(E),E},getValue:function(l){l===void 0&&(l=0);var u=null;return this.data&&(u=this.data[l].current),u},hasTarget:function(l){return this.targets&&this.targets.indexOf(l)!==-1},updateTo:function(l,u,f){if(f===void 0&&(f=!1),l!=="texture")for(var v=0;v<this.totalData;v++){var m=this.data[v];m.key===l&&(m.isPlayingForward()||m.isPlayingBackward())&&(m.end=u,f&&(m.start=m.current))}return this},restart:function(){switch(this.state){case s.REMOVED:case s.FINISHED:this.seek(),this.parent.makeActive(this);break;case s.PENDING:case s.PENDING_REMOVE:this.parent.reset(this);break;case s.DESTROYED:console.warn("Cannot restart destroyed Tween",this);break;default:this.seek();break}return this.paused=!1,this.hasStarted=!1,this},nextState:function(){if(this.loopCounter>0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(h.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,d.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(l,u,f){if(l===void 0&&(l=0),u===void 0&&(u=16.6),f===void 0&&(f=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;f||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive");var v=this.paused;if(this.paused=!1,l>0){for(var m=Math.floor(l/u),g=l-m*u,x=0;x<m;x++)this.update(u);g>0&&this.update(g)}return this.paused=v,this.isSeeking=!1,this},initTweenData:function(l){l===void 0&&(l=!1),this.duration=0,this.startDelay=e.MAX_SAFE_INTEGER;for(var u=this.data,f=0;f<this.totalData;f++)u[f].reset(l);this.duration=Math.max(this.duration,.01);var v=this.duration,m=this.completeDelay,g=this.loopCounter,x=this.loopDelay;g>0?this.totalDuration=v+m+(v+x)*g:this.totalDuration=v+m},reset:function(l){return l===void 0&&(l=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,this.loop===-1&&(this.isInfinite=!0,this.loopCounter=s.MAX),l||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive")),this},update:function(l){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(l*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(l),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(l),!1;this.hasStarted||(this.startDelay-=l,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(h.TWEEN_START,"onStart"),l=0));var u=!1;if(this.isActive())for(var f=this.data,v=0;v<this.totalData;v++)f[v].update(l)&&(u=!0);this.elapsed+=l,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=l,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),u||this.nextState();var m=this.isPendingRemove();return m&&this.persist&&(this.setFinishedState(),m=!1),m},forward:function(l){return this.update(l),this},rewind:function(l){return this.update(-l),this},dispatchEvent:function(l,u){if(!this.isSeeking){this.emit(l,this,this.targets);var f=this.callbacks[u];f&&f.func.apply(this.callbackScope,[this,this.targets].concat(f.params))}},destroy:function(){d.prototype.destroy.call(this),this.targets=null}});n.register("tween",function(l){return this.scene.sys.tweens.add(l)}),r.register("tween",function(l){return this.scene.sys.tweens.create(l)}),p.exports=a},43960:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(72905),c=t(70402),h=t(83419),r=t(842),n=t(44603),e=t(39429),s=t(86353),o=new h({Extends:c,initialize:function(a){c.call(this,a),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?s.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this},add:function(i){var a=this.parent.create(i);Array.isArray(a)||(a=[a]);for(var l=this.data,u=0;u<a.length;u++){var f=a[u];f.parent=this,l.push(f.reset())}return this.totalData=l.length,this},remove:function(i){return d(this.data,i),i.setRemovedState(),i===this.currentTween&&this.nextTween(),this.totalData=this.data.length,this},hasTarget:function(i){for(var a=this.data,l=0;l<this.totalData;l++)if(a[l].hasTarget(i))return!0;return!1},restart:function(){return this.isDestroyed()?(console.warn("Cannot restart destroyed TweenChain",this),this):(this.isRemoved()&&this.parent.makeActive(this),this.resetTweens(),this.paused=!1,this.init())},reset:function(i){return i.seek(),i.setActiveState(),this},makeActive:function(i){return i.reset(),i.setActiveState(),this},nextState:function(){if(this.loopCounter>0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var i=this.data,a=this.totalData,l=0;l<a;l++)i[l].reset(!1);this.setCurrentTween(0)},update:function(i){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.isFinished()||this.paused)return!1;i*=this.parent.timeScale,this.isLoopDelayed()?this.updateLoopCountdown(i):this.isCompleteDelayed()?this.updateCompleteDelay(i):this.isStartDelayed()&&(i=this.updateStartCountdown(i));var a=!1;return this.isActive()&&this.currentTween&&(this.currentTween.update(i)&&this.nextTween()&&this.nextState(),a=this.isPendingRemove(),a&&this.persist&&(this.setFinishedState(),a=!1)),a},nextTween:function(){return this.currentIndex++,this.currentIndex===this.totalData?!0:(this.setCurrentTween(this.currentIndex),!1)},setCurrentTween:function(i){this.currentIndex=i,this.currentTween=this.data[i],this.currentTween.setActiveState()},dispatchEvent:function(i,a){this.emit(i,this);var l=this.callbacks[a];l&&l.func.apply(this.callbackScope,[this].concat(l.params))},destroy:function(){c.prototype.destroy.call(this),this.currentTween=null}});e.register("tweenchain",function(i){return this.scene.sys.tweens.chain(i)}),n.register("tweenchain",function(i){return this.scene.sys.tweens.create(i)}),p.exports=o},48177:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(95042),c=t(45319),h=t(83419),r=t(842),n=new h({Extends:d,initialize:function(s,o,i,a,l,u,f,v,m,g,x,y,T,C,E,M,P){d.call(this,s,o,v,m,g,x,y,T,C,E),this.key=i,this.getActiveValue=u,this.getEndValue=a,this.getStartValue=l,this.ease=f,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=M,this.interpolationData=P},reset:function(e){d.prototype.reset.call(this);var s=this.tween.targets[this.targetIndex],o=this.key;e&&(s[o]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(s[o]=this.getActiveValue(s,o,0))},update:function(e){var s=this.tween,o=s.totalTargets,i=this.targetIndex,a=s.targets[i],l=this.key;if(!a)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=e,this.elapsed<=0&&(this.elapsed=0,e=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(a,l,a[l],i,o,s),this.end=this.getEndValue(a,l,this.start,i,o,s),this.current=this.start,a[l]=this.start,this.setPlayingForwardState(),!0;var u=this.isPlayingForward(),f=this.isPlayingBackward();if(u||f){var v=this.elapsed,m=this.duration,g=0,x=!1;v+=e,v>=m?(g=v-m,v=m,x=!0):v<0&&(v=0);var y=c(v/m,0,1);if(this.elapsed=v,this.progress=y,this.previous=this.current,x)u?(this.current=this.end,a[l]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(g)):(this.current=this.start,a[l]=this.start,this.setStateFromStart(g));else{u||(y=1-y);var T=this.ease(y);this.interpolation?this.current=this.interpolation(this.interpolationData,T):this.current=this.start+(this.end-this.start)*T,a[l]=this.current}this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,s){var o=this.tween;if(!o.isSeeking){var i=o.targets[this.targetIndex],a=this.key,l=this.current,u=this.previous;o.emit(e,o,a,i,l,u);var f=o.callbacks[s];f&&f.func.apply(o.callbackScope,[o,i,a,l,u].concat(f.params))}},destroy:function(){d.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});p.exports=n},42220:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(95042),c=t(45319),h=t(83419),r=t(842),n=new h({Extends:d,initialize:function(s,o,i,a,l,u,f,v,m,g,x){d.call(this,s,o,l,u,!1,f,v,m,g,x),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=a,this.yoyo=v!==0},reset:function(e){d.prototype.reset.call(this);var s=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=s.texture.key,this.startFrame=s.frame.name),e&&s.setTexture(this.startTexture,this.startFrame)},update:function(e){var s=this.tween,o=this.targetIndex,i=s.targets[o];if(!i)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=e,this.elapsed<=0&&(this.elapsed=0,e=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&i.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var a=this.isPlayingForward(),l=this.isPlayingBackward();if(a||l){var u=this.elapsed,f=this.duration,v=0,m=!1;u+=e,u>=f?(v=u-f,u=f,m=!0):u<0&&(u=0);var g=c(u/f,0,1);this.elapsed=u,this.progress=g,m&&(a?(i.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(v)):(i.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(v))),this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,s){var o=this.tween;if(!o.isSeeking){var i=o.targets[this.targetIndex],a=this.key;o.emit(e,o,a,i);var l=o.callbacks[s];l&&l.func.apply(o.callbackScope,[o,i,a].concat(l.params))}},destroy:function(){d.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});p.exports=n},86353:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999};p.exports=S},83419:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/function S(n){return!!n.get&&typeof n.get=="function"||!!n.set&&typeof n.set=="function"}function t(n,e,s){var o=s?n[e]:Object.getOwnPropertyDescriptor(n,e);return!s&&o.value&&typeof o.value=="object"&&(o=o.value),o&&S(o)?(typeof o.enumerable>"u"&&(o.enumerable=!0),typeof o.configurable>"u"&&(o.configurable=!0),o):!1}function d(n,e){var s=Object.getOwnPropertyDescriptor(n,e);return s?(s.value&&typeof s.value=="object"&&(s=s.value),s.configurable===!1):!1}function c(n,e,s,o){for(var i in e)if(e.hasOwnProperty(i)){var a=t(e,i,s);if(a!==!1){var l=o||n;if(d(l.prototype,i)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+i+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(n.prototype,i,a)}else n.prototype[i]=e[i]}}function h(n,e){if(e){Array.isArray(e)||(e=[e]);for(var s=0;s<e.length;s++)c(n,e[s].prototype||e[s])}}function r(n){n||(n={});var e,s;if(n.initialize){if(typeof n.initialize!="function")throw new Error("initialize must be a function");e=n.initialize,delete n.initialize}else if(n.Extends){var o=n.Extends;e=function(){o.apply(this,arguments)}}else e=function(){};n.Extends?(e.prototype=Object.create(n.Extends.prototype),e.prototype.constructor=e,s=n.Extends,delete n.Extends):e.prototype.constructor=e;var i=null;return n.Mixins&&(i=n.Mixins,delete n.Mixins),h(e,i),c(e,n,!0,s),e}r.extend=c,r.mixin=h,r.ignoreFinals=!1,p.exports=r},29747:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(){};p.exports=S},20242:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(){return null};p.exports=S},71146:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h,r){if(r===void 0&&(r=t),c>0){var n=c-t.length;if(n<=0)return null}if(!Array.isArray(d))return t.indexOf(d)===-1?(t.push(d),h&&h.call(r,d),d):null;for(var e=d.length-1;e>=0;)t.indexOf(d[e])!==-1&&d.splice(e,1),e--;if(e=d.length,e===0)return null;c>0&&e>n&&(d.splice(n),e=n);for(var s=0;s<e;s++){var o=d[s];t.push(o),h&&h.call(r,o)}return d};p.exports=S},51067:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h,r,n){if(c===void 0&&(c=0),n===void 0&&(n=t),h>0){var e=h-t.length;if(e<=0)return null}if(!Array.isArray(d))return t.indexOf(d)===-1?(t.splice(c,0,d),r&&r.call(n,d),d):null;for(var s=d.length-1;s>=0;)t.indexOf(d[s])!==-1&&d.pop(),s--;if(s=d.length,s===0)return null;h>0&&s>e&&(d.splice(e),s=e);for(var o=s-1;o>=0;o--){var i=d[o];t.splice(c,0,i),r&&r.call(n,i)}return d};p.exports=S},66905:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=t.indexOf(d);return c!==-1&&c<t.length&&(t.splice(c,1),t.push(d)),d};p.exports=S},21612:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(82011),c=function(h,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=h.length);var o=0;if(d(h,e,s))for(var i=e;i<s;i++){var a=h[i];a[r]===n&&o++}return o};p.exports=c},95428:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h,r=[null];for(h=3;h<arguments.length;h++)r.push(arguments[h]);for(h=0;h<t.length;h++)r[0]=t[h],d.apply(c,r);return t};p.exports=S},36914:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(82011),c=function(h,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=h.length),d(h,e,s)){var o,i=[null];for(o=5;o<arguments.length;o++)i.push(arguments[o]);for(o=e;o<s;o++)i[0]=h[o],r.apply(n,i)}return h};p.exports=c},81957:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){if(d.length){if(d.length===1)return d[0]}else return NaN;var h=1,r,n;if(c){if(t<d[0][c])return d[0];for(;d[h][c]<t;)h++}else for(;d[h]<t;)h++;return h>d.length&&(h=d.length),c?(r=d[h-1][c],n=d[h][c],n-t<=t-r?d[h]:d[h-1]):(r=d[h-1],n=d[h],n-t<=t-r?n:r)};p.exports=S},43491:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){d===void 0&&(d=[]);for(var c=0;c<t.length;c++)Array.isArray(t[c])?S(t[c],d):d.push(t[c]);return d};p.exports=S},46710:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(82011),c=function(h,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=h.length);var o=[];if(d(h,e,s))for(var i=e;i<s;i++){var a=h[i];(!r||r&&n===void 0&&a.hasOwnProperty(r)||r&&n!==void 0&&a[r]===n)&&o.push(a)}return o};p.exports=c},58731:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(82011),c=function(h,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=h.length),d(h,e,s))for(var o=e;o<s;o++){var i=h[o];if(!r||r&&n===void 0&&i.hasOwnProperty(r)||r&&n!==void 0&&i[r]===n)return i}return null};p.exports=c},26546:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=t.length);var h=d+Math.floor(Math.random()*c);return t[h]===void 0?null:t[h]};p.exports=S},85835:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){if(d===c)return t;var h=t.indexOf(d),r=t.indexOf(c);if(h<0||r<0)throw new Error("Supplied items must be elements of the same array");return h>r||(t.splice(h,1),r=t.indexOf(c),t.splice(r+1,0,d)),t};p.exports=S},83371:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){if(d===c)return t;var h=t.indexOf(d),r=t.indexOf(c);if(h<0||r<0)throw new Error("Supplied items must be elements of the same array");return h<r||(t.splice(h,1),r===0?t.unshift(d):t.splice(r,0,d)),t};p.exports=S},70864:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=t.indexOf(d);if(c>0){var h=t[c-1],r=t.indexOf(h);t[c]=h,t[r]=d}return t};p.exports=S},69693:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=t.indexOf(d);if(h===-1||c<0||c>=t.length)throw new Error("Supplied index out of bounds");return h!==c&&(t.splice(h,1),t.splice(c,0,d)),d};p.exports=S},40853:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=t.indexOf(d);if(c!==-1&&c<t.length-1){var h=t[c+1],r=t.indexOf(h);t[c]=h,t[r]=d}return t};p.exports=S},20283:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){var r=[],n,e=!1;if((c||h)&&(e=!0,c||(c=""),h||(h="")),d<t)for(n=t;n>=d;n--)e?r.push(c+n.toString()+h):r.push(n);else for(n=t;n<=d;n++)e?r.push(c+n.toString()+h):r.push(n);return r};p.exports=S},593:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(2284),c=function(h,r,n){h===void 0&&(h=0),r===void 0&&(r=null),n===void 0&&(n=1),r===null&&(r=h,h=0);for(var e=[],s=Math.max(d((r-h)/(n||1)),0),o=0;o<s;o++)e.push(h),h+=n;return e};p.exports=c},43886:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/function S(c,h,r){var n=c[h];c[h]=c[r],c[r]=n}function t(c,h){return c<h?-1:c>h?1:0}var d=function(c,h,r,n,e){for(r===void 0&&(r=0),n===void 0&&(n=c.length-1),e===void 0&&(e=t);n>r;){if(n-r>600){var s=n-r+1,o=h-r+1,i=Math.log(s),a=.5*Math.exp(2*i/3),l=.5*Math.sqrt(i*a*(s-a)/s)*(o-s/2<0?-1:1),u=Math.max(r,Math.floor(h-o*a/s+l)),f=Math.min(n,Math.floor(h+(s-o)*a/s+l));d(c,h,u,f,e)}var v=c[h],m=r,g=n;for(S(c,r,h),e(c[n],v)>0&&S(c,r,n);m<g;){for(S(c,m,g),m++,g--;e(c[m],v)<0;)m++;for(;e(c[g],v)>0;)g--}e(c[r],v)===0?S(c,r,g):(g++,S(c,g,n)),g<=h&&(r=g+1),h<=g&&(n=g-1)}};p.exports=d},88492:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(35154),c=t(33680),h=function(n,e,s){for(var o=[],i=0;i<n.length;i++)for(var a=0;a<e.length;a++)for(var l=0;l<s;l++)o.push({a:n[i],b:e[a]});return o},r=function(n,e,s){var o=d(s,"max",0),i=d(s,"qty",1),a=d(s,"random",!1),l=d(s,"randomB",!1),u=d(s,"repeat",0),f=d(s,"yoyo",!1),v=[];if(l&&c(e),u===-1)if(o===0)u=0;else{var m=n.length*e.length*i;f&&(m*=2),u=Math.ceil(o/m)}for(var g=0;g<=u;g++){var x=h(n,e,i);a&&c(x),v=v.concat(x),f&&(x.reverse(),v=v.concat(x))}return o&&v.splice(o),v};p.exports=r},72905:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(19133),c=function(h,r,n,e){e===void 0&&(e=h);var s;if(!Array.isArray(r))return s=h.indexOf(r),s!==-1?(d(h,s),n&&n.call(e,r),r):null;for(var o=r.length-1,i=[];o>=0;){var a=r[o];s=h.indexOf(a),s!==-1&&(d(h,s),i.push(a),n&&n.call(e,a)),o--}return i};p.exports=c},60248:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(19133),c=function(h,r,n,e){if(e===void 0&&(e=h),r<0||r>h.length-1)throw new Error("Index out of bounds");var s=d(h,r);return n&&n.call(e,s),s};p.exports=c},81409:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(82011),c=function(h,r,n,e,s){if(r===void 0&&(r=0),n===void 0&&(n=h.length),s===void 0&&(s=h),d(h,r,n)){var o=n-r,i=h.splice(r,o);if(e)for(var a=0;a<i.length;a++){var l=i[a];e.call(s,l)}return i}else return[]};p.exports=c},31856:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(19133),c=function(h,r,n){r===void 0&&(r=0),n===void 0&&(n=h.length);var e=r+Math.floor(Math.random()*n);return d(h,e)};p.exports=c},42169:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=t.indexOf(d),r=t.indexOf(c);return h!==-1&&r===-1?(t[h]=c,!0):!1};p.exports=S},86003:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){d===void 0&&(d=1);for(var c=null,h=0;h<d;h++)c=t.shift(),t.push(c);return c};p.exports=S},49498:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){d===void 0&&(d=1);for(var c=null,h=0;h<d;h++)c=t.pop(),t.unshift(c);return c};p.exports=S},82011:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){var r=t.length;if(d<0||d>r||d>=c||c>r){if(h)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};p.exports=S},89545:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){var c=t.indexOf(d);return c!==-1&&c>0&&(t.splice(c,1),t.unshift(d)),d};p.exports=S},17810:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(82011),c=function(h,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=h.length),d(h,e,s))for(var o=e;o<s;o++){var i=h[o];i.hasOwnProperty(r)&&(i[r]=n)}return h};p.exports=c},33680:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){for(var d=t.length-1;d>0;d--){var c=Math.floor(Math.random()*(d+1)),h=t[d];t[d]=t[c],t[c]=h}return t};p.exports=S},90126:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d=/\D/g;return t.sort(function(c,h){return parseInt(c.replace(d,""),10)-parseInt(h.replace(d,""),10)}),t};p.exports=S},19133:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){if(!(d>=t.length)){for(var c=t.length-1,h=t[d],r=d;r<c;r++)t[r]=t[r+1];return t.length=c,h}};p.exports=S},19186:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @author Angry Bytes (and contributors)
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(82264);function c(e,s){return String(e).localeCompare(s)}function h(e,s){var o=e.length;if(o<=1)return e;for(var i=new Array(o),a=1;a<o;a*=2){r(e,s,a,i);var l=e;e=i,i=l}return e}function r(e,s,o,i){var a=e.length,l=0,u=o*2,f,v,m,g,x;for(f=0;f<a;f+=u)for(v=f+o,m=v+o,v>a&&(v=a),m>a&&(m=a),g=f,x=v;;)if(g<v&&x<m)s(e[g],e[x])<=0?i[l++]=e[g++]:i[l++]=e[x++];else if(g<v)i[l++]=e[g++];else if(x<m)i[l++]=e[x++];else break}var n=function(e,s){if(s===void 0&&(s=c),!e||e.length<2)return e;if(d.features.stableSort)return e.sort(s);var o=h(e,s);return o!==e&&r(o,null,e.length,e),e};p.exports=n},25630:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){if(d===c)return t;var h=t.indexOf(d),r=t.indexOf(c);if(h<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[h]=c,t[r]=d,t};p.exports=S},37105:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Matrix:t(54915),Add:t(71146),AddAt:t(51067),BringToTop:t(66905),CountAllMatching:t(21612),Each:t(95428),EachInRange:t(36914),FindClosestInSorted:t(81957),Flatten:t(43491),GetAll:t(46710),GetFirst:t(58731),GetRandom:t(26546),MoveDown:t(70864),MoveTo:t(69693),MoveUp:t(40853),MoveAbove:t(85835),MoveBelow:t(83371),NumberArray:t(20283),NumberArrayStep:t(593),QuickSelect:t(43886),Range:t(88492),Remove:t(72905),RemoveAt:t(60248),RemoveBetween:t(81409),RemoveRandomElement:t(31856),Replace:t(42169),RotateLeft:t(86003),RotateRight:t(49498),SafeRange:t(82011),SendToBack:t(89545),SetAll:t(17810),Shuffle:t(33680),SortByDigits:t(90126),SpliceOne:t(19133),StableSort:t(19186),Swap:t(25630)}},86922:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var d=t[0].length,c=1;c<t.length;c++)if(t[c].length!==d)return!1;return!0};p.exports=S},63362:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(41836),c=t(86922),h=function(r){var n="";if(!c(r))return n;for(var e=0;e<r.length;e++){for(var s=0;s<r[e].length;s++){var o=r[e][s].toString();o!=="undefined"?n+=d(o,2):n+="?",s<r[e].length-1&&(n+=" |")}if(e<r.length-1){n+=`
`;for(var i=0;i<r[e].length;i++)n+="---",i<r[e].length-1&&(n+="+");n+=`
`}}return n};p.exports=h},92598:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.reverse()};p.exports=S},21224:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){for(var d=0;d<t.length;d++)t[d].reverse();return t};p.exports=S},98717:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(37829),c=function(h){return d(h,180)};p.exports=c},44657:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(37829),c=function(h,r){r===void 0&&(r=1);for(var n=0;n<r;n++)h=d(h,90);return h};p.exports=c},37829:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(86922),c=t(2429),h=function(r,n){if(n===void 0&&(n=90),!d(r))return null;if(typeof n!="string"&&(n=(n%360+360)%360),n===90||n===-270||n==="rotateLeft")r=c(r),r.reverse();else if(n===-90||n===270||n==="rotateRight")r.reverse(),r=c(r);else if(Math.abs(n)===180||n==="rotate180"){for(var e=0;e<r.length;e++)r[e].reverse();r.reverse()}return r};p.exports=h},92632:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(37829),c=function(h,r){r===void 0&&(r=1);for(var n=0;n<r;n++)h=d(h,-90);return h};p.exports=c},69512:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(86003),c=t(49498),h=function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),e!==0&&(e<0?d(r,Math.abs(e)):c(r,e)),n!==0)for(var s=0;s<r.length;s++){var o=r[s];n<0?d(o,Math.abs(n)):c(o,n)}return r};p.exports=h},2429:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){for(var d=t.length,c=t[0].length,h=new Array(c),r=0;r<c;r++){h[r]=new Array(d);for(var n=d-1;n>-1;n--)h[r][n]=t[n][r]}return h};p.exports=S},54915:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={CheckMatrix:t(86922),MatrixToString:t(63362),ReverseColumns:t(92598),ReverseRows:t(21224),Rotate180:t(98717),RotateLeft:t(44657),RotateMatrix:t(37829),RotateRight:t(92632),Translate:t(69512),TransposeMatrix:t(2429)}},71334:p=>{/**
* @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=function(d,c){for(var h=new Uint8Array(d),r=h.length,n=c?"data:"+c+";base64,":"",e=0;e<r;e+=3)n+=S[h[e]>>2],n+=S[(h[e]&3)<<4|h[e+1]>>4],n+=S[(h[e+1]&15)<<2|h[e+2]>>6],n+=S[h[e+2]&63];return r%3===2?n=n.substring(0,n.length-1)+"=":r%3===1&&(n=n.substring(0,n.length-2)+"=="),n};p.exports=t},53134:p=>{/**
* @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/for(var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),d=0;d<S.length;d++)t[S.charCodeAt(d)]=d;var c=function(h){h=h.substr(h.indexOf(",")+1);var r=h.length,n=r*.75,e=0,s,o,i,a;h[r-1]==="="&&(n--,h[r-2]==="="&&n--);for(var l=new ArrayBuffer(n),u=new Uint8Array(l),f=0;f<r;f+=4)s=t[h.charCodeAt(f)],o=t[h.charCodeAt(f+1)],i=t[h.charCodeAt(f+2)],a=t[h.charCodeAt(f+3)],u[e++]=s<<2|o>>4,u[e++]=(o&15)<<4|i>>2,u[e++]=(i&3)<<6|a&63;return l};p.exports=c},65839:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={ArrayBufferToBase64:t(71334),Base64ToArrayBuffer:t(53134)}},91799:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Array:t(37105),Base64:t(65839),Objects:t(1183),String:t(31749),NOOP:t(29747),NULL:t(20242)}},41786:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d={};for(var c in t)Array.isArray(t[c])?d[c]=t[c].slice(0):d[c]=t[c];return d};p.exports=S},62644:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){var d,c,h;if(typeof t!="object"||t===null)return t;d=Array.isArray(t)?[]:{};for(h in t)c=t[h],d[h]=S(c);return d};p.exports=S},79291:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(41212),c=function(){var h,r,n,e,s,o,i=arguments[0]||{},a=1,l=arguments.length,u=!1;for(typeof i=="boolean"&&(u=i,i=arguments[1]||{},a=2),l===a&&(i=this,--a);a<l;a++)if((h=arguments[a])!=null)for(r in h)n=i[r],e=h[r],i!==e&&(u&&e&&(d(e)||(s=Array.isArray(e)))?(s?(s=!1,o=n&&Array.isArray(n)?n:[]):o=n&&d(n)?n:{},i[r]=c(u,o,e)):e!==void 0&&(i[r]=e));return i};p.exports=c},23568:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(75508),c=t(35154),h=function(r,n,e){var s=c(r,n,null);if(s===null)return e;if(Array.isArray(s))return d.RND.pick(s);if(typeof s=="object"){if(s.hasOwnProperty("randInt"))return d.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return d.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if(typeof s=="function")return s(n);return s};p.exports=h},95540:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){var h=typeof t;return!t||h==="number"||h==="string"?c:t.hasOwnProperty(d)&&t[d]!==void 0?t[d]:c};p.exports=S},82840:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(35154),c=t(45319),h=function(r,n,e,s,o){o===void 0&&(o=e);var i=d(r,n,o);return c(i,e,s)};p.exports=h},35154:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){if(!t&&!h||typeof t=="number")return c;if(t&&t.hasOwnProperty(d))return t[d];if(h&&h.hasOwnProperty(d))return h[d];if(d.indexOf(".")!==-1){for(var r=d.split("."),n=t,e=h,s=c,o=c,i=!0,a=!0,l=0;l<r.length;l++)n&&n.hasOwnProperty(r[l])?(s=n[r[l]],n=n[r[l]]):i=!1,e&&e.hasOwnProperty(r[l])?(o=e[r[l]],e=e[r[l]]):a=!1;return i?s:a?o:c}else return c};p.exports=S},69036:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){for(var c=0;c<d.length;c++)if(!t.hasOwnProperty(d[c]))return!1;return!0};p.exports=S},1985:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){for(var c=0;c<d.length;c++)if(t.hasOwnProperty(d[c]))return!0;return!1};p.exports=S},97022:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.hasOwnProperty(d)};p.exports=S},41212:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){if(!t||typeof t!="object"||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};p.exports=S},46975:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(41786),c=function(h,r){var n=d(h);for(var e in r)n.hasOwnProperty(e)||(n[e]=r[e]);return n};p.exports=c},269:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(41786),c=function(h,r){var n=d(h);for(var e in r)n.hasOwnProperty(e)&&(n[e]=r[e]);return n};p.exports=c},18254:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var d=t(97022),c=function(h,r){for(var n={},e=0;e<r.length;e++){var s=r[e];d(h,s)&&(n[s]=h[s])}return n};p.exports=c},61622:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c){if(!t||typeof t=="number")return!1;if(t.hasOwnProperty(d))return t[d]=c,!0;if(d.indexOf(".")!==-1){for(var h=d.split("."),r=t,n=t,e=0;e<h.length;e++)if(r.hasOwnProperty(h[e]))n=r,r=r[h[e]];else return!1;return n[h[h.length-1]]=c,!0}return!1};p.exports=S},1183:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Clone:t(41786),DeepCopy:t(62644),Extend:t(79291),GetAdvancedValue:t(23568),GetFastValue:t(95540),GetMinMaxValue:t(82840),GetValue:t(35154),HasAll:t(69036),HasAny:t(1985),HasValue:t(97022),IsPlainObject:t(41212),Merge:t(46975),MergeRight:t(269),Pick:t(18254),SetValue:t(61622)}},27902:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return t.replace(/%([0-9]+)/g,function(c,h){return d[Number(h)-1]})};p.exports=S},41836:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d,c,h){d===void 0&&(d=0),c===void 0&&(c=" "),h===void 0&&(h=3),t=t.toString();var r=0;if(d+1>=t.length)switch(h){case 1:t=new Array(d+1-t.length).join(c)+t;break;case 3:var n=Math.ceil((r=d-t.length)/2),e=r-n;t=new Array(e+1).join(c)+t+new Array(n+1).join(c);break;default:t=t+new Array(d+1-t.length).join(c);break}return t};p.exports=S},33628:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t,d){return d===0?t.slice(1):t.slice(0,d-1)+t.slice(d)};p.exports=S},27671:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t.split("").reverse().join("")};p.exports=S},45650:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var d=Math.random()*16|0,c=t==="x"?d:d&3|8;return c.toString(16)})};p.exports=S},35355:p=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/var S=function(t){return t&&t[0].toUpperCase()+t.slice(1)};p.exports=S},31749:(p,S,t)=>{/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/p.exports={Format:t(27902),Pad:t(41836),RemoveAt:t(33628),Reverse:t(27671),UppercaseFirst:t(35355),UUID:t(45650)}}},xt={};function ut(p){var S=xt[p];if(S!==void 0)return S.exports;var t=xt[p]={exports:{}};return gt[p](t,t.exports,ut),t.exports}ut.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var mt=ut(85454);return mt})())})(Lt);var Et=Lt.exports;class It{constructor(nt,gt,xt,ut){Rt(this,"group",null);Rt(this,"sprite",null);const mt=new Et.GameObjects.Text(nt,gt,xt,ut,{color:"black"});mt.setOrigin(.5,.5);const p=new Et.GameObjects.Image(nt,gt,xt,"button-bg",0),S=new Et.GameObjects.Image(nt,gt,xt,"button-bg",1),t=new Et.GameObjects.Image(nt,gt,xt,"button-bg",2),d=new Et.GameObjects.Group(nt);d.add(mt),d.add(p),d.add(S),d.add(t),this.group=d,nt.add.existing(p),nt.add.existing(t),nt.add.existing(mt),nt.add.existing(d),console.log(mt.width,mt.height)}onEvent(nt,gt){var xt;(xt=this.sprite)==null||xt.on(nt,gt)}moveTo(nt,gt){var xt;(xt=this.group)==null||xt.setXY(nt,gt)}}class Gt extends Et.Scene{preload(){this.load.spritesheet("button-bg","assets/panel-000.png",{frameWidth:16,frameHeight:16})}create(){new It(this,0,0,"A B C D E F G H I J").moveTo(130,100)}}const Nt={title:"ExampleGame",version:"2.0",width:800,height:600,type:Et.AUTO,parent:"app",scene:[Gt],input:{keyboard:!0},physics:{default:"arcade",arcade:{debug:!1}},backgroundColor:"#300000",render:{pixelArt:!1,antialias:!1},scale:{mode:Et.Scale.FIT,autoCenter:Et.Scale.CENTER_BOTH,fullscreenTarget:"app",expandParent:!1}};class Ut extends Et.Game{constructor(nt){super({...Nt,...nt})}}new Ut({parent:"silver-fang-minigame"});