diff --git a/docs/_astro/App.A8yRIDXt.js b/docs/_astro/App.C9255lI7.js similarity index 60% rename from docs/_astro/App.A8yRIDXt.js rename to docs/_astro/App.C9255lI7.js index b69ff1a..ed5e117 100644 --- a/docs/_astro/App.A8yRIDXt.js +++ b/docs/_astro/App.C9255lI7.js @@ -1,4 +1,4 @@ -import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c as Hx}from"./index.DIpCM_17.js";import{p as Kx,a as Xu}from"./index.DxhZiom7.js";import{t as hr}from"./index.BH1EYZ08.js";var Vu={exports:{}},qt={};/** +import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Bf,r as Mr,a as Fe,c as o1}from"./index.DIpCM_17.js";import{p as h1,a as bf}from"./index.DxhZiom7.js";import{t as vn}from"./index.BH1EYZ08.js";var Nf={exports:{}},te={};/** * @license React * react-is.production.min.js * @@ -6,230 +6,230 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var vo=Symbol.for("react.element"),po=Symbol.for("react.portal"),lr=Symbol.for("react.fragment"),ur=Symbol.for("react.strict_mode"),fr=Symbol.for("react.profiler"),dr=Symbol.for("react.provider"),cr=Symbol.for("react.context"),$x=Symbol.for("react.server_context"),vr=Symbol.for("react.forward_ref"),pr=Symbol.for("react.suspense"),gr=Symbol.for("react.suspense_list"),mr=Symbol.for("react.memo"),xr=Symbol.for("react.lazy"),jx=Symbol.for("react.offscreen"),Wu;Wu=Symbol.for("react.module.reference");function ti(E){if(typeof E=="object"&&E!==null){var S=E.$$typeof;switch(S){case vo:switch(E=E.type,E){case lr:case fr:case ur:case pr:case gr:return E;default:switch(E=E&&E.$$typeof,E){case $x:case cr:case vr:case xr:case mr:case dr:return E;default:return S}}case po:return S}}}qt.ContextConsumer=cr;qt.ContextProvider=dr;qt.Element=vo;qt.ForwardRef=vr;qt.Fragment=lr;qt.Lazy=xr;qt.Memo=mr;qt.Portal=po;qt.Profiler=fr;qt.StrictMode=ur;qt.Suspense=pr;qt.SuspenseList=gr;qt.isAsyncMode=function(){return!1};qt.isConcurrentMode=function(){return!1};qt.isContextConsumer=function(E){return ti(E)===cr};qt.isContextProvider=function(E){return ti(E)===dr};qt.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===vo};qt.isForwardRef=function(E){return ti(E)===vr};qt.isFragment=function(E){return ti(E)===lr};qt.isLazy=function(E){return ti(E)===xr};qt.isMemo=function(E){return ti(E)===mr};qt.isPortal=function(E){return ti(E)===po};qt.isProfiler=function(E){return ti(E)===fr};qt.isStrictMode=function(E){return ti(E)===ur};qt.isSuspense=function(E){return ti(E)===pr};qt.isSuspenseList=function(E){return ti(E)===gr};qt.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===lr||E===fr||E===ur||E===pr||E===gr||E===jx||typeof E=="object"&&E!==null&&(E.$$typeof===xr||E.$$typeof===mr||E.$$typeof===dr||E.$$typeof===cr||E.$$typeof===vr||E.$$typeof===Wu||E.getModuleId!==void 0)};qt.typeOf=ti;Vu.exports=qt;var Yu=Vu.exports;function Zx(E){function S(J,X,Y,D,z){for(var W=0,H=0,Z=0,Q=0,k,et,st=0,rt=0,ot,ft=ot=k=0,at=0,vt=0,Pt=0,Ct=0,Et=Y.length,ct=Et-1,Tt,pt="",Mt="",It="",Kt="",Gt;atk)&&(Ct=(pt=pt.replace(" ",":")).length),0D&&(D=(X=X.trim()).charCodeAt(0)),D){case 38:return X.replace(s,"$1"+J.trim());case 58:return J.trim()+X.replace(s,"$1"+J.trim());default:if(0<1*Y&&0H.charCodeAt(8))break;case 115:z=z.replace(H,"-webkit-"+H)+";"+z;break;case 207:case 102:z=z.replace(H,"-webkit-"+(102Y.charCodeAt(0)&&(Y=Y.trim()),$=Y,Y=[$],0k)&&(Et=(pt=pt.replace(" ",":")).length),0b&&(b=(X=X.trim()).charCodeAt(0)),b){case 38:return X.replace(s,"$1"+J.trim());case 58:return J.trim()+X.replace(s,"$1"+J.trim());default:if(0<1*Y&&0H.charCodeAt(8))break;case 115:z=z.replace(H,"-webkit-"+H)+";"+z;break;case 207:case 102:z=z.replace(H,"-webkit-"+(102Y.charCodeAt(0)&&(Y=Y.trim()),j=Y,Y=[j],01?S-1:0),I=1;I0?" Args: "+A.join(", "):""))}var vy=function(){function E(A){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=A}var S=E.prototype;return S.indexOfGroup=function(A){for(var I=0,B=0;B=this.groupSizes.length){for(var B=this.groupSizes,b=B.length,c=b;A>=c;)(c<<=1)<0&&sn(16,""+A);this.groupSizes=new Uint32Array(c),this.groupSizes.set(B),this.length=c;for(var m=b;m=this.length||this.groupSizes[A]===0)return I;for(var B=this.groupSizes[A],b=this.indexOfGroup(A),c=b+B,m=b;m=$s&&($s=S+1),kn.set(E,S),ir.set(S,E)},my="style["+Cs+'][data-styled-version="5.3.6"]',xy=new RegExp("^"+Cs+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),yy=function(E,S,A){for(var I,B=A.split(","),b=0,c=B.length;b=0;a--){var v=t[a];if(v&&v.nodeType===1&&v.hasAttribute(Cs))return v}}(A),b=B!==void 0?B.nextSibling:null;I.setAttribute(Cs,"active"),I.setAttribute("data-styled-version","5.3.6");var c=Sy();return c&&I.setAttribute("nonce",c),A.insertBefore(I,b),I},Cy=function(){function E(A){var I=this.element=Zu(A);I.appendChild(document.createTextNode("")),this.sheet=function(B){if(B.sheet)return B.sheet;for(var b=document.styleSheets,c=0,m=b.length;c=0){var B=document.createTextNode(I),b=this.nodes[A];return this.element.insertBefore(B,b||null),this.length++,!0}return!1},S.deleteRule=function(A){this.element.removeChild(this.nodes[A]),this.length--},S.getRule=function(A){return A0&&(o+=r+",")}),b+=""+a+v+'{content:"'+o+`"}/*!sc*/ -`}}}return b}(this)},E}(),My=/(a)(d)/gi,mu=function(E){return String.fromCharCode(E+(E>25?39:97))};function to(E){var S,A="";for(S=Math.abs(E);S>52;S=S/52|0)A=mu(S%52)+A;return(mu(S%52)+A).replace(My,"$1-$2")}var xs=function(E,S){for(var A=S.length;A;)E=33*E^S.charCodeAt(--A);return E},Qu=function(E){return xs(5381,E)};function wy(E){for(var S=0;S>>0);if(!A.hasNameForId(B,m)){var t=I(c,"."+m,void 0,B);A.insertRules(B,m,t)}b.push(m),this.staticRulesId=m}else{for(var a=this.rules.length,v=xs(this.baseHash,I.hash),o="",r=0;r>>0);if(!A.hasNameForId(B,h)){var s=I(o,"."+h,void 0,B);A.insertRules(B,h,s)}b.push(h)}}return b.join(" ")},E}(),Ly=/^\s*\/\/.*$/gm,Oy=[":","[",".","#"];function Dy(E){var S,A,I,B,b=E===void 0?Ni:E,c=b.options,m=c===void 0?Ni:c,t=b.plugins,a=t===void 0?er:t,v=new Zx(m),o=[],r=function(i){function h(s){if(s)try{i(s+"}")}catch{}}return function(s,l,f,u,d,p,g,y,x,T){switch(s){case 1:if(x===0&&l.charCodeAt(0)===64)return i(l+";"),"";break;case 2:if(y===0)return l+"/*|*/";break;case 3:switch(y){case 102:case 112:return i(f[0]+l),"";default:return l+(T===0?"/*|*/":"")}case-2:l.split("/*|*/}").forEach(h)}}}(function(i){o.push(i)}),n=function(i,h,s){return h===0&&Oy.indexOf(s[A.length])!==-1||s.match(B)?i:"."+S};function e(i,h,s,l){l===void 0&&(l="&");var f=i.replace(Ly,""),u=h&&s?s+" "+h+" { "+f+" }":f;return S=l,A=h,I=new RegExp("\\"+A+"\\b","g"),B=new RegExp("(\\"+A+"\\b){2,}"),v(s||!h?"":h,u)}return v.use([].concat(a,[function(i,h,s){i===2&&s.length&&s[0].lastIndexOf(A)>0&&(s[0]=s[0].replace(I,n))},r,function(i){if(i===-2){var h=o;return o=[],h}}])),e.hash=a.length?a.reduce(function(i,h){return h.name||sn(15),xs(i,h.name)},5381).toString():"",e}var ku=or.createContext();ku.Consumer;var qu=or.createContext(),Iy=(qu.Consumer,new Ju),eo=Dy();function By(){return Ie.useContext(ku)||Iy}function by(){return Ie.useContext(qu)||eo}var Ny=function(){function E(S,A){var I=this;this.inject=function(B,b){b===void 0&&(b=eo);var c=I.name+b.hash;B.hasNameForId(I.id,c)||B.insertRules(I.id,c,b(I.rules,c,"@keyframes"))},this.toString=function(){return sn(12,String(I.name))},this.name=S,this.id="sc-keyframes-"+S,this.rules=A}return E.prototype.getName=function(S){return S===void 0&&(S=eo),this.name+S.hash},E}(),Gy=/([A-Z])/,zy=/([A-Z])/g,Uy=/^ms-/,Xy=function(E){return"-"+E.toLowerCase()};function xu(E){return Gy.test(E)?E.replace(zy,Xy).replace(Uy,"-ms-"):E}var yu=function(E){return E==null||E===!1||E===""};function Es(E,S,A,I){if(Array.isArray(E)){for(var B,b=[],c=0,m=E.length;c1?S-1:0),I=1;I?@[\\\]^`{|}~-]+/g,Hy=/(^-|-$)/g;function $a(E){return E.replace(Yy,"-").replace(Hy,"")}var Ky=function(E){return to(Qu(E)>>>0)};function Zn(E){return typeof E=="string"&&!0}var io=function(E){return typeof E=="function"||typeof E=="object"&&E!==null&&!Array.isArray(E)},$y=function(E){return E!=="__proto__"&&E!=="constructor"&&E!=="prototype"};function jy(E,S,A){var I=E[A];io(S)&&io(I)?_u(I,S):E[A]=S}function _u(E){for(var S=arguments.length,A=new Array(S>1?S-1:0),I=1;I=0||(T[y]=p[y]);return T}(S,["componentId"]),d=f&&f+"-"+(Zn(l)?l:$a(pu(l)));return ef(l,Pi({},u,{attrs:r,componentId:d}),A)},Object.defineProperty(e,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(l){this._foldedDefaultProps=I?_u({},E.defaultProps,l):l}}),e.toString=function(){return"."+e.styledComponentId},B&&dy(e,E,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),e}var sr=function(E){return function S(A,I,B){if(B===void 0&&(B=Ni),!Yu.isValidElementType(I))return sn(1,String(I));var b=function(){return A(I,B,Vy.apply(void 0,arguments))};return b.withConfig=function(c){return S(A,I,Pi({},B,{},c))},b.attrs=function(c){return S(A,I,Pi({},B,{attrs:Array.prototype.concat(B.attrs,c).filter(Boolean)}))},b}(ef,E)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(E){sr[E]=sr(E)});var sf={exports:{}};(function(E,S){(function(I,B){E.exports=B()})(Hx,()=>(()=>{var A={50792:c=>{var m=Object.prototype.hasOwnProperty,t="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(t=!1));function v(e,i,h){this.fn=e,this.context=i,this.once=h||!1}function o(e,i,h,s,l){if(typeof h!="function")throw new TypeError("The listener must be a function");var f=new v(h,s||e,l),u=t?t+i:i;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],f]:e._events[u].push(f):(e._events[u]=f,e._eventsCount++),e}function r(e,i){--e._eventsCount===0?e._events=new a:delete e._events[i]}function n(){this._events=new a,this._eventsCount=0}n.prototype.eventNames=function(){var i=[],h,s;if(this._eventsCount===0)return i;for(s in h=this._events)m.call(h,s)&&i.push(t?s.slice(1):s);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(h)):i},n.prototype.listeners=function(i){var h=t?t+i:i,s=this._events[h];if(!s)return[];if(s.fn)return[s.fn];for(var l=0,f=s.length,u=new Array(f);l{/** + */var Ee=typeof Symbol=="function"&&Symbol.for,Zo=Ee?Symbol.for("react.element"):60103,Jo=Ee?Symbol.for("react.portal"):60106,Gr=Ee?Symbol.for("react.fragment"):60107,zr=Ee?Symbol.for("react.strict_mode"):60108,Ur=Ee?Symbol.for("react.profiler"):60114,Xr=Ee?Symbol.for("react.provider"):60109,Vr=Ee?Symbol.for("react.context"):60110,Qo=Ee?Symbol.for("react.async_mode"):60111,Wr=Ee?Symbol.for("react.concurrent_mode"):60111,Yr=Ee?Symbol.for("react.forward_ref"):60112,Hr=Ee?Symbol.for("react.suspense"):60113,p1=Ee?Symbol.for("react.suspense_list"):60120,Kr=Ee?Symbol.for("react.memo"):60115,jr=Ee?Symbol.for("react.lazy"):60116,g1=Ee?Symbol.for("react.block"):60121,m1=Ee?Symbol.for("react.fundamental"):60117,x1=Ee?Symbol.for("react.responder"):60118,y1=Ee?Symbol.for("react.scope"):60119;function He(S){if(typeof S=="object"&&S!==null){var T=S.$$typeof;switch(T){case Zo:switch(S=S.type,S){case Qo:case Wr:case Gr:case Ur:case zr:case Hr:return S;default:switch(S=S&&S.$$typeof,S){case Vr:case Yr:case jr:case Kr:case Xr:return S;default:return T}}case Jo:return T}}}function Xf(S){return He(S)===Wr}ee.AsyncMode=Qo;ee.ConcurrentMode=Wr;ee.ContextConsumer=Vr;ee.ContextProvider=Xr;ee.Element=Zo;ee.ForwardRef=Yr;ee.Fragment=Gr;ee.Lazy=jr;ee.Memo=Kr;ee.Portal=Jo;ee.Profiler=Ur;ee.StrictMode=zr;ee.Suspense=Hr;ee.isAsyncMode=function(S){return Xf(S)||He(S)===Qo};ee.isConcurrentMode=Xf;ee.isContextConsumer=function(S){return He(S)===Vr};ee.isContextProvider=function(S){return He(S)===Xr};ee.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===Zo};ee.isForwardRef=function(S){return He(S)===Yr};ee.isFragment=function(S){return He(S)===Gr};ee.isLazy=function(S){return He(S)===jr};ee.isMemo=function(S){return He(S)===Kr};ee.isPortal=function(S){return He(S)===Jo};ee.isProfiler=function(S){return He(S)===Ur};ee.isStrictMode=function(S){return He(S)===zr};ee.isSuspense=function(S){return He(S)===Hr};ee.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===Gr||S===Wr||S===Ur||S===zr||S===Hr||S===p1||typeof S=="object"&&S!==null&&(S.$$typeof===jr||S.$$typeof===Kr||S.$$typeof===Xr||S.$$typeof===Vr||S.$$typeof===Yr||S.$$typeof===m1||S.$$typeof===x1||S.$$typeof===y1||S.$$typeof===g1)};ee.typeOf=He;Uf.exports=ee;var T1=Uf.exports,ko=T1,S1={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},C1={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},E1={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Vf={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},qo={};qo[ko.ForwardRef]=E1;qo[ko.Memo]=Vf;function Zu(S){return ko.isMemo(S)?Vf:qo[S.$$typeof]||S1}var P1=Object.defineProperty,A1=Object.getOwnPropertyNames,Ju=Object.getOwnPropertySymbols,M1=Object.getOwnPropertyDescriptor,w1=Object.getPrototypeOf,Qu=Object.prototype;function Wf(S,T,E){if(typeof T!="string"){if(Qu){var F=w1(T);F&&F!==Qu&&Wf(S,F,E)}var O=A1(T);Ju&&(O=O.concat(Ju(T)));for(var D=Zu(S),c=Zu(T),m=0;m1?T-1:0),F=1;F0?" Args: "+E.join(", "):""))}var O1=function(){function S(E){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=E}var T=S.prototype;return T.indexOfGroup=function(E){for(var F=0,O=0;O=this.groupSizes.length){for(var O=this.groupSizes,D=O.length,c=D;E>=c;)(c<<=1)<0&&pn(16,""+E);this.groupSizes=new Uint32Array(c),this.groupSizes.set(O),this.length=c;for(var m=D;m=this.length||this.groupSizes[E]===0)return F;for(var O=this.groupSizes[E],D=this.indexOfGroup(E),c=D+O,m=D;m=sn&&(sn=T+1),dr.set(S,T),Tr.set(T,S)},B1="style["+Fs+'][data-styled-version="5.3.6"]',b1=new RegExp("^"+Fs+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),N1=function(S,T,E){for(var F,O=E.split(","),D=0,c=O.length;D=0;o--){var v=t[o];if(v&&v.nodeType===1&&v.hasAttribute(Fs))return v}}(E),D=O!==void 0?O.nextSibling:null;F.setAttribute(Fs,"active"),F.setAttribute("data-styled-version","5.3.6");var c=z1();return c&&F.setAttribute("nonce",c),E.insertBefore(F,D),F},U1=function(){function S(E){var F=this.element=Yf(E);F.appendChild(document.createTextNode("")),this.sheet=function(O){if(O.sheet)return O.sheet;for(var D=document.styleSheets,c=0,m=D.length;c=0){var O=document.createTextNode(F),D=this.nodes[E];return this.element.insertBefore(O,D||null),this.length++,!0}return!1},T.deleteRule=function(E){this.element.removeChild(this.nodes[E]),this.length--},T.getRule=function(E){return E0&&(a+=r+",")}),D+=""+o+v+'{content:"'+a+`"}/*!sc*/ +`}}}return D}(this)},S}(),Y1=/(a)(d)/gi,tf=function(S){return String.fromCharCode(S+(S>25?39:97))};function Ro(S){var T,E="";for(T=Math.abs(S);T>52;T=T/52|0)E=tf(T%52)+E;return(tf(T%52)+E).replace(Y1,"$1-$2")}var As=function(S,T){for(var E=T.length;E;)S=33*S^T.charCodeAt(--E);return S},Kf=function(S){return As(5381,S)};function H1(S){for(var T=0;T>>0);if(!E.hasNameForId(O,m)){var t=F(c,"."+m,void 0,O);E.insertRules(O,m,t)}D.push(m),this.staticRulesId=m}else{for(var o=this.rules.length,v=As(this.baseHash,F.hash),a="",r=0;r>>0);if(!E.hasNameForId(O,h)){var s=F(a,"."+h,void 0,O);E.insertRules(O,h,s)}D.push(h)}}return D.join(" ")},S}(),$1=/^\s*\/\/.*$/gm,Z1=[":","[",".","#"];function J1(S){var T,E,F,O,D=S===void 0?Yi:S,c=D.options,m=c===void 0?Yi:c,t=D.plugins,o=t===void 0?yr:t,v=new f1(m),a=[],r=function(i){function h(s){if(s)try{i(s+"}")}catch{}}return function(s,l,f,u,d,p,g,y,x,C){switch(s){case 1:if(x===0&&l.charCodeAt(0)===64)return i(l+";"),"";break;case 2:if(y===0)return l+"/*|*/";break;case 3:switch(y){case 102:case 112:return i(f[0]+l),"";default:return l+(C===0?"/*|*/":"")}case-2:l.split("/*|*/}").forEach(h)}}}(function(i){a.push(i)}),n=function(i,h,s){return h===0&&Z1.indexOf(s[E.length])!==-1||s.match(O)?i:"."+T};function e(i,h,s,l){l===void 0&&(l="&");var f=i.replace($1,""),u=h&&s?s+" "+h+" { "+f+" }":f;return T=l,E=h,F=new RegExp("\\"+E+"\\b","g"),O=new RegExp("(\\"+E+"\\b){2,}"),v(s||!h?"":h,u)}return v.use([].concat(o,[function(i,h,s){i===2&&s.length&&s[0].lastIndexOf(E)>0&&(s[0]=s[0].replace(F,n))},r,function(i){if(i===-2){var h=a;return a=[],h}}])),e.hash=o.length?o.reduce(function(i,h){return h.name||pn(15),As(i,h.name)},5381).toString():"",e}var jf=Mr.createContext();jf.Consumer;var $f=Mr.createContext(),Q1=($f.Consumer,new Hf),Fo=J1();function k1(){return Fe.useContext(jf)||Q1}function q1(){return Fe.useContext($f)||Fo}var _1=function(){function S(T,E){var F=this;this.inject=function(O,D){D===void 0&&(D=Fo);var c=F.name+D.hash;O.hasNameForId(F.id,c)||O.insertRules(F.id,c,D(F.rules,c,"@keyframes"))},this.toString=function(){return pn(12,String(F.name))},this.name=T,this.id="sc-keyframes-"+T,this.rules=E}return S.prototype.getName=function(T){return T===void 0&&(T=Fo),this.name+T.hash},S}(),tT=/([A-Z])/,eT=/([A-Z])/g,iT=/^ms-/,sT=function(S){return"-"+S.toLowerCase()};function ef(S){return tT.test(S)?S.replace(eT,sT).replace(iT,"-ms-"):S}var sf=function(S){return S==null||S===!1||S===""};function Ls(S,T,E,F){if(Array.isArray(S)){for(var O,D=[],c=0,m=S.length;c1?T-1:0),F=1;F?@[\\\]^`{|}~-]+/g,oT=/(^-|-$)/g;function go(S){return S.replace(aT,"-").replace(oT,"")}var hT=function(S){return Ro(Kf(S)>>>0)};function lr(S){return typeof S=="string"&&!0}var Lo=function(S){return typeof S=="function"||typeof S=="object"&&S!==null&&!Array.isArray(S)},lT=function(S){return S!=="__proto__"&&S!=="constructor"&&S!=="prototype"};function uT(S,T,E){var F=S[E];Lo(T)&&Lo(F)?Zf(F,T):S[E]=T}function Zf(S){for(var T=arguments.length,E=new Array(T>1?T-1:0),F=1;F=0||(C[y]=p[y]);return C}(T,["componentId"]),d=f&&f+"-"+(lr(l)?l:go(qu(l)));return Qf(l,Li({},u,{attrs:r,componentId:d}),E)},Object.defineProperty(e,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(l){this._foldedDefaultProps=F?Zf({},S.defaultProps,l):l}}),e.toString=function(){return"."+e.styledComponentId},O&&F1(e,S,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),e}var Sr=function(S){return function T(E,F,O){if(O===void 0&&(O=Yi),!zf.isValidElementType(F))return pn(1,String(F));var D=function(){return E(F,O,nT.apply(void 0,arguments))};return D.withConfig=function(c){return T(E,F,Li({},O,{},c))},D.attrs=function(c){return T(E,F,Li({},O,{attrs:Array.prototype.concat(O.attrs,c).filter(Boolean)}))},D}(Qf,S)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(S){Sr[S]=Sr(S)});var kf={exports:{}};(function(S,T){(function(F,O){S.exports=O()})(o1,()=>(()=>{var E={50792:c=>{var m=Object.prototype.hasOwnProperty,t="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(t=!1));function v(e,i,h){this.fn=e,this.context=i,this.once=h||!1}function a(e,i,h,s,l){if(typeof h!="function")throw new TypeError("The listener must be a function");var f=new v(h,s||e,l),u=t?t+i:i;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],f]:e._events[u].push(f):(e._events[u]=f,e._eventsCount++),e}function r(e,i){--e._eventsCount===0?e._events=new o:delete e._events[i]}function n(){this._events=new o,this._eventsCount=0}n.prototype.eventNames=function(){var i=[],h,s;if(this._eventsCount===0)return i;for(s in h=this._events)m.call(h,s)&&i.push(t?s.slice(1):s);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(h)):i},n.prototype.listeners=function(i){var h=t?t+i:i,s=this._events[h];if(!s)return[];if(s.fn)return[s.fn];for(var l=0,f=s.length,u=new Array(f);l{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(38829),v=function(o,r,n,e){for(var i=o[0],h=1;h{/** + */var o=t(38829),v=function(a,r,n,e){for(var i=a[0],h=1;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i){return a(o,"angle",r,n,e,i)};c.exports=v},60757:c=>{/** + */var o=t(66979),v=function(a,r,n,e,i){return o(a,"angle",r,n,e,i)};c.exports=v},60757:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){for(var o=0;o{/** + */var m=function(t,o,v){for(var a=0;a{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){v===void 0&&(v=0);for(var o=v;o{/** + */var m=function(t,o,v){v===void 0&&(v=0);for(var a=v;a{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){v===void 0&&(v=0);for(var o=t.length-1;o>=v;o--){var r=t[o],n=!0;for(var e in a)r[e]!==a[e]&&(n=!1);if(n)return r}return null};c.exports=m},94420:(c,m,t)=>{/** + */var m=function(t,o,v){v===void 0&&(v=0);for(var a=t.length-1;a>=v;a--){var r=t[a],n=!0;for(var e in o)r[e]!==o[e]&&(n=!1);if(n)return r}return null};c.exports=m},94420:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(11879),v=t(60461),o=t(95540),r=t(29747),n=t(41481),e=new n({sys:{queueDepthSort:r,events:{once:r}}},0,0,1,1).setOrigin(0,0),i=function(h,s){s===void 0&&(s={});var l=s.hasOwnProperty("width"),f=s.hasOwnProperty("height"),u=o(s,"width",-1),d=o(s,"height",-1),p=o(s,"cellWidth",1),g=o(s,"cellHeight",p),y=o(s,"position",v.TOP_LEFT),x=o(s,"x",0),T=o(s,"y",0),C=0,M=0,w=u*p,L=d*g;e.setPosition(x,T),e.setSize(p,g);for(var F=0;F{/** + */var o=t(11879),v=t(60461),a=t(95540),r=t(29747),n=t(41481),e=new n({sys:{queueDepthSort:r,events:{once:r}}},0,0,1,1).setOrigin(0,0),i=function(h,s){s===void 0&&(s={});var l=s.hasOwnProperty("width"),f=s.hasOwnProperty("height"),u=a(s,"width",-1),d=a(s,"height",-1),p=a(s,"cellWidth",1),g=a(s,"cellHeight",p),y=a(s,"position",v.TOP_LEFT),x=a(s,"x",0),C=a(s,"y",0),P=0,M=0,w=u*p,I=d*g;e.setPosition(x,C),e.setSize(p,g);for(var L=0;L{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i){return a(o,"alpha",r,n,e,i)};c.exports=v},67285:(c,m,t)=>{/** + */var o=t(66979),v=function(a,r,n,e,i){return o(a,"alpha",r,n,e,i)};c.exports=v},67285:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i){return a(o,"x",r,n,e,i)};c.exports=v},9074:(c,m,t)=>{/** + */var o=t(66979),v=function(a,r,n,e,i){return o(a,"x",r,n,e,i)};c.exports=v},9074:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"x",r,e,h,s),a(o,"y",n,i,h,s)};c.exports=v},75222:(c,m,t)=>{/** + */var o=t(66979),v=function(a,r,n,e,i,h,s){return n==null&&(n=r),o(a,"x",r,e,h,s),o(a,"y",n,i,h,s)};c.exports=v},75222:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i){return a(o,"y",r,n,e,i)};c.exports=v},22983:c=>{/** + */var o=t(66979),v=function(a,r,n,e,i){return o(a,"y",r,n,e,i)};c.exports=v},22983:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v===void 0&&(v=0),o===void 0&&(o=6.28);for(var r=v,n=(o-v)/t.length,e=a.x,i=a.y,h=a.radius,s=0;s{/** + */var m=function(t,o,v,a){v===void 0&&(v=0),a===void 0&&(a=6.28);for(var r=v,n=(a-v)/t.length,e=o.x,i=o.y,h=o.radius,s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v===void 0&&(v=0),o===void 0&&(o=6.28);for(var r=v,n=(o-v)/t.length,e=a.width/2,i=a.height/2,h=0;h{/** + */var m=function(t,o,v,a){v===void 0&&(v=0),a===void 0&&(a=6.28);for(var r=v,n=(a-v)/t.length,e=o.width/2,i=o.height/2,h=0;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(15258),v=t(26708),o=function(r,n,e){var i;e?i=v(n,e,r.length):i=a(n,r.length);for(var h=0;h{/** + */var o=t(15258),v=t(26708),a=function(r,n,e){var i;e?i=v(n,e,r.length):i=o(n,r.length);for(var h=0;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(14649),v=t(86003),o=t(49498),r=function(n,e,i){i===void 0&&(i=0);var h=a(e,!1,n.length);i>0?v(h,i):i<0&&o(h,Math.abs(i));for(var s=0;s{/** + */var o=t(14649),v=t(86003),a=t(49498),r=function(n,e,i){i===void 0&&(i=0);var h=o(e,!1,n.length);i>0?v(h,i):i<0&&a(h,Math.abs(i));for(var s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(84993),v=function(o,r,n){var e=a({x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2},n),i=a({x1:r.x2,y1:r.y2,x2:r.x3,y2:r.y3},n),h=a({x1:r.x3,y1:r.y3,x2:r.x1,y2:r.y1},n);e.pop(),i.pop(),h.pop(),e=e.concat(i,h);for(var s=e.length/o.length,l=0,f=0;f{/** + */var o=t(84993),v=function(a,r,n){var e=o({x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2},n),i=o({x1:r.x2,y1:r.y2,x2:r.x3,y2:r.y3},n),h=o({x1:r.x3,y1:r.y3,x2:r.x1,y2:r.y1},n);e.pop(),i.pop(),h.pop(),e=e.concat(i,h);for(var s=e.length/a.length,l=0,f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){for(var o=0;o{/** + */var m=function(t,o,v){for(var a=0;a{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r,n){o===void 0&&(o=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,i=0,h=t.length;if(n===1)for(e=r;e=0;e--)t[e][a]+=v+i*o,i++;return t};c.exports=m},43967:c=>{/** + */var m=function(t,o,v,a,r,n){a===void 0&&(a=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,i=0,h=t.length;if(n===1)for(e=r;e=0;e--)t[e][o]+=v+i*a,i++;return t};c.exports=m},43967:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r,n){o===void 0&&(o=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,i=0,h=t.length;if(n===1)for(e=r;e=0;e--)t[e][a]=v+i*o,i++;return t};c.exports=m},88926:(c,m,t)=>{/** + */var m=function(t,o,v,a,r,n){a===void 0&&(a=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,i=0,h=t.length;if(n===1)for(e=r;e=0;e--)t[e][o]=v+i*a,i++;return t};c.exports=m},88926:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(28176),v=function(o,r){for(var n=0;n{/** + */var o=t(28176),v=function(a,r){for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(24820),v=function(o,r){for(var n=0;n{/** + */var o=t(24820),v=function(a,r){for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65822),v=function(o,r){for(var n=0;n{/** + */var o=t(65822),v=function(a,r){for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26597),v=function(o,r){for(var n=0;n{/** + */var o=t(26597),v=function(a,r){for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(90260),v=function(o,r){for(var n=0;n{/** + */var o=t(90260),v=function(a,r){for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i){return a(o,"rotation",r,n,e,i)};c.exports=v},91051:(c,m,t)=>{/** + */var o=t(66979),v=function(a,r,n,e,i){return o(a,"rotation",r,n,e,i)};c.exports=v},91051:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(1163),v=t(20339),o=function(r,n,e){for(var i=n.x,h=n.y,s=0;s{/** + */var o=t(1163),v=t(20339),a=function(r,n,e){for(var i=n.x,h=n.y,s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(1163),v=function(o,r,n,e){var i=r.x,h=r.y;if(e===0)return o;for(var s=0;s{/** + */var o=t(1163),v=function(a,r,n,e){var i=r.x,h=r.y;if(e===0)return a;for(var s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i){return a(o,"scaleX",r,n,e,i)};c.exports=v},94868:(c,m,t)=>{/** + */var o=t(66979),v=function(a,r,n,e,i){return o(a,"scaleX",r,n,e,i)};c.exports=v},94868:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"scaleX",r,e,h,s),a(o,"scaleY",n,i,h,s)};c.exports=v},95532:(c,m,t)=>{/** + */var o=t(66979),v=function(a,r,n,e,i,h,s){return n==null&&(n=r),o(a,"scaleX",r,e,h,s),o(a,"scaleY",n,i,h,s)};c.exports=v},95532:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i){return a(o,"scaleY",r,n,e,i)};c.exports=v},8689:(c,m,t)=>{/** + */var o=t(66979),v=function(a,r,n,e,i){return o(a,"scaleY",r,n,e,i)};c.exports=v},8689:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"alpha",r,n,e,i)};c.exports=v},2645:(c,m,t)=>{/** + */var o=t(43967),v=function(a,r,n,e,i){return o(a,"alpha",r,n,e,i)};c.exports=v},2645:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e){return a(o,"blendMode",r,0,n,e)};c.exports=v},32372:(c,m,t)=>{/** + */var o=t(43967),v=function(a,r,n,e){return o(a,"blendMode",r,0,n,e)};c.exports=v},32372:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"depth",r,n,e,i)};c.exports=v},85373:c=>{/** + */var o=t(43967),v=function(a,r,n,e,i){return o(a,"depth",r,n,e,i)};c.exports=v},85373:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){for(var o=0;o{/** + */var m=function(t,o,v){for(var a=0;a{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"originX",r,e,h,s),a(o,"originY",n,i,h,s),o.forEach(function(l){l.updateDisplayOrigin()}),o};c.exports=v},79939:(c,m,t)=>{/** + */var o=t(43967),v=function(a,r,n,e,i,h,s){return n==null&&(n=r),o(a,"originX",r,e,h,s),o(a,"originY",n,i,h,s),a.forEach(function(l){l.updateDisplayOrigin()}),a};c.exports=v},79939:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"rotation",r,n,e,i)};c.exports=v},2699:(c,m,t)=>{/** + */var o=t(43967),v=function(a,r,n,e,i){return o(a,"rotation",r,n,e,i)};c.exports=v},2699:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"scaleX",r,e,h,s),a(o,"scaleY",n,i,h,s)};c.exports=v},98739:(c,m,t)=>{/** + */var o=t(43967),v=function(a,r,n,e,i,h,s){return n==null&&(n=r),o(a,"scaleX",r,e,h,s),o(a,"scaleY",n,i,h,s)};c.exports=v},98739:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"scaleX",r,n,e,i)};c.exports=v},98476:(c,m,t)=>{/** + */var o=t(43967),v=function(a,r,n,e,i){return o(a,"scaleX",r,n,e,i)};c.exports=v},98476:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"scaleY",r,n,e,i)};c.exports=v},6207:(c,m,t)=>{/** + */var o=t(43967),v=function(a,r,n,e,i){return o(a,"scaleY",r,n,e,i)};c.exports=v},6207:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"scrollFactorX",r,e,h,s),a(o,"scrollFactorY",n,i,h,s)};c.exports=v},6607:(c,m,t)=>{/** + */var o=t(43967),v=function(a,r,n,e,i,h,s){return n==null&&(n=r),o(a,"scrollFactorX",r,e,h,s),o(a,"scrollFactorY",n,i,h,s)};c.exports=v},6607:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"scrollFactorX",r,n,e,i)};c.exports=v},72248:(c,m,t)=>{/** + */var o=t(43967),v=function(a,r,n,e,i){return o(a,"scrollFactorX",r,n,e,i)};c.exports=v},72248:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"scrollFactorY",r,n,e,i)};c.exports=v},14036:c=>{/** + */var o=t(43967),v=function(a,r,n,e,i){return o(a,"scrollFactorY",r,n,e,i)};c.exports=v},14036:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){for(var n=0;n{/** + */var m=function(t,o,v,a,r){for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e){return a(o,"visible",r,0,n,e)};c.exports=v},77597:(c,m,t)=>{/** + */var o=t(43967),v=function(a,r,n,e){return o(a,"visible",r,0,n,e)};c.exports=v},77597:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"x",r,n,e,i)};c.exports=v},83194:(c,m,t)=>{/** + */var o=t(43967),v=function(a,r,n,e,i){return o(a,"x",r,n,e,i)};c.exports=v},83194:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"x",r,e,h,s),a(o,"y",n,i,h,s)};c.exports=v},67678:(c,m,t)=>{/** + */var o=t(43967),v=function(a,r,n,e,i,h,s){return n==null&&(n=r),o(a,"x",r,e,h,s),o(a,"y",n,i,h,s)};c.exports=v},67678:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"y",r,n,e,i)};c.exports=v},35850:(c,m,t)=>{/** + */var o=t(43967),v=function(a,r,n,e,i){return o(a,"y",r,n,e,i)};c.exports=v},35850:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i){e===void 0&&(e=0),i===void 0&&(i=new a);var h,s,l=o.length;if(l===1)h=o[0].x,s=o[0].y,o[0].x=r,o[0].y=n;else{var f=1,u=0;e===0&&(u=l-1,f=l-2),h=o[u].x,s=o[u].y,o[u].x=r,o[u].y=n;for(var d=0;d=l||f===-1)){var p=o[f],g=p.x,y=p.y;p.x=h,p.y=s,h=g,s=y,e===0?f--:f++}}return i.x=h,i.y=s,i};c.exports=v},8628:(c,m,t)=>{/** + */var o=t(26099),v=function(a,r,n,e,i){e===void 0&&(e=0),i===void 0&&(i=new o);var h,s,l=a.length;if(l===1)h=a[0].x,s=a[0].y,a[0].x=r,a[0].y=n;else{var f=1,u=0;e===0&&(u=l-1,f=l-2),h=a[u].x,s=a[u].y,a[u].x=r,a[u].y=n;for(var d=0;d=l||f===-1)){var p=a[f],g=p.x,y=p.y;p.x=h,p.y=s,h=g,s=y,e===0?f--:f++}}return i.x=h,i.y=s,i};c.exports=v},8628:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(33680),v=function(o){return a(o)};c.exports=v},21837:(c,m,t)=>{/** + */var o=t(33680),v=function(a){return o(a)};c.exports=v},21837:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7602),v=function(o,r,n,e,i){i===void 0&&(i=!1);var h=Math.abs(e-n)/o.length,s;if(i)for(s=0;s{/** + */var o=t(7602),v=function(a,r,n,e,i){i===void 0&&(i=!1);var h=Math.abs(e-n)/a.length,s;if(i)for(s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(54261),v=function(o,r,n,e,i){i===void 0&&(i=!1);var h=Math.abs(e-n)/o.length,s;if(i)for(s=0;s{/** + */var o=t(54261),v=function(a,r,n,e,i){i===void 0&&(i=!1);var h=Math.abs(e-n)/a.length,s;if(i)for(s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){if(r===void 0&&(r=!1),t.length===0)return t;if(t.length===1)return r?t[0][a]+=(o+v)/2:t[0][a]=(o+v)/2,t;var n=Math.abs(o-v)/(t.length-1),e;if(r)for(e=0;e{/** + */var m=function(t,o,v,a,r){if(r===void 0&&(r=!1),t.length===0)return t;if(t.length===1)return r?t[0][o]+=(a+v)/2:t[0][o]=(a+v)/2,t;var n=Math.abs(a-v)/(t.length-1),e;if(r)for(e=0;e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){for(var a=0;a{/** + */var m=function(t){for(var o=0;o{/** * @author Richard Davey * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(15994),v=function(o,r,n){n===void 0&&(n=0);for(var e=0;e{/** + */var o=t(15994),v=function(a,r,n){n===void 0&&(n=0);for(var e=0;e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -237,19 +237,19 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(74943),r=t(81957),n=t(41138),e=t(35154),i=t(90126),h=new v({initialize:function(l,f,u){this.manager=l,this.key=f,this.type="frame",this.frames=this.getFrames(l.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(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(s,l,f,u){f===null&&u===null?(s.frameRate=24,s.duration=24/l*1e3):f&&u===null?(s.duration=f,s.frameRate=l/(f/1e3)):(s.frameRate=u,s.duration=l/u*1e3),s.msPerFrame=1e3/s.frameRate},addFrame:function(s){return this.addFrameAt(this.frames.length,s)},addFrameAt:function(s,l){var f=this.getFrames(this.manager.textureManager,l);if(f.length>0){if(s===0)this.frames=f.concat(this.frames);else if(s===this.frames.length)this.frames=this.frames.concat(f);else{var u=this.frames.slice(0,s),d=this.frames.slice(s);this.frames=u.concat(f,d)}this.updateFrameSequence()}return this},checkFrame:function(s){return s>=0&&s0){g.isLast=!0,g.nextFrame=d[0],d[0].prevFrame=g;var N=1/(d.length-1);for(x=0;x0?s.inReverse&&s.forward?s.forward=!1:this.repeatAnimation(s):s.complete():this.updateAndGetNextTick(s,l.nextFrame)},handleYoyoFrame:function(s,l){if(l||(l=!1),s.inReverse===!l&&s.repeatCounter>0){(s.repeatDelay===0||s.pendingRepeat)&&(s.forward=l),this.repeatAnimation(s);return}if(s.inReverse!==l&&s.repeatCounter===0){s.complete();return}s.forward=l;var f=l?s.currentFrame.nextFrame:s.currentFrame.prevFrame;this.updateAndGetNextTick(s,f)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(s){var l=s.currentFrame;l.isFirst?s.yoyo?this.handleYoyoFrame(s,!0):s.repeatCounter>0?s.inReverse&&!s.forward?this.repeatAnimation(s):(s.forward=!0,this.repeatAnimation(s)):s.complete():this.updateAndGetNextTick(s,l.prevFrame)},updateAndGetNextTick:function(s,l){s.setCurrentFrame(l),this.getNextTick(s)},removeFrame:function(s){var l=this.frames.indexOf(s);return l!==-1&&this.removeFrameAt(l),this},removeFrameAt:function(s){return this.frames.splice(s,1),this.updateFrameSequence(),this},repeatAnimation:function(s){if(s._pendingStop===2){if(s._pendingStopValue===0)return s.stop();s._pendingStopValue--}s.repeatDelay>0&&!s.pendingRepeat?(s.pendingRepeat=!0,s.accumulator-=s.nextTick,s.nextTick+=s.repeatDelay):(s.repeatCounter--,s.forward?s.setCurrentFrame(s.currentFrame.nextFrame):s.setCurrentFrame(s.currentFrame.prevFrame),s.isPlaying&&(this.getNextTick(s),s.handleRepeat()))},toJSON:function(){var s={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(l){s.frames.push(l.toJSON())}),s},updateFrameSequence:function(){for(var s=this.frames.length,l=1/(s-1),f,u=0;u1?(f.isLast=!0,f.prevFrame=this.frames[s-2],f.nextFrame=this.frames[0]):s>1&&(f.prevFrame=this.frames[u-1],f.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(o.PAUSE_ALL,this.pause,this),this.manager.off(o.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var s=0;s{/** + */var o=t(45319),v=t(83419),a=t(74943),r=t(81957),n=t(41138),e=t(35154),i=t(90126),h=new v({initialize:function(l,f,u){this.manager=l,this.key=f,this.type="frame",this.frames=this.getFrames(l.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(a.PAUSE_ALL,this.pause,this),this.manager.on(a.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(s,l,f,u){f===null&&u===null?(s.frameRate=24,s.duration=24/l*1e3):f&&u===null?(s.duration=f,s.frameRate=l/(f/1e3)):(s.frameRate=u,s.duration=l/u*1e3),s.msPerFrame=1e3/s.frameRate},addFrame:function(s){return this.addFrameAt(this.frames.length,s)},addFrameAt:function(s,l){var f=this.getFrames(this.manager.textureManager,l);if(f.length>0){if(s===0)this.frames=f.concat(this.frames);else if(s===this.frames.length)this.frames=this.frames.concat(f);else{var u=this.frames.slice(0,s),d=this.frames.slice(s);this.frames=u.concat(f,d)}this.updateFrameSequence()}return this},checkFrame:function(s){return s>=0&&s0){g.isLast=!0,g.nextFrame=d[0],d[0].prevFrame=g;var N=1/(d.length-1);for(x=0;x0?s.inReverse&&s.forward?s.forward=!1:this.repeatAnimation(s):s.complete():this.updateAndGetNextTick(s,l.nextFrame)},handleYoyoFrame:function(s,l){if(l||(l=!1),s.inReverse===!l&&s.repeatCounter>0){(s.repeatDelay===0||s.pendingRepeat)&&(s.forward=l),this.repeatAnimation(s);return}if(s.inReverse!==l&&s.repeatCounter===0){s.complete();return}s.forward=l;var f=l?s.currentFrame.nextFrame:s.currentFrame.prevFrame;this.updateAndGetNextTick(s,f)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(s){var l=s.currentFrame;l.isFirst?s.yoyo?this.handleYoyoFrame(s,!0):s.repeatCounter>0?s.inReverse&&!s.forward?this.repeatAnimation(s):(s.forward=!0,this.repeatAnimation(s)):s.complete():this.updateAndGetNextTick(s,l.prevFrame)},updateAndGetNextTick:function(s,l){s.setCurrentFrame(l),this.getNextTick(s)},removeFrame:function(s){var l=this.frames.indexOf(s);return l!==-1&&this.removeFrameAt(l),this},removeFrameAt:function(s){return this.frames.splice(s,1),this.updateFrameSequence(),this},repeatAnimation:function(s){if(s._pendingStop===2){if(s._pendingStopValue===0)return s.stop();s._pendingStopValue--}s.repeatDelay>0&&!s.pendingRepeat?(s.pendingRepeat=!0,s.accumulator-=s.nextTick,s.nextTick+=s.repeatDelay):(s.repeatCounter--,s.forward?s.setCurrentFrame(s.currentFrame.nextFrame):s.setCurrentFrame(s.currentFrame.prevFrame),s.isPlaying&&(this.getNextTick(s),s.handleRepeat()))},toJSON:function(){var s={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(l){s.frames.push(l.toJSON())}),s},updateFrameSequence:function(){for(var s=this.frames.length,l=1/(s-1),f,u=0;u1?(f.isLast=!0,f.prevFrame=this.frames[s-2],f.nextFrame=this.frames[0]):s>1&&(f.prevFrame=this.frames[u-1],f.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(a.PAUSE_ALL,this.pause,this),this.manager.off(a.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e,i,h){h===void 0&&(h=!1),this.textureKey=r,this.textureFrame=n,this.index=e,this.frame=i,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=h},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});c.exports=v},60848:(c,m,t)=>{/** + */var o=t(83419),v=new o({initialize:function(r,n,e,i,h){h===void 0&&(h=!1),this.textureKey=r,this.textureFrame=n,this.index=e,this.frame=i,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=h},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});c.exports=v},60848:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(42099),v=t(83419),o=t(90330),r=t(50792),n=t(74943),e=t(8443),i=t(95540),h=t(35154),s=t(36383),l=t(20283),f=t(41836),u=new v({Extends:r,initialize:function(p){r.call(this),this.game=p,this.textureManager=null,this.globalTimeScale=1,this.anims=new o,this.mixes=new o,this.paused=!1,this.name="AnimationManager",p.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(d,p,g){var y=this.anims,x=this.mixes,T=typeof d=="string"?d:d.key,C=typeof p=="string"?p:p.key;if(y.has(T)&&y.has(C)){var M=x.get(T);M||(M={}),M[C]=g,x.set(T,M)}return this},removeMix:function(d,p){var g=this.mixes,y=typeof d=="string"?d:d.key,x=g.get(y);if(x)if(p){var T=typeof p=="string"?p:p.key;x.hasOwnProperty(T)&&delete x[T]}else p||g.delete(y);return this},getMix:function(d,p){var g=this.mixes,y=typeof d=="string"?d:d.key,x=typeof p=="string"?p:p.key,T=g.get(y);return T&&T.hasOwnProperty(x)?T[x]:0},add:function(d,p){return this.anims.has(d)?(console.warn("Animation key exists: "+d),this):(p.key=d,this.anims.set(d,p),this.emit(n.ADD_ANIMATION,d,p),this)},exists:function(d){return this.anims.has(d)},createFromAseprite:function(d,p,g){var y=[],x=this.game.cache.json.get(d);if(!x)return console.warn("No Aseprite data found for: "+d),y;var T=this,C=h(x,"meta",null),M=h(x,"frames",null);if(C&&M){var w=h(C,"frameTags",[]);w.forEach(function(L){var F=[],O=i(L,"name",null),N=i(L,"from",0),G=i(L,"to",0),V=i(L,"direction","forward");if(O&&(!p||p&&p.indexOf(O)>-1)){for(var K=0,$=N;$<=G;$++){var J=$.toString(),X=M[J];if(X){var Y=i(X,"duration",s.MAX_SAFE_INTEGER);F.push({key:d,frame:J,duration:Y}),K+=Y}}V==="reverse"&&(F=F.reverse());var D={key:O,frames:F,duration:K,yoyo:V==="pingpong"},z;g?g.anims&&(z=g.anims.create(D)):z=T.create(D),z&&y.push(z)}})}return y},create:function(d){var p=d.key,g=!1;return p&&(g=this.get(p),g?console.warn("AnimationManager key already exists: "+p):(g=new a(this,p,d),this.anims.set(p,g),this.emit(n.ADD_ANIMATION,p,g))),g},fromJSON:function(d,p){p===void 0&&(p=!1),p&&this.anims.clear(),typeof d=="string"&&(d=JSON.parse(d));var g=[];if(d.hasOwnProperty("anims")&&Array.isArray(d.anims)){for(var y=0;y{/** + */var o=t(42099),v=t(83419),a=t(90330),r=t(50792),n=t(74943),e=t(8443),i=t(95540),h=t(35154),s=t(36383),l=t(20283),f=t(41836),u=new v({Extends:r,initialize:function(p){r.call(this),this.game=p,this.textureManager=null,this.globalTimeScale=1,this.anims=new a,this.mixes=new a,this.paused=!1,this.name="AnimationManager",p.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(d,p,g){var y=this.anims,x=this.mixes,C=typeof d=="string"?d:d.key,P=typeof p=="string"?p:p.key;if(y.has(C)&&y.has(P)){var M=x.get(C);M||(M={}),M[P]=g,x.set(C,M)}return this},removeMix:function(d,p){var g=this.mixes,y=typeof d=="string"?d:d.key,x=g.get(y);if(x)if(p){var C=typeof p=="string"?p:p.key;x.hasOwnProperty(C)&&delete x[C]}else p||g.delete(y);return this},getMix:function(d,p){var g=this.mixes,y=typeof d=="string"?d:d.key,x=typeof p=="string"?p:p.key,C=g.get(y);return C&&C.hasOwnProperty(x)?C[x]:0},add:function(d,p){return this.anims.has(d)?(console.warn("Animation key exists: "+d),this):(p.key=d,this.anims.set(d,p),this.emit(n.ADD_ANIMATION,d,p),this)},exists:function(d){return this.anims.has(d)},createFromAseprite:function(d,p,g){var y=[],x=this.game.cache.json.get(d);if(!x)return console.warn("No Aseprite data found for: "+d),y;var C=this,P=h(x,"meta",null),M=h(x,"frames",null);if(P&&M){var w=h(P,"frameTags",[]);w.forEach(function(I){var L=[],B=i(I,"name",null),N=i(I,"from",0),G=i(I,"to",0),V=i(I,"direction","forward");if(B&&(!p||p&&p.indexOf(B)>-1)){for(var K=0,j=N;j<=G;j++){var J=j.toString(),X=M[J];if(X){var Y=i(X,"duration",s.MAX_SAFE_INTEGER);L.push({key:d,frame:J,duration:Y}),K+=Y}}V==="reverse"&&(L=L.reverse());var b={key:B,frames:L,duration:K,yoyo:V==="pingpong"},z;g?g.anims&&(z=g.anims.create(b)):z=C.create(b),z&&y.push(z)}})}return y},create:function(d){var p=d.key,g=!1;return p&&(g=this.get(p),g?console.warn("AnimationManager key already exists: "+p):(g=new o(this,p,d),this.anims.set(p,g),this.emit(n.ADD_ANIMATION,p,g))),g},fromJSON:function(d,p){p===void 0&&(p=!1),p&&this.anims.clear(),typeof d=="string"&&(d=JSON.parse(d));var g=[];if(d.hasOwnProperty("anims")&&Array.isArray(d.anims)){for(var y=0;y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(42099),v=t(30976),o=t(83419),r=t(90330),n=t(74943),e=t(95540),i=new o({initialize:function(s){this.parent=s,this.animationManager=s.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(h){var s=this.parent;if(h===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,s;Array.isArray(h)||(h=[h]);for(var l=0;lu&&(g=0),this.randomFrame&&(g=v(0,u-1));var y=f.frames[g];g===0&&!this.forward&&(y=f.getLastFrame()),this.currentFrame=y}return this.parent},pause:function(h){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),h!==void 0&&this.setCurrentFrame(h),this.parent},resume:function(h){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),h!==void 0&&this.setCurrentFrame(h),this.parent},playAfterDelay:function(h,s){if(!this.isPlaying)this.delayCounter=s,this.play(h,!0);else{var l=this.nextAnim,f=this.nextAnimsQueue;l&&f.unshift(l),this.nextAnim=h,this._pendingStop=1,this._pendingStopValue=s}return this.parent},playAfterRepeat:function(h,s){if(s===void 0&&(s=1),!this.isPlaying)this.play(h);else{var l=this.nextAnim,f=this.nextAnimsQueue;l&&f.unshift(l),this.repeatCounter!==-1&&s>this.repeatCounter&&(s=this.repeatCounter),this.nextAnim=h,this._pendingStop=2,this._pendingStopValue=s}return this.parent},play:function(h,s){s===void 0&&(s=!1);var l=this.currentAnim,f=this.parent,u=typeof h=="string"?h:h.key;if(s&&this.isPlaying&&l.key===u)return f;if(l&&this.isPlaying){var d=this.animationManager.getMix(l.key,h);if(d>0)return this.playAfterDelay(h,d)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(h)},playReverse:function(h,s){s===void 0&&(s=!1);var l=typeof h=="string"?h:h.key;return s&&this.isPlaying&&this.currentAnim.key===l?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(h))},startAnimation:function(h){this.load(h);var s=this.currentAnim,l=this.parent;return s&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,s.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)),l},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(h,s){var l=this.currentAnim;if(l){var f=this.currentFrame,u=this.parent,d=f.textureFrame;u.emit(h,l,f,u,d),s&&u.emit(s+l.key,l,f,u,d)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var h=this.currentFrame;if(!h)return 0;var s=h.progress;return this.inReverse&&(s*=-1),s},setProgress:function(h){return this.forward||(h=1-h),this.setCurrentFrame(this.currentAnim.getFrameByProgress(h)),this.parent},setRepeat:function(h){return this.repeatCounter=h===-1?Number.MAX_VALUE:h,this.parent},globalRemove:function(h,s){s===void 0&&(s=this.currentAnim),this.isPlaying&&s.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(h,s){h===void 0&&(h=!1),s===void 0&&(s=!1);var l=this.currentAnim,f=this.parent;return l?(s&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),l.getFirstTick(this),this.emitEvents(n.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!h,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(l.frames[0]),this.parent):f},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var h=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(h)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var h=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(h)}return this.parent},stopAfterDelay:function(h){return this._pendingStop=1,this._pendingStopValue=h,this.parent},stopAfterRepeat:function(h){return h===void 0&&(h=1),this.repeatCounter!==-1&&h>this.repeatCounter&&(h=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=h,this.parent},stopOnFrame:function(h){return this._pendingStop=3,this._pendingStopValue=h,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(h,s){var l=this.currentAnim;if(!(!this.isPlaying||!l||l.paused)){if(this.accumulator+=s*this.timeScale*this.animationManager.globalTimeScale,this._pendingStop===1&&(this._pendingStopValue-=s,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?l.nextFrame(this):l.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var f=0;do this.forward?l.nextFrame(this):l.previousFrame(this),f++;while(this.isPlaying&&this.accumulator>this.nextTick&&f<60)}}},setCurrentFrame:function(h){var s=this.parent;return this.currentFrame=h,s.texture=h.frame.texture,s.frame=h.frame,s.isCropped&&s.frame.updateCropUVs(s._crop,s.flipX,s.flipY),h.setAlpha&&(s.alpha=h.alpha),s.setSizeToFrame(),s._originComponent&&(h.frame.customPivot?s.setOrigin(h.frame.pivotX,h.frame.pivotY):s.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(n.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===h&&this.stop()),s},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(h){return this.anims?this.anims.get(h):null},exists:function(h){return this.anims?this.anims.has(h):!1},create:function(h){var s=h.key,l=!1;return s&&(l=this.get(s),l?console.warn("Animation key already exists: "+s):(l=new a(this,s,h),this.anims||(this.anims=new r),this.anims.set(s,l))),l},createFromAseprite:function(h,s){return this.animationManager.createFromAseprite(h,s,this.parent)},generateFrameNames:function(h,s){return this.animationManager.generateFrameNames(h,s)},generateFrameNumbers:function(h,s){return this.animationManager.generateFrameNumbers(h,s)},remove:function(h){var s=this.get(h);return s&&(this.currentAnim===s&&this.stop(),this.anims.delete(h)),s},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}}});c.exports=i},57090:c=>{/** + */var o=t(42099),v=t(30976),a=t(83419),r=t(90330),n=t(74943),e=t(95540),i=new a({initialize:function(s){this.parent=s,this.animationManager=s.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(h){var s=this.parent;if(h===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,s;Array.isArray(h)||(h=[h]);for(var l=0;lu&&(g=0),this.randomFrame&&(g=v(0,u-1));var y=f.frames[g];g===0&&!this.forward&&(y=f.getLastFrame()),this.currentFrame=y}return this.parent},pause:function(h){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),h!==void 0&&this.setCurrentFrame(h),this.parent},resume:function(h){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),h!==void 0&&this.setCurrentFrame(h),this.parent},playAfterDelay:function(h,s){if(!this.isPlaying)this.delayCounter=s,this.play(h,!0);else{var l=this.nextAnim,f=this.nextAnimsQueue;l&&f.unshift(l),this.nextAnim=h,this._pendingStop=1,this._pendingStopValue=s}return this.parent},playAfterRepeat:function(h,s){if(s===void 0&&(s=1),!this.isPlaying)this.play(h);else{var l=this.nextAnim,f=this.nextAnimsQueue;l&&f.unshift(l),this.repeatCounter!==-1&&s>this.repeatCounter&&(s=this.repeatCounter),this.nextAnim=h,this._pendingStop=2,this._pendingStopValue=s}return this.parent},play:function(h,s){s===void 0&&(s=!1);var l=this.currentAnim,f=this.parent,u=typeof h=="string"?h:h.key;if(s&&this.isPlaying&&l.key===u)return f;if(l&&this.isPlaying){var d=this.animationManager.getMix(l.key,h);if(d>0)return this.playAfterDelay(h,d)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(h)},playReverse:function(h,s){s===void 0&&(s=!1);var l=typeof h=="string"?h:h.key;return s&&this.isPlaying&&this.currentAnim.key===l?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(h))},startAnimation:function(h){this.load(h);var s=this.currentAnim,l=this.parent;return s&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,s.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)),l},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(h,s){var l=this.currentAnim;if(l){var f=this.currentFrame,u=this.parent,d=f.textureFrame;u.emit(h,l,f,u,d),s&&u.emit(s+l.key,l,f,u,d)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var h=this.currentFrame;if(!h)return 0;var s=h.progress;return this.inReverse&&(s*=-1),s},setProgress:function(h){return this.forward||(h=1-h),this.setCurrentFrame(this.currentAnim.getFrameByProgress(h)),this.parent},setRepeat:function(h){return this.repeatCounter=h===-1?Number.MAX_VALUE:h,this.parent},globalRemove:function(h,s){s===void 0&&(s=this.currentAnim),this.isPlaying&&s.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(h,s){h===void 0&&(h=!1),s===void 0&&(s=!1);var l=this.currentAnim,f=this.parent;return l?(s&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),l.getFirstTick(this),this.emitEvents(n.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!h,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(l.frames[0]),this.parent):f},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var h=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(h)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var h=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(h)}return this.parent},stopAfterDelay:function(h){return this._pendingStop=1,this._pendingStopValue=h,this.parent},stopAfterRepeat:function(h){return h===void 0&&(h=1),this.repeatCounter!==-1&&h>this.repeatCounter&&(h=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=h,this.parent},stopOnFrame:function(h){return this._pendingStop=3,this._pendingStopValue=h,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(h,s){var l=this.currentAnim;if(!(!this.isPlaying||!l||l.paused)){if(this.accumulator+=s*this.timeScale*this.animationManager.globalTimeScale,this._pendingStop===1&&(this._pendingStopValue-=s,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?l.nextFrame(this):l.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var f=0;do this.forward?l.nextFrame(this):l.previousFrame(this),f++;while(this.isPlaying&&this.accumulator>this.nextTick&&f<60)}}},setCurrentFrame:function(h){var s=this.parent;return this.currentFrame=h,s.texture=h.frame.texture,s.frame=h.frame,s.isCropped&&s.frame.updateCropUVs(s._crop,s.flipX,s.flipY),h.setAlpha&&(s.alpha=h.alpha),s.setSizeToFrame(),s._originComponent&&(h.frame.customPivot?s.setOrigin(h.frame.pivotX,h.frame.pivotY):s.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(n.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===h&&this.stop()),s},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(h){return this.anims?this.anims.get(h):null},exists:function(h){return this.anims?this.anims.has(h):!1},create:function(h){var s=h.key,l=!1;return s&&(l=this.get(s),l?console.warn("Animation key already exists: "+s):(l=new o(this,s,h),this.anims||(this.anims=new r),this.anims.set(s,l))),l},createFromAseprite:function(h,s){return this.animationManager.createFromAseprite(h,s,this.parent)},generateFrameNames:function(h,s){return this.animationManager.generateFrameNames(h,s)},generateFrameNumbers:function(h,s){return this.animationManager.generateFrameNumbers(h,s)},remove:function(h){var s=this.get(h);return s&&(this.currentAnim===s&&this.stop(),this.anims.delete(h)),s},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}}});c.exports=i},57090:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -305,11 +305,11 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(90330),o=t(50792),r=t(24736),n=new a({initialize:function(){this.entries=new v,this.events=new o},add:function(e,i){return this.entries.set(e,i),this.events.emit(r.ADD,this,e,i),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 i=this.get(e);return i&&(this.entries.delete(e),this.events.emit(r.REMOVE,this,e,i.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});c.exports=n},24047:(c,m,t)=>{/** + */var o=t(83419),v=t(90330),a=t(50792),r=t(24736),n=new o({initialize:function(){this.entries=new v,this.events=new a},add:function(e,i){return this.entries.set(e,i),this.events.emit(r.ADD,this,e,i),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 i=this.get(e);return i&&(this.entries.delete(e),this.events.emit(r.REMOVE,this,e,i.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});c.exports=n},24047:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2161),v=t(83419),o=t(8443),r=new v({initialize:function(e){this.game=e,this.binary=new a,this.bitmapFont=new a,this.json=new a,this.physics=new a,this.shader=new a,this.audio=new a,this.video=new a,this.text=new a,this.html=new a,this.obj=new a,this.tilemap=new a,this.xml=new a,this.custom={},this.game.events.once(o.DESTROY,this.destroy,this)},addCustom:function(n){return this.custom.hasOwnProperty(n)||(this.custom[n]=new a),this.custom[n]},destroy:function(){for(var n=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e{/** + */var o=t(2161),v=t(83419),a=t(8443),r=new v({initialize:function(e){this.game=e,this.binary=new o,this.bitmapFont=new o,this.json=new o,this.physics=new o,this.shader=new o,this.audio=new o,this.video=new o,this.text=new o,this.html=new o,this.obj=new o,this.tilemap=new o,this.xml=new o,this.custom={},this.game.events.once(a.DESTROY,this.destroy,this)},addCustom:function(n){return this.custom.hasOwnProperty(n)||(this.custom[n]=new o),this.custom[n]},destroy:function(){for(var n=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -329,39 +329,39 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(39506),r=t(50792),n=t(19715),e=t(87841),i=t(61340),h=t(80333),s=t(26099),l=new a({Extends:r,Mixins:[v.AlphaSingle,v.Visible],initialize:function(u,d,p,g){u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=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=d,this._width=p,this._height=g,this._bounds=new e,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new i,this.transparent=!0,this.backgroundColor=h("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new s(p/2,g/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(f){this.renderList.push(f)},setOrigin:function(f,u){return f===void 0&&(f=.5),u===void 0&&(u=f),this.originX=f,this.originY=u,this},getScroll:function(f,u,d){d===void 0&&(d=new s);var p=this.width*.5,g=this.height*.5;return d.x=f-p,d.y=u-g,this.useBounds&&(d.x=this.clampX(d.x),d.y=this.clampY(d.y)),d},centerOnX:function(f){var u=this.width*.5;return this.midPoint.x=f,this.scrollX=f-u,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(f){var u=this.height*.5;return this.midPoint.y=f,this.scrollY=f-u,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(f,u){return this.centerOnX(f),this.centerOnY(u),this},centerToBounds:function(){if(this.useBounds){var f=this._bounds,u=this.width*.5,d=this.height*.5;this.midPoint.set(f.centerX,f.centerY),this.scrollX=f.centerX-u,this.scrollY=f.centerY-d}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(f){if(this.disableCull)return f;var u=this.matrix.matrix,d=u[0],p=u[1],g=u[2],y=u[3],x=d*y-p*g;if(!x)return f;var T=u[4],C=u[5],M=this.scrollX,w=this.scrollY,L=this.width,F=this.height,O=this.y,N=O+F,G=this.x,V=G+L,K=this.culledObjects,$=f.length;x=1/x,K.length=0;for(var J=0;J<$;++J){var X=f[J];if(!X.hasOwnProperty("width")||X.parentContainer){K.push(X);continue}var Y=X.width,D=X.height,z=X.x-M*X.scrollFactorX-Y*X.originX,W=X.y-w*X.scrollFactorY-D*X.originY,H=z*d+W*g+T,Z=z*p+W*y+C,Q=(z+Y)*d+(W+D)*g+T,k=(z+Y)*p+(W+D)*y+C;Q>G&&HO&&Zg&&(f=g),f},clampY:function(f){var u=this._bounds,d=this.displayHeight,p=u.y+(d-this.height)/2,g=Math.max(p,p+u.height-d);return fg&&(f=g),f},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(f){return f===void 0&&(f=0),this.rotation=o(f),this},setBackgroundColor:function(f){return f===void 0&&(f="rgba(0,0,0,0)"),this.backgroundColor=h(f),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(f,u,d,p,g){return g===void 0&&(g=!1),this._bounds.setTo(f,u,d,p),this.dirty=!0,this.useBounds=!0,g?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(f){f===void 0&&(f=new e);var u=this._bounds;return f.setTo(u.x,u.y,u.width,u.height),f},setName:function(f){return f===void 0&&(f=""),this.name=f,this},setPosition:function(f,u){return u===void 0&&(u=f),this.x=f,this.y=u,this},setRotation:function(f){return f===void 0&&(f=0),this.rotation=f,this},setRoundPixels:function(f){return this.roundPixels=f,this},setScene:function(f,u){u===void 0&&(u=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=f,this.isSceneCamera=u;var d=f.sys;return this.sceneManager=d.game.scene,this.scaleManager=d.scale,this.cameraManager=d.cameras,this.updateSystem(),this},setScroll:function(f,u){return u===void 0&&(u=f),this.scrollX=f,this.scrollY=u,this},setSize:function(f,u){return u===void 0&&(u=f),this.width=f,this.height=u,this},setViewport:function(f,u,d,p){return this.x=f,this.y=u,this.width=d,this.height=p,this},setZoom:function(f,u){return f===void 0&&(f=1),u===void 0&&(u=f),f===0&&(f=.001),u===0&&(u=.001),this.zoomX=f,this.zoomY=u,this},setMask:function(f,u){return u===void 0&&(u=!0),this.mask=f,this._maskCamera=u?this.cameraManager.default:this,this},clearMask:function(f){return f===void 0&&(f=!1),f&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var f={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(f.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),f},update:function(){},setIsSceneCamera:function(f){return this.isSceneCamera=f,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var f=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,u=this.sceneManager;f&&!this._customViewport?u.customViewports++:!f&&this._customViewport&&u.customViewports--,this.dirty=!0,this._customViewport=f}},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(f){this._x=f,this.updateSystem()}},y:{get:function(){return this._y},set:function(f){this._y=f,this.updateSystem()}},width:{get:function(){return this._width},set:function(f){this._width=f,this.updateSystem()}},height:{get:function(){return this._height},set:function(f){this._height=f,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(f){f!==this._scrollX&&(this._scrollX=f,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(f){f!==this._scrollY&&(this._scrollY=f,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(f){this._zoomX=f,this._zoomY=f,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(f){this._zoomX=f,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(f){this._zoomY=f,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(f){this._rotation=f,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});c.exports=l},38058:(c,m,t)=>{/** + */var o=t(83419),v=t(31401),a=t(39506),r=t(50792),n=t(19715),e=t(87841),i=t(61340),h=t(80333),s=t(26099),l=new o({Extends:r,Mixins:[v.AlphaSingle,v.Visible],initialize:function(u,d,p,g){u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=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=d,this._width=p,this._height=g,this._bounds=new e,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new i,this.transparent=!0,this.backgroundColor=h("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new s(p/2,g/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(f){this.renderList.push(f)},setOrigin:function(f,u){return f===void 0&&(f=.5),u===void 0&&(u=f),this.originX=f,this.originY=u,this},getScroll:function(f,u,d){d===void 0&&(d=new s);var p=this.width*.5,g=this.height*.5;return d.x=f-p,d.y=u-g,this.useBounds&&(d.x=this.clampX(d.x),d.y=this.clampY(d.y)),d},centerOnX:function(f){var u=this.width*.5;return this.midPoint.x=f,this.scrollX=f-u,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(f){var u=this.height*.5;return this.midPoint.y=f,this.scrollY=f-u,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(f,u){return this.centerOnX(f),this.centerOnY(u),this},centerToBounds:function(){if(this.useBounds){var f=this._bounds,u=this.width*.5,d=this.height*.5;this.midPoint.set(f.centerX,f.centerY),this.scrollX=f.centerX-u,this.scrollY=f.centerY-d}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(f){if(this.disableCull)return f;var u=this.matrix.matrix,d=u[0],p=u[1],g=u[2],y=u[3],x=d*y-p*g;if(!x)return f;var C=u[4],P=u[5],M=this.scrollX,w=this.scrollY,I=this.width,L=this.height,B=this.y,N=B+L,G=this.x,V=G+I,K=this.culledObjects,j=f.length;x=1/x,K.length=0;for(var J=0;JG&&HB&&Zg&&(f=g),f},clampY:function(f){var u=this._bounds,d=this.displayHeight,p=u.y+(d-this.height)/2,g=Math.max(p,p+u.height-d);return fg&&(f=g),f},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(f){return f===void 0&&(f=0),this.rotation=a(f),this},setBackgroundColor:function(f){return f===void 0&&(f="rgba(0,0,0,0)"),this.backgroundColor=h(f),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(f,u,d,p,g){return g===void 0&&(g=!1),this._bounds.setTo(f,u,d,p),this.dirty=!0,this.useBounds=!0,g?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(f){f===void 0&&(f=new e);var u=this._bounds;return f.setTo(u.x,u.y,u.width,u.height),f},setName:function(f){return f===void 0&&(f=""),this.name=f,this},setPosition:function(f,u){return u===void 0&&(u=f),this.x=f,this.y=u,this},setRotation:function(f){return f===void 0&&(f=0),this.rotation=f,this},setRoundPixels:function(f){return this.roundPixels=f,this},setScene:function(f,u){u===void 0&&(u=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=f,this.isSceneCamera=u;var d=f.sys;return this.sceneManager=d.game.scene,this.scaleManager=d.scale,this.cameraManager=d.cameras,this.updateSystem(),this},setScroll:function(f,u){return u===void 0&&(u=f),this.scrollX=f,this.scrollY=u,this},setSize:function(f,u){return u===void 0&&(u=f),this.width=f,this.height=u,this},setViewport:function(f,u,d,p){return this.x=f,this.y=u,this.width=d,this.height=p,this},setZoom:function(f,u){return f===void 0&&(f=1),u===void 0&&(u=f),f===0&&(f=.001),u===0&&(u=.001),this.zoomX=f,this.zoomY=u,this},setMask:function(f,u){return u===void 0&&(u=!0),this.mask=f,this._maskCamera=u?this.cameraManager.default:this,this},clearMask:function(f){return f===void 0&&(f=!1),f&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var f={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(f.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),f},update:function(){},setIsSceneCamera:function(f){return this.isSceneCamera=f,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var f=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,u=this.sceneManager;f&&!this._customViewport?u.customViewports++:!f&&this._customViewport&&u.customViewports--,this.dirty=!0,this._customViewport=f}},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(f){this._x=f,this.updateSystem()}},y:{get:function(){return this._y},set:function(f){this._y=f,this.updateSystem()}},width:{get:function(){return this._width},set:function(f){this._width=f,this.updateSystem()}},height:{get:function(){return this._height},set:function(f){this._height=f,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(f){f!==this._scrollX&&(this._scrollX=f,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(f){f!==this._scrollY&&(this._scrollY=f,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(f){this._zoomX=f,this._zoomY=f,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(f){this._zoomX=f,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(f){this._zoomY=f,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(f){this._rotation=f,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});c.exports=l},38058:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(71911),v=t(67502),o=t(45319),r=t(83419),n=t(31401),e=t(20052),i=t(19715),h=t(28915),s=t(87841),l=t(26099),f=new r({Extends:a,Mixins:[n.PostPipeline],initialize:function(d,p,g,y){a.call(this,d,p,g,y),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 l(1,1),this.followOffset=new l,this.deadzone=null,this._follow=null},setDeadzone:function(u,d){if(u===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=u,this.deadzone.height=d):this.deadzone=new s(0,0,u,d),this._follow){var p=this.width/2,g=this.height/2,y=this._follow.x-this.followOffset.x,x=this._follow.y-this.followOffset.y;this.midPoint.set(y,x),this.scrollX=y-p,this.scrollY=x-g}v(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(u,d,p,g,y,x){return this.fadeEffect.start(!1,u,d,p,g,!0,y,x)},fadeOut:function(u,d,p,g,y,x){return this.fadeEffect.start(!0,u,d,p,g,!0,y,x)},fadeFrom:function(u,d,p,g,y,x,T){return this.fadeEffect.start(!1,u,d,p,g,y,x,T)},fade:function(u,d,p,g,y,x,T){return this.fadeEffect.start(!0,u,d,p,g,y,x,T)},flash:function(u,d,p,g,y,x,T){return this.flashEffect.start(u,d,p,g,y,x,T)},shake:function(u,d,p,g,y){return this.shakeEffect.start(u,d,p,g,y)},pan:function(u,d,p,g,y,x,T){return this.panEffect.start(u,d,p,g,y,x,T)},rotateTo:function(u,d,p,g,y,x,T){return this.rotateToEffect.start(u,d,p,g,y,x,T)},zoomTo:function(u,d,p,g,y,x){return this.zoomEffect.start(u,d,p,g,y,x)},preRender:function(){this.renderList.length=0;var u=this.width,d=this.height,p=u*.5,g=d*.5,y=this.zoom,x=this.matrix,T=u*this.originX,C=d*this.originY,M=this._follow,w=this.deadzone,L=this.scrollX,F=this.scrollY;w&&v(w,this.midPoint.x,this.midPoint.y);var O=!1;if(M&&!this.panEffect.isRunning){var N=this.lerp,G=M.x-this.followOffset.x,V=M.y-this.followOffset.y;w?(Gw.right&&(L=h(L,L+(G-w.right),N.x)),Vw.bottom&&(F=h(F,F+(V-w.bottom),N.y))):(L=h(L,G-T,N.x),F=h(F,V-C,N.y)),O=!0}this.useBounds&&(L=this.clampX(L),F=this.clampY(F)),this.scrollX=L,this.scrollY=F;var K=L+p,$=F+g;this.midPoint.set(K,$);var J=u/y,X=d/y,Y=Math.floor(K-J/2),D=Math.floor($-X/2);this.worldView.setTo(Y,D,J,X),x.applyITRS(Math.floor(this.x+T),Math.floor(this.y+C),this.rotation,y,y),x.translate(-T,-C),this.shakeEffect.preRender(),O&&this.emit(i.FOLLOW_UPDATE,this,M)},setLerp:function(u,d){return u===void 0&&(u=1),d===void 0&&(d=u),this.lerp.set(u,d),this},setFollowOffset:function(u,d){return u===void 0&&(u=0),d===void 0&&(d=0),this.followOffset.set(u,d),this},startFollow:function(u,d,p,g,y,x){d===void 0&&(d=!1),p===void 0&&(p=1),g===void 0&&(g=p),y===void 0&&(y=0),x===void 0&&(x=y),this._follow=u,this.roundPixels=d,p=o(p,0,1),g=o(g,0,1),this.lerp.set(p,g),this.followOffset.set(y,x);var T=this.width/2,C=this.height/2,M=u.x-y,w=u.y-x;return this.midPoint.set(M,w),this.scrollX=M-T,this.scrollY=w-C,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,d){this.visible&&(this.rotateToEffect.update(u,d),this.panEffect.update(u,d),this.zoomEffect.update(u,d),this.shakeEffect.update(u,d),this.flashEffect.update(u,d),this.fadeEffect.update(u,d))},destroy:function(){this.resetFX(),a.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});c.exports=f},32743:(c,m,t)=>{/** + */var o=t(71911),v=t(67502),a=t(45319),r=t(83419),n=t(31401),e=t(20052),i=t(19715),h=t(28915),s=t(87841),l=t(26099),f=new r({Extends:o,Mixins:[n.PostPipeline],initialize:function(d,p,g,y){o.call(this,d,p,g,y),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 l(1,1),this.followOffset=new l,this.deadzone=null,this._follow=null},setDeadzone:function(u,d){if(u===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=u,this.deadzone.height=d):this.deadzone=new s(0,0,u,d),this._follow){var p=this.width/2,g=this.height/2,y=this._follow.x-this.followOffset.x,x=this._follow.y-this.followOffset.y;this.midPoint.set(y,x),this.scrollX=y-p,this.scrollY=x-g}v(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(u,d,p,g,y,x){return this.fadeEffect.start(!1,u,d,p,g,!0,y,x)},fadeOut:function(u,d,p,g,y,x){return this.fadeEffect.start(!0,u,d,p,g,!0,y,x)},fadeFrom:function(u,d,p,g,y,x,C){return this.fadeEffect.start(!1,u,d,p,g,y,x,C)},fade:function(u,d,p,g,y,x,C){return this.fadeEffect.start(!0,u,d,p,g,y,x,C)},flash:function(u,d,p,g,y,x,C){return this.flashEffect.start(u,d,p,g,y,x,C)},shake:function(u,d,p,g,y){return this.shakeEffect.start(u,d,p,g,y)},pan:function(u,d,p,g,y,x,C){return this.panEffect.start(u,d,p,g,y,x,C)},rotateTo:function(u,d,p,g,y,x,C){return this.rotateToEffect.start(u,d,p,g,y,x,C)},zoomTo:function(u,d,p,g,y,x){return this.zoomEffect.start(u,d,p,g,y,x)},preRender:function(){this.renderList.length=0;var u=this.width,d=this.height,p=u*.5,g=d*.5,y=this.zoom,x=this.matrix,C=u*this.originX,P=d*this.originY,M=this._follow,w=this.deadzone,I=this.scrollX,L=this.scrollY;w&&v(w,this.midPoint.x,this.midPoint.y);var B=!1;if(M&&!this.panEffect.isRunning){var N=this.lerp,G=M.x-this.followOffset.x,V=M.y-this.followOffset.y;w?(Gw.right&&(I=h(I,I+(G-w.right),N.x)),Vw.bottom&&(L=h(L,L+(V-w.bottom),N.y))):(I=h(I,G-C,N.x),L=h(L,V-P,N.y)),B=!0}this.useBounds&&(I=this.clampX(I),L=this.clampY(L)),this.scrollX=I,this.scrollY=L;var K=I+p,j=L+g;this.midPoint.set(K,j);var J=u/y,X=d/y,Y=Math.floor(K-J/2),b=Math.floor(j-X/2);this.worldView.setTo(Y,b,J,X),x.applyITRS(Math.floor(this.x+C),Math.floor(this.y+P),this.rotation,y,y),x.translate(-C,-P),this.shakeEffect.preRender(),B&&this.emit(i.FOLLOW_UPDATE,this,M)},setLerp:function(u,d){return u===void 0&&(u=1),d===void 0&&(d=u),this.lerp.set(u,d),this},setFollowOffset:function(u,d){return u===void 0&&(u=0),d===void 0&&(d=0),this.followOffset.set(u,d),this},startFollow:function(u,d,p,g,y,x){d===void 0&&(d=!1),p===void 0&&(p=1),g===void 0&&(g=p),y===void 0&&(y=0),x===void 0&&(x=y),this._follow=u,this.roundPixels=d,p=a(p,0,1),g=a(g,0,1),this.lerp.set(p,g),this.followOffset.set(y,x);var C=this.width/2,P=this.height/2,M=u.x-y,w=u.y-x;return this.midPoint.set(M,w),this.scrollX=M-C,this.scrollY=w-P,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,d){this.visible&&(this.rotateToEffect.update(u,d),this.panEffect.update(u,d),this.zoomEffect.update(u,d),this.shakeEffect.update(u,d),this.flashEffect.update(u,d),this.fadeEffect.update(u,d))},destroy:function(){this.resetFX(),o.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});c.exports=f},32743:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(38058),v=t(83419),o=t(95540),r=t(37277),n=t(37303),e=t(97480),i=t(44594),h=new v({initialize:function(l){this.scene=l,this.systems=l.sys,this.roundPixels=l.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,l.sys.events.once(i.BOOT,this.boot,this),l.sys.events.on(i.START,this.start,this)},boot:function(){var s=this.systems;s.settings.cameras?this.fromJSON(s.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new a(0,0,s.scale.width,s.scale.height).setScene(this.scene),s.game.scale.on(e.RESIZE,this.onResize,this),this.systems.events.once(i.DESTROY,this.destroy,this)},start:function(){if(!this.main){var s=this.systems;s.settings.cameras?this.fromJSON(s.settings.cameras):this.add(),this.main=this.cameras[0]}var l=this.systems.events;l.on(i.UPDATE,this.update,this),l.once(i.SHUTDOWN,this.shutdown,this)},add:function(s,l,f,u,d,p){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=this.scene.sys.scale.width),u===void 0&&(u=this.scene.sys.scale.height),d===void 0&&(d=!1),p===void 0&&(p="");var g=new a(s,l,f,u);return g.setName(p),g.setScene(this.scene),g.setRoundPixels(this.roundPixels),g.id=this.getNextID(),this.cameras.push(g),d&&(this.main=g),g},addExisting:function(s,l){l===void 0&&(l=!1);var f=this.cameras.indexOf(s);return f===-1?(s.id=this.getNextID(),s.setRoundPixels(this.roundPixels),this.cameras.push(s),l&&(this.main=s),s):null},getNextID:function(){for(var s=this.cameras,l=1,f=0;f<32;f++){for(var u=!1,d=0;d0){p.preRender();var g=this.getVisibleChildren(l.getChildren(),p);s.render(f,g,p)}}},getVisibleChildren:function(s,l){return s.filter(function(f){return f.willRender(l)})},resetAll:function(){for(var s=0;s{/** + */var o=t(38058),v=t(83419),a=t(95540),r=t(37277),n=t(37303),e=t(97480),i=t(44594),h=new v({initialize:function(l){this.scene=l,this.systems=l.sys,this.roundPixels=l.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,l.sys.events.once(i.BOOT,this.boot,this),l.sys.events.on(i.START,this.start,this)},boot:function(){var s=this.systems;s.settings.cameras?this.fromJSON(s.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new o(0,0,s.scale.width,s.scale.height).setScene(this.scene),s.game.scale.on(e.RESIZE,this.onResize,this),this.systems.events.once(i.DESTROY,this.destroy,this)},start:function(){if(!this.main){var s=this.systems;s.settings.cameras?this.fromJSON(s.settings.cameras):this.add(),this.main=this.cameras[0]}var l=this.systems.events;l.on(i.UPDATE,this.update,this),l.once(i.SHUTDOWN,this.shutdown,this)},add:function(s,l,f,u,d,p){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=this.scene.sys.scale.width),u===void 0&&(u=this.scene.sys.scale.height),d===void 0&&(d=!1),p===void 0&&(p="");var g=new o(s,l,f,u);return g.setName(p),g.setScene(this.scene),g.setRoundPixels(this.roundPixels),g.id=this.getNextID(),this.cameras.push(g),d&&(this.main=g),g},addExisting:function(s,l){l===void 0&&(l=!1);var f=this.cameras.indexOf(s);return f===-1?(s.id=this.getNextID(),s.setRoundPixels(this.roundPixels),this.cameras.push(s),l&&(this.main=s),s):null},getNextID:function(){for(var s=this.cameras,l=1,f=0;f<32;f++){for(var u=!1,d=0;d0){p.preRender();var g=this.getVisibleChildren(l.getChildren(),p);s.render(f,g,p)}}},getVisibleChildren:function(s,l){return s.filter(function(f){return f.willRender(l)})},resetAll:function(){for(var s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(19715),r=new v({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,i,h,s,l,f,u){if(n===void 0&&(n=!0),e===void 0&&(e=1e3),i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=!1),f===void 0&&(f=null),u===void 0&&(u=this.camera.scene),!l&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=n,this.progress=0,this.red=i,this.green=h,this.blue=s,this.alpha=n?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=f,this._onUpdateScope=u;var d=n?o.FADE_OUT_START:o.FADE_IN_START;return this.camera.emit(d,this.camera,this,e,i,h,s),this.camera},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=a(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + */var o=t(45319),v=t(83419),a=t(19715),r=new v({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,i,h,s,l,f,u){if(n===void 0&&(n=!0),e===void 0&&(e=1e3),i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=!1),f===void 0&&(f=null),u===void 0&&(u=this.camera.scene),!l&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=n,this.progress=0,this.red=i,this.green=h,this.blue=s,this.alpha=n?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=f,this._onUpdateScope=u;var d=n?a.FADE_OUT_START:a.FADE_IN_START;return this.camera.emit(d,this.camera,this,e,i,h,s),this.camera},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=o(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(19715),r=new v({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,i,h,s,l,f){return n===void 0&&(n=250),e===void 0&&(e=255),i===void 0&&(i=255),h===void 0&&(h=255),s===void 0&&(s=!1),l===void 0&&(l=null),f===void 0&&(f=this.camera.scene),!s&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=n,this.progress=0,this.red=e,this.green=i,this.blue=h,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=l,this._onUpdateScope=f,this.camera.emit(o.FLASH_START,this.camera,this,n,e,i,h),this.camera)},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=a(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + */var o=t(45319),v=t(83419),a=t(19715),r=new v({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,i,h,s,l,f){return n===void 0&&(n=250),e===void 0&&(e=255),i===void 0&&(i=255),h===void 0&&(h=255),s===void 0&&(s=!1),l===void 0&&(l=null),f===void 0&&(f=this.camera.scene),!s&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=n,this.progress=0,this.red=e,this.green=i,this.blue=h,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=l,this._onUpdateScope=f,this.camera.emit(a.FLASH_START,this.camera,this,n,e,i,h),this.camera)},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=o(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(62640),r=t(19715),n=t(26099),e=new v({initialize:function(h){this.camera=h,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(i,h,s,l,f,u,d){s===void 0&&(s=1e3),l===void 0&&(l=o.Linear),f===void 0&&(f=!1),u===void 0&&(u=null),d===void 0&&(d=this.camera.scene);var p=this.camera;return!f&&this.isRunning||(this.isRunning=!0,this.duration=s,this.progress=0,this.source.set(p.scrollX,p.scrollY),this.destination.set(i,h),p.getScroll(i,h,this.current),typeof l=="string"&&o.hasOwnProperty(l)?this.ease=o[l]:typeof l=="function"&&(this.ease=l),this._elapsed=0,this._onUpdate=u,this._onUpdateScope=d,this.camera.emit(r.PAN_START,this.camera,this,s,i,h)),p},update:function(i,h){if(this.isRunning){this._elapsed+=h;var s=a(this._elapsed/this.duration,0,1);this.progress=s;var l=this.camera;if(this._elapsed{/** + */var o=t(45319),v=t(83419),a=t(62640),r=t(19715),n=t(26099),e=new v({initialize:function(h){this.camera=h,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(i,h,s,l,f,u,d){s===void 0&&(s=1e3),l===void 0&&(l=a.Linear),f===void 0&&(f=!1),u===void 0&&(u=null),d===void 0&&(d=this.camera.scene);var p=this.camera;return!f&&this.isRunning||(this.isRunning=!0,this.duration=s,this.progress=0,this.source.set(p.scrollX,p.scrollY),this.destination.set(i,h),p.getScroll(i,h,this.current),typeof l=="string"&&a.hasOwnProperty(l)?this.ease=a[l]:typeof l=="function"&&(this.ease=l),this._elapsed=0,this._onUpdate=u,this._onUpdateScope=d,this.camera.emit(r.PAN_START,this.camera,this,s,i,h)),p},update:function(i,h){if(this.isRunning){this._elapsed+=h;var s=o(this._elapsed/this.duration,0,1);this.progress=s;var l=this.camera;if(this._elapsed{/** * @author Jason Nicholls * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */var a=t(45319),v=t(83419),o=t(19715),r=t(62640),n=new v({initialize:function(i){this.camera=i,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,i,h,s,l,f,u){h===void 0&&(h=1e3),s===void 0&&(s=r.Linear),l===void 0&&(l=!1),f===void 0&&(f=null),u===void 0&&(u=this.camera.scene),i===void 0&&(i=!1),this.shortestPath=i;var d=e;e<0?(d=-1*e,this.clockwise=!1):this.clockwise=!0;var p=360*Math.PI/180;d=d-Math.floor(d/p)*p;var g=this.camera;if(!l&&this.isRunning)return g;if(this.isRunning=!0,this.duration=h,this.progress=0,this.source=g.rotation,this.destination=d,typeof s=="string"&&r.hasOwnProperty(s)?this.ease=r[s]:typeof s=="function"&&(this.ease=s),this._elapsed=0,this._onUpdate=f,this._onUpdateScope=u,this.shortestPath){var y=0,x=0;this.destination>this.source?y=Math.abs(this.destination-this.source):y=Math.abs(this.destination+p)-this.source,this.source>this.destination?x=Math.abs(this.source-this.destination):x=Math.abs(this.source+p)-this.destination,yx&&(this.clockwise=!1)}return this.camera.emit(o.ROTATE_START,this.camera,this,h,d),g},update:function(e,i){if(this.isRunning){this._elapsed+=i;var h=a(this._elapsed/this.duration,0,1);this.progress=h;var s=this.camera;if(this._elapsed=p?f=Math.abs(d-p):f=Math.abs(d+u)-p;var g=0;this.clockwise?g=s.rotation+f*l:g=s.rotation-f*l,s.rotation=g,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,h,g)}else s.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,h,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});c.exports=n},30330:(c,m,t)=>{/** + */var o=t(45319),v=t(83419),a=t(19715),r=t(62640),n=new v({initialize:function(i){this.camera=i,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,i,h,s,l,f,u){h===void 0&&(h=1e3),s===void 0&&(s=r.Linear),l===void 0&&(l=!1),f===void 0&&(f=null),u===void 0&&(u=this.camera.scene),i===void 0&&(i=!1),this.shortestPath=i;var d=e;e<0?(d=-1*e,this.clockwise=!1):this.clockwise=!0;var p=360*Math.PI/180;d=d-Math.floor(d/p)*p;var g=this.camera;if(!l&&this.isRunning)return g;if(this.isRunning=!0,this.duration=h,this.progress=0,this.source=g.rotation,this.destination=d,typeof s=="string"&&r.hasOwnProperty(s)?this.ease=r[s]:typeof s=="function"&&(this.ease=s),this._elapsed=0,this._onUpdate=f,this._onUpdateScope=u,this.shortestPath){var y=0,x=0;this.destination>this.source?y=Math.abs(this.destination-this.source):y=Math.abs(this.destination+p)-this.source,this.source>this.destination?x=Math.abs(this.source-this.destination):x=Math.abs(this.source+p)-this.destination,yx&&(this.clockwise=!1)}return this.camera.emit(a.ROTATE_START,this.camera,this,h,d),g},update:function(e,i){if(this.isRunning){this._elapsed+=i;var h=o(this._elapsed/this.duration,0,1);this.progress=h;var s=this.camera;if(this._elapsed=p?f=Math.abs(d-p):f=Math.abs(d+u)-p;var g=0;this.clockwise?g=s.rotation+f*l:g=s.rotation-f*l,s.rotation=g,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,h,g)}else s.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,h,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(a.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});c.exports=n},30330:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(19715),r=t(26099),n=new v({initialize:function(i){this.camera=i,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,i,h,s,l){return e===void 0&&(e=100),i===void 0&&(i=.05),h===void 0&&(h=!1),s===void 0&&(s=null),l===void 0&&(l=this.camera.scene),!h&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=e,this.progress=0,typeof i=="number"?this.intensity.set(i):this.intensity.set(i.x,i.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=s,this._onUpdateScope=l,this.camera.emit(o.SHAKE_START,this.camera,this,e,i),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(e,i){if(this.isRunning)if(this._elapsed+=i,this.progress=a(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + */var o=t(45319),v=t(83419),a=t(19715),r=t(26099),n=new v({initialize:function(i){this.camera=i,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,i,h,s,l){return e===void 0&&(e=100),i===void 0&&(i=.05),h===void 0&&(h=!1),s===void 0&&(s=null),l===void 0&&(l=this.camera.scene),!h&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=e,this.progress=0,typeof i=="number"?this.intensity.set(i):this.intensity.set(i.x,i.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=s,this._onUpdateScope=l,this.camera.emit(a.SHAKE_START,this.camera,this,e,i),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(e,i){if(this.isRunning)if(this._elapsed+=i,this.progress=o(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(62640),r=t(19715),n=new v({initialize:function(i){this.camera=i,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,i,h,s,l,f){i===void 0&&(i=1e3),h===void 0&&(h=o.Linear),s===void 0&&(s=!1),l===void 0&&(l=null),f===void 0&&(f=this.camera.scene);var u=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source=u.zoom,this.destination=e,typeof h=="string"&&o.hasOwnProperty(h)?this.ease=o[h]:typeof h=="function"&&(this.ease=h),this._elapsed=0,this._onUpdate=l,this._onUpdateScope=f,this.camera.emit(r.ZOOM_START,this.camera,this,i,e)),u},update:function(e,i){this.isRunning&&(this._elapsed+=i,this.progress=a(this._elapsed/this.duration,0,1),this._elapsed{/** + */var o=t(45319),v=t(83419),a=t(62640),r=t(19715),n=new v({initialize:function(i){this.camera=i,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,i,h,s,l,f){i===void 0&&(i=1e3),h===void 0&&(h=a.Linear),s===void 0&&(s=!1),l===void 0&&(l=null),f===void 0&&(f=this.camera.scene);var u=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source=u.zoom,this.destination=e,typeof h=="string"&&a.hasOwnProperty(h)?this.ease=a[h]:typeof h=="function"&&(this.ease=h),this._elapsed=0,this._onUpdate=l,this._onUpdateScope=f,this.camera.emit(r.ZOOM_START,this.camera,this,i,e)),u},update:function(e,i){this.isRunning&&(this._elapsed+=i,this.progress=o(this._elapsed/this.duration,0,1),this._elapsed{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -449,11 +449,11 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(35154),o=new a({initialize:function(n){this.camera=v(n,"camera",null),this.left=v(n,"left",null),this.right=v(n,"right",null),this.up=v(n,"up",null),this.down=v(n,"down",null),this.zoomIn=v(n,"zoomIn",null),this.zoomOut=v(n,"zoomOut",null),this.zoomSpeed=v(n,"zoomSpeed",.01),this.minZoom=v(n,"minZoom",.001),this.maxZoom=v(n,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=v(n,"speed",null);typeof e=="number"?(this.speedX=e,this.speedY=e):(this.speedX=v(n,"speed.x",0),this.speedY=v(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.zoomthis.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}});c.exports=o},58818:(c,m,t)=>{/** + */var o=t(83419),v=t(35154),a=new o({initialize:function(n){this.camera=v(n,"camera",null),this.left=v(n,"left",null),this.right=v(n,"right",null),this.up=v(n,"up",null),this.down=v(n,"down",null),this.zoomIn=v(n,"zoomIn",null),this.zoomOut=v(n,"zoomOut",null),this.zoomSpeed=v(n,"zoomSpeed",.01),this.minZoom=v(n,"minZoom",.001),this.maxZoom=v(n,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=v(n,"speed",null);typeof e=="number"?(this.speedX=e,this.speedY=e):(this.speedX=v(n,"speed.x",0),this.speedY=v(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.zoomthis.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}});c.exports=a},58818:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(35154),o=new a({initialize:function(n){this.camera=v(n,"camera",null),this.left=v(n,"left",null),this.right=v(n,"right",null),this.up=v(n,"up",null),this.down=v(n,"down",null),this.zoomIn=v(n,"zoomIn",null),this.zoomOut=v(n,"zoomOut",null),this.zoomSpeed=v(n,"zoomSpeed",.01),this.minZoom=v(n,"minZoom",.001),this.maxZoom=v(n,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=v(n,"acceleration",null);typeof e=="number"?(this.accelX=e,this.accelY=e):(this.accelX=v(n,"acceleration.x",0),this.accelY=v(n,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=v(n,"drag",null);typeof i=="number"?(this.dragX=i,this.dragY=i):(this.dragX=v(n,"drag.x",0),this.dragY=v(n,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var h=v(n,"maxSpeed",null);typeof h=="number"?(this.maxSpeedX=h,this.maxSpeedY=h):(this.maxSpeedX=v(n,"maxSpeed.x",0),this.maxSpeedY=v(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.zoomthis.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}});c.exports=o},38865:(c,m,t)=>{/** + */var o=t(83419),v=t(35154),a=new o({initialize:function(n){this.camera=v(n,"camera",null),this.left=v(n,"left",null),this.right=v(n,"right",null),this.up=v(n,"up",null),this.down=v(n,"down",null),this.zoomIn=v(n,"zoomIn",null),this.zoomOut=v(n,"zoomOut",null),this.zoomSpeed=v(n,"zoomSpeed",.01),this.minZoom=v(n,"minZoom",.001),this.maxZoom=v(n,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=v(n,"acceleration",null);typeof e=="number"?(this.accelX=e,this.accelY=e):(this.accelX=v(n,"acceleration.x",0),this.accelY=v(n,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=v(n,"drag",null);typeof i=="number"?(this.dragX=i,this.dragY=i):(this.dragX=v(n,"drag.x",0),this.dragY=v(n,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var h=v(n,"maxSpeed",null);typeof h=="number"?(this.maxSpeedX=h,this.maxSpeedY=h):(this.maxSpeedX=v(n,"maxSpeed.x",0),this.maxSpeedY=v(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.zoomthis.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}});c.exports=a},38865:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -465,31 +465,31 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={VERSION:"3.80.1",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};c.exports=a},69547:(c,m,t)=>{/** + */var o={VERSION:"3.80.1",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};c.exports=o},69547:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(8054),o=t(42363),r=t(82264),n=t(95540),e=t(35154),i=t(41212),h=t(29747),s=t(75508),l=t(36060),f=t(80333),u=new a({initialize:function(p){p===void 0&&(p={});var g=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],y="#ffffff",x=e(p,"scale",null);this.width=e(x,"width",1024,p),this.height=e(x,"height",768,p),this.zoom=e(x,"zoom",1,p),this.parent=e(x,"parent",void 0,p),this.scaleMode=e(x,x?"mode":"scaleMode",0,p),this.expandParent=e(x,"expandParent",!0,p),this.autoRound=e(x,"autoRound",!1,p),this.autoCenter=e(x,"autoCenter",0,p),this.resizeInterval=e(x,"resizeInterval",500,p),this.fullscreenTarget=e(x,"fullscreenTarget",null,p),this.minWidth=e(x,"min.width",0,p),this.maxWidth=e(x,"max.width",0,p),this.minHeight=e(x,"min.height",0,p),this.maxHeight=e(x,"max.height",0,p),this.snapWidth=e(x,"snap.width",0,p),this.snapHeight=e(x,"snap.height",0,p),this.renderType=e(p,"type",v.AUTO),this.canvas=e(p,"canvas",null),this.context=e(p,"context",null),this.canvasStyle=e(p,"canvasStyle",null),this.customEnvironment=e(p,"customEnvironment",!1),this.sceneConfig=e(p,"scene",null),this.seed=e(p,"seed",[(Date.now()*Math.random()).toString()]),s.RND=new s.RandomDataGenerator(this.seed),this.gameTitle=e(p,"title",""),this.gameURL=e(p,"url","https://phaser.io"),this.gameVersion=e(p,"version",""),this.autoFocus=e(p,"autoFocus",!0),this.stableSort=e(p,"stableSort",-1),this.stableSort===-1&&(this.stableSort=r.browser.es2019?1:0),r.features.stableSort=this.stableSort,this.domCreateContainer=e(p,"dom.createContainer",!1),this.domPointerEvents=e(p,"dom.pointerEvents","none"),this.inputKeyboard=e(p,"input.keyboard",!0),this.inputKeyboardEventTarget=e(p,"input.keyboard.target",window),this.inputKeyboardCapture=e(p,"input.keyboard.capture",[]),this.inputMouse=e(p,"input.mouse",!0),this.inputMouseEventTarget=e(p,"input.mouse.target",null),this.inputMousePreventDefaultDown=e(p,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=e(p,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=e(p,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=e(p,"input.mouse.preventDefaultWheel",!0),this.inputTouch=e(p,"input.touch",r.input.touch),this.inputTouchEventTarget=e(p,"input.touch.target",null),this.inputTouchCapture=e(p,"input.touch.capture",!0),this.inputActivePointers=e(p,"input.activePointers",1),this.inputSmoothFactor=e(p,"input.smoothFactor",0),this.inputWindowEvents=e(p,"input.windowEvents",!0),this.inputGamepad=e(p,"input.gamepad",!1),this.inputGamepadEventTarget=e(p,"input.gamepad.target",window),this.disableContextMenu=e(p,"disableContextMenu",!1),this.audio=e(p,"audio",{}),this.hideBanner=e(p,"banner",null)===!1,this.hidePhaser=e(p,"banner.hidePhaser",!1),this.bannerTextColor=e(p,"banner.text",y),this.bannerBackgroundColor=e(p,"banner.background",g),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=e(p,"fps",null),this.disablePreFX=e(p,"disablePreFX",!1),this.disablePostFX=e(p,"disablePostFX",!1);var T=e(p,"render",null);this.pipeline=e(T,"pipeline",null,p),this.autoMobilePipeline=e(T,"autoMobilePipeline",!0,p),this.defaultPipeline=e(T,"defaultPipeline",l.MULTI_PIPELINE,p),this.antialias=e(T,"antialias",!0,p),this.antialiasGL=e(T,"antialiasGL",!0,p),this.mipmapFilter=e(T,"mipmapFilter","",p),this.desynchronized=e(T,"desynchronized",!1,p),this.roundPixels=e(T,"roundPixels",!0,p),this.pixelArt=e(T,"pixelArt",this.zoom!==1,p),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=e(T,"transparent",!1,p),this.clearBeforeRender=e(T,"clearBeforeRender",!0,p),this.preserveDrawingBuffer=e(T,"preserveDrawingBuffer",!1,p),this.premultipliedAlpha=e(T,"premultipliedAlpha",!0,p),this.failIfMajorPerformanceCaveat=e(T,"failIfMajorPerformanceCaveat",!1,p),this.powerPreference=e(T,"powerPreference","default",p),this.batchSize=e(T,"batchSize",4096,p),this.maxTextures=e(T,"maxTextures",-1,p),this.maxLights=e(T,"maxLights",10,p);var C=e(p,"backgroundColor",0);this.backgroundColor=f(C),this.transparent&&(this.backgroundColor=f(0),this.backgroundColor.alpha=0),this.preBoot=e(p,"callbacks.preBoot",h),this.postBoot=e(p,"callbacks.postBoot",h),this.physics=e(p,"physics",{}),this.defaultPhysicsSystem=e(this.physics,"default",!1),this.loaderBaseURL=e(p,"loader.baseURL",""),this.loaderPath=e(p,"loader.path",""),this.loaderMaxParallelDownloads=e(p,"loader.maxParallelDownloads",r.os.android?6:32),this.loaderCrossOrigin=e(p,"loader.crossOrigin",void 0),this.loaderResponseType=e(p,"loader.responseType",""),this.loaderAsync=e(p,"loader.async",!0),this.loaderUser=e(p,"loader.user",""),this.loaderPassword=e(p,"loader.password",""),this.loaderTimeout=e(p,"loader.timeout",0),this.loaderWithCredentials=e(p,"loader.withCredentials",!1),this.loaderImageLoadType=e(p,"loader.imageLoadType","XHR"),this.loaderLocalScheme=e(p,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=e(p,"fx.glow.quality",.1),this.glowFXDistance=e(p,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var M=e(p,"plugins",null),w=o.DefaultScene;M&&(Array.isArray(M)?this.defaultPlugins=M:i(M)&&(this.installGlobalPlugins=n(M,"global",[]),this.installScenePlugins=n(M,"scene",[]),Array.isArray(M.default)?w=M.default:Array.isArray(M.defaultMerge)&&(w=w.concat(M.defaultMerge)))),this.defaultPlugins=w;var L="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=e(p,"images.default",L+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=e(p,"images.missing",L+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=e(p,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=v.WEBGL:window.FORCE_CANVAS&&(this.renderType=v.CANVAS))}});c.exports=u},86054:(c,m,t)=>{/** + */var o=t(83419),v=t(8054),a=t(42363),r=t(82264),n=t(95540),e=t(35154),i=t(41212),h=t(29747),s=t(75508),l=t(36060),f=t(80333),u=new o({initialize:function(p){p===void 0&&(p={});var g=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],y="#ffffff",x=e(p,"scale",null);this.width=e(x,"width",1024,p),this.height=e(x,"height",768,p),this.zoom=e(x,"zoom",1,p),this.parent=e(x,"parent",void 0,p),this.scaleMode=e(x,x?"mode":"scaleMode",0,p),this.expandParent=e(x,"expandParent",!0,p),this.autoRound=e(x,"autoRound",!1,p),this.autoCenter=e(x,"autoCenter",0,p),this.resizeInterval=e(x,"resizeInterval",500,p),this.fullscreenTarget=e(x,"fullscreenTarget",null,p),this.minWidth=e(x,"min.width",0,p),this.maxWidth=e(x,"max.width",0,p),this.minHeight=e(x,"min.height",0,p),this.maxHeight=e(x,"max.height",0,p),this.snapWidth=e(x,"snap.width",0,p),this.snapHeight=e(x,"snap.height",0,p),this.renderType=e(p,"type",v.AUTO),this.canvas=e(p,"canvas",null),this.context=e(p,"context",null),this.canvasStyle=e(p,"canvasStyle",null),this.customEnvironment=e(p,"customEnvironment",!1),this.sceneConfig=e(p,"scene",null),this.seed=e(p,"seed",[(Date.now()*Math.random()).toString()]),s.RND=new s.RandomDataGenerator(this.seed),this.gameTitle=e(p,"title",""),this.gameURL=e(p,"url","https://phaser.io"),this.gameVersion=e(p,"version",""),this.autoFocus=e(p,"autoFocus",!0),this.stableSort=e(p,"stableSort",-1),this.stableSort===-1&&(this.stableSort=r.browser.es2019?1:0),r.features.stableSort=this.stableSort,this.domCreateContainer=e(p,"dom.createContainer",!1),this.domPointerEvents=e(p,"dom.pointerEvents","none"),this.inputKeyboard=e(p,"input.keyboard",!0),this.inputKeyboardEventTarget=e(p,"input.keyboard.target",window),this.inputKeyboardCapture=e(p,"input.keyboard.capture",[]),this.inputMouse=e(p,"input.mouse",!0),this.inputMouseEventTarget=e(p,"input.mouse.target",null),this.inputMousePreventDefaultDown=e(p,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=e(p,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=e(p,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=e(p,"input.mouse.preventDefaultWheel",!0),this.inputTouch=e(p,"input.touch",r.input.touch),this.inputTouchEventTarget=e(p,"input.touch.target",null),this.inputTouchCapture=e(p,"input.touch.capture",!0),this.inputActivePointers=e(p,"input.activePointers",1),this.inputSmoothFactor=e(p,"input.smoothFactor",0),this.inputWindowEvents=e(p,"input.windowEvents",!0),this.inputGamepad=e(p,"input.gamepad",!1),this.inputGamepadEventTarget=e(p,"input.gamepad.target",window),this.disableContextMenu=e(p,"disableContextMenu",!1),this.audio=e(p,"audio",{}),this.hideBanner=e(p,"banner",null)===!1,this.hidePhaser=e(p,"banner.hidePhaser",!1),this.bannerTextColor=e(p,"banner.text",y),this.bannerBackgroundColor=e(p,"banner.background",g),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=e(p,"fps",null),this.disablePreFX=e(p,"disablePreFX",!1),this.disablePostFX=e(p,"disablePostFX",!1);var C=e(p,"render",null);this.pipeline=e(C,"pipeline",null,p),this.autoMobilePipeline=e(C,"autoMobilePipeline",!0,p),this.defaultPipeline=e(C,"defaultPipeline",l.MULTI_PIPELINE,p),this.antialias=e(C,"antialias",!0,p),this.antialiasGL=e(C,"antialiasGL",!0,p),this.mipmapFilter=e(C,"mipmapFilter","",p),this.desynchronized=e(C,"desynchronized",!1,p),this.roundPixels=e(C,"roundPixels",!0,p),this.pixelArt=e(C,"pixelArt",this.zoom!==1,p),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=e(C,"transparent",!1,p),this.clearBeforeRender=e(C,"clearBeforeRender",!0,p),this.preserveDrawingBuffer=e(C,"preserveDrawingBuffer",!1,p),this.premultipliedAlpha=e(C,"premultipliedAlpha",!0,p),this.failIfMajorPerformanceCaveat=e(C,"failIfMajorPerformanceCaveat",!1,p),this.powerPreference=e(C,"powerPreference","default",p),this.batchSize=e(C,"batchSize",4096,p),this.maxTextures=e(C,"maxTextures",-1,p),this.maxLights=e(C,"maxLights",10,p);var P=e(p,"backgroundColor",0);this.backgroundColor=f(P),this.transparent&&(this.backgroundColor=f(0),this.backgroundColor.alpha=0),this.preBoot=e(p,"callbacks.preBoot",h),this.postBoot=e(p,"callbacks.postBoot",h),this.physics=e(p,"physics",{}),this.defaultPhysicsSystem=e(this.physics,"default",!1),this.loaderBaseURL=e(p,"loader.baseURL",""),this.loaderPath=e(p,"loader.path",""),this.loaderMaxParallelDownloads=e(p,"loader.maxParallelDownloads",r.os.android?6:32),this.loaderCrossOrigin=e(p,"loader.crossOrigin",void 0),this.loaderResponseType=e(p,"loader.responseType",""),this.loaderAsync=e(p,"loader.async",!0),this.loaderUser=e(p,"loader.user",""),this.loaderPassword=e(p,"loader.password",""),this.loaderTimeout=e(p,"loader.timeout",0),this.loaderWithCredentials=e(p,"loader.withCredentials",!1),this.loaderImageLoadType=e(p,"loader.imageLoadType","XHR"),this.loaderLocalScheme=e(p,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=e(p,"fx.glow.quality",.1),this.glowFXDistance=e(p,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var M=e(p,"plugins",null),w=a.DefaultScene;M&&(Array.isArray(M)?this.defaultPlugins=M:i(M)&&(this.installGlobalPlugins=n(M,"global",[]),this.installScenePlugins=n(M,"scene",[]),Array.isArray(M.default)?w=M.default:Array.isArray(M.defaultMerge)&&(w=w.concat(M.defaultMerge)))),this.defaultPlugins=w;var I="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=e(p,"images.default",I+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=e(p,"images.missing",I+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=e(p,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=v.WEBGL:window.FORCE_CANVAS&&(this.renderType=v.CANVAS))}});c.exports=u},86054:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20623),v=t(27919),o=t(8054),r=t(89357),n=function(e){var i=e.config;if((i.customEnvironment||i.canvas)&&i.renderType===o.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!i.customEnvironment&&!i.canvas&&i.renderType!==o.HEADLESS)if(i.renderType===o.AUTO&&(i.renderType=r.webGL?o.WEBGL:o.CANVAS),i.renderType===o.WEBGL){if(!r.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(i.renderType===o.CANVAS){if(!r.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+i.renderType);i.antialias||v.disableSmoothing();var h=e.scale.baseSize,s=h.width,l=h.height;if(i.canvas?(e.canvas=i.canvas,e.canvas.width=s,e.canvas.height=l):e.canvas=v.create(e,s,l,i.renderType),i.canvasStyle&&(e.canvas.style=i.canvasStyle),i.antialias||a.setCrisp(e.canvas),i.renderType!==o.HEADLESS){var f,u;f=t(68627),u=t(74797),i.renderType===o.WEBGL?e.renderer=new u(e):(e.renderer=new f(e),e.context=e.renderer.gameContext)}};c.exports=n},96391:(c,m,t)=>{/** + */var o=t(20623),v=t(27919),a=t(8054),r=t(89357),n=function(e){var i=e.config;if((i.customEnvironment||i.canvas)&&i.renderType===a.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!i.customEnvironment&&!i.canvas&&i.renderType!==a.HEADLESS)if(i.renderType===a.AUTO&&(i.renderType=r.webGL?a.WEBGL:a.CANVAS),i.renderType===a.WEBGL){if(!r.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(i.renderType===a.CANVAS){if(!r.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+i.renderType);i.antialias||v.disableSmoothing();var h=e.scale.baseSize,s=h.width,l=h.height;if(i.canvas?(e.canvas=i.canvas,e.canvas.width=s,e.canvas.height=l):e.canvas=v.create(e,s,l,i.renderType),i.canvasStyle&&(e.canvas.style=i.canvasStyle),i.antialias||o.setCrisp(e.canvas),i.renderType!==a.HEADLESS){var f,u;f=t(68627),u=t(74797),i.renderType===a.WEBGL?e.renderer=new u(e):(e.renderer=new f(e),e.context=e.renderer.gameContext)}};c.exports=n},96391:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(8054),v=function(o){var r=o.config;if(!r.hideBanner){var n="WebGL";r.renderType===a.CANVAS?n="Canvas":r.renderType===a.HEADLESS&&(n="Headless");var e=r.audio,i=o.device.audio,h;if(i.webAudio&&!e.disableWebAudio?h="Web Audio":e.noAudio||!i.webAudio&&!i.audioData?h="No Audio":h="HTML5 Audio",o.device.browser.ie)window.console&&console.log("Phaser v"+a.VERSION+" / https://phaser.io");else{var s="",l=[s];if(Array.isArray(r.bannerBackgroundColor)){var f;r.bannerBackgroundColor.forEach(function(d){s=s.concat("%c "),l.push("background: "+d),f=d}),l[l.length-1]="color: "+r.bannerTextColor+"; background: "+f}else s=s.concat("%c "),l.push("color: "+r.bannerTextColor+"; background: "+r.bannerBackgroundColor);l.push("background: transparent"),r.gameTitle&&(s=s.concat(r.gameTitle),r.gameVersion&&(s=s.concat(" v"+r.gameVersion)),r.hidePhaser||(s=s.concat(" / ")));var u="";r.hidePhaser||(s=s.concat("Phaser v"+a.VERSION+u+" ("+n+" | "+h+")")),s=s.concat(" %c "+r.gameURL),l[0]=s,console.log.apply(console,l)}}};c.exports=v},50127:(c,m,t)=>{/** + */var o=t(8054),v=function(a){var r=a.config;if(!r.hideBanner){var n="WebGL";r.renderType===o.CANVAS?n="Canvas":r.renderType===o.HEADLESS&&(n="Headless");var e=r.audio,i=a.device.audio,h;if(i.webAudio&&!e.disableWebAudio?h="Web Audio":e.noAudio||!i.webAudio&&!i.audioData?h="No Audio":h="HTML5 Audio",a.device.browser.ie)window.console&&console.log("Phaser v"+o.VERSION+" / https://phaser.io");else{var s="",l=[s];if(Array.isArray(r.bannerBackgroundColor)){var f;r.bannerBackgroundColor.forEach(function(d){s=s.concat("%c "),l.push("background: "+d),f=d}),l[l.length-1]="color: "+r.bannerTextColor+"; background: "+f}else s=s.concat("%c "),l.push("color: "+r.bannerTextColor+"; background: "+r.bannerBackgroundColor);l.push("background: transparent"),r.gameTitle&&(s=s.concat(r.gameTitle),r.gameVersion&&(s=s.concat(" v"+r.gameVersion)),r.hidePhaser||(s=s.concat(" / ")));var u="";r.hidePhaser||(s=s.concat("Phaser v"+o.VERSION+u+" ("+n+" | "+h+")")),s=s.concat(" %c "+r.gameURL),l[0]=s,console.log.apply(console,l)}}};c.exports=v},50127:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40366),v=t(60848),o=t(24047),r=t(27919),n=t(83419),e=t(69547),i=t(83719),h=t(86054),s=t(45893),l=t(96391),f=t(82264),u=t(57264),d=t(50792),p=t(8443),g=t(7003),y=t(37277),x=t(77332),T=t(76531),C=t(60903),M=t(69442),w=t(17130),L=t(65898),F=t(51085),O=t(14747),N=new n({initialize:function(V){this.config=new e(V),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new d,this.anims=new v(this),this.textures=new w(this),this.cache=new o(this),this.registry=new s(this,new d),this.input=new g(this,this.config),this.scene=new C(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=O.create(this),this.loop=new L(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(!y.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),h(this),i(this),l(this),a(this.canvas,this.config.parent),this.textures.once(M.READY,this.texturesReady,this),this.events.emit(p.BOOT)},texturesReady:function(){this.events.emit(p.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),F(this);var G=this.events;G.on(p.HIDDEN,this.onHidden,this),G.on(p.VISIBLE,this.onVisible,this),G.on(p.BLUR,this.onBlur,this),G.on(p.FOCUS,this.onFocus,this)},step:function(G,V){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var K=this.events;K.emit(p.PRE_STEP,G,V),K.emit(p.STEP,G,V),this.scene.update(G,V),K.emit(p.POST_STEP,G,V);var $=this.renderer;$.preRender(),K.emit(p.PRE_RENDER,$,G,V),this.scene.render($),$.postRender(),K.emit(p.POST_RENDER,$,G,V)}},headlessStep:function(G,V){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var K=this.events;K.emit(p.PRE_STEP,G,V),K.emit(p.STEP,G,V),this.scene.update(G,V),K.emit(p.POST_STEP,G,V),this.scene.isProcessing=!1,K.emit(p.PRE_RENDER,null,G,V),K.emit(p.POST_RENDER,null,G,V)}},onHidden:function(){this.loop.pause(),this.events.emit(p.PAUSE)},pause:function(){var G=this.isPaused;this.isPaused=!0,G||this.events.emit(p.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(p.RESUME)},resume:function(){var G=this.isPaused;this.isPaused=!1,G&&this.events.emit(p.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(G,V){V===void 0&&(V=!1),this.pendingDestroy=!0,this.removeCanvas=G,this.noReturn=V},runDestroy:function(){this.scene.destroy(),this.events.emit(p.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}});c.exports=N},65898:(c,m,t)=>{/** + */var o=t(40366),v=t(60848),a=t(24047),r=t(27919),n=t(83419),e=t(69547),i=t(83719),h=t(86054),s=t(45893),l=t(96391),f=t(82264),u=t(57264),d=t(50792),p=t(8443),g=t(7003),y=t(37277),x=t(77332),C=t(76531),P=t(60903),M=t(69442),w=t(17130),I=t(65898),L=t(51085),B=t(14747),N=new n({initialize:function(V){this.config=new e(V),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new d,this.anims=new v(this),this.textures=new w(this),this.cache=new a(this),this.registry=new s(this,new d),this.input=new g(this,this.config),this.scene=new P(this,this.config.sceneConfig),this.device=f,this.scale=new C(this,this.config),this.sound=null,this.sound=B.create(this),this.loop=new I(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(!y.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),h(this),i(this),l(this),o(this.canvas,this.config.parent),this.textures.once(M.READY,this.texturesReady,this),this.events.emit(p.BOOT)},texturesReady:function(){this.events.emit(p.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),L(this);var G=this.events;G.on(p.HIDDEN,this.onHidden,this),G.on(p.VISIBLE,this.onVisible,this),G.on(p.BLUR,this.onBlur,this),G.on(p.FOCUS,this.onFocus,this)},step:function(G,V){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var K=this.events;K.emit(p.PRE_STEP,G,V),K.emit(p.STEP,G,V),this.scene.update(G,V),K.emit(p.POST_STEP,G,V);var j=this.renderer;j.preRender(),K.emit(p.PRE_RENDER,j,G,V),this.scene.render(j),j.postRender(),K.emit(p.POST_RENDER,j,G,V)}},headlessStep:function(G,V){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var K=this.events;K.emit(p.PRE_STEP,G,V),K.emit(p.STEP,G,V),this.scene.update(G,V),K.emit(p.POST_STEP,G,V),this.scene.isProcessing=!1,K.emit(p.PRE_RENDER,null,G,V),K.emit(p.POST_RENDER,null,G,V)}},onHidden:function(){this.loop.pause(),this.events.emit(p.PAUSE)},pause:function(){var G=this.isPaused;this.isPaused=!0,G||this.events.emit(p.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(p.RESUME)},resume:function(){var G=this.isPaused;this.isPaused=!1,G&&this.events.emit(p.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(G,V){V===void 0&&(V=!1),this.pendingDestroy=!0,this.removeCanvas=G,this.noReturn=V},runDestroy:function(){this.scene.destroy(),this.events.emit(p.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}});c.exports=N},65898:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(35154),o=t(29747),r=t(43092),n=new a({initialize:function(i,h){this.game=i,this.raf=new r,this.started=!1,this.running=!1,this.minFps=v(h,"min",5),this.targetFps=v(h,"target",60),this.fpsLimit=v(h,"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=o,this.forceSetTimeOut=v(h,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=v(h,"deltaHistory",10),this.panicMax=v(h,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=v(h,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var e=window.performance.now();this.time=e,this.lastTime=e,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0;for(var i=0;i0||!this.inFocus)&&(this._coolDown--,e=Math.min(e,this._target)),e>this._min&&(e=h[i],e=Math.min(e,this._min)),h[i]=e,this.deltaIndex++,this.deltaIndex>=s&&(this.deltaIndex=0);for(var l=0,f=0;f=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 i=Math.max(0,e-this.lastTime);this.rawDelta=i,this.time+=this.rawDelta,this.smoothStep&&(i=this.smoothDelta(i)),this.delta=i,e>=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.callback(e,i),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 i=window.performance.now();if(!this.running){e&&(this.startTime+=-this.lastTime+(this.lastTime+i));var h=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(h,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=i+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}});c.exports=n},51085:(c,m,t)=>{/** + */var o=t(83419),v=t(35154),a=t(29747),r=t(43092),n=new o({initialize:function(i,h){this.game=i,this.raf=new r,this.started=!1,this.running=!1,this.minFps=v(h,"min",5),this.targetFps=v(h,"target",60),this.fpsLimit=v(h,"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=a,this.forceSetTimeOut=v(h,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=v(h,"deltaHistory",10),this.panicMax=v(h,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=v(h,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var e=window.performance.now();this.time=e,this.lastTime=e,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0;for(var i=0;i0||!this.inFocus)&&(this._coolDown--,e=Math.min(e,this._target)),e>this._min&&(e=h[i],e=Math.min(e,this._min)),h[i]=e,this.deltaIndex++,this.deltaIndex>=s&&(this.deltaIndex=0);for(var l=0,f=0;f=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 i=Math.max(0,e-this.lastTime);this.rawDelta=i,this.time+=this.rawDelta,this.smoothStep&&(i=this.smoothDelta(i)),this.delta=i,e>=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.callback(e,i),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 i=window.performance.now();if(!this.running){e&&(this.startTime+=-this.lastTime+(this.lastTime+i));var h=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(h,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=i+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}});c.exports=n},51085:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(8443),v=function(o){var r,n=o.events;if(document.hidden!==void 0)r="visibilitychange";else{var e=["webkit","moz","ms"];e.forEach(function(h){document[h+"Hidden"]!==void 0&&(document.hidden=function(){return document[h+"Hidden"]},r=h+"visibilitychange")})}var i=function(h){document.hidden||h.type==="pause"?n.emit(a.HIDDEN):n.emit(a.VISIBLE)};r&&document.addEventListener(r,i,!1),window.onblur=function(){n.emit(a.BLUR)},window.onfocus=function(){n.emit(a.FOCUS)},window.focus&&o.config.autoFocus&&window.focus()};c.exports=v},97217:c=>{/** + */var o=t(8443),v=function(a){var r,n=a.events;if(document.hidden!==void 0)r="visibilitychange";else{var e=["webkit","moz","ms"];e.forEach(function(h){document[h+"Hidden"]!==void 0&&(document.hidden=function(){return document[h+"Hidden"]},r=h+"visibilitychange")})}var i=function(h){document.hidden||h.type==="pause"?n.emit(o.HIDDEN):n.emit(o.VISIBLE)};r&&document.addEventListener(r,i,!1),window.onblur=function(){n.emit(o.BLUR)},window.onfocus=function(){n.emit(o.FOCUS)},window.focus&&a.config.autoFocus&&window.focus()};c.exports=v},97217:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -565,7 +565,7 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(5290),v=t(27919),o=t(35154),r=function(n){var e=o(n,"data",[]),i=o(n,"canvas",null),h=o(n,"palette",a),s=o(n,"pixelWidth",1),l=o(n,"pixelHeight",s),f=o(n,"resizeCanvas",!0),u=o(n,"clearCanvas",!0),d=o(n,"preRender",null),p=o(n,"postRender",null),g=Math.floor(Math.abs(e[0].length*s)),y=Math.floor(Math.abs(e.length*l));i||(i=v.create2D(this,g,y),f=!1,u=!1),f&&(i.width=g,i.height=y);var x=i.getContext("2d",{willReadFrequently:!0});u&&x.clearRect(0,0,g,y),d&&d(i,x);for(var T=0;T{/** + */var o=t(5290),v=t(27919),a=t(35154),r=function(n){var e=a(n,"data",[]),i=a(n,"canvas",null),h=a(n,"palette",o),s=a(n,"pixelWidth",1),l=a(n,"pixelHeight",s),f=a(n,"resizeCanvas",!0),u=a(n,"clearCanvas",!0),d=a(n,"preRender",null),p=a(n,"postRender",null),g=Math.floor(Math.abs(e[0].length*s)),y=Math.floor(Math.abs(e.length*l));i||(i=v.create2D(this,g,y),f=!1,u=!1),f&&(i.width=g,i.height=y);var x=i.getContext("2d",{willReadFrequently:!0});u&&x.clearRect(0,0,g,y),d&&d(i,x);for(var C=0;C{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -597,27 +597,27 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(36316),o=t(80021),r=t(26099),n=new a({Extends:o,initialize:function(i,h,s,l){o.call(this,"CubicBezierCurve"),Array.isArray(i)&&(l=new r(i[6],i[7]),s=new r(i[4],i[5]),h=new r(i[2],i[3]),i=new r(i[0],i[1])),this.p0=i,this.p1=h,this.p2=s,this.p3=l},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,i){i===void 0&&(i=new r);var h=this.p0,s=this.p1,l=this.p2,f=this.p3;return i.set(v(e,h.x,s.x,l.x,f.x),v(e,h.y,s.y,l.y,f.y))},draw:function(e,i){i===void 0&&(i=32);var h=this.getPoints(i);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var s=1;s{/** + */var o=t(83419),v=t(36316),a=t(80021),r=t(26099),n=new o({Extends:a,initialize:function(i,h,s,l){a.call(this,"CubicBezierCurve"),Array.isArray(i)&&(l=new r(i[6],i[7]),s=new r(i[4],i[5]),h=new r(i[2],i[3]),i=new r(i[0],i[1])),this.p0=i,this.p1=h,this.p2=s,this.p3=l},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,i){i===void 0&&(i=new r);var h=this.p0,s=this.p1,l=this.p2,f=this.p3;return i.set(v(e,h.x,s.x,l.x,f.x),v(e,h.y,s.y,l.y,f.y))},draw:function(e,i){i===void 0&&(i=32);var h=this.getPoints(i);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var s=1;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(19217),o=t(87841),r=t(26099),n=new a({initialize:function(i){this.type=i,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,i){return i===void 0&&(i=32),e.strokePoints(this.getPoints(i))},getBounds:function(e,i){e||(e=new o),i===void 0&&(i=16);var h=this.getLength();i>h&&(i=h/2);var s=Math.max(1,Math.round(h/i));return v(this.getSpacedPoints(s),e)},getDistancePoints:function(e){var i=this.getLength(),h=Math.max(1,i/e);return this.getSpacedPoints(h)},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 i=[],h,s=this.getPoint(0,this._tmpVec2A),l=0;i.push(0);for(var f=1;f<=e;f++)h=this.getPoint(f/e,this._tmpVec2B),l+=h.distance(s),i.push(l),s.copy(h);return this.cacheArcLengths=i,i},getPointAt:function(e,i){var h=this.getUtoTmapping(e);return this.getPoint(h,i)},getPoints:function(e,i,h){h===void 0&&(h=[]),e||(i?e=this.getLength()/i:e=this.defaultDivisions);for(var s=0;s<=e;s++)h.push(this.getPoint(s/e));return h},getRandomPoint:function(e){return e===void 0&&(e=new r),this.getPoint(Math.random(),e)},getSpacedPoints:function(e,i,h){h===void 0&&(h=[]),e||(i?e=this.getLength()/i:e=this.defaultDivisions);for(var s=0;s<=e;s++){var l=this.getUtoTmapping(s/e,null,e);h.push(this.getPoint(l))}return h},getStartPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(0,e)},getTangent:function(e,i){i===void 0&&(i=new r);var h=1e-4,s=e-h,l=e+h;return s<0&&(s=0),l>1&&(l=1),this.getPoint(s,this._tmpVec2A),this.getPoint(l,i),i.subtract(this._tmpVec2A).normalize()},getTangentAt:function(e,i){var h=this.getUtoTmapping(e);return this.getTangent(h,i)},getTFromDistance:function(e,i){return e<=0?0:this.getUtoTmapping(0,e,i)},getUtoTmapping:function(e,i,h){var s=this.getLengths(h),l=0,f=s.length,u;i?u=Math.min(i,s[f-1]):u=e*s[f-1];for(var d=0,p=f-1,g;d<=p;)if(l=Math.floor(d+(p-d)/2),g=s[l]-u,g<0)d=l+1;else if(g>0)p=l-1;else{p=l;break}if(l=p,s[l]===u)return l/(f-1);var y=s[l],x=s[l+1],T=x-y,C=(u-y)/T;return(l+C)/(f-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});c.exports=n},73825:(c,m,t)=>{/** + */var o=t(83419),v=t(19217),a=t(87841),r=t(26099),n=new o({initialize:function(i){this.type=i,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,i){return i===void 0&&(i=32),e.strokePoints(this.getPoints(i))},getBounds:function(e,i){e||(e=new a),i===void 0&&(i=16);var h=this.getLength();i>h&&(i=h/2);var s=Math.max(1,Math.round(h/i));return v(this.getSpacedPoints(s),e)},getDistancePoints:function(e){var i=this.getLength(),h=Math.max(1,i/e);return this.getSpacedPoints(h)},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 i=[],h,s=this.getPoint(0,this._tmpVec2A),l=0;i.push(0);for(var f=1;f<=e;f++)h=this.getPoint(f/e,this._tmpVec2B),l+=h.distance(s),i.push(l),s.copy(h);return this.cacheArcLengths=i,i},getPointAt:function(e,i){var h=this.getUtoTmapping(e);return this.getPoint(h,i)},getPoints:function(e,i,h){h===void 0&&(h=[]),e||(i?e=this.getLength()/i:e=this.defaultDivisions);for(var s=0;s<=e;s++)h.push(this.getPoint(s/e));return h},getRandomPoint:function(e){return e===void 0&&(e=new r),this.getPoint(Math.random(),e)},getSpacedPoints:function(e,i,h){h===void 0&&(h=[]),e||(i?e=this.getLength()/i:e=this.defaultDivisions);for(var s=0;s<=e;s++){var l=this.getUtoTmapping(s/e,null,e);h.push(this.getPoint(l))}return h},getStartPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(0,e)},getTangent:function(e,i){i===void 0&&(i=new r);var h=1e-4,s=e-h,l=e+h;return s<0&&(s=0),l>1&&(l=1),this.getPoint(s,this._tmpVec2A),this.getPoint(l,i),i.subtract(this._tmpVec2A).normalize()},getTangentAt:function(e,i){var h=this.getUtoTmapping(e);return this.getTangent(h,i)},getTFromDistance:function(e,i){return e<=0?0:this.getUtoTmapping(0,e,i)},getUtoTmapping:function(e,i,h){var s=this.getLengths(h),l=0,f=s.length,u;i?u=Math.min(i,s[f-1]):u=e*s[f-1];for(var d=0,p=f-1,g;d<=p;)if(l=Math.floor(d+(p-d)/2),g=s[l]-u,g<0)d=l+1;else if(g>0)p=l-1;else{p=l;break}if(l=p,s[l]===u)return l/(f-1);var y=s[l],x=s[l+1],C=x-y,P=(u-y)/C;return(l+P)/(f-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});c.exports=n},73825:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(80021),o=t(39506),r=t(35154),n=t(43396),e=t(26099),i=new a({Extends:v,initialize:function(s,l,f,u,d,p,g,y){if(typeof s=="object"){var x=s;s=r(x,"x",0),l=r(x,"y",0),f=r(x,"xRadius",0),u=r(x,"yRadius",f),d=r(x,"startAngle",0),p=r(x,"endAngle",360),g=r(x,"clockwise",!1),y=r(x,"rotation",0)}else u===void 0&&(u=f),d===void 0&&(d=0),p===void 0&&(p=360),g===void 0&&(g=!1),y===void 0&&(y=0);v.call(this,"EllipseCurve"),this.p0=new e(s,l),this._xRadius=f,this._yRadius=u,this._startAngle=o(d),this._endAngle=o(p),this._clockwise=g,this._rotation=o(y)},getStartPoint:function(h){return h===void 0&&(h=new e),this.getPoint(0,h)},getResolution:function(h){return h*2},getPoint:function(h,s){s===void 0&&(s=new e);for(var l=Math.PI*2,f=this._endAngle-this._startAngle,u=Math.abs(f)l;)f-=l;f{/** + */var o=t(83419),v=t(80021),a=t(39506),r=t(35154),n=t(43396),e=t(26099),i=new o({Extends:v,initialize:function(s,l,f,u,d,p,g,y){if(typeof s=="object"){var x=s;s=r(x,"x",0),l=r(x,"y",0),f=r(x,"xRadius",0),u=r(x,"yRadius",f),d=r(x,"startAngle",0),p=r(x,"endAngle",360),g=r(x,"clockwise",!1),y=r(x,"rotation",0)}else u===void 0&&(u=f),d===void 0&&(d=0),p===void 0&&(p=360),g===void 0&&(g=!1),y===void 0&&(y=0);v.call(this,"EllipseCurve"),this.p0=new e(s,l),this._xRadius=f,this._yRadius=u,this._startAngle=a(d),this._endAngle=a(p),this._clockwise=g,this._rotation=a(y)},getStartPoint:function(h){return h===void 0&&(h=new e),this.getPoint(0,h)},getResolution:function(h){return h*2},getPoint:function(h,s){s===void 0&&(s=new e);for(var l=Math.PI*2,f=this._endAngle-this._startAngle,u=Math.abs(f)l;)f-=l;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(80021),o=t(19217),r=t(87841),n=t(26099),e=new a({Extends:v,initialize:function(h,s){v.call(this,"LineCurve"),Array.isArray(h)&&(s=new n(h[2],h[3]),h=new n(h[0],h[1])),this.p0=h,this.p1=s,this.arcLengthDivisions=1},getBounds:function(i){return i===void 0&&(i=new r),o([this.p0,this.p1],i)},getStartPoint:function(i){return i===void 0&&(i=new n),i.copy(this.p0)},getResolution:function(i){return i===void 0&&(i=1),i},getPoint:function(i,h){return h===void 0&&(h=new n),i===1?h.copy(this.p1):(h.copy(this.p1).subtract(this.p0).scale(i).add(this.p0),h)},getPointAt:function(i,h){return this.getPoint(i,h)},getTangent:function(i,h){return h===void 0&&(h=new n),h.copy(this.p1).subtract(this.p0).normalize(),h},getUtoTmapping:function(i,h,s){var l;if(h){var f=this.getLengths(s),u=f[f.length-1],d=Math.min(h,u);l=d/u}else l=i;return l},draw:function(i){return i.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),i},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});e.fromJSON=function(i){var h=i.points,s=new n(h[0],h[1]),l=new n(h[2],h[3]);return new e(s,l)},c.exports=e},14744:(c,m,t)=>{/** + */var o=t(83419),v=t(80021),a=t(19217),r=t(87841),n=t(26099),e=new o({Extends:v,initialize:function(h,s){v.call(this,"LineCurve"),Array.isArray(h)&&(s=new n(h[2],h[3]),h=new n(h[0],h[1])),this.p0=h,this.p1=s,this.arcLengthDivisions=1},getBounds:function(i){return i===void 0&&(i=new r),a([this.p0,this.p1],i)},getStartPoint:function(i){return i===void 0&&(i=new n),i.copy(this.p0)},getResolution:function(i){return i===void 0&&(i=1),i},getPoint:function(i,h){return h===void 0&&(h=new n),i===1?h.copy(this.p1):(h.copy(this.p1).subtract(this.p0).scale(i).add(this.p0),h)},getPointAt:function(i,h){return this.getPoint(i,h)},getTangent:function(i,h){return h===void 0&&(h=new n),h.copy(this.p1).subtract(this.p0).normalize(),h},getUtoTmapping:function(i,h,s){var l;if(h){var f=this.getLengths(s),u=f[f.length-1],d=Math.min(h,u);l=d/u}else l=i;return l},draw:function(i){return i.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),i},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});e.fromJSON=function(i){var h=i.points,s=new n(h[0],h[1]),l=new n(h[2],h[3]);return new e(s,l)},c.exports=e},14744:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(80021),o=t(32112),r=t(26099),n=new a({Extends:v,initialize:function(i,h,s){v.call(this,"QuadraticBezierCurve"),Array.isArray(i)&&(s=new r(i[4],i[5]),h=new r(i[2],i[3]),i=new r(i[0],i[1])),this.p0=i,this.p1=h,this.p2=s},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,i){i===void 0&&(i=new r);var h=this.p0,s=this.p1,l=this.p2;return i.set(o(e,h.x,s.x,l.x),o(e,h.y,s.y,l.y))},draw:function(e,i){i===void 0&&(i=32);var h=this.getPoints(i);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var s=1;s{/** + */var o=t(83419),v=t(80021),a=t(32112),r=t(26099),n=new o({Extends:v,initialize:function(i,h,s){v.call(this,"QuadraticBezierCurve"),Array.isArray(i)&&(s=new r(i[4],i[5]),h=new r(i[2],i[3]),i=new r(i[0],i[1])),this.p0=i,this.p1=h,this.p2=s},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,i){i===void 0&&(i=new r);var h=this.p0,s=this.p1,l=this.p2;return i.set(a(e,h.x,s.x,l.x),a(e,h.y,s.y,l.y))},draw:function(e,i){i===void 0&&(i=32);var h=this.getPoints(i);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var s=1;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87842),v=t(83419),o=t(80021),r=t(26099),n=new v({Extends:o,initialize:function(i){i===void 0&&(i=[]),o.call(this,"SplineCurve"),this.points=[],this.addPoints(i)},addPoints:function(e){for(var i=0;ih.length-2?h.length-1:l+1],g=h[l>h.length-3?h.length-1:l+2];return i.set(a(f,u.x,d.x,p.x,g.x),a(f,u.y,d.y,p.y,g.y))},toJSON:function(){for(var e=[],i=0;i{/** + */var o=t(87842),v=t(83419),a=t(80021),r=t(26099),n=new v({Extends:a,initialize:function(i){i===void 0&&(i=[]),a.call(this,"SplineCurve"),this.points=[],this.addPoints(i)},addPoints:function(e){for(var i=0;ih.length-2?h.length-1:l+1],g=h[l>h.length-3?h.length-1:l+2];return i.set(o(f,u.x,d.x,p.x,g.x),o(f,u.y,d.y,p.y,g.y))},toJSON:function(){for(var e=[],i=0;i{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -625,19 +625,19 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(26099),o=new a({initialize:function(n,e){this.active=!1,this.p0=new v(n,e)},getPoint:function(r,n){return n===void 0&&(n=new v),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]}}});c.exports=o},46669:(c,m,t)=>{/** + */var o=t(83419),v=t(26099),a=new o({initialize:function(n,e){this.active=!1,this.p0=new v(n,e)},getPoint:function(r,n){return n===void 0&&(n=new v),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]}}});c.exports=a},46669:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(46728),o=t(73825),r=t(39429),n=t(33951),e=t(68618),i=t(14744),h=t(87841),s=t(42534),l=t(26099),f=t(36383),u=new a({initialize:function(p,g){p===void 0&&(p=0),g===void 0&&(g=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new l,this._tmpVec2A=new l,this._tmpVec2B=new l,typeof p=="object"?this.fromJSON(p):this.startPoint.set(p,g)},add:function(d){return this.curves.push(d),this},circleTo:function(d,p,g){return p===void 0&&(p=!1),this.ellipseTo(d,d,0,360,p,g)},closePath:function(){var d=this.curves[0].getPoint(0),p=this.curves[this.curves.length-1].getPoint(1);return d.equals(p)||this.curves.push(new n(p,d)),this},cubicBezierTo:function(d,p,g,y,x,T){var C=this.getEndPoint(),M,w,L;return d instanceof l?(M=d,w=p,L=g):(M=new l(g,y),w=new l(x,T),L=new l(d,p)),this.add(new v(C,M,w,L))},quadraticBezierTo:function(d,p,g,y){var x=this.getEndPoint(),T,C;return d instanceof l?(T=d,C=p):(T=new l(g,y),C=new l(d,p)),this.add(new i(x,T,C))},draw:function(d,p){for(var g=0;g=p)return this.curves[y];y++}return null},getEndPoint:function(d){return d===void 0&&(d=new l),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,d):d.copy(this.startPoint),d},getLength:function(){var d=this.getCurveLengths();return d[d.length-1]},getPoint:function(d,p){p===void 0&&(p=new l);for(var g=d*this.getLength(),y=this.getCurveLengths(),x=0;x=g){var T=y[x]-g,C=this.curves[x],M=C.getLength(),w=M===0?0:1-T/M;return C.getPointAt(w,p)}x++}return null},getPoints:function(d,p){!d&&!p&&(d=this.defaultDivisions);for(var g=[],y,x=0;x1&&!g[g.length-1].equals(g[0])&&g.push(g[0]),g},getRandomPoint:function(d){return d===void 0&&(d=new l),this.getPoint(Math.random(),d)},getSpacedPoints:function(d){d===void 0&&(d=40);for(var p=[],g=0;g<=d;g++)p.push(this.getPoint(g/d));return this.autoClose&&p.push(p[0]),p},getStartPoint:function(d){return d===void 0&&(d=new l),d.copy(this.startPoint)},getTangent:function(d,p){p===void 0&&(p=new l);for(var g=d*this.getLength(),y=this.getCurveLengths(),x=0;x=g){var T=y[x]-g,C=this.curves[x],M=C.getLength(),w=M===0?0:1-T/M;return C.getTangentAt(w,p)}x++}return null},lineTo:function(d,p){d instanceof l?this._tmpVec2B.copy(d):typeof d=="object"?this._tmpVec2B.setFromObject(d):this._tmpVec2B.set(d,p);var g=this.getEndPoint(this._tmpVec2A);return this.add(new n([g.x,g.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(d){return d.unshift(this.getEndPoint()),this.add(new s(d))},moveTo:function(d,p){return d instanceof l?this.add(new e(d.x,d.y)):this.add(new e(d,p))},toJSON:function(){for(var d=[],p=0;p{/** + */var o=t(83419),v=t(46728),a=t(73825),r=t(39429),n=t(33951),e=t(68618),i=t(14744),h=t(87841),s=t(42534),l=t(26099),f=t(36383),u=new o({initialize:function(p,g){p===void 0&&(p=0),g===void 0&&(g=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new l,this._tmpVec2A=new l,this._tmpVec2B=new l,typeof p=="object"?this.fromJSON(p):this.startPoint.set(p,g)},add:function(d){return this.curves.push(d),this},circleTo:function(d,p,g){return p===void 0&&(p=!1),this.ellipseTo(d,d,0,360,p,g)},closePath:function(){var d=this.curves[0].getPoint(0),p=this.curves[this.curves.length-1].getPoint(1);return d.equals(p)||this.curves.push(new n(p,d)),this},cubicBezierTo:function(d,p,g,y,x,C){var P=this.getEndPoint(),M,w,I;return d instanceof l?(M=d,w=p,I=g):(M=new l(g,y),w=new l(x,C),I=new l(d,p)),this.add(new v(P,M,w,I))},quadraticBezierTo:function(d,p,g,y){var x=this.getEndPoint(),C,P;return d instanceof l?(C=d,P=p):(C=new l(g,y),P=new l(d,p)),this.add(new i(x,C,P))},draw:function(d,p){for(var g=0;g=p)return this.curves[y];y++}return null},getEndPoint:function(d){return d===void 0&&(d=new l),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,d):d.copy(this.startPoint),d},getLength:function(){var d=this.getCurveLengths();return d[d.length-1]},getPoint:function(d,p){p===void 0&&(p=new l);for(var g=d*this.getLength(),y=this.getCurveLengths(),x=0;x=g){var C=y[x]-g,P=this.curves[x],M=P.getLength(),w=M===0?0:1-C/M;return P.getPointAt(w,p)}x++}return null},getPoints:function(d,p){!d&&!p&&(d=this.defaultDivisions);for(var g=[],y,x=0;x1&&!g[g.length-1].equals(g[0])&&g.push(g[0]),g},getRandomPoint:function(d){return d===void 0&&(d=new l),this.getPoint(Math.random(),d)},getSpacedPoints:function(d){d===void 0&&(d=40);for(var p=[],g=0;g<=d;g++)p.push(this.getPoint(g/d));return this.autoClose&&p.push(p[0]),p},getStartPoint:function(d){return d===void 0&&(d=new l),d.copy(this.startPoint)},getTangent:function(d,p){p===void 0&&(p=new l);for(var g=d*this.getLength(),y=this.getCurveLengths(),x=0;x=g){var C=y[x]-g,P=this.curves[x],M=P.getLength(),w=M===0?0:1-C/M;return P.getTangentAt(w,p)}x++}return null},lineTo:function(d,p){d instanceof l?this._tmpVec2B.copy(d):typeof d=="object"?this._tmpVec2B.setFromObject(d):this._tmpVec2B.set(d,p);var g=this.getEndPoint(this._tmpVec2A);return this.add(new n([g.x,g.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(d){return d.unshift(this.getEndPoint()),this.add(new s(d))},moveTo:function(d,p){return d instanceof l?this.add(new e(d.x,d.y)):this.add(new e(d,p))},toJSON:function(){for(var d=[],p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(24882),o=new a({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(v.DESTROY,this.destroy,this)},get:function(r){var n=this.list;if(Array.isArray(r)){for(var e=[],i=0;i{/** + */var o=t(83419),v=t(24882),a=new o({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(v.DESTROY,this.destroy,this)},get:function(r){var n=this.list;if(Array.isArray(r)){for(var e=[],i=0;i{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(45893),o=t(37277),r=t(44594),n=new a({Extends:v,initialize:function(i){v.call(this,i,i.sys.events),this.scene=i,this.systems=i.sys,i.sys.events.once(r.BOOT,this.boot,this),i.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(){v.prototype.destroy.call(this),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null}});o.register("DataManagerPlugin",n,"data"),c.exports=n},10700:c=>{/** + */var o=t(83419),v=t(45893),a=t(37277),r=t(44594),n=new o({Extends:v,initialize:function(i){v.call(this,i,i.sys.events),this.scene=i,this.systems=i.sys,i.sys.events.once(r.BOOT,this.boot,this),i.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(){v.prototype.destroy.call(this),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null}});a.register("DataManagerPlugin",n,"data"),c.exports=n},10700:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -669,35 +669,35 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(84148),v={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function o(){if(typeof importScripts=="function")return v;v.audioData=!!window.Audio,v.webAudio=!!(window.AudioContext||window.webkitAudioContext);var r=document.createElement("audio"),n=!!r.canPlayType;try{if(n){var e=function(s,l){var f=r.canPlayType("audio/"+s).replace(/^no$/,"");return l?!!(f||r.canPlayType("audio/"+l).replace(/^no$/,"")):!!f};if(v.ogg=e('ogg; codecs="vorbis"'),v.opus=e('ogg; codecs="opus"',"opus"),v.mp3=e("mpeg"),v.wav=e("wav"),v.m4a=e("x-m4a"),v.aac=e("aac"),v.flac=e("flac","x-flac"),v.webm=e('webm; codecs="vorbis"'),r.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(a.edge)v.dolby=!0;else if(a.safari&&a.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),h=parseInt(RegExp.$2,10);(i===10&&h>=11||i>10)&&(v.dolby=!0)}}}}catch{}return v}c.exports=o()},84148:(c,m,t)=>{/** + */var o=t(84148),v={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function a(){if(typeof importScripts=="function")return v;v.audioData=!!window.Audio,v.webAudio=!!(window.AudioContext||window.webkitAudioContext);var r=document.createElement("audio"),n=!!r.canPlayType;try{if(n){var e=function(s,l){var f=r.canPlayType("audio/"+s).replace(/^no$/,"");return l?!!(f||r.canPlayType("audio/"+l).replace(/^no$/,"")):!!f};if(v.ogg=e('ogg; codecs="vorbis"'),v.opus=e('ogg; codecs="opus"',"opus"),v.mp3=e("mpeg"),v.wav=e("wav"),v.m4a=e("x-m4a"),v.aac=e("aac"),v.flac=e("flac","x-flac"),v.webm=e('webm; codecs="vorbis"'),r.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(o.edge)v.dolby=!0;else if(o.safari&&o.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),h=parseInt(RegExp.$2,10);(i===10&&h>=11||i>10)&&(v.dolby=!0)}}}}catch{}return v}c.exports=a()},84148:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25892),v={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 o(){var r=navigator.userAgent;return/Edg\/\d+/.test(r)?(v.edge=!0,v.es2019=!0):/OPR/.test(r)?(v.opera=!0,v.es2019=!0):/Chrome\/(\d+)/.test(r)&&!a.windowsPhone?(v.chrome=!0,v.chromeVersion=parseInt(RegExp.$1,10),v.es2019=v.chromeVersion>69):/Firefox\D+(\d+)/.test(r)?(v.firefox=!0,v.firefoxVersion=parseInt(RegExp.$1,10),v.es2019=v.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(r)&&a.iOS?(v.mobileSafari=!0,v.es2019=!0):/MSIE (\d+\.\d+);/.test(r)?(v.ie=!0,v.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(r)&&!a.windowsPhone?(v.safari=!0,v.safariVersion=parseInt(RegExp.$1,10),v.es2019=v.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(r)&&(v.ie=!0,v.trident=!0,v.tridentVersion=parseInt(RegExp.$1,10),v.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(r)&&(v.silk=!0),v}c.exports=o()},89289:(c,m,t)=>{/** + */var o=t(25892),v={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 a(){var r=navigator.userAgent;return/Edg\/\d+/.test(r)?(v.edge=!0,v.es2019=!0):/OPR/.test(r)?(v.opera=!0,v.es2019=!0):/Chrome\/(\d+)/.test(r)&&!o.windowsPhone?(v.chrome=!0,v.chromeVersion=parseInt(RegExp.$1,10),v.es2019=v.chromeVersion>69):/Firefox\D+(\d+)/.test(r)?(v.firefox=!0,v.firefoxVersion=parseInt(RegExp.$1,10),v.es2019=v.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(r)&&o.iOS?(v.mobileSafari=!0,v.es2019=!0):/MSIE (\d+\.\d+);/.test(r)?(v.ie=!0,v.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(r)&&!o.windowsPhone?(v.safari=!0,v.safariVersion=parseInt(RegExp.$1,10),v.es2019=v.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(r)&&(v.ie=!0,v.trident=!0,v.tridentVersion=parseInt(RegExp.$1,10),v.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(r)&&(v.silk=!0),v}c.exports=a()},89289:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(27919),v={supportInverseAlpha:!1,supportNewBlendModes:!1};function o(){var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",i="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",h=new Image;return h.onload=function(){var s=new Image;s.onload=function(){var l=a.create2D(s,6),f=l.getContext("2d",{willReadFrequently:!0});if(f.globalCompositeOperation="multiply",f.drawImage(h,0,0),f.drawImage(s,2,0),!f.getImageData(2,0,1,1))return!1;var u=f.getImageData(2,0,1,1).data;a.remove(s),v.supportNewBlendModes=u[0]===255&&u[1]===0&&u[2]===0},s.src=e+"/wCKxvRF"+i},h.src=e+"AP804Oa6"+i,!1}function r(){var e=a.create2D(this,2),i=e.getContext("2d",{willReadFrequently:!0});i.fillStyle="rgba(10, 20, 30, 0.5)",i.fillRect(0,0,1,1);var h=i.getImageData(0,0,1,1);if(h===null)return!1;i.putImageData(h,1,0);var s=i.getImageData(1,0,1,1),l=s.data[0]===h.data[0]&&s.data[1]===h.data[1]&&s.data[2]===h.data[2]&&s.data[3]===h.data[3];return a.remove(this),l}function n(){return typeof importScripts!="function"&&document!==void 0&&(v.supportNewBlendModes=o(),v.supportInverseAlpha=r()),v}c.exports=n()},89357:(c,m,t)=>{/** + */var o=t(27919),v={supportInverseAlpha:!1,supportNewBlendModes:!1};function a(){var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",i="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",h=new Image;return h.onload=function(){var s=new Image;s.onload=function(){var l=o.create2D(s,6),f=l.getContext("2d",{willReadFrequently:!0});if(f.globalCompositeOperation="multiply",f.drawImage(h,0,0),f.drawImage(s,2,0),!f.getImageData(2,0,1,1))return!1;var u=f.getImageData(2,0,1,1).data;o.remove(s),v.supportNewBlendModes=u[0]===255&&u[1]===0&&u[2]===0},s.src=e+"/wCKxvRF"+i},h.src=e+"AP804Oa6"+i,!1}function r(){var e=o.create2D(this,2),i=e.getContext("2d",{willReadFrequently:!0});i.fillStyle="rgba(10, 20, 30, 0.5)",i.fillRect(0,0,1,1);var h=i.getImageData(0,0,1,1);if(h===null)return!1;i.putImageData(h,1,0);var s=i.getImageData(1,0,1,1),l=s.data[0]===h.data[0]&&s.data[1]===h.data[1]&&s.data[2]===h.data[2]&&s.data[3]===h.data[3];return o.remove(this),l}function n(){return typeof importScripts!="function"&&document!==void 0&&(v.supportNewBlendModes=a(),v.supportInverseAlpha=r()),v}c.exports=n()},89357:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25892),v=t(84148),o=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 i=new ArrayBuffer(4),h=new Uint8Array(i),s=new Uint32Array(i);return h[0]=161,h[1]=178,h[2]=195,h[3]=212,s[0]===3569595041?!0:s[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 i=!1,h=function(){if(window.WebGLRenderingContext)try{var s=o.createWebGL(this),l=s.getContext("webgl")||s.getContext("experimental-webgl"),f=o.create2D(this),u=f.getContext("2d",{willReadFrequently:!0}),d=u.createImageData(1,1);return i=d.data instanceof Uint8ClampedArray,o.remove(s),o.remove(f),!!l}catch{return!1}return!1};return r.webGL=h(),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,v.firefox&&v.firefoxVersion<21&&(r.getUserMedia=!1),!a.iOS&&(v.ie||v.firefox||v.chrome)&&(r.canvasBitBltShift=!0),(v.safari||v.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&&i,r}c.exports=e()},91639:c=>{/** + */var o=t(25892),v=t(84148),a=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 i=new ArrayBuffer(4),h=new Uint8Array(i),s=new Uint32Array(i);return h[0]=161,h[1]=178,h[2]=195,h[3]=212,s[0]===3569595041?!0:s[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 i=!1,h=function(){if(window.WebGLRenderingContext)try{var s=a.createWebGL(this),l=s.getContext("webgl")||s.getContext("experimental-webgl"),f=a.create2D(this),u=f.getContext("2d",{willReadFrequently:!0}),d=u.createImageData(1,1);return i=d.data instanceof Uint8ClampedArray,a.remove(s),a.remove(f),!!l}catch{return!1}return!1};return r.webGL=h(),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,v.firefox&&v.firefoxVersion<21&&(r.getUserMedia=!1),!o.iOS&&(v.ie||v.firefox||v.chrome)&&(r.canvasBitBltShift=!0),(v.safari||v.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&&i,r}c.exports=e()},91639:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={available:!1,cancel:"",keyboard:!1,request:""};function t(){if(typeof importScripts=="function")return m;var a,v="Fullscreen",o="FullScreen",r=["request"+v,"request"+o,"webkitRequest"+v,"webkitRequest"+o,"msRequest"+v,"msRequest"+o,"mozRequest"+o,"mozRequest"+v];for(a=0;a{/** + */var m={available:!1,cancel:"",keyboard:!1,request:""};function t(){if(typeof importScripts=="function")return m;var o,v="Fullscreen",a="FullScreen",r=["request"+v,"request"+a,"webkitRequest"+v,"webkitRequest"+a,"msRequest"+v,"msRequest"+a,"mozRequest"+a,"mozRequest"+v];for(o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(84148),v={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function o(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(v.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(v.mspointer=!0),navigator.getGamepads&&(v.gamepads=!0),"onwheel"in window||a.ie&&"WheelEvent"in window?v.wheelEvent="wheel":"onmousewheel"in window?v.wheelEvent="mousewheel":a.firefox&&"MouseScrollEvent"in window&&(v.wheelEvent="DOMMouseScroll")),v}c.exports=o()},25892:c=>{/** + */var o=t(84148),v={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function a(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(v.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(v.mspointer=!0),navigator.getGamepads&&(v.gamepads=!0),"onwheel"in window||o.ie&&"WheelEvent"in window?v.wheelEvent="wheel":"onmousewheel"in window?v.wheelEvent="mousewheel":o.firefox&&"MouseScrollEvent"in window&&(v.wheelEvent="DOMMouseScroll")),v}c.exports=a()},25892:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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 m;var a=navigator.userAgent;/Windows/.test(a)?m.windows=!0:/Mac OS/.test(a)&&!/like Mac OS/.test(a)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(m.iOS=!0,m.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),m.iOSVersion=parseInt(RegExp.$1,10)):m.macOS=!0:/Android/.test(a)?m.android=!0:/Linux/.test(a)?m.linux=!0:/iP[ao]d|iPhone/i.test(a)?(m.iOS=!0,navigator.appVersion.match(/OS (\d+)/),m.iOSVersion=parseInt(RegExp.$1,10),m.iPhone=a.toLowerCase().indexOf("iphone")!==-1,m.iPad=a.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(a)||/\bKF[A-Z][A-Z]+/.test(a)||/Silk.*Mobile Safari/.test(a)?m.kindle=!0:/CrOS/.test(a)&&(m.chromeOS=!0),(/Windows Phone/i.test(a)||/IEMobile/i.test(a))&&(m.android=!1,m.iOS=!1,m.macOS=!1,m.windows=!0,m.windowsPhone=!0);var v=/Silk/.test(a);return(m.windows||m.macOS||m.linux&&!v||m.chromeOS)&&(m.desktop=!0),(m.windowsPhone||/Windows NT/i.test(a)&&/Touch/i.test(a))&&(m.desktop=!1),navigator.standalone&&(m.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(m.cordova=!0),window.ejecta!==void 0&&(m.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(m.node=!0),m.node&&typeof process.versions=="object"&&(m.nodeWebkit=!!process.versions["node-webkit"],m.electron=!!process.versions.electron),/Crosswalk/.test(a)&&(m.crosswalk=!0),m.pixelRatio=window.devicePixelRatio||1,m}c.exports=t()},43267:(c,m,t)=>{/** + */var m={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 m;var o=navigator.userAgent;/Windows/.test(o)?m.windows=!0:/Mac OS/.test(o)&&!/like Mac OS/.test(o)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(m.iOS=!0,m.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),m.iOSVersion=parseInt(RegExp.$1,10)):m.macOS=!0:/Android/.test(o)?m.android=!0:/Linux/.test(o)?m.linux=!0:/iP[ao]d|iPhone/i.test(o)?(m.iOS=!0,navigator.appVersion.match(/OS (\d+)/),m.iOSVersion=parseInt(RegExp.$1,10),m.iPhone=o.toLowerCase().indexOf("iphone")!==-1,m.iPad=o.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(o)||/\bKF[A-Z][A-Z]+/.test(o)||/Silk.*Mobile Safari/.test(o)?m.kindle=!0:/CrOS/.test(o)&&(m.chromeOS=!0),(/Windows Phone/i.test(o)||/IEMobile/i.test(o))&&(m.android=!1,m.iOS=!1,m.macOS=!1,m.windows=!0,m.windowsPhone=!0);var v=/Silk/.test(o);return(m.windows||m.macOS||m.linux&&!v||m.chromeOS)&&(m.desktop=!0),(m.windowsPhone||/Windows NT/i.test(o)&&/Touch/i.test(o))&&(m.desktop=!1),navigator.standalone&&(m.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(m.cordova=!0),window.ejecta!==void 0&&(m.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(m.node=!0),m.node&&typeof process.versions=="object"&&(m.nodeWebkit=!!process.versions["node-webkit"],m.electron=!!process.versions.electron),/Crosswalk/.test(o)&&(m.crosswalk=!0),m.pixelRatio=window.devicePixelRatio||1,m}c.exports=t()},43267:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function o(){if(typeof importScripts=="function")return v;var r=document.createElement("video"),n=!!r.canPlayType,e=/^no$/;try{n&&(r.canPlayType('video/ogg; codecs="theora"').replace(e,"")&&(v.ogg=!0),r.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(e,"")&&(v.h264=!0,v.mp4=!0),r.canPlayType("video/x-m4v").replace(e,"")&&(v.m4v=!0),r.canPlayType('video/webm; codecs="vp8, vorbis"').replace(e,"")&&(v.webm=!0),r.canPlayType('video/webm; codecs="vp9"').replace(e,"")&&(v.vp9=!0),r.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(e,"")&&(v.hls=!0))}catch{}return r.parentNode&&r.parentNode.removeChild(r),v.getVideoURL=function(i){Array.isArray(i)||(i=[i]);for(var h=0;h{/** + */var o=t(95540),v={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function a(){if(typeof importScripts=="function")return v;var r=document.createElement("video"),n=!!r.canPlayType,e=/^no$/;try{n&&(r.canPlayType('video/ogg; codecs="theora"').replace(e,"")&&(v.ogg=!0),r.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(e,"")&&(v.h264=!0,v.mp4=!0),r.canPlayType("video/x-m4v").replace(e,"")&&(v.m4v=!0),r.canPlayType('video/webm; codecs="vp8, vorbis"').replace(e,"")&&(v.webm=!0),r.canPlayType('video/webm; codecs="vp9"').replace(e,"")&&(v.vp9=!0),r.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(e,"")&&(v.hls=!0))}catch{}return r.parentNode&&r.parentNode.removeChild(r),v.getVideoURL=function(i){Array.isArray(i)||(i=[i]);for(var h=0;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -705,11 +705,11 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new Float32Array(20),o=new a({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,i=(e-1)*-.5;return this.multiply([e,i,i,0,0,i,e,i,0,0,i,i,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),i=Math.sin(r),h=.213,s=.715,l=.072;return this.multiply([h+e*(1-h)+i*-h,s+e*-s+i*-s,l+e*-l+i*(1-l),0,0,h+e*-h+i*.143,s+e*(1-s)+i*.14,l+e*-l+i*-.283,0,0,h+e*-h+i*-(1-h),s+e*-s+i*s,l+e*(1-l)+i*l,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(o.BLACK_WHITE,r)},contrast:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r+1,i=-.5*(e-1);return this.multiply([e,0,0,0,i,0,e,0,0,i,0,0,e,0,i,0,0,0,1,0],n)},negative:function(r){return r===void 0&&(r=!1),this.multiply(o.NEGATIVE,r)},desaturateLuminance:function(r){return r===void 0&&(r=!1),this.multiply(o.DESATURATE_LUMINANCE,r)},sepia:function(r){return r===void 0&&(r=!1),this.multiply(o.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(o.LSD,r)},brown:function(r){return r===void 0&&(r=!1),this.multiply(o.BROWN,r)},vintagePinhole:function(r){return r===void 0&&(r=!1),this.multiply(o.VINTAGE,r)},kodachrome:function(r){return r===void 0&&(r=!1),this.multiply(o.KODACHROME,r)},technicolor:function(r){return r===void 0&&(r=!1),this.multiply(o.TECHNICOLOR,r)},polaroid:function(r){return r===void 0&&(r=!1),this.multiply(o.POLAROID,r)},shiftToBGR:function(r){return r===void 0&&(r=!1),this.multiply(o.SHIFT_BGR,r)},multiply:function(r,n){n===void 0&&(n=!1),n||this.reset();var e=this._matrix,i=v;return i.set(e),e.set([i[0]*r[0]+i[1]*r[5]+i[2]*r[10]+i[3]*r[15],i[0]*r[1]+i[1]*r[6]+i[2]*r[11]+i[3]*r[16],i[0]*r[2]+i[1]*r[7]+i[2]*r[12]+i[3]*r[17],i[0]*r[3]+i[1]*r[8]+i[2]*r[13]+i[3]*r[18],i[0]*r[4]+i[1]*r[9]+i[2]*r[14]+i[3]*r[19]+i[4],i[5]*r[0]+i[6]*r[5]+i[7]*r[10]+i[8]*r[15],i[5]*r[1]+i[6]*r[6]+i[7]*r[11]+i[8]*r[16],i[5]*r[2]+i[6]*r[7]+i[7]*r[12]+i[8]*r[17],i[5]*r[3]+i[6]*r[8]+i[7]*r[13]+i[8]*r[18],i[5]*r[4]+i[6]*r[9]+i[7]*r[14]+i[8]*r[19]+i[9],i[10]*r[0]+i[11]*r[5]+i[12]*r[10]+i[13]*r[15],i[10]*r[1]+i[11]*r[6]+i[12]*r[11]+i[13]*r[16],i[10]*r[2]+i[11]*r[7]+i[12]*r[12]+i[13]*r[17],i[10]*r[3]+i[11]*r[8]+i[12]*r[13]+i[13]*r[18],i[10]*r[4]+i[11]*r[9]+i[12]*r[14]+i[13]*r[19]+i[14],i[15]*r[0]+i[16]*r[5]+i[17]*r[10]+i[18]*r[15],i[15]*r[1]+i[16]*r[6]+i[17]*r[11]+i[18]*r[16],i[15]*r[2]+i[16]*r[7]+i[17]*r[12]+i[18]*r[17],i[15]*r[3]+i[16]*r[8]+i[17]*r[13]+i[18]*r[18],i[15]*r[4]+i[16]*r[9]+i[17]*r[14]+i[18]*r[19]+i[19]]),this._dirty=!0,this}});o.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],o.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],o.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],o.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],o.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],o.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],o.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],o.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],o.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],o.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],o.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],c.exports=o},51767:(c,m,t)=>{/** + */var o=t(83419),v=new Float32Array(20),a=new o({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,i=(e-1)*-.5;return this.multiply([e,i,i,0,0,i,e,i,0,0,i,i,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),i=Math.sin(r),h=.213,s=.715,l=.072;return this.multiply([h+e*(1-h)+i*-h,s+e*-s+i*-s,l+e*-l+i*(1-l),0,0,h+e*-h+i*.143,s+e*(1-s)+i*.14,l+e*-l+i*-.283,0,0,h+e*-h+i*-(1-h),s+e*-s+i*s,l+e*(1-l)+i*l,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(a.BLACK_WHITE,r)},contrast:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r+1,i=-.5*(e-1);return this.multiply([e,0,0,0,i,0,e,0,0,i,0,0,e,0,i,0,0,0,1,0],n)},negative:function(r){return r===void 0&&(r=!1),this.multiply(a.NEGATIVE,r)},desaturateLuminance:function(r){return r===void 0&&(r=!1),this.multiply(a.DESATURATE_LUMINANCE,r)},sepia:function(r){return r===void 0&&(r=!1),this.multiply(a.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(a.LSD,r)},brown:function(r){return r===void 0&&(r=!1),this.multiply(a.BROWN,r)},vintagePinhole:function(r){return r===void 0&&(r=!1),this.multiply(a.VINTAGE,r)},kodachrome:function(r){return r===void 0&&(r=!1),this.multiply(a.KODACHROME,r)},technicolor:function(r){return r===void 0&&(r=!1),this.multiply(a.TECHNICOLOR,r)},polaroid:function(r){return r===void 0&&(r=!1),this.multiply(a.POLAROID,r)},shiftToBGR:function(r){return r===void 0&&(r=!1),this.multiply(a.SHIFT_BGR,r)},multiply:function(r,n){n===void 0&&(n=!1),n||this.reset();var e=this._matrix,i=v;return i.set(e),e.set([i[0]*r[0]+i[1]*r[5]+i[2]*r[10]+i[3]*r[15],i[0]*r[1]+i[1]*r[6]+i[2]*r[11]+i[3]*r[16],i[0]*r[2]+i[1]*r[7]+i[2]*r[12]+i[3]*r[17],i[0]*r[3]+i[1]*r[8]+i[2]*r[13]+i[3]*r[18],i[0]*r[4]+i[1]*r[9]+i[2]*r[14]+i[3]*r[19]+i[4],i[5]*r[0]+i[6]*r[5]+i[7]*r[10]+i[8]*r[15],i[5]*r[1]+i[6]*r[6]+i[7]*r[11]+i[8]*r[16],i[5]*r[2]+i[6]*r[7]+i[7]*r[12]+i[8]*r[17],i[5]*r[3]+i[6]*r[8]+i[7]*r[13]+i[8]*r[18],i[5]*r[4]+i[6]*r[9]+i[7]*r[14]+i[8]*r[19]+i[9],i[10]*r[0]+i[11]*r[5]+i[12]*r[10]+i[13]*r[15],i[10]*r[1]+i[11]*r[6]+i[12]*r[11]+i[13]*r[16],i[10]*r[2]+i[11]*r[7]+i[12]*r[12]+i[13]*r[17],i[10]*r[3]+i[11]*r[8]+i[12]*r[13]+i[13]*r[18],i[10]*r[4]+i[11]*r[9]+i[12]*r[14]+i[13]*r[19]+i[14],i[15]*r[0]+i[16]*r[5]+i[17]*r[10]+i[18]*r[15],i[15]*r[1]+i[16]*r[6]+i[17]*r[11]+i[18]*r[16],i[15]*r[2]+i[16]*r[7]+i[17]*r[12]+i[18]*r[17],i[15]*r[3]+i[16]*r[8]+i[17]*r[13]+i[18]*r[18],i[15]*r[4]+i[16]*r[9]+i[17]*r[14]+i[18]*r[19]+i[19]]),this._dirty=!0,this}});a.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],a.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],a.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],a.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],a.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],a.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],a.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],a.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],a.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],a.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],a.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],c.exports=a},51767:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(29747),o=new a({initialize:function(n,e,i){this._rgb=[0,0,0],this.onChangeCallback=v,this.dirty=!1,this.set(n,e,i)},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 i=this._rgb;return i[0]===r&&i[1]===n&&i[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}});c.exports=o},60461:c=>{/** + */var o=t(83419),v=t(29747),a=new o({initialize:function(n,e,i){this._rgb=[0,0,0],this.onChangeCallback=v,this.dirty=!1,this.set(n,e,i)},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 i=this._rgb;return i[0]===r&&i[1]===n&&i[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}});c.exports=a},60461:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -717,43 +717,43 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(35893),o=t(86327),r=t(88417),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),o(e,a(i)+s),e};c.exports=n},46768:(c,m,t)=>{/** + */var o=t(62235),v=t(35893),a=t(86327),r=t(88417),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),a(e,o(i)+s),e};c.exports=n},46768:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(26541),o=t(86327),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)-h),o(e,a(i)+s),e};c.exports=n},35827:(c,m,t)=>{/** + */var o=t(62235),v=t(26541),a=t(86327),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)-h),a(e,o(i)+s),e};c.exports=n},35827:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(54380),o=t(86327),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),o(e,a(i)+s),e};c.exports=n},46871:(c,m,t)=>{/** + */var o=t(62235),v=t(54380),a=t(86327),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),a(e,o(i)+s),e};c.exports=n},46871:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66786),v=t(35893),o=t(7702),r=function(n,e,i,h){return i===void 0&&(i=0),h===void 0&&(h=0),a(n,v(e)+i,o(e)+h),n};c.exports=r},5198:(c,m,t)=>{/** + */var o=t(66786),v=t(35893),a=t(7702),r=function(n,e,i,h){return i===void 0&&(i=0),h===void 0&&(h=0),o(n,v(e)+i,a(e)+h),n};c.exports=r},5198:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7702),v=t(26541),o=t(20786),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)-h),o(e,a(i)+s),e};c.exports=n},11879:(c,m,t)=>{/** + */var o=t(7702),v=t(26541),a=t(20786),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)-h),a(e,o(i)+s),e};c.exports=n},11879:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(60461),v=[];v[a.BOTTOM_CENTER]=t(54312),v[a.BOTTOM_LEFT]=t(46768),v[a.BOTTOM_RIGHT]=t(35827),v[a.CENTER]=t(46871),v[a.LEFT_CENTER]=t(5198),v[a.RIGHT_CENTER]=t(80503),v[a.TOP_CENTER]=t(89698),v[a.TOP_LEFT]=t(922),v[a.TOP_RIGHT]=t(21373),v[a.LEFT_BOTTOM]=v[a.BOTTOM_LEFT],v[a.LEFT_TOP]=v[a.TOP_LEFT],v[a.RIGHT_BOTTOM]=v[a.BOTTOM_RIGHT],v[a.RIGHT_TOP]=v[a.TOP_RIGHT];var o=function(r,n,e,i,h){return v[e](r,n,i,h)};c.exports=o},80503:(c,m,t)=>{/** + */var o=t(60461),v=[];v[o.BOTTOM_CENTER]=t(54312),v[o.BOTTOM_LEFT]=t(46768),v[o.BOTTOM_RIGHT]=t(35827),v[o.CENTER]=t(46871),v[o.LEFT_CENTER]=t(5198),v[o.RIGHT_CENTER]=t(80503),v[o.TOP_CENTER]=t(89698),v[o.TOP_LEFT]=t(922),v[o.TOP_RIGHT]=t(21373),v[o.LEFT_BOTTOM]=v[o.BOTTOM_LEFT],v[o.LEFT_TOP]=v[o.TOP_LEFT],v[o.RIGHT_BOTTOM]=v[o.BOTTOM_RIGHT],v[o.RIGHT_TOP]=v[o.TOP_RIGHT];var a=function(r,n,e,i,h){return v[e](r,n,i,h)};c.exports=a},80503:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7702),v=t(54380),o=t(20786),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),o(e,a(i)+s),e};c.exports=n},89698:(c,m,t)=>{/** + */var o=t(7702),v=t(54380),a=t(20786),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),a(e,o(i)+s),e};c.exports=n},89698:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35893),v=t(17717),o=t(88417),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)+h),r(e,v(i)-s),e};c.exports=n},922:(c,m,t)=>{/** + */var o=t(35893),v=t(17717),a=t(88417),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),a(e,o(i)+h),r(e,v(i)-s),e};c.exports=n},922:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26541),v=t(17717),o=t(385),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)-h),r(e,v(i)-s),e};c.exports=n},21373:(c,m,t)=>{/** + */var o=t(26541),v=t(17717),a=t(385),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),a(e,o(i)-h),r(e,v(i)-s),e};c.exports=n},21373:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(54380),v=t(17717),o=t(40136),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)+h),r(e,v(i)-s),e};c.exports=n},91660:(c,m,t)=>{/** + */var o=t(54380),v=t(17717),a=t(40136),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),a(e,o(i)+h),r(e,v(i)-s),e};c.exports=n},91660:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -761,59 +761,59 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(60461),v=t(79291),o={In:t(91660),To:t(16694)};o=v(!1,o,a),c.exports=o},21578:(c,m,t)=>{/** + */var o=t(60461),v=t(79291),a={In:t(91660),To:t(16694)};a=v(!1,a,o),c.exports=a},21578:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(35893),o=t(88417),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,v(i)+h),r(e,a(i)+s),e};c.exports=n},10210:(c,m,t)=>{/** + */var o=t(62235),v=t(35893),a=t(88417),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),a(e,v(i)+h),r(e,o(i)+s),e};c.exports=n},10210:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(26541),o=t(385),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,v(i)-h),r(e,a(i)+s),e};c.exports=n},82341:(c,m,t)=>{/** + */var o=t(62235),v=t(26541),a=t(385),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),a(e,v(i)-h),r(e,o(i)+s),e};c.exports=n},82341:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(54380),o=t(40136),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,v(i)+h),r(e,a(i)+s),e};c.exports=n},87958:(c,m,t)=>{/** + */var o=t(62235),v=t(54380),a=t(40136),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),a(e,v(i)+h),r(e,o(i)+s),e};c.exports=n},87958:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(26541),o=t(86327),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)-h),o(e,a(i)+s),e};c.exports=n},40080:(c,m,t)=>{/** + */var o=t(62235),v=t(26541),a=t(86327),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)-h),a(e,o(i)+s),e};c.exports=n},40080:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7702),v=t(26541),o=t(20786),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)-h),o(e,a(i)+s),e};c.exports=n},88466:(c,m,t)=>{/** + */var o=t(7702),v=t(26541),a=t(20786),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)-h),a(e,o(i)+s),e};c.exports=n},88466:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26541),v=t(17717),o=t(40136),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)-h),r(e,v(i)-s),e};c.exports=n},38829:(c,m,t)=>{/** + */var o=t(26541),v=t(17717),a=t(40136),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),a(e,o(i)-h),r(e,v(i)-s),e};c.exports=n},38829:(c,m,t)=>{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(60461),v=[];v[a.BOTTOM_CENTER]=t(21578),v[a.BOTTOM_LEFT]=t(10210),v[a.BOTTOM_RIGHT]=t(82341),v[a.LEFT_BOTTOM]=t(87958),v[a.LEFT_CENTER]=t(40080),v[a.LEFT_TOP]=t(88466),v[a.RIGHT_BOTTOM]=t(19211),v[a.RIGHT_CENTER]=t(34609),v[a.RIGHT_TOP]=t(48741),v[a.TOP_CENTER]=t(49440),v[a.TOP_LEFT]=t(81288),v[a.TOP_RIGHT]=t(61323);var o=function(r,n,e,i,h){return v[e](r,n,i,h)};c.exports=o},19211:(c,m,t)=>{/** + */var o=t(60461),v=[];v[o.BOTTOM_CENTER]=t(21578),v[o.BOTTOM_LEFT]=t(10210),v[o.BOTTOM_RIGHT]=t(82341),v[o.LEFT_BOTTOM]=t(87958),v[o.LEFT_CENTER]=t(40080),v[o.LEFT_TOP]=t(88466),v[o.RIGHT_BOTTOM]=t(19211),v[o.RIGHT_CENTER]=t(34609),v[o.RIGHT_TOP]=t(48741),v[o.TOP_CENTER]=t(49440),v[o.TOP_LEFT]=t(81288),v[o.TOP_RIGHT]=t(61323);var a=function(r,n,e,i,h){return v[e](r,n,i,h)};c.exports=a},19211:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(54380),o=t(86327),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),o(e,a(i)+s),e};c.exports=n},34609:(c,m,t)=>{/** + */var o=t(62235),v=t(54380),a=t(86327),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),a(e,o(i)+s),e};c.exports=n},34609:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7702),v=t(54380),o=t(20786),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),o(e,a(i)+s),e};c.exports=n},48741:(c,m,t)=>{/** + */var o=t(7702),v=t(54380),a=t(20786),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),a(e,o(i)+s),e};c.exports=n},48741:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(54380),v=t(17717),o=t(385),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)+h),r(e,v(i)-s),e};c.exports=n},49440:(c,m,t)=>{/** + */var o=t(54380),v=t(17717),a=t(385),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),a(e,o(i)+h),r(e,v(i)-s),e};c.exports=n},49440:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35893),v=t(17717),o=t(86327),r=t(88417),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,a(i)+h),o(e,v(i)-s),e};c.exports=n},81288:(c,m,t)=>{/** + */var o=t(35893),v=t(17717),a=t(86327),r=t(88417),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,o(i)+h),a(e,v(i)-s),e};c.exports=n},81288:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26541),v=t(17717),o=t(86327),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,a(i)-h),o(e,v(i)-s),e};c.exports=n},61323:(c,m,t)=>{/** + */var o=t(26541),v=t(17717),a=t(86327),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,o(i)-h),a(e,v(i)-s),e};c.exports=n},61323:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(54380),v=t(17717),o=t(86327),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,a(i)+h),o(e,v(i)-s),e};c.exports=n},16694:(c,m,t)=>{/** + */var o=t(54380),v=t(17717),a=t(86327),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,o(i)+h),a(e,v(i)-s),e};c.exports=n},16694:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -821,7 +821,7 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(88417),v=t(20786),o=function(r,n,e){return a(r,n),v(r,e)};c.exports=o},62235:c=>{/** + */var o=t(88417),v=t(20786),a=function(r,n,e){return o(r,n),v(r,e)};c.exports=a},62235:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -829,7 +829,7 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(26541),o=t(54380),r=t(17717),n=t(87841),e=function(i,h){h===void 0&&(h=new n);var s=v(i),l=r(i);return h.x=s,h.y=l,h.width=o(i)-s,h.height=a(i)-l,h};c.exports=e},35893:c=>{/** + */var o=t(62235),v=t(26541),a=t(54380),r=t(17717),n=t(87841),e=function(i,h){h===void 0&&(h=new n);var s=v(i),l=r(i);return h.x=s,h.y=l,h.width=a(i)-s,h.height=o(i)-l,h};c.exports=e},35893:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -861,27 +861,27 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.y=a-t.height+t.height*t.originY,t};c.exports=m},88417:c=>{/** + */var m=function(t,o){return t.y=o-t.height+t.height*t.originY,t};c.exports=m},88417:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.width*t.originX;return t.x=a+v-t.width*.5,t};c.exports=m},20786:c=>{/** + */var m=function(t,o){var v=t.width*t.originX;return t.x=o+v-t.width*.5,t};c.exports=m},20786:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.height*t.originY;return t.y=a+v-t.height*.5,t};c.exports=m},385:c=>{/** + */var m=function(t,o){var v=t.height*t.originY;return t.y=o+v-t.height*.5,t};c.exports=m},385:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x=a+t.width*t.originX,t};c.exports=m},40136:c=>{/** + */var m=function(t,o){return t.x=o+t.width*t.originX,t};c.exports=m},40136:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x=a-t.width+t.width*t.originX,t};c.exports=m},66737:c=>{/** + */var m=function(t,o){return t.x=o-t.width+t.width*t.originX,t};c.exports=m},66737:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.y=a+t.height*t.originY,t};c.exports=m},58724:(c,m,t)=>{/** + */var m=function(t,o){return t.y=o+t.height*t.originY,t};c.exports=m},58724:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -889,23 +889,23 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setCrisp:function(t){var a=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return a.forEach(function(v){t.style["image-rendering"]=v}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}};c.exports=m},27919:(c,m,t)=>{/** + */var m={setCrisp:function(t){var o=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return o.forEach(function(v){t.style["image-rendering"]=v}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}};c.exports=m},27919:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(8054),v=t(68703),o=[],r=!1,n=function(){var e=function(g,y,x,T,C){y===void 0&&(y=1),x===void 0&&(x=1),T===void 0&&(T=a.CANVAS),C===void 0&&(C=!1);var M,w=s(T);return w===null?(w={parent:g,canvas:document.createElement("canvas"),type:T},T===a.CANVAS&&o.push(w),M=w.canvas):(w.parent=g,M=w.canvas),C&&(w.parent=M),M.width=y,M.height=x,r&&T===a.CANVAS&&v.disable(M.getContext("2d",{willReadFrequently:!1})),M},i=function(g,y,x){return e(g,y,x,a.CANVAS)},h=function(g,y,x){return e(g,y,x,a.WEBGL)},s=function(g){if(g===void 0&&(g=a.CANVAS),g===a.WEBGL)return null;for(var y=0;y{/** + */var o=t(8054),v=t(68703),a=[],r=!1,n=function(){var e=function(g,y,x,C,P){y===void 0&&(y=1),x===void 0&&(x=1),C===void 0&&(C=o.CANVAS),P===void 0&&(P=!1);var M,w=s(C);return w===null?(w={parent:g,canvas:document.createElement("canvas"),type:C},C===o.CANVAS&&a.push(w),M=w.canvas):(w.parent=g,M=w.canvas),P&&(w.parent=M),M.width=y,M.height=x,r&&C===o.CANVAS&&v.disable(M.getContext("2d",{willReadFrequently:!1})),M},i=function(g,y,x){return e(g,y,x,o.CANVAS)},h=function(g,y,x){return e(g,y,x,o.WEBGL)},s=function(g){if(g===void 0&&(g=o.CANVAS),g===o.WEBGL)return null;for(var y=0;y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m="",t=function(){var a=function(n){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{/** + */var m="",t=function(){var o=function(n){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a="none"),t.style.msTouchAction=a,t.style["ms-touch-action"]=a,t.style["touch-action"]=a,t};c.exports=m},91610:c=>{/** + */var m=function(t,o){return o===void 0&&(o="none"),t.style.msTouchAction=o,t.style["ms-touch-action"]=o,t.style["touch-action"]=o,t};c.exports=m},91610:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a="none");var v=["-webkit-","-khtml-","-moz-","-ms-",""];return v.forEach(function(o){t.style[o+"user-select"]=a}),t.style["-webkit-touch-callout"]=a,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t};c.exports=m},26253:(c,m,t)=>{/** + */var m=function(t,o){o===void 0&&(o="none");var v=["-webkit-","-khtml-","-moz-","-ms-",""];return v.forEach(function(a){t.style[a+"user-select"]=o}),t.style["-webkit-touch-callout"]=o,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t};c.exports=m},26253:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -913,51 +913,51 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(37589),o=t(1e3),r=t(7537),n=t(87837),e=new a({initialize:function(h,s,l,f){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(h,s,l,f)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(i,h,s,l,f){return l===void 0&&(l=255),f===void 0&&(f=!0),this._locked=!0,this.red=i,this.green=h,this.blue=s,this.alpha=l,this._locked=!1,this.update(f)},setGLTo:function(i,h,s,l){return l===void 0&&(l=1),this._locked=!0,this.redGL=i,this.greenGL=h,this.blueGL=s,this.alphaGL=l,this._locked=!1,this.update(!0)},setFromRGB:function(i){return this._locked=!0,this.red=i.r,this.green=i.g,this.blue=i.b,i.hasOwnProperty("a")&&(this.alpha=i.a),this._locked=!1,this.update(!0)},setFromHSV:function(i,h,s){return r(i,h,s,this)},update:function(i){if(i===void 0&&(i=!1),this._locked)return this;var h=this.r,s=this.g,l=this.b,f=this.a;return this._color=v(h,s,l),this._color32=o(h,s,l,f),this._rgba="rgba("+h+","+s+","+l+","+f/255+")",i&&n(h,s,l,this),this},updateHSV:function(){var i=this.r,h=this.g,s=this.b;return n(i,h,s,this),this},clone:function(){return new e(this.r,this.g,this.b,this.a)},gray:function(i){return this.setTo(i,i,i)},random:function(i,h){i===void 0&&(i=0),h===void 0&&(h=255);var s=Math.floor(i+Math.random()*(h-i)),l=Math.floor(i+Math.random()*(h-i)),f=Math.floor(i+Math.random()*(h-i));return this.setTo(s,l,f)},randomGray:function(i,h){i===void 0&&(i=0),h===void 0&&(h=255);var s=Math.floor(i+Math.random()*(h-i));return this.setTo(s,s,s)},saturate:function(i){return this.s+=i/100,this},desaturate:function(i){return this.s-=i/100,this},lighten:function(i){return this.v+=i/100,this},darken:function(i){return this.v-=i/100,this},brighten:function(i){var h=this.r,s=this.g,l=this.b;return h=Math.max(0,Math.min(255,h-Math.round(255*-(i/100)))),s=Math.max(0,Math.min(255,s-Math.round(255*-(i/100)))),l=Math.max(0,Math.min(255,l-Math.round(255*-(i/100)))),this.setTo(h,s,l)},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(i){this.gl[0]=Math.min(Math.abs(i),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(i){this.gl[1]=Math.min(Math.abs(i),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(i){this.gl[2]=Math.min(Math.abs(i),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(i){this.gl[3]=Math.min(Math.abs(i),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(i){i=Math.floor(Math.abs(i)),this.r=Math.min(i,255),this.gl[0]=i/255,this.update(!0)}},green:{get:function(){return this.g},set:function(i){i=Math.floor(Math.abs(i)),this.g=Math.min(i,255),this.gl[1]=i/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(i){i=Math.floor(Math.abs(i)),this.b=Math.min(i,255),this.gl[2]=i/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(i){i=Math.floor(Math.abs(i)),this.a=Math.min(i,255),this.gl[3]=i/255,this.update()}},h:{get:function(){return this._h},set:function(i){this._h=i,r(i,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(i){this._s=i,r(this._h,i,this._v,this)}},v:{get:function(){return this._v},set:function(i){this._v=i,r(this._h,this._s,i,this)}}});c.exports=e},92728:(c,m,t)=>{/** + */var o=t(83419),v=t(37589),a=t(1e3),r=t(7537),n=t(87837),e=new o({initialize:function(h,s,l,f){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(h,s,l,f)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(i,h,s,l,f){return l===void 0&&(l=255),f===void 0&&(f=!0),this._locked=!0,this.red=i,this.green=h,this.blue=s,this.alpha=l,this._locked=!1,this.update(f)},setGLTo:function(i,h,s,l){return l===void 0&&(l=1),this._locked=!0,this.redGL=i,this.greenGL=h,this.blueGL=s,this.alphaGL=l,this._locked=!1,this.update(!0)},setFromRGB:function(i){return this._locked=!0,this.red=i.r,this.green=i.g,this.blue=i.b,i.hasOwnProperty("a")&&(this.alpha=i.a),this._locked=!1,this.update(!0)},setFromHSV:function(i,h,s){return r(i,h,s,this)},update:function(i){if(i===void 0&&(i=!1),this._locked)return this;var h=this.r,s=this.g,l=this.b,f=this.a;return this._color=v(h,s,l),this._color32=a(h,s,l,f),this._rgba="rgba("+h+","+s+","+l+","+f/255+")",i&&n(h,s,l,this),this},updateHSV:function(){var i=this.r,h=this.g,s=this.b;return n(i,h,s,this),this},clone:function(){return new e(this.r,this.g,this.b,this.a)},gray:function(i){return this.setTo(i,i,i)},random:function(i,h){i===void 0&&(i=0),h===void 0&&(h=255);var s=Math.floor(i+Math.random()*(h-i)),l=Math.floor(i+Math.random()*(h-i)),f=Math.floor(i+Math.random()*(h-i));return this.setTo(s,l,f)},randomGray:function(i,h){i===void 0&&(i=0),h===void 0&&(h=255);var s=Math.floor(i+Math.random()*(h-i));return this.setTo(s,s,s)},saturate:function(i){return this.s+=i/100,this},desaturate:function(i){return this.s-=i/100,this},lighten:function(i){return this.v+=i/100,this},darken:function(i){return this.v-=i/100,this},brighten:function(i){var h=this.r,s=this.g,l=this.b;return h=Math.max(0,Math.min(255,h-Math.round(255*-(i/100)))),s=Math.max(0,Math.min(255,s-Math.round(255*-(i/100)))),l=Math.max(0,Math.min(255,l-Math.round(255*-(i/100)))),this.setTo(h,s,l)},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(i){this.gl[0]=Math.min(Math.abs(i),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(i){this.gl[1]=Math.min(Math.abs(i),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(i){this.gl[2]=Math.min(Math.abs(i),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(i){this.gl[3]=Math.min(Math.abs(i),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(i){i=Math.floor(Math.abs(i)),this.r=Math.min(i,255),this.gl[0]=i/255,this.update(!0)}},green:{get:function(){return this.g},set:function(i){i=Math.floor(Math.abs(i)),this.g=Math.min(i,255),this.gl[1]=i/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(i){i=Math.floor(Math.abs(i)),this.b=Math.min(i,255),this.gl[2]=i/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(i){i=Math.floor(Math.abs(i)),this.a=Math.min(i,255),this.gl[3]=i/255,this.update()}},h:{get:function(){return this._h},set:function(i){this._h=i,r(i,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(i){this._s=i,r(this._h,i,this._v,this)}},v:{get:function(){return this._v},set:function(i){this._v=i,r(this._h,this._s,i,this)}}});c.exports=e},92728:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37589),v=function(o){o===void 0&&(o=1024);var r=[],n=255,e,i=255,h=0,s=0;for(e=0;e<=n;e++)r.push({r:i,g:e,b:s,color:a(i,e,s)});for(h=255,e=n;e>=0;e--)r.push({r:e,g:h,b:s,color:a(e,h,s)});for(i=0,e=0;e<=n;e++,h--)r.push({r:i,g:h,b:e,color:a(i,h,e)});for(h=0,s=255,e=0;e<=n;e++,s--,i++)r.push({r:i,g:h,b:s,color:a(i,h,s)});if(o===1024)return r;var l=[],f=0,u=1024/o;for(e=0;e{/** + */var o=t(37589),v=function(a){a===void 0&&(a=1024);var r=[],n=255,e,i=255,h=0,s=0;for(e=0;e<=n;e++)r.push({r:i,g:e,b:s,color:o(i,e,s)});for(h=255,e=n;e>=0;e--)r.push({r:e,g:h,b:s,color:o(e,h,s)});for(i=0,e=0;e<=n;e++,h--)r.push({r:i,g:h,b:e,color:o(i,h,e)});for(h=0,s=255,e=0;e<=n;e++,s--,i++)r.push({r:i,g:h,b:s,color:o(i,h,s)});if(a===1024)return r;var l=[],f=0,u=1024/a;for(e=0;e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a={r:t>>16&255,g:t>>8&255,b:t&255,a:255};return t>16777215&&(a.a=t>>>24),a};c.exports=m},62957:c=>{/** + */var m=function(t){var o={r:t>>16&255,g:t>>8&255,b:t&255,a:255};return t>16777215&&(o.a=t>>>24),o};c.exports=m},62957:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=t.toString(16);return a.length===1?"0"+a:a};c.exports=m},37589:c=>{/** + */var m=function(t){var o=t.toString(16);return o.length===1?"0"+o:o};c.exports=m},37589:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t<<16|a<<8|v};c.exports=m},1e3:c=>{/** + */var m=function(t,o,v){return t<<16|o<<8|v};c.exports=m},1e3:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return o<<24|t<<16|a<<8|v};c.exports=m},62183:(c,m,t)=>{/** + */var m=function(t,o,v,a){return a<<24|t<<16|o<<8|v};c.exports=m},62183:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40987),v=t(89528),o=function(r,n,e){var i=e,h=e,s=e;if(n!==0){var l=e<.5?e*(1+n):e+n-e*n,f=2*e-l;i=v(f,l,r+1/3),h=v(f,l,r),s=v(f,l,r-1/3)}var u=new a;return u.setGLTo(i,h,s,1)};c.exports=o},27939:(c,m,t)=>{/** + */var o=t(40987),v=t(89528),a=function(r,n,e){var i=e,h=e,s=e;if(n!==0){var l=e<.5?e*(1+n):e+n-e*n,f=2*e-l;i=v(f,l,r+1/3),h=v(f,l,r),s=v(f,l,r-1/3)}var u=new o;return u.setGLTo(i,h,s,1)};c.exports=a},27939:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7537),v=function(o,r){o===void 0&&(o=1),r===void 0&&(r=1);for(var n=[],e=0;e<=359;e++)n.push(a(e/359,o,r));return n};c.exports=v},7537:(c,m,t)=>{/** + */var o=t(7537),v=function(a,r){a===void 0&&(a=1),r===void 0&&(r=1);for(var n=[],e=0;e<=359;e++)n.push(o(e/359,a,r));return n};c.exports=v},7537:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37589);function v(r,n,e,i){var h=(r+n*6)%6,s=Math.min(h,4-h,1);return Math.round(255*(i-i*e*Math.max(0,s)))}var o=function(r,n,e,i){n===void 0&&(n=1),e===void 0&&(e=1);var h=v(5,r,n,e),s=v(3,r,n,e),l=v(1,r,n,e);return i?i.setTo?i.setTo(h,s,l,i.alpha,!0):(i.r=h,i.g=s,i.b=l,i.color=a(h,s,l),i):{r:h,g:s,b:l,color:a(h,s,l)}};c.exports=o},70238:(c,m,t)=>{/** + */var o=t(37589);function v(r,n,e,i){var h=(r+n*6)%6,s=Math.min(h,4-h,1);return Math.round(255*(i-i*e*Math.max(0,s)))}var a=function(r,n,e,i){n===void 0&&(n=1),e===void 0&&(e=1);var h=v(5,r,n,e),s=v(3,r,n,e),l=v(1,r,n,e);return i?i.setTo?i.setTo(h,s,l,i.alpha,!0):(i.r=h,i.g=s,i.b=l,i.color=o(h,s,l),i):{r:h,g:s,b:l,color:o(h,s,l)}};c.exports=a},70238:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40987),v=function(o){var r=new a;o=o.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(s,l,f,u){return l+l+f+f+u+u});var n=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o);if(n){var e=parseInt(n[1],16),i=parseInt(n[2],16),h=parseInt(n[3],16);r.setTo(e,i,h)}return r};c.exports=v},89528:c=>{/** + */var o=t(40987),v=function(a){var r=new o;a=a.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(s,l,f,u){return l+l+f+f+u+u});var n=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);if(n){var e=parseInt(n[1],16),i=parseInt(n[2],16),h=parseInt(n[3],16);r.setTo(e,i,h)}return r};c.exports=v},89528:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return v<0&&(v+=1),v>1&&(v-=1),v<.16666666666666666?t+(a-t)*6*v:v<.5?a:v<.6666666666666666?t+(a-t)*(.6666666666666666-v)*6:t};c.exports=m},30100:(c,m,t)=>{/** + */var m=function(t,o,v){return v<0&&(v+=1),v>1&&(v-=1),v<.16666666666666666?t+(o-t)*6*v:v<.5?o:v<.6666666666666666?t+(o-t)*(.6666666666666666-v)*6:t};c.exports=m},30100:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40987),v=t(90664),o=function(r){var n=v(r);return new a(n.r,n.g,n.b,n.a)};c.exports=o},90664:c=>{/** + */var o=t(40987),v=t(90664),a=function(r){var n=v(r);return new o(n.r,n.g,n.b,n.a)};c.exports=a},90664:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -965,35 +965,35 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(28915),v=function(n,e,i,h,s,l,f,u){f===void 0&&(f=100),u===void 0&&(u=0);var d=u/f;return{r:a(n,h,d),g:a(e,s,d),b:a(i,l,d)}},o=function(n,e,i,h){return i===void 0&&(i=100),h===void 0&&(h=0),v(n.r,n.g,n.b,e.r,e.g,e.b,i,h)},r=function(n,e,i,h,s,l){return s===void 0&&(s=100),l===void 0&&(l=0),v(n.r,n.g,n.b,e,i,h,s,l)};c.exports={RGBWithRGB:v,ColorWithRGB:r,ColorWithColor:o}},68957:(c,m,t)=>{/** + */var o=t(28915),v=function(n,e,i,h,s,l,f,u){f===void 0&&(f=100),u===void 0&&(u=0);var d=u/f;return{r:o(n,h,d),g:o(e,s,d),b:o(i,l,d)}},a=function(n,e,i,h){return i===void 0&&(i=100),h===void 0&&(h=0),v(n.r,n.g,n.b,e.r,e.g,e.b,i,h)},r=function(n,e,i,h,s,l){return s===void 0&&(s=100),l===void 0&&(l=0),v(n.r,n.g,n.b,e,i,h,s,l)};c.exports={RGBWithRGB:v,ColorWithRGB:r,ColorWithColor:a}},68957:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40987),v=function(o){return new a(o.r,o.g,o.b,o.a)};c.exports=v},87388:(c,m,t)=>{/** + */var o=t(40987),v=function(a){return new o(a.r,a.g,a.b,a.a)};c.exports=v},87388:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40987),v=function(o){var r=new a,n=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(o.toLowerCase());if(n){var e=parseInt(n[1],10),i=parseInt(n[2],10),h=parseInt(n[3],10),s=n[4]!==void 0?parseFloat(n[4]):1;r.setTo(e,i,h,s*255)}return r};c.exports=v},87837:c=>{/** + */var o=t(40987),v=function(a){var r=new o,n=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(a.toLowerCase());if(n){var e=parseInt(n[1],10),i=parseInt(n[2],10),h=parseInt(n[3],10),s=n[4]!==void 0?parseFloat(n[4]):1;r.setTo(e,i,h,s*255)}return r};c.exports=v},87837:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){o===void 0&&(o={h:0,s:0,v:0}),t/=255,a/=255,v/=255;var r=Math.min(t,a,v),n=Math.max(t,a,v),e=n-r,i=0,h=n===0?0:e/n,s=n;return n!==r&&(n===t?i=(a-v)/e+(a{/** + */var m=function(t,o,v,a){a===void 0&&(a={h:0,s:0,v:0}),t/=255,o/=255,v/=255;var r=Math.min(t,o,v),n=Math.max(t,o,v),e=n-r,i=0,h=n===0?0:e/n,s=n;return n!==r&&(n===t?i=(o-v)/e+(o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62957),v=function(o,r,n,e,i){return e===void 0&&(e=255),i===void 0&&(i="#"),i==="#"?"#"+((1<<24)+(o<<16)+(r<<8)+n).toString(16).slice(1,7):"0x"+a(e)+a(o)+a(r)+a(n)};c.exports=v},85386:(c,m,t)=>{/** + */var o=t(62957),v=function(a,r,n,e,i){return e===void 0&&(e=255),i===void 0&&(i="#"),i==="#"?"#"+((1<<24)+(a<<16)+(r<<8)+n).toString(16).slice(1,7):"0x"+o(e)+o(a)+o(r)+o(n)};c.exports=v},85386:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(30976),v=t(40987),o=function(r,n){return r===void 0&&(r=0),n===void 0&&(n=255),new v(a(r,n),a(r,n),a(r,n))};c.exports=o},80333:(c,m,t)=>{/** + */var o=t(30976),v=t(40987),a=function(r,n){return r===void 0&&(r=0),n===void 0&&(n=255),new v(o(r,n),o(r,n),o(r,n))};c.exports=a},80333:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70238),v=t(30100),o=t(68957),r=t(87388),n=function(e){var i=typeof e;switch(i){case"string":return e.substr(0,3).toLowerCase()==="rgb"?r(e):a(e);case"number":return v(e);case"object":return o(e)}};c.exports=n},3956:(c,m,t)=>{/** + */var o=t(70238),v=t(30100),a=t(68957),r=t(87388),n=function(e){var i=typeof e;switch(i){case"string":return e.substr(0,3).toLowerCase()==="rgb"?r(e):o(e);case"number":return v(e);case"object":return a(e)}};c.exports=n},3956:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40987);a.ColorSpectrum=t(92728),a.ColorToRGBA=t(91588),a.ComponentToHex=t(62957),a.GetColor=t(37589),a.GetColor32=t(1e3),a.HexStringToColor=t(70238),a.HSLToColor=t(62183),a.HSVColorWheel=t(27939),a.HSVToRGB=t(7537),a.HueToComponent=t(89528),a.IntegerToColor=t(30100),a.IntegerToRGB=t(90664),a.Interpolate=t(13699),a.ObjectToColor=t(68957),a.RandomRGB=t(85386),a.RGBStringToColor=t(87388),a.RGBToHSV=t(87837),a.RGBToString=t(75723),a.ValueToColor=t(80333),c.exports=a},27460:(c,m,t)=>{/** + */var o=t(40987);o.ColorSpectrum=t(92728),o.ColorToRGBA=t(91588),o.ComponentToHex=t(62957),o.GetColor=t(37589),o.GetColor32=t(1e3),o.HexStringToColor=t(70238),o.HSLToColor=t(62183),o.HSVColorWheel=t(27939),o.HSVToRGB=t(7537),o.HueToComponent=t(89528),o.IntegerToColor=t(30100),o.IntegerToRGB=t(90664),o.Interpolate=t(13699),o.ObjectToColor=t(68957),o.RandomRGB=t(85386),o.RGBStringToColor=t(87388),o.RGBToHSV=t(87837),o.RGBToString=t(75723),o.ValueToColor=t(80333),c.exports=o},27460:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1001,11 +1001,11 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(39429),o=new a({initialize:function(n,e,i,h,s,l){e||(e=n.sys.make.image({x:i,y:h,key:s,frame:l,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}});v.register("bitmapMask",function(r,n,e,i,h){return new o(this.scene,r,n,e,i,h)}),c.exports=o},80661:(c,m,t)=>{/** + */var o=t(83419),v=t(39429),a=new o({initialize:function(n,e,i,h,s,l){e||(e=n.sys.make.image({x:i,y:h,key:s,frame:l,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}});v.register("bitmapMask",function(r,n,e,i,h){return new a(this.scene,r,n,e,i,h)}),c.exports=a},80661:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n){this.geometryMask=n,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(o){return this.geometryMask=o,this},setInvertAlpha:function(o){return o===void 0&&(o=!0),this.invertAlpha=o,this},preRenderWebGL:function(o,r,n){var e=o.gl;o.flush(),o.maskStack.length===0&&(e.enable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),o.maskCount=0),o.currentCameraMask.mask!==this&&(o.currentMask.mask=this),o.maskStack.push({mask:this,camera:n}),this.applyStencil(o,n,!0),o.maskCount++},applyStencil:function(o,r,n){var e=o.gl,i=this.geometryMask,h=o.maskCount,s=255;e.colorMask(!1,!1,!1,!1),n?(e.stencilFunc(e.EQUAL,h,s),e.stencilOp(e.KEEP,e.KEEP,e.INCR),h++):(e.stencilFunc(e.EQUAL,h+1,s),e.stencilOp(e.KEEP,e.KEEP,e.DECR)),this.level=h,i.renderWebGL(o,i,r),o.flush(),e.colorMask(!0,!0,!0,!0),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),this.invertAlpha?e.stencilFunc(e.NOTEQUAL,h,s):e.stencilFunc(e.EQUAL,h,s)},postRenderWebGL:function(o){var r=o.gl;o.maskStack.pop(),o.maskCount--,o.flush();var n=o.currentMask;if(o.maskStack.length===0)n.mask=null,r.disable(r.STENCIL_TEST);else{var e=o.maskStack[o.maskStack.length-1];e.mask.applyStencil(o,e.camera,!1),o.currentCameraMask.mask!==e.mask?(n.mask=e.mask,n.camera=e.camera):n.mask=null}},preRenderCanvas:function(o,r,n){var e=this.geometryMask;o.currentContext.save(),e.renderCanvas(o,e,n,null,null,!0),o.currentContext.clip()},postRenderCanvas:function(o){o.currentContext.restore()},destroy:function(){this.geometryMask=null}});c.exports=v},69781:(c,m,t)=>{/** + */var o=t(83419),v=new o({initialize:function(r,n){this.geometryMask=n,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(a){return this.geometryMask=a,this},setInvertAlpha:function(a){return a===void 0&&(a=!0),this.invertAlpha=a,this},preRenderWebGL:function(a,r,n){var e=a.gl;a.flush(),a.maskStack.length===0&&(e.enable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),a.maskCount=0),a.currentCameraMask.mask!==this&&(a.currentMask.mask=this),a.maskStack.push({mask:this,camera:n}),this.applyStencil(a,n,!0),a.maskCount++},applyStencil:function(a,r,n){var e=a.gl,i=this.geometryMask,h=a.maskCount,s=255;e.colorMask(!1,!1,!1,!1),n?(e.stencilFunc(e.EQUAL,h,s),e.stencilOp(e.KEEP,e.KEEP,e.INCR),h++):(e.stencilFunc(e.EQUAL,h+1,s),e.stencilOp(e.KEEP,e.KEEP,e.DECR)),this.level=h,i.renderWebGL(a,i,r),a.flush(),e.colorMask(!0,!0,!0,!0),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),this.invertAlpha?e.stencilFunc(e.NOTEQUAL,h,s):e.stencilFunc(e.EQUAL,h,s)},postRenderWebGL:function(a){var r=a.gl;a.maskStack.pop(),a.maskCount--,a.flush();var n=a.currentMask;if(a.maskStack.length===0)n.mask=null,r.disable(r.STENCIL_TEST);else{var e=a.maskStack[a.maskStack.length-1];e.mask.applyStencil(a,e.camera,!1),a.currentCameraMask.mask!==e.mask?(n.mask=e.mask,n.camera=e.camera):n.mask=null}},preRenderCanvas:function(a,r,n){var e=this.geometryMask;a.currentContext.save(),e.renderCanvas(a,e,n,null,null,!0),a.currentContext.clip()},postRenderCanvas:function(a){a.currentContext.restore()},destroy:function(){this.geometryMask=null}});c.exports=v},69781:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1013,37 +1013,37 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e,i){(!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(` + */var o=t(83419),v=new o({initialize:function(r,n,e,i){(!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(` `)),i===void 0&&(i=null),this.key=r,this.fragmentSrc=n,this.vertexSrc=e,this.uniforms=i}});c.exports=v},40366:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v;if(a)typeof a=="string"?v=document.getElementById(a):typeof a=="object"&&a.nodeType===1&&(v=a);else if(t.parentElement||a===null)return t;return v||(v=document.body),v.appendChild(t),t};c.exports=m},83719:(c,m,t)=>{/** + */var m=function(t,o){var v;if(o)typeof o=="string"?v=document.getElementById(o):typeof o=="object"&&o.nodeType===1&&(v=o);else if(t.parentElement||o===null)return t;return v||(v=document.body),v.appendChild(t),t};c.exports=m},83719:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40366),v=function(o){var r=o.config;if(!(!r.parent||!r.domCreateContainer)){var n=document.createElement("div");n.style.cssText=["display: block;","width: "+o.scale.width+"px;","height: "+o.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+r.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),o.domContainer=n,a(n,r.parent)}};c.exports=v},57264:(c,m,t)=>{/** + */var o=t(40366),v=function(a){var r=a.config;if(!(!r.parent||!r.domCreateContainer)){var n=document.createElement("div");n.style.cssText=["display: block;","width: "+a.scale.width+"px;","height: "+a.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+r.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),a.domContainer=n,o(n,r.parent)}};c.exports=v},57264:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25892),v=function(o){if(document.readyState==="complete"||document.readyState==="interactive"){o();return}var r=function(){document.removeEventListener("deviceready",r,!0),document.removeEventListener("DOMContentLoaded",r,!0),window.removeEventListener("load",r,!0),o()};document.body?a.cordova?document.addEventListener("deviceready",r,!1):(document.addEventListener("DOMContentLoaded",r,!0),window.addEventListener("load",r,!0)):window.setTimeout(r,20)};c.exports=v},57811:c=>{/** + */var o=t(25892),v=function(a){if(document.readyState==="complete"||document.readyState==="interactive"){a();return}var r=function(){document.removeEventListener("deviceready",r,!0),document.removeEventListener("DOMContentLoaded",r,!0),window.removeEventListener("load",r,!0),a()};document.body?o.cordova?document.addEventListener("deviceready",r,!1):(document.addEventListener("DOMContentLoaded",r,!0),window.addEventListener("load",r,!0)):window.setTimeout(r,20)};c.exports=v},57811:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){if(!t)return window.innerHeight;var a=Math.abs(window.orientation),v={w:0,h:0},o=document.createElement("div");return o.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(o),v.w=a===90?o.offsetHeight:window.innerWidth,v.h=a===90?window.innerWidth:o.offsetHeight,document.documentElement.removeChild(o),o=null,Math.abs(window.orientation)!==90?v.h:v.w};c.exports=m},45818:(c,m,t)=>{/** + */var m=function(t){if(!t)return window.innerHeight;var o=Math.abs(window.orientation),v={w:0,h:0},a=document.createElement("div");return a.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(a),v.w=o===90?a.offsetHeight:window.innerWidth,v.h=o===90?window.innerWidth:a.offsetHeight,document.documentElement.removeChild(a),a=null,Math.abs(window.orientation)!==90?v.h:v.w};c.exports=m},45818:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(13560),v=function(o,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?a.ORIENTATION.PORTRAIT:a.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return a.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return a.ORIENTATION.LANDSCAPE}else return r>o?a.ORIENTATION.PORTRAIT:a.ORIENTATION.LANDSCAPE};c.exports=v},74403:c=>{/** + */var o=t(13560),v=function(a,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?o.ORIENTATION.PORTRAIT:o.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return o.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return o.ORIENTATION.LANDSCAPE}else return r>a?o.ORIENTATION.PORTRAIT:o.ORIENTATION.LANDSCAPE};c.exports=v},74403:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a;return t!==""&&(typeof t=="string"?a=document.getElementById(t):t&&t.nodeType===1&&(a=t)),a||(a=document.body),a};c.exports=m},56836:c=>{/** + */var m=function(t){var o;return t!==""&&(typeof t=="string"?o=document.getElementById(t):t&&t.nodeType===1&&(o=t)),o||(o=document.body),o};c.exports=m},56836:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a="";try{if(window.DOMParser){var v=new DOMParser;a=v.parseFromString(t,"text/xml")}else a=new ActiveXObject("Microsoft.XMLDOM"),a.loadXML(t)}catch{a=null}return!a||!a.documentElement||a.getElementsByTagName("parsererror").length?null:a};c.exports=m},35846:c=>{/** + */var m=function(t){var o="";try{if(window.DOMParser){var v=new DOMParser;o=v.parseFromString(t,"text/xml")}else o=new ActiveXObject("Microsoft.XMLDOM"),o.loadXML(t)}catch{o=null}return!o||!o.documentElement||o.getElementsByTagName("parsererror").length?null:o};c.exports=m},35846:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1051,15 +1051,15 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(29747),o=new a({initialize:function(){this.isRunning=!1,this.callback=v,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var n=this;this.step=function e(i){n.callback(i),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=v}});c.exports=o},84902:(c,m,t)=>{/** + */var o=t(83419),v=t(29747),a=new o({initialize:function(){this.isRunning=!1,this.callback=v,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var n=this;this.step=function e(i){n.callback(i),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=v}});c.exports=a},84902:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={AddToDOM:t(40366),DOMContentLoaded:t(57264),GetInnerHeight:t(57811),GetScreenOrientation:t(45818),GetTarget:t(74403),ParseXML:t(56836),RemoveFromDOM:t(35846),RequestAnimationFrame:t(43092)};c.exports=a},47565:(c,m,t)=>{/** + */var o={AddToDOM:t(40366),DOMContentLoaded:t(57264),GetInnerHeight:t(57811),GetScreenOrientation:t(45818),GetTarget:t(74403),ParseXML:t(56836),RemoveFromDOM:t(35846),RequestAnimationFrame:t(43092)};c.exports=o},47565:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(37277),r=new a({Extends:v,initialize:function(){v.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});o.register("EventEmitter",r,"events"),c.exports=r},93055:(c,m,t)=>{/** + */var o=t(83419),v=t(50792),a=t(37277),r=new o({Extends:v,initialize:function(){v.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});a.register("EventEmitter",r,"events"),c.exports=r},93055:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1067,63 +1067,63 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i){i===void 0&&(i=1),v.call(this,o.BARREL,e),this.amount=i}});c.exports=r},32251:(c,m,t)=>{/** + */var o=t(83419),v=t(72898),a=t(14811),r=new o({Extends:v,initialize:function(e,i){i===void 0&&(i=1),v.call(this,a.BARREL,e),this.amount=i}});c.exports=r},32251:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l,f,u){h===void 0&&(h=1),s===void 0&&(s=1),l===void 0&&(l=1),f===void 0&&(f=1),u===void 0&&(u=4),v.call(this,o.BLOOM,e),this.steps=u,this.offsetX=h,this.offsetY=s,this.blurStrength=l,this.strength=f,this.glcolor=[1,1,1],i!=null&&(this.color=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}}});c.exports=r},9047:(c,m,t)=>{/** + */var o=t(83419),v=t(72898),a=t(14811),r=new o({Extends:v,initialize:function(e,i,h,s,l,f,u){h===void 0&&(h=1),s===void 0&&(s=1),l===void 0&&(l=1),f===void 0&&(f=1),u===void 0&&(u=4),v.call(this,a.BLOOM,e),this.steps=u,this.offsetX=h,this.offsetY=s,this.blurStrength=l,this.strength=f,this.glcolor=[1,1,1],i!=null&&(this.color=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}}});c.exports=r},9047:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l,f,u){i===void 0&&(i=0),h===void 0&&(h=2),s===void 0&&(s=2),l===void 0&&(l=1),u===void 0&&(u=4),v.call(this,o.BLUR,e),this.quality=i,this.x=h,this.y=s,this.steps=u,this.strength=l,this.glcolor=[1,1,1],f!=null&&(this.color=f)},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}}});c.exports=r},27885:(c,m,t)=>{/** + */var o=t(83419),v=t(72898),a=t(14811),r=new o({Extends:v,initialize:function(e,i,h,s,l,f,u){i===void 0&&(i=0),h===void 0&&(h=2),s===void 0&&(s=2),l===void 0&&(l=1),u===void 0&&(u=4),v.call(this,a.BLUR,e),this.quality=i,this.x=h,this.y=s,this.steps=u,this.strength=l,this.glcolor=[1,1,1],f!=null&&(this.color=f)},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}}});c.exports=r},27885:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l,f,u,d){i===void 0&&(i=.5),h===void 0&&(h=1),s===void 0&&(s=.2),l===void 0&&(l=!1),f===void 0&&(f=1),u===void 0&&(u=1),d===void 0&&(d=1),v.call(this,o.BOKEH,e),this.radius=i,this.amount=h,this.contrast=s,this.isTiltShift=l,this.strength=d,this.blurX=f,this.blurY=u}});c.exports=r},12578:(c,m,t)=>{/** + */var o=t(83419),v=t(72898),a=t(14811),r=new o({Extends:v,initialize:function(e,i,h,s,l,f,u,d){i===void 0&&(i=.5),h===void 0&&(h=1),s===void 0&&(s=.2),l===void 0&&(l=!1),f===void 0&&(f=1),u===void 0&&(u=1),d===void 0&&(d=1),v.call(this,a.BOKEH,e),this.radius=i,this.amount=h,this.contrast=s,this.isTiltShift=l,this.strength=d,this.blurX=f,this.blurY=u}});c.exports=r},12578:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l,f){i===void 0&&(i=8),l===void 0&&(l=1),f===void 0&&(f=.005),v.call(this,o.CIRCLE,e),this.scale=l,this.feather=f,this.thickness=i,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],h!=null&&(this.color=h),s!=null&&(this.backgroundColor=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}},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}}});c.exports=r},15802:(c,m,t)=>{/** + */var o=t(83419),v=t(72898),a=t(14811),r=new o({Extends:v,initialize:function(e,i,h,s,l,f){i===void 0&&(i=8),l===void 0&&(l=1),f===void 0&&(f=.005),v.call(this,a.CIRCLE,e),this.scale=l,this.feather=f,this.thickness=i,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],h!=null&&(this.color=h),s!=null&&(this.backgroundColor=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}},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}}});c.exports=r},15802:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(89422),o=t(14811),r=new a({Extends:v,initialize:function(e){v.call(this),this.type=o.COLOR_MATRIX,this.gameObject=e,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});c.exports=r},72898:(c,m,t)=>{/** + */var o=t(83419),v=t(89422),a=t(14811),r=new o({Extends:v,initialize:function(e){v.call(this),this.type=a.COLOR_MATRIX,this.gameObject=e,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});c.exports=r},72898:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n){this.type=r,this.gameObject=n,this.active=!0},setActive:function(o){return this.active=o,this},destroy:function(){this.gameObject=null,this.active=!1}});c.exports=v},44553:(c,m,t)=>{/** + */var o=t(83419),v=new o({initialize:function(r,n){this.type=r,this.gameObject=n,this.active=!0},setActive:function(a){return this.active=a,this},destroy:function(){this.gameObject=null,this.active=!1}});c.exports=v},44553:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s){i===void 0&&(i="__WHITE"),h===void 0&&(h=.005),s===void 0&&(s=.005),v.call(this,o.DISPLACEMENT,e),this.x=h,this.y=s,this.glTexture,this.setTexture(i)},setTexture:function(n){var e=this.gameObject.scene.sys.textures.getFrame(n);return e&&(this.glTexture=e.glTexture),this}});c.exports=r},68531:(c,m,t)=>{/** + */var o=t(83419),v=t(72898),a=t(14811),r=new o({Extends:v,initialize:function(e,i,h,s){i===void 0&&(i="__WHITE"),h===void 0&&(h=.005),s===void 0&&(s=.005),v.call(this,a.DISPLACEMENT,e),this.x=h,this.y=s,this.glTexture,this.setTexture(i)},setTexture:function(n){var e=this.gameObject.scene.sys.textures.getFrame(n);return e&&(this.glTexture=e.glTexture),this}});c.exports=r},68531:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l){h===void 0&&(h=4),s===void 0&&(s=0),l===void 0&&(l=!1),v.call(this,o.GLOW,e),this.outerStrength=h,this.innerStrength=s,this.knockout=l,this.glcolor=[1,1,1,1],i!==void 0&&(this.color=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}}});c.exports=r},37102:(c,m,t)=>{/** + */var o=t(83419),v=t(72898),a=t(14811),r=new o({Extends:v,initialize:function(e,i,h,s,l){h===void 0&&(h=4),s===void 0&&(s=0),l===void 0&&(l=!1),v.call(this,a.GLOW,e),this.outerStrength=h,this.innerStrength=s,this.knockout=l,this.glcolor=[1,1,1,1],i!==void 0&&(this.color=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}}});c.exports=r},37102:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l,f,u,d,p){s===void 0&&(s=.2),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=1),p===void 0&&(p=0),v.call(this,o.GRADIENT,e),this.alpha=s,this.size=p,this.fromX=l,this.fromY=f,this.toX=u,this.toY=d,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],i!=null&&(this.color1=i),h!=null&&(this.color2=h)},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}}});c.exports=r},86886:(c,m,t)=>{/** + */var o=t(83419),v=t(72898),a=t(14811),r=new o({Extends:v,initialize:function(e,i,h,s,l,f,u,d,p){s===void 0&&(s=.2),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=1),p===void 0&&(p=0),v.call(this,a.GRADIENT,e),this.alpha=s,this.size=p,this.fromX=l,this.fromY=f,this.toX=u,this.toY=d,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],i!=null&&(this.color1=i),h!=null&&(this.color2=h)},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}}});c.exports=r},86886:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i){i===void 0&&(i=1),v.call(this,o.PIXELATE,e),this.amount=i}});c.exports=r},92322:(c,m,t)=>{/** + */var o=t(83419),v=t(72898),a=t(14811),r=new o({Extends:v,initialize:function(e,i){i===void 0&&(i=1),v.call(this,a.PIXELATE,e),this.amount=i}});c.exports=r},92322:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l,f,u,d){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=.1),l===void 0&&(l=1),u===void 0&&(u=6),d===void 0&&(d=1),v.call(this,o.SHADOW,e),this.x=i,this.y=h,this.decay=s,this.power=l,this.glcolor=[0,0,0,1],this.samples=u,this.intensity=d,f!==void 0&&(this.color=f)},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}}});c.exports=r},39563:(c,m,t)=>{/** + */var o=t(83419),v=t(72898),a=t(14811),r=new o({Extends:v,initialize:function(e,i,h,s,l,f,u,d){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=.1),l===void 0&&(l=1),u===void 0&&(u=6),d===void 0&&(d=1),v.call(this,a.SHADOW,e),this.x=i,this.y=h,this.decay=s,this.power=l,this.glcolor=[0,0,0,1],this.samples=u,this.intensity=d,f!==void 0&&(this.color=f)},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}}});c.exports=r},39563:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l){i===void 0&&(i=.5),h===void 0&&(h=.5),s===void 0&&(s=3),l===void 0&&(l=!1),v.call(this,o.SHINE,e),this.speed=i,this.lineWidth=h,this.gradient=s,this.reveal=l}});c.exports=r},56448:(c,m,t)=>{/** + */var o=t(83419),v=t(72898),a=t(14811),r=new o({Extends:v,initialize:function(e,i,h,s,l){i===void 0&&(i=.5),h===void 0&&(h=.5),s===void 0&&(s=3),l===void 0&&(l=!1),v.call(this,a.SHINE,e),this.speed=i,this.lineWidth=h,this.gradient=s,this.reveal=l}});c.exports=r},56448:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l){i===void 0&&(i=.5),h===void 0&&(h=.5),s===void 0&&(s=.5),l===void 0&&(l=.5),v.call(this,o.VIGNETTE,e),this.x=i,this.y=h,this.radius=s,this.strength=l}});c.exports=r},38433:(c,m,t)=>{/** + */var o=t(83419),v=t(72898),a=t(14811),r=new o({Extends:v,initialize:function(e,i,h,s,l){i===void 0&&(i=.5),h===void 0&&(h=.5),s===void 0&&(s=.5),l===void 0&&(l=.5),v.call(this,a.VIGNETTE,e),this.x=i,this.y=h,this.radius=s,this.strength=l}});c.exports=r},38433:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l){i===void 0&&(i=.1),h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=!1),v.call(this,o.WIPE,e),this.progress=0,this.wipeWidth=i,this.direction=h,this.axis=s,this.reveal=l}});c.exports=r},14811:c=>{/** + */var o=t(83419),v=t(72898),a=t(14811),r=new o({Extends:v,initialize:function(e,i,h,s,l){i===void 0&&(i=.1),h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=!1),v.call(this,a.WIPE,e),this.progress=0,this.wipeWidth=i,this.direction=h,this.axis=s,this.reveal=l}});c.exports=r},14811:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1131,64 +1131,64 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79291),v=t(14811),o={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)};o=a(!1,o,v),c.exports=o},25305:(c,m,t)=>{/** + */var o=t(79291),v=t(14811),a={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)};a=o(!1,a,v),c.exports=a},25305:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10312),v=t(23568),o=function(r,n,e){n.x=v(e,"x",0),n.y=v(e,"y",0),n.depth=v(e,"depth",0),n.flipX=v(e,"flipX",!1),n.flipY=v(e,"flipY",!1);var i=v(e,"scale",null);typeof i=="number"?n.setScale(i):i!==null&&(n.scaleX=v(i,"x",1),n.scaleY=v(i,"y",1));var h=v(e,"scrollFactor",null);typeof h=="number"?n.setScrollFactor(h):h!==null&&(n.scrollFactorX=v(h,"x",1),n.scrollFactorY=v(h,"y",1)),n.rotation=v(e,"rotation",0);var s=v(e,"angle",null);s!==null&&(n.angle=s),n.alpha=v(e,"alpha",1);var l=v(e,"origin",null);if(typeof l=="number")n.setOrigin(l);else if(l!==null){var f=v(l,"x",.5),u=v(l,"y",.5);n.setOrigin(f,u)}n.blendMode=v(e,"blendMode",a.NORMAL),n.visible=v(e,"visible",!0);var d=v(e,"add",!0);return d&&r.sys.displayList.add(n),n.preUpdate&&r.sys.updateList.add(n),n};c.exports=o},13059:(c,m,t)=>{/** + */var o=t(10312),v=t(23568),a=function(r,n,e){n.x=v(e,"x",0),n.y=v(e,"y",0),n.depth=v(e,"depth",0),n.flipX=v(e,"flipX",!1),n.flipY=v(e,"flipY",!1);var i=v(e,"scale",null);typeof i=="number"?n.setScale(i):i!==null&&(n.scaleX=v(i,"x",1),n.scaleY=v(i,"y",1));var h=v(e,"scrollFactor",null);typeof h=="number"?n.setScrollFactor(h):h!==null&&(n.scrollFactorX=v(h,"x",1),n.scrollFactorY=v(h,"y",1)),n.rotation=v(e,"rotation",0);var s=v(e,"angle",null);s!==null&&(n.angle=s),n.alpha=v(e,"alpha",1);var l=v(e,"origin",null);if(typeof l=="number")n.setOrigin(l);else if(l!==null){var f=v(l,"x",.5),u=v(l,"y",.5);n.setOrigin(f,u)}n.blendMode=v(e,"blendMode",o.NORMAL),n.visible=v(e,"visible",!0);var d=v(e,"add",!0);return d&&r.sys.displayList.add(n),n.preUpdate&&r.sys.updateList.add(n),n};c.exports=a},13059:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23568),v=function(o,r){var n=a(r,"anims",null);if(n===null)return o;if(typeof n=="string")o.anims.play(n);else if(typeof n=="object"){var e=o.anims,i=a(n,"key",void 0);if(i){var h=a(n,"startFrame",void 0),s=a(n,"delay",0),l=a(n,"repeat",0),f=a(n,"repeatDelay",0),u=a(n,"yoyo",!1),d=a(n,"play",!1),p=a(n,"delayedPlay",0),g={key:i,delay:s,repeat:l,repeatDelay:f,yoyo:u,startFrame:h};d?e.play(g):p>0?e.playAfterDelay(g,p):e.load(g)}}return o};c.exports=v},8050:(c,m,t)=>{/** + */var o=t(23568),v=function(a,r){var n=o(r,"anims",null);if(n===null)return a;if(typeof n=="string")a.anims.play(n);else if(typeof n=="object"){var e=a.anims,i=o(n,"key",void 0);if(i){var h=o(n,"startFrame",void 0),s=o(n,"delay",0),l=o(n,"repeat",0),f=o(n,"repeatDelay",0),u=o(n,"yoyo",!1),d=o(n,"play",!1),p=o(n,"delayedPlay",0),g={key:i,delay:s,repeat:l,repeatDelay:f,yoyo:u,startFrame:h};d?e.play(g):p>0?e.playAfterDelay(g,p):e.load(g)}}return a};c.exports=v},8050:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(73162),o=t(37277),r=t(51708),n=t(44594),e=t(19186),i=new a({Extends:v,initialize:function(s){v.call(this,s),this.sortChildrenFlag=!1,this.scene=s,this.systems=s.sys,this.events=s.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(h){h.displayList&&h.displayList!==this&&h.removeFromDisplayList(),h.parentContainer&&h.parentContainer.remove(h),h.displayList||(this.queueDepthSort(),h.displayList=this,h.emit(r.ADDED_TO_SCENE,h,this.scene),this.events.emit(n.ADDED_TO_SCENE,h,this.scene))},removeChildCallback:function(h){this.queueDepthSort(),h.displayList=null,h.emit(r.REMOVED_FROM_SCENE,h,this.scene),this.events.emit(n.REMOVED_FROM_SCENE,h,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(h,s){return h._depth-s._depth},getChildren:function(){return this.list},shutdown:function(){for(var h=this.list;h.length;)h[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}});o.register("DisplayList",i,"displayList"),c.exports=i},95643:(c,m,t)=>{/** + */var o=t(83419),v=t(73162),a=t(37277),r=t(51708),n=t(44594),e=t(19186),i=new o({Extends:v,initialize:function(s){v.call(this,s),this.sortChildrenFlag=!1,this.scene=s,this.systems=s.sys,this.events=s.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(h){h.displayList&&h.displayList!==this&&h.removeFromDisplayList(),h.parentContainer&&h.parentContainer.remove(h),h.displayList||(this.queueDepthSort(),h.displayList=this,h.emit(r.ADDED_TO_SCENE,h,this.scene),this.events.emit(n.ADDED_TO_SCENE,h,this.scene))},removeChildCallback:function(h){this.queueDepthSort(),h.displayList=null,h.emit(r.REMOVED_FROM_SCENE,h,this.scene),this.events.emit(n.REMOVED_FROM_SCENE,h,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(h,s){return h._depth-s._depth},getChildren:function(){return this.list},shutdown:function(){for(var h=this.list;h.length;)h[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}});a.register("DisplayList",i,"displayList"),c.exports=i},95643:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(53774),o=t(45893),r=t(50792),n=t(51708),e=t(44594),i=new a({Extends:r,initialize:function(s,l){r.call(this),this.scene=s,this.displayList=null,this.type=l,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),s.sys.queueDepthSort()},setActive:function(h){return this.active=h,this},setName:function(h){return this.name=h,this},setState:function(h){return this.state=h,this},setDataEnabled:function(){return this.data||(this.data=new o(this)),this},setData:function(h,s){return this.data||(this.data=new o(this)),this.data.set(h,s),this},incData:function(h,s){return this.data||(this.data=new o(this)),this.data.inc(h,s),this},toggleData:function(h){return this.data||(this.data=new o(this)),this.data.toggle(h),this},getData:function(h){return this.data||(this.data=new o(this)),this.data.get(h)},setInteractive:function(h,s,l){return this.scene.sys.input.enable(this,h,s,l),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return v(this)},willRender:function(h){var s=this.displayList&&this.displayList.active?this.displayList.willRender(h):!0;return!(!s||i.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&h.id)},getIndexList:function(){for(var h=this,s=this.parentContainer,l=[];s&&(l.unshift(s.getIndex(h)),h=s,s.parentContainer);)s=s.parentContainer;return this.displayList?l.unshift(this.displayList.getIndex(h)):l.unshift(this.scene.sys.displayList.getIndex(h)),l},addToDisplayList:function(h){return h===void 0&&(h=this.scene.sys.displayList),this.displayList&&this.displayList!==h&&this.removeFromDisplayList(),h.exists(this)||(this.displayList=h,h.add(this,!0),h.queueDepthSort(),this.emit(n.ADDED_TO_SCENE,this,this.scene),h.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 h=this.displayList||this.scene.sys.displayList;return h&&h.exists(this)&&(h.remove(this,!0),h.queueDepthSort(),this.displayList=null,this.emit(n.REMOVED_FROM_SCENE,this,this.scene),h.events.emit(e.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(h){!this.scene||this.ignoreDestroy||(h===void 0&&(h=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(n.DESTROY,this,h),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)}});i.RENDER_MASK=15,c.exports=i},44603:(c,m,t)=>{/** + */var o=t(83419),v=t(53774),a=t(45893),r=t(50792),n=t(51708),e=t(44594),i=new o({Extends:r,initialize:function(s,l){r.call(this),this.scene=s,this.displayList=null,this.type=l,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),s.sys.queueDepthSort()},setActive:function(h){return this.active=h,this},setName:function(h){return this.name=h,this},setState:function(h){return this.state=h,this},setDataEnabled:function(){return this.data||(this.data=new a(this)),this},setData:function(h,s){return this.data||(this.data=new a(this)),this.data.set(h,s),this},incData:function(h,s){return this.data||(this.data=new a(this)),this.data.inc(h,s),this},toggleData:function(h){return this.data||(this.data=new a(this)),this.data.toggle(h),this},getData:function(h){return this.data||(this.data=new a(this)),this.data.get(h)},setInteractive:function(h,s,l){return this.scene.sys.input.enable(this,h,s,l),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return v(this)},willRender:function(h){var s=this.displayList&&this.displayList.active?this.displayList.willRender(h):!0;return!(!s||i.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&h.id)},getIndexList:function(){for(var h=this,s=this.parentContainer,l=[];s&&(l.unshift(s.getIndex(h)),h=s,s.parentContainer);)s=s.parentContainer;return this.displayList?l.unshift(this.displayList.getIndex(h)):l.unshift(this.scene.sys.displayList.getIndex(h)),l},addToDisplayList:function(h){return h===void 0&&(h=this.scene.sys.displayList),this.displayList&&this.displayList!==h&&this.removeFromDisplayList(),h.exists(this)||(this.displayList=h,h.add(this,!0),h.queueDepthSort(),this.emit(n.ADDED_TO_SCENE,this,this.scene),h.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 h=this.displayList||this.scene.sys.displayList;return h&&h.exists(this)&&(h.remove(this,!0),h.queueDepthSort(),this.displayList=null,this.emit(n.REMOVED_FROM_SCENE,this,this.scene),h.events.emit(e.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(h){!this.scene||this.ignoreDestroy||(h===void 0&&(h=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(n.DESTROY,this,h),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)}});i.RENDER_MASK=15,c.exports=i},44603:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(37277),o=t(44594),r=new a({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(o.BOOT,this.boot,this),this.events.on(o.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});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]},v.register("GameObjectCreator",r,"make"),c.exports=r},39429:(c,m,t)=>{/** + */var o=t(83419),v=t(37277),a=t(44594),r=new o({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(a.BOOT,this.boot,this),this.events.on(a.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(a.DESTROY,this.destroy,this)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(a.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]},v.register("GameObjectCreator",r,"make"),c.exports=r},39429:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(37277),o=t(44594),r=new a({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(o.BOOT,this.boot,this),this.events.on(o.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},existing:function(n){return(n.renderCanvas||n.renderWebGL)&&this.displayList.add(n),n.preUpdate&&this.updateList.add(n),n},shutdown:function(){this.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});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]},v.register("GameObjectFactory",r,"add"),c.exports=r},91296:(c,m,t)=>{/** + */var o=t(83419),v=t(37277),a=t(44594),r=new o({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(a.BOOT,this.boot,this),this.events.on(a.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(a.DESTROY,this.destroy,this)},start:function(){this.events.once(a.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(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(a.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]},v.register("GameObjectFactory",r,"add"),c.exports=r},91296:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(61340),v=new a,o=new a,r=new a,n={camera:v,sprite:o,calc:r},e=function(i,h,s){var l=v,f=o,u=r;return f.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),l.copyFrom(h.matrix),s?(l.multiplyWithOffset(s,-h.scrollX*i.scrollFactorX,-h.scrollY*i.scrollFactorY),f.e=i.x,f.f=i.y):(f.e-=h.scrollX*i.scrollFactorX,f.f-=h.scrollY*i.scrollFactorY),l.multiply(f,u),n};c.exports=e},45027:(c,m,t)=>{/** + */var o=t(61340),v=new o,a=new o,r=new o,n={camera:v,sprite:a,calc:r},e=function(i,h,s){var l=v,f=a,u=r;return f.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),l.copyFrom(h.matrix),s?(l.multiplyWithOffset(s,-h.scrollX*i.scrollFactorX,-h.scrollY*i.scrollFactorY),f.e=i.x,f.f=i.y):(f.e-=h.scrollX*i.scrollFactorX,f.f-=h.scrollY*i.scrollFactorY),l.multiply(f,u),n};c.exports=e},45027:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(25774),o=t(37277),r=t(44594),n=new a({Extends:v,initialize:function(i){v.call(this),this.checkQueue=!0,this.scene=i,this.systems=i.sys,i.sys.events.once(r.BOOT,this.boot,this),i.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,i){for(var h=this._active,s=h.length,l=0;l{/** + */var o=t(83419),v=t(25774),a=t(37277),r=t(44594),n=new o({Extends:v,initialize:function(i){v.call(this),this.checkQueue=!0,this.scene=i,this.systems=i.sys,i.sys.events.once(r.BOOT,this.boot,this),i.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,i){for(var h=this._active,s=h.length,l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r,n,e,i,h,s,l,f,u,d,p){var g=v.x-a.displayOriginX+r,y=v.y-a.displayOriginY+n,x=g+v.w,T=y+v.h,C=e.getXRound(g,y,i),M=e.getYRound(g,y,i),w=e.getXRound(g,T,i),L=e.getYRound(g,T,i),F=e.getXRound(x,T,i),O=e.getYRound(x,T,i),N=e.getXRound(x,y,i),G=e.getYRound(x,y,i);t.batchQuad(a,C,M,w,L,F,O,N,G,o.u0,o.v0,o.u1,o.v1,h,s,l,f,u,d,p)};c.exports=m},53048:c=>{/** + */var m=function(t,o,v,a,r,n,e,i,h,s,l,f,u,d,p){var g=v.x-o.displayOriginX+r,y=v.y-o.displayOriginY+n,x=g+v.w,C=y+v.h,P=e.getXRound(g,y,i),M=e.getYRound(g,y,i),w=e.getXRound(g,C,i),I=e.getYRound(g,C,i),L=e.getXRound(x,C,i),B=e.getYRound(x,C,i),N=e.getXRound(x,y,i),G=e.getYRound(x,y,i);t.batchQuad(o,P,M,w,I,L,B,N,G,a.u0,a.v0,a.u1,a.v1,h,s,l,f,u,d,p)};c.exports=m},53048:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){if(v===void 0&&(v=!1),o===void 0)return o={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},o;var r=t.text,n=r.length,e=t.maxWidth,i=t.wordWrapCharCode,h=Number.MAX_VALUE,s=Number.MAX_VALUE,l=0,f=0,u=t.fontData.chars,d=t.fontData.lineHeight,p=t.letterSpacing,g=t.lineSpacing,y=0,x=0,T=0,C=null,M=t._align,w=0,L=0,F=t.fontSize/t.fontData.size,O=F*t.scaleX,N=F*t.scaleY,G=null,V=0,K=[],$=Number.MAX_VALUE,J=0,X=0,Y=0,D,z=[],W=[],H=null;if(e>0){for(D=0;De||vt>e?(et.push(st.i-1),st.cr?(et.push(st.i+st.word.length),k=0,Q=null):Q=st):st.cr&&(et.push(st.i+st.word.length),k=0,Q=null)}var Pt=function(Zt,le,fe){return Zt.substr(0,le)+fe+Zt.substr(le+1)};for(D=et.length-1;D>=0;D--)r=Pt(r,et[D],` -`);o.wrappedText=r,n=r.length,z=[],H=null}var Ct=0;for(D=0;DJ&&(J=Y),Y<$&&($=Y),X++,Y=0;continue}if(C=u[T],!!C){if(w=y,L=x,G!==null){var Et=C.kerning[V];w+=Et!==void 0?Et:0}h>w&&(h=w),s>L&&(s=L);var ct=w+C.xAdvance,Tt=L+d;lJ&&(J=Y),Y<$&&($=Y),M>0)for(var Mt=0;Mt{/** + */var m=function(t,o,v,a){if(v===void 0&&(v=!1),a===void 0)return a={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0},a;var r=t.text,n=r.length,e=t.maxWidth,i=t.wordWrapCharCode,h=Number.MAX_VALUE,s=Number.MAX_VALUE,l=0,f=0,u=t.fontData.chars,d=t.fontData.lineHeight,p=t.letterSpacing,g=t.lineSpacing,y=0,x=0,C=0,P=null,M=t._align,w=0,I=0,L=t.fontSize/t.fontData.size,B=L*t.scaleX,N=L*t.scaleY,G=null,V=0,K=[],j=Number.MAX_VALUE,J=0,X=0,Y=0,b,z=[],W=[],H=null;if(e>0){for(b=0;be||vt>e?(et.push(st.i-1),st.cr?(et.push(st.i+st.word.length),k=0,Q=null):Q=st):st.cr&&(et.push(st.i+st.word.length),k=0,Q=null)}var At=function(Qt,fe,ce){return Qt.substr(0,fe)+ce+Qt.substr(fe+1)};for(b=et.length-1;b>=0;b--)r=At(r,et[b],` +`);a.wrappedText=r,n=r.length,z=[],H=null}var Et=0;for(b=0;bJ&&(J=Y),Yw&&(h=w),s>I&&(s=I);var ct=w+P.xAdvance,Ct=I+d;lJ&&(J=Y),Y0)for(var wt=0;wt{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(21859),v=function(o,r,n,e,i,h,s){var l=o.sys.textures.get(n),f=l.get(e),u=o.sys.cache.xml.get(i);if(f&&u){var d=a(u,f,h,s,l);return o.sys.cache.bitmapFont.add(r,{data:d,texture:n,frame:e,fromAtlas:!0}),!0}else return!1};c.exports=v},6925:(c,m,t)=>{/** + */var o=t(21859),v=function(a,r,n,e,i,h,s){var l=a.sys.textures.get(n),f=l.get(e),u=a.sys.cache.xml.get(i);if(f&&u){var d=o(u,f,h,s,l);return a.sys.cache.bitmapFont.add(r,{data:d,texture:n,frame:e,fromAtlas:!0}),!0}else return!1};c.exports=v},6925:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35154),v=function(o,r){var n=r.width,e=r.height,i=Math.floor(n/2),h=Math.floor(e/2),s=a(r,"chars","");if(s!==""){var l=a(r,"image",""),f=o.sys.textures.getFrame(l),u=f.cutX,d=f.cutY,p=f.source.width,g=f.source.height,y=a(r,"offset.x",0),x=a(r,"offset.y",0),T=a(r,"spacing.x",0),C=a(r,"spacing.y",0),M=a(r,"lineSpacing",0),w=a(r,"charsPerRow",null);w===null&&(w=p/n,w>s.length&&(w=s.length));for(var L=y,F=x,O={retroFont:!0,font:l,size:n,lineHeight:e+M,chars:{}},N=0,G=0;G{/** + */var o=t(35154),v=function(a,r){var n=r.width,e=r.height,i=Math.floor(n/2),h=Math.floor(e/2),s=o(r,"chars","");if(s!==""){var l=o(r,"image",""),f=a.sys.textures.getFrame(l),u=f.cutX,d=f.cutY,p=f.source.width,g=f.source.height,y=o(r,"offset.x",0),x=o(r,"offset.y",0),C=o(r,"spacing.x",0),P=o(r,"spacing.y",0),M=o(r,"lineSpacing",0),w=o(r,"charsPerRow",null);w===null&&(w=p/n,w>s.length&&(w=s.length));for(var I=y,L=x,B={retroFont:!0,font:l,size:n,lineHeight:e+M,chars:{}},N=0,G=0;G{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function m(a,v){return parseInt(a.getAttribute(v),10)}var t=function(a,v,o,r,n){o===void 0&&(o=0),r===void 0&&(r=0);var e=v.cutX,i=v.cutY,h=v.source.width,s=v.source.height,l=v.sourceIndex,f={},u=a.getElementsByTagName("info")[0],d=a.getElementsByTagName("common")[0];f.font=u.getAttribute("face"),f.size=m(u,"size"),f.lineHeight=m(d,"lineHeight")+r,f.chars={};var p=a.getElementsByTagName("char"),g=v!==void 0&&v.trimmed;if(g)var y=v.height,x=v.width;for(var T=0;T{/** + */function m(o,v){return parseInt(o.getAttribute(v),10)}var t=function(o,v,a,r,n){a===void 0&&(a=0),r===void 0&&(r=0);var e=v.cutX,i=v.cutY,h=v.source.width,s=v.source.height,l=v.sourceIndex,f={},u=o.getElementsByTagName("info")[0],d=o.getElementsByTagName("common")[0];f.font=u.getAttribute("face"),f.size=m(u,"size"),f.lineHeight=m(d,"lineHeight")+r,f.chars={};var p=o.getElementsByTagName("char"),g=v!==void 0&&v.trimmed;if(g)var y=v.height,x=v.width;for(var C=0;C{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87662),v=t(79291),o={Parse:t(6925)};o=v(!1,o,a),c.exports=o},87662:c=>{/** + */var o=t(87662),v=t(79291),a={Parse:t(6925)};a=v(!1,a,o),c.exports=a},87662:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1196,100 +1196,100 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22186),v=t(83419),o=t(12310),r=new v({Extends:a,Mixins:[o],initialize:function(e,i,h,s,l,f,u){a.call(this,e,i,h,s,l,f,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}});c.exports=r},86741:(c,m,t)=>{/** + */var o=t(22186),v=t(83419),a=t(12310),r=new v({Extends:o,Mixins:[a],initialize:function(e,i,h,s,l,f,u){o.call(this,e,i,h,s,l,f,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}});c.exports=r},86741:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20926),v=function(o,r,n,e){var i=r._text,h=i.length,s=o.currentContext;if(!(h===0||!a(o,s,r,n,e))){n.addToRenderList(r);var l=r.fromAtlas?r.frame:r.texture.frames.__BASE,f=r.displayCallback,u=r.callbackData,d=r.fontData.chars,p=r.fontData.lineHeight,g=r._letterSpacing,y=0,x=0,T=0,C=null,M=0,w=0,L=0,F=0,O=0,N=0,G=null,V=0,K=r.frame.source.image,$=l.cutX,J=l.cutY,X=0,Y=0,D=r._fontSize/r.fontData.size,z=r._align,W=0,H=0;r.getTextBounds(!1);var Z=r._bounds.lines;z===1?H=(Z.longest-Z.lengths[0])/2:z===2&&(H=Z.longest-Z.lengths[0]),s.translate(-r.displayOriginX,-r.displayOriginY);var Q=n.roundPixels;r.cropWidth>0&&r.cropHeight>0&&(s.beginPath(),s.rect(0,0,r.cropWidth,r.cropHeight),s.clip());for(var k=0;k{/** + */var o=t(20926),v=function(a,r,n,e){var i=r._text,h=i.length,s=a.currentContext;if(!(h===0||!o(a,s,r,n,e))){n.addToRenderList(r);var l=r.fromAtlas?r.frame:r.texture.frames.__BASE,f=r.displayCallback,u=r.callbackData,d=r.fontData.chars,p=r.fontData.lineHeight,g=r._letterSpacing,y=0,x=0,C=0,P=null,M=0,w=0,I=0,L=0,B=0,N=0,G=null,V=0,K=r.frame.source.image,j=l.cutX,J=l.cutY,X=0,Y=0,b=r._fontSize/r.fontData.size,z=r._align,W=0,H=0;r.getTextBounds(!1);var Z=r._bounds.lines;z===1?H=(Z.longest-Z.lengths[0])/2:z===2&&(H=Z.longest-Z.lengths[0]),s.translate(-r.displayOriginX,-r.displayOriginY);var Q=n.roundPixels;r.cropWidth>0&&r.cropHeight>0&&(s.beginPath(),s.rect(0,0,r.cropWidth,r.cropHeight),s.clip());for(var k=0;k{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2638),v=t(25305),o=t(44603),r=t(23568);o.register("dynamicBitmapText",function(n,e){n===void 0&&(n={});var i=r(n,"font",""),h=r(n,"text",""),s=r(n,"size",!1),l=new a(this.scene,0,0,i,h,s);return e!==void 0&&(n.add=e),v(this.scene,l,n),l})},72566:(c,m,t)=>{/** + */var o=t(2638),v=t(25305),a=t(44603),r=t(23568);a.register("dynamicBitmapText",function(n,e){n===void 0&&(n={});var i=r(n,"font",""),h=r(n,"text",""),s=r(n,"size",!1),l=new o(this.scene,0,0,i,h,s);return e!==void 0&&(n.add=e),v(this.scene,l,n),l})},72566:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2638),v=t(39429);v.register("dynamicBitmapText",function(o,r,n,e,i){return this.displayList.add(new a(this.scene,o,r,n,e,i))})},12310:(c,m,t)=>{/** + */var o=t(2638),v=t(39429);v.register("dynamicBitmapText",function(a,r,n,e,i){return this.displayList.add(new o(this.scene,a,r,n,e,i))})},12310:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(73482),o=t(86741),c.exports={renderWebGL:v,renderCanvas:o}},73482:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(73482),a=t(86741),c.exports={renderWebGL:v,renderCanvas:a}},73482:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(61340),o=t(70554),r=new v,n=function(e,i,h,s){var l=i.text,f=l.length;if(f!==0){h.addToRenderList(i);var u=e.pipelines.set(i.pipeline,i),d=a(i,h,s);e.pipelines.preBatch(i);var p=d.sprite,g=d.calc,y=r,x=i.cropWidth>0||i.cropHeight>0;x&&(u.flush(),e.pushScissor(g.tx,g.ty,i.cropWidth*g.scaleX,i.cropHeight*g.scaleY));var T=i.frame,C=T.glTexture,M=i.tintFill,w=o.getTintAppendFloatAlpha(i.tintTopLeft,h.alpha*i._alphaTL),L=o.getTintAppendFloatAlpha(i.tintTopRight,h.alpha*i._alphaTR),F=o.getTintAppendFloatAlpha(i.tintBottomLeft,h.alpha*i._alphaBL),O=o.getTintAppendFloatAlpha(i.tintBottomRight,h.alpha*i._alphaBR),N=u.setGameObject(i),G=0,V=0,K=0,$=0,J=i.letterSpacing,X,Y=0,D=0,z,W=i.scrollX,H=i.scrollY,Z=i.fontData,Q=Z.chars,k=Z.lineHeight,et=i.fontSize/Z.size,st=0,rt=i._align,ot=0,ft=0,at=i.getTextBounds(!1);i.maxWidth>0&&(l=at.wrappedText,f=l.length);var vt=i._bounds.lines;rt===1?ft=(vt.longest-vt.lengths[0])/2:rt===2&&(ft=vt.longest-vt.lengths[0]);for(var Pt=h.roundPixels,Ct=i.displayCallback,Et=i.callbackData,ct=0;ct{/** + */var o=t(91296),v=t(61340),a=t(70554),r=new v,n=function(e,i,h,s){var l=i.text,f=l.length;if(f!==0){h.addToRenderList(i);var u=e.pipelines.set(i.pipeline,i),d=o(i,h,s);e.pipelines.preBatch(i);var p=d.sprite,g=d.calc,y=r,x=i.cropWidth>0||i.cropHeight>0;x&&(u.flush(),e.pushScissor(g.tx,g.ty,i.cropWidth*g.scaleX,i.cropHeight*g.scaleY));var C=i.frame,P=C.glTexture,M=i.tintFill,w=a.getTintAppendFloatAlpha(i.tintTopLeft,h.alpha*i._alphaTL),I=a.getTintAppendFloatAlpha(i.tintTopRight,h.alpha*i._alphaTR),L=a.getTintAppendFloatAlpha(i.tintBottomLeft,h.alpha*i._alphaBL),B=a.getTintAppendFloatAlpha(i.tintBottomRight,h.alpha*i._alphaBR),N=u.setGameObject(i),G=0,V=0,K=0,j=0,J=i.letterSpacing,X,Y=0,b=0,z,W=i.scrollX,H=i.scrollY,Z=i.fontData,Q=Z.chars,k=Z.lineHeight,et=i.fontSize/Z.size,st=0,rt=i._align,ot=0,ft=0,at=i.getTextBounds(!1);i.maxWidth>0&&(l=at.wrappedText,f=l.length);var vt=i._bounds.lines;rt===1?ft=(vt.longest-vt.lengths[0])/2:rt===2&&(ft=vt.longest-vt.lengths[0]);for(var At=h.roundPixels,Et=i.displayCallback,Pt=i.callbackData,ct=0;ct{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(45319),o=t(31401),r=t(95643),n=t(53048),e=t(61327),i=t(21859),h=t(87841),s=t(18658),l=new a({Extends:r,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Texture,o.Tint,o.Transform,o.Visible,s],initialize:function(u,d,p,g,y,x,T){y===void 0&&(y=""),T===void 0&&(T=0),r.call(this,u,"BitmapText"),this.font=g;var C=this.scene.sys.cache.bitmapFont.get(g);C||console.warn("Invalid BitmapText key: "+g),this.fontData=C.data,this._text="",this._fontSize=x||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=T,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=C.fromAtlas,this.setTexture(C.texture,C.frame),this.setPosition(d,p),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(y)},setLeftAlign:function(){return this._align=l.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=l.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=l.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(f){return this._fontSize=f,this._dirty=!0,this},setLetterSpacing:function(f){return f===void 0&&(f=0),this._letterSpacing=f,this._dirty=!0,this},setLineSpacing:function(f){return f===void 0&&(f=0),this.lineSpacing=f,this},setText:function(f){return!f&&f!==0&&(f=""),Array.isArray(f)&&(f=f.join(` -`)),f!==this.text&&(this._text=f.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(f,u,d,p){return f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=.5),this.dropShadowX=f,this.dropShadowY=u,this.dropShadowColor=d,this.dropShadowAlpha=p,this},setCharacterTint:function(f,u,d,p,g,y,x){f===void 0&&(f=0),u===void 0&&(u=1),d===void 0&&(d=!1),p===void 0&&(p=-1),g===void 0&&(g=p,y=p,x=p);var T=this.text.length;u===-1&&(u=T),f<0&&(f=T+f),f=v(f,0,T-1);for(var C=v(f+u,f,T),M=this.charColors,w=f;w{/** + */var o=t(83419),v=t(45319),a=t(31401),r=t(95643),n=t(53048),e=t(61327),i=t(21859),h=t(87841),s=t(18658),l=new o({Extends:r,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.PostPipeline,a.ScrollFactor,a.Texture,a.Tint,a.Transform,a.Visible,s],initialize:function(u,d,p,g,y,x,C){y===void 0&&(y=""),C===void 0&&(C=0),r.call(this,u,"BitmapText"),this.font=g;var P=this.scene.sys.cache.bitmapFont.get(g);P||console.warn("Invalid BitmapText key: "+g),this.fontData=P.data,this._text="",this._fontSize=x||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=C,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=P.fromAtlas,this.setTexture(P.texture,P.frame),this.setPosition(d,p),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(y)},setLeftAlign:function(){return this._align=l.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=l.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=l.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(f){return this._fontSize=f,this._dirty=!0,this},setLetterSpacing:function(f){return f===void 0&&(f=0),this._letterSpacing=f,this._dirty=!0,this},setLineSpacing:function(f){return f===void 0&&(f=0),this.lineSpacing=f,this},setText:function(f){return!f&&f!==0&&(f=""),Array.isArray(f)&&(f=f.join(` +`)),f!==this.text&&(this._text=f.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(f,u,d,p){return f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=.5),this.dropShadowX=f,this.dropShadowY=u,this.dropShadowColor=d,this.dropShadowAlpha=p,this},setCharacterTint:function(f,u,d,p,g,y,x){f===void 0&&(f=0),u===void 0&&(u=1),d===void 0&&(d=!1),p===void 0&&(p=-1),g===void 0&&(g=p,y=p,x=p);var C=this.text.length;u===-1&&(u=C),f<0&&(f=C+f),f=v(f,0,C-1);for(var P=v(f+u,f,C),M=this.charColors,w=f;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20926),v=function(o,r,n,e){var i=r._text,h=i.length,s=o.currentContext;if(!(h===0||!a(o,s,r,n,e))){n.addToRenderList(r);var l=r.fromAtlas?r.frame:r.texture.frames.__BASE,f=r.fontData.chars,u=r.fontData.lineHeight,d=r._letterSpacing,p=r._lineSpacing,g=0,y=0,x=0,T=null,C=0,M=0,w=0,L=0,F=0,O=0,N=null,G=0,V=l.source.image,K=l.cutX,$=l.cutY,J=r._fontSize/r.fontData.size,X=r._align,Y=0,D=0,z=r.getTextBounds(!1);r.maxWidth>0&&(i=z.wrappedText,h=i.length);var W=r._bounds.lines;X===1?D=(W.longest-W.lengths[0])/2:X===2&&(D=W.longest-W.lengths[0]),s.translate(-r.displayOriginX,-r.displayOriginY);for(var H=n.roundPixels,Z=0;Z{/** + */var o=t(20926),v=function(a,r,n,e){var i=r._text,h=i.length,s=a.currentContext;if(!(h===0||!o(a,s,r,n,e))){n.addToRenderList(r);var l=r.fromAtlas?r.frame:r.texture.frames.__BASE,f=r.fontData.chars,u=r.fontData.lineHeight,d=r._letterSpacing,p=r._lineSpacing,g=0,y=0,x=0,C=null,P=0,M=0,w=0,I=0,L=0,B=0,N=null,G=0,V=l.source.image,K=l.cutX,j=l.cutY,J=r._fontSize/r.fontData.size,X=r._align,Y=0,b=0,z=r.getTextBounds(!1);r.maxWidth>0&&(i=z.wrappedText,h=i.length);var W=r._bounds.lines;X===1?b=(W.longest-W.lengths[0])/2:X===2&&(b=W.longest-W.lengths[0]),s.translate(-r.displayOriginX,-r.displayOriginY);for(var H=n.roundPixels,Z=0;Z{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22186),v=t(25305),o=t(44603),r=t(23568),n=t(35154);o.register("bitmapText",function(e,i){e===void 0&&(e={});var h=n(e,"font",""),s=r(e,"text",""),l=r(e,"size",!1),f=n(e,"align",0),u=new a(this.scene,0,0,h,s,l,f);return i!==void 0&&(e.add=i),v(this.scene,u,e),u})},34914:(c,m,t)=>{/** + */var o=t(22186),v=t(25305),a=t(44603),r=t(23568),n=t(35154);a.register("bitmapText",function(e,i){e===void 0&&(e={});var h=n(e,"font",""),s=r(e,"text",""),l=r(e,"size",!1),f=n(e,"align",0),u=new o(this.scene,0,0,h,s,l,f);return i!==void 0&&(e.add=i),v(this.scene,u,e),u})},34914:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22186),v=t(39429);v.register("bitmapText",function(o,r,n,e,i,h){return this.displayList.add(new a(this.scene,o,r,n,e,i,h))})},18658:(c,m,t)=>{/** + */var o=t(22186),v=t(39429);v.register("bitmapText",function(a,r,n,e,i,h){return this.displayList.add(new o(this.scene,a,r,n,e,i,h))})},18658:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(33590),o=t(37289),c.exports={renderWebGL:v,renderCanvas:o}},33590:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(33590),a=t(37289),c.exports={renderWebGL:v,renderCanvas:a}},33590:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(3217),v=t(91296),o=t(70554),r=function(n,e,i,h){var s=e._text,l=s.length;if(l!==0){i.addToRenderList(e);var f=n.pipelines.set(e.pipeline,e),u=v(e,i,h).calc;n.pipelines.preBatch(e);var d=i.roundPixels,p=i.alpha,g=e.charColors,y=e.tintFill,x=o.getTintAppendFloatAlpha,T=x(e.tintTopLeft,p*e._alphaTL),C=x(e.tintTopRight,p*e._alphaTR),M=x(e.tintBottomLeft,p*e._alphaBL),w=x(e.tintBottomRight,p*e._alphaBR),L=e.frame.glTexture,F=f.setGameObject(e),O=e.getTextBounds(!1),N,G,V,K=O.characters,$=e.dropShadowX,J=e.dropShadowY,X=$!==0||J!==0;if(X){var Y=e.dropShadowColor,D=e.dropShadowAlpha,z=x(Y,p*D*e._alphaTL),W=x(Y,p*D*e._alphaTR),H=x(Y,p*D*e._alphaBL),Z=x(Y,p*D*e._alphaBR);for(N=0;N{/** + */var o=t(3217),v=t(91296),a=t(70554),r=function(n,e,i,h){var s=e._text,l=s.length;if(l!==0){i.addToRenderList(e);var f=n.pipelines.set(e.pipeline,e),u=v(e,i,h).calc;n.pipelines.preBatch(e);var d=i.roundPixels,p=i.alpha,g=e.charColors,y=e.tintFill,x=a.getTintAppendFloatAlpha,C=x(e.tintTopLeft,p*e._alphaTL),P=x(e.tintTopRight,p*e._alphaTR),M=x(e.tintBottomLeft,p*e._alphaBL),w=x(e.tintBottomRight,p*e._alphaBR),I=e.frame.glTexture,L=f.setGameObject(e),B=e.getTextBounds(!1),N,G,V,K=B.characters,j=e.dropShadowX,J=e.dropShadowY,X=j!==0||J!==0;if(X){var Y=e.dropShadowColor,b=e.dropShadowAlpha,z=x(Y,p*b*e._alphaTL),W=x(Y,p*b*e._alphaTR),H=x(Y,p*b*e._alphaBL),Z=x(Y,p*b*e._alphaBR);for(N=0;N{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(48011),v=t(46590),o=t(83419),r=t(31401),n=t(4327),e=t(95643),i=t(73162),h=new o({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,a],initialize:function(l,f,u,d,p){e.call(this,l,"Blitter"),this.setTexture(d,p),this.setPosition(f,u),this.initPipeline(),this.initPostPipeline(),this.children=new i,this.renderList=[],this.dirty=!1},create:function(s,l,f,u,d){u===void 0&&(u=!0),d===void 0&&(d=this.children.length),f===void 0?f=this.frame:f instanceof n||(f=this.texture.get(f));var p=new v(this,s,l,f,u);return this.children.addAt(p,d,!1),this.dirty=!0,p},createFromCallback:function(s,l,f,u){for(var d=this.createMultiple(l,f,u),p=0;p0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});c.exports=h},72396:c=>{/** + */var o=t(48011),v=t(46590),a=t(83419),r=t(31401),n=t(4327),e=t(95643),i=t(73162),h=new a({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,o],initialize:function(l,f,u,d,p){e.call(this,l,"Blitter"),this.setTexture(d,p),this.setPosition(f,u),this.initPipeline(),this.initPostPipeline(),this.children=new i,this.renderList=[],this.dirty=!1},create:function(s,l,f,u,d){u===void 0&&(u=!0),d===void 0&&(d=this.children.length),f===void 0?f=this.frame:f instanceof n||(f=this.texture.get(f));var p=new v(this,s,l,f,u);return this.children.addAt(p,d,!1),this.dirty=!0,p},createFromCallback:function(s,l,f,u){for(var d=this.createMultiple(l,f,u),p=0;p0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});c.exports=h},72396:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=a.getRenderList();if(r.length!==0){var n=t.currentContext,e=v.alpha*a.alpha;if(e!==0){v.addToRenderList(a),n.globalCompositeOperation=t.blendModes[a.blendMode],n.imageSmoothingEnabled=!a.frame.source.scaleMode;var i=a.x-v.scrollX*a.scrollFactorX,h=a.y-v.scrollY*a.scrollFactorY;n.save(),o&&o.copyToContext(n);for(var s=v.roundPixels,l=0;l0&&p.height>0&&(n.save(),n.translate(f.x+i,f.y+h),n.scale(x,T),n.drawImage(d.source.image,p.x,p.y,p.width,p.height,g,y,p.width,p.height),n.restore())):(s&&(g=Math.round(g),y=Math.round(y)),p.width>0&&p.height>0&&n.drawImage(d.source.image,p.x,p.y,p.width,p.height,g+f.x+i,y+f.y+h,p.width,p.height)))}n.restore()}}};c.exports=m},9403:(c,m,t)=>{/** + */var m=function(t,o,v,a){var r=o.getRenderList();if(r.length!==0){var n=t.currentContext,e=v.alpha*o.alpha;if(e!==0){v.addToRenderList(o),n.globalCompositeOperation=t.blendModes[o.blendMode],n.imageSmoothingEnabled=!o.frame.source.scaleMode;var i=o.x-v.scrollX*o.scrollFactorX,h=o.y-v.scrollY*o.scrollFactorY;n.save(),a&&a.copyToContext(n);for(var s=v.roundPixels,l=0;l0&&p.height>0&&(n.save(),n.translate(f.x+i,f.y+h),n.scale(x,C),n.drawImage(d.source.image,p.x,p.y,p.width,p.height,g,y,p.width,p.height),n.restore())):(s&&(g=Math.round(g),y=Math.round(y)),p.width>0&&p.height>0&&n.drawImage(d.source.image,p.x,p.y,p.width,p.height,g+f.x+i,y+f.y+h,p.width,p.height)))}n.restore()}}};c.exports=m},9403:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(6107),v=t(25305),o=t(44603),r=t(23568);o.register("blitter",function(n,e){n===void 0&&(n={});var i=r(n,"key",null),h=r(n,"frame",null),s=new a(this.scene,0,0,i,h);return e!==void 0&&(n.add=e),v(this.scene,s,n),s})},12709:(c,m,t)=>{/** + */var o=t(6107),v=t(25305),a=t(44603),r=t(23568);a.register("blitter",function(n,e){n===void 0&&(n={});var i=r(n,"key",null),h=r(n,"frame",null),s=new o(this.scene,0,0,i,h);return e!==void 0&&(n.add=e),v(this.scene,s,n),s})},12709:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(6107),v=t(39429);v.register("blitter",function(o,r,n,e){return this.displayList.add(new a(this.scene,o,r,n,e))})},48011:(c,m,t)=>{/** + */var o=t(6107),v=t(39429);v.register("blitter",function(a,r,n,e){return this.displayList.add(new o(this.scene,a,r,n,e))})},48011:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(99485),o=t(72396),c.exports={renderWebGL:v,renderCanvas:o}},99485:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(99485),a=t(72396),c.exports={renderWebGL:v,renderCanvas:a}},99485:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(61340),v=t(70554),o=new a,r=function(n,e,i,h){var s=e.getRenderList(),l=i.alpha*e.alpha;if(!(s.length===0||l===0)){i.addToRenderList(e);var f=n.pipelines.set(this.pipeline,e),u=i.scrollX*e.scrollFactorX,d=i.scrollY*e.scrollFactorY,p=o.copyFrom(i.matrix);h&&(p.multiplyWithOffset(h,-u,-d),u=0,d=0);var g=e.x-u,y=e.y-d,x=-1,T=!1;n.pipelines.preBatch(e);for(var C=0;C{/** + */var o=t(61340),v=t(70554),a=new o,r=function(n,e,i,h){var s=e.getRenderList(),l=i.alpha*e.alpha;if(!(s.length===0||l===0)){i.addToRenderList(e);var f=n.pipelines.set(this.pipeline,e),u=i.scrollX*e.scrollFactorX,d=i.scrollY*e.scrollFactorY,p=a.copyFrom(i.matrix);h&&(p.multiplyWithOffset(h,-u,-d),u=0,d=0);var g=e.x-u,y=e.y-d,x=-1,C=!1;n.pipelines.preBatch(e);for(var P=0;P{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(4327),o=new a({initialize:function(n,e,i,h,s){this.parent=n,this.x=e,this.y=i,this.frame=h,this.data={},this.tint=16777215,this._visible=s,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 v&&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}}});c.exports=o},16005:(c,m,t)=>{/** + */var o=t(83419),v=t(4327),a=new o({initialize:function(n,e,i,h,s){this.parent=n,this.x=e,this.y=i,this.frame=h,this.data={},this.tint=16777215,this._visible=s,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 v&&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}}});c.exports=a},16005:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=2,o={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r,n,e,i){return r===void 0&&(r=1),n===void 0?this.alpha=r:(this._alphaTL=a(r,0,1),this._alphaTR=a(n,0,1),this._alphaBL=a(e,0,1),this._alphaBR=a(i,0,1)),this},alpha:{get:function(){return this._alpha},set:function(r){var n=a(r,0,1);this._alpha=n,this._alphaTL=n,this._alphaTR=n,this._alphaBL=n,this._alphaBR=n,n===0?this.renderFlags&=~v:this.renderFlags|=v}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(r){var n=a(r,0,1);this._alphaTL=n,n!==0&&(this.renderFlags|=v)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(r){var n=a(r,0,1);this._alphaTR=n,n!==0&&(this.renderFlags|=v)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(r){var n=a(r,0,1);this._alphaBL=n,n!==0&&(this.renderFlags|=v)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(r){var n=a(r,0,1);this._alphaBR=n,n!==0&&(this.renderFlags|=v)}}};c.exports=o},88509:(c,m,t)=>{/** + */var o=t(45319),v=2,a={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r,n,e,i){return r===void 0&&(r=1),n===void 0?this.alpha=r:(this._alphaTL=o(r,0,1),this._alphaTR=o(n,0,1),this._alphaBL=o(e,0,1),this._alphaBR=o(i,0,1)),this},alpha:{get:function(){return this._alpha},set:function(r){var n=o(r,0,1);this._alpha=n,this._alphaTL=n,this._alphaTR=n,this._alphaBL=n,this._alphaBR=n,n===0?this.renderFlags&=~v:this.renderFlags|=v}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(r){var n=o(r,0,1);this._alphaTL=n,n!==0&&(this.renderFlags|=v)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(r){var n=o(r,0,1);this._alphaTR=n,n!==0&&(this.renderFlags|=v)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(r){var n=o(r,0,1);this._alphaBL=n,n!==0&&(this.renderFlags|=v)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(r){var n=o(r,0,1);this._alphaBR=n,n!==0&&(this.renderFlags|=v)}}};c.exports=a},88509:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=2,o={_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=a(r,0,1);this._alpha=n,n===0?this.renderFlags&=~v:this.renderFlags|=v}}};c.exports=o},90065:(c,m,t)=>{/** + */var o=t(45319),v=2,a={_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=o(r,0,1);this._alpha=n,n===0?this.renderFlags&=~v:this.renderFlags|=v}}};c.exports=a},90065:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10312),v={_blendMode:a.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(o){typeof o=="string"&&(o=a[o]),o|=0,o>=-1&&(this._blendMode=o)}},setBlendMode:function(o){return this.blendMode=o,this}};c.exports=v},94215:c=>{/** + */var o=t(10312),v={_blendMode:o.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(a){typeof a=="string"&&(a=o[a]),a|=0,a>=-1&&(this._blendMode=a)}},setBlendMode:function(a){return this.blendMode=a,this}};c.exports=v},94215:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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,a){return this.width=t,this.height=a,this},setDisplaySize:function(t,a){return this.displayWidth=t,this.displayHeight=a,this}};c.exports=m},61683:c=>{/** + */var m={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,o){return this.width=t,this.height=o,this},setDisplaySize:function(t,o){return this.displayWidth=t,this.displayHeight=o,this}};c.exports=m},61683:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={texture:null,frame:null,isCropped:!1,setCrop:function(t,a,v,o){if(t===void 0)this.isCropped=!1;else if(this.frame){if(typeof t=="number")this.frame.setCropUVs(this._crop,t,a,v,o,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}}};c.exports=m},89272:c=>{/** + */var m={texture:null,frame:null,isCropped:!1,setCrop:function(t,o,v,a){if(t===void 0)this.isCropped=!1;else if(this.frame){if(typeof t=="number")this.frame.setCropUVs(this._crop,t,o,v,a,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}}};c.exports=m},89272:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1297,71 +1297,71 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(66064),o=t(19133),r=new a({initialize:function(e,i){this.gameObject=e,this.isPost=i,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{/** + */var o=t(83419),v=t(66064),a=t(19133),r=new o({initialize:function(e,i){this.gameObject=e,this.isPost=i,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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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,a){return this.flipX=t,this.flipY=a,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};c.exports=m},8004:(c,m,t)=>{/** + */var m={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,o){return this.flipX=t,this.flipY=o,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};c.exports=m},8004:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=t(11520),o=t(26099),r={prepareBoundsOutput:function(n,e){if(e===void 0&&(e=!1),this.rotation!==0&&v(n,this.x,this.y,this.rotation),e&&this.parentContainer){var i=this.parentContainer.getBoundsTransformMatrix();i.transformPoint(n.x,n.y,n)}return n},getCenter:function(n,e){return n===void 0&&(n=new o),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 o),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 o),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 o),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 o),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 o),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 o),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 o),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 o),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 a);var e,i,h,s,l,f,u,d;if(this.parentContainer){var p=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(n),p.transformPoint(n.x,n.y,n),e=n.x,i=n.y,this.getTopRight(n),p.transformPoint(n.x,n.y,n),h=n.x,s=n.y,this.getBottomLeft(n),p.transformPoint(n.x,n.y,n),l=n.x,f=n.y,this.getBottomRight(n),p.transformPoint(n.x,n.y,n),u=n.x,d=n.y}else this.getTopLeft(n),e=n.x,i=n.y,this.getTopRight(n),h=n.x,s=n.y,this.getBottomLeft(n),l=n.x,f=n.y,this.getBottomRight(n),u=n.x,d=n.y;return n.x=Math.min(e,h,l,u),n.y=Math.min(i,s,f,d),n.width=Math.max(e,h,l,u)-n.x,n.height=Math.max(i,s,f,d)-n.y,n}};c.exports=r},8573:(c,m,t)=>{/** + */var o=t(87841),v=t(11520),a=t(26099),r={prepareBoundsOutput:function(n,e){if(e===void 0&&(e=!1),this.rotation!==0&&v(n,this.x,this.y,this.rotation),e&&this.parentContainer){var i=this.parentContainer.getBoundsTransformMatrix();i.transformPoint(n.x,n.y,n)}return n},getCenter:function(n,e){return n===void 0&&(n=new a),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 a),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 a),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 a),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 a),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 a),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 a),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 a),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 a),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 o);var e,i,h,s,l,f,u,d;if(this.parentContainer){var p=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(n),p.transformPoint(n.x,n.y,n),e=n.x,i=n.y,this.getTopRight(n),p.transformPoint(n.x,n.y,n),h=n.x,s=n.y,this.getBottomLeft(n),p.transformPoint(n.x,n.y,n),l=n.x,f=n.y,this.getBottomRight(n),p.transformPoint(n.x,n.y,n),u=n.x,d=n.y}else this.getTopLeft(n),e=n.x,i=n.y,this.getTopRight(n),h=n.x,s=n.y,this.getBottomLeft(n),l=n.x,f=n.y,this.getBottomRight(n),u=n.x,d=n.y;return n.x=Math.min(e,h,l,u),n.y=Math.min(i,s,f,d),n.width=Math.max(e,h,l,u)-n.x,n.height=Math.max(i,s,f,d)-n.y,n}};c.exports=r},8573:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(6858),v=t(80661),o={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,i,h){return r===void 0&&(this.texture||this.shader||this.geom)&&(r=this),new a(this.scene,r,n,e,i,h)},createGeometryMask:function(r){return r===void 0&&(this.type==="Graphics"||this.geom)&&(r=this),new v(this.scene,r)}};c.exports=o},27387:c=>{/** + */var o=t(6858),v=t(80661),a={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,i,h){return r===void 0&&(this.texture||this.shader||this.geom)&&(r=this),new o(this.scene,r,n,e,i,h)},createGeometryMask:function(r){return r===void 0&&(this.type==="Graphics"||this.geom)&&(r=this),new v(this.scene,r)}};c.exports=a},27387:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={_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,a){return t===void 0&&(t=.5),a===void 0&&(a=t),this.originX=t,this.originY=a,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,a){return t===void 0&&(t=0),a===void 0&&(a=t),this.displayOriginX=t,this.displayOriginY=a,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};c.exports=m},37640:(c,m,t)=>{/** + */var m={_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,o){return t===void 0&&(t=.5),o===void 0&&(o=t),this.originX=t,this.originY=o,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,o){return t===void 0&&(t=0),o===void 0&&(o=t),this.displayOriginX=t,this.displayOriginY=o,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};c.exports=m},37640:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39506),v=t(57355),o=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(i,h){h===void 0&&(h=this.pathConfig);var s=this.pathTween;return s&&s.isPlaying()&&s.stop(),this.path=i,h&&this.startFollow(h),this},setRotateToPath:function(i,h){return h===void 0&&(h=0),this.rotateToPath=i,this.pathRotationOffset=h,this},isFollowing:function(){var i=this.pathTween;return i&&i.isPlaying()},startFollow:function(i,h){i===void 0&&(i={}),h===void 0&&(h=0);var s=this.pathTween;s&&s.isPlaying()&&s.stop(),typeof i=="number"&&(i={duration:i}),i.from=o(i,"from",0),i.to=o(i,"to",1);var l=v(i,"positionOnPath",!1);this.rotateToPath=v(i,"rotateToPath",!1),this.pathRotationOffset=o(i,"rotationOffset",0);var f=o(i,"startAt",h);if(f&&(i.onStart=function(d){var p=d.data[0];p.progress=f,p.elapsed=p.duration*f;var g=p.ease(p.progress);p.current=p.start+(p.end-p.start)*g,p.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(),i.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(i),this.path.getStartPoint(this.pathOffset),l&&(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)+a(this.pathRotationOffset)}return this.pathConfig=i,this},pauseFollow:function(){var i=this.pathTween;return i&&i.isPlaying()&&i.pause(),this},resumeFollow:function(){var i=this.pathTween;return i&&i.isPaused()&&i.resume(),this},stopFollow:function(){var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this},pathUpdate:function(){var i=this.pathTween;if(i&&i.data){var h=i.data[0],s=this.pathDelta,l=this.pathVector;if(s.copy(l).negate(),h.state===r.COMPLETE){this.path.getPoint(h.end,l),s.add(l),l.add(this.pathOffset),this.setPosition(l.x,l.y);return}else if(h.state!==r.PLAYING_FORWARD&&h.state!==r.PLAYING_BACKWARD)return;this.path.getPoint(i.getValue(),l),s.add(l),l.add(this.pathOffset);var f=this.x,u=this.y;this.setPosition(l.x,l.y);var d=this.x-f,p=this.y-u;if(d===0&&p===0)return;if(h.state!==this._prevDirection){this._prevDirection=h.state;return}this.rotateToPath&&(this.rotation=Math.atan2(p,d)+a(this.pathRotationOffset))}}};c.exports=e},72699:(c,m,t)=>{/** + */var o=t(39506),v=t(57355),a=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(i,h){h===void 0&&(h=this.pathConfig);var s=this.pathTween;return s&&s.isPlaying()&&s.stop(),this.path=i,h&&this.startFollow(h),this},setRotateToPath:function(i,h){return h===void 0&&(h=0),this.rotateToPath=i,this.pathRotationOffset=h,this},isFollowing:function(){var i=this.pathTween;return i&&i.isPlaying()},startFollow:function(i,h){i===void 0&&(i={}),h===void 0&&(h=0);var s=this.pathTween;s&&s.isPlaying()&&s.stop(),typeof i=="number"&&(i={duration:i}),i.from=a(i,"from",0),i.to=a(i,"to",1);var l=v(i,"positionOnPath",!1);this.rotateToPath=v(i,"rotateToPath",!1),this.pathRotationOffset=a(i,"rotationOffset",0);var f=a(i,"startAt",h);if(f&&(i.onStart=function(d){var p=d.data[0];p.progress=f,p.elapsed=p.duration*f;var g=p.ease(p.progress);p.current=p.start+(p.end-p.start)*g,p.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(),i.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(i),this.path.getStartPoint(this.pathOffset),l&&(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)+o(this.pathRotationOffset)}return this.pathConfig=i,this},pauseFollow:function(){var i=this.pathTween;return i&&i.isPlaying()&&i.pause(),this},resumeFollow:function(){var i=this.pathTween;return i&&i.isPaused()&&i.resume(),this},stopFollow:function(){var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this},pathUpdate:function(){var i=this.pathTween;if(i&&i.data){var h=i.data[0],s=this.pathDelta,l=this.pathVector;if(s.copy(l).negate(),h.state===r.COMPLETE){this.path.getPoint(h.end,l),s.add(l),l.add(this.pathOffset),this.setPosition(l.x,l.y);return}else if(h.state!==r.PLAYING_FORWARD&&h.state!==r.PLAYING_BACKWARD)return;this.path.getPoint(i.getValue(),l),s.add(l),l.add(this.pathOffset);var f=this.x,u=this.y;this.setPosition(l.x,l.y);var d=this.x-f,p=this.y-u;if(d===0&&p===0)return;if(h.state!==this._prevDirection){this._prevDirection=h.state;return}this.rotateToPath&&(this.rotation=Math.atan2(p,d)+o(this.pathRotationOffset))}}};c.exports=e},72699:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62644),v={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(o){this.pipelineData={};var r=this.scene.sys.renderer;if(!r)return!1;var n=r.pipelines;if(n){o===void 0&&(o=n.default);var e=n.get(o);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}return!1},setPipeline:function(o,r,n){var e=this.scene.sys.renderer;if(!e)return this;var i=e.pipelines;if(i){var h=i.get(o);h&&(this.pipeline=h),r&&(this.pipelineData=n?a(r):r)}return this},setPipelineData:function(o,r){var n=this.pipelineData;return r===void 0?delete n[o]:n[o]=r,this},resetPipeline:function(o){return o===void 0&&(o=!1),this.pipeline=this.defaultPipeline,o&&(this.pipelineData={}),this.pipeline!==null},getPipelineName:function(){return this.pipeline.name}};c.exports=v},17581:(c,m,t)=>{/** + */var o=t(62644),v={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(a){this.pipelineData={};var r=this.scene.sys.renderer;if(!r)return!1;var n=r.pipelines;if(n){a===void 0&&(a=n.default);var e=n.get(a);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}return!1},setPipeline:function(a,r,n){var e=this.scene.sys.renderer;if(!e)return this;var i=e.pipelines;if(i){var h=i.get(a);h&&(this.pipeline=h),r&&(this.pipelineData=n?o(r):r)}return this},setPipelineData:function(a,r){var n=this.pipelineData;return r===void 0?delete n[a]:n[a]=r,this},resetPipeline:function(a){return a===void 0&&(a=!1),this.pipeline=this.defaultPipeline,a&&(this.pipelineData={}),this.pipeline!==null},getPipelineName:function(){return this.pipeline.name}};c.exports=v},17581:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62644),v=t(47059),o=t(19133),r={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(n){this.postPipelines=[],this.postPipelineData={},this.postFX=new v(this,!0),n&&(this.preFX=new v(this,!1))},setPostPipeline:function(n,e,i){var h=this.scene.sys.renderer;if(!h)return this;var s=h.pipelines;if(s){Array.isArray(n)||(n=[n]);for(var l=0;l0,this},setPostPipelineData:function(n,e){var i=this.postPipelineData;return e===void 0?delete i[n]:i[n]=e,this},getPostPipeline:function(n){for(var e=typeof n=="string",i=this.postPipelines,h=[],s=0;s=0;h--){var s=i[h];(e&&s.name===n||!e&&s===n)&&(s.destroy(),o(i,h))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};c.exports=r},80227:c=>{/** + */var o=t(62644),v=t(47059),a=t(19133),r={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(n){this.postPipelines=[],this.postPipelineData={},this.postFX=new v(this,!0),n&&(this.preFX=new v(this,!1))},setPostPipeline:function(n,e,i){var h=this.scene.sys.renderer;if(!h)return this;var s=h.pipelines;if(s){Array.isArray(n)||(n=[n]);for(var l=0;l0,this},setPostPipelineData:function(n,e){var i=this.postPipelineData;return e===void 0?delete i[n]:i[n]=e,this},getPostPipeline:function(n){for(var e=typeof n=="string",i=this.postPipelines,h=[],s=0;s=0;h--){var s=i[h];(e&&s.name===n||!e&&s===n)&&(s.destroy(),a(i,h))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};c.exports=r},80227:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,a){return a===void 0&&(a=t),this.scrollFactorX=t,this.scrollFactorY=a,this}};c.exports=m},16736:c=>{/** + */var m={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,o){return o===void 0&&(o=t),this.scrollFactorX=t,this.scrollFactorY=o,this}};c.exports=m},16736:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={_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 a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=this.width,a.hitArea.height=this.height),this},setSize:function(t,a){return this.width=t,this.height=a,this},setDisplaySize:function(t,a){return this.displayWidth=t,this.displayHeight=a,this}};c.exports=m},37726:(c,m,t)=>{/** + */var m={_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 o=this.input;return o&&!o.customHitArea&&(o.hitArea.width=this.width,o.hitArea.height=this.height),this},setSize:function(t,o){return this.width=t,this.height=o,this},setDisplaySize:function(t,o){return this.displayWidth=t,this.displayHeight=o,this}};c.exports=m},37726:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(4327),v=8,o={texture:null,frame:null,isCropped:!1,setTexture:function(r,n,e,i){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n,e,i)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof a?(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&=~v:this.renderFlags|=v,this._sizeComponent&&n&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};c.exports=o},79812:(c,m,t)=>{/** + */var o=t(4327),v=8,a={texture:null,frame:null,isCropped:!1,setTexture:function(r,n,e,i){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n,e,i)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof o?(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&=~v:this.renderFlags|=v,this._sizeComponent&&n&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};c.exports=a},79812:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(4327),v=8,o={texture:null,frame:null,isCropped:!1,setCrop:function(r,n,e,i){if(r===void 0)this.isCropped=!1;else if(this.frame){if(typeof r=="number")this.frame.setCropUVs(this._crop,r,n,e,i,this.flipX,this.flipY);else{var h=r;this.frame.setCropUVs(this._crop,h.x,h.y,h.width,h.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 a?(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&=~v:this.renderFlags|=v,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}}};c.exports=o},27472:c=>{/** + */var o=t(4327),v=8,a={texture:null,frame:null,isCropped:!1,setCrop:function(r,n,e,i){if(r===void 0)this.isCropped=!1;else if(this.frame){if(typeof r=="number")this.frame.setCropUVs(this._crop,r,n,e,i,this.flipX,this.flipY);else{var h=r;this.frame.setCropUVs(this._crop,h.x,h.y,h.width,h.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 o?(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&=~v:this.renderFlags|=v,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}}};c.exports=a},27472:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,a,v,o){return t===void 0&&(t=16777215),a===void 0&&(a=t,v=t,o=t),this.tintTopLeft=t,this.tintTopRight=a,this.tintBottomLeft=v,this.tintBottomRight=o,this.tintFill=!1,this},setTintFill:function(t,a,v,o){return this.setTint(t,a,v,o),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}}};c.exports=m},53774:c=>{/** + */var m={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,o,v,a){return t===void 0&&(t=16777215),o===void 0&&(o=t,v=t,a=t),this.tintTopLeft=t,this.tintTopRight=o,this.tintBottomLeft=v,this.tintBottomRight=a,this.tintFill=!1,this},setTintFill:function(t,o,v,a){return this.setTint(t,o,v,a),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}}};c.exports=m},53774:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a={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&&(a.textureKey=t.texture.key,a.frameKey=t.frame.name),a};c.exports=m},16901:(c,m,t)=>{/** + */var m=function(t){var o={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&&(o.textureKey=t.texture.key,o.frameKey=t.frame.name),o};c.exports=m},16901:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=t(61340),o=t(85955),r=t(86554),n=t(30954),e=t(26099),i=4,h={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(s){this._scaleX=s,this._scaleY=s,s===0?this.renderFlags&=~i:this.renderFlags|=i}},scaleX:{get:function(){return this._scaleX},set:function(s){this._scaleX=s,s===0?this.renderFlags&=~i:this._scaleY!==0&&(this.renderFlags|=i)}},scaleY:{get:function(){return this._scaleY},set:function(s){this._scaleY=s,s===0?this.renderFlags&=~i:this._scaleX!==0&&(this.renderFlags|=i)}},angle:{get:function(){return n(this._rotation*a.RAD_TO_DEG)},set:function(s){this.rotation=n(s)*a.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(s){this._rotation=r(s)}},setPosition:function(s,l,f,u){return s===void 0&&(s=0),l===void 0&&(l=s),f===void 0&&(f=0),u===void 0&&(u=0),this.x=s,this.y=l,this.z=f,this.w=u,this},copyPosition:function(s){return s.x!==void 0&&(this.x=s.x),s.y!==void 0&&(this.y=s.y),s.z!==void 0&&(this.z=s.z),s.w!==void 0&&(this.w=s.w),this},setRandomPosition:function(s,l,f,u){return s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=this.scene.sys.scale.width),u===void 0&&(u=this.scene.sys.scale.height),this.x=s+Math.random()*f,this.y=l+Math.random()*u,this},setRotation:function(s){return s===void 0&&(s=0),this.rotation=s,this},setAngle:function(s){return s===void 0&&(s=0),this.angle=s,this},setScale:function(s,l){return s===void 0&&(s=1),l===void 0&&(l=s),this.scaleX=s,this.scaleY=l,this},setX:function(s){return s===void 0&&(s=0),this.x=s,this},setY:function(s){return s===void 0&&(s=0),this.y=s,this},setZ:function(s){return s===void 0&&(s=0),this.z=s,this},setW:function(s){return s===void 0&&(s=0),this.w=s,this},getLocalTransformMatrix:function(s){return s===void 0&&(s=new v),s.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(s,l){s===void 0&&(s=new v);var f=this.parentContainer;if(!f)return this.getLocalTransformMatrix(s);for(l||(l=new v),s.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);f;)l.applyITRS(f.x,f.y,f._rotation,f._scaleX,f._scaleY),l.multiply(s,s),f=f.parentContainer;return s},getLocalPoint:function(s,l,f,u){f||(f=new e),u||(u=this.scene.sys.cameras.main);var d=u.scrollX,p=u.scrollY,g=s+d*this.scrollFactorX-d,y=l+p*this.scrollFactorY-p;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(g,y,f):o(g,y,this.x,this.y,this.rotation,this.scaleX,this.scaleY,f),this._originComponent&&(f.x+=this._displayOriginX,f.y+=this._displayOriginY),f},getParentRotation:function(){for(var s=0,l=this.parentContainer;l;)s+=l.rotation,l=l.parentContainer;return s}};c.exports=h},61340:(c,m,t)=>{/** + */var o=t(36383),v=t(61340),a=t(85955),r=t(86554),n=t(30954),e=t(26099),i=4,h={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(s){this._scaleX=s,this._scaleY=s,s===0?this.renderFlags&=~i:this.renderFlags|=i}},scaleX:{get:function(){return this._scaleX},set:function(s){this._scaleX=s,s===0?this.renderFlags&=~i:this._scaleY!==0&&(this.renderFlags|=i)}},scaleY:{get:function(){return this._scaleY},set:function(s){this._scaleY=s,s===0?this.renderFlags&=~i:this._scaleX!==0&&(this.renderFlags|=i)}},angle:{get:function(){return n(this._rotation*o.RAD_TO_DEG)},set:function(s){this.rotation=n(s)*o.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(s){this._rotation=r(s)}},setPosition:function(s,l,f,u){return s===void 0&&(s=0),l===void 0&&(l=s),f===void 0&&(f=0),u===void 0&&(u=0),this.x=s,this.y=l,this.z=f,this.w=u,this},copyPosition:function(s){return s.x!==void 0&&(this.x=s.x),s.y!==void 0&&(this.y=s.y),s.z!==void 0&&(this.z=s.z),s.w!==void 0&&(this.w=s.w),this},setRandomPosition:function(s,l,f,u){return s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=this.scene.sys.scale.width),u===void 0&&(u=this.scene.sys.scale.height),this.x=s+Math.random()*f,this.y=l+Math.random()*u,this},setRotation:function(s){return s===void 0&&(s=0),this.rotation=s,this},setAngle:function(s){return s===void 0&&(s=0),this.angle=s,this},setScale:function(s,l){return s===void 0&&(s=1),l===void 0&&(l=s),this.scaleX=s,this.scaleY=l,this},setX:function(s){return s===void 0&&(s=0),this.x=s,this},setY:function(s){return s===void 0&&(s=0),this.y=s,this},setZ:function(s){return s===void 0&&(s=0),this.z=s,this},setW:function(s){return s===void 0&&(s=0),this.w=s,this},getLocalTransformMatrix:function(s){return s===void 0&&(s=new v),s.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(s,l){s===void 0&&(s=new v);var f=this.parentContainer;if(!f)return this.getLocalTransformMatrix(s);for(l||(l=new v),s.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);f;)l.applyITRS(f.x,f.y,f._rotation,f._scaleX,f._scaleY),l.multiply(s,s),f=f.parentContainer;return s},getLocalPoint:function(s,l,f,u){f||(f=new e),u||(u=this.scene.sys.cameras.main);var d=u.scrollX,p=u.scrollY,g=s+d*this.scrollFactorX-d,y=l+p*this.scrollFactorY-p;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(g,y,f):a(g,y,this.x,this.y,this.rotation,this.scaleX,this.scaleY,f),this._originComponent&&(f.x+=this._displayOriginX,f.y+=this._displayOriginY),f},getParentRotation:function(){for(var s=0,l=this.parentContainer;l;)s+=l.rotation,l=l.parentContainer;return s}};c.exports=h},61340:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(36383),o=t(26099),r=new a({initialize:function(e,i,h,s,l,f){e===void 0&&(e=1),i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=1),l===void 0&&(l=0),f===void 0&&(f=0),this.matrix=new Float32Array([e,i,h,s,l,f,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],i=n[1],h=n[2],s=n[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):h||s?v.TAU-(s>0?Math.acos(-h/this.scaleY):-Math.acos(h/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 i=this.matrix;return i[4]=i[0]*n+i[2]*e+i[4],i[5]=i[1]*n+i[3]*e+i[5],this},scale:function(n,e){var i=this.matrix;return i[0]*=n,i[1]*=n,i[2]*=e,i[3]*=e,this},rotate:function(n){var e=Math.sin(n),i=Math.cos(n),h=this.matrix,s=h[0],l=h[1],f=h[2],u=h[3];return h[0]=s*i+f*e,h[1]=l*i+u*e,h[2]=s*-e+f*i,h[3]=l*-e+u*i,this},multiply:function(n,e){var i=this.matrix,h=n.matrix,s=i[0],l=i[1],f=i[2],u=i[3],d=i[4],p=i[5],g=h[0],y=h[1],x=h[2],T=h[3],C=h[4],M=h[5],w=e===void 0?i:e.matrix;return w[0]=g*s+y*f,w[1]=g*l+y*u,w[2]=x*s+T*f,w[3]=x*l+T*u,w[4]=C*s+M*f+d,w[5]=C*l+M*u+p,w},multiplyWithOffset:function(n,e,i){var h=this.matrix,s=n.matrix,l=h[0],f=h[1],u=h[2],d=h[3],p=h[4],g=h[5],y=e*l+i*u+p,x=e*f+i*d+g,T=s[0],C=s[1],M=s[2],w=s[3],L=s[4],F=s[5];return h[0]=T*l+C*u,h[1]=T*f+C*d,h[2]=M*l+w*u,h[3]=M*f+w*d,h[4]=L*l+F*u+y,h[5]=L*f+F*d+x,this},transform:function(n,e,i,h,s,l){var f=this.matrix,u=f[0],d=f[1],p=f[2],g=f[3],y=f[4],x=f[5];return f[0]=n*u+e*p,f[1]=n*d+e*g,f[2]=i*u+h*p,f[3]=i*d+h*g,f[4]=s*u+l*p+y,f[5]=s*d+l*g+x,this},transformPoint:function(n,e,i){i===void 0&&(i={x:0,y:0});var h=this.matrix,s=h[0],l=h[1],f=h[2],u=h[3],d=h[4],p=h[5];return i.x=n*s+e*f+d,i.y=n*l+e*u+p,i},invert:function(){var n=this.matrix,e=n[0],i=n[1],h=n[2],s=n[3],l=n[4],f=n[5],u=e*s-i*h;return n[0]=s/u,n[1]=-i/u,n[2]=-h/u,n[3]=e/u,n[4]=(h*f-s*l)/u,n[5]=-(e*f-i*l)/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,i,h,s,l){var f=this.matrix;return f[0]=n,f[1]=e,f[2]=i,f[3]=h,f[4]=s,f[5]=l,this},decomposeMatrix:function(){var n=this.decomposedMatrix,e=this.matrix,i=e[0],h=e[1],s=e[2],l=e[3],f=i*l-h*s;if(n.translateX=e[4],n.translateY=e[5],i||h){var u=Math.sqrt(i*i+h*h);n.rotation=h>0?Math.acos(i/u):-Math.acos(i/u),n.scaleX=u,n.scaleY=f/u}else if(s||l){var d=Math.sqrt(s*s+l*l);n.rotation=Math.PI*.5-(l>0?Math.acos(-s/d):-Math.acos(s/d)),n.scaleX=f/d,n.scaleY=d}else n.rotation=0,n.scaleX=0,n.scaleY=0;return n},applyITRS:function(n,e,i,h,s){var l=this.matrix,f=Math.sin(i),u=Math.cos(i);return l[4]=n,l[5]=e,l[0]=u*h,l[1]=f*h,l[2]=-f*s,l[3]=u*s,this},applyInverse:function(n,e,i){i===void 0&&(i=new o);var h=this.matrix,s=h[0],l=h[1],f=h[2],u=h[3],d=h[4],p=h[5],g=1/(s*u+f*-l);return i.x=u*g*n+-f*g*e+(p*f-d*u)*g,i.y=s*g*e+-l*g*n+(-p*s+d*l)*g,i},setQuad:function(n,e,i,h,s,l){s===void 0&&(s=!1),l===void 0&&(l=this.quad);var f=this.matrix,u=f[0],d=f[1],p=f[2],g=f[3],y=f[4],x=f[5];return s?(l[0]=Math.round(n*u+e*p+y),l[1]=Math.round(n*d+e*g+x),l[2]=Math.round(n*u+h*p+y),l[3]=Math.round(n*d+h*g+x),l[4]=Math.round(i*u+h*p+y),l[5]=Math.round(i*d+h*g+x),l[6]=Math.round(i*u+e*p+y),l[7]=Math.round(i*d+e*g+x)):(l[0]=n*u+e*p+y,l[1]=n*d+e*g+x,l[2]=n*u+h*p+y,l[3]=n*d+h*g+x,l[4]=i*u+h*p+y,l[5]=i*d+h*g+x,l[6]=i*u+e*p+y,l[7]=i*d+e*g+x),l},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,i){var h=this.getX(n,e);return i&&(h=Math.round(h)),h},getYRound:function(n,e,i){var h=this.getY(n,e);return i&&(h=Math.round(h)),h},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}});c.exports=r},59715:c=>{/** + */var o=t(83419),v=t(36383),a=t(26099),r=new o({initialize:function(e,i,h,s,l,f){e===void 0&&(e=1),i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=1),l===void 0&&(l=0),f===void 0&&(f=0),this.matrix=new Float32Array([e,i,h,s,l,f,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],i=n[1],h=n[2],s=n[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):h||s?v.TAU-(s>0?Math.acos(-h/this.scaleY):-Math.acos(h/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 i=this.matrix;return i[4]=i[0]*n+i[2]*e+i[4],i[5]=i[1]*n+i[3]*e+i[5],this},scale:function(n,e){var i=this.matrix;return i[0]*=n,i[1]*=n,i[2]*=e,i[3]*=e,this},rotate:function(n){var e=Math.sin(n),i=Math.cos(n),h=this.matrix,s=h[0],l=h[1],f=h[2],u=h[3];return h[0]=s*i+f*e,h[1]=l*i+u*e,h[2]=s*-e+f*i,h[3]=l*-e+u*i,this},multiply:function(n,e){var i=this.matrix,h=n.matrix,s=i[0],l=i[1],f=i[2],u=i[3],d=i[4],p=i[5],g=h[0],y=h[1],x=h[2],C=h[3],P=h[4],M=h[5],w=e===void 0?i:e.matrix;return w[0]=g*s+y*f,w[1]=g*l+y*u,w[2]=x*s+C*f,w[3]=x*l+C*u,w[4]=P*s+M*f+d,w[5]=P*l+M*u+p,w},multiplyWithOffset:function(n,e,i){var h=this.matrix,s=n.matrix,l=h[0],f=h[1],u=h[2],d=h[3],p=h[4],g=h[5],y=e*l+i*u+p,x=e*f+i*d+g,C=s[0],P=s[1],M=s[2],w=s[3],I=s[4],L=s[5];return h[0]=C*l+P*u,h[1]=C*f+P*d,h[2]=M*l+w*u,h[3]=M*f+w*d,h[4]=I*l+L*u+y,h[5]=I*f+L*d+x,this},transform:function(n,e,i,h,s,l){var f=this.matrix,u=f[0],d=f[1],p=f[2],g=f[3],y=f[4],x=f[5];return f[0]=n*u+e*p,f[1]=n*d+e*g,f[2]=i*u+h*p,f[3]=i*d+h*g,f[4]=s*u+l*p+y,f[5]=s*d+l*g+x,this},transformPoint:function(n,e,i){i===void 0&&(i={x:0,y:0});var h=this.matrix,s=h[0],l=h[1],f=h[2],u=h[3],d=h[4],p=h[5];return i.x=n*s+e*f+d,i.y=n*l+e*u+p,i},invert:function(){var n=this.matrix,e=n[0],i=n[1],h=n[2],s=n[3],l=n[4],f=n[5],u=e*s-i*h;return n[0]=s/u,n[1]=-i/u,n[2]=-h/u,n[3]=e/u,n[4]=(h*f-s*l)/u,n[5]=-(e*f-i*l)/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,i,h,s,l){var f=this.matrix;return f[0]=n,f[1]=e,f[2]=i,f[3]=h,f[4]=s,f[5]=l,this},decomposeMatrix:function(){var n=this.decomposedMatrix,e=this.matrix,i=e[0],h=e[1],s=e[2],l=e[3],f=i*l-h*s;if(n.translateX=e[4],n.translateY=e[5],i||h){var u=Math.sqrt(i*i+h*h);n.rotation=h>0?Math.acos(i/u):-Math.acos(i/u),n.scaleX=u,n.scaleY=f/u}else if(s||l){var d=Math.sqrt(s*s+l*l);n.rotation=Math.PI*.5-(l>0?Math.acos(-s/d):-Math.acos(s/d)),n.scaleX=f/d,n.scaleY=d}else n.rotation=0,n.scaleX=0,n.scaleY=0;return n},applyITRS:function(n,e,i,h,s){var l=this.matrix,f=Math.sin(i),u=Math.cos(i);return l[4]=n,l[5]=e,l[0]=u*h,l[1]=f*h,l[2]=-f*s,l[3]=u*s,this},applyInverse:function(n,e,i){i===void 0&&(i=new a);var h=this.matrix,s=h[0],l=h[1],f=h[2],u=h[3],d=h[4],p=h[5],g=1/(s*u+f*-l);return i.x=u*g*n+-f*g*e+(p*f-d*u)*g,i.y=s*g*e+-l*g*n+(-p*s+d*l)*g,i},setQuad:function(n,e,i,h,s,l){s===void 0&&(s=!1),l===void 0&&(l=this.quad);var f=this.matrix,u=f[0],d=f[1],p=f[2],g=f[3],y=f[4],x=f[5];return s?(l[0]=Math.round(n*u+e*p+y),l[1]=Math.round(n*d+e*g+x),l[2]=Math.round(n*u+h*p+y),l[3]=Math.round(n*d+h*g+x),l[4]=Math.round(i*u+h*p+y),l[5]=Math.round(i*d+h*g+x),l[6]=Math.round(i*u+e*p+y),l[7]=Math.round(i*d+e*g+x)):(l[0]=n*u+e*p+y,l[1]=n*d+e*g+x,l[2]=n*u+h*p+y,l[3]=n*d+h*g+x,l[4]=i*u+h*p+y,l[5]=i*d+h*g+x,l[6]=i*u+e*p+y,l[7]=i*d+e*g+x),l},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,i){var h=this.getX(n,e);return i&&(h=Math.round(h)),h},getYRound:function(n,e,i){var h=this.getY(n,e);return i&&(h=Math.round(h)),h},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}});c.exports=r},59715:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=1,t={_visible:!0,visible:{get:function(){return this._visible},set:function(a){a?(this._visible=!0,this.renderFlags|=m):(this._visible=!1,this.renderFlags&=~m)}},setVisible:function(a){return this.visible=a,this}};c.exports=t},31401:(c,m,t)=>{/** + */var m=1,t={_visible:!0,visible:{get:function(){return this._visible},set:function(o){o?(this._visible=!0,this.renderFlags|=m):(this._visible=!1,this.renderFlags&=~m)}},setVisible:function(o){return this.visible=o,this}};c.exports=t},31401:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1370,32 +1370,32 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37105),v=t(10312),o=t(83419),r=t(31401),n=t(51708),e=t(95643),i=t(87841),h=t(29959),s=t(36899),l=t(26099),f=new o({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.ComputedSize,r.Depth,r.Mask,r.PostPipeline,r.Transform,r.Visible,h],initialize:function(d,p,g,y){e.call(this,d,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new r.TransformMatrix,this.tempTransformMatrix=new r.TransformMatrix,this._sortKey="",this._sysEvents=d.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(p,g),this.setBlendMode(v.SKIP_CHECK),y&&this.add(y)},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(u){return u===void 0&&(u=!0),this.exclusive=u,this},getBounds:function(u){if(u===void 0&&(u=new i),u.setTo(this.x,this.y,0,0),this.parentContainer){var d=this.parentContainer.getBoundsTransformMatrix(),p=d.transformPoint(this.x,this.y);u.setTo(p.x,p.y,0,0)}if(this.list.length>0){var g=this.list,y=new i,x=!1;u.setEmpty();for(var T=0;T-1},setAll:function(u,d,p,g){return a.SetAll(this.list,u,d,p,g),this},each:function(u,d){var p=[null],g,y=this.list.slice(),x=y.length;for(g=2;g0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]},onChildDestroyed:function(u){a.Remove(this.list,u),this.exclusive&&(u.parentContainer=null,u.removedFromScene())}});c.exports=f},53584:c=>{/** + */var o=t(37105),v=t(10312),a=t(83419),r=t(31401),n=t(51708),e=t(95643),i=t(87841),h=t(29959),s=t(36899),l=t(26099),f=new a({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.ComputedSize,r.Depth,r.Mask,r.PostPipeline,r.Transform,r.Visible,h],initialize:function(d,p,g,y){e.call(this,d,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new r.TransformMatrix,this.tempTransformMatrix=new r.TransformMatrix,this._sortKey="",this._sysEvents=d.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(p,g),this.setBlendMode(v.SKIP_CHECK),y&&this.add(y)},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(u){return u===void 0&&(u=!0),this.exclusive=u,this},getBounds:function(u){if(u===void 0&&(u=new i),u.setTo(this.x,this.y,0,0),this.parentContainer){var d=this.parentContainer.getBoundsTransformMatrix(),p=d.transformPoint(this.x,this.y);u.setTo(p.x,p.y,0,0)}if(this.list.length>0){var g=this.list,y=new i,x=!1;u.setEmpty();for(var C=0;C-1},setAll:function(u,d,p,g){return o.SetAll(this.list,u,d,p,g),this},each:function(u,d){var p=[null],g,y=this.list.slice(),x=y.length;for(g=2;g0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]},onChildDestroyed:function(u){o.Remove(this.list,u),this.exclusive&&(u.parentContainer=null,u.removedFromScene())}});c.exports=f},53584:c=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v.addToRenderList(a);var r=a.list;if(r.length!==0){var n=a.localTransform;o?(n.loadIdentity(),n.multiply(o),n.translate(a.x,a.y),n.rotate(a.rotation),n.scale(a.scaleX,a.scaleY)):n.applyITRS(a.x,a.y,a.rotation,a.scaleX,a.scaleY);var e=a.blendMode!==-1;e||t.setBlendMode(0);var i=a._alpha,h=a.scrollFactorX,s=a.scrollFactorY;a.mask&&a.mask.preRenderCanvas(t,null,v);for(var l=0;l{/** + */var m=function(t,o,v,a){v.addToRenderList(o);var r=o.list;if(r.length!==0){var n=o.localTransform;a?(n.loadIdentity(),n.multiply(a),n.translate(o.x,o.y),n.rotate(o.rotation),n.scale(o.scaleX,o.scaleY)):n.applyITRS(o.x,o.y,o.rotation,o.scaleX,o.scaleY);var e=o.blendMode!==-1;e||t.setBlendMode(0);var i=o._alpha,h=o.scrollFactorX,s=o.scrollFactorY;o.mask&&o.mask.preRenderCanvas(t,null,v);for(var l=0;l{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(31559),o=t(44603),r=t(23568),n=t(95540);o.register("container",function(e,i){e===void 0&&(e={});var h=r(e,"x",0),s=r(e,"y",0),l=n(e,"children",null),f=new v(this.scene,h,s,l);return i!==void 0&&(e.add=i),a(this.scene,f,e),f})},24961:(c,m,t)=>{/** + */var o=t(25305),v=t(31559),a=t(44603),r=t(23568),n=t(95540);a.register("container",function(e,i){e===void 0&&(e={});var h=r(e,"x",0),s=r(e,"y",0),l=n(e,"children",null),f=new v(this.scene,h,s,l);return i!==void 0&&(e.add=i),o(this.scene,f,e),f})},24961:(c,m,t)=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(31559),v=t(39429);v.register("container",function(o,r,n){return this.displayList.add(new a(this.scene,o,r,n))})},29959:(c,m,t)=>{/** + */var o=t(31559),v=t(39429);v.register("container",function(a,r,n){return this.displayList.add(new o(this.scene,a,r,n))})},29959:(c,m,t)=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(72249),o=t(53584),c.exports={renderWebGL:v,renderCanvas:o}},72249:c=>{/** + */var o=t(29747),v=o,a=o;v=t(72249),a=t(53584),c.exports={renderWebGL:v,renderCanvas:a}},72249:c=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v.addToRenderList(a);var r=a.list,n=r.length;if(n!==0){var e=a.localTransform;o?(e.loadIdentity(),e.multiply(o),e.translate(a.x,a.y),e.rotate(a.rotation),e.scale(a.scaleX,a.scaleY)):e.applyITRS(a.x,a.y,a.rotation,a.scaleX,a.scaleY),t.pipelines.preBatch(a);var i=a.blendMode!==-1;i||t.setBlendMode(0);for(var h=a.alpha,s=a.scrollFactorX,l=a.scrollFactorY,f=0;f{/** + */var m=function(t,o,v,a){v.addToRenderList(o);var r=o.list,n=r.length;if(n!==0){var e=o.localTransform;a?(e.loadIdentity(),e.multiply(a),e.translate(o.x,o.y),e.rotate(o.rotation),e.scale(o.scaleX,o.scaleY)):e.applyITRS(o.x,o.y,o.rotation,o.scaleX,o.scaleY),t.pipelines.preBatch(o);var i=o.blendMode!==-1;i||t.setBlendMode(0);for(var h=o.alpha,s=o.scrollFactorX,l=o.scrollFactorY,f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1403,19 +1403,19 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(441),r=t(95643),n=t(41212),e=t(35846),i=t(44594),h=t(61369),s=new a({Extends:r,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.Origin,v.ScrollFactor,v.Transform,v.Visible,o],initialize:function(f,u,d,p,g,y){r.call(this,f,"DOMElement"),this.parent=f.sys.game.domContainer,this.cache=f.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new h,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,d),typeof p=="string"?p[0]==="#"?this.setElement(p.substr(1),g,y):this.createElement(p,g,y):p&&this.setElement(p,g,y),f.sys.events.on(i.SLEEP,this.handleSceneEvent,this),f.sys.events.on(i.WAKE,this.handleSceneEvent,this),f.sys.events.on(i.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(l){var f=this.node,u=f.style;f&&(u.display=l.settings.visible?"block":"none")},setSkew:function(l,f){return l===void 0&&(l=0),f===void 0&&(f=l),this.skewX=l,this.skewY=f,this},setPerspective:function(l){return this.parent.style.perspective=l+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(l){this.parent.style.perspective=l+"px"}},addListener:function(l){if(this.node){l=l.split(" ");for(var f=0;f{/** + */var o=t(83419),v=t(31401),a=t(441),r=t(95643),n=t(41212),e=t(35846),i=t(44594),h=t(61369),s=new o({Extends:r,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.Origin,v.ScrollFactor,v.Transform,v.Visible,a],initialize:function(f,u,d,p,g,y){r.call(this,f,"DOMElement"),this.parent=f.sys.game.domContainer,this.cache=f.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new h,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,d),typeof p=="string"?p[0]==="#"?this.setElement(p.substr(1),g,y):this.createElement(p,g,y):p&&this.setElement(p,g,y),f.sys.events.on(i.SLEEP,this.handleSceneEvent,this),f.sys.events.on(i.WAKE,this.handleSceneEvent,this),f.sys.events.on(i.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(l){var f=this.node,u=f.style;f&&(u.display=l.settings.visible?"block":"none")},setSkew:function(l,f){return l===void 0&&(l=0),f===void 0&&(f=l),this.skewX=l,this.skewY=f,this},setPerspective:function(l){return this.parent.style.perspective=l+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(l){this.parent.style.perspective=l+"px"}},addListener:function(l){if(this.node){l=l.split(" ");for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(47407),v=t(95643),o=t(61340),r=new o,n=new o,e=new o,i=function(h,s,l,f){if(s.node){var u=s.node.style,d=s.scene.sys.settings;if(!u||!d.visible||v.RENDER_MASK!==s.renderFlags||s.cameraFilter!==0&&s.cameraFilter&l.id||s.parentContainer&&!s.parentContainer.willRender()){u.display="none";return}var p=s.parentContainer,g=l.alpha*s.alpha;p&&(g*=p.alpha);var y=r,x=n,T=e,C=0,M=0,w="0%",L="0%";f?(C=s.width*s.scaleX*s.originX,M=s.height*s.scaleY*s.originY,x.applyITRS(s.x-C,s.y-M,s.rotation,s.scaleX,s.scaleY),y.copyFrom(l.matrix),y.multiplyWithOffset(f,-l.scrollX*s.scrollFactorX,-l.scrollY*s.scrollFactorY),x.e=s.x-C,x.f=s.y-M,y.multiply(x,T)):(C=s.width*s.originX,M=s.height*s.originY,x.applyITRS(s.x-C,s.y-M,s.rotation,s.scaleX,s.scaleY),y.copyFrom(l.matrix),w=100*s.originX+"%",L=100*s.originY+"%",x.e-=l.scrollX*s.scrollFactorX,x.f-=l.scrollY*s.scrollFactorY,y.multiply(x,T)),s.transformOnly||(u.display="block",u.opacity=g,u.zIndex=s._depth,u.pointerEvents=s.pointerEvents,u.mixBlendMode=a[s._blendMode]),u.transform=T.getCSSMatrix()+" skew("+s.skewX+"rad, "+s.skewY+"rad) rotate3d("+s.rotate3d.x+","+s.rotate3d.y+","+s.rotate3d.z+","+s.rotate3d.w+s.rotate3dAngle+")",u.transformOrigin=w+" "+L}};c.exports=i},2611:(c,m,t)=>{/** + */var o=t(47407),v=t(95643),a=t(61340),r=new a,n=new a,e=new a,i=function(h,s,l,f){if(s.node){var u=s.node.style,d=s.scene.sys.settings;if(!u||!d.visible||v.RENDER_MASK!==s.renderFlags||s.cameraFilter!==0&&s.cameraFilter&l.id||s.parentContainer&&!s.parentContainer.willRender()){u.display="none";return}var p=s.parentContainer,g=l.alpha*s.alpha;p&&(g*=p.alpha);var y=r,x=n,C=e,P=0,M=0,w="0%",I="0%";f?(P=s.width*s.scaleX*s.originX,M=s.height*s.scaleY*s.originY,x.applyITRS(s.x-P,s.y-M,s.rotation,s.scaleX,s.scaleY),y.copyFrom(l.matrix),y.multiplyWithOffset(f,-l.scrollX*s.scrollFactorX,-l.scrollY*s.scrollFactorY),x.e=s.x-P,x.f=s.y-M,y.multiply(x,C)):(P=s.width*s.originX,M=s.height*s.originY,x.applyITRS(s.x-P,s.y-M,s.rotation,s.scaleX,s.scaleY),y.copyFrom(l.matrix),w=100*s.originX+"%",I=100*s.originY+"%",x.e-=l.scrollX*s.scrollFactorX,x.f-=l.scrollY*s.scrollFactorY,y.multiply(x,C)),s.transformOnly||(u.display="block",u.opacity=g,u.zIndex=s._depth,u.pointerEvents=s.pointerEvents,u.mixBlendMode=o[s._blendMode]),u.transform=C.getCSSMatrix()+" skew("+s.skewX+"rad, "+s.skewY+"rad) rotate3d("+s.rotate3d.x+","+s.rotate3d.y+","+s.rotate3d.z+","+s.rotate3d.w+s.rotate3dAngle+")",u.transformOrigin=w+" "+I}};c.exports=i},2611:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(3069),v=t(39429);v.register("dom",function(o,r,n,e,i){var h=new a(this.scene,o,r,n,e,i);return this.displayList.add(h),h})},441:(c,m,t)=>{/** + */var o=t(3069),v=t(39429);v.register("dom",function(a,r,n,e,i){var h=new o(this.scene,a,r,n,e,i);return this.displayList.add(h),h})},441:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(49381),o=t(49381),c.exports={renderWebGL:v,renderCanvas:o}},62980:c=>{/** + */var o=t(29747),v=o,a=o;v=t(49381),a=t(49381),c.exports={renderWebGL:v,renderCanvas:a}},62980:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1495,19 +1495,19 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(95643),r=t(64993),n=new a({Extends:o,Mixins:[v.Alpha,v.BlendMode,v.Depth,v.Flip,v.Origin,v.ScrollFactor,v.Size,v.Texture,v.Tint,v.Transform,v.Visible,r],initialize:function(i){o.call(this,i,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});c.exports=n},70217:()=>{},56315:(c,m,t)=>{/** + */var o=t(83419),v=t(31401),a=t(95643),r=t(64993),n=new o({Extends:a,Mixins:[v.Alpha,v.BlendMode,v.Depth,v.Flip,v.Origin,v.ScrollFactor,v.Size,v.Texture,v.Tint,v.Transform,v.Visible,r],initialize:function(i){a.call(this,i,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});c.exports=n},70217:()=>{},56315:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(42421),v=t(39429);v.register("extern",function(){var o=new a(this.scene);return this.displayList.add(o),o})},64993:(c,m,t)=>{/** + */var o=t(42421),v=t(39429);v.register("extern",function(){var a=new o(this.scene);return this.displayList.add(a),a})},64993:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(80287),o=t(70217),c.exports={renderWebGL:v,renderCanvas:o}},80287:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(80287),a=t(70217),c.exports={renderWebGL:v,renderCanvas:a}},80287:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=function(o,r,n,e){o.pipelines.clear();var i=a(r,n,e).calc;r.render.call(r,o,n,i),o.pipelines.rebind()};c.exports=v},85592:c=>{/** + */var o=t(91296),v=function(a,r,n,e){a.pipelines.clear();var i=o(r,n,e).calc;r.render.call(r,a,n,i),a.pipelines.rebind()};c.exports=v},85592:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1515,107 +1515,107 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(71911),v=t(83419),o=t(85592),r=t(31401),n=t(8497),e=t(95643),i=t(95540),h=t(35154),s=t(36383),l=t(84503),f=new v({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.Transform,r.Visible,r.ScrollFactor,l],initialize:function(d,p){var g=h(p,"x",0),y=h(p,"y",0);e.call(this,d,"Graphics"),this.setPosition(g,y),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(p)},setDefaultStyles:function(u){return h(u,"lineStyle",null)&&(this.defaultStrokeWidth=h(u,"lineStyle.width",1),this.defaultStrokeColor=h(u,"lineStyle.color",16777215),this.defaultStrokeAlpha=h(u,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),h(u,"fillStyle",null)&&(this.defaultFillColor=h(u,"fillStyle.color",16777215),this.defaultFillAlpha=h(u,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(u,d,p){return p===void 0&&(p=1),this.commandBuffer.push(o.LINE_STYLE,u,d,p),this._lineWidth=u,this},fillStyle:function(u,d){return d===void 0&&(d=1),this.commandBuffer.push(o.FILL_STYLE,u,d),this},fillGradientStyle:function(u,d,p,g,y,x,T,C){return y===void 0&&(y=1),x===void 0&&(x=y),T===void 0&&(T=y),C===void 0&&(C=y),this.commandBuffer.push(o.GRADIENT_FILL_STYLE,y,x,T,C,u,d,p,g),this},lineGradientStyle:function(u,d,p,g,y,x){return x===void 0&&(x=1),this.commandBuffer.push(o.GRADIENT_LINE_STYLE,u,x,d,p,g,y),this},beginPath:function(){return this.commandBuffer.push(o.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(o.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(o.FILL_PATH),this},fill:function(){return this.commandBuffer.push(o.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(o.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(o.STROKE_PATH),this},fillCircleShape:function(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,d,p){return this.beginPath(),this.arc(u,d,p,0,s.PI2),this.fillPath(),this},strokeCircle:function(u,d,p){return this.beginPath(),this.arc(u,d,p,0,s.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,d,p,g){return this.commandBuffer.push(o.FILL_RECT,u,d,p,g),this},strokeRect:function(u,d,p,g){var y=this._lineWidth/2,x=u-y,T=u+y;return this.beginPath(),this.moveTo(u,d),this.lineTo(u,d+g),this.strokePath(),this.beginPath(),this.moveTo(u+p,d),this.lineTo(u+p,d+g),this.strokePath(),this.beginPath(),this.moveTo(x,d),this.lineTo(T+p,d),this.strokePath(),this.beginPath(),this.moveTo(x,d+g),this.lineTo(T+p,d+g),this.strokePath(),this},fillRoundedRect:function(u,d,p,g,y){y===void 0&&(y=20);var x=y,T=y,C=y,M=y;typeof y!="number"&&(x=i(y,"tl",20),T=i(y,"tr",20),C=i(y,"bl",20),M=i(y,"br",20));var w=x>=0,L=T>=0,F=C>=0,O=M>=0;return x=Math.abs(x),T=Math.abs(T),C=Math.abs(C),M=Math.abs(M),this.beginPath(),this.moveTo(u+x,d),this.lineTo(u+p-T,d),L?this.arc(u+p-T,d+T,T,-s.TAU,0):this.arc(u+p,d,T,Math.PI,s.TAU,!0),this.lineTo(u+p,d+g-M),O?this.arc(u+p-M,d+g-M,M,0,s.TAU):this.arc(u+p,d+g,M,-s.TAU,Math.PI,!0),this.lineTo(u+C,d+g),F?this.arc(u+C,d+g-C,C,s.TAU,Math.PI):this.arc(u,d+g,C,0,-s.TAU,!0),this.lineTo(u,d+x),w?this.arc(u+x,d+x,x,-Math.PI,-s.TAU):this.arc(u,d,x,s.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(u,d,p,g,y){y===void 0&&(y=20);var x=y,T=y,C=y,M=y,w=Math.min(p,g)/2;typeof y!="number"&&(x=i(y,"tl",20),T=i(y,"tr",20),C=i(y,"bl",20),M=i(y,"br",20));var L=x>=0,F=T>=0,O=C>=0,N=M>=0;return x=Math.min(Math.abs(x),w),T=Math.min(Math.abs(T),w),C=Math.min(Math.abs(C),w),M=Math.min(Math.abs(M),w),this.beginPath(),this.moveTo(u+x,d),this.lineTo(u+p-T,d),this.moveTo(u+p-T,d),F?this.arc(u+p-T,d+T,T,-s.TAU,0):this.arc(u+p,d,T,Math.PI,s.TAU,!0),this.lineTo(u+p,d+g-M),this.moveTo(u+p,d+g-M),N?this.arc(u+p-M,d+g-M,M,0,s.TAU):this.arc(u+p,d+g,M,-s.TAU,Math.PI,!0),this.lineTo(u+C,d+g),this.moveTo(u+C,d+g),O?this.arc(u+C,d+g-C,C,s.TAU,Math.PI):this.arc(u,d+g,C,0,-s.TAU,!0),this.lineTo(u,d+x),this.moveTo(u,d+x),L?this.arc(u+x,d+x,x,-Math.PI,-s.TAU):this.arc(u,d,x,s.TAU,0,!0),this.strokePath(),this},fillPointShape:function(u,d){return this.fillPoint(u.x,u.y,d)},fillPoint:function(u,d,p){return!p||p<1?p=1:(u-=p/2,d-=p/2),this.commandBuffer.push(o.FILL_RECT,u,d,p,p),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,d,p,g,y,x){return this.commandBuffer.push(o.FILL_TRIANGLE,u,d,p,g,y,x),this},strokeTriangle:function(u,d,p,g,y,x){return this.commandBuffer.push(o.STROKE_TRIANGLE,u,d,p,g,y,x),this},strokeLineShape:function(u){return this.lineBetween(u.x1,u.y1,u.x2,u.y2)},lineBetween:function(u,d,p,g){return this.beginPath(),this.moveTo(u,d),this.lineTo(p,g),this.strokePath(),this},lineTo:function(u,d){return this.commandBuffer.push(o.LINE_TO,u,d),this},moveTo:function(u,d){return this.commandBuffer.push(o.MOVE_TO,u,d),this},strokePoints:function(u,d,p,g){d===void 0&&(d=!1),p===void 0&&(p=!1),g===void 0&&(g=u.length),this.beginPath(),this.moveTo(u[0].x,u[0].y);for(var y=1;y-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(u,d,p){var g=this.scene.sys,y=g.game.renderer;d===void 0&&(d=g.scale.width),p===void 0&&(p=g.scale.height),f.TargetCamera.setScene(this.scene),f.TargetCamera.setViewport(0,0,d,p),f.TargetCamera.scrollX=this.x,f.TargetCamera.scrollY=this.y;var x,T,C={willReadFrequently:!0};if(typeof u=="string")if(g.textures.exists(u)){x=g.textures.get(u);var M=x.getSourceImage();M instanceof HTMLCanvasElement&&(T=M.getContext("2d",C))}else x=g.textures.createCanvas(u,d,p),T=x.getSourceImage().getContext("2d",C);else u instanceof HTMLCanvasElement&&(T=u.getContext("2d",C));return T&&(this.renderCanvas(y,this,f.TargetCamera,null,T,!1),x&&x.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});f.TargetCamera=new a,c.exports=f},32768:(c,m,t)=>{/** + */var o=t(71911),v=t(83419),a=t(85592),r=t(31401),n=t(8497),e=t(95643),i=t(95540),h=t(35154),s=t(36383),l=t(84503),f=new v({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.Transform,r.Visible,r.ScrollFactor,l],initialize:function(d,p){var g=h(p,"x",0),y=h(p,"y",0);e.call(this,d,"Graphics"),this.setPosition(g,y),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(p)},setDefaultStyles:function(u){return h(u,"lineStyle",null)&&(this.defaultStrokeWidth=h(u,"lineStyle.width",1),this.defaultStrokeColor=h(u,"lineStyle.color",16777215),this.defaultStrokeAlpha=h(u,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),h(u,"fillStyle",null)&&(this.defaultFillColor=h(u,"fillStyle.color",16777215),this.defaultFillAlpha=h(u,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(u,d,p){return p===void 0&&(p=1),this.commandBuffer.push(a.LINE_STYLE,u,d,p),this._lineWidth=u,this},fillStyle:function(u,d){return d===void 0&&(d=1),this.commandBuffer.push(a.FILL_STYLE,u,d),this},fillGradientStyle:function(u,d,p,g,y,x,C,P){return y===void 0&&(y=1),x===void 0&&(x=y),C===void 0&&(C=y),P===void 0&&(P=y),this.commandBuffer.push(a.GRADIENT_FILL_STYLE,y,x,C,P,u,d,p,g),this},lineGradientStyle:function(u,d,p,g,y,x){return x===void 0&&(x=1),this.commandBuffer.push(a.GRADIENT_LINE_STYLE,u,x,d,p,g,y),this},beginPath:function(){return this.commandBuffer.push(a.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(a.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(a.FILL_PATH),this},fill:function(){return this.commandBuffer.push(a.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(a.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(a.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,d,p){return this.beginPath(),this.arc(u,d,p,0,s.PI2),this.fillPath(),this},strokeCircle:function(u,d,p){return this.beginPath(),this.arc(u,d,p,0,s.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,d,p,g){return this.commandBuffer.push(a.FILL_RECT,u,d,p,g),this},strokeRect:function(u,d,p,g){var y=this._lineWidth/2,x=u-y,C=u+y;return this.beginPath(),this.moveTo(u,d),this.lineTo(u,d+g),this.strokePath(),this.beginPath(),this.moveTo(u+p,d),this.lineTo(u+p,d+g),this.strokePath(),this.beginPath(),this.moveTo(x,d),this.lineTo(C+p,d),this.strokePath(),this.beginPath(),this.moveTo(x,d+g),this.lineTo(C+p,d+g),this.strokePath(),this},fillRoundedRect:function(u,d,p,g,y){y===void 0&&(y=20);var x=y,C=y,P=y,M=y;typeof y!="number"&&(x=i(y,"tl",20),C=i(y,"tr",20),P=i(y,"bl",20),M=i(y,"br",20));var w=x>=0,I=C>=0,L=P>=0,B=M>=0;return x=Math.abs(x),C=Math.abs(C),P=Math.abs(P),M=Math.abs(M),this.beginPath(),this.moveTo(u+x,d),this.lineTo(u+p-C,d),I?this.arc(u+p-C,d+C,C,-s.TAU,0):this.arc(u+p,d,C,Math.PI,s.TAU,!0),this.lineTo(u+p,d+g-M),B?this.arc(u+p-M,d+g-M,M,0,s.TAU):this.arc(u+p,d+g,M,-s.TAU,Math.PI,!0),this.lineTo(u+P,d+g),L?this.arc(u+P,d+g-P,P,s.TAU,Math.PI):this.arc(u,d+g,P,0,-s.TAU,!0),this.lineTo(u,d+x),w?this.arc(u+x,d+x,x,-Math.PI,-s.TAU):this.arc(u,d,x,s.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(u,d,p,g,y){y===void 0&&(y=20);var x=y,C=y,P=y,M=y,w=Math.min(p,g)/2;typeof y!="number"&&(x=i(y,"tl",20),C=i(y,"tr",20),P=i(y,"bl",20),M=i(y,"br",20));var I=x>=0,L=C>=0,B=P>=0,N=M>=0;return x=Math.min(Math.abs(x),w),C=Math.min(Math.abs(C),w),P=Math.min(Math.abs(P),w),M=Math.min(Math.abs(M),w),this.beginPath(),this.moveTo(u+x,d),this.lineTo(u+p-C,d),this.moveTo(u+p-C,d),L?this.arc(u+p-C,d+C,C,-s.TAU,0):this.arc(u+p,d,C,Math.PI,s.TAU,!0),this.lineTo(u+p,d+g-M),this.moveTo(u+p,d+g-M),N?this.arc(u+p-M,d+g-M,M,0,s.TAU):this.arc(u+p,d+g,M,-s.TAU,Math.PI,!0),this.lineTo(u+P,d+g),this.moveTo(u+P,d+g),B?this.arc(u+P,d+g-P,P,s.TAU,Math.PI):this.arc(u,d+g,P,0,-s.TAU,!0),this.lineTo(u,d+x),this.moveTo(u,d+x),I?this.arc(u+x,d+x,x,-Math.PI,-s.TAU):this.arc(u,d,x,s.TAU,0,!0),this.strokePath(),this},fillPointShape:function(u,d){return this.fillPoint(u.x,u.y,d)},fillPoint:function(u,d,p){return!p||p<1?p=1:(u-=p/2,d-=p/2),this.commandBuffer.push(a.FILL_RECT,u,d,p,p),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,d,p,g,y,x){return this.commandBuffer.push(a.FILL_TRIANGLE,u,d,p,g,y,x),this},strokeTriangle:function(u,d,p,g,y,x){return this.commandBuffer.push(a.STROKE_TRIANGLE,u,d,p,g,y,x),this},strokeLineShape:function(u){return this.lineBetween(u.x1,u.y1,u.x2,u.y2)},lineBetween:function(u,d,p,g){return this.beginPath(),this.moveTo(u,d),this.lineTo(p,g),this.strokePath(),this},lineTo:function(u,d){return this.commandBuffer.push(a.LINE_TO,u,d),this},moveTo:function(u,d){return this.commandBuffer.push(a.MOVE_TO,u,d),this},strokePoints:function(u,d,p,g){d===void 0&&(d=!1),p===void 0&&(p=!1),g===void 0&&(g=u.length),this.beginPath(),this.moveTo(u[0].x,u[0].y);for(var y=1;y-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(u,d,p){var g=this.scene.sys,y=g.game.renderer;d===void 0&&(d=g.scale.width),p===void 0&&(p=g.scale.height),f.TargetCamera.setScene(this.scene),f.TargetCamera.setViewport(0,0,d,p),f.TargetCamera.scrollX=this.x,f.TargetCamera.scrollY=this.y;var x,C,P={willReadFrequently:!0};if(typeof u=="string")if(g.textures.exists(u)){x=g.textures.get(u);var M=x.getSourceImage();M instanceof HTMLCanvasElement&&(C=M.getContext("2d",P))}else x=g.textures.createCanvas(u,d,p),C=x.getSourceImage().getContext("2d",P);else u instanceof HTMLCanvasElement&&(C=u.getContext("2d",P));return C&&(this.renderCanvas(y,this,f.TargetCamera,null,C,!1),x&&x.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});f.TargetCamera=new o,c.exports=f},32768:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(85592),v=t(20926),o=function(r,n,e,i,h,s){var l=n.commandBuffer,f=l.length,u=h||r.currentContext;if(!(f===0||!v(r,u,n,e,i))){e.addToRenderList(n);var d=1,p=1,g=0,y=0,x=1,T=0,C=0,M=0;u.beginPath();for(var w=0;w>>16,C=(g&65280)>>>8,M=g&255,u.strokeStyle="rgba("+T+","+C+","+M+","+d+")",u.lineWidth=x,w+=3;break;case a.FILL_STYLE:y=l[w+1],p=l[w+2],T=(y&16711680)>>>16,C=(y&65280)>>>8,M=y&255,u.fillStyle="rgba("+T+","+C+","+M+","+p+")",w+=2;break;case a.BEGIN_PATH:u.beginPath();break;case a.CLOSE_PATH:u.closePath();break;case a.FILL_PATH:s||u.fill();break;case a.STROKE_PATH:s||u.stroke();break;case a.FILL_RECT:s?u.rect(l[w+1],l[w+2],l[w+3],l[w+4]):u.fillRect(l[w+1],l[w+2],l[w+3],l[w+4]),w+=4;break;case a.FILL_TRIANGLE:u.beginPath(),u.moveTo(l[w+1],l[w+2]),u.lineTo(l[w+3],l[w+4]),u.lineTo(l[w+5],l[w+6]),u.closePath(),s||u.fill(),w+=6;break;case a.STROKE_TRIANGLE:u.beginPath(),u.moveTo(l[w+1],l[w+2]),u.lineTo(l[w+3],l[w+4]),u.lineTo(l[w+5],l[w+6]),u.closePath(),s||u.stroke(),w+=6;break;case a.LINE_TO:u.lineTo(l[w+1],l[w+2]),w+=2;break;case a.MOVE_TO:u.moveTo(l[w+1],l[w+2]),w+=2;break;case a.LINE_FX_TO:u.lineTo(l[w+1],l[w+2]),w+=5;break;case a.MOVE_FX_TO:u.moveTo(l[w+1],l[w+2]),w+=5;break;case a.SAVE:u.save();break;case a.RESTORE:u.restore();break;case a.TRANSLATE:u.translate(l[w+1],l[w+2]),w+=2;break;case a.SCALE:u.scale(l[w+1],l[w+2]),w+=2;break;case a.ROTATE:u.rotate(l[w+1]),w+=1;break;case a.GRADIENT_FILL_STYLE:w+=5;break;case a.GRADIENT_LINE_STYLE:w+=6;break}}u.restore()}};c.exports=o},87079:(c,m,t)=>{/** + */var o=t(85592),v=t(20926),a=function(r,n,e,i,h,s){var l=n.commandBuffer,f=l.length,u=h||r.currentContext;if(!(f===0||!v(r,u,n,e,i))){e.addToRenderList(n);var d=1,p=1,g=0,y=0,x=1,C=0,P=0,M=0;u.beginPath();for(var w=0;w>>16,P=(g&65280)>>>8,M=g&255,u.strokeStyle="rgba("+C+","+P+","+M+","+d+")",u.lineWidth=x,w+=3;break;case o.FILL_STYLE:y=l[w+1],p=l[w+2],C=(y&16711680)>>>16,P=(y&65280)>>>8,M=y&255,u.fillStyle="rgba("+C+","+P+","+M+","+p+")",w+=2;break;case o.BEGIN_PATH:u.beginPath();break;case o.CLOSE_PATH:u.closePath();break;case o.FILL_PATH:s||u.fill();break;case o.STROKE_PATH:s||u.stroke();break;case o.FILL_RECT:s?u.rect(l[w+1],l[w+2],l[w+3],l[w+4]):u.fillRect(l[w+1],l[w+2],l[w+3],l[w+4]),w+=4;break;case o.FILL_TRIANGLE:u.beginPath(),u.moveTo(l[w+1],l[w+2]),u.lineTo(l[w+3],l[w+4]),u.lineTo(l[w+5],l[w+6]),u.closePath(),s||u.fill(),w+=6;break;case o.STROKE_TRIANGLE:u.beginPath(),u.moveTo(l[w+1],l[w+2]),u.lineTo(l[w+3],l[w+4]),u.lineTo(l[w+5],l[w+6]),u.closePath(),s||u.stroke(),w+=6;break;case o.LINE_TO:u.lineTo(l[w+1],l[w+2]),w+=2;break;case o.MOVE_TO:u.moveTo(l[w+1],l[w+2]),w+=2;break;case o.LINE_FX_TO:u.lineTo(l[w+1],l[w+2]),w+=5;break;case o.MOVE_FX_TO:u.moveTo(l[w+1],l[w+2]),w+=5;break;case o.SAVE:u.save();break;case o.RESTORE:u.restore();break;case o.TRANSLATE:u.translate(l[w+1],l[w+2]),w+=2;break;case o.SCALE:u.scale(l[w+1],l[w+2]),w+=2;break;case o.ROTATE:u.rotate(l[w+1]),w+=1;break;case o.GRADIENT_FILL_STYLE:w+=5;break;case o.GRADIENT_LINE_STYLE:w+=6;break}}u.restore()}};c.exports=a},87079:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(44603),v=t(43831);a.register("graphics",function(o,r){o===void 0&&(o={}),r!==void 0&&(o.add=r);var n=new v(this.scene,o);return o.add&&this.scene.sys.displayList.add(n),n})},1201:(c,m,t)=>{/** + */var o=t(44603),v=t(43831);o.register("graphics",function(a,r){a===void 0&&(a={}),r!==void 0&&(a.add=r);var n=new v(this.scene,a);return a.add&&this.scene.sys.displayList.add(n),n})},1201:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43831),v=t(39429);v.register("graphics",function(o){return this.displayList.add(new a(this.scene,o))})},84503:(c,m,t)=>{/** + */var o=t(43831),v=t(39429);v.register("graphics",function(a){return this.displayList.add(new o(this.scene,a))})},84503:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(77545),o=t(32768),o=t(32768),c.exports={renderWebGL:v,renderCanvas:o}},77545:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(77545),a=t(32768),a=t(32768),c.exports={renderWebGL:v,renderCanvas:a}},77545:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(85592),v=t(91296),o=t(61340),r=t(70554),n=function(l,f,u){this.x=l,this.y=f,this.width=u},e=function(l,f,u){this.points=[],this.pointsLength=1,this.points[0]=new n(l,f,u)},i=[],h=new o,s=function(l,f,u,d){if(f.commandBuffer.length!==0){u.addToRenderList(f);var p=l.pipelines.set(f.pipeline,f);l.pipelines.preBatch(f);for(var g=v(f,u,d).calc,y=h.loadIdentity(),x=f.commandBuffer,T=u.alpha*f.alpha,C=1,M=p.fillTint,w=p.strokeTint,L=0,F=0,O=0,N=.01,G=Math.PI*2,V,K=[],$=0,J=!0,X=null,Y=r.getTintAppendFloatAlpha,D=0;D0&&(ct=-G+ct%G):ct>G?ct=G:ct<0&&(ct=G+ct%G),X===null&&(X=new e(vt+Math.cos(Et)*Ct,Pt+Math.sin(Et)*Ct,C),K.push(X),at+=N);at<1+pt;)O=ct*at+Et,L=vt+Math.cos(O)*Ct,F=Pt+Math.sin(O)*Ct,X.points.push(new n(L,F,C)),at+=N;O=ct+Et,L=vt+Math.cos(O)*Ct,F=Pt+Math.sin(O)*Ct,X.points.push(new n(L,F,C));break}case a.FILL_RECT:{p.batchFillRect(x[++D],x[++D],x[++D],x[++D],y,g);break}case a.FILL_TRIANGLE:{p.batchFillTriangle(x[++D],x[++D],x[++D],x[++D],x[++D],x[++D],y,g);break}case a.STROKE_TRIANGLE:{p.batchStrokeTriangle(x[++D],x[++D],x[++D],x[++D],x[++D],x[++D],C,y,g);break}case a.LINE_TO:{X!==null?X.points.push(new n(x[++D],x[++D],C)):(X=new e(x[++D],x[++D],C),K.push(X));break}case a.MOVE_TO:{X=new e(x[++D],x[++D],C),K.push(X);break}case a.SAVE:{i.push(y.copyToArray());break}case a.RESTORE:{y.copyFromArray(i.pop());break}case a.TRANSLATE:{vt=x[++D],Pt=x[++D],y.translate(vt,Pt);break}case a.SCALE:{vt=x[++D],Pt=x[++D],y.scale(vt,Pt);break}case a.ROTATE:{y.rotate(x[++D]);break}}l.pipelines.postBatch(f)}};c.exports=s},26479:(c,m,t)=>{/** + */var o=t(85592),v=t(91296),a=t(61340),r=t(70554),n=function(l,f,u){this.x=l,this.y=f,this.width=u},e=function(l,f,u){this.points=[],this.pointsLength=1,this.points[0]=new n(l,f,u)},i=[],h=new a,s=function(l,f,u,d){if(f.commandBuffer.length!==0){u.addToRenderList(f);var p=l.pipelines.set(f.pipeline,f);l.pipelines.preBatch(f);for(var g=v(f,u,d).calc,y=h.loadIdentity(),x=f.commandBuffer,C=u.alpha*f.alpha,P=1,M=p.fillTint,w=p.strokeTint,I=0,L=0,B=0,N=.01,G=Math.PI*2,V,K=[],j=0,J=!0,X=null,Y=r.getTintAppendFloatAlpha,b=0;b0&&(ct=-G+ct%G):ct>G?ct=G:ct<0&&(ct=G+ct%G),X===null&&(X=new e(vt+Math.cos(Pt)*Et,At+Math.sin(Pt)*Et,P),K.push(X),at+=N);at<1+pt;)B=ct*at+Pt,I=vt+Math.cos(B)*Et,L=At+Math.sin(B)*Et,X.points.push(new n(I,L,P)),at+=N;B=ct+Pt,I=vt+Math.cos(B)*Et,L=At+Math.sin(B)*Et,X.points.push(new n(I,L,P));break}case o.FILL_RECT:{p.batchFillRect(x[++b],x[++b],x[++b],x[++b],y,g);break}case o.FILL_TRIANGLE:{p.batchFillTriangle(x[++b],x[++b],x[++b],x[++b],x[++b],x[++b],y,g);break}case o.STROKE_TRIANGLE:{p.batchStrokeTriangle(x[++b],x[++b],x[++b],x[++b],x[++b],x[++b],P,y,g);break}case o.LINE_TO:{X!==null?X.points.push(new n(x[++b],x[++b],P)):(X=new e(x[++b],x[++b],P),K.push(X));break}case o.MOVE_TO:{X=new e(x[++b],x[++b],P),K.push(X);break}case o.SAVE:{i.push(y.copyToArray());break}case o.RESTORE:{y.copyFromArray(i.pop());break}case o.TRANSLATE:{vt=x[++b],At=x[++b],y.translate(vt,At);break}case o.SCALE:{vt=x[++b],At=x[++b],y.scale(vt,At);break}case o.ROTATE:{y.rotate(x[++b]);break}}l.pipelines.postBatch(f)}};c.exports=s},26479:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(61061),v=t(83419),o=t(51708),r=t(50792),n=t(46710),e=t(95540),i=t(35154),h=t(97022),s=t(41212),l=t(88492),f=t(35072),u=t(68287),d=new v({Extends:r,initialize:function(g,y,x){r.call(this),x?y&&!Array.isArray(y)&&(y=[y]):Array.isArray(y)?s(y[0])&&(x=y,y=null):s(y)&&(x=y,y=null),this.scene=g,this.children=new f,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),y&&this.addMultiple(y),x&&this.createMultiple(x),this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(p,g,y,x,T,C){if(p===void 0&&(p=0),g===void 0&&(g=0),y===void 0&&(y=this.defaultKey),x===void 0&&(x=this.defaultFrame),T===void 0&&(T=!0),C===void 0&&(C=!0),this.isFull())return null;var M=new this.classType(this.scene,p,g,y,x);return M.addToDisplayList(this.scene.sys.displayList),M.addToUpdateList(),M.visible=T,M.setActive(C),this.add(M),M},createMultiple:function(p){if(this.isFull())return[];Array.isArray(p)||(p=[p]);var g=[];if(p[0].key)for(var y=0;y=0;O--)if(F=G[O],F.active===y){if(N++,N===g)break}else F=null;return F?(typeof T=="number"&&(F.x=T),typeof C=="number"&&(F.y=C),F):x?this.create(T,C,M,w,L):null},get:function(p,g,y,x,T){return this.getFirst(!1,!0,p,g,y,x,T)},getFirstAlive:function(p,g,y,x,T,C){return this.getFirst(!0,p,g,y,x,T,C)},getFirstDead:function(p,g,y,x,T,C){return this.getFirst(!1,p,g,y,x,T,C)},playAnimation:function(p,g){return a.PlayAnimation(this.children.entries,p,g),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(p){p===void 0&&(p=!0);for(var g=0,y=0;y{/** + */var o=t(61061),v=t(83419),a=t(51708),r=t(50792),n=t(46710),e=t(95540),i=t(35154),h=t(97022),s=t(41212),l=t(88492),f=t(35072),u=t(68287),d=new v({Extends:r,initialize:function(g,y,x){r.call(this),x?y&&!Array.isArray(y)&&(y=[y]):Array.isArray(y)?s(y[0])&&(x=y,y=null):s(y)&&(x=y,y=null),this.scene=g,this.children=new f,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),y&&this.addMultiple(y),x&&this.createMultiple(x),this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(p,g,y,x,C,P){if(p===void 0&&(p=0),g===void 0&&(g=0),y===void 0&&(y=this.defaultKey),x===void 0&&(x=this.defaultFrame),C===void 0&&(C=!0),P===void 0&&(P=!0),this.isFull())return null;var M=new this.classType(this.scene,p,g,y,x);return M.addToDisplayList(this.scene.sys.displayList),M.addToUpdateList(),M.visible=C,M.setActive(P),this.add(M),M},createMultiple:function(p){if(this.isFull())return[];Array.isArray(p)||(p=[p]);var g=[];if(p[0].key)for(var y=0;y=0;B--)if(L=G[B],L.active===y){if(N++,N===g)break}else L=null;return L?(typeof C=="number"&&(L.x=C),typeof P=="number"&&(L.y=P),L):x?this.create(C,P,M,w,I):null},get:function(p,g,y,x,C){return this.getFirst(!1,!0,p,g,y,x,C)},getFirstAlive:function(p,g,y,x,C,P){return this.getFirst(!0,p,g,y,x,C,P)},getFirstDead:function(p,g,y,x,C,P){return this.getFirst(!1,p,g,y,x,C,P)},playAnimation:function(p,g){return o.PlayAnimation(this.children.entries,p,g),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(p){p===void 0&&(p=!0);for(var g=0,y=0;y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(44603),v=t(26479);a.register("group",function(o){return new v(this.scene,null,o)})},3385:(c,m,t)=>{/** + */var o=t(44603),v=t(26479);o.register("group",function(a){return new v(this.scene,null,a)})},3385:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26479),v=t(39429);v.register("group",function(o,r){return this.updateList.add(new a(this.scene,o,r))})},88571:(c,m,t)=>{/** + */var o=t(26479),v=t(39429);v.register("group",function(a,r){return this.updateList.add(new o(this.scene,a,r))})},88571:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(95643),r=t(59819),n=new a({Extends:o,Mixins:[v.Alpha,v.BlendMode,v.Depth,v.Flip,v.GetBounds,v.Mask,v.Origin,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Size,v.TextureCrop,v.Tint,v.Transform,v.Visible,r],initialize:function(i,h,s,l,f){o.call(this,i,"Image"),this._crop=this.resetCropObject(),this.setTexture(l,f),this.setPosition(h,s),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});c.exports=n},40652:c=>{/** + */var o=t(83419),v=t(31401),a=t(95643),r=t(59819),n=new o({Extends:a,Mixins:[v.Alpha,v.BlendMode,v.Depth,v.Flip,v.GetBounds,v.Mask,v.Origin,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Size,v.TextureCrop,v.Tint,v.Transform,v.Visible,r],initialize:function(i,h,s,l,f){a.call(this,i,"Image"),this._crop=this.resetCropObject(),this.setTexture(l,f),this.setPosition(h,s),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});c.exports=n},40652:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v.addToRenderList(a),t.batchSprite(a,a.frame,v,o)};c.exports=m},82459:(c,m,t)=>{/** + */var m=function(t,o,v,a){v.addToRenderList(o),t.batchSprite(o,o.frame,v,a)};c.exports=m},82459:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(88571);v.register("image",function(n,e){n===void 0&&(n={});var i=o(n,"key",null),h=o(n,"frame",null),s=new r(this.scene,0,0,i,h);return e!==void 0&&(n.add=e),a(this.scene,s,n),s})},2117:(c,m,t)=>{/** + */var o=t(25305),v=t(44603),a=t(23568),r=t(88571);v.register("image",function(n,e){n===void 0&&(n={});var i=a(n,"key",null),h=a(n,"frame",null),s=new r(this.scene,0,0,i,h);return e!==void 0&&(n.add=e),o(this.scene,s,n),s})},2117:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(88571),v=t(39429);v.register("image",function(o,r,n,e){return this.displayList.add(new a(this.scene,o,r,n,e))})},59819:(c,m,t)=>{/** + */var o=t(88571),v=t(39429);v.register("image",function(a,r,n,e){return this.displayList.add(new o(this.scene,a,r,n,e))})},59819:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(99517),o=t(40652),c.exports={renderWebGL:v,renderCanvas:o}},99517:c=>{/** + */var o=t(29747),v=o,a=o;v=t(99517),a=t(40652),c.exports={renderWebGL:v,renderCanvas:a}},99517:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v.addToRenderList(a),this.pipeline.batchSprite(a,v,o)};c.exports=m},77856:(c,m,t)=>{/** + */var m=function(t,o,v,a){v.addToRenderList(o),this.pipeline.batchSprite(o,v,a)};c.exports=m},77856:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={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)}};a.Shader=t(20071),a.Mesh=t(4703),a.NineSlice=t(28103),a.PointLight=t(80321),a.Plane=t(33663),a.Factories.Shader=t(74177),a.Factories.Mesh=t(9225),a.Factories.NineSlice=t(47521),a.Factories.PointLight=t(71255),a.Factories.Plane=t(30985),a.Creators.Shader=t(54935),a.Creators.Mesh=t(20527),a.Creators.NineSlice=t(28279),a.Creators.PointLight=t(39829),a.Creators.Plane=t(56015),a.Light=t(41432),a.LightsManager=t(61356),a.LightsPlugin=t(88992),c.exports=a},93595:(c,m,t)=>{/** + */var o={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)}};o.Shader=t(20071),o.Mesh=t(4703),o.NineSlice=t(28103),o.PointLight=t(80321),o.Plane=t(33663),o.Factories.Shader=t(74177),o.Factories.Mesh=t(9225),o.Factories.NineSlice=t(47521),o.Factories.PointLight=t(71255),o.Factories.Plane=t(30985),o.Creators.Shader=t(54935),o.Creators.Mesh=t(20527),o.Creators.NineSlice=t(28279),o.Creators.PointLight=t(39829),o.Creators.Plane=t(56015),o.Light=t(41432),o.LightsManager=t(61356),o.LightsPlugin=t(88992),c.exports=o},93595:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10312),v=t(83419),o=t(31401),r=t(53774),n=t(45893),e=t(50792),i=t(51708),h=t(73162),s=t(33963),l=t(44594),f=t(19186),u=new v({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.Depth,o.Mask,o.PostPipeline,o.Visible,e,s],initialize:function(p,g){h.call(this,p),e.call(this),this.scene=p,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=p.sys,this.events=p.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(a.SKIP_CHECK),g&&this.add(g),p.sys.queueDepthSort()},setActive:function(d){return this.active=d,this},setName:function(d){return this.name=d,this},setState:function(d){return this.state=d,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(d,p){return this.data||(this.data=new n(this)),this.data.set(d,p),this},incData:function(d,p){return this.data||(this.data=new n(this)),this.data.inc(d,p),this},toggleData:function(d){return this.data||(this.data=new n(this)),this.data.toggle(d),this},getData:function(d){return this.data||(this.data=new n(this)),this.data.get(d)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(d){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&d.id)},getIndexList:function(){for(var d=this,p=this.parentContainer,g=[];p&&(g.unshift(p.getIndex(d)),d=p,p.parentContainer);)p=p.parentContainer;return g.unshift(this.displayList.getIndex(d)),g},addChildCallback:function(d){var p=d.displayList;p&&p!==this&&d.removeFromDisplayList(),d.displayList||(this.queueDepthSort(),d.displayList=this,d.emit(i.ADDED_TO_SCENE,d,this.scene),this.events.emit(l.ADDED_TO_SCENE,d,this.scene))},removeChildCallback:function(d){this.queueDepthSort(),d.displayList=null,d.emit(i.REMOVED_FROM_SCENE,d,this.scene),this.events.emit(l.REMOVED_FROM_SCENE,d,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(f(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(d,p){return d._depth-p._depth},getChildren:function(){return this.list},addToDisplayList:function(d){return d===void 0&&(d=this.scene.sys.displayList),this.displayList&&this.displayList!==d&&this.removeFromDisplayList(),d.exists(this)||(this.displayList=d,d.add(this,!0),d.queueDepthSort(),this.emit(i.ADDED_TO_SCENE,this,this.scene),d.events.emit(l.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var d=this.displayList||this.scene.sys.displayList;return d.exists(this)&&(d.remove(this,!0),d.queueDepthSort(),this.displayList=null,this.emit(i.REMOVED_FROM_SCENE,this,this.scene),d.events.emit(l.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(d){if(!(!this.scene||this.ignoreDestroy)){this.emit(i.DESTROY,this);for(var p=this.list;p.length;)p[0].destroy(d);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}}});c.exports=u},2956:c=>{/** + */var o=t(10312),v=t(83419),a=t(31401),r=t(53774),n=t(45893),e=t(50792),i=t(51708),h=t(73162),s=t(33963),l=t(44594),f=t(19186),u=new v({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.Depth,a.Mask,a.PostPipeline,a.Visible,e,s],initialize:function(p,g){h.call(this,p),e.call(this),this.scene=p,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=p.sys,this.events=p.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(o.SKIP_CHECK),g&&this.add(g),p.sys.queueDepthSort()},setActive:function(d){return this.active=d,this},setName:function(d){return this.name=d,this},setState:function(d){return this.state=d,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(d,p){return this.data||(this.data=new n(this)),this.data.set(d,p),this},incData:function(d,p){return this.data||(this.data=new n(this)),this.data.inc(d,p),this},toggleData:function(d){return this.data||(this.data=new n(this)),this.data.toggle(d),this},getData:function(d){return this.data||(this.data=new n(this)),this.data.get(d)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(d){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&d.id)},getIndexList:function(){for(var d=this,p=this.parentContainer,g=[];p&&(g.unshift(p.getIndex(d)),d=p,p.parentContainer);)p=p.parentContainer;return g.unshift(this.displayList.getIndex(d)),g},addChildCallback:function(d){var p=d.displayList;p&&p!==this&&d.removeFromDisplayList(),d.displayList||(this.queueDepthSort(),d.displayList=this,d.emit(i.ADDED_TO_SCENE,d,this.scene),this.events.emit(l.ADDED_TO_SCENE,d,this.scene))},removeChildCallback:function(d){this.queueDepthSort(),d.displayList=null,d.emit(i.REMOVED_FROM_SCENE,d,this.scene),this.events.emit(l.REMOVED_FROM_SCENE,d,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(f(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(d,p){return d._depth-p._depth},getChildren:function(){return this.list},addToDisplayList:function(d){return d===void 0&&(d=this.scene.sys.displayList),this.displayList&&this.displayList!==d&&this.removeFromDisplayList(),d.exists(this)||(this.displayList=d,d.add(this,!0),d.queueDepthSort(),this.emit(i.ADDED_TO_SCENE,this,this.scene),d.events.emit(l.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var d=this.displayList||this.scene.sys.displayList;return d.exists(this)&&(d.remove(this,!0),d.queueDepthSort(),this.displayList=null,this.emit(i.REMOVED_FROM_SCENE,this,this.scene),d.events.emit(l.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(d){if(!(!this.scene||this.ignoreDestroy)){this.emit(i.DESTROY,this);for(var p=this.list;p.length;)p[0].destroy(d);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}}});c.exports=u},2956:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=a.list;if(o.length!==0){a.depthSort();var r=a.blendMode!==-1;r||t.setBlendMode(0);var n=a._alpha;a.mask&&a.mask.preRenderCanvas(t,null,v);for(var e=0;e{/** + */var m=function(t,o,v){var a=o.list;if(a.length!==0){o.depthSort();var r=o.blendMode!==-1;r||t.setBlendMode(0);var n=o._alpha;o.mask&&o.mask.preRenderCanvas(t,null,v);for(var e=0;e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(93595),o=t(44603),r=t(23568);o.register("layer",function(n,e){n===void 0&&(n={});var i=r(n,"children",null),h=new v(this.scene,i);return e!==void 0&&(n.add=e),a(this.scene,h,n),h})},20005:(c,m,t)=>{/** + */var o=t(25305),v=t(93595),a=t(44603),r=t(23568);a.register("layer",function(n,e){n===void 0&&(n={});var i=r(n,"children",null),h=new v(this.scene,i);return e!==void 0&&(n.add=e),o(this.scene,h,n),h})},20005:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(93595),v=t(39429);v.register("layer",function(o){return this.displayList.add(new a(this.scene,o))})},33963:(c,m,t)=>{/** + */var o=t(93595),v=t(39429);v.register("layer",function(a){return this.displayList.add(new o(this.scene,a))})},33963:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(15869),o=t(2956),c.exports={renderWebGL:v,renderCanvas:o}},15869:c=>{/** + */var o=t(29747),v=o,a=o;v=t(15869),a=t(2956),c.exports={renderWebGL:v,renderCanvas:a}},15869:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=a.list,r=o.length;if(r!==0){a.depthSort(),t.pipelines.preBatch(a);var n=a.blendMode!==-1;n||t.setBlendMode(0);for(var e=a.alpha,i=0;i{/** + */var m=function(t,o,v){var a=o.list,r=a.length;if(r!==0){o.depthSort(),t.pipelines.preBatch(o);var n=o.blendMode!==-1;n||t.setBlendMode(0);for(var e=o.alpha,i=0;i{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(96503),v=t(83419),o=t(31401),r=t(51767),n=t(70554),e=new v({Extends:a,Mixins:[o.Origin,o.ScrollFactor,o.Visible],initialize:function(h,s,l,f,u,d,p){a.call(this,h,s,l),this.color=new r(f,u,d),this.intensity=p,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(l)},displayWidth:{get:function(){return this.diameter},set:function(i){this.diameter=i}},displayHeight:{get:function(){return this.diameter},set:function(i){this.diameter=i}},width:{get:function(){return this.diameter},set:function(i){this.diameter=i}},height:{get:function(){return this.diameter},set:function(i){this.diameter=i}},willRender:function(i){return!(e.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&i.id)},setColor:function(i){var h=n.getFloatsFromUintRGB(i);return this.color.set(h[0],h[1],h[2]),this},setIntensity:function(i){return this.intensity=i,this},setRadius:function(i){return this.radius=i,this}});e.RENDER_MASK=15,c.exports=e},61356:(c,m,t)=>{/** + */var o=t(96503),v=t(83419),a=t(31401),r=t(51767),n=t(70554),e=new v({Extends:o,Mixins:[a.Origin,a.ScrollFactor,a.Visible],initialize:function(h,s,l,f,u,d,p){o.call(this,h,s,l),this.color=new r(f,u,d),this.intensity=p,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(l)},displayWidth:{get:function(){return this.diameter},set:function(i){this.diameter=i}},displayHeight:{get:function(){return this.diameter},set:function(i){this.diameter=i}},width:{get:function(){return this.diameter},set:function(i){this.diameter=i}},height:{get:function(){return this.diameter},set:function(i){this.diameter=i}},willRender:function(i){return!(e.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&i.id)},setColor:function(i){var h=n.getFloatsFromUintRGB(i);return this.color.set(h[0],h[1],h[2]),this},setIntensity:function(i){return this.intensity=i,this},setRadius:function(i){return this.radius=i,this}});e.RENDER_MASK=15,c.exports=e},61356:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(81491),v=t(83419),o=t(20339),r=t(41432),n=t(80321),e=t(51767),i=t(19133),h=t(19186),s=t(70554),l=new v({initialize:function(){this.lights=[],this.ambientColor=new e(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(f,u,d,p,g,y){return this.systems.displayList.add(new n(this.scene,f,u,d,p,g,y))},enable:function(){return this.maxLights===-1&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(f){for(var u=this.lights,d=f.worldView,p=[],g=0;gthis.maxLights&&(h(p,this.sortByDistance),p=p.slice(0,this.maxLights)),this.visibleLights=p.length,p},sortByDistance:function(f,u){return f.distance>=u.distance},setAmbientColor:function(f){var u=s.getFloatsFromUintRGB(f);return this.ambientColor.set(u[0],u[1],u[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(f,u,d,p,g){f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=128),p===void 0&&(p=16777215),g===void 0&&(g=1);var y=s.getFloatsFromUintRGB(p),x=new r(f,u,d,y[0],y[1],y[2],g);return this.lights.push(x),x},removeLight:function(f){var u=this.lights.indexOf(f);return u>=0&&i(this.lights,u),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});c.exports=l},88992:(c,m,t)=>{/** + */var o=t(81491),v=t(83419),a=t(20339),r=t(41432),n=t(80321),e=t(51767),i=t(19133),h=t(19186),s=t(70554),l=new v({initialize:function(){this.lights=[],this.ambientColor=new e(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(f,u,d,p,g,y){return this.systems.displayList.add(new n(this.scene,f,u,d,p,g,y))},enable:function(){return this.maxLights===-1&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(f){for(var u=this.lights,d=f.worldView,p=[],g=0;gthis.maxLights&&(h(p,this.sortByDistance),p=p.slice(0,this.maxLights)),this.visibleLights=p.length,p},sortByDistance:function(f,u){return f.distance>=u.distance},setAmbientColor:function(f){var u=s.getFloatsFromUintRGB(f);return this.ambientColor.set(u[0],u[1],u[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(f,u,d,p,g){f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=128),p===void 0&&(p=16777215),g===void 0&&(g=1);var y=s.getFloatsFromUintRGB(p),x=new r(f,u,d,y[0],y[1],y[2],g);return this.lights.push(x),x},removeLight:function(f){var u=this.lights.indexOf(f);return u>=0&&i(this.lights,u),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});c.exports=l},88992:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(61356),o=t(37277),r=t(44594),n=new a({Extends:v,initialize:function(i){this.scene=i,this.systems=i.sys,i.sys.settings.isBooted||i.sys.events.once(r.BOOT,this.boot,this),v.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}});o.register("LightsPlugin",n,"lights"),c.exports=n},4703:(c,m,t)=>{/** + */var o=t(83419),v=t(61356),a=t(37277),r=t(44594),n=new o({Extends:v,initialize:function(i){this.scene=i,this.systems=i.sys,i.sys.settings.isBooted||i.sys.events.once(r.BOOT,this.boot,this),v.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}});a.register("LightsPlugin",n,"lights"),c.exports=n},4703:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(39506),r=t(83997),n=t(95643),e=t(34684),i=t(92515),h=t(91296),s=t(37867),l=t(29807),f=t(43396),u=t(19186),d=t(25836),p=t(39318),g=new a({Extends:n,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.Mask,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Size,v.Texture,v.Transform,v.Visible,l],initialize:function(x,T,C,M,w,L,F,O,N,G,V,K){T===void 0&&(T=0),C===void 0&&(C=0),M===void 0&&(M="__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 d,this.modelScale=new d(1,1,1),this.modelRotation=new d,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new s,this.viewPosition=new d,this.viewMatrix=new s,this.projectionMatrix=new s,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var $=x.sys.renderer;this.setPosition(T,C),this.setTexture(M,w),this.setSize($.width,$.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective($.width,$.height),L&&this.addVertices(L,F,O,N,G,V,K)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(y){return this.viewPosition.addScale(d.LEFT,y),this.dirtyCache[10]=1,this},panY:function(y){return this.viewPosition.y+=d.DOWN.y*y,this.dirtyCache[10]=1,this},panZ:function(y){return this.viewPosition.z+=y,this.dirtyCache[10]=1,this},setPerspective:function(y,x,T,C,M){return T===void 0&&(T=45),C===void 0&&(C=.01),M===void 0&&(M=1e3),this.fov=T,this.projectionMatrix.perspective(o(T),y/x,C,M),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(y,x,T,C){return y===void 0&&(y=this.scene.sys.renderer.getAspectRatio()),x===void 0&&(x=1),T===void 0&&(T=-1e3),C===void 0&&(C=1e3),this.fov=0,this.projectionMatrix.ortho(-y,y,-x,x,T,C),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(y){y.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(y,x,T,C,M,w,L,F,O){var N=this.scene.sys.cache.obj.get(y),G;return N&&(G=e(N,this,x,T,C,M,w,L,F,O)),(!G||G.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",y),this},sortByDepth:function(y,x){return y.depth-x.depth},depthSort:function(){return u(this.faces,this.sortByDepth),this},addVertex:function(y,x,T,C,M,w,L){var F=new p(y,x,T,C,M,w,L);return this.vertices.push(F),F},addFace:function(y,x,T){var C=new r(y,x,T);return this.faces.push(C),this.dirtyCache[9]=-1,C},addVertices:function(y,x,T,C,M,w,L){var F=i(y,x,T,C,M,w,L);return F?(this.faces=this.faces.concat(F.faces),this.vertices=this.vertices.concat(F.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(y){return this.faces[y]},hasFaceAt:function(y,x,T){T===void 0&&(T=this.scene.sys.cameras.main);for(var C=h(this,T).calc,M=this.faces,w=0;w{/** + */var o=t(83419),v=t(31401),a=t(39506),r=t(83997),n=t(95643),e=t(34684),i=t(92515),h=t(91296),s=t(37867),l=t(29807),f=t(43396),u=t(19186),d=t(25836),p=t(39318),g=new o({Extends:n,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.Mask,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Size,v.Texture,v.Transform,v.Visible,l],initialize:function(x,C,P,M,w,I,L,B,N,G,V,K){C===void 0&&(C=0),P===void 0&&(P=0),M===void 0&&(M="__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 d,this.modelScale=new d(1,1,1),this.modelRotation=new d,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new s,this.viewPosition=new d,this.viewMatrix=new s,this.projectionMatrix=new s,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var j=x.sys.renderer;this.setPosition(C,P),this.setTexture(M,w),this.setSize(j.width,j.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(j.width,j.height),I&&this.addVertices(I,L,B,N,G,V,K)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(y){return this.viewPosition.addScale(d.LEFT,y),this.dirtyCache[10]=1,this},panY:function(y){return this.viewPosition.y+=d.DOWN.y*y,this.dirtyCache[10]=1,this},panZ:function(y){return this.viewPosition.z+=y,this.dirtyCache[10]=1,this},setPerspective:function(y,x,C,P,M){return C===void 0&&(C=45),P===void 0&&(P=.01),M===void 0&&(M=1e3),this.fov=C,this.projectionMatrix.perspective(a(C),y/x,P,M),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(y,x,C,P){return y===void 0&&(y=this.scene.sys.renderer.getAspectRatio()),x===void 0&&(x=1),C===void 0&&(C=-1e3),P===void 0&&(P=1e3),this.fov=0,this.projectionMatrix.ortho(-y,y,-x,x,C,P),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(y){y.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(y,x,C,P,M,w,I,L,B){var N=this.scene.sys.cache.obj.get(y),G;return N&&(G=e(N,this,x,C,P,M,w,I,L,B)),(!G||G.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",y),this},sortByDepth:function(y,x){return y.depth-x.depth},depthSort:function(){return u(this.faces,this.sortByDepth),this},addVertex:function(y,x,C,P,M,w,I){var L=new p(y,x,C,P,M,w,I);return this.vertices.push(L),L},addFace:function(y,x,C){var P=new r(y,x,C);return this.faces.push(P),this.dirtyCache[9]=-1,P},addVertices:function(y,x,C,P,M,w,I){var L=i(y,x,C,P,M,w,I);return L?(this.faces=this.faces.concat(L.faces),this.vertices=this.vertices.concat(L.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(y){return this.faces[y]},hasFaceAt:function(y,x,C){C===void 0&&(C=this.scene.sys.cameras.main);for(var P=h(this,C).calc,M=this.faces,w=0;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1623,87 +1623,87 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(35154),n=t(4703);v.register("mesh",function(e,i){e===void 0&&(e={});var h=o(e,"key",null),s=o(e,"frame",null),l=r(e,"vertices",[]),f=r(e,"uvs",[]),u=r(e,"indicies",[]),d=r(e,"containsZ",!1),p=r(e,"normals",[]),g=r(e,"colors",16777215),y=r(e,"alphas",1),x=new n(this.scene,0,0,h,s,l,f,u,d,p,g,y);return i!==void 0&&(e.add=i),a(this.scene,x,e),x})},9225:(c,m,t)=>{/** + */var o=t(25305),v=t(44603),a=t(23568),r=t(35154),n=t(4703);v.register("mesh",function(e,i){e===void 0&&(e={});var h=a(e,"key",null),s=a(e,"frame",null),l=r(e,"vertices",[]),f=r(e,"uvs",[]),u=r(e,"indicies",[]),d=r(e,"containsZ",!1),p=r(e,"normals",[]),g=r(e,"colors",16777215),y=r(e,"alphas",1),x=new n(this.scene,0,0,h,s,l,f,u,d,p,g,y);return i!==void 0&&(e.add=i),o(this.scene,x,e),x})},9225:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(4703),v=t(39429);v.register("mesh",function(o,r,n,e,i,h,s,l,f,u,d){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s,l,f,u,d))})},29807:(c,m,t)=>{/** + */var o=t(4703),v=t(39429);v.register("mesh",function(a,r,n,e,i,h,s,l,f,u,d){return this.displayList.add(new o(this.scene,a,r,n,e,i,h,s,l,f,u,d))})},29807:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(48833),o=t(36488),c.exports={renderWebGL:v,renderCanvas:o}},48833:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(48833),a=t(36488),c.exports={renderWebGL:v,renderCanvas:a}},48833:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=function(o,r,n,e){var i=r.faces,h=i.length;if(h!==0){n.addToRenderList(r);var s=o.pipelines.set(r.pipeline,r),l=a(r,n,e).calc;o.pipelines.preBatch(r);for(var f=s.setGameObject(r),u=s.vertexViewF32,d=s.vertexViewU32,p=s.vertexCount*s.currentShader.vertexComponentCount-1,g=r.tintFill,y=[],x=r.debugCallback,T=l.a,C=l.b,M=l.c,w=l.d,L=l.e,F=l.f,O=r.viewPosition.z,N=r.hideCCW,G=n.roundPixels,V=n.alpha*r.alpha,K=0,$=0;${/** + */var o=t(91296),v=function(a,r,n,e){var i=r.faces,h=i.length;if(h!==0){n.addToRenderList(r);var s=a.pipelines.set(r.pipeline,r),l=o(r,n,e).calc;a.pipelines.preBatch(r);for(var f=s.setGameObject(r),u=s.vertexViewF32,d=s.vertexViewU32,p=s.vertexCount*s.currentShader.vertexComponentCount-1,g=r.tintFill,y=[],x=r.debugCallback,C=l.a,P=l.b,M=l.c,w=l.d,I=l.e,L=l.f,B=r.viewPosition.z,N=r.hideCCW,G=n.roundPixels,V=n.alpha*r.alpha,K=0,j=0;j{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(95643),r=t(78023),n=t(39318),e=new a({Extends:o,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.GetBounds,v.Mask,v.Origin,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Texture,v.Transform,v.Visible,r],initialize:function(h,s,l,f,u,d,p,g,y,x,T){o.call(this,h,"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 C=h.textures.getFrame(f,u);this.is3Slice=!x&&!T,C.scale9&&(this.is3Slice=C.is3Slice);for(var M=this.is3Slice?18:54,w=0;w{/** + */var o=t(83419),v=t(31401),a=t(95643),r=t(78023),n=t(39318),e=new o({Extends:a,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.GetBounds,v.Mask,v.Origin,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Texture,v.Transform,v.Visible,r],initialize:function(h,s,l,f,u,d,p,g,y,x,C){a.call(this,h,"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 P=h.textures.getFrame(f,u);this.is3Slice=!x&&!C,P.scale9&&(this.is3Slice=P.is3Slice);for(var M=this.is3Slice?18:54,w=0;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(35154),n=t(28103);v.register("nineslice",function(e,i){e===void 0&&(e={});var h=o(e,"key",null),s=o(e,"frame",null),l=r(e,"width",256),f=r(e,"height",256),u=r(e,"leftWidth",10),d=r(e,"rightWidth",10),p=r(e,"topHeight",0),g=r(e,"bottomHeight",0),y=new n(this.scene,0,0,h,s,l,f,u,d,p,g);return i!==void 0&&(e.add=i),a(this.scene,y,e),y})},47521:(c,m,t)=>{/** + */var o=t(25305),v=t(44603),a=t(23568),r=t(35154),n=t(28103);v.register("nineslice",function(e,i){e===void 0&&(e={});var h=a(e,"key",null),s=a(e,"frame",null),l=r(e,"width",256),f=r(e,"height",256),u=r(e,"leftWidth",10),d=r(e,"rightWidth",10),p=r(e,"topHeight",0),g=r(e,"bottomHeight",0),y=new n(this.scene,0,0,h,s,l,f,u,d,p,g);return i!==void 0&&(e.add=i),o(this.scene,y,e),y})},47521:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(28103),v=t(39429);v.register("nineslice",function(o,r,n,e,i,h,s,l,f,u){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s,l,f,u))})},78023:(c,m,t)=>{/** + */var o=t(28103),v=t(39429);v.register("nineslice",function(a,r,n,e,i,h,s,l,f,u){return this.displayList.add(new o(this.scene,a,r,n,e,i,h,s,l,f,u))})},78023:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(52230),c.exports={renderWebGL:v,renderCanvas:o}},52230:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(52230),c.exports={renderWebGL:v,renderCanvas:a}},52230:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(70554),o=function(r,n,e,i){var h=n.vertices,s=h.length;if(s!==0){e.addToRenderList(n);var l=r.pipelines.set(n.pipeline,n),f=a(n,e,i,!1).calc;r.pipelines.preBatch(n);var u=l.setGameObject(n),d=l.vertexViewF32,p=l.vertexViewU32,g=l.vertexCount*l.currentShader.vertexComponentCount-1,y=e.roundPixels,x=n.tintFill,T=e.alpha*n.alpha,C=v.getTintAppendFloatAlpha(n.tint,T),M=l.vertexAvailable(),w=-1;M{/** + */var o=t(91296),v=t(70554),a=function(r,n,e,i){var h=n.vertices,s=h.length;if(s!==0){e.addToRenderList(n);var l=r.pipelines.set(n.pipeline,n),f=o(n,e,i,!1).calc;r.pipelines.preBatch(n);var u=l.setGameObject(n),d=l.vertexViewF32,p=l.vertexViewU32,g=l.vertexCount*l.currentShader.vertexComponentCount-1,y=e.roundPixels,x=n.tintFill,C=e.alpha*n.alpha,P=v.getTintAppendFloatAlpha(n.tint,C),M=l.vertexAvailable(),w=-1;M{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(44777),o=t(37589),r=t(6113),n=t(91389),e=t(90664),i=new a({Extends:v,initialize:function(s){v.call(this,s,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 h=this.propertyValue,s=h,l=this.defaultEmit,f=this.defaultUpdate;if(this.method===9){this.start=h[0],this.ease=r("Linear"),this.interpolation=n("linear"),l=this.easedValueEmit,f=this.easeValueUpdate,s=h[0],this.active=!0;for(var u=0;u{/** + */var o=t(83419),v=t(44777),a=t(37589),r=t(6113),n=t(91389),e=t(90664),i=new o({Extends:v,initialize:function(s){v.call(this,s,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 h=this.propertyValue,s=h,l=this.defaultEmit,f=this.defaultUpdate;if(this.method===9){this.start=h[0],this.ease=r("Linear"),this.interpolation=n("linear"),l=this.easedValueEmit,f=this.easeValueUpdate,s=h[0],this.active=!0;for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(30976),v=t(45319),o=t(83419),r=t(99472),n=t(6113),e=t(95540),i=t(91389),h=t(77720),s=t(15994),l=new o({initialize:function(u,d,p){p===void 0&&(p=!1),this.propertyKey=u,this.propertyValue=d,this.defaultValue=d,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=p,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(f,u){f===void 0&&(f={}),u&&(this.propertyKey=u),this.propertyValue=e(f,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(f){var u;switch(this.method){case 1:case 3:case 8:u=f;break;case 2:this.propertyValue.indexOf(f)>=0&&(u=f);break;case 4:var d=(this.end-this.start)/this.steps;u=h(f,d),this.counter=u;break;case 5:case 6:case 7:u=v(f,this.start,this.end);break;case 9:u=this.start[0];break}return this.current=u,this},getMethod:function(){var f=this.propertyValue;if(f===null)return 0;var u=typeof f;if(u==="number")return 1;if(Array.isArray(f))return 2;if(u==="function")return 3;if(u==="object"){if(this.hasBoth(f,"start","end"))return this.has(f,"steps")?4:5;if(this.hasBoth(f,"min","max"))return 6;if(this.has(f,"random"))return 7;if(this.hasEither(f,"onEmit","onUpdate"))return 8;if(this.hasEither(f,"values","interpolation"))return 9}return 0},setMethods:function(){var f=this.propertyValue,u=f,d=this.defaultEmit,p=this.defaultUpdate;switch(this.method){case 1:d=this.staticValueEmit;break;case 2:d=this.randomStaticValueEmit,u=f[0];break;case 3:this._onEmit=f,d=this.proxyEmit;break;case 4:this.start=f.start,this.end=f.end,this.steps=f.steps,this.counter=this.start,this.yoyo=this.has(f,"yoyo")?f.yoyo:!1,this.direction=0,d=this.steppedEmit,u=this.start;break;case 5:this.start=f.start,this.end=f.end;var g=this.has(f,"ease")?f.ease:"Linear";this.ease=n(g,f.easeParams),d=this.has(f,"random")&&f.random?this.randomRangedValueEmit:this.easedValueEmit,p=this.easeValueUpdate,u=this.start;break;case 6:this.start=f.min,this.end=f.max,d=this.has(f,"int")&&f.int?this.randomRangedIntEmit:this.randomRangedValueEmit,u=this.start;break;case 7:var y=f.random;Array.isArray(y)&&(this.start=y[0],this.end=y[1]),d=this.randomRangedIntEmit,u=this.start;break;case 8:this._onEmit=this.has(f,"onEmit")?f.onEmit:this.defaultEmit,this._onUpdate=this.has(f,"onUpdate")?f.onUpdate:this.defaultUpdate,d=this.proxyEmit,p=this.proxyUpdate;break;case 9:this.start=f.values;var x=this.has(f,"ease")?f.ease:"Linear";this.ease=n(x,f.easeParams),this.interpolation=i(f.interpolation),d=this.easedValueEmit,p=this.easeValueUpdate,u=this.start[0];break}return this.onEmit=d,this.onUpdate=p,this.current=u,this},has:function(f,u){return f.hasOwnProperty(u)},hasBoth:function(f,u,d){return f.hasOwnProperty(u)&&f.hasOwnProperty(d)},hasEither:function(f,u,d){return f.hasOwnProperty(u)||f.hasOwnProperty(d)},defaultEmit:function(f,u,d){return d},defaultUpdate:function(f,u,d,p){return p},proxyEmit:function(f,u,d){var p=this._onEmit(f,u,d);return this.current=p,p},proxyUpdate:function(f,u,d,p){var g=this._onUpdate(f,u,d,p);return this.current=g,g},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var f=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[f],this.current},randomRangedValueEmit:function(f,u){var d=r(this.start,this.end);return f&&f.data[u]&&(f.data[u].min=d,f.data[u].max=this.end),this.current=d,d},randomRangedIntEmit:function(f,u){var d=a(this.start,this.end);return f&&f.data[u]&&(f.data[u].min=d,f.data[u].max=this.end),this.current=d,d},steppedEmit:function(){var f=this.counter,u=f,d=(this.end-this.start)/this.steps;if(this.yoyo){var p;this.direction===0?(u+=d,u>=this.end&&(p=u-this.end,u=this.end-p,this.direction=1)):(u-=d,u<=this.start&&(p=this.start-u,u=this.start+p,this.direction=0)),this.counter=u}else this.counter=s(u+d,this.start,this.end);return this.current=f,f},easedValueEmit:function(f,u){if(f&&f.data[u]){var d=f.data[u];d.min=this.start,d.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(f,u,d){var p=f.data[u],g,y=this.ease(d);return this.interpolation?g=this.interpolation(this.start,y):g=(p.max-p.min)*y+p.min,this.current=g,g},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});c.exports=l},24502:(c,m,t)=>{/** + */var o=t(30976),v=t(45319),a=t(83419),r=t(99472),n=t(6113),e=t(95540),i=t(91389),h=t(77720),s=t(15994),l=new a({initialize:function(u,d,p){p===void 0&&(p=!1),this.propertyKey=u,this.propertyValue=d,this.defaultValue=d,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=p,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(f,u){f===void 0&&(f={}),u&&(this.propertyKey=u),this.propertyValue=e(f,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(f){var u;switch(this.method){case 1:case 3:case 8:u=f;break;case 2:this.propertyValue.indexOf(f)>=0&&(u=f);break;case 4:var d=(this.end-this.start)/this.steps;u=h(f,d),this.counter=u;break;case 5:case 6:case 7:u=v(f,this.start,this.end);break;case 9:u=this.start[0];break}return this.current=u,this},getMethod:function(){var f=this.propertyValue;if(f===null)return 0;var u=typeof f;if(u==="number")return 1;if(Array.isArray(f))return 2;if(u==="function")return 3;if(u==="object"){if(this.hasBoth(f,"start","end"))return this.has(f,"steps")?4:5;if(this.hasBoth(f,"min","max"))return 6;if(this.has(f,"random"))return 7;if(this.hasEither(f,"onEmit","onUpdate"))return 8;if(this.hasEither(f,"values","interpolation"))return 9}return 0},setMethods:function(){var f=this.propertyValue,u=f,d=this.defaultEmit,p=this.defaultUpdate;switch(this.method){case 1:d=this.staticValueEmit;break;case 2:d=this.randomStaticValueEmit,u=f[0];break;case 3:this._onEmit=f,d=this.proxyEmit;break;case 4:this.start=f.start,this.end=f.end,this.steps=f.steps,this.counter=this.start,this.yoyo=this.has(f,"yoyo")?f.yoyo:!1,this.direction=0,d=this.steppedEmit,u=this.start;break;case 5:this.start=f.start,this.end=f.end;var g=this.has(f,"ease")?f.ease:"Linear";this.ease=n(g,f.easeParams),d=this.has(f,"random")&&f.random?this.randomRangedValueEmit:this.easedValueEmit,p=this.easeValueUpdate,u=this.start;break;case 6:this.start=f.min,this.end=f.max,d=this.has(f,"int")&&f.int?this.randomRangedIntEmit:this.randomRangedValueEmit,u=this.start;break;case 7:var y=f.random;Array.isArray(y)&&(this.start=y[0],this.end=y[1]),d=this.randomRangedIntEmit,u=this.start;break;case 8:this._onEmit=this.has(f,"onEmit")?f.onEmit:this.defaultEmit,this._onUpdate=this.has(f,"onUpdate")?f.onUpdate:this.defaultUpdate,d=this.proxyEmit,p=this.proxyUpdate;break;case 9:this.start=f.values;var x=this.has(f,"ease")?f.ease:"Linear";this.ease=n(x,f.easeParams),this.interpolation=i(f.interpolation),d=this.easedValueEmit,p=this.easeValueUpdate,u=this.start[0];break}return this.onEmit=d,this.onUpdate=p,this.current=u,this},has:function(f,u){return f.hasOwnProperty(u)},hasBoth:function(f,u,d){return f.hasOwnProperty(u)&&f.hasOwnProperty(d)},hasEither:function(f,u,d){return f.hasOwnProperty(u)||f.hasOwnProperty(d)},defaultEmit:function(f,u,d){return d},defaultUpdate:function(f,u,d,p){return p},proxyEmit:function(f,u,d){var p=this._onEmit(f,u,d);return this.current=p,p},proxyUpdate:function(f,u,d,p){var g=this._onUpdate(f,u,d,p);return this.current=g,g},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var f=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[f],this.current},randomRangedValueEmit:function(f,u){var d=r(this.start,this.end);return f&&f.data[u]&&(f.data[u].min=d,f.data[u].max=this.end),this.current=d,d},randomRangedIntEmit:function(f,u){var d=o(this.start,this.end);return f&&f.data[u]&&(f.data[u].min=d,f.data[u].max=this.end),this.current=d,d},steppedEmit:function(){var f=this.counter,u=f,d=(this.end-this.start)/this.steps;if(this.yoyo){var p;this.direction===0?(u+=d,u>=this.end&&(p=u-this.end,u=this.end-p,this.direction=1)):(u-=d,u<=this.start&&(p=this.start-u,u=this.start+p,this.direction=0)),this.counter=u}else this.counter=s(u+d,this.start,this.end);return this.current=f,f},easedValueEmit:function(f,u){if(f&&f.data[u]){var d=f.data[u];d.min=this.start,d.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(f,u,d){var p=f.data[u],g,y=this.ease(d);return this.interpolation?g=this.interpolation(this.start,y):g=(p.max-p.min)*y+p.min,this.current=g,g},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});c.exports=l},24502:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(20286),r=new a({Extends:o,initialize:function(e,i,h,s,l){if(typeof e=="object"){var f=e;e=v(f,"x",0),i=v(f,"y",0),h=v(f,"power",0),s=v(f,"epsilon",100),l=v(f,"gravity",50)}else e===void 0&&(e=0),i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=100),l===void 0&&(l=50);o.call(this,e,i,!0),this._gravity=l,this._power=h*l,this._epsilon=s*s},update:function(n,e){var i=this.x-n.x,h=this.y-n.y,s=i*i+h*h;if(s!==0){var l=Math.sqrt(s);s{/** + */var o=t(83419),v=t(95540),a=t(20286),r=new o({Extends:a,initialize:function(e,i,h,s,l){if(typeof e=="object"){var f=e;e=v(f,"x",0),i=v(f,"y",0),h=v(f,"power",0),s=v(f,"epsilon",100),l=v(f,"gravity",50)}else e===void 0&&(e=0),i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=100),l===void 0&&(l=50);a.call(this,e,i,!0),this._gravity=l,this._power=h*l,this._epsilon=s*s},update:function(n,e){var i=this.x-n.x,h=this.y-n.y,s=i*i+h*h;if(s!==0){var l=Math.sqrt(s);s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(9674),v=t(45319),o=t(83419),r=t(39506),n=t(87841),e=t(11520),i=t(26099),h=new o({initialize:function(l){this.emitter=l,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new i,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=l.scene,this.anims=new a(this),this.bounds=new n},emit:function(s,l,f,u,d,p){return this.emitter.emit(s,l,f,u,d,p)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(s,l){s===void 0&&(s=0),l===void 0&&(l=0),this.x=s,this.y=l},fire:function(s,l){var f=this.emitter,u=f.ops,d=f.getAnim();if(d?this.anims.play(d):(this.frame=f.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(f.getEmitZone(this),s===void 0?this.x+=u.x.onEmit(this,"x"):u.x.steps>0?this.x+=s+u.x.onEmit(this,"x"):this.x+=s,l===void 0?this.y+=u.y.onEmit(this,"y"):u.y.steps>0?this.y+=l+u.y.onEmit(this,"y"):this.y+=l,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),f.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&f.getDeathZone(this))return this.lifeCurrent=0,!1;var p=u.speedX.onEmit(this,"speedX"),g=u.speedY.active?u.speedY.onEmit(this,"speedY"):p;if(f.radial){var y=r(u.angle.onEmit(this,"angle"));this.velocityX=Math.cos(y)*Math.abs(p),this.velocityY=Math.sin(y)*Math.abs(g)}else if(f.moveTo){var x=u.moveToX.onEmit(this,"moveToX"),T=u.moveToY.onEmit(this,"moveToY"),C=this.life/1e3;this.velocityX=(x-this.x)/C,this.velocityY=(T-this.y)/C}else this.velocityX=p,this.velocityY=g;return f.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(s,l,f){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=s,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=s,!1;this.anims.update(0,s);var u=this.emitter,d=u.ops,p=1-this.lifeCurrent/this.life;if(this.lifeT=p,this.x=d.x.onUpdate(this,"x",p,this.x),this.y=d.y.onUpdate(this,"y",p,this.y),u.moveTo){var g=d.moveToX.onUpdate(this,"moveToX",p,u.moveToX),y=d.moveToY.onUpdate(this,"moveToY",p,u.moveToY),x=this.lifeCurrent/1e3;this.velocityX=(g-this.x)/x,this.velocityY=(y-this.y)/x}return this.computeVelocity(u,s,l,f,p),this.scaleX=d.scaleX.onUpdate(this,"scaleX",p,this.scaleX),d.scaleY.active?this.scaleY=d.scaleY.onUpdate(this,"scaleY",p,this.scaleY):this.scaleY=this.scaleX,this.angle=d.rotate.onUpdate(this,"rotate",p,this.angle),this.rotation=r(this.angle),u.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=v(d.alpha.onUpdate(this,"alpha",p,this.alpha),0,1),d.color.active?this.tint=d.color.onUpdate(this,"color",p,this.tint):this.tint=d.tint.onUpdate(this,"tint",p,this.tint),this.lifeCurrent-=s,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(s,l,f,u,d){var p=s.ops,g=this.velocityX,y=this.velocityY,x=p.accelerationX.onUpdate(this,"accelerationX",d,this.accelerationX),T=p.accelerationY.onUpdate(this,"accelerationY",d,this.accelerationY),C=p.maxVelocityX.onUpdate(this,"maxVelocityX",d,this.maxVelocityX),M=p.maxVelocityY.onUpdate(this,"maxVelocityY",d,this.maxVelocityY);this.bounce=p.bounce.onUpdate(this,"bounce",d,this.bounce),g+=s.gravityX*f+x*f,y+=s.gravityY*f+T*f,g=v(g,-C,C),y=v(y,-M,M),this.velocityX=g,this.velocityY=y,this.x+=g*f,this.y+=y*f,s.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var w=0;w{/** + */var o=t(9674),v=t(45319),a=t(83419),r=t(39506),n=t(87841),e=t(11520),i=t(26099),h=new a({initialize:function(l){this.emitter=l,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new i,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=l.scene,this.anims=new o(this),this.bounds=new n},emit:function(s,l,f,u,d,p){return this.emitter.emit(s,l,f,u,d,p)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(s,l){s===void 0&&(s=0),l===void 0&&(l=0),this.x=s,this.y=l},fire:function(s,l){var f=this.emitter,u=f.ops,d=f.getAnim();if(d?this.anims.play(d):(this.frame=f.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(f.getEmitZone(this),s===void 0?this.x+=u.x.onEmit(this,"x"):u.x.steps>0?this.x+=s+u.x.onEmit(this,"x"):this.x+=s,l===void 0?this.y+=u.y.onEmit(this,"y"):u.y.steps>0?this.y+=l+u.y.onEmit(this,"y"):this.y+=l,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),f.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&f.getDeathZone(this))return this.lifeCurrent=0,!1;var p=u.speedX.onEmit(this,"speedX"),g=u.speedY.active?u.speedY.onEmit(this,"speedY"):p;if(f.radial){var y=r(u.angle.onEmit(this,"angle"));this.velocityX=Math.cos(y)*Math.abs(p),this.velocityY=Math.sin(y)*Math.abs(g)}else if(f.moveTo){var x=u.moveToX.onEmit(this,"moveToX"),C=u.moveToY.onEmit(this,"moveToY"),P=this.life/1e3;this.velocityX=(x-this.x)/P,this.velocityY=(C-this.y)/P}else this.velocityX=p,this.velocityY=g;return f.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(s,l,f){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=s,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=s,!1;this.anims.update(0,s);var u=this.emitter,d=u.ops,p=1-this.lifeCurrent/this.life;if(this.lifeT=p,this.x=d.x.onUpdate(this,"x",p,this.x),this.y=d.y.onUpdate(this,"y",p,this.y),u.moveTo){var g=d.moveToX.onUpdate(this,"moveToX",p,u.moveToX),y=d.moveToY.onUpdate(this,"moveToY",p,u.moveToY),x=this.lifeCurrent/1e3;this.velocityX=(g-this.x)/x,this.velocityY=(y-this.y)/x}return this.computeVelocity(u,s,l,f,p),this.scaleX=d.scaleX.onUpdate(this,"scaleX",p,this.scaleX),d.scaleY.active?this.scaleY=d.scaleY.onUpdate(this,"scaleY",p,this.scaleY):this.scaleY=this.scaleX,this.angle=d.rotate.onUpdate(this,"rotate",p,this.angle),this.rotation=r(this.angle),u.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=v(d.alpha.onUpdate(this,"alpha",p,this.alpha),0,1),d.color.active?this.tint=d.color.onUpdate(this,"color",p,this.tint):this.tint=d.tint.onUpdate(this,"tint",p,this.tint),this.lifeCurrent-=s,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(s,l,f,u,d){var p=s.ops,g=this.velocityX,y=this.velocityY,x=p.accelerationX.onUpdate(this,"accelerationX",d,this.accelerationX),C=p.accelerationY.onUpdate(this,"accelerationY",d,this.accelerationY),P=p.maxVelocityX.onUpdate(this,"maxVelocityX",d,this.maxVelocityX),M=p.maxVelocityY.onUpdate(this,"maxVelocityY",d,this.maxVelocityY);this.bounce=p.bounce.onUpdate(this,"bounce",d,this.bounce),g+=s.gravityX*f+x*f,y+=s.gravityY*f+C*f,g=v(g,-P,P),y=v(y,-M,M),this.velocityX=g,this.velocityY=y,this.x+=g*f,this.y+=y*f,s.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var w=0;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(20286),o=t(87841),r=new a({Extends:v,initialize:function(e,i,h,s,l,f,u,d){l===void 0&&(l=!0),f===void 0&&(f=!0),u===void 0&&(u=!0),d===void 0&&(d=!0),v.call(this,e,i,!0),this.bounds=new o(e,i,h,s),this.collideLeft=l,this.collideRight=f,this.collideTop=u,this.collideBottom=d},update:function(n){var e=this.bounds,i=-n.bounce,h=n.worldPosition;h.xe.right&&this.collideRight&&(n.x-=h.x-e.right,n.velocityX*=i),h.ye.bottom&&this.collideBottom&&(n.y-=h.y-e.bottom,n.velocityY*=i)}});c.exports=r},31600:(c,m,t)=>{/** + */var o=t(83419),v=t(20286),a=t(87841),r=new o({Extends:v,initialize:function(e,i,h,s,l,f,u,d){l===void 0&&(l=!0),f===void 0&&(f=!0),u===void 0&&(u=!0),d===void 0&&(d=!0),v.call(this,e,i,!0),this.bounds=new a(e,i,h,s),this.collideLeft=l,this.collideRight=f,this.collideTop=u,this.collideBottom=d},update:function(n){var e=this.bounds,i=-n.bounce,h=n.worldPosition;h.xe.right&&this.collideRight&&(n.x-=h.x-e.right,n.velocityX*=i),h.ye.bottom&&this.collideBottom&&(n.y-=h.y-e.bottom,n.velocityY*=i)}});c.exports=r},31600:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(53774),r=t(43459),n=t(26388),e=t(19909),i=t(76472),h=t(44777),s=t(20696),l=t(95643),f=t(95540),u=t(26546),d=t(24502),p=t(1985),g=t(97022),y=t(86091),x=t(73162),T=t(20074),C=t(56480),M=t(68875),w=t(87841),L=t(59996),F=t(72905),O=t(90668),N=t(19186),G=t(61340),V=t(26099),K=t(15994),$=t(69601),J=["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"],X=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],Y=new a({Extends:l,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.Mask,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Texture,v.Transform,v.Visible,O],initialize:function(z,W,H,Z,Q){l.call(this,z,"ParticleEmitter"),this.particleClass=C,this.ops={accelerationX:new h("accelerationX",0),accelerationY:new h("accelerationY",0),alpha:new h("alpha",1),angle:new h("angle",{min:0,max:360},!0),bounce:new h("bounce",0),color:new i("color"),delay:new h("delay",0,!0),hold:new h("hold",0,!0),lifespan:new h("lifespan",1e3,!0),maxVelocityX:new h("maxVelocityX",1e4),maxVelocityY:new h("maxVelocityY",1e4),moveToX:new h("moveToX",0),moveToY:new h("moveToY",0),quantity:new h("quantity",1,!0),rotate:new h("rotate",0),scaleX:new h("scaleX",1),scaleY:new h("scaleY",1),speedX:new h("speedX",0,!0),speedY:new h("speedY",0,!0),tint:new h("tint",16777215),x:new h("x",0),y:new h("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 V,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 G,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new x(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(W,H),this.setTexture(Z),Q&&this.setConfig(Q)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(D){if(!D)return this;var z=0,W="",H=this.ops;for(z=0;z=this.animQuantity&&(this.animCounter=0,this.currentAnim=K(this.currentAnim+1,0,z)),W},setAnim:function(D,z,W){z===void 0&&(z=!0),W===void 0&&(W=1),this.randomAnim=z,this.animQuantity=W,this.currentAnim=0;var H=typeof D;if(this.anims.length=0,Array.isArray(D))this.anims=this.anims.concat(D);else if(H==="string")this.anims.push(D);else if(H==="object"){var Z=D;D=f(Z,"anims",null),D&&(this.anims=this.anims.concat(D));var Q=f(Z,"cycle",!1);this.randomAnim=!Q,this.animQuantity=f(Z,"quantity",W)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(D){return D===void 0&&(D=!0),this.radial=D,this},addParticleBounds:function(D,z,W,H,Z,Q,k,et){if(typeof D=="object"){var st=D;D=st.x,z=st.y,W=g(st,"w")?st.w:st.width,H=g(st,"h")?st.h:st.height}return this.addParticleProcessor(new $(D,z,W,H,Z,Q,k,et))},setParticleSpeed:function(D,z){return z===void 0&&(z=D),this.ops.speedX.onChange(D),D===z?this.ops.speedY.active=!1:this.ops.speedY.onChange(z),this.radial=!0,this},setParticleScale:function(D,z){return D===void 0&&(D=1),z===void 0&&(z=D),this.ops.scaleX.onChange(D),this.ops.scaleY.onChange(z),this},setParticleGravity:function(D,z){return this.gravityX=D,this.gravityY=z,this},setParticleAlpha:function(D){return this.ops.alpha.onChange(D),this},setParticleTint:function(D){return this.ops.tint.onChange(D),this},setEmitterAngle:function(D){return this.ops.angle.onChange(D),this},setParticleLifespan:function(D){return this.ops.lifespan.onChange(D),this},setQuantity:function(D){return this.quantity=D,this},setFrequency:function(D,z){return this.frequency=D,this.flowCounter=D>0?D:0,z&&(this.quantity=z),this},addDeathZone:function(D){Array.isArray(D)||(D=[D]);for(var z,W=[],H=0;H-1&&(this.zoneTotal++,this.zoneTotal===H.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===W&&(this.zoneIndex=0)))}},getDeathZone:function(D){for(var z=this.deathZones,W=0;W=0&&(this.zoneIndex=z),this},addParticleProcessor:function(D){return this.processors.exists(D)||(D.emitter&&D.emitter.removeParticleProcessor(D),this.processors.add(D),D.emitter=this),D},removeParticleProcessor:function(D){return this.processors.exists(D)&&(this.processors.remove(D,!0),D.emitter=null),D},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(D){return this.addParticleProcessor(new d(D))},reserve:function(D){var z=this.dead;if(this.maxParticles>0){var W=this.getParticleCount();W+D>this.maxParticles&&(D=this.maxParticles-(W+D))}for(var H=0;H0&&this.getParticleCount()>=this.maxParticles?!0:this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(D,z){return D===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof D=="function"&&(this.emitCallback=D,z&&(this.emitCallbackScope=z)),this},onParticleDeath:function(D,z){return D===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof D=="function"&&(this.deathCallback=D,z&&(this.deathCallbackScope=z)),this},killAll:function(){for(var D=this.dead,z=this.alive;z.length>0;)D.push(z.pop());return this},forEachAlive:function(D,z){for(var W=this.alive,H=W.length,Z=0;Z0&&this.fastForward(D),this.emitting=!0,this.resetCounters(this.frequency,!0),z!==void 0&&(this.duration=Math.abs(z)),this.emit(s.START,this)),this},stop:function(D){return D===void 0&&(D=!1),this.emitting&&(this.emitting=!1,D&&this.killAll(),this.emit(s.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(D,z){return D===void 0&&(D=""),z===void 0&&(z=this.true),this.sortProperty=D,this.sortOrderAsc=z,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(D){return this.sortProperty!==""?D=this.depthSortCallback:D=null,this.sortCallback=D,this},depthSort:function(){return N(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(D,z){var W=this.sortProperty;return this.sortOrderAsc?D[W]-z[W]:z[W]-D[W]},flow:function(D,z,W){return z===void 0&&(z=1),this.emitting=!1,this.frequency=D,this.quantity=z,W!==void 0&&(this.stopAfter=W),this.start()},explode:function(D,z,W){this.frequency=-1,this.resetCounters(-1,!0);var H=this.emitParticle(D,z,W);return this.emit(s.EXPLODE,this,H),H},emitParticleAt:function(D,z,W){return this.emitParticle(W,D,z)},emitParticle:function(D,z,W){if(!this.atLimit()){D===void 0&&(D=this.ops.quantity.onEmit());for(var H=this.dead,Z=this.stopAfter,Q=this.follow?this.follow.x+this.followOffset.x:z,k=this.follow?this.follow.y+this.followOffset.y:W,et=0;et0&&(this.stopCounter++,this.stopCounter>=Z)||this.atLimit())break}return st}},fastForward:function(D,z){z===void 0&&(z=1e3/60);var W=0;for(this.skipping=!0;W0){var ot=this.deathCallback,ft=this.deathCallbackScope;for(k=st-1;k>=0;k--){var at=et[k];Z.splice(at.index,1),Q.push(at.particle),ot&&ot.call(ft,at.particle),at.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&Z.length===0&&(this.completeFlag=0,this.emit(s.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=z;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=z,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(D){for(var z=this.getWorldTransformMatrix(),W=this.alive,H=W.length,Z=[],Q=0;Q0){var rt=0;for(this.skipping=!0;rt0&&y(H,D,D),H},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(D){this.ops.x.onChange(D)}},particleY:{get:function(){return this.ops.y.current},set:function(D){this.ops.y.onChange(D)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(D){this.ops.accelerationX.onChange(D)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(D){this.ops.accelerationY.onChange(D)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(D){this.ops.maxVelocityX.onChange(D)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(D){this.ops.maxVelocityY.onChange(D)}},speed:{get:function(){return this.ops.speedX.current},set:function(D){this.ops.speedX.onChange(D),this.ops.speedY.onChange(D)}},speedX:{get:function(){return this.ops.speedX.current},set:function(D){this.ops.speedX.onChange(D)}},speedY:{get:function(){return this.ops.speedY.current},set:function(D){this.ops.speedY.onChange(D)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(D){this.ops.moveToX.onChange(D)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(D){this.ops.moveToY.onChange(D)}},bounce:{get:function(){return this.ops.bounce.current},set:function(D){this.ops.bounce.onChange(D)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(D){this.ops.scaleX.onChange(D)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(D){this.ops.scaleY.onChange(D)}},particleColor:{get:function(){return this.ops.color.current},set:function(D){this.ops.color.onChange(D)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(D){this.ops.color.setEase(D)}},particleTint:{get:function(){return this.ops.tint.current},set:function(D){this.ops.tint.onChange(D)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(D){this.ops.alpha.onChange(D)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(D){this.ops.lifespan.onChange(D)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(D){this.ops.angle.onChange(D)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(D){this.ops.rotate.onChange(D)}},quantity:{get:function(){return this.ops.quantity.current},set:function(D){this.ops.quantity.onChange(D)}},delay:{get:function(){return this.ops.delay.current},set:function(D){this.ops.delay.onChange(D)}},hold:{get:function(){return this.ops.hold.current},set:function(D){this.ops.hold.onChange(D)}},flowCounter:{get:function(){return this.counters[0]},set:function(D){this.counters[0]=D}},frameCounter:{get:function(){return this.counters[1]},set:function(D){this.counters[1]=D}},animCounter:{get:function(){return this.counters[2]},set:function(D){this.counters[2]=D}},elapsed:{get:function(){return this.counters[3]},set:function(D){this.counters[3]=D}},stopCounter:{get:function(){return this.counters[4]},set:function(D){this.counters[4]=D}},completeFlag:{get:function(){return this.counters[5]},set:function(D){this.counters[5]=D}},zoneIndex:{get:function(){return this.counters[6]},set:function(D){this.counters[6]=D}},zoneTotal:{get:function(){return this.counters[7]},set:function(D){this.counters[7]=D}},currentFrame:{get:function(){return this.counters[8]},set:function(D){this.counters[8]=D}},currentAnim:{get:function(){return this.counters[9]},set:function(D){this.counters[9]=D}},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 D,z=this.ops;for(D=0;D{/** + */var o=t(83419),v=t(31401),a=t(53774),r=t(43459),n=t(26388),e=t(19909),i=t(76472),h=t(44777),s=t(20696),l=t(95643),f=t(95540),u=t(26546),d=t(24502),p=t(1985),g=t(97022),y=t(86091),x=t(73162),C=t(20074),P=t(56480),M=t(68875),w=t(87841),I=t(59996),L=t(72905),B=t(90668),N=t(19186),G=t(61340),V=t(26099),K=t(15994),j=t(69601),J=["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"],X=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],Y=new o({Extends:l,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.Mask,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Texture,v.Transform,v.Visible,B],initialize:function(z,W,H,Z,Q){l.call(this,z,"ParticleEmitter"),this.particleClass=P,this.ops={accelerationX:new h("accelerationX",0),accelerationY:new h("accelerationY",0),alpha:new h("alpha",1),angle:new h("angle",{min:0,max:360},!0),bounce:new h("bounce",0),color:new i("color"),delay:new h("delay",0,!0),hold:new h("hold",0,!0),lifespan:new h("lifespan",1e3,!0),maxVelocityX:new h("maxVelocityX",1e4),maxVelocityY:new h("maxVelocityY",1e4),moveToX:new h("moveToX",0),moveToY:new h("moveToY",0),quantity:new h("quantity",1,!0),rotate:new h("rotate",0),scaleX:new h("scaleX",1),scaleY:new h("scaleY",1),speedX:new h("speedX",0,!0),speedY:new h("speedY",0,!0),tint:new h("tint",16777215),x:new h("x",0),y:new h("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 V,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 G,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new x(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(W,H),this.setTexture(Z),Q&&this.setConfig(Q)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(b){if(!b)return this;var z=0,W="",H=this.ops;for(z=0;z=this.animQuantity&&(this.animCounter=0,this.currentAnim=K(this.currentAnim+1,0,z)),W},setAnim:function(b,z,W){z===void 0&&(z=!0),W===void 0&&(W=1),this.randomAnim=z,this.animQuantity=W,this.currentAnim=0;var H=typeof b;if(this.anims.length=0,Array.isArray(b))this.anims=this.anims.concat(b);else if(H==="string")this.anims.push(b);else if(H==="object"){var Z=b;b=f(Z,"anims",null),b&&(this.anims=this.anims.concat(b));var Q=f(Z,"cycle",!1);this.randomAnim=!Q,this.animQuantity=f(Z,"quantity",W)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(b){return b===void 0&&(b=!0),this.radial=b,this},addParticleBounds:function(b,z,W,H,Z,Q,k,et){if(typeof b=="object"){var st=b;b=st.x,z=st.y,W=g(st,"w")?st.w:st.width,H=g(st,"h")?st.h:st.height}return this.addParticleProcessor(new j(b,z,W,H,Z,Q,k,et))},setParticleSpeed:function(b,z){return z===void 0&&(z=b),this.ops.speedX.onChange(b),b===z?this.ops.speedY.active=!1:this.ops.speedY.onChange(z),this.radial=!0,this},setParticleScale:function(b,z){return b===void 0&&(b=1),z===void 0&&(z=b),this.ops.scaleX.onChange(b),this.ops.scaleY.onChange(z),this},setParticleGravity:function(b,z){return this.gravityX=b,this.gravityY=z,this},setParticleAlpha:function(b){return this.ops.alpha.onChange(b),this},setParticleTint:function(b){return this.ops.tint.onChange(b),this},setEmitterAngle:function(b){return this.ops.angle.onChange(b),this},setParticleLifespan:function(b){return this.ops.lifespan.onChange(b),this},setQuantity:function(b){return this.quantity=b,this},setFrequency:function(b,z){return this.frequency=b,this.flowCounter=b>0?b:0,z&&(this.quantity=z),this},addDeathZone:function(b){Array.isArray(b)||(b=[b]);for(var z,W=[],H=0;H-1&&(this.zoneTotal++,this.zoneTotal===H.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===W&&(this.zoneIndex=0)))}},getDeathZone:function(b){for(var z=this.deathZones,W=0;W=0&&(this.zoneIndex=z),this},addParticleProcessor:function(b){return this.processors.exists(b)||(b.emitter&&b.emitter.removeParticleProcessor(b),this.processors.add(b),b.emitter=this),b},removeParticleProcessor:function(b){return this.processors.exists(b)&&(this.processors.remove(b,!0),b.emitter=null),b},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(b){return this.addParticleProcessor(new d(b))},reserve:function(b){var z=this.dead;if(this.maxParticles>0){var W=this.getParticleCount();W+b>this.maxParticles&&(b=this.maxParticles-(W+b))}for(var H=0;H0&&this.getParticleCount()>=this.maxParticles?!0:this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(b,z){return b===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof b=="function"&&(this.emitCallback=b,z&&(this.emitCallbackScope=z)),this},onParticleDeath:function(b,z){return b===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof b=="function"&&(this.deathCallback=b,z&&(this.deathCallbackScope=z)),this},killAll:function(){for(var b=this.dead,z=this.alive;z.length>0;)b.push(z.pop());return this},forEachAlive:function(b,z){for(var W=this.alive,H=W.length,Z=0;Z0&&this.fastForward(b),this.emitting=!0,this.resetCounters(this.frequency,!0),z!==void 0&&(this.duration=Math.abs(z)),this.emit(s.START,this)),this},stop:function(b){return b===void 0&&(b=!1),this.emitting&&(this.emitting=!1,b&&this.killAll(),this.emit(s.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(b,z){return b===void 0&&(b=""),z===void 0&&(z=this.true),this.sortProperty=b,this.sortOrderAsc=z,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(b){return this.sortProperty!==""?b=this.depthSortCallback:b=null,this.sortCallback=b,this},depthSort:function(){return N(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(b,z){var W=this.sortProperty;return this.sortOrderAsc?b[W]-z[W]:z[W]-b[W]},flow:function(b,z,W){return z===void 0&&(z=1),this.emitting=!1,this.frequency=b,this.quantity=z,W!==void 0&&(this.stopAfter=W),this.start()},explode:function(b,z,W){this.frequency=-1,this.resetCounters(-1,!0);var H=this.emitParticle(b,z,W);return this.emit(s.EXPLODE,this,H),H},emitParticleAt:function(b,z,W){return this.emitParticle(W,b,z)},emitParticle:function(b,z,W){if(!this.atLimit()){b===void 0&&(b=this.ops.quantity.onEmit());for(var H=this.dead,Z=this.stopAfter,Q=this.follow?this.follow.x+this.followOffset.x:z,k=this.follow?this.follow.y+this.followOffset.y:W,et=0;et0&&(this.stopCounter++,this.stopCounter>=Z)||this.atLimit())break}return st}},fastForward:function(b,z){z===void 0&&(z=1e3/60);var W=0;for(this.skipping=!0;W0){var ot=this.deathCallback,ft=this.deathCallbackScope;for(k=st-1;k>=0;k--){var at=et[k];Z.splice(at.index,1),Q.push(at.particle),ot&&ot.call(ft,at.particle),at.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&Z.length===0&&(this.completeFlag=0,this.emit(s.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=z;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=z,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(b){for(var z=this.getWorldTransformMatrix(),W=this.alive,H=W.length,Z=[],Q=0;Q0){var rt=0;for(this.skipping=!0;rt0&&y(H,b,b),H},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(b){this.ops.x.onChange(b)}},particleY:{get:function(){return this.ops.y.current},set:function(b){this.ops.y.onChange(b)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(b){this.ops.accelerationX.onChange(b)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(b){this.ops.accelerationY.onChange(b)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(b){this.ops.maxVelocityX.onChange(b)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(b){this.ops.maxVelocityY.onChange(b)}},speed:{get:function(){return this.ops.speedX.current},set:function(b){this.ops.speedX.onChange(b),this.ops.speedY.onChange(b)}},speedX:{get:function(){return this.ops.speedX.current},set:function(b){this.ops.speedX.onChange(b)}},speedY:{get:function(){return this.ops.speedY.current},set:function(b){this.ops.speedY.onChange(b)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(b){this.ops.moveToX.onChange(b)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(b){this.ops.moveToY.onChange(b)}},bounce:{get:function(){return this.ops.bounce.current},set:function(b){this.ops.bounce.onChange(b)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(b){this.ops.scaleX.onChange(b)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(b){this.ops.scaleY.onChange(b)}},particleColor:{get:function(){return this.ops.color.current},set:function(b){this.ops.color.onChange(b)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(b){this.ops.color.setEase(b)}},particleTint:{get:function(){return this.ops.tint.current},set:function(b){this.ops.tint.onChange(b)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(b){this.ops.alpha.onChange(b)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(b){this.ops.lifespan.onChange(b)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(b){this.ops.angle.onChange(b)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(b){this.ops.rotate.onChange(b)}},quantity:{get:function(){return this.ops.quantity.current},set:function(b){this.ops.quantity.onChange(b)}},delay:{get:function(){return this.ops.delay.current},set:function(b){this.ops.delay.onChange(b)}},hold:{get:function(){return this.ops.hold.current},set:function(b){this.ops.hold.onChange(b)}},flowCounter:{get:function(){return this.counters[0]},set:function(b){this.counters[0]=b}},frameCounter:{get:function(){return this.counters[1]},set:function(b){this.counters[1]=b}},animCounter:{get:function(){return this.counters[2]},set:function(b){this.counters[2]=b}},elapsed:{get:function(){return this.counters[3]},set:function(b){this.counters[3]=b}},stopCounter:{get:function(){return this.counters[4]},set:function(b){this.counters[4]=b}},completeFlag:{get:function(){return this.counters[5]},set:function(b){this.counters[5]=b}},zoneIndex:{get:function(){return this.counters[6]},set:function(b){this.counters[6]=b}},zoneTotal:{get:function(){return this.counters[7]},set:function(b){this.counters[7]=b}},currentFrame:{get:function(){return this.counters[8]},set:function(b){this.counters[8]=b}},currentAnim:{get:function(){return this.counters[9]},set:function(b){this.counters[9]=b}},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 b,z=this.ops;for(b=0;b{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(59996),v=t(61340),o=new v,r=new v,n=new v,e=new v,i=function(h,s,l,f){var u=o,d=r,p=n,g=e;f?(g.loadIdentity(),g.multiply(f),g.translate(s.x,s.y),g.rotate(s.rotation),g.scale(s.scaleX,s.scaleY)):g.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY);var y=h.currentContext,x=l.roundPixels,T=l.alpha,C=s.alpha,M=s.alive,w=M.length,L=s.viewBounds;if(!(!s.visible||w===0||L&&!a(L,l.worldView))){s.sortCallback&&s.depthSort(),l.addToRenderList(s);var F=s.scrollFactorX,O=s.scrollFactorY;y.save(),y.globalCompositeOperation=h.blendModes[s.blendMode];for(var N=0;N0&&$.height>0){var J=-K.halfWidth,X=-K.halfHeight;y.globalAlpha=V,y.save(),d.setToContext(y),x&&(J=Math.round(J),X=Math.round(X)),y.imageSmoothingEnabled=!K.source.scaleMode,y.drawImage(K.source.image,$.x,$.y,$.width,$.height,J,X,$.width,$.height),y.restore()}}}y.restore()}};c.exports=i},92730:(c,m,t)=>{/** + */var o=t(59996),v=t(61340),a=new v,r=new v,n=new v,e=new v,i=function(h,s,l,f){var u=a,d=r,p=n,g=e;f?(g.loadIdentity(),g.multiply(f),g.translate(s.x,s.y),g.rotate(s.rotation),g.scale(s.scaleX,s.scaleY)):g.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY);var y=h.currentContext,x=l.roundPixels,C=l.alpha,P=s.alpha,M=s.alive,w=M.length,I=s.viewBounds;if(!(!s.visible||w===0||I&&!o(I,l.worldView))){s.sortCallback&&s.depthSort(),l.addToRenderList(s);var L=s.scrollFactorX,B=s.scrollFactorY;y.save(),y.globalCompositeOperation=h.blendModes[s.blendMode];for(var N=0;N0&&j.height>0){var J=-K.halfWidth,X=-K.halfHeight;y.globalAlpha=V,y.save(),d.setToContext(y),x&&(J=Math.round(J),X=Math.round(X)),y.imageSmoothingEnabled=!K.source.scaleMode,y.drawImage(K.source.image,j.x,j.y,j.width,j.height,J,X,j.width,j.height),y.restore()}}}y.restore()}};c.exports=i},92730:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(95540),n=t(31600);v.register("particles",function(e,i){e===void 0&&(e={});var h=o(e,"key",null),s=r(e,"config",null),l=new n(this.scene,0,0,h);return i!==void 0&&(e.add=i),a(this.scene,l,e),s&&l.setConfig(s),l})},676:(c,m,t)=>{/** + */var o=t(25305),v=t(44603),a=t(23568),r=t(95540),n=t(31600);v.register("particles",function(e,i){e===void 0&&(e={});var h=a(e,"key",null),s=r(e,"config",null),l=new n(this.scene,0,0,h);return i!==void 0&&(e.add=i),o(this.scene,l,e),s&&l.setConfig(s),l})},676:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(31600);a.register("particles",function(o,r,n,e){return o!==void 0&&typeof o=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new v(this.scene,o,r,n,e))})},90668:(c,m,t)=>{/** + */var o=t(39429),v=t(31600);o.register("particles",function(a,r,n,e){return a!==void 0&&typeof a=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new v(this.scene,a,r,n,e))})},90668:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(21188),o=t(9871),c.exports={renderWebGL:v,renderCanvas:o}},21188:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(21188),a=t(9871),c.exports={renderWebGL:v,renderCanvas:a}},21188:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(59996),v=t(61340),o=t(70554),r=new v,n=new v,e=new v,i=new v,h=function(s,l,f,u){var d=s.pipelines.set(l.pipeline),p=r,g=n,y=e,x=i;u?(x.loadIdentity(),x.multiply(u),x.translate(l.x,l.y),x.rotate(l.rotation),x.scale(l.scaleX,l.scaleY)):x.applyITRS(l.x,l.y,l.rotation,l.scaleX,l.scaleY);var T=o.getTintAppendFloatAlpha,C=f.alpha,M=l.alpha;s.pipelines.preBatch(l);var w=l.alive,L=w.length,F=l.viewBounds;if(!(L===0||F&&!a(F,f.worldView))){l.sortCallback&&l.depthSort(),f.addToRenderList(l),p.copyFrom(f.matrix),p.multiplyWithOffset(x,-f.scrollX*l.scrollFactorX,-f.scrollY*l.scrollFactorY),s.setBlendMode(l.blendMode),l.mask&&(l.mask.preRenderWebGL(s,l,f),s.pipelines.set(l.pipeline));for(var O=l.tintFill,N,G,V=0;V{/** + */var o=t(59996),v=t(61340),a=t(70554),r=new v,n=new v,e=new v,i=new v,h=function(s,l,f,u){var d=s.pipelines.set(l.pipeline),p=r,g=n,y=e,x=i;u?(x.loadIdentity(),x.multiply(u),x.translate(l.x,l.y),x.rotate(l.rotation),x.scale(l.scaleX,l.scaleY)):x.applyITRS(l.x,l.y,l.rotation,l.scaleX,l.scaleY);var C=a.getTintAppendFloatAlpha,P=f.alpha,M=l.alpha;s.pipelines.preBatch(l);var w=l.alive,I=w.length,L=l.viewBounds;if(!(I===0||L&&!o(L,f.worldView))){l.sortCallback&&l.depthSort(),f.addToRenderList(l),p.copyFrom(f.matrix),p.multiplyWithOffset(x,-f.scrollX*l.scrollFactorX,-f.scrollY*l.scrollFactorY),s.setBlendMode(l.blendMode),l.mask&&(l.mask.preRenderWebGL(s,l,f),s.pipelines.set(l.pipeline));for(var B=l.tintFill,N,G,V=0;V{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({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}});c.exports=v},9774:c=>{/** + */var o=t(83419),v=new o({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}});c.exports=v},9774:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1735,15 +1735,15 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n){this.source=r,this.killOnEnter=n},willKill:function(o){var r=o.worldPosition,n=this.source.contains(r.x,r.y);return n&&this.killOnEnter||!n&&!this.killOnEnter}});c.exports=v},19909:(c,m,t)=>{/** + */var o=t(83419),v=new o({initialize:function(r,n){this.source=r,this.killOnEnter=n},willKill:function(a){var r=a.worldPosition,n=this.source.contains(r.x,r.y);return n&&this.killOnEnter||!n&&!this.killOnEnter}});c.exports=v},19909:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e,i,h,s){i===void 0&&(i=!1),h===void 0&&(h=!0),s===void 0&&(s=-1),this.source=r,this.points=[],this.quantity=n,this.stepRate=e,this.yoyo=i,this.counter=-1,this.seamless=h,this._length=0,this._direction=0,this.total=s,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var o=this.points[0],r=this.points[this.points.length-1];o.x===r.x&&o.y===r.y&&this.points.pop()}var n=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(o){return this.source=o,this.updateSource()},getPoint:function(o){this._direction===0?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,this.counter===-1&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var r=this.points[this.counter];r&&(o.x=r.x,o.y=r.y)}});c.exports=v},68875:(c,m,t)=>{/** + */var o=t(83419),v=new o({initialize:function(r,n,e,i,h,s){i===void 0&&(i=!1),h===void 0&&(h=!0),s===void 0&&(s=-1),this.source=r,this.points=[],this.quantity=n,this.stepRate=e,this.yoyo=i,this.counter=-1,this.seamless=h,this._length=0,this._direction=0,this.total=s,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var a=this.points[0],r=this.points[this.points.length-1];a.x===r.x&&a.y===r.y&&this.points.pop()}var n=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(a){return this.source=a,this.updateSource()},getPoint:function(a){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&&(a.x=r.x,a.y=r.y)}});c.exports=v},68875:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(26099),o=new a({initialize:function(n){this.source=n,this._tempVec=new v,this.total=-1},getPoint:function(r){var n=this._tempVec;this.source.getRandomPoint(n),r.x=n.x,r.y=n.y}});c.exports=o},21024:(c,m,t)=>{/** + */var o=t(83419),v=t(26099),a=new o({initialize:function(n){this.source=n,this._tempVec=new v,this.total=-1},getPoint:function(r){var n=this._tempVec;this.source.getRandomPoint(n),r.x=n.x,r.y=n.y}});c.exports=a},21024:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1751,59 +1751,59 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(68287),r=new a({Extends:o,Mixins:[v.PathFollower],initialize:function(e,i,h,s,l,f){o.call(this,e,h,s,l,f),this.path=i},preUpdate:function(n,e){this.anims.update(n,e),this.pathUpdate(n)}});c.exports=r},90145:(c,m,t)=>{/** + */var o=t(83419),v=t(31401),a=t(68287),r=new o({Extends:a,Mixins:[v.PathFollower],initialize:function(e,i,h,s,l,f){a.call(this,e,h,s,l,f),this.path=i},preUpdate:function(n,e){this.anims.update(n,e),this.pathUpdate(n)}});c.exports=r},90145:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(1159);a.register("follower",function(o,r,n,e,i){var h=new v(this.scene,o,r,n,e,i);return this.displayList.add(h),this.updateList.add(h),h})},33663:(c,m,t)=>{/** + */var o=t(39429),v=t(1159);o.register("follower",function(a,r,n,e,i){var h=new v(this.scene,a,r,n,e,i);return this.displayList.add(h),this.updateList.add(h),h})},33663:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(9674),v=t(83419),o=t(48803),r=t(90664),n=t(4703),e=t(45650),i=new v({Extends:n,initialize:function(s,l,f,u,d,p,g,y){u||(u="__DEFAULT"),n.call(this,s,l,f,u,d),this.type="Plane",this.anims=new a(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(p,g,y),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(h,s,l){h===void 0&&(h=8),s===void 0&&(s=8),l===void 0&&(l=!1);var f=!1;return l&&(f=!0),this.gridWidth=h,this.gridHeight=s,this.isTiled=l,this.clear(),o({mesh:this,widthSegments:h,heightSegments:s,isOrtho:!1,tile:l,flipY:f}),this},setSizeToFrame:function(h){h===void 0&&(h=!0);var s=this.frame;if(this.setPerspective(this.width/s.width,this.height/s.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!h)return this;var l=this.gridWidth,f=this.gridHeight,u=this.vertices,d=s.u0,p=s.u1,g=s.v0,y=s.v1,x,T,C=0;if(this.isTiled)for(g=s.v1,y=s.v0,T=0;T7&&x>7?g.push(d.r,d.g,d.b,l):g.push(p.r,p.g,p.b,f);var T=this.scene.sys.textures.addUint8Array(e(),new Uint8Array(g),16,16);return this.removeCheckerboard(),this.setTexture(T),this.setSizeToFrame(),this.setViewHeight(u),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(h,s){return this.anims.play(h,s)},playReverse:function(h,s){return this.anims.playReverse(h,s)},playAfterDelay:function(h,s){return this.anims.playAfterDelay(h,s)},playAfterRepeat:function(h,s){return this.anims.playAfterRepeat(h,s)},stop:function(){return this.anims.stop()},stopAfterDelay:function(h){return this.anims.stopAfterDelay(h)},stopAfterRepeat:function(h){return this.anims.stopAfterRepeat(h)},stopOnFrame:function(h){return this.anims.stopOnFrame(h)},preUpdate:function(h,s){n.prototype.preUpdate.call(this,h,s),this.anims.update(h,s)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});c.exports=i},56015:(c,m,t)=>{/** + */var o=t(9674),v=t(83419),a=t(48803),r=t(90664),n=t(4703),e=t(45650),i=new v({Extends:n,initialize:function(s,l,f,u,d,p,g,y){u||(u="__DEFAULT"),n.call(this,s,l,f,u,d),this.type="Plane",this.anims=new o(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(p,g,y),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(h,s,l){h===void 0&&(h=8),s===void 0&&(s=8),l===void 0&&(l=!1);var f=!1;return l&&(f=!0),this.gridWidth=h,this.gridHeight=s,this.isTiled=l,this.clear(),a({mesh:this,widthSegments:h,heightSegments:s,isOrtho:!1,tile:l,flipY:f}),this},setSizeToFrame:function(h){h===void 0&&(h=!0);var s=this.frame;if(this.setPerspective(this.width/s.width,this.height/s.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!h)return this;var l=this.gridWidth,f=this.gridHeight,u=this.vertices,d=s.u0,p=s.u1,g=s.v0,y=s.v1,x,C,P=0;if(this.isTiled)for(g=s.v1,y=s.v0,C=0;C7&&x>7?g.push(d.r,d.g,d.b,l):g.push(p.r,p.g,p.b,f);var C=this.scene.sys.textures.addUint8Array(e(),new Uint8Array(g),16,16);return this.removeCheckerboard(),this.setTexture(C),this.setSizeToFrame(),this.setViewHeight(u),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(h,s){return this.anims.play(h,s)},playReverse:function(h,s){return this.anims.playReverse(h,s)},playAfterDelay:function(h,s){return this.anims.playAfterDelay(h,s)},playAfterRepeat:function(h,s){return this.anims.playAfterRepeat(h,s)},stop:function(){return this.anims.stop()},stopAfterDelay:function(h){return this.anims.stopAfterDelay(h)},stopAfterRepeat:function(h){return this.anims.stopAfterRepeat(h)},stopOnFrame:function(h){return this.anims.stopOnFrame(h)},preUpdate:function(h,s){n.prototype.preUpdate.call(this,h,s),this.anims.update(h,s)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});c.exports=i},56015:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(13059),o=t(44603),r=t(23568),n=t(35154),e=t(33663);o.register("plane",function(i,h){i===void 0&&(i={});var s=r(i,"key",null),l=r(i,"frame",null),f=n(i,"width",8),u=n(i,"height",8),d=n(i,"tile",!1),p=new e(this.scene,0,0,s,l,f,u,d);h!==void 0&&(i.add=h);var g=n(i,"checkerboard",null);if(g){var y=n(g,"color1",16777215),x=n(g,"color2",255),T=n(g,"alpha1",255),C=n(g,"alpha2",255),M=n(g,"height",128);p.createCheckerboard(y,x,T,C,M)}return a(this.scene,p,i),v(p,i),p})},30985:(c,m,t)=>{/** + */var o=t(25305),v=t(13059),a=t(44603),r=t(23568),n=t(35154),e=t(33663);a.register("plane",function(i,h){i===void 0&&(i={});var s=r(i,"key",null),l=r(i,"frame",null),f=n(i,"width",8),u=n(i,"height",8),d=n(i,"tile",!1),p=new e(this.scene,0,0,s,l,f,u,d);h!==void 0&&(i.add=h);var g=n(i,"checkerboard",null);if(g){var y=n(g,"color1",16777215),x=n(g,"color2",255),C=n(g,"alpha1",255),P=n(g,"alpha2",255),M=n(g,"height",128);p.createCheckerboard(y,x,C,P,M)}return o(this.scene,p,i),v(p,i),p})},30985:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(33663),v=t(39429);v.register("plane",function(o,r,n,e,i,h,s){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s))})},80321:(c,m,t)=>{/** + */var o=t(33663),v=t(39429);v.register("plane",function(a,r,n,e,i,h,s){return this.displayList.add(new o(this.scene,a,r,n,e,i,h,s))})},80321:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(95643),r=t(30100),n=t(36060),e=t(67277),i=new a({Extends:o,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.Mask,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Transform,v.Visible,e],initialize:function(s,l,f,u,d,p,g){u===void 0&&(u=16777215),d===void 0&&(d=128),p===void 0&&(p=1),g===void 0&&(g=.1),o.call(this,s,"PointLight"),this.initPipeline(n.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(l,f),this.color=r(u),this.intensity=p,this.attenuation=g,this.width=d*2,this.height=d*2,this._radius=d},radius:{get:function(){return this._radius},set:function(h){this._radius=h,this.width=h*2,this.height=h*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});c.exports=i},39829:(c,m,t)=>{/** + */var o=t(83419),v=t(31401),a=t(95643),r=t(30100),n=t(36060),e=t(67277),i=new o({Extends:a,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.Mask,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Transform,v.Visible,e],initialize:function(s,l,f,u,d,p,g){u===void 0&&(u=16777215),d===void 0&&(d=128),p===void 0&&(p=1),g===void 0&&(g=.1),a.call(this,s,"PointLight"),this.initPipeline(n.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(l,f),this.color=r(u),this.intensity=p,this.attenuation=g,this.width=d*2,this.height=d*2,this._radius=d},radius:{get:function(){return this._radius},set:function(h){this._radius=h,this.width=h*2,this.height=h*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});c.exports=i},39829:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(80321);v.register("pointlight",function(n,e){n===void 0&&(n={});var i=o(n,"color",16777215),h=o(n,"radius",128),s=o(n,"intensity",1),l=o(n,"attenuation",.1),f=new r(this.scene,0,0,i,h,s,l);return e!==void 0&&(n.add=e),a(this.scene,f,n),f})},71255:(c,m,t)=>{/** + */var o=t(25305),v=t(44603),a=t(23568),r=t(80321);v.register("pointlight",function(n,e){n===void 0&&(n={});var i=a(n,"color",16777215),h=a(n,"radius",128),s=a(n,"intensity",1),l=a(n,"attenuation",.1),f=new r(this.scene,0,0,i,h,s,l);return e!==void 0&&(n.add=e),o(this.scene,f,n),f})},71255:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(80321);a.register("pointlight",function(o,r,n,e,i,h){return this.displayList.add(new v(this.scene,o,r,n,e,i,h))})},67277:(c,m,t)=>{/** + */var o=t(39429),v=t(80321);o.register("pointlight",function(a,r,n,e,i,h){return this.displayList.add(new v(this.scene,a,r,n,e,i,h))})},67277:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(57787),c.exports={renderWebGL:v,renderCanvas:o}},57787:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(57787),c.exports={renderWebGL:v,renderCanvas:a}},57787:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=function(o,r,n,e){n.addToRenderList(r);var i=o.pipelines.set(r.pipeline),h=a(r,n,e).calc,s=r.width,l=r.height,f=-r._radius,u=-r._radius,d=f+s,p=u+l,g=h.getX(0,0),y=h.getY(0,0),x=h.getX(f,u),T=h.getY(f,u),C=h.getX(f,p),M=h.getY(f,p),w=h.getX(d,p),L=h.getY(d,p),F=h.getX(d,u),O=h.getY(d,u);o.pipelines.preBatch(r),i.batchPointLight(r,n,x,T,C,M,w,L,F,O,g,y),o.pipelines.postBatch(r)};c.exports=v},591:(c,m,t)=>{/** + */var o=t(91296),v=function(a,r,n,e){n.addToRenderList(r);var i=a.pipelines.set(r.pipeline),h=o(r,n,e).calc,s=r.width,l=r.height,f=-r._radius,u=-r._radius,d=f+s,p=u+l,g=h.getX(0,0),y=h.getY(0,0),x=h.getX(f,u),C=h.getY(f,u),P=h.getX(f,p),M=h.getY(f,p),w=h.getX(d,p),I=h.getY(d,p),L=h.getX(d,u),B=h.getY(d,u);a.pipelines.preBatch(r),i.batchPointLight(r,n,x,C,P,M,w,I,L,B,g,y),a.pipelines.postBatch(r)};c.exports=v},591:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(81320),o=t(88571),r=new a({Extends:o,initialize:function(e,i,h,s,l){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=32),l===void 0&&(l=32);var f=new v(e.sys.textures,"",s,l);o.call(this,e,i,h,f),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 i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=n,i.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,i,h,s,l){return this.texture.fill(n,e,i,h,s,l),this},clear:function(){return this.texture.clear(),this},stamp:function(n,e,i,h,s){return this.texture.stamp(n,e,i,h,s),this},erase:function(n,e,i){return this.texture.erase(n,e,i),this},draw:function(n,e,i,h,s){return this.texture.draw(n,e,i,h,s),this},drawFrame:function(n,e,i,h,s,l){return this.texture.drawFrame(n,e,i,h,s,l),this},repeat:function(n,e,i,h,s,l,f,u,d){return this.texture.repeat(n,e,i,h,s,l,f,u,d),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(n,e,i,h,s){return this.texture.batchDraw(n,e,i,h,s),this},batchDrawFrame:function(n,e,i,h,s,l){return this.texture.batchDrawFrame(n,e,i,h,s,l),this},endDraw:function(n){return this.texture.endDraw(n),this},snapshotArea:function(n,e,i,h,s,l,f){return this.texture.snapshotArea(n,e,i,h,s,l,f),this},snapshot:function(n,e,i){return this.snapshotArea(0,0,this.width,this.height,n,e,i)},snapshotPixel:function(n,e,i){return this.snapshotArea(n,e,1,1,i,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});c.exports=r},34495:(c,m,t)=>{/** + */var o=t(83419),v=t(81320),a=t(88571),r=new o({Extends:a,initialize:function(e,i,h,s,l){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=32),l===void 0&&(l=32);var f=new v(e.sys.textures,"",s,l);a.call(this,e,i,h,f),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 i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=n,i.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,i,h,s,l){return this.texture.fill(n,e,i,h,s,l),this},clear:function(){return this.texture.clear(),this},stamp:function(n,e,i,h,s){return this.texture.stamp(n,e,i,h,s),this},erase:function(n,e,i){return this.texture.erase(n,e,i),this},draw:function(n,e,i,h,s){return this.texture.draw(n,e,i,h,s),this},drawFrame:function(n,e,i,h,s,l){return this.texture.drawFrame(n,e,i,h,s,l),this},repeat:function(n,e,i,h,s,l,f,u,d){return this.texture.repeat(n,e,i,h,s,l,f,u,d),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(n,e,i,h,s){return this.texture.batchDraw(n,e,i,h,s),this},batchDrawFrame:function(n,e,i,h,s,l){return this.texture.batchDrawFrame(n,e,i,h,s,l),this},endDraw:function(n){return this.texture.endDraw(n),this},snapshotArea:function(n,e,i,h,s,l,f){return this.texture.snapshotArea(n,e,i,h,s,l,f),this},snapshot:function(n,e,i){return this.snapshotArea(0,0,this.width,this.height,n,e,i)},snapshotPixel:function(n,e,i){return this.snapshotArea(n,e,1,1,i,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});c.exports=r},34495:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(591);v.register("renderTexture",function(n,e){n===void 0&&(n={});var i=o(n,"x",0),h=o(n,"y",0),s=o(n,"width",32),l=o(n,"height",32),f=new r(this.scene,i,h,s,l);return e!==void 0&&(n.add=e),a(this.scene,f,n),f})},60505:(c,m,t)=>{/** + */var o=t(25305),v=t(44603),a=t(23568),r=t(591);v.register("renderTexture",function(n,e){n===void 0&&(n={});var i=a(n,"x",0),h=a(n,"y",0),s=a(n,"width",32),l=a(n,"height",32),f=new r(this.scene,i,h,s,l);return e!==void 0&&(n.add=e),o(this.scene,f,n),f})},60505:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(591);a.register("renderTexture",function(o,r,n,e){return this.displayList.add(new v(this.scene,o,r,n,e))})},77757:(c,m,t)=>{/** + */var o=t(39429),v=t(591);o.register("renderTexture",function(a,r,n,e){return this.displayList.add(new v(this.scene,a,r,n,e))})},77757:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(9674),v=t(83419),o=t(31401),r=t(95643),n=t(36060),e=t(38745),i=t(26099),h=new v({Extends:r,Mixins:[o.AlphaSingle,o.BlendMode,o.Depth,o.Flip,o.Mask,o.Pipeline,o.PostPipeline,o.Size,o.Texture,o.Transform,o.Visible,o.ScrollFactor,e],initialize:function(l,f,u,d,p,g,y,x,T){d===void 0&&(d="__DEFAULT"),g===void 0&&(g=2),y===void 0&&(y=!0),r.call(this,l,"Rope"),this.anims=new a(this),this.points=g,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=d==="__DEFAULT",this.dirty=!1,this.horizontal=y,this._flipX=!1,this._flipY=!1,this._perp=new i,this.debugCallback=null,this.debugGraphic=null,this.setTexture(d,p),this.setPosition(f,u),this.setSizeToFrame(),this.initPipeline(n.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(g)&&this.resizeArrays(g.length),this.setPoints(g,x,T),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(s,l){var f=this.anims.currentFrame;this.anims.update(s,l),this.anims.currentFrame!==f&&(this.updateUVs(),this.updateVertices())},play:function(s,l,f){return this.anims.play(s,l,f),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(s,l,f){return s===void 0&&(s=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(s,l,f))},setVertical:function(s,l,f){return s===void 0&&(s=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(s,l,f)):this},setTintFill:function(s){return s===void 0&&(s=!1),this.tintFill=s,this},setAlphas:function(s,l){var f=this.points.length;if(f<1)return this;var u=this.alphas;s===void 0?s=[1]:!Array.isArray(s)&&l===void 0&&(s=[s]);var d,p=0;if(l!==void 0)for(d=0;dp&&(g=s[p]),u[p]=g,s.length>p+1&&(g=s[p+1]),u[p+1]=g}return this},setColors:function(s){var l=this.points.length;if(l<1)return this;var f=this.colors;s===void 0?s=[16777215]:Array.isArray(s)||(s=[s]);var u,d=0;if(s.length===l)for(u=0;ud&&(p=s[d]),f[d]=p,s.length>d+1&&(p=s[d+1]),f[d+1]=p}return this},setPoints:function(s,l,f){if(s===void 0&&(s=2),typeof s=="number"){var u=s;u<2&&(u=2),s=[];var d,p,g;if(this.horizontal)for(g=-this.frame.halfWidth,p=this.frame.width/(u-1),d=0;d{/** + */var o=t(9674),v=t(83419),a=t(31401),r=t(95643),n=t(36060),e=t(38745),i=t(26099),h=new v({Extends:r,Mixins:[a.AlphaSingle,a.BlendMode,a.Depth,a.Flip,a.Mask,a.Pipeline,a.PostPipeline,a.Size,a.Texture,a.Transform,a.Visible,a.ScrollFactor,e],initialize:function(l,f,u,d,p,g,y,x,C){d===void 0&&(d="__DEFAULT"),g===void 0&&(g=2),y===void 0&&(y=!0),r.call(this,l,"Rope"),this.anims=new o(this),this.points=g,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=d==="__DEFAULT",this.dirty=!1,this.horizontal=y,this._flipX=!1,this._flipY=!1,this._perp=new i,this.debugCallback=null,this.debugGraphic=null,this.setTexture(d,p),this.setPosition(f,u),this.setSizeToFrame(),this.initPipeline(n.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(g)&&this.resizeArrays(g.length),this.setPoints(g,x,C),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(s,l){var f=this.anims.currentFrame;this.anims.update(s,l),this.anims.currentFrame!==f&&(this.updateUVs(),this.updateVertices())},play:function(s,l,f){return this.anims.play(s,l,f),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(s,l,f){return s===void 0&&(s=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(s,l,f))},setVertical:function(s,l,f){return s===void 0&&(s=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(s,l,f)):this},setTintFill:function(s){return s===void 0&&(s=!1),this.tintFill=s,this},setAlphas:function(s,l){var f=this.points.length;if(f<1)return this;var u=this.alphas;s===void 0?s=[1]:!Array.isArray(s)&&l===void 0&&(s=[s]);var d,p=0;if(l!==void 0)for(d=0;dp&&(g=s[p]),u[p]=g,s.length>p+1&&(g=s[p+1]),u[p+1]=g}return this},setColors:function(s){var l=this.points.length;if(l<1)return this;var f=this.colors;s===void 0?s=[16777215]:Array.isArray(s)||(s=[s]);var u,d=0;if(s.length===l)for(u=0;ud&&(p=s[d]),f[d]=p,s.length>d+1&&(p=s[d+1]),f[d+1]=p}return this},setPoints:function(s,l,f){if(s===void 0&&(s=2),typeof s=="number"){var u=s;u<2&&(u=2),s=[];var d,p,g;if(this.horizontal)for(g=-this.frame.halfWidth,p=this.frame.width/(u-1),d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1811,23 +1811,23 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(35154),n=t(77757);v.register("rope",function(e,i){e===void 0&&(e={});var h=o(e,"key",null),s=o(e,"frame",null),l=o(e,"horizontal",!0),f=r(e,"points",void 0),u=r(e,"colors",void 0),d=r(e,"alphas",void 0),p=new n(this.scene,0,0,h,s,f,l,u,d);return i!==void 0&&(e.add=i),a(this.scene,p,e),p})},96819:(c,m,t)=>{/** + */var o=t(25305),v=t(44603),a=t(23568),r=t(35154),n=t(77757);v.register("rope",function(e,i){e===void 0&&(e={});var h=a(e,"key",null),s=a(e,"frame",null),l=a(e,"horizontal",!0),f=r(e,"points",void 0),u=r(e,"colors",void 0),d=r(e,"alphas",void 0),p=new n(this.scene,0,0,h,s,f,l,u,d);return i!==void 0&&(e.add=i),o(this.scene,p,e),p})},96819:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(77757),v=t(39429);v.register("rope",function(o,r,n,e,i,h,s,l){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s,l))})},38745:(c,m,t)=>{/** + */var o=t(77757),v=t(39429);v.register("rope",function(a,r,n,e,i,h,s,l){return this.displayList.add(new o(this.scene,a,r,n,e,i,h,s,l))})},38745:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(20439),o=t(95262),c.exports={renderWebGL:v,renderCanvas:o}},20439:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(20439),a=t(95262),c.exports={renderWebGL:v,renderCanvas:a}},20439:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline,n),s=a(n,e,i).calc,l=n.vertices,f=n.uv,u=n.colors,d=n.alphas,p=n.alpha,g=v.getTintAppendFloatAlpha,y=e.roundPixels,x=l.length,T=Math.floor(x*.5);h.flush(),r.pipelines.preBatch(n);var C=h.setGameObject(n),M=h.vertexViewF32,w=h.vertexViewU32,L=h.vertexCount*h.currentShader.vertexComponentCount-1,F=0,O=n.tintFill;n.dirty&&n.updateVertices();for(var N=n.debugCallback,G=[],V=0;V{/** + */var o=t(91296),v=t(70554),a=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline,n),s=o(n,e,i).calc,l=n.vertices,f=n.uv,u=n.colors,d=n.alphas,p=n.alpha,g=v.getTintAppendFloatAlpha,y=e.roundPixels,x=l.length,C=Math.floor(x*.5);h.flush(),r.pipelines.preBatch(n);var P=h.setGameObject(n),M=h.vertexViewF32,w=h.vertexViewU32,I=h.vertexCount*h.currentShader.vertexComponentCount-1,L=0,B=n.tintFill;n.dirty&&n.updateVertices();for(var N=n.debugCallback,G=[],V=0;V{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(95643),r=t(95540),n=t(79291),e=t(61622),i=t(25479),h=t(61340),s=t(95428),l=t(92503),f=new a({Extends:o,Mixins:[v.ComputedSize,v.Depth,v.GetBounds,v.Mask,v.Origin,v.ScrollFactor,v.Transform,v.Visible,i],initialize:function(d,p,g,y,x,T,C,M){g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=128),T===void 0&&(T=128),o.call(this,d,"Shader"),this.blendMode=-1,this.shader;var w=d.sys.renderer;this.renderer=w,this.gl=w.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=w.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 h,this._tempMatrix2=new h,this._tempMatrix3=new h,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=w.width,this._rendererHeight=w.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(g,y),this.setSize(x,T),this.setOrigin(.5,.5),this.setShader(p,C,M),this.renderer.on(l.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(u){return this.renderToTexture?!0:!(o.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&u.id)},setRenderToTexture:function(u,d){if(!this.renderToTexture){var p=this.width,g=this.height,y=this.renderer;this.glTexture=y.createTextureFromSource(null,p,g,0),this.framebuffer=y.createFramebuffer(p,g,this.glTexture,!1),this._rendererWidth=p,this._rendererHeight=g,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&&(y.pipelines.clear(),this.load(),this.flush(),y.pipelines.rebind()),this},setShader:function(u,d,p){if(this.renderer.contextLost)return this._deferSetShader={key:u,textures:d,textureData:p},this;if(d===void 0&&(d=[]),typeof u=="string"){var g=this.scene.sys.cache.shader;if(!g.has(u))return console.warn("Shader missing: "+u),this;this.shader=g.get(u)}else this.shader=u;var y=this.gl,x=this.renderer;this.program&&x.deleteProgram(this.program);var T=x.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);y.uniformMatrix4fv(y.getUniformLocation(T.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),y.uniformMatrix4fv(y.getUniformLocation(T.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),y.uniform2f(y.getUniformLocation(T.webGLProgram,"uResolution"),this.width,this.height),this.program=T;var C=new Date,M={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:[C.getFullYear(),C.getMonth(),C.getDate(),C.getHours()*60*60+C.getMinutes()*60+C.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,M):this.uniforms=M;for(var w=0;w<4;w++)d[w]&&this.setSampler2D("iChannel"+w,d[w],w,p);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(u){return this.pointer=u,this},projOrtho:function(u,d,p,g){if(this.renderer.contextLost){this._deferProjOrtho={left:u,right:d,bottom:p,top:g};return}var y=-1e3,x=1e3,T=1/(u-d),C=1/(p-g),M=1/(y-x),w=this.projectionMatrix;w[0]=-2*T,w[5]=-2*C,w[10]=2*M,w[12]=(u+d)*T,w[13]=(g+p)*C,w[14]=(x+y)*M;var L=this.program,F=this.gl,O=this.renderer;O.setProgram(L),F.uniformMatrix4fv(F.getUniformLocation(L.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=d,this._rendererHeight=p},initUniforms:function(){var u=this.renderer.glFuncMap,d=this.program;this._textureCount=0;for(var p in this.uniforms){var g=this.uniforms[p],y=g.type,x=u[y];g.uniformLocation=this.renderer.createUniformLocation(d,p),y!=="sampler2D"&&(g.glMatrix=x.matrix,g.glValueLength=x.length,g.glFunc=x.func)}},setSampler2DBuffer:function(u,d,p,g,y,x){y===void 0&&(y=0),x===void 0&&(x={});var T=this.uniforms[u];return T.value=d,x.width=p,x.height=g,T.textureData=x,this._textureCount=y,this.initSampler2D(T),this},setSampler2D:function(u,d,p,g){p===void 0&&(p=0);var y=this.scene.sys.textures;if(y.exists(d)){var x=y.getFrame(d);if(x.glTexture&&x.glTexture.isRenderTexture)return this.setSampler2DBuffer(u,x.glTexture,x.width,x.height,p,g);var T=this.uniforms[u],C=x.source;T.textureKey=d,T.source=C.image,T.value=x.glTexture,C.isGLTexture&&(g||(g={}),g.width=C.width,g.height=C.height),g&&(T.textureData=g),this._textureCount=p,this.initSampler2D(T)}return this},setUniform:function(u,d){return e(this.uniforms,u,d),this},getUniform:function(u){return r(this.uniforms,u,null)},setChannel0:function(u,d){return this.setSampler2D("iChannel0",u,0,d)},setChannel1:function(u,d){return this.setSampler2D("iChannel1",u,1,d)},setChannel2:function(u,d){return this.setSampler2D("iChannel2",u,2,d)},setChannel3:function(u,d){return this.setSampler2D("iChannel3",u,3,d)},initSampler2D:function(u){if(u.value){var d=u.textureData;if(d&&!u.value.isRenderTexture){var p=this.gl,g=u.value,y=p[r(d,"magFilter","linear").toUpperCase()],x=p[r(d,"minFilter","linear").toUpperCase()],T=p[r(d,"wrapS","repeat").toUpperCase()],C=p[r(d,"wrapT","repeat").toUpperCase()],M=p[r(d,"format","rgba").toUpperCase()],w=r(d,"flipY",!1),L=r(d,"width",g.width),F=r(d,"height",g.height),O=r(d,"source",g.pixels);d.repeat&&(T=p.REPEAT,C=p.REPEAT),d.width&&(O=null),g.update(O,L,F,w,T,C,x,y,M)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var u=this.gl,d=this.uniforms,p,g,y,x,T,C=0;for(var M in d)p=d[M],y=p.glFunc,g=p.glValueLength,x=p.uniformLocation,T=p.value,T!==null&&(g===1?p.glMatrix?y.call(u,x.webGLUniformLocation,p.transpose,T):y.call(u,x.webGLUniformLocation,T):g===2?y.call(u,x.webGLUniformLocation,T.x,T.y):g===3?y.call(u,x.webGLUniformLocation,T.x,T.y,T.z):g===4?y.call(u,x.webGLUniformLocation,T.x,T.y,T.z,T.w):p.type==="sampler2D"&&(u.activeTexture(u.TEXTURE0+C),u.bindTexture(u.TEXTURE_2D,T.webGLTexture),u.uniform1i(x.webGLUniformLocation,C),C++))},load:function(u){var d=this.gl,p=this.width,g=this.height,y=this.renderer,x=this.program,T=this.viewMatrix;if(!this.renderToTexture){var C=-this._displayOriginX,M=-this._displayOriginY;T[0]=u[0],T[1]=u[1],T[4]=u[2],T[5]=u[3],T[8]=u[4],T[9]=u[5],T[12]=T[0]*C+T[4]*M,T[13]=T[1]*C+T[5]*M}d.useProgram(x.webGLProgram),d.uniformMatrix4fv(d.getUniformLocation(x.webGLProgram,"uViewMatrix"),!1,T),d.uniformMatrix4fv(d.getUniformLocation(x.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),d.uniform2f(d.getUniformLocation(x.webGLProgram,"uResolution"),this.width,this.height);var w=this.uniforms,L=w.resolution;L.value.x=p,L.value.y=g,w.time.value=y.game.loop.getDuration();var F=this.pointer;if(F){var O=w.mouse,N=F.x/p,G=1-F.y/g;O.value.x=N.toFixed(2),O.value.y=G.toFixed(2)}this.syncUniforms()},flush:function(){var u=this.width,d=this.height,p=this.program,g=this.gl,y=this.vertexBuffer,x=this.renderer,T=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(x.setFramebuffer(this.framebuffer),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT)),g.bindBuffer(g.ARRAY_BUFFER,y.webGLBuffer);var C=g.getAttribLocation(p.webGLProgram,"inPosition");C!==-1&&(g.enableVertexAttribArray(C),g.vertexAttribPointer(C,2,g.FLOAT,!1,T,0));var M=this.vertexViewF32;M[3]=d,M[4]=u,M[5]=d,M[8]=u,M[9]=d,M[10]=u;var w=6;g.bufferSubData(g.ARRAY_BUFFER,0,this.bytes.subarray(0,w*T)),g.drawArrays(g.TRIANGLES,0,w),this.renderToTexture&&x.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(this._deferSetShader!==null){var u=this._deferSetShader.key,d=this._deferSetShader.textures,p=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(u,d,p)}if(this._deferProjOrtho!==null){var g=this._deferProjOrtho.left,y=this._deferProjOrtho.right,x=this._deferProjOrtho.bottom,T=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(g,y,x,T)}},preDestroy:function(){var u=this.renderer;u.off(l.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),s(this.uniforms,function(d){u.deleteUniformLocation(d.uniformLocation),d.uniformLocation=null})}});c.exports=f},80464:c=>{/** + */var o=t(83419),v=t(31401),a=t(95643),r=t(95540),n=t(79291),e=t(61622),i=t(25479),h=t(61340),s=t(95428),l=t(92503),f=new o({Extends:a,Mixins:[v.ComputedSize,v.Depth,v.GetBounds,v.Mask,v.Origin,v.ScrollFactor,v.Transform,v.Visible,i],initialize:function(d,p,g,y,x,C,P,M){g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=128),C===void 0&&(C=128),a.call(this,d,"Shader"),this.blendMode=-1,this.shader;var w=d.sys.renderer;this.renderer=w,this.gl=w.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=w.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 h,this._tempMatrix2=new h,this._tempMatrix3=new h,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=w.width,this._rendererHeight=w.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(g,y),this.setSize(x,C),this.setOrigin(.5,.5),this.setShader(p,P,M),this.renderer.on(l.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(u){return this.renderToTexture?!0:!(a.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&u.id)},setRenderToTexture:function(u,d){if(!this.renderToTexture){var p=this.width,g=this.height,y=this.renderer;this.glTexture=y.createTextureFromSource(null,p,g,0),this.framebuffer=y.createFramebuffer(p,g,this.glTexture,!1),this._rendererWidth=p,this._rendererHeight=g,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&&(y.pipelines.clear(),this.load(),this.flush(),y.pipelines.rebind()),this},setShader:function(u,d,p){if(this.renderer.contextLost)return this._deferSetShader={key:u,textures:d,textureData:p},this;if(d===void 0&&(d=[]),typeof u=="string"){var g=this.scene.sys.cache.shader;if(!g.has(u))return console.warn("Shader missing: "+u),this;this.shader=g.get(u)}else this.shader=u;var y=this.gl,x=this.renderer;this.program&&x.deleteProgram(this.program);var C=x.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);y.uniformMatrix4fv(y.getUniformLocation(C.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),y.uniformMatrix4fv(y.getUniformLocation(C.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),y.uniform2f(y.getUniformLocation(C.webGLProgram,"uResolution"),this.width,this.height),this.program=C;var P=new Date,M={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:[P.getFullYear(),P.getMonth(),P.getDate(),P.getHours()*60*60+P.getMinutes()*60+P.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,M):this.uniforms=M;for(var w=0;w<4;w++)d[w]&&this.setSampler2D("iChannel"+w,d[w],w,p);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(u){return this.pointer=u,this},projOrtho:function(u,d,p,g){if(this.renderer.contextLost){this._deferProjOrtho={left:u,right:d,bottom:p,top:g};return}var y=-1e3,x=1e3,C=1/(u-d),P=1/(p-g),M=1/(y-x),w=this.projectionMatrix;w[0]=-2*C,w[5]=-2*P,w[10]=2*M,w[12]=(u+d)*C,w[13]=(g+p)*P,w[14]=(x+y)*M;var I=this.program,L=this.gl,B=this.renderer;B.setProgram(I),L.uniformMatrix4fv(L.getUniformLocation(I.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=d,this._rendererHeight=p},initUniforms:function(){var u=this.renderer.glFuncMap,d=this.program;this._textureCount=0;for(var p in this.uniforms){var g=this.uniforms[p],y=g.type,x=u[y];g.uniformLocation=this.renderer.createUniformLocation(d,p),y!=="sampler2D"&&(g.glMatrix=x.matrix,g.glValueLength=x.length,g.glFunc=x.func)}},setSampler2DBuffer:function(u,d,p,g,y,x){y===void 0&&(y=0),x===void 0&&(x={});var C=this.uniforms[u];return C.value=d,x.width=p,x.height=g,C.textureData=x,this._textureCount=y,this.initSampler2D(C),this},setSampler2D:function(u,d,p,g){p===void 0&&(p=0);var y=this.scene.sys.textures;if(y.exists(d)){var x=y.getFrame(d);if(x.glTexture&&x.glTexture.isRenderTexture)return this.setSampler2DBuffer(u,x.glTexture,x.width,x.height,p,g);var C=this.uniforms[u],P=x.source;C.textureKey=d,C.source=P.image,C.value=x.glTexture,P.isGLTexture&&(g||(g={}),g.width=P.width,g.height=P.height),g&&(C.textureData=g),this._textureCount=p,this.initSampler2D(C)}return this},setUniform:function(u,d){return e(this.uniforms,u,d),this},getUniform:function(u){return r(this.uniforms,u,null)},setChannel0:function(u,d){return this.setSampler2D("iChannel0",u,0,d)},setChannel1:function(u,d){return this.setSampler2D("iChannel1",u,1,d)},setChannel2:function(u,d){return this.setSampler2D("iChannel2",u,2,d)},setChannel3:function(u,d){return this.setSampler2D("iChannel3",u,3,d)},initSampler2D:function(u){if(u.value){var d=u.textureData;if(d&&!u.value.isRenderTexture){var p=this.gl,g=u.value,y=p[r(d,"magFilter","linear").toUpperCase()],x=p[r(d,"minFilter","linear").toUpperCase()],C=p[r(d,"wrapS","repeat").toUpperCase()],P=p[r(d,"wrapT","repeat").toUpperCase()],M=p[r(d,"format","rgba").toUpperCase()],w=r(d,"flipY",!1),I=r(d,"width",g.width),L=r(d,"height",g.height),B=r(d,"source",g.pixels);d.repeat&&(C=p.REPEAT,P=p.REPEAT),d.width&&(B=null),g.update(B,I,L,w,C,P,x,y,M)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var u=this.gl,d=this.uniforms,p,g,y,x,C,P=0;for(var M in d)p=d[M],y=p.glFunc,g=p.glValueLength,x=p.uniformLocation,C=p.value,C!==null&&(g===1?p.glMatrix?y.call(u,x.webGLUniformLocation,p.transpose,C):y.call(u,x.webGLUniformLocation,C):g===2?y.call(u,x.webGLUniformLocation,C.x,C.y):g===3?y.call(u,x.webGLUniformLocation,C.x,C.y,C.z):g===4?y.call(u,x.webGLUniformLocation,C.x,C.y,C.z,C.w):p.type==="sampler2D"&&(u.activeTexture(u.TEXTURE0+P),u.bindTexture(u.TEXTURE_2D,C.webGLTexture),u.uniform1i(x.webGLUniformLocation,P),P++))},load:function(u){var d=this.gl,p=this.width,g=this.height,y=this.renderer,x=this.program,C=this.viewMatrix;if(!this.renderToTexture){var P=-this._displayOriginX,M=-this._displayOriginY;C[0]=u[0],C[1]=u[1],C[4]=u[2],C[5]=u[3],C[8]=u[4],C[9]=u[5],C[12]=C[0]*P+C[4]*M,C[13]=C[1]*P+C[5]*M}d.useProgram(x.webGLProgram),d.uniformMatrix4fv(d.getUniformLocation(x.webGLProgram,"uViewMatrix"),!1,C),d.uniformMatrix4fv(d.getUniformLocation(x.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),d.uniform2f(d.getUniformLocation(x.webGLProgram,"uResolution"),this.width,this.height);var w=this.uniforms,I=w.resolution;I.value.x=p,I.value.y=g,w.time.value=y.game.loop.getDuration();var L=this.pointer;if(L){var B=w.mouse,N=L.x/p,G=1-L.y/g;B.value.x=N.toFixed(2),B.value.y=G.toFixed(2)}this.syncUniforms()},flush:function(){var u=this.width,d=this.height,p=this.program,g=this.gl,y=this.vertexBuffer,x=this.renderer,C=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(x.setFramebuffer(this.framebuffer),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT)),g.bindBuffer(g.ARRAY_BUFFER,y.webGLBuffer);var P=g.getAttribLocation(p.webGLProgram,"inPosition");P!==-1&&(g.enableVertexAttribArray(P),g.vertexAttribPointer(P,2,g.FLOAT,!1,C,0));var M=this.vertexViewF32;M[3]=d,M[4]=u,M[5]=d,M[8]=u,M[9]=d,M[10]=u;var w=6;g.bufferSubData(g.ARRAY_BUFFER,0,this.bytes.subarray(0,w*C)),g.drawArrays(g.TRIANGLES,0,w),this.renderToTexture&&x.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(this._deferSetShader!==null){var u=this._deferSetShader.key,d=this._deferSetShader.textures,p=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(u,d,p)}if(this._deferProjOrtho!==null){var g=this._deferProjOrtho.left,y=this._deferProjOrtho.right,x=this._deferProjOrtho.bottom,C=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(g,y,x,C)}},preDestroy:function(){var u=this.renderer;u.off(l.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),s(this.uniforms,function(d){u.deleteUniformLocation(d.uniformLocation),d.uniformLocation=null})}});c.exports=f},80464:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1835,387 +1835,387 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(20071);v.register("shader",function(n,e){n===void 0&&(n={});var i=o(n,"key",null),h=o(n,"x",0),s=o(n,"y",0),l=o(n,"width",128),f=o(n,"height",128),u=new r(this.scene,i,h,s,l,f);return e!==void 0&&(n.add=e),a(this.scene,u,n),u})},74177:(c,m,t)=>{/** + */var o=t(25305),v=t(44603),a=t(23568),r=t(20071);v.register("shader",function(n,e){n===void 0&&(n={});var i=a(n,"key",null),h=a(n,"x",0),s=a(n,"y",0),l=a(n,"width",128),f=a(n,"height",128),u=new r(this.scene,i,h,s,l,f);return e!==void 0&&(n.add=e),o(this.scene,u,n),u})},74177:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20071),v=t(39429);v.register("shader",function(o,r,n,e,i,h,s){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s))})},25479:(c,m,t)=>{/** + */var o=t(20071),v=t(39429);v.register("shader",function(a,r,n,e,i,h,s){return this.displayList.add(new o(this.scene,a,r,n,e,i,h,s))})},25479:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(19257),o=t(80464),c.exports={renderWebGL:v,renderCanvas:o}},19257:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(19257),a=t(80464),c.exports={renderWebGL:v,renderCanvas:a}},19257:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=function(o,r,n,e){if(r.shader){if(n.addToRenderList(r),o.pipelines.clear(),r.renderToTexture)r.load(),r.flush();else{var i=a(r,n,e).calc;(o.width!==r._rendererWidth||o.height!==r._rendererHeight)&&r.projOrtho(0,o.width,o.height,0),r.load(i.matrix),r.flush()}o.pipelines.rebind()}};c.exports=v},10441:(c,m,t)=>{/** + */var o=t(91296),v=function(a,r,n,e){if(r.shader){if(n.addToRenderList(r),a.pipelines.clear(),r.renderToTexture)r.load(),r.flush();else{var i=o(r,n,e).calc;(a.width!==r._rendererWidth||a.height!==r._rendererHeight)&&r.projOrtho(0,a.width,a.height,0),r.load(i.matrix),r.flush()}a.pipelines.rebind()}};c.exports=v},10441:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70554),v=function(o,r,n,e,i,h){for(var s=a.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*e),l=n.pathData,f=n.pathIndexes,u=0;u{/** + */var o=t(70554),v=function(a,r,n,e,i,h){for(var s=o.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*e),l=n.pathData,f=n.pathIndexes,u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=v||a.fillColor,n=o||a.fillAlpha,e=(r&16711680)>>>16,i=(r&65280)>>>8,h=r&255;t.fillStyle="rgba("+e+","+i+","+h+","+n+")"};c.exports=m},75177:c=>{/** + */var m=function(t,o,v,a){var r=v||o.fillColor,n=a||o.fillAlpha,e=(r&16711680)>>>16,i=(r&65280)>>>8,h=r&255;t.fillStyle="rgba("+e+","+i+","+h+","+n+")"};c.exports=m},75177:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=v||a.strokeColor,n=o||a.strokeAlpha,e=(r&16711680)>>>16,i=(r&65280)>>>8,h=r&255;t.strokeStyle="rgba("+e+","+i+","+h+","+n+")",t.lineWidth=a.lineWidth};c.exports=m},17803:(c,m,t)=>{/** + */var m=function(t,o,v,a){var r=v||o.strokeColor,n=a||o.strokeAlpha,e=(r&16711680)>>>16,i=(r&65280)>>>8,h=r&255;t.strokeStyle="rgba("+e+","+i+","+h+","+n+")",t.lineWidth=o.lineWidth};c.exports=m},17803:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(95643),r=t(23031),n=new a({Extends:o,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.GetBounds,v.Mask,v.Origin,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Transform,v.Visible],initialize:function(i,h,s){h===void 0&&(h="Shape"),o.call(this,i,h),this.geom=s,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,i){return i===void 0&&(i=1),e===void 0?this.isFilled=!1:(this.fillColor=e,this.fillAlpha=i,this.isFilled=!0),this},setStrokeStyle:function(e,i,h){return h===void 0&&(h=1),e===void 0?this.isStroked=!1:(this.lineWidth=e,this.strokeColor=i,this.strokeAlpha=h,this.isStroked=!0),this},setClosePath:function(e){return this.closePath=e,this},setSize:function(e,i){return this.width=e,this.height=i,this},setDisplaySize:function(e,i){return this.displayWidth=e,this.displayHeight=i,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}}});c.exports=n},34682:(c,m,t)=>{/** + */var o=t(83419),v=t(31401),a=t(95643),r=t(23031),n=new o({Extends:a,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.GetBounds,v.Mask,v.Origin,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Transform,v.Visible],initialize:function(i,h,s){h===void 0&&(h="Shape"),a.call(this,i,h),this.geom=s,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,i){return i===void 0&&(i=1),e===void 0?this.isFilled=!1:(this.fillColor=e,this.fillAlpha=i,this.isFilled=!0),this},setStrokeStyle:function(e,i,h){return h===void 0&&(h=1),e===void 0?this.isStroked=!1:(this.lineWidth=e,this.strokeColor=i,this.strokeAlpha=h,this.isStroked=!0),this},setClosePath:function(e){return this.closePath=e,this},setSize:function(e,i){return this.width=e,this.height=i,this},setDisplaySize:function(e,i){return this.displayWidth=e,this.displayHeight=i,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}}});c.exports=n},34682:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70554),v=function(o,r,n,e,i){var h=o.strokeTint,s=a.getTintAppendFloatAlpha(r.strokeColor,r.strokeAlpha*n);h.TL=s,h.TR=s,h.BL=s,h.BR=s;var l=r.pathData,f=l.length-1,u=r.lineWidth,d=u/2,p=l[0]-e,g=l[1]-i;r.closePath||(f-=2);for(var y=2;y{/** + */var o=t(70554),v=function(a,r,n,e,i){var h=a.strokeTint,s=o.getTintAppendFloatAlpha(r.strokeColor,r.strokeAlpha*n);h.TL=s,h.TR=s,h.BL=s,h.BR=s;var l=r.pathData,f=l.length-1,u=r.lineWidth,d=u/2,p=l[0]-e,g=l[1]-i;r.closePath||(f-=2);for(var y=2;y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(13609),v=t(83419),o=t(39506),r=t(94811),n=t(96503),e=t(36383),i=t(17803),h=new v({Extends:i,Mixins:[a],initialize:function(l,f,u,d,p,g,y,x,T){f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=128),p===void 0&&(p=0),g===void 0&&(g=360),y===void 0&&(y=!1),i.call(this,l,"Arc",new n(0,0,d)),this._startAngle=p,this._endAngle=g,this._anticlockwise=y,this._iterations=.01,this.setPosition(f,u);var C=this.geom.radius*2;this.setSize(C,C),x!==void 0&&this.setFillStyle(x,T),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(s){this._iterations=s,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(s){this.geom.radius=s;var l=s*2;this.setSize(l,l),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(s){this._startAngle=s,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(s){this._endAngle=s,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(s){this._anticlockwise=s,this.updateData()}},setRadius:function(s){return this.radius=s,this},setIterations:function(s){return s===void 0&&(s=.01),this.iterations=s,this},setStartAngle:function(s,l){return this._startAngle=s,l!==void 0&&(this._anticlockwise=l),this.updateData()},setEndAngle:function(s,l){return this._endAngle=s,l!==void 0&&(this._anticlockwise=l),this.updateData()},updateData:function(){var s=this._iterations,l=s,f=this.geom.radius,u=o(this._startAngle),d=o(this._endAngle),p=this._anticlockwise,g=f,y=f;d-=u,p?d<-e.PI2?d=-e.PI2:d>0&&(d=-e.PI2+d%e.PI2):d>e.PI2?d=e.PI2:d<0&&(d=e.PI2+d%e.PI2);for(var x=[g+Math.cos(u)*f,y+Math.sin(u)*f],T;l<1;)T=d*l+u,x.push(g+Math.cos(T)*f,y+Math.sin(T)*f),l+=s;return T=d+u,x.push(g+Math.cos(T)*f,y+Math.sin(T)*f),x.push(g+Math.cos(u)*f,y+Math.sin(u)*f),this.pathIndexes=r(x),this.pathData=x,this}});c.exports=h},42542:(c,m,t)=>{/** + */var o=t(13609),v=t(83419),a=t(39506),r=t(94811),n=t(96503),e=t(36383),i=t(17803),h=new v({Extends:i,Mixins:[o],initialize:function(l,f,u,d,p,g,y,x,C){f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=128),p===void 0&&(p=0),g===void 0&&(g=360),y===void 0&&(y=!1),i.call(this,l,"Arc",new n(0,0,d)),this._startAngle=p,this._endAngle=g,this._anticlockwise=y,this._iterations=.01,this.setPosition(f,u);var P=this.geom.radius*2;this.setSize(P,P),x!==void 0&&this.setFillStyle(x,C),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(s){this._iterations=s,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(s){this.geom.radius=s;var l=s*2;this.setSize(l,l),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(s){this._startAngle=s,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(s){this._endAngle=s,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(s){this._anticlockwise=s,this.updateData()}},setRadius:function(s){return this.radius=s,this},setIterations:function(s){return s===void 0&&(s=.01),this.iterations=s,this},setStartAngle:function(s,l){return this._startAngle=s,l!==void 0&&(this._anticlockwise=l),this.updateData()},setEndAngle:function(s,l){return this._endAngle=s,l!==void 0&&(this._anticlockwise=l),this.updateData()},updateData:function(){var s=this._iterations,l=s,f=this.geom.radius,u=a(this._startAngle),d=a(this._endAngle),p=this._anticlockwise,g=f,y=f;d-=u,p?d<-e.PI2?d=-e.PI2:d>0&&(d=-e.PI2+d%e.PI2):d>e.PI2?d=e.PI2:d<0&&(d=e.PI2+d%e.PI2);for(var x=[g+Math.cos(u)*f,y+Math.sin(u)*f],C;l<1;)C=d*l+u,x.push(g+Math.cos(C)*f,y+Math.sin(C)*f),l+=s;return C=d+u,x.push(g+Math.cos(C)*f,y+Math.sin(C)*f),x.push(g+Math.cos(u)*f,y+Math.sin(u)*f),this.pathIndexes=r(x),this.pathData=x,this}});c.exports=h},42542:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39506),v=t(65960),o=t(75177),r=t(20926),n=function(e,i,h,s){h.addToRenderList(i);var l=e.currentContext;if(r(e,l,i,h,s)){var f=i.radius;l.beginPath(),l.arc(f-i.originX*(f*2),f-i.originY*(f*2),f,a(i._startAngle),a(i._endAngle),i.anticlockwise),i.closePath&&l.closePath(),i.isFilled&&(v(l,i),l.fill()),i.isStroked&&(o(l,i),l.stroke()),l.restore()}};c.exports=n},42563:(c,m,t)=>{/** + */var o=t(39506),v=t(65960),a=t(75177),r=t(20926),n=function(e,i,h,s){h.addToRenderList(i);var l=e.currentContext;if(r(e,l,i,h,s)){var f=i.radius;l.beginPath(),l.arc(f-i.originX*(f*2),f-i.originY*(f*2),f,o(i._startAngle),o(i._endAngle),i.anticlockwise),i.closePath&&l.closePath(),i.isFilled&&(v(l,i),l.fill()),i.isStroked&&(a(l,i),l.stroke()),l.restore()}};c.exports=n},42563:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23629),v=t(39429);v.register("arc",function(o,r,n,e,i,h,s,l){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s,l))}),v.register("circle",function(o,r,n,e,i){return this.displayList.add(new a(this.scene,o,r,n,0,360,!1,e,i))})},13609:(c,m,t)=>{/** + */var o=t(23629),v=t(39429);v.register("arc",function(a,r,n,e,i,h,s,l){return this.displayList.add(new o(this.scene,a,r,n,e,i,h,s,l))}),v.register("circle",function(a,r,n,e,i){return this.displayList.add(new o(this.scene,a,r,n,0,360,!1,e,i))})},13609:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(41447),o=t(42542),c.exports={renderWebGL:v,renderCanvas:o}},41447:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(41447),a=t(42542),c.exports={renderWebGL:v,renderCanvas:a}},41447:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(10441),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=a(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&v(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},89:(c,m,t)=>{/** + */var o=t(91296),v=t(10441),a=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=o(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&v(s,f,e,p,u,d),e.isStroked&&a(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},89:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(33141),o=t(94811),r=t(87841),n=t(17803),e=new a({Extends:n,Mixins:[v],initialize:function(h,s,l,f,u,d){s===void 0&&(s=0),l===void 0&&(l=0),n.call(this,h,"Curve",f),this._smoothness=32,this._curveBounds=new r,this.closePath=!1,this.setPosition(s,l),u!==void 0&&this.setFillStyle(u,d),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(i){this._smoothness=i,this.updateData()}},setSmoothness:function(i){return this._smoothness=i,this.updateData()},updateData:function(){var i=this._curveBounds,h=this._smoothness;this.geom.getBounds(i,h),this.setSize(i.width,i.height),this.updateDisplayOrigin();for(var s=[],l=this.geom.getPoints(h),f=0;f{/** + */var o=t(83419),v=t(33141),a=t(94811),r=t(87841),n=t(17803),e=new o({Extends:n,Mixins:[v],initialize:function(h,s,l,f,u,d){s===void 0&&(s=0),l===void 0&&(l=0),n.call(this,h,"Curve",f),this._smoothness=32,this._curveBounds=new r,this.closePath=!1,this.setPosition(s,l),u!==void 0&&this.setFillStyle(u,d),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(i){this._smoothness=i,this.updateData()}},setSmoothness:function(i){return this._smoothness=i,this.updateData()},updateData:function(){var i=this._curveBounds,h=this._smoothness;this.geom.getBounds(i,h),this.setSize(i.width,i.height),this.updateDisplayOrigin();for(var s=[],l=this.geom.getPoints(h),f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX+e._curveBounds.x,f=e._displayOriginY+e._curveBounds.y,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var y=2;y{/** + */var o=t(65960),v=t(75177),a=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(a(n,s,e,i,h)){var l=e._displayOriginX+e._curveBounds.x,f=e._displayOriginY+e._curveBounds.y,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var y=2;y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(89);a.register("curve",function(o,r,n,e,i){return this.displayList.add(new v(this.scene,o,r,n,e,i))})},33141:(c,m,t)=>{/** + */var o=t(39429),v=t(89);o.register("curve",function(a,r,n,e,i){return this.displayList.add(new v(this.scene,a,r,n,e,i))})},33141:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(53987),o=t(3170),c.exports={renderWebGL:v,renderCanvas:o}},53987:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(53987),a=t(3170),c.exports={renderWebGL:v,renderCanvas:a}},53987:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10441),v=t(91296),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=v(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX+e._curveBounds.x,d=e._displayOriginY+e._curveBounds.y,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&a(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},19921:(c,m,t)=>{/** + */var o=t(10441),v=t(91296),a=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=v(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX+e._curveBounds.x,d=e._displayOriginY+e._curveBounds.y,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&o(s,f,e,p,u,d),e.isStroked&&a(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},19921:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(94811),o=t(54205),r=t(8497),n=t(17803),e=new a({Extends:n,Mixins:[o],initialize:function(h,s,l,f,u,d,p){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=128),u===void 0&&(u=128),n.call(this,h,"Ellipse",new r(f/2,u/2,f,u)),this._smoothness=64,this.setPosition(s,l),this.width=f,this.height=u,d!==void 0&&this.setFillStyle(d,p),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(i){this._smoothness=i,this.updateData()}},setSize:function(i,h){return this.width=i,this.height=h,this.geom.setPosition(i/2,h/2),this.geom.setSize(i,h),this.updateData()},setSmoothness:function(i){return this._smoothness=i,this.updateData()},updateData:function(){for(var i=[],h=this.geom.getPoints(this._smoothness),s=0;s{/** + */var o=t(83419),v=t(94811),a=t(54205),r=t(8497),n=t(17803),e=new o({Extends:n,Mixins:[a],initialize:function(h,s,l,f,u,d,p){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=128),u===void 0&&(u=128),n.call(this,h,"Ellipse",new r(f/2,u/2,f,u)),this._smoothness=64,this.setPosition(s,l),this.width=f,this.height=u,d!==void 0&&this.setFillStyle(d,p),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(i){this._smoothness=i,this.updateData()}},setSize:function(i,h){return this.width=i,this.height=h,this.geom.setPosition(i/2,h/2),this.geom.setSize(i,h),this.updateData()},setSmoothness:function(i){return this._smoothness=i,this.updateData()},updateData:function(){for(var i=[],h=this.geom.getPoints(this._smoothness),s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var y=2;y{/** + */var o=t(65960),v=t(75177),a=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(a(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var y=2;y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(19921),v=t(39429);v.register("ellipse",function(o,r,n,e,i,h){return this.displayList.add(new a(this.scene,o,r,n,e,i,h))})},54205:(c,m,t)=>{/** + */var o=t(19921),v=t(39429);v.register("ellipse",function(a,r,n,e,i,h){return this.displayList.add(new o(this.scene,a,r,n,e,i,h))})},54205:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(19467),o=t(7930),c.exports={renderWebGL:v,renderCanvas:o}},19467:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(19467),a=t(7930),c.exports={renderWebGL:v,renderCanvas:a}},19467:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10441),v=t(91296),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=v(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&a(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},30479:(c,m,t)=>{/** + */var o=t(10441),v=t(91296),a=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=v(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&o(s,f,e,p,u,d),e.isStroked&&a(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},30479:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(17803),o=t(26015),r=new a({Extends:v,Mixins:[o],initialize:function(e,i,h,s,l,f,u,d,p,g,y){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=128),l===void 0&&(l=128),f===void 0&&(f=32),u===void 0&&(u=32),v.call(this,e,"Grid",null),this.cellWidth=f,this.cellHeight=u,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(i,h),this.setSize(s,l),this.setFillStyle(d,p),g!==void 0&&this.setOutlineStyle(g,y),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}});c.exports=r},49912:(c,m,t)=>{/** + */var o=t(83419),v=t(17803),a=t(26015),r=new o({Extends:v,Mixins:[a],initialize:function(e,i,h,s,l,f,u,d,p,g,y){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=128),l===void 0&&(l=128),f===void 0&&(f=32),u===void 0&&(u=32),v.call(this,e,"Grid",null),this.cellWidth=f,this.cellHeight=u,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(i,h),this.setSize(s,l),this.setFillStyle(d,p),g!==void 0&&this.setOutlineStyle(g,y),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}});c.exports=r},49912:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=-e._displayOriginX,f=-e._displayOriginY,u=i.alpha*e.alpha,d=e.width,p=e.height,g=e.cellWidth,y=e.cellHeight,x=Math.ceil(d/g),T=Math.ceil(p/y),C=g,M=y,w=g-(x*g-d),L=y-(T*y-p),F=e.showCells,O=e.showAltCells,N=e.showOutline,G=0,V=0,K=0,$=0,J=0;if(N&&(C--,M--,w===g&&w--,L===y&&L--),F&&e.fillAlpha>0)for(a(s,e),V=0;V0)for(a(s,e,e.altFillColor,e.altFillAlpha*u),V=0;V0){for(v(s,e,e.outlineFillColor,e.outlineFillAlpha*u),G=1;G{/** + */var o=t(65960),v=t(75177),a=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(a(n,s,e,i,h)){var l=-e._displayOriginX,f=-e._displayOriginY,u=i.alpha*e.alpha,d=e.width,p=e.height,g=e.cellWidth,y=e.cellHeight,x=Math.ceil(d/g),C=Math.ceil(p/y),P=g,M=y,w=g-(x*g-d),I=y-(C*y-p),L=e.showCells,B=e.showAltCells,N=e.showOutline,G=0,V=0,K=0,j=0,J=0;if(N&&(P--,M--,w===g&&w--,I===y&&I--),L&&e.fillAlpha>0)for(o(s,e),V=0;V0)for(o(s,e,e.altFillColor,e.altFillAlpha*u),V=0;V0){for(v(s,e,e.outlineFillColor,e.outlineFillAlpha*u),G=1;G{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(30479);a.register("grid",function(o,r,n,e,i,h,s,l,f,u){return this.displayList.add(new v(this.scene,o,r,n,e,i,h,s,l,f,u))})},26015:(c,m,t)=>{/** + */var o=t(39429),v=t(30479);o.register("grid",function(a,r,n,e,i,h,s,l,f,u){return this.displayList.add(new v(this.scene,a,r,n,e,i,h,s,l,f,u))})},26015:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(46161),o=t(49912),c.exports={renderWebGL:v,renderCanvas:o}},46161:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(46161),a=t(49912),c.exports={renderWebGL:v,renderCanvas:a}},46161:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=a(n,e,i),l=h.calcMatrix.copyFrom(s.calc);l.translate(-n._displayOriginX,-n._displayOriginY);var f=e.alpha*n.alpha,u=n.width,d=n.height,p=n.cellWidth,g=n.cellHeight,y=Math.ceil(u/p),x=Math.ceil(d/g),T=p,C=g,M=p-(y*p-u),w=g-(x*g-d),L,F,O=n.showCells,N=n.showAltCells,G=n.showOutline,V=0,K=0,$=0,J=0,X=0;if(G&&(T--,C--,M===p&&M--,w===g&&w--),r.pipelines.preBatch(n),O&&n.fillAlpha>0)for(L=h.fillTint,F=v.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*f),L.TL=F,L.TR=F,L.BL=F,L.BR=F,K=0;K0)for(L=h.fillTint,F=v.getTintAppendFloatAlpha(n.altFillColor,n.altFillAlpha*f),L.TL=F,L.TR=F,L.BL=F,L.BR=F,K=0;K0){var Y=h.strokeTint,D=v.getTintAppendFloatAlpha(n.outlineFillColor,n.outlineFillAlpha*f);for(Y.TL=D,Y.TR=D,Y.BL=D,Y.BR=D,V=1;V{/** + */var o=t(91296),v=t(70554),a=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=o(n,e,i),l=h.calcMatrix.copyFrom(s.calc);l.translate(-n._displayOriginX,-n._displayOriginY);var f=e.alpha*n.alpha,u=n.width,d=n.height,p=n.cellWidth,g=n.cellHeight,y=Math.ceil(u/p),x=Math.ceil(d/g),C=p,P=g,M=p-(y*p-u),w=g-(x*g-d),I,L,B=n.showCells,N=n.showAltCells,G=n.showOutline,V=0,K=0,j=0,J=0,X=0;if(G&&(C--,P--,M===p&&M--,w===g&&w--),r.pipelines.preBatch(n),B&&n.fillAlpha>0)for(I=h.fillTint,L=v.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*f),I.TL=L,I.TR=L,I.BL=L,I.BR=L,K=0;K0)for(I=h.fillTint,L=v.getTintAppendFloatAlpha(n.altFillColor,n.altFillAlpha*f),I.TL=L,I.TR=L,I.BL=L,I.BR=L,K=0;K0){var Y=h.strokeTint,b=v.getTintAppendFloatAlpha(n.outlineFillColor,n.outlineFillAlpha*f);for(Y.TL=b,Y.TR=b,Y.BL=b,Y.BR=b,V=1;V{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(99651),v=t(83419),o=t(17803),r=new v({Extends:o,Mixins:[a],initialize:function(e,i,h,s,l,f,u,d){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=48),l===void 0&&(l=32),f===void 0&&(f=15658734),u===void 0&&(u=10066329),d===void 0&&(d=13421772),o.call(this,e,"IsoBox",null),this.projection=4,this.fillTop=f,this.fillLeft=u,this.fillRight=d,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(i,h),this.setSize(s,l),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setFaces:function(n,e,i){return n===void 0&&(n=!0),e===void 0&&(e=!0),i===void 0&&(i=!0),this.showTop=n,this.showLeft=e,this.showRight=i,this},setFillStyle:function(n,e,i){return this.fillTop=n,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});c.exports=r},11508:(c,m,t)=>{/** + */var o=t(99651),v=t(83419),a=t(17803),r=new v({Extends:a,Mixins:[o],initialize:function(e,i,h,s,l,f,u,d){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=48),l===void 0&&(l=32),f===void 0&&(f=15658734),u===void 0&&(u=10066329),d===void 0&&(d=13421772),a.call(this,e,"IsoBox",null),this.projection=4,this.fillTop=f,this.fillLeft=u,this.fillRight=d,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(i,h),this.setSize(s,l),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setFaces:function(n,e,i){return n===void 0&&(n=!0),e===void 0&&(e=!0),i===void 0&&(i=!0),this.showTop=n,this.showLeft=e,this.showRight=i,this},setFillStyle:function(n,e,i){return this.fillTop=n,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});c.exports=r},11508:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(20926),o=function(r,n,e,i){e.addToRenderList(n);var h=r.currentContext;if(v(r,h,n,e,i)&&n.isFilled){var s=n.width,l=n.height,f=s/2,u=s/n.projection;n.showTop&&(a(h,n,n.fillTop),h.beginPath(),h.moveTo(-f,-l),h.lineTo(0,-u-l),h.lineTo(f,-l),h.lineTo(f,-1),h.lineTo(0,u-1),h.lineTo(-f,-1),h.lineTo(-f,-l),h.fill()),n.showLeft&&(a(h,n,n.fillLeft),h.beginPath(),h.moveTo(-f,0),h.lineTo(0,u),h.lineTo(0,u-l),h.lineTo(-f,-l),h.lineTo(-f,0),h.fill()),n.showRight&&(a(h,n,n.fillRight),h.beginPath(),h.moveTo(f,0),h.lineTo(0,u),h.lineTo(0,u-l),h.lineTo(f,-l),h.lineTo(f,0),h.fill()),h.restore()}};c.exports=o},3933:(c,m,t)=>{/** + */var o=t(65960),v=t(20926),a=function(r,n,e,i){e.addToRenderList(n);var h=r.currentContext;if(v(r,h,n,e,i)&&n.isFilled){var s=n.width,l=n.height,f=s/2,u=s/n.projection;n.showTop&&(o(h,n,n.fillTop),h.beginPath(),h.moveTo(-f,-l),h.lineTo(0,-u-l),h.lineTo(f,-l),h.lineTo(f,-1),h.lineTo(0,u-1),h.lineTo(-f,-1),h.lineTo(-f,-l),h.fill()),n.showLeft&&(o(h,n,n.fillLeft),h.beginPath(),h.moveTo(-f,0),h.lineTo(0,u),h.lineTo(0,u-l),h.lineTo(-f,-l),h.lineTo(-f,0),h.fill()),n.showRight&&(o(h,n,n.fillRight),h.beginPath(),h.moveTo(f,0),h.lineTo(0,u),h.lineTo(0,u-l),h.lineTo(f,-l),h.lineTo(f,0),h.fill()),h.restore()}};c.exports=a},3933:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(61475);a.register("isobox",function(o,r,n,e,i,h,s){return this.displayList.add(new v(this.scene,o,r,n,e,i,h,s))})},99651:(c,m,t)=>{/** + */var o=t(39429),v=t(61475);o.register("isobox",function(a,r,n,e,i,h,s){return this.displayList.add(new v(this.scene,a,r,n,e,i,h,s))})},99651:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(68149),o=t(11508),c.exports={renderWebGL:v,renderCanvas:o}},68149:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(68149),a=t(11508),c.exports={renderWebGL:v,renderCanvas:a}},68149:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=a(n,e,i),l=h.calcMatrix.copyFrom(s.calc),f=n.width,u=n.height,d=f/2,p=f/n.projection,g=e.alpha*n.alpha;if(n.isFilled){var y,x,T,C,M,w,L,F,O;r.pipelines.preBatch(n),n.showTop&&(y=v.getTintAppendFloatAlpha(n.fillTop,g),x=l.getX(-d,-u),T=l.getY(-d,-u),C=l.getX(0,-p-u),M=l.getY(0,-p-u),w=l.getX(d,-u),L=l.getY(d,-u),F=l.getX(0,p-u),O=l.getY(0,p-u),h.batchQuad(n,x,T,C,M,w,L,F,O,0,0,1,1,y,y,y,y,2)),n.showLeft&&(y=v.getTintAppendFloatAlpha(n.fillLeft,g),x=l.getX(-d,0),T=l.getY(-d,0),C=l.getX(0,p),M=l.getY(0,p),w=l.getX(0,p-u),L=l.getY(0,p-u),F=l.getX(-d,-u),O=l.getY(-d,-u),h.batchQuad(n,x,T,C,M,w,L,F,O,0,0,1,1,y,y,y,y,2)),n.showRight&&(y=v.getTintAppendFloatAlpha(n.fillRight,g),x=l.getX(d,0),T=l.getY(d,0),C=l.getX(0,p),M=l.getY(0,p),w=l.getX(0,p-u),L=l.getY(0,p-u),F=l.getX(d,-u),O=l.getY(d,-u),h.batchQuad(n,x,T,C,M,w,L,F,O,0,0,1,1,y,y,y,y,2)),r.pipelines.postBatch(n)}};c.exports=o},16933:(c,m,t)=>{/** + */var o=t(91296),v=t(70554),a=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=o(n,e,i),l=h.calcMatrix.copyFrom(s.calc),f=n.width,u=n.height,d=f/2,p=f/n.projection,g=e.alpha*n.alpha;if(n.isFilled){var y,x,C,P,M,w,I,L,B;r.pipelines.preBatch(n),n.showTop&&(y=v.getTintAppendFloatAlpha(n.fillTop,g),x=l.getX(-d,-u),C=l.getY(-d,-u),P=l.getX(0,-p-u),M=l.getY(0,-p-u),w=l.getX(d,-u),I=l.getY(d,-u),L=l.getX(0,p-u),B=l.getY(0,p-u),h.batchQuad(n,x,C,P,M,w,I,L,B,0,0,1,1,y,y,y,y,2)),n.showLeft&&(y=v.getTintAppendFloatAlpha(n.fillLeft,g),x=l.getX(-d,0),C=l.getY(-d,0),P=l.getX(0,p),M=l.getY(0,p),w=l.getX(0,p-u),I=l.getY(0,p-u),L=l.getX(-d,-u),B=l.getY(-d,-u),h.batchQuad(n,x,C,P,M,w,I,L,B,0,0,1,1,y,y,y,y,2)),n.showRight&&(y=v.getTintAppendFloatAlpha(n.fillRight,g),x=l.getX(d,0),C=l.getY(d,0),P=l.getX(0,p),M=l.getY(0,p),w=l.getX(0,p-u),I=l.getY(0,p-u),L=l.getX(d,-u),B=l.getY(d,-u),h.batchQuad(n,x,C,P,M,w,I,L,B,0,0,1,1,y,y,y,y,2)),r.pipelines.postBatch(n)}};c.exports=a},16933:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(60561),o=t(17803),r=new a({Extends:o,Mixins:[v],initialize:function(e,i,h,s,l,f,u,d,p){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=48),l===void 0&&(l=32),f===void 0&&(f=!1),u===void 0&&(u=15658734),d===void 0&&(d=10066329),p===void 0&&(p=13421772),o.call(this,e,"IsoTriangle",null),this.projection=4,this.fillTop=u,this.fillLeft=d,this.fillRight=p,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=f,this.isFilled=!0,this.setPosition(i,h),this.setSize(s,l),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setReversed:function(n){return this.isReversed=n,this},setFaces:function(n,e,i){return n===void 0&&(n=!0),e===void 0&&(e=!0),i===void 0&&(i=!0),this.showTop=n,this.showLeft=e,this.showRight=i,this},setFillStyle:function(n,e,i){return this.fillTop=n,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});c.exports=r},79590:(c,m,t)=>{/** + */var o=t(83419),v=t(60561),a=t(17803),r=new o({Extends:a,Mixins:[v],initialize:function(e,i,h,s,l,f,u,d,p){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=48),l===void 0&&(l=32),f===void 0&&(f=!1),u===void 0&&(u=15658734),d===void 0&&(d=10066329),p===void 0&&(p=13421772),a.call(this,e,"IsoTriangle",null),this.projection=4,this.fillTop=u,this.fillLeft=d,this.fillRight=p,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=f,this.isFilled=!0,this.setPosition(i,h),this.setSize(s,l),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setReversed:function(n){return this.isReversed=n,this},setFaces:function(n,e,i){return n===void 0&&(n=!0),e===void 0&&(e=!0),i===void 0&&(i=!0),this.showTop=n,this.showLeft=e,this.showRight=i,this},setFillStyle:function(n,e,i){return this.fillTop=n,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});c.exports=r},79590:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(20926),o=function(r,n,e,i){e.addToRenderList(n);var h=r.currentContext;if(v(r,h,n,e,i)&&n.isFilled){var s=n.width,l=n.height,f=s/2,u=s/n.projection,d=n.isReversed;n.showTop&&d&&(a(h,n,n.fillTop),h.beginPath(),h.moveTo(-f,-l),h.lineTo(0,-u-l),h.lineTo(f,-l),h.lineTo(0,u-l),h.fill()),n.showLeft&&(a(h,n,n.fillLeft),h.beginPath(),d?(h.moveTo(-f,-l),h.lineTo(0,u),h.lineTo(0,u-l)):(h.moveTo(-f,0),h.lineTo(0,u),h.lineTo(0,u-l)),h.fill()),n.showRight&&(a(h,n,n.fillRight),h.beginPath(),d?(h.moveTo(f,-l),h.lineTo(0,u),h.lineTo(0,u-l)):(h.moveTo(f,0),h.lineTo(0,u),h.lineTo(0,u-l)),h.fill()),h.restore()}};c.exports=o},49803:(c,m,t)=>{/** + */var o=t(65960),v=t(20926),a=function(r,n,e,i){e.addToRenderList(n);var h=r.currentContext;if(v(r,h,n,e,i)&&n.isFilled){var s=n.width,l=n.height,f=s/2,u=s/n.projection,d=n.isReversed;n.showTop&&d&&(o(h,n,n.fillTop),h.beginPath(),h.moveTo(-f,-l),h.lineTo(0,-u-l),h.lineTo(f,-l),h.lineTo(0,u-l),h.fill()),n.showLeft&&(o(h,n,n.fillLeft),h.beginPath(),d?(h.moveTo(-f,-l),h.lineTo(0,u),h.lineTo(0,u-l)):(h.moveTo(-f,0),h.lineTo(0,u),h.lineTo(0,u-l)),h.fill()),n.showRight&&(o(h,n,n.fillRight),h.beginPath(),d?(h.moveTo(f,-l),h.lineTo(0,u),h.lineTo(0,u-l)):(h.moveTo(f,0),h.lineTo(0,u),h.lineTo(0,u-l)),h.fill()),h.restore()}};c.exports=a},49803:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(16933);a.register("isotriangle",function(o,r,n,e,i,h,s,l){return this.displayList.add(new v(this.scene,o,r,n,e,i,h,s,l))})},60561:(c,m,t)=>{/** + */var o=t(39429),v=t(16933);o.register("isotriangle",function(a,r,n,e,i,h,s,l){return this.displayList.add(new v(this.scene,a,r,n,e,i,h,s,l))})},60561:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(51503),o=t(79590),c.exports={renderWebGL:v,renderCanvas:o}},51503:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(51503),a=t(79590),c.exports={renderWebGL:v,renderCanvas:a}},51503:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=a(n,e,i),l=h.calcMatrix.copyFrom(s.calc),f=n.width,u=n.height,d=f/2,p=f/n.projection,g=n.isReversed,y=e.alpha*n.alpha;if(n.isFilled){r.pipelines.preBatch(n);var x,T,C,M,w,L,F;if(n.showTop&&g){x=v.getTintAppendFloatAlpha(n.fillTop,y),T=l.getX(-d,-u),C=l.getY(-d,-u),M=l.getX(0,-p-u),w=l.getY(0,-p-u),L=l.getX(d,-u),F=l.getY(d,-u);var O=l.getX(0,p-u),N=l.getY(0,p-u);h.batchQuad(n,T,C,M,w,L,F,O,N,0,0,1,1,x,x,x,x,2)}n.showLeft&&(x=v.getTintAppendFloatAlpha(n.fillLeft,y),g?(T=l.getX(-d,-u),C=l.getY(-d,-u),M=l.getX(0,p),w=l.getY(0,p),L=l.getX(0,p-u),F=l.getY(0,p-u)):(T=l.getX(-d,0),C=l.getY(-d,0),M=l.getX(0,p),w=l.getY(0,p),L=l.getX(0,p-u),F=l.getY(0,p-u)),h.batchTri(n,T,C,M,w,L,F,0,0,1,1,x,x,x,2)),n.showRight&&(x=v.getTintAppendFloatAlpha(n.fillRight,y),g?(T=l.getX(d,-u),C=l.getY(d,-u),M=l.getX(0,p),w=l.getY(0,p),L=l.getX(0,p-u),F=l.getY(0,p-u)):(T=l.getX(d,0),C=l.getY(d,0),M=l.getX(0,p),w=l.getY(0,p),L=l.getX(0,p-u),F=l.getY(0,p-u)),h.batchTri(n,T,C,M,w,L,F,0,0,1,1,x,x,x,2)),r.pipelines.postBatch(n)}};c.exports=o},57847:(c,m,t)=>{/** + */var o=t(91296),v=t(70554),a=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=o(n,e,i),l=h.calcMatrix.copyFrom(s.calc),f=n.width,u=n.height,d=f/2,p=f/n.projection,g=n.isReversed,y=e.alpha*n.alpha;if(n.isFilled){r.pipelines.preBatch(n);var x,C,P,M,w,I,L;if(n.showTop&&g){x=v.getTintAppendFloatAlpha(n.fillTop,y),C=l.getX(-d,-u),P=l.getY(-d,-u),M=l.getX(0,-p-u),w=l.getY(0,-p-u),I=l.getX(d,-u),L=l.getY(d,-u);var B=l.getX(0,p-u),N=l.getY(0,p-u);h.batchQuad(n,C,P,M,w,I,L,B,N,0,0,1,1,x,x,x,x,2)}n.showLeft&&(x=v.getTintAppendFloatAlpha(n.fillLeft,y),g?(C=l.getX(-d,-u),P=l.getY(-d,-u),M=l.getX(0,p),w=l.getY(0,p),I=l.getX(0,p-u),L=l.getY(0,p-u)):(C=l.getX(-d,0),P=l.getY(-d,0),M=l.getX(0,p),w=l.getY(0,p),I=l.getX(0,p-u),L=l.getY(0,p-u)),h.batchTri(n,C,P,M,w,I,L,0,0,1,1,x,x,x,2)),n.showRight&&(x=v.getTintAppendFloatAlpha(n.fillRight,y),g?(C=l.getX(d,-u),P=l.getY(d,-u),M=l.getX(0,p),w=l.getY(0,p),I=l.getX(0,p-u),L=l.getY(0,p-u)):(C=l.getX(d,0),P=l.getY(d,0),M=l.getX(0,p),w=l.getY(0,p),I=l.getX(0,p-u),L=l.getY(0,p-u)),h.batchTri(n,C,P,M,w,I,L,0,0,1,1,x,x,x,2)),r.pipelines.postBatch(n)}};c.exports=a},57847:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(17803),o=t(23031),r=t(36823),n=new a({Extends:v,Mixins:[r],initialize:function(i,h,s,l,f,u,d,p,g){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=128),d===void 0&&(d=0),v.call(this,i,"Line",new o(l,f,u,d));var y=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(h,s),this.setSize(y,x),p!==void 0&&this.setStrokeStyle(1,p,g),this.updateDisplayOrigin()},setLineWidth:function(e,i){return i===void 0&&(i=e),this._startWidth=e,this._endWidth=i,this.lineWidth=e,this},setTo:function(e,i,h,s){return this.geom.setTo(e,i,h,s),this}});c.exports=n},17440:(c,m,t)=>{/** + */var o=t(83419),v=t(17803),a=t(23031),r=t(36823),n=new o({Extends:v,Mixins:[r],initialize:function(i,h,s,l,f,u,d,p,g){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=128),d===void 0&&(d=0),v.call(this,i,"Line",new a(l,f,u,d));var y=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(h,s),this.setSize(y,x),p!==void 0&&this.setStrokeStyle(1,p,g),this.updateDisplayOrigin()},setLineWidth:function(e,i){return i===void 0&&(i=e),this._startWidth=e,this._endWidth=i,this.lineWidth=e,this},setTo:function(e,i,h,s){return this.geom.setTo(e,i,h,s),this}});c.exports=n},17440:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(75177),v=t(20926),o=function(r,n,e,i){e.addToRenderList(n);var h=r.currentContext;if(v(r,h,n,e,i)){var s=n._displayOriginX,l=n._displayOriginY;n.isStroked&&(a(h,n),h.beginPath(),h.moveTo(n.geom.x1-s,n.geom.y1-l),h.lineTo(n.geom.x2-s,n.geom.y2-l),h.stroke()),h.restore()}};c.exports=o},2481:(c,m,t)=>{/** + */var o=t(75177),v=t(20926),a=function(r,n,e,i){e.addToRenderList(n);var h=r.currentContext;if(v(r,h,n,e,i)){var s=n._displayOriginX,l=n._displayOriginY;n.isStroked&&(o(h,n),h.beginPath(),h.moveTo(n.geom.x1-s,n.geom.y1-l),h.lineTo(n.geom.x2-s,n.geom.y2-l),h.stroke()),h.restore()}};c.exports=a},2481:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(57847);a.register("line",function(o,r,n,e,i,h,s,l){return this.displayList.add(new v(this.scene,o,r,n,e,i,h,s,l))})},36823:(c,m,t)=>{/** + */var o=t(39429),v=t(57847);o.register("line",function(a,r,n,e,i,h,s,l){return this.displayList.add(new v(this.scene,a,r,n,e,i,h,s,l))})},36823:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(77385),o=t(17440),c.exports={renderWebGL:v,renderCanvas:o}},77385:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(77385),a=t(17440),c.exports={renderWebGL:v,renderCanvas:a}},77385:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=a(n,e,i);h.calcMatrix.copyFrom(s.calc);var l=n._displayOriginX,f=n._displayOriginY,u=e.alpha*n.alpha;if(r.pipelines.preBatch(n),n.isStroked){var d=h.strokeTint,p=v.getTintAppendFloatAlpha(n.strokeColor,n.strokeAlpha*u);d.TL=p,d.TR=p,d.BL=p,d.BR=p,h.batchLine(n.geom.x1-l,n.geom.y1-f,n.geom.x2-l,n.geom.y2-f,n._startWidth/2,n._endWidth/2,1,0,!1,s.sprite,s.camera)}r.pipelines.postBatch(n)};c.exports=o},24949:(c,m,t)=>{/** + */var o=t(91296),v=t(70554),a=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=o(n,e,i);h.calcMatrix.copyFrom(s.calc);var l=n._displayOriginX,f=n._displayOriginY,u=e.alpha*n.alpha;if(r.pipelines.preBatch(n),n.isStroked){var d=h.strokeTint,p=v.getTintAppendFloatAlpha(n.strokeColor,n.strokeAlpha*u);d.TL=p,d.TR=p,d.BL=p,d.BR=p,h.batchLine(n.geom.x1-l,n.geom.y1-f,n.geom.x2-l,n.geom.y2-f,n._startWidth/2,n._endWidth/2,1,0,!1,s.sprite,s.camera)}r.pipelines.postBatch(n)};c.exports=a},24949:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(90273),v=t(83419),o=t(94811),r=t(13829),n=t(25717),e=t(17803),i=t(5469),h=new v({Extends:e,Mixins:[a],initialize:function(l,f,u,d,p,g){f===void 0&&(f=0),u===void 0&&(u=0),e.call(this,l,"Polygon",new n(d));var y=r(this.geom);this.setPosition(f,u),this.setSize(y.width,y.height),p!==void 0&&this.setFillStyle(p,g),this.updateDisplayOrigin(),this.updateData()},smooth:function(s){s===void 0&&(s=1);for(var l=0;l{/** + */var o=t(90273),v=t(83419),a=t(94811),r=t(13829),n=t(25717),e=t(17803),i=t(5469),h=new v({Extends:e,Mixins:[o],initialize:function(l,f,u,d,p,g){f===void 0&&(f=0),u===void 0&&(u=0),e.call(this,l,"Polygon",new n(d));var y=r(this.geom);this.setPosition(f,u),this.setSize(y.width,y.height),p!==void 0&&this.setFillStyle(p,g),this.updateDisplayOrigin(),this.updateData()},smooth:function(s){s===void 0&&(s=1);for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var y=2;y{/** + */var o=t(65960),v=t(75177),a=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(a(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var y=2;y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(24949);a.register("polygon",function(o,r,n,e,i){return this.displayList.add(new v(this.scene,o,r,n,e,i))})},90273:(c,m,t)=>{/** + */var o=t(39429),v=t(24949);o.register("polygon",function(a,r,n,e,i){return this.displayList.add(new v(this.scene,a,r,n,e,i))})},90273:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(73695),o=t(38710),c.exports={renderWebGL:v,renderCanvas:o}},73695:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(73695),a=t(38710),c.exports={renderWebGL:v,renderCanvas:a}},73695:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10441),v=t(91296),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=v(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&a(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},74561:(c,m,t)=>{/** + */var o=t(10441),v=t(91296),a=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=v(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&o(s,f,e,p,u,d),e.isStroked&&a(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},74561:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(87841),o=t(17803),r=t(95597),n=new a({Extends:o,Mixins:[r],initialize:function(i,h,s,l,f,u,d){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=128),f===void 0&&(f=128),o.call(this,i,"Rectangle",new v(0,0,l,f)),this.setPosition(h,s),this.setSize(l,f),u!==void 0&&this.setFillStyle(u,d),this.updateDisplayOrigin(),this.updateData()},setSize:function(e,i){this.width=e,this.height=i,this.geom.setSize(e,i),this.updateData(),this.updateDisplayOrigin();var h=this.input;return h&&!h.customHitArea&&(h.hitArea.width=e,h.hitArea.height=i),this},updateData:function(){var e=[],i=this.geom,h=this._tempLine;return i.getLineA(h),e.push(h.x1,h.y1,h.x2,h.y2),i.getLineB(h),e.push(h.x2,h.y2),i.getLineC(h),e.push(h.x2,h.y2),i.getLineD(h),e.push(h.x2,h.y2),this.pathData=e,this}});c.exports=n},48682:(c,m,t)=>{/** + */var o=t(83419),v=t(87841),a=t(17803),r=t(95597),n=new o({Extends:a,Mixins:[r],initialize:function(i,h,s,l,f,u,d){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=128),f===void 0&&(f=128),a.call(this,i,"Rectangle",new v(0,0,l,f)),this.setPosition(h,s),this.setSize(l,f),u!==void 0&&this.setFillStyle(u,d),this.updateDisplayOrigin(),this.updateData()},setSize:function(e,i){this.width=e,this.height=i,this.geom.setSize(e,i),this.updateData(),this.updateDisplayOrigin();var h=this.input;return h&&!h.customHitArea&&(h.hitArea.width=e,h.hitArea.height=i),this},updateData:function(){var e=[],i=this.geom,h=this._tempLine;return i.getLineA(h),e.push(h.x1,h.y1,h.x2,h.y2),i.getLineB(h),e.push(h.x2,h.y2),i.getLineC(h),e.push(h.x2,h.y2),i.getLineD(h),e.push(h.x2,h.y2),this.pathData=e,this}});c.exports=n},48682:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY;e.isFilled&&(a(s,e),s.fillRect(-l,-f,e.width,e.height)),e.isStroked&&(v(s,e),s.beginPath(),s.rect(-l,-f,e.width,e.height),s.stroke()),s.restore()}};c.exports=r},87959:(c,m,t)=>{/** + */var o=t(65960),v=t(75177),a=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(a(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY;e.isFilled&&(o(s,e),s.fillRect(-l,-f,e.width,e.height)),e.isStroked&&(v(s,e),s.beginPath(),s.rect(-l,-f,e.width,e.height),s.stroke()),s.restore()}};c.exports=r},87959:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(74561);a.register("rectangle",function(o,r,n,e,i,h){return this.displayList.add(new v(this.scene,o,r,n,e,i,h))})},95597:(c,m,t)=>{/** + */var o=t(39429),v=t(74561);o.register("rectangle",function(a,r,n,e,i,h){return this.displayList.add(new v(this.scene,a,r,n,e,i,h))})},95597:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(52059),o=t(48682),c.exports={renderWebGL:v,renderCanvas:o}},52059:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(52059),a=t(48682),c.exports={renderWebGL:v,renderCanvas:a}},52059:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(34682),o=t(70554),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=a(e,i,h);s.calcMatrix.copyFrom(l.calc);var f=e._displayOriginX,u=e._displayOriginY,d=i.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var p=s.fillTint,g=o.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*d);p.TL=g,p.TR=g,p.BL=g,p.BR=g,s.batchFillRect(-f,-u,e.width,e.height)}e.isStroked&&v(s,e,d,f,u),n.pipelines.postBatch(e)};c.exports=r},55911:(c,m,t)=>{/** + */var o=t(91296),v=t(34682),a=t(70554),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=o(e,i,h);s.calcMatrix.copyFrom(l.calc);var f=e._displayOriginX,u=e._displayOriginY,d=i.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var p=s.fillTint,g=a.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*d);p.TL=g,p.TR=g,p.BL=g,p.BR=g,s.batchFillRect(-f,-u,e.width,e.height)}e.isStroked&&v(s,e,d,f,u),n.pipelines.postBatch(e)};c.exports=r},55911:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(81991),v=t(83419),o=t(94811),r=t(17803),n=new v({Extends:r,Mixins:[a],initialize:function(i,h,s,l,f,u,d,p){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=5),f===void 0&&(f=32),u===void 0&&(u=64),r.call(this,i,"Star",null),this._points=l,this._innerRadius=f,this._outerRadius=u,this.setPosition(h,s),this.setSize(u*2,u*2),d!==void 0&&this.setFillStyle(d,p),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=[],i=this._points,h=this._innerRadius,s=this._outerRadius,l=Math.PI/2*3,f=Math.PI/i,u=s,d=s;e.push(u,d+-s);for(var p=0;p{/** + */var o=t(81991),v=t(83419),a=t(94811),r=t(17803),n=new v({Extends:r,Mixins:[o],initialize:function(i,h,s,l,f,u,d,p){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=5),f===void 0&&(f=32),u===void 0&&(u=64),r.call(this,i,"Star",null),this._points=l,this._innerRadius=f,this._outerRadius=u,this.setPosition(h,s),this.setSize(u*2,u*2),d!==void 0&&this.setFillStyle(d,p),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=[],i=this._points,h=this._innerRadius,s=this._outerRadius,l=Math.PI/2*3,f=Math.PI/i,u=s,d=s;e.push(u,d+-s);for(var p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var y=2;y{/** + */var o=t(65960),v=t(75177),a=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(a(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var y=2;y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(55911),v=t(39429);v.register("star",function(o,r,n,e,i,h,s){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s))})},81991:(c,m,t)=>{/** + */var o=t(55911),v=t(39429);v.register("star",function(a,r,n,e,i,h,s){return this.displayList.add(new o(this.scene,a,r,n,e,i,h,s))})},81991:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(57017),o=t(64272),c.exports={renderWebGL:v,renderCanvas:o}},57017:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(57017),a=t(64272),c.exports={renderWebGL:v,renderCanvas:a}},57017:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10441),v=t(91296),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=v(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&a(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},36931:(c,m,t)=>{/** + */var o=t(10441),v=t(91296),a=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=v(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&o(s,f,e,p,u,d),e.isStroked&&a(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},36931:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(17803),o=t(16483),r=t(96195),n=new a({Extends:v,Mixins:[r],initialize:function(i,h,s,l,f,u,d,p,g,y,x){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=128),u===void 0&&(u=64),d===void 0&&(d=0),p===void 0&&(p=128),g===void 0&&(g=128),v.call(this,i,"Triangle",new o(l,f,u,d,p,g));var T=this.geom.right-this.geom.left,C=this.geom.bottom-this.geom.top;this.setPosition(h,s),this.setSize(T,C),y!==void 0&&this.setFillStyle(y,x),this.updateDisplayOrigin(),this.updateData()},setTo:function(e,i,h,s,l,f){return this.geom.setTo(e,i,h,s,l,f),this.updateData()},updateData:function(){var e=[],i=this.geom,h=this._tempLine;return i.getLineA(h),e.push(h.x1,h.y1,h.x2,h.y2),i.getLineB(h),e.push(h.x2,h.y2),i.getLineC(h),e.push(h.x2,h.y2),this.pathData=e,this}});c.exports=n},85172:(c,m,t)=>{/** + */var o=t(83419),v=t(17803),a=t(16483),r=t(96195),n=new o({Extends:v,Mixins:[r],initialize:function(i,h,s,l,f,u,d,p,g,y,x){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=128),u===void 0&&(u=64),d===void 0&&(d=0),p===void 0&&(p=128),g===void 0&&(g=128),v.call(this,i,"Triangle",new a(l,f,u,d,p,g));var C=this.geom.right-this.geom.left,P=this.geom.bottom-this.geom.top;this.setPosition(h,s),this.setSize(C,P),y!==void 0&&this.setFillStyle(y,x),this.updateDisplayOrigin(),this.updateData()},setTo:function(e,i,h,s,l,f){return this.geom.setTo(e,i,h,s,l,f),this.updateData()},updateData:function(){var e=[],i=this.geom,h=this._tempLine;return i.getLineA(h),e.push(h.x1,h.y1,h.x2,h.y2),i.getLineB(h),e.push(h.x2,h.y2),i.getLineC(h),e.push(h.x2,h.y2),this.pathData=e,this}});c.exports=n},85172:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.geom.x1-l,d=e.geom.y1-f,p=e.geom.x2-l,g=e.geom.y2-f,y=e.geom.x3-l,x=e.geom.y3-f;s.beginPath(),s.moveTo(u,d),s.lineTo(p,g),s.lineTo(y,x),s.closePath(),e.isFilled&&(a(s,e),s.fill()),e.isStroked&&(v(s,e),s.stroke()),s.restore()}};c.exports=r},45245:(c,m,t)=>{/** + */var o=t(65960),v=t(75177),a=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(a(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.geom.x1-l,d=e.geom.y1-f,p=e.geom.x2-l,g=e.geom.y2-f,y=e.geom.x3-l,x=e.geom.y3-f;s.beginPath(),s.moveTo(u,d),s.lineTo(p,g),s.lineTo(y,x),s.closePath(),e.isFilled&&(o(s,e),s.fill()),e.isStroked&&(v(s,e),s.stroke()),s.restore()}};c.exports=r},45245:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(36931);a.register("triangle",function(o,r,n,e,i,h,s,l,f,u){return this.displayList.add(new v(this.scene,o,r,n,e,i,h,s,l,f,u))})},96195:(c,m,t)=>{/** + */var o=t(39429),v=t(36931);o.register("triangle",function(a,r,n,e,i,h,s,l,f,u){return this.displayList.add(new v(this.scene,a,r,n,e,i,h,s,l,f,u))})},96195:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(83253),o=t(85172),c.exports={renderWebGL:v,renderCanvas:o}},83253:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(83253),a=t(85172),c.exports={renderWebGL:v,renderCanvas:a}},83253:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(34682),o=t(70554),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=a(e,i,h);s.calcMatrix.copyFrom(l.calc);var f=e._displayOriginX,u=e._displayOriginY,d=i.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var p=s.fillTint,g=o.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*d);p.TL=g,p.TR=g,p.BL=g,p.BR=g;var y=e.geom.x1-f,x=e.geom.y1-u,T=e.geom.x2-f,C=e.geom.y2-u,M=e.geom.x3-f,w=e.geom.y3-u;s.batchFillTriangle(y,x,T,C,M,w,l.sprite,l.camera)}e.isStroked&&v(s,e,d,f,u),n.pipelines.postBatch(e)};c.exports=r},68287:(c,m,t)=>{/** + */var o=t(91296),v=t(34682),a=t(70554),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=o(e,i,h);s.calcMatrix.copyFrom(l.calc);var f=e._displayOriginX,u=e._displayOriginY,d=i.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var p=s.fillTint,g=a.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*d);p.TL=g,p.TR=g,p.BL=g,p.BR=g;var y=e.geom.x1-f,x=e.geom.y1-u,C=e.geom.x2-f,P=e.geom.y2-u,M=e.geom.x3-f,w=e.geom.y3-u;s.batchFillTriangle(y,x,C,P,M,w,l.sprite,l.camera)}e.isStroked&&v(s,e,d,f,u),n.pipelines.postBatch(e)};c.exports=r},68287:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(9674),v=t(83419),o=t(31401),r=t(95643),n=t(92751),e=new v({Extends:r,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Size,o.TextureCrop,o.Tint,o.Transform,o.Visible,n],initialize:function(h,s,l,f,u){r.call(this,h,"Sprite"),this._crop=this.resetCropObject(),this.anims=new a(this),this.setTexture(f,u),this.setPosition(s,l),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(i,h){this.anims.update(i,h)},play:function(i,h){return this.anims.play(i,h)},playReverse:function(i,h){return this.anims.playReverse(i,h)},playAfterDelay:function(i,h){return this.anims.playAfterDelay(i,h)},playAfterRepeat:function(i,h){return this.anims.playAfterRepeat(i,h)},chain:function(i){return this.anims.chain(i)},stop:function(){return this.anims.stop()},stopAfterDelay:function(i){return this.anims.stopAfterDelay(i)},stopAfterRepeat:function(i){return this.anims.stopAfterRepeat(i)},stopOnFrame:function(i){return this.anims.stopOnFrame(i)},toJSON:function(){return o.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});c.exports=e},76552:c=>{/** + */var o=t(9674),v=t(83419),a=t(31401),r=t(95643),n=t(92751),e=new v({Extends:r,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.PostPipeline,a.ScrollFactor,a.Size,a.TextureCrop,a.Tint,a.Transform,a.Visible,n],initialize:function(h,s,l,f,u){r.call(this,h,"Sprite"),this._crop=this.resetCropObject(),this.anims=new o(this),this.setTexture(f,u),this.setPosition(s,l),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(i,h){this.anims.update(i,h)},play:function(i,h){return this.anims.play(i,h)},playReverse:function(i,h){return this.anims.playReverse(i,h)},playAfterDelay:function(i,h){return this.anims.playAfterDelay(i,h)},playAfterRepeat:function(i,h){return this.anims.playAfterRepeat(i,h)},chain:function(i){return this.anims.chain(i)},stop:function(){return this.anims.stop()},stopAfterDelay:function(i){return this.anims.stopAfterDelay(i)},stopAfterRepeat:function(i){return this.anims.stopAfterRepeat(i)},stopOnFrame:function(i){return this.anims.stopOnFrame(i)},toJSON:function(){return a.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});c.exports=e},76552:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v.addToRenderList(a),t.batchSprite(a,a.frame,v,o)};c.exports=m},15567:(c,m,t)=>{/** + */var m=function(t,o,v,a){v.addToRenderList(o),t.batchSprite(o,o.frame,v,a)};c.exports=m},15567:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(13059),o=t(44603),r=t(23568),n=t(68287);o.register("sprite",function(e,i){e===void 0&&(e={});var h=r(e,"key",null),s=r(e,"frame",null),l=new n(this.scene,0,0,h,s);return i!==void 0&&(e.add=i),a(this.scene,l,e),v(l,e),l})},46409:(c,m,t)=>{/** + */var o=t(25305),v=t(13059),a=t(44603),r=t(23568),n=t(68287);a.register("sprite",function(e,i){e===void 0&&(e={});var h=r(e,"key",null),s=r(e,"frame",null),l=new n(this.scene,0,0,h,s);return i!==void 0&&(e.add=i),o(this.scene,l,e),v(l,e),l})},46409:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(68287);a.register("sprite",function(o,r,n,e){return this.displayList.add(new v(this.scene,o,r,n,e))})},92751:(c,m,t)=>{/** + */var o=t(39429),v=t(68287);o.register("sprite",function(a,r,n,e){return this.displayList.add(new v(this.scene,a,r,n,e))})},92751:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(9409),o=t(76552),c.exports={renderWebGL:v,renderCanvas:o}},9409:c=>{/** + */var o=t(29747),v=o,a=o;v=t(9409),a=t(76552),c.exports={renderWebGL:v,renderCanvas:a}},9409:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v.addToRenderList(a),a.pipeline.batchSprite(a,v,o)};c.exports=m},14220:c=>{/** + */var m=function(t,o,v,a){v.addToRenderList(o),o.pipeline.batchSprite(o,v,a)};c.exports=m},14220:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=t.canvas,r=t.context,n=t.style,e=[],i=0,h=v.length;n.maxLines>0&&n.maxLines1&&(l+=t.letterSpacing*(v[s].length-1)),n.wordWrap&&(l-=r.measureText(" ").width),e[s]=Math.ceil(l),i=Math.max(i,e[s])}var f=a.fontSize+n.strokeThickness,u=f*h,d=t.lineSpacing;return h>1&&(u+=d*(h-1)),{width:i,height:u,lines:h,lineWidths:e,lineSpacing:d,lineHeight:f}};c.exports=m},79557:(c,m,t)=>{/** + */var m=function(t,o,v){var a=t.canvas,r=t.context,n=t.style,e=[],i=0,h=v.length;n.maxLines>0&&n.maxLines1&&(l+=t.letterSpacing*(v[s].length-1)),n.wordWrap&&(l-=r.measureText(" ").width),e[s]=Math.ceil(l),i=Math.max(i,e[s])}var f=o.fontSize+n.strokeThickness,u=f*h,d=t.lineSpacing;return h>1&&(u+=d*(h-1)),{width:i,height:u,lines:h,lineWidths:e,lineSpacing:d,lineHeight:f}};c.exports=m},79557:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(27919),v=function(o){var r=a.create(this),n=r.getContext("2d",{willReadFrequently:!0});o.syncFont(r,n);var e=n.measureText(o.testString);if("actualBoundingBoxAscent"in e){var i=e.actualBoundingBoxAscent,h=e.actualBoundingBoxDescent;return a.remove(r),{ascent:i,descent:h,fontSize:i+h}}var s=Math.ceil(e.width*o.baselineX),l=s,f=2*l;l=l*o.baselineY|0,r.width=s,r.height=f,n.fillStyle="#f00",n.fillRect(0,0,s,f),n.font=o._font,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(o.testString,0,l);var u={ascent:0,descent:0,fontSize:0},d=n.getImageData(0,0,s,f);if(!d)return u.ascent=l,u.descent=l+6,u.fontSize=u.ascent+u.descent,a.remove(r),u;var p=d.data,g=p.length,y=s*4,x,T,C=0,M=!1;for(x=0;xl;x--){for(T=0;T{/** + */var o=t(27919),v=function(a){var r=o.create(this),n=r.getContext("2d",{willReadFrequently:!0});a.syncFont(r,n);var e=n.measureText(a.testString);if("actualBoundingBoxAscent"in e){var i=e.actualBoundingBoxAscent,h=e.actualBoundingBoxDescent;return o.remove(r),{ascent:i,descent:h,fontSize:i+h}}var s=Math.ceil(e.width*a.baselineX),l=s,f=2*l;l=l*a.baselineY|0,r.width=s,r.height=f,n.fillStyle="#f00",n.fillRect(0,0,s,f),n.font=a._font,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(a.testString,0,l);var u={ascent:0,descent:0,fontSize:0},d=n.getImageData(0,0,s,f);if(!d)return u.ascent=l,u.descent=l+6,u.fontSize=u.ascent+u.descent,o.remove(r),u;var p=d.data,g=p.length,y=s*4,x,C,P=0,M=!1;for(x=0;xl;x--){for(C=0;C{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40366),v=t(27919),o=t(83419),r=t(31401),n=t(95643),e=t(14220),i=t(35154),h=t(35846),s=t(61771),l=t(35762),f=t(45650),u=new o({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,s],initialize:function(p,g,y,x,T){g===void 0&&(g=0),y===void 0&&(y=0),n.call(this,p,"Text"),this.renderer=p.sys.renderer,this.setPosition(g,y),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=v.create(this),this.context,this.style=new l(this,T),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=f(),this.texture=p.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),T&&T.padding&&this.setPadding(T.padding),T&&T.lineSpacing&&this.setLineSpacing(T.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",a(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(d){var p=this.style;if(p.wordWrapCallback){var g=p.wordWrapCallback.call(p.wordWrapCallbackScope,d,this);return Array.isArray(g)&&(g=g.join(` -`)),g}else return p.wordWrapWidth?p.wordWrapUseAdvanced?this.advancedWordWrap(d,this.context,this.style.wordWrapWidth):this.basicWordWrap(d,this.context,this.style.wordWrapWidth):d},advancedWordWrap:function(d,p,g){for(var y="",x=d.replace(/ +/gi," ").split(this.splitRegExp),T=x.length,C=0;CF){if(N===0){for(var $=V;$.length&&($=$.slice(0,-1),K=p.measureText($).width,!(K<=F)););if(!$.length)throw new Error("wordWrapWidth < a single character");var J=G.substr($.length);O[N]=J,w+=$}var X=O[N].length?N:N+1,Y=O.slice(X).join(" ").replace(/[ \n]*$/gi,"");x.splice(C+1,0,Y),T=x.length;break}else w+=V,F-=K}y+=w.replace(/[ \n]*$/gi,"")+` -`}return y=y.replace(/[\s|\n]*$/gi,""),y},basicWordWrap:function(d,p,g){for(var y="",x=d.split(this.splitRegExp),T=x.length-1,C=p.measureText(" ").width,M=0;M<=T;M++){for(var w=g,L=x[M].split(" "),F=L.length-1,O=0;O<=F;O++){var N=L[O],G=p.measureText(N).width,V=G;Ow&&O>0&&(y+=` -`,w=g),y+=N,OL){if(N===0){for(var j=V;j.length&&(j=j.slice(0,-1),K=p.measureText(j).width,!(K<=L)););if(!j.length)throw new Error("wordWrapWidth < a single character");var J=G.substr(j.length);B[N]=J,w+=j}var X=B[N].length?N:N+1,Y=B.slice(X).join(" ").replace(/[ \n]*$/gi,"");x.splice(P+1,0,Y),C=x.length;break}else w+=V,L-=K}y+=w.replace(/[ \n]*$/gi,"")+` +`}return y=y.replace(/[\s|\n]*$/gi,""),y},basicWordWrap:function(d,p,g){for(var y="",x=d.split(this.splitRegExp),C=x.length-1,P=p.measureText(" ").width,M=0;M<=C;M++){for(var w=g,I=x[M].split(" "),L=I.length-1,B=0;B<=L;B++){var N=I[B],G=p.measureText(N).width,V=G;Bw&&B>0&&(y+=` +`,w=g),y+=N,B0&&(G+=M.lineSpacing*V),g.rtl)N=F-N-w.left-w.right;else if(g.align==="right")N+=L-M.lineWidths[V];else if(g.align==="center")N+=(L-M.lineWidths[V])/2;else if(g.align==="justify"){var K=.85;if(M.lineWidths[V]/M.width>=K){var $=M.width-M.lineWidths[V],J=p.measureText(" ").width,X=C[V].trim(),Y=X.split(" ");$+=(C[V].length-X.length)*J;for(var D=Math.floor($/J),z=0;D>0;)Y[z]+=" ",z=(z+1)%(Y.length-1||1),--D;C[V]=Y.join(" ")}}if(this.autoRound&&(N=Math.round(N),G=Math.round(G)),g.strokeThickness&&(g.syncShadow(p,g.shadowStroke),p.strokeText(C[V],N,G)),g.color){g.syncShadow(p,g.shadowFill);var W=this.letterSpacing;if(W!==0)for(var H=0,Z=C[V].split(""),Q=0;Q{/** +`+d:d);return g!==this._text&&(this._text=g,this.updateText()),this},setStyle:function(d){return this.style.setStyle(d)},setFont:function(d){return this.style.setFont(d)},setFontFamily:function(d){return this.style.setFontFamily(d)},setFontSize:function(d){return this.style.setFontSize(d)},setFontStyle:function(d){return this.style.setFontStyle(d)},setFixedSize:function(d,p){return this.style.setFixedSize(d,p)},setBackgroundColor:function(d){return this.style.setBackgroundColor(d)},setFill:function(d){return this.style.setFill(d)},setColor:function(d){return this.style.setColor(d)},setStroke:function(d,p){return this.style.setStroke(d,p)},setShadow:function(d,p,g,y,x,C){return this.style.setShadow(d,p,g,y,x,C)},setShadowOffset:function(d,p){return this.style.setShadowOffset(d,p)},setShadowColor:function(d){return this.style.setShadowColor(d)},setShadowBlur:function(d){return this.style.setShadowBlur(d)},setShadowStroke:function(d){return this.style.setShadowStroke(d)},setShadowFill:function(d){return this.style.setShadowFill(d)},setWordWrapWidth:function(d,p){return this.style.setWordWrapWidth(d,p)},setWordWrapCallback:function(d,p){return this.style.setWordWrapCallback(d,p)},setAlign:function(d){return this.style.setAlign(d)},setResolution:function(d){return this.style.setResolution(d)},setLineSpacing:function(d){return this.lineSpacing=d,this.updateText()},setLetterSpacing:function(d){return this.letterSpacing=d,this.updateText()},setPadding:function(d,p,g,y){if(typeof d=="object"){var x=d,C=i(x,"x",null);C!==null?(d=C,g=C):(d=i(x,"left",0),g=i(x,"right",d));var P=i(x,"y",null);P!==null?(p=P,y=P):(p=i(x,"top",0),y=i(x,"bottom",p))}else d===void 0&&(d=0),p===void 0&&(p=d),g===void 0&&(g=d),y===void 0&&(y=p);return this.padding.left=d,this.padding.top=p,this.padding.right=g,this.padding.bottom=y,this.updateText()},setMaxLines:function(d){return this.style.setMaxLines(d)},setRTL:function(d){d===void 0&&(d=!0);var p=this.style;return p.rtl===d?this:(p.rtl=d,d?(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",o(this.canvas,this.scene.sys.canvas)):(this.canvas.dir="ltr",this.context.direction="ltr"),p.align==="left"?p.align="right":p.align==="right"&&(p.align="left"),this)},updateText:function(){var d=this.canvas,p=this.context,g=this.style,y=g.resolution,x=g.metrics;g.syncFont(d,p);var C=this._text;(g.wordWrapWidth||g.wordWrapCallback)&&(C=this.runWordWrap(this._text));var P=C.split(this.splitRegExp),M=e(this,x,P),w=this.padding,I;g.fixedWidth===0?(this.width=M.width+w.left+w.right,I=M.width):(this.width=g.fixedWidth,I=this.width-w.left-w.right,I0&&(G+=M.lineSpacing*V),g.rtl)N=L-N-w.left-w.right;else if(g.align==="right")N+=I-M.lineWidths[V];else if(g.align==="center")N+=(I-M.lineWidths[V])/2;else if(g.align==="justify"){var K=.85;if(M.lineWidths[V]/M.width>=K){var j=M.width-M.lineWidths[V],J=p.measureText(" ").width,X=P[V].trim(),Y=X.split(" ");j+=(P[V].length-X.length)*J;for(var b=Math.floor(j/J),z=0;b>0;)Y[z]+=" ",z=(z+1)%(Y.length-1||1),--b;P[V]=Y.join(" ")}}if(this.autoRound&&(N=Math.round(N),G=Math.round(G)),g.strokeThickness&&(g.syncShadow(p,g.shadowStroke),p.strokeText(P[V],N,G)),g.color){g.syncShadow(p,g.shadowFill);var W=this.letterSpacing;if(W!==0)for(var H=0,Z=P[V].split(""),Q=0;Q{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){a.width===0||a.height===0||(v.addToRenderList(a),t.batchSprite(a,a.frame,v,o))};c.exports=m},71259:(c,m,t)=>{/** + */var m=function(t,o,v,a){o.width===0||o.height===0||(v.addToRenderList(o),t.batchSprite(o,o.frame,v,a))};c.exports=m},71259:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(50171);v.register("text",function(n,e){n===void 0&&(n={});var i=o(n,"text",""),h=o(n,"style",null),s=o(n,"padding",null);s!==null&&(h.padding=s);var l=new r(this.scene,0,0,i,h);return e!==void 0&&(n.add=e),a(this.scene,l,n),l.autoRound=o(n,"autoRound",!0),l.resolution=o(n,"resolution",1),l})},68005:(c,m,t)=>{/** + */var o=t(25305),v=t(44603),a=t(23568),r=t(50171);v.register("text",function(n,e){n===void 0&&(n={});var i=a(n,"text",""),h=a(n,"style",null),s=a(n,"padding",null);s!==null&&(h.padding=s);var l=new r(this.scene,0,0,i,h);return e!==void 0&&(n.add=e),o(this.scene,l,n),l.autoRound=a(n,"autoRound",!0),l.resolution=a(n,"resolution",1),l})},68005:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(50171),v=t(39429);v.register("text",function(o,r,n,e){return this.displayList.add(new a(this.scene,o,r,n,e))})},61771:(c,m,t)=>{/** + */var o=t(50171),v=t(39429);v.register("text",function(a,r,n,e){return this.displayList.add(new o(this.scene,a,r,n,e))})},61771:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(34397),o=t(79724),c.exports={renderWebGL:v,renderCanvas:o}},35762:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(34397),a=t(79724),c.exports={renderWebGL:v,renderCanvas:a}},35762:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23568),o=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 a({initialize:function(h,s){this.parent=h,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(s,!1,!0)},setStyle:function(i,h,s){h===void 0&&(h=!0),s===void 0&&(s=!1),i&&i.hasOwnProperty("fontSize")&&typeof i.fontSize=="number"&&(i.fontSize=i.fontSize.toString()+"px");for(var l in n){var f=s?n[l][1]:this[l];l==="wordWrapCallback"||l==="wordWrapCallbackScope"?this[l]=o(i,n[l][0],f):this[l]=v(i,n[l][0],f)}var u=o(i,"font",null);u!==null&&this.setFont(u,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var d=o(i,"fill",null);d!==null&&(this.color=d);var p=o(i,"metrics",!1);return p?this.metrics={ascent:o(p,"ascent",0),descent:o(p,"descent",0),fontSize:o(p,"fontSize",0)}:(h||!this.metrics)&&(this.metrics=r(this)),h?this.parent.updateText():this.parent},syncFont:function(i,h){h.font=this._font},syncStyle:function(i,h){h.textBaseline="alphabetic",h.fillStyle=this.color,h.strokeStyle=this.stroke,h.lineWidth=this.strokeThickness,h.lineCap="round",h.lineJoin="round"},syncShadow:function(i,h){h?(i.shadowOffsetX=this.shadowOffsetX,i.shadowOffsetY=this.shadowOffsetY,i.shadowColor=this.shadowColor,i.shadowBlur=this.shadowBlur):(i.shadowOffsetX=0,i.shadowOffsetY=0,i.shadowColor=0,i.shadowBlur=0)},update:function(i){return i&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=r(this)),this.parent.updateText()},setFont:function(i,h){h===void 0&&(h=!0);var s=i,l="",f="";if(typeof i!="string")s=o(i,"fontFamily","Courier"),l=o(i,"fontSize","16px"),f=o(i,"fontStyle","");else{var u=i.split(" "),d=0;f=u.length>2?u[d++]:"",l=u[d++]||"16px",s=u[d++]||"Courier"}return(s!==this.fontFamily||l!==this.fontSize||f!==this.fontStyle)&&(this.fontFamily=s,this.fontSize=l,this.fontStyle=f,h&&this.update(!0)),this.parent},setFontFamily:function(i){return this.fontFamily!==i&&(this.fontFamily=i,this.update(!0)),this.parent},setFontStyle:function(i){return this.fontStyle!==i&&(this.fontStyle=i,this.update(!0)),this.parent},setFontSize:function(i){return typeof i=="number"&&(i=i.toString()+"px"),this.fontSize!==i&&(this.fontSize=i,this.update(!0)),this.parent},setTestString:function(i){return this.testString=i,this.update(!0)},setFixedSize:function(i,h){return this.fixedWidth=i,this.fixedHeight=h,i&&(this.parent.width=i),h&&(this.parent.height=h),this.update(!1)},setBackgroundColor:function(i){return this.backgroundColor=i,this.update(!1)},setFill:function(i){return this.color=i,this.update(!1)},setColor:function(i){return this.color=i,this.update(!1)},setResolution:function(i){return this.resolution=i,this.update(!1)},setStroke:function(i,h){return h===void 0&&(h=this.strokeThickness),i===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==i||this.strokeThickness!==h)&&(this.stroke=i,this.strokeThickness=h,this.update(!0)),this.parent},setShadow:function(i,h,s,l,f,u){return i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s="#000"),l===void 0&&(l=0),f===void 0&&(f=!1),u===void 0&&(u=!0),this.shadowOffsetX=i,this.shadowOffsetY=h,this.shadowColor=s,this.shadowBlur=l,this.shadowStroke=f,this.shadowFill=u,this.update(!1)},setShadowOffset:function(i,h){return i===void 0&&(i=0),h===void 0&&(h=i),this.shadowOffsetX=i,this.shadowOffsetY=h,this.update(!1)},setShadowColor:function(i){return i===void 0&&(i="#000"),this.shadowColor=i,this.update(!1)},setShadowBlur:function(i){return i===void 0&&(i=0),this.shadowBlur=i,this.update(!1)},setShadowStroke:function(i){return this.shadowStroke=i,this.update(!1)},setShadowFill:function(i){return this.shadowFill=i,this.update(!1)},setWordWrapWidth:function(i,h){return h===void 0&&(h=!1),this.wordWrapWidth=i,this.wordWrapUseAdvanced=h,this.update(!1)},setWordWrapCallback:function(i,h){return h===void 0&&(h=null),this.wordWrapCallback=i,this.wordWrapCallbackScope=h,this.update(!1)},setAlign:function(i){return i===void 0&&(i="left"),this.align=i,this.update(!1)},setMaxLines:function(i){return i===void 0&&(i=0),this.maxLines=i,this.update(!1)},getTextMetrics:function(){var i=this.metrics;return{ascent:i.ascent,descent:i.descent,fontSize:i.fontSize}},toJSON:function(){var i={};for(var h in n)i[h]=this[h];return i.metrics=this.getTextMetrics(),i},destroy:function(){this.parent=void 0}});c.exports=e},34397:(c,m,t)=>{/** + */var o=t(83419),v=t(23568),a=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 o({initialize:function(h,s){this.parent=h,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(s,!1,!0)},setStyle:function(i,h,s){h===void 0&&(h=!0),s===void 0&&(s=!1),i&&i.hasOwnProperty("fontSize")&&typeof i.fontSize=="number"&&(i.fontSize=i.fontSize.toString()+"px");for(var l in n){var f=s?n[l][1]:this[l];l==="wordWrapCallback"||l==="wordWrapCallbackScope"?this[l]=a(i,n[l][0],f):this[l]=v(i,n[l][0],f)}var u=a(i,"font",null);u!==null&&this.setFont(u,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var d=a(i,"fill",null);d!==null&&(this.color=d);var p=a(i,"metrics",!1);return p?this.metrics={ascent:a(p,"ascent",0),descent:a(p,"descent",0),fontSize:a(p,"fontSize",0)}:(h||!this.metrics)&&(this.metrics=r(this)),h?this.parent.updateText():this.parent},syncFont:function(i,h){h.font=this._font},syncStyle:function(i,h){h.textBaseline="alphabetic",h.fillStyle=this.color,h.strokeStyle=this.stroke,h.lineWidth=this.strokeThickness,h.lineCap="round",h.lineJoin="round"},syncShadow:function(i,h){h?(i.shadowOffsetX=this.shadowOffsetX,i.shadowOffsetY=this.shadowOffsetY,i.shadowColor=this.shadowColor,i.shadowBlur=this.shadowBlur):(i.shadowOffsetX=0,i.shadowOffsetY=0,i.shadowColor=0,i.shadowBlur=0)},update:function(i){return i&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=r(this)),this.parent.updateText()},setFont:function(i,h){h===void 0&&(h=!0);var s=i,l="",f="";if(typeof i!="string")s=a(i,"fontFamily","Courier"),l=a(i,"fontSize","16px"),f=a(i,"fontStyle","");else{var u=i.split(" "),d=0;f=u.length>2?u[d++]:"",l=u[d++]||"16px",s=u[d++]||"Courier"}return(s!==this.fontFamily||l!==this.fontSize||f!==this.fontStyle)&&(this.fontFamily=s,this.fontSize=l,this.fontStyle=f,h&&this.update(!0)),this.parent},setFontFamily:function(i){return this.fontFamily!==i&&(this.fontFamily=i,this.update(!0)),this.parent},setFontStyle:function(i){return this.fontStyle!==i&&(this.fontStyle=i,this.update(!0)),this.parent},setFontSize:function(i){return typeof i=="number"&&(i=i.toString()+"px"),this.fontSize!==i&&(this.fontSize=i,this.update(!0)),this.parent},setTestString:function(i){return this.testString=i,this.update(!0)},setFixedSize:function(i,h){return this.fixedWidth=i,this.fixedHeight=h,i&&(this.parent.width=i),h&&(this.parent.height=h),this.update(!1)},setBackgroundColor:function(i){return this.backgroundColor=i,this.update(!1)},setFill:function(i){return this.color=i,this.update(!1)},setColor:function(i){return this.color=i,this.update(!1)},setResolution:function(i){return this.resolution=i,this.update(!1)},setStroke:function(i,h){return h===void 0&&(h=this.strokeThickness),i===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==i||this.strokeThickness!==h)&&(this.stroke=i,this.strokeThickness=h,this.update(!0)),this.parent},setShadow:function(i,h,s,l,f,u){return i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s="#000"),l===void 0&&(l=0),f===void 0&&(f=!1),u===void 0&&(u=!0),this.shadowOffsetX=i,this.shadowOffsetY=h,this.shadowColor=s,this.shadowBlur=l,this.shadowStroke=f,this.shadowFill=u,this.update(!1)},setShadowOffset:function(i,h){return i===void 0&&(i=0),h===void 0&&(h=i),this.shadowOffsetX=i,this.shadowOffsetY=h,this.update(!1)},setShadowColor:function(i){return i===void 0&&(i="#000"),this.shadowColor=i,this.update(!1)},setShadowBlur:function(i){return i===void 0&&(i=0),this.shadowBlur=i,this.update(!1)},setShadowStroke:function(i){return this.shadowStroke=i,this.update(!1)},setShadowFill:function(i){return this.shadowFill=i,this.update(!1)},setWordWrapWidth:function(i,h){return h===void 0&&(h=!1),this.wordWrapWidth=i,this.wordWrapUseAdvanced=h,this.update(!1)},setWordWrapCallback:function(i,h){return h===void 0&&(h=null),this.wordWrapCallback=i,this.wordWrapCallbackScope=h,this.update(!1)},setAlign:function(i){return i===void 0&&(i="left"),this.align=i,this.update(!1)},setMaxLines:function(i){return i===void 0&&(i=0),this.maxLines=i,this.update(!1)},getTextMetrics:function(){var i=this.metrics;return{ascent:i.ascent,descent:i.descent,fontSize:i.fontSize}},toJSON:function(){var i={};for(var h in n)i[h]=this[h];return i.metrics=this.getTextMetrics(),i},destroy:function(){this.parent=void 0}});c.exports=e},34397:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70554),v=function(o,r,n,e){if(!(r.width===0||r.height===0)){n.addToRenderList(r);var i=r.frame,h=i.width,s=i.height,l=a.getTintAppendFloatAlpha,f=o.pipelines.set(r.pipeline,r),u=f.setTexture2D(i.glTexture,r);f.batchTexture(r,i.glTexture,h,s,r.x,r.y,h/r.style.resolution,s/r.style.resolution,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.displayOriginX,r.displayOriginY,0,0,h,s,l(r.tintTopLeft,n.alpha*r._alphaTL),l(r.tintTopRight,n.alpha*r._alphaTR),l(r.tintBottomLeft,n.alpha*r._alphaBL),l(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,0,0,n,e,!1,u)}};c.exports=v},20839:(c,m,t)=>{/** + */var o=t(70554),v=function(a,r,n,e){if(!(r.width===0||r.height===0)){n.addToRenderList(r);var i=r.frame,h=i.width,s=i.height,l=o.getTintAppendFloatAlpha,f=a.pipelines.set(r.pipeline,r),u=f.setTexture2D(i.glTexture,r);f.batchTexture(r,i.glTexture,h,s,r.x,r.y,h/r.style.resolution,s/r.style.resolution,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.displayOriginX,r.displayOriginY,0,0,h,s,l(r.tintTopLeft,n.alpha*r._alphaTL),l(r.tintTopRight,n.alpha*r._alphaTR),l(r.tintBottomLeft,n.alpha*r._alphaBL),l(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,0,0,n,e,!1,u)}};c.exports=v},20839:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(27919),v=t(83419),o=t(31401),r=t(95643),n=t(98439),e=t(68703),i=t(56295),h=t(45650),s=t(26099),l=8,f=new v({Extends:r,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,i],initialize:function(d,p,g,y,x,T,C){var M=d.sys.renderer;r.call(this,d,"TileSprite");var w=d.sys.textures.get(T),L=w.get(C);L.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),w=d.sys.textures.get("__MISSING"),L=w.get()),w.type==="DynamicTexture"&&(console.warn("TileSprite cannot use Dynamic Texture"),w=d.sys.textures.get("__MISSING"),L=w.get()),!y||!x?(y=L.width,x=L.height):(y=Math.floor(y),x=Math.floor(x)),this._tilePosition=new s,this._tileScale=new s(1,1),this.dirty=!1,this.renderer=M,this.canvas=a.create(this,y,x),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=w,this.displayFrame=L,this._crop=this.resetCropObject(),this._textureKey=h(),this.texture=d.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=n(L.width),this.potHeight=n(L.height),this.fillCanvas=a.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(p,g),this.setSize(y,x),this.setFrame(C),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(u,d){return this.displayTexture=this.scene.sys.textures.get(u),this.setFrame(d)},setFrame:function(u){var d=this.displayTexture.get(u);return this.potWidth=n(d.width),this.potHeight=n(d.height),this.canvas.width=0,!d.cutWidth||!d.cutHeight?this.renderFlags&=~l:this.renderFlags|=l,this.displayFrame=d,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(u,d){return u!==void 0&&(this.tilePositionX=u),d!==void 0&&(this.tilePositionY=d),this},setTileScale:function(u,d){return u===void 0&&(u=this.tileScaleX),d===void 0&&(d=u),this.tileScaleX=u,this.tileScaleY=d,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 d=this.fillContext,p=this.fillCanvas,g=this.potWidth,y=this.potHeight;(!this.renderer||!this.renderer.gl)&&(g=u.cutWidth,y=u.cutHeight),d.clearRect(0,0,g,y),p.width=g,p.height=y,d.drawImage(u.source.image,u.cutX,u.cutY,u.cutWidth,u.cutHeight,0,0,g,y),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(p,this.fillPattern):this.fillPattern=d.createPattern(p,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var 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 d=this.context;this.scene.sys.game.config.antialias||e.disable(d);var p=this._tileScale.x,g=this._tileScale.y,y=this._tilePosition.x,x=this._tilePosition.y;d.clearRect(0,0,this.width,this.height),d.save(),d.scale(p,g),d.translate(-y,-x),d.fillStyle=this.fillPattern,d.fillRect(y,x,this.width/p,this.height/g),d.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),a.remove(this.canvas),a.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}}});c.exports=f},46992:c=>{/** + */var o=t(27919),v=t(83419),a=t(31401),r=t(95643),n=t(98439),e=t(68703),i=t(56295),h=t(45650),s=t(26099),l=8,f=new v({Extends:r,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Crop,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.PostPipeline,a.ScrollFactor,a.Tint,a.Transform,a.Visible,i],initialize:function(d,p,g,y,x,C,P){var M=d.sys.renderer;r.call(this,d,"TileSprite");var w=d.sys.textures.get(C),I=w.get(P);I.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),w=d.sys.textures.get("__MISSING"),I=w.get()),w.type==="DynamicTexture"&&(console.warn("TileSprite cannot use Dynamic Texture"),w=d.sys.textures.get("__MISSING"),I=w.get()),!y||!x?(y=I.width,x=I.height):(y=Math.floor(y),x=Math.floor(x)),this._tilePosition=new s,this._tileScale=new s(1,1),this.dirty=!1,this.renderer=M,this.canvas=o.create(this,y,x),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=w,this.displayFrame=I,this._crop=this.resetCropObject(),this._textureKey=h(),this.texture=d.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=n(I.width),this.potHeight=n(I.height),this.fillCanvas=o.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(p,g),this.setSize(y,x),this.setFrame(P),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(u,d){return this.displayTexture=this.scene.sys.textures.get(u),this.setFrame(d)},setFrame:function(u){var d=this.displayTexture.get(u);return this.potWidth=n(d.width),this.potHeight=n(d.height),this.canvas.width=0,!d.cutWidth||!d.cutHeight?this.renderFlags&=~l:this.renderFlags|=l,this.displayFrame=d,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(u,d){return u!==void 0&&(this.tilePositionX=u),d!==void 0&&(this.tilePositionY=d),this},setTileScale:function(u,d){return u===void 0&&(u=this.tileScaleX),d===void 0&&(d=u),this.tileScaleX=u,this.tileScaleY=d,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 d=this.fillContext,p=this.fillCanvas,g=this.potWidth,y=this.potHeight;(!this.renderer||!this.renderer.gl)&&(g=u.cutWidth,y=u.cutHeight),d.clearRect(0,0,g,y),p.width=g,p.height=y,d.drawImage(u.source.image,u.cutX,u.cutY,u.cutWidth,u.cutHeight,0,0,g,y),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(p,this.fillPattern):this.fillPattern=d.createPattern(p,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var 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 d=this.context;this.scene.sys.game.config.antialias||e.disable(d);var p=this._tileScale.x,g=this._tileScale.y,y=this._tilePosition.x,x=this._tilePosition.y;d.clearRect(0,0,this.width,this.height),d.save(),d.scale(p,g),d.translate(-y,-x),d.fillStyle=this.fillPattern,d.fillRect(y,x,this.width/p,this.height/g),d.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),o.remove(this.canvas),o.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}}});c.exports=f},46992:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){a.updateCanvas(),v.addToRenderList(a),t.batchSprite(a,a.frame,v,o)};c.exports=m},14167:(c,m,t)=>{/** + */var m=function(t,o,v,a){o.updateCanvas(),v.addToRenderList(o),t.batchSprite(o,o.frame,v,a)};c.exports=m},14167:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(20839);v.register("tileSprite",function(n,e){n===void 0&&(n={});var i=o(n,"x",0),h=o(n,"y",0),s=o(n,"width",512),l=o(n,"height",512),f=o(n,"key",""),u=o(n,"frame",""),d=new r(this.scene,i,h,s,l,f,u);return e!==void 0&&(n.add=e),a(this.scene,d,n),d})},91681:(c,m,t)=>{/** + */var o=t(25305),v=t(44603),a=t(23568),r=t(20839);v.register("tileSprite",function(n,e){n===void 0&&(n={});var i=a(n,"x",0),h=a(n,"y",0),s=a(n,"width",512),l=a(n,"height",512),f=a(n,"key",""),u=a(n,"frame",""),d=new r(this.scene,i,h,s,l,f,u);return e!==void 0&&(n.add=e),o(this.scene,d,n),d})},91681:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20839),v=t(39429);v.register("tileSprite",function(o,r,n,e,i,h){return this.displayList.add(new a(this.scene,o,r,n,e,i,h))})},56295:(c,m,t)=>{/** + */var o=t(20839),v=t(39429);v.register("tileSprite",function(a,r,n,e,i,h){return this.displayList.add(new o(this.scene,a,r,n,e,i,h))})},56295:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(18553),o=t(46992),c.exports={renderWebGL:v,renderCanvas:o}},18553:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(18553),a=t(46992),c.exports={renderWebGL:v,renderCanvas:a}},18553:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70554),v=function(o,r,n,e){r.updateCanvas();var i=r.width,h=r.height;if(!(i===0||h===0)){n.addToRenderList(r);var s=a.getTintAppendFloatAlpha,l=o.pipelines.set(r.pipeline,r),f=l.setTexture2D(r.fillPattern,r);l.batchTexture(r,r.fillPattern,r.displayFrame.width*r.tileScaleX,r.displayFrame.height*r.tileScaleY,r.x,r.y,i,h,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.originX*i,r.originY*h,0,0,i,h,s(r.tintTopLeft,n.alpha*r._alphaTL),s(r.tintTopRight,n.alpha*r._alphaTR),s(r.tintBottomLeft,n.alpha*r._alphaBL),s(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,f)}};c.exports=v},18471:(c,m,t)=>{/** + */var o=t(70554),v=function(a,r,n,e){r.updateCanvas();var i=r.width,h=r.height;if(!(i===0||h===0)){n.addToRenderList(r);var s=o.getTintAppendFloatAlpha,l=a.pipelines.set(r.pipeline,r),f=l.setTexture2D(r.fillPattern,r);l.batchTexture(r,r.fillPattern,r.displayFrame.width*r.tileScaleX,r.displayFrame.height*r.tileScaleY,r.x,r.y,i,h,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.originX*i,r.originY*h,0,0,i,h,s(r.tintTopLeft,n.alpha*r._alphaTL),s(r.tintTopRight,n.alpha*r._alphaTR),s(r.tintBottomLeft,n.alpha*r._alphaBL),s(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,f)}};c.exports=v},18471:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(31401),r=t(51708),n=t(8443),e=t(95643),i=t(36383),h=t(14463),s=t(45650),l=t(10247),f=new v({Extends:e,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.TextureCrop,o.Tint,o.Transform,o.Visible,l],initialize:function(d,p,g,y){e.call(this,d,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=s(),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._rfvCallbackId=0;var x=d.sys.game;this._device=x.device.video,this.setPosition(p,g),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 T=d.sys.sound;T&&T.on(h.GLOBAL_MUTE,this.globalMute,this),y&&this.load(y)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(u){var d=this.scene.sys.cache.video.get(u);return d?(this.cacheKey=u,this.loadHandler(d.url,d.noAudio,d.crossOrigin)):console.warn("No video in cache for key: "+u),this},changeSource:function(u,d,p,g,y){d===void 0&&(d=!0),p===void 0&&(p=!1),this.cacheKey!==u&&(this.load(u),d&&this.play(p,g,y))},getVideoKey:function(){return this.cacheKey},loadURL:function(u,d,p){d===void 0&&(d=!1);var g=this._device.getVideoURL(u);return g?(this.cacheKey="",this.loadHandler(g.url,d,p)):console.warn("No supported video format found for "+u),this},loadMediaStream:function(u,d,p){return this.loadHandler(null,d,p,u)},loadHandler:function(u,d,p,g){d||(d=!1);var y=this.video;if(y?(this.removeLoadEventHandlers(),this.stop()):(y=document.createElement("video"),y.controls=!1,y.setAttribute("playsinline","playsinline"),y.setAttribute("preload","auto"),y.setAttribute("disablePictureInPicture","true")),d?(y.muted=!0,y.defaultMuted=!0,y.setAttribute("autoplay","autoplay")):(y.muted=!1,y.defaultMuted=!1,y.removeAttribute("autoplay")),p?y.setAttribute("crossorigin",p):y.removeAttribute("crossorigin"),g)if("srcObject"in y)try{y.srcObject=g}catch(T){if(T.name!=="TypeError")throw T;y.src=URL.createObjectURL(g)}else y.src=URL.createObjectURL(g);else y.src=u;this.retry=0,this.video=y,this._playCalled=!1,y.load(),this.addLoadEventHandlers();var x=this.scene.sys.textures.get(this._key);return this.setTexture(x),this},requestVideoFrame:function(u,d){var p=this.video;if(p){var g=d.width,y=d.height,x=this.videoTexture,T=this.videoTextureSource,C=!x||T.source!==p;C?(this._codePaused=p.paused,this._codeMuted=p.muted,x?(T.source=p,T.width=g,T.height=y,x.get().setSize(g,y)):(x=this.scene.sys.textures.create(this._key,p,g,y),x.add("__BASE",0,0,0,g,y),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()):T.update(),this.isStalled=!1,this.metadata=d;var M=d.mediaTime;C&&(this._lastUpdate=M,this.emit(r.VIDEO_CREATED,this,g,y),this.frameReady||(this.frameReady=!0,this.emit(r.VIDEO_PLAY,this))),this._playingMarker?M>=this._markerOut&&(p.loop?(p.currentTime=this._markerIn,this.emit(r.VIDEO_LOOP,this)):(this.stop(!1),this.emit(r.VIDEO_COMPLETE,this))):M-1&&p>d&&p=0&&!isNaN(p)&&p>d&&(this.markers[u]=[d,p]),this},playMarker:function(u,d){var p=this.markers[u];return p&&this.play(d,p[0],p[1]),this},removeMarker:function(u){return delete this.markers[u],this},snapshot:function(u,d){return u===void 0&&(u=this.width),d===void 0&&(d=this.height),this.snapshotArea(0,0,this.width,this.height,u,d)},snapshotArea:function(u,d,p,g,y,x){u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=this.width),g===void 0&&(g=this.height),y===void 0&&(y=p),x===void 0&&(x=g);var T=this.video,C=this.snapshotTexture;return C?(C.setSize(y,x),T&&C.context.drawImage(T,u,d,p,g,0,0,y,x)):(C=this.scene.sys.textures.createCanvas(s(),y,x),this.snapshotTexture=C,T&&C.context.drawImage(T,u,d,p,g,0,0,y,x)),C.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 d=u.name;d==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(r.VIDEO_LOCKED,this)):d==="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 d=this.input;return d&&!d.customHitArea&&(d.hitArea.width=this.width,d.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,d){var p=this.video;!p||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=d,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(u){var d=this.video;if(d){var p=d.duration;if(p!==1/0&&!isNaN(p)){var g=p*u;this.setCurrentTime(g)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(u){var d=this.video;if(d){if(typeof u=="string"){var p=u[0],g=parseFloat(u.substr(1));p==="+"?u=d.currentTime+g:p==="-"&&(u=d.currentTime-g)}d.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 d=u.duration;if(d!==1/0&&!isNaN(d))return u.currentTime/d}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(u){u===void 0&&(u=!0),this._codeMuted=u;var d=this.video;return d&&(d.muted=this._systemMuted?!0:u),this},isMuted:function(){return this._codeMuted},globalMute:function(u,d){this._systemMuted=d;var p=this.video;p&&(p.muted=this._codeMuted?!0:d)},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 d=this.video;return this._codePaused=u,d&&!d.ended&&(u?d.paused||(this.removeEventHandlers(),d.pause()):u||(this._playCalled?d.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=a(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,d){return d===void 0&&(d=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,u),this.videoTextureSource.setFlipY(d)),this._key=u,this.flipY=d,!!this.videoTexture},stop:function(u){u===void 0&&(u=!0);var d=this.video;return d&&(this.removeEventHandlers(),d.cancelVideoFrameCallback(this._rfvCallbackId),d.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 d=this.scene.sys.sound;d&&d.off(h.GLOBAL_MUTE,this.globalMute,this)}});c.exports=f},58352:c=>{/** + */var o=t(45319),v=t(83419),a=t(31401),r=t(51708),n=t(8443),e=t(95643),i=t(36383),h=t(14463),s=t(45650),l=t(10247),f=new v({Extends:e,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.PostPipeline,a.ScrollFactor,a.TextureCrop,a.Tint,a.Transform,a.Visible,l],initialize:function(d,p,g,y){e.call(this,d,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=s(),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._rfvCallbackId=0;var x=d.sys.game;this._device=x.device.video,this.setPosition(p,g),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 C=d.sys.sound;C&&C.on(h.GLOBAL_MUTE,this.globalMute,this),y&&this.load(y)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(u){var d=this.scene.sys.cache.video.get(u);return d?(this.cacheKey=u,this.loadHandler(d.url,d.noAudio,d.crossOrigin)):console.warn("No video in cache for key: "+u),this},changeSource:function(u,d,p,g,y){d===void 0&&(d=!0),p===void 0&&(p=!1),this.cacheKey!==u&&(this.load(u),d&&this.play(p,g,y))},getVideoKey:function(){return this.cacheKey},loadURL:function(u,d,p){d===void 0&&(d=!1);var g=this._device.getVideoURL(u);return g?(this.cacheKey="",this.loadHandler(g.url,d,p)):console.warn("No supported video format found for "+u),this},loadMediaStream:function(u,d,p){return this.loadHandler(null,d,p,u)},loadHandler:function(u,d,p,g){d||(d=!1);var y=this.video;if(y?(this.removeLoadEventHandlers(),this.stop()):(y=document.createElement("video"),y.controls=!1,y.setAttribute("playsinline","playsinline"),y.setAttribute("preload","auto"),y.setAttribute("disablePictureInPicture","true")),d?(y.muted=!0,y.defaultMuted=!0,y.setAttribute("autoplay","autoplay")):(y.muted=!1,y.defaultMuted=!1,y.removeAttribute("autoplay")),p?y.setAttribute("crossorigin",p):y.removeAttribute("crossorigin"),g)if("srcObject"in y)try{y.srcObject=g}catch(C){if(C.name!=="TypeError")throw C;y.src=URL.createObjectURL(g)}else y.src=URL.createObjectURL(g);else y.src=u;this.retry=0,this.video=y,this._playCalled=!1,y.load(),this.addLoadEventHandlers();var x=this.scene.sys.textures.get(this._key);return this.setTexture(x),this},requestVideoFrame:function(u,d){var p=this.video;if(p){var g=d.width,y=d.height,x=this.videoTexture,C=this.videoTextureSource,P=!x||C.source!==p;P?(this._codePaused=p.paused,this._codeMuted=p.muted,x?(C.source=p,C.width=g,C.height=y,x.get().setSize(g,y)):(x=this.scene.sys.textures.create(this._key,p,g,y),x.add("__BASE",0,0,0,g,y),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()):C.update(),this.isStalled=!1,this.metadata=d;var M=d.mediaTime;P&&(this._lastUpdate=M,this.emit(r.VIDEO_CREATED,this,g,y),this.frameReady||(this.frameReady=!0,this.emit(r.VIDEO_PLAY,this))),this._playingMarker?M>=this._markerOut&&(p.loop?(p.currentTime=this._markerIn,this.emit(r.VIDEO_LOOP,this)):(this.stop(!1),this.emit(r.VIDEO_COMPLETE,this))):M-1&&p>d&&p=0&&!isNaN(p)&&p>d&&(this.markers[u]=[d,p]),this},playMarker:function(u,d){var p=this.markers[u];return p&&this.play(d,p[0],p[1]),this},removeMarker:function(u){return delete this.markers[u],this},snapshot:function(u,d){return u===void 0&&(u=this.width),d===void 0&&(d=this.height),this.snapshotArea(0,0,this.width,this.height,u,d)},snapshotArea:function(u,d,p,g,y,x){u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=this.width),g===void 0&&(g=this.height),y===void 0&&(y=p),x===void 0&&(x=g);var C=this.video,P=this.snapshotTexture;return P?(P.setSize(y,x),C&&P.context.drawImage(C,u,d,p,g,0,0,y,x)):(P=this.scene.sys.textures.createCanvas(s(),y,x),this.snapshotTexture=P,C&&P.context.drawImage(C,u,d,p,g,0,0,y,x)),P.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 d=u.name;d==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(r.VIDEO_LOCKED,this)):d==="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 d=this.input;return d&&!d.customHitArea&&(d.hitArea.width=this.width,d.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,d){var p=this.video;!p||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=d,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(u){var d=this.video;if(d){var p=d.duration;if(p!==1/0&&!isNaN(p)){var g=p*u;this.setCurrentTime(g)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(u){var d=this.video;if(d){if(typeof u=="string"){var p=u[0],g=parseFloat(u.substr(1));p==="+"?u=d.currentTime+g:p==="-"&&(u=d.currentTime-g)}d.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 d=u.duration;if(d!==1/0&&!isNaN(d))return u.currentTime/d}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(u){u===void 0&&(u=!0),this._codeMuted=u;var d=this.video;return d&&(d.muted=this._systemMuted?!0:u),this},isMuted:function(){return this._codeMuted},globalMute:function(u,d){this._systemMuted=d;var p=this.video;p&&(p.muted=this._codeMuted?!0:d)},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 d=this.video;return this._codePaused=u,d&&!d.ended&&(u?d.paused||(this.removeEventHandlers(),d.pause()):u||(this._playCalled?d.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=o(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,d){return d===void 0&&(d=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,u),this.videoTextureSource.setFlipY(d)),this._key=u,this.flipY=d,!!this.videoTexture},stop:function(u){u===void 0&&(u=!0);var d=this.video;return d&&(this.removeEventHandlers(),d.cancelVideoFrameCallback(this._rfvCallbackId),d.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 d=this.scene.sys.sound;d&&d.off(h.GLOBAL_MUTE,this.globalMute,this)}});c.exports=f},58352:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){a.videoTexture&&(v.addToRenderList(a),t.batchSprite(a,a.frame,v,o))};c.exports=m},11511:(c,m,t)=>{/** + */var m=function(t,o,v,a){o.videoTexture&&(v.addToRenderList(o),t.batchSprite(o,o.frame,v,a))};c.exports=m},11511:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(18471);v.register("video",function(n,e){n===void 0&&(n={});var i=o(n,"key",null),h=new r(this.scene,0,0,i);return e!==void 0&&(n.add=e),a(this.scene,h,n),h})},89025:(c,m,t)=>{/** + */var o=t(25305),v=t(44603),a=t(23568),r=t(18471);v.register("video",function(n,e){n===void 0&&(n={});var i=a(n,"key",null),h=new r(this.scene,0,0,i);return e!==void 0&&(n.add=e),o(this.scene,h,n),h})},89025:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(18471),v=t(39429);v.register("video",function(o,r,n){return this.displayList.add(new a(this.scene,o,r,n))})},10247:(c,m,t)=>{/** + */var o=t(18471),v=t(39429);v.register("video",function(a,r,n){return this.displayList.add(new o(this.scene,a,r,n))})},10247:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(29849),o=t(58352),c.exports={renderWebGL:v,renderCanvas:o}},29849:c=>{/** + */var o=t(29747),v=o,a=o;v=t(29849),a=t(58352),c.exports={renderWebGL:v,renderCanvas:a}},29849:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){a.videoTexture&&(v.addToRenderList(a),a.pipeline.batchSprite(a,v,o))};c.exports=m},41481:(c,m,t)=>{/** + */var m=function(t,o,v,a){o.videoTexture&&(v.addToRenderList(o),o.pipeline.batchSprite(o,v,a))};c.exports=m},41481:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10312),v=t(96503),o=t(87902),r=t(83419),n=t(31401),e=t(95643),i=t(87841),h=t(37303),s=new r({Extends:e,Mixins:[n.Depth,n.GetBounds,n.Origin,n.Transform,n.ScrollFactor,n.Visible],initialize:function(f,u,d,p,g){p===void 0&&(p=1),g===void 0&&(g=p),e.call(this,f,"Zone"),this.setPosition(u,d),this.width=p,this.height=g,this.blendMode=a.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(l){this.scaleX=l/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(l){this.scaleY=l/this.height}},setSize:function(l,f,u){u===void 0&&(u=!0),this.width=l,this.height=f,this.updateDisplayOrigin();var d=this.input;return u&&d&&!d.customHitArea&&(d.hitArea.width=l,d.hitArea.height=f),this},setDisplaySize:function(l,f){return this.displayWidth=l,this.displayHeight=f,this},setCircleDropZone:function(l){return this.setDropZone(new v(0,0,l),o)},setRectangleDropZone:function(l,f){return this.setDropZone(new i(0,0,l,f),h)},setDropZone:function(l,f){return this.input||this.setInteractive(l,f,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(l,f,u){u.addToRenderList(f)},renderWebGL:function(l,f,u){u.addToRenderList(f)}});c.exports=s},95261:(c,m,t)=>{/** + */var o=t(10312),v=t(96503),a=t(87902),r=t(83419),n=t(31401),e=t(95643),i=t(87841),h=t(37303),s=new r({Extends:e,Mixins:[n.Depth,n.GetBounds,n.Origin,n.Transform,n.ScrollFactor,n.Visible],initialize:function(f,u,d,p,g){p===void 0&&(p=1),g===void 0&&(g=p),e.call(this,f,"Zone"),this.setPosition(u,d),this.width=p,this.height=g,this.blendMode=o.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(l){this.scaleX=l/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(l){this.scaleY=l/this.height}},setSize:function(l,f,u){u===void 0&&(u=!0),this.width=l,this.height=f,this.updateDisplayOrigin();var d=this.input;return u&&d&&!d.customHitArea&&(d.hitArea.width=l,d.hitArea.height=f),this},setDisplaySize:function(l,f){return this.displayWidth=l,this.displayHeight=f,this},setCircleDropZone:function(l){return this.setDropZone(new v(0,0,l),a)},setRectangleDropZone:function(l,f){return this.setDropZone(new i(0,0,l,f),h)},setDropZone:function(l,f){return this.input||this.setInteractive(l,f,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(l,f,u){u.addToRenderList(f)},renderWebGL:function(l,f,u){u.addToRenderList(f)}});c.exports=s},95261:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(44603),v=t(23568),o=t(41481);a.register("zone",function(r){var n=v(r,"x",0),e=v(r,"y",0),i=v(r,"width",1),h=v(r,"height",i);return new o(this.scene,n,e,i,h)})},84175:(c,m,t)=>{/** + */var o=t(44603),v=t(23568),a=t(41481);o.register("zone",function(r){var n=v(r,"x",0),e=v(r,"y",0),i=v(r,"width",1),h=v(r,"height",i);return new a(this.scene,n,e,i,h)})},84175:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41481),v=t(39429);v.register("zone",function(o,r,n,e){return this.displayList.add(new a(this.scene,o,r,n,e))})},95166:c=>{/** + */var o=t(41481),v=t(39429);v.register("zone",function(a,r,n,e){return this.displayList.add(new o(this.scene,a,r,n,e))})},95166:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2223,7 +2223,7 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(87902),o=t(26241),r=t(79124),n=t(23777),e=t(28176),i=new a({initialize:function(s,l,f){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),this.type=n.CIRCLE,this.x=s,this.y=l,this._radius=f,this._diameter=f*2},contains:function(h,s){return v(this,h,s)},getPoint:function(h,s){return o(this,h,s)},getPoints:function(h,s,l){return r(this,h,s,l)},getRandomPoint:function(h){return e(this,h)},setTo:function(h,s,l){return this.x=h,this.y=s,this._radius=l,this._diameter=l*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(h,s){return s===void 0&&(s=h),this.x=h,this.y=s,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(h){this._radius=h,this._diameter=h*2}},diameter:{get:function(){return this._diameter},set:function(h){this._diameter=h,this._radius=h*.5}},left:{get:function(){return this.x-this._radius},set:function(h){this.x=h+this._radius}},right:{get:function(){return this.x+this._radius},set:function(h){this.x=h-this._radius}},top:{get:function(){return this.y-this._radius},set:function(h){this.y=h+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(h){this.y=h-this._radius}}});c.exports=i},71562:c=>{/** + */var o=t(83419),v=t(87902),a=t(26241),r=t(79124),n=t(23777),e=t(28176),i=new o({initialize:function(s,l,f){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),this.type=n.CIRCLE,this.x=s,this.y=l,this._radius=f,this._diameter=f*2},contains:function(h,s){return v(this,h,s)},getPoint:function(h,s){return a(this,h,s)},getPoints:function(h,s,l){return r(this,h,s,l)},getRandomPoint:function(h){return e(this,h)},setTo:function(h,s,l){return this.x=h,this.y=s,this._radius=l,this._diameter=l*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(h,s){return s===void 0&&(s=h),this.x=h,this.y=s,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(h){this._radius=h,this._diameter=h*2}},diameter:{get:function(){return this._diameter},set:function(h){this._diameter=h,this._radius=h*.5}},left:{get:function(){return this.x-this._radius},set:function(h){this.x=h+this._radius}},right:{get:function(){return this.x+this._radius},set:function(h){this.x=h-this._radius}},top:{get:function(){return this.y-this._radius},set:function(h){this.y=h+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(h){this.y=h-this._radius}}});c.exports=i},71562:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2231,59 +2231,59 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r,n){return n===void 0&&(n=new a),n.x=o.x+o.radius*Math.cos(r),n.y=o.y+o.radius*Math.sin(r),n};c.exports=v},42250:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r,n){return n===void 0&&(n=new o),n.x=a.x+a.radius*Math.cos(r),n.y=a.y+a.radius*Math.sin(r),n};c.exports=v},42250:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(96503),v=function(o){return new a(o.x,o.y,o.radius)};c.exports=v},87902:c=>{/** + */var o=t(96503),v=function(a){return new o(a.x,a.y,a.radius)};c.exports=v},87902:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(t.radius>0&&a>=t.left&&a<=t.right&&v>=t.top&&v<=t.bottom){var o=(t.x-a)*(t.x-a),r=(t.y-v)*(t.y-v);return o+r<=t.radius*t.radius}else return!1};c.exports=m},5698:(c,m,t)=>{/** + */var m=function(t,o,v){if(t.radius>0&&o>=t.left&&o<=t.right&&v>=t.top&&v<=t.bottom){var a=(t.x-o)*(t.x-o),r=(t.y-v)*(t.y-v);return a+r<=t.radius*t.radius}else return!1};c.exports=m},5698:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87902),v=function(o,r){return a(o,r.x,r.y)};c.exports=v},70588:(c,m,t)=>{/** + */var o=t(87902),v=function(a,r){return o(a,r.x,r.y)};c.exports=v},70588:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87902),v=function(o,r){return a(o,r.x,r.y)&&a(o,r.right,r.y)&&a(o,r.x,r.bottom)&&a(o,r.right,r.bottom)};c.exports=v},26394:c=>{/** + */var o=t(87902),v=function(a,r){return o(a,r.x,r.y)&&o(a,r.right,r.y)&&o(a,r.x,r.bottom)&&o(a,r.right,r.bottom)};c.exports=v},26394:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.setTo(t.x,t.y,t.radius)};c.exports=m},76278:c=>{/** + */var m=function(t,o){return o.setTo(t.x,t.y,t.radius)};c.exports=m},76278:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x===a.x&&t.y===a.y&&t.radius===a.radius};c.exports=m},2074:(c,m,t)=>{/** + */var m=function(t,o){return t.x===o.x&&t.y===o.y&&t.radius===o.radius};c.exports=m},2074:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=function(o,r){return r===void 0&&(r=new a),r.x=o.left,r.y=o.top,r.width=o.diameter,r.height=o.diameter,r};c.exports=v},26241:(c,m,t)=>{/** + */var o=t(87841),v=function(a,r){return r===void 0&&(r=new o),r.x=a.left,r.y=a.top,r.width=a.diameter,r.height=a.diameter,r};c.exports=v},26241:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(92110),v=t(62945),o=t(36383),r=t(2141),n=function(e,i,h){h===void 0&&(h=new r);var s=v(i,0,o.PI2);return a(e,s,h)};c.exports=n},79124:(c,m,t)=>{/** + */var o=t(92110),v=t(62945),a=t(36383),r=t(2141),n=function(e,i,h){h===void 0&&(h=new r);var s=v(i,0,a.PI2);return o(e,s,h)};c.exports=n},79124:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(71562),v=t(92110),o=t(62945),r=t(36383),n=function(e,i,h,s){s===void 0&&(s=[]),!i&&h>0&&(i=a(e)/h);for(var l=0;l{/** + */var o=t(71562),v=t(92110),a=t(62945),r=t(36383),n=function(e,i,h,s){s===void 0&&(s=[]),!i&&h>0&&(i=o(e)/h);for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t.x+=a,t.y+=v,t};c.exports=m},39212:c=>{/** + */var m=function(t,o,v){return t.x+=o,t.y+=v,t};c.exports=m},39212:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x+=a.x,t.y+=a.y,t};c.exports=m},28176:(c,m,t)=>{/** + */var m=function(t,o){return t.x+=o.x,t.y+=o.y,t};c.exports=m},28176:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){r===void 0&&(r=new a);var n=2*Math.PI*Math.random(),e=Math.random()+Math.random(),i=e>1?2-e:e,h=i*Math.cos(n),s=i*Math.sin(n);return r.x=o.x+h*o.radius,r.y=o.y+s*o.radius,r};c.exports=v},88911:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r){r===void 0&&(r=new o);var n=2*Math.PI*Math.random(),e=Math.random()+Math.random(),i=e>1?2-e:e,h=i*Math.cos(n),s=i*Math.sin(n);return r.x=a.x+h*a.radius,r.y=a.y+s*a.radius,r};c.exports=v},88911:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(96503);a.Area=t(95166),a.Circumference=t(71562),a.CircumferencePoint=t(92110),a.Clone=t(42250),a.Contains=t(87902),a.ContainsPoint=t(5698),a.ContainsRect=t(70588),a.CopyFrom=t(26394),a.Equals=t(76278),a.GetBounds=t(2074),a.GetPoint=t(26241),a.GetPoints=t(79124),a.Offset=t(50884),a.OffsetPoint=t(39212),a.Random=t(28176),c.exports=a},23777:c=>{/** + */var o=t(96503);o.Area=t(95166),o.Circumference=t(71562),o.CircumferencePoint=t(92110),o.Clone=t(42250),o.Contains=t(87902),o.ContainsPoint=t(5698),o.ContainsRect=t(70588),o.CopyFrom=t(26394),o.Equals=t(76278),o.GetBounds=t(2074),o.GetPoint=t(26241),o.GetPoints=t(79124),o.Offset=t(50884),o.OffsetPoint=t(39212),o.Random=t(28176),c.exports=o},23777:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2295,189 +2295,189 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=t.width/2,v=t.height/2,o=Math.pow(a-v,2)/Math.pow(a+v,2);return Math.PI*(a+v)*(1+3*o/(10+Math.sqrt(4-3*o)))};c.exports=m},79522:(c,m,t)=>{/** + */var m=function(t){var o=t.width/2,v=t.height/2,a=Math.pow(o-v,2)/Math.pow(o+v,2);return Math.PI*(o+v)*(1+3*a/(10+Math.sqrt(4-3*a)))};c.exports=m},79522:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r,n){n===void 0&&(n=new a);var e=o.width/2,i=o.height/2;return n.x=o.x+e*Math.cos(r),n.y=o.y+i*Math.sin(r),n};c.exports=v},58102:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r,n){n===void 0&&(n=new o);var e=a.width/2,i=a.height/2;return n.x=a.x+e*Math.cos(r),n.y=a.y+i*Math.sin(r),n};c.exports=v},58102:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(8497),v=function(o){return new a(o.x,o.y,o.width,o.height)};c.exports=v},81154:c=>{/** + */var o=t(8497),v=function(a){return new o(a.x,a.y,a.width,a.height)};c.exports=v},81154:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(t.width<=0||t.height<=0)return!1;var o=(a-t.x)/t.width,r=(v-t.y)/t.height;return o*=o,r*=r,o+r<.25};c.exports=m},46662:(c,m,t)=>{/** + */var m=function(t,o,v){if(t.width<=0||t.height<=0)return!1;var a=(o-t.x)/t.width,r=(v-t.y)/t.height;return a*=a,r*=r,a+r<.25};c.exports=m},46662:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(81154),v=function(o,r){return a(o,r.x,r.y)};c.exports=v},1632:(c,m,t)=>{/** + */var o=t(81154),v=function(a,r){return o(a,r.x,r.y)};c.exports=v},1632:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(81154),v=function(o,r){return a(o,r.x,r.y)&&a(o,r.right,r.y)&&a(o,r.x,r.bottom)&&a(o,r.right,r.bottom)};c.exports=v},65534:c=>{/** + */var o=t(81154),v=function(a,r){return o(a,r.x,r.y)&&o(a,r.right,r.y)&&o(a,r.x,r.bottom)&&o(a,r.right,r.bottom)};c.exports=v},65534:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.setTo(t.x,t.y,t.width,t.height)};c.exports=m},8497:(c,m,t)=>{/** + */var m=function(t,o){return o.setTo(t.x,t.y,t.width,t.height)};c.exports=m},8497:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(81154),o=t(90549),r=t(48320),n=t(23777),e=t(24820),i=new a({initialize:function(s,l,f,u){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),this.type=n.ELLIPSE,this.x=s,this.y=l,this.width=f,this.height=u},contains:function(h,s){return v(this,h,s)},getPoint:function(h,s){return o(this,h,s)},getPoints:function(h,s,l){return r(this,h,s,l)},getRandomPoint:function(h){return e(this,h)},setTo:function(h,s,l,f){return this.x=h,this.y=s,this.width=l,this.height=f,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(h,s){return s===void 0&&(s=h),this.x=h,this.y=s,this},setSize:function(h,s){return s===void 0&&(s=h),this.width=h,this.height=s,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(h){this.x=h+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(h){this.x=h-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(h){this.y=h+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(h){this.y=h-this.height/2}}});c.exports=i},36146:c=>{/** + */var o=t(83419),v=t(81154),a=t(90549),r=t(48320),n=t(23777),e=t(24820),i=new o({initialize:function(s,l,f,u){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),this.type=n.ELLIPSE,this.x=s,this.y=l,this.width=f,this.height=u},contains:function(h,s){return v(this,h,s)},getPoint:function(h,s){return a(this,h,s)},getPoints:function(h,s,l){return r(this,h,s,l)},getRandomPoint:function(h){return e(this,h)},setTo:function(h,s,l,f){return this.x=h,this.y=s,this.width=l,this.height=f,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(h,s){return s===void 0&&(s=h),this.x=h,this.y=s,this},setSize:function(h,s){return s===void 0&&(s=h),this.width=h,this.height=s,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(h){this.x=h+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(h){this.x=h-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(h){this.y=h+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(h){this.y=h-this.height/2}}});c.exports=i},36146:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x===a.x&&t.y===a.y&&t.width===a.width&&t.height===a.height};c.exports=m},23694:(c,m,t)=>{/** + */var m=function(t,o){return t.x===o.x&&t.y===o.y&&t.width===o.width&&t.height===o.height};c.exports=m},23694:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=function(o,r){return r===void 0&&(r=new a),r.x=o.left,r.y=o.top,r.width=o.width,r.height=o.height,r};c.exports=v},90549:(c,m,t)=>{/** + */var o=t(87841),v=function(a,r){return r===void 0&&(r=new o),r.x=a.left,r.y=a.top,r.width=a.width,r.height=a.height,r};c.exports=v},90549:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79522),v=t(62945),o=t(36383),r=t(2141),n=function(e,i,h){h===void 0&&(h=new r);var s=v(i,0,o.PI2);return a(e,s,h)};c.exports=n},48320:(c,m,t)=>{/** + */var o=t(79522),v=t(62945),a=t(36383),r=t(2141),n=function(e,i,h){h===void 0&&(h=new r);var s=v(i,0,a.PI2);return o(e,s,h)};c.exports=n},48320:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(92990),v=t(79522),o=t(62945),r=t(36383),n=function(e,i,h,s){s===void 0&&(s=[]),!i&&h>0&&(i=a(e)/h);for(var l=0;l{/** + */var o=t(92990),v=t(79522),a=t(62945),r=t(36383),n=function(e,i,h,s){s===void 0&&(s=[]),!i&&h>0&&(i=o(e)/h);for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t.x+=a,t.y+=v,t};c.exports=m},44808:c=>{/** + */var m=function(t,o,v){return t.x+=o,t.y+=v,t};c.exports=m},44808:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x+=a.x,t.y+=a.y,t};c.exports=m},24820:(c,m,t)=>{/** + */var m=function(t,o){return t.x+=o.x,t.y+=o.y,t};c.exports=m},24820:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){r===void 0&&(r=new a);var n=Math.random()*Math.PI*2,e=Math.sqrt(Math.random());return r.x=o.x+e*Math.cos(n)*o.width/2,r.y=o.y+e*Math.sin(n)*o.height/2,r};c.exports=v},49203:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r){r===void 0&&(r=new o);var n=Math.random()*Math.PI*2,e=Math.sqrt(Math.random());return r.x=a.x+e*Math.cos(n)*a.width/2,r.y=a.y+e*Math.sin(n)*a.height/2,r};c.exports=v},49203:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(8497);a.Area=t(78874),a.Circumference=t(92990),a.CircumferencePoint=t(79522),a.Clone=t(58102),a.Contains=t(81154),a.ContainsPoint=t(46662),a.ContainsRect=t(1632),a.CopyFrom=t(65534),a.Equals=t(36146),a.GetBounds=t(23694),a.GetPoint=t(90549),a.GetPoints=t(48320),a.Offset=t(73424),a.OffsetPoint=t(44808),a.Random=t(24820),c.exports=a},55738:(c,m,t)=>{/** + */var o=t(8497);o.Area=t(78874),o.Circumference=t(92990),o.CircumferencePoint=t(79522),o.Clone=t(58102),o.Contains=t(81154),o.ContainsPoint=t(46662),o.ContainsRect=t(1632),o.CopyFrom=t(65534),o.Equals=t(36146),o.GetBounds=t(23694),o.GetPoint=t(90549),o.GetPoints=t(48320),o.Offset=t(73424),o.OffsetPoint=t(44808),o.Random=t(24820),c.exports=o},55738:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23777),v=t(79291),o={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)};o=v(!1,o,a),c.exports=o},2044:(c,m,t)=>{/** + */var o=t(23777),v=t(79291),a={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)};a=v(!1,a,o),c.exports=a},2044:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20339),v=function(o,r){return a(o.x,o.y,r.x,r.y)<=o.radius+r.radius};c.exports=v},81491:c=>{/** + */var o=t(20339),v=function(a,r){return o(a.x,a.y,r.x,r.y)<=a.radius+r.radius};c.exports=v},81491:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=a.width/2,o=a.height/2,r=Math.abs(t.x-a.x-v),n=Math.abs(t.y-a.y-o),e=v+t.radius,i=o+t.radius;if(r>e||n>i)return!1;if(r<=v||n<=o)return!0;var h=r-v,s=n-o,l=h*h,f=s*s,u=t.radius*t.radius;return l+f<=u};c.exports=m},63376:(c,m,t)=>{/** + */var m=function(t,o){var v=o.width/2,a=o.height/2,r=Math.abs(t.x-o.x-v),n=Math.abs(t.y-o.y-a),e=v+t.radius,i=a+t.radius;if(r>e||n>i)return!1;if(r<=v||n<=a)return!0;var h=r-v,s=n-a,l=h*h,f=s*s,u=t.radius*t.radius;return l+f<=u};c.exports=m},63376:(c,m,t)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=t(2044),o=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=r.x,h=r.y,s=r.radius,l=n.x,f=n.y,u=n.radius,d,p,g,y,x;if(h===f)x=(u*u-s*s-l*l+i*i)/(2*(i-l)),d=1,p=-2*f,g=l*l+x*x-2*l*x+f*f-u*u,y=p*p-4*d*g,y===0?e.push(new a(x,-p/(2*d))):y>0&&(e.push(new a(x,(-p+Math.sqrt(y))/(2*d))),e.push(new a(x,(-p-Math.sqrt(y))/(2*d))));else{var T=(i-l)/(h-f),C=(u*u-s*s-l*l+i*i-f*f+h*h)/(2*(h-f));d=T*T+1,p=2*h*T-2*C*T-2*i,g=i*i+h*h+C*C-s*s-2*h*C,y=p*p-4*d*g,y===0?(x=-p/(2*d),e.push(new a(x,C-x*T))):y>0&&(x=(-p+Math.sqrt(y))/(2*d),e.push(new a(x,C-x*T)),x=(-p-Math.sqrt(y))/(2*d),e.push(new a(x,C-x*T)))}}return e};c.exports=o},97439:(c,m,t)=>{/** + */var o=t(2141),v=t(2044),a=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=r.x,h=r.y,s=r.radius,l=n.x,f=n.y,u=n.radius,d,p,g,y,x;if(h===f)x=(u*u-s*s-l*l+i*i)/(2*(i-l)),d=1,p=-2*f,g=l*l+x*x-2*l*x+f*f-u*u,y=p*p-4*d*g,y===0?e.push(new o(x,-p/(2*d))):y>0&&(e.push(new o(x,(-p+Math.sqrt(y))/(2*d))),e.push(new o(x,(-p-Math.sqrt(y))/(2*d))));else{var C=(i-l)/(h-f),P=(u*u-s*s-l*l+i*i-f*f+h*h)/(2*(h-f));d=C*C+1,p=2*h*C-2*P*C-2*i,g=i*i+h*h+P*P-s*s-2*h*P,y=p*p-4*d*g,y===0?(x=-p/(2*d),e.push(new o(x,P-x*C))):y>0&&(x=(-p+Math.sqrt(y))/(2*d),e.push(new o(x,P-x*C)),x=(-p-Math.sqrt(y))/(2*d),e.push(new o(x,P-x*C)))}}return e};c.exports=a},97439:(c,m,t)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(4042),v=t(81491),o=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=n.getLineA(),h=n.getLineB(),s=n.getLineC(),l=n.getLineD();a(i,r,e),a(h,r,e),a(s,r,e),a(l,r,e)}return e};c.exports=o},4042:(c,m,t)=>{/** + */var o=t(4042),v=t(81491),a=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=n.getLineA(),h=n.getLineB(),s=n.getLineC(),l=n.getLineD();o(i,r,e),o(h,r,e),o(s,r,e),o(l,r,e)}return e};c.exports=a},4042:(c,m,t)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=t(80462),o=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=r.x1,h=r.y1,s=r.x2,l=r.y2,f=n.x,u=n.y,d=n.radius,p=s-i,g=l-h,y=i-f,x=h-u,T=p*p+g*g,C=2*(p*y+g*x),M=y*y+x*x-d*d,w=C*C-4*T*M,L,F;if(w===0){var O=-C/(2*T);L=i+O*p,F=h+O*g,O>=0&&O<=1&&e.push(new a(L,F))}else if(w>0){var N=(-C-Math.sqrt(w))/(2*T);L=i+N*p,F=h+N*g,N>=0&&N<=1&&e.push(new a(L,F));var G=(-C+Math.sqrt(w))/(2*T);L=i+G*p,F=h+G*g,G>=0&&G<=1&&e.push(new a(L,F))}}return e};c.exports=o},36100:(c,m,t)=>{/** + */var o=t(2141),v=t(80462),a=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=r.x1,h=r.y1,s=r.x2,l=r.y2,f=n.x,u=n.y,d=n.radius,p=s-i,g=l-h,y=i-f,x=h-u,C=p*p+g*g,P=2*(p*y+g*x),M=y*y+x*x-d*d,w=P*P-4*C*M,I,L;if(w===0){var B=-P/(2*C);I=i+B*p,L=h+B*g,B>=0&&B<=1&&e.push(new o(I,L))}else if(w>0){var N=(-P-Math.sqrt(w))/(2*C);I=i+N*p,L=h+N*g,N>=0&&N<=1&&e.push(new o(I,L));var G=(-P+Math.sqrt(w))/(2*C);I=i+G*p,L=h+G*g,G>=0&&G<=1&&e.push(new o(I,L))}}return e};c.exports=a},36100:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25836),v=function(o,r,n,e){n===void 0&&(n=!1);var i=o.x1,h=o.y1,s=o.x2,l=o.y2,f=r.x1,u=r.y1,d=r.x2,p=r.y2,g=s-i,y=l-h,x=d-f,T=p-u,C=g*T-y*x;if(C===0)return null;var M,w,L;if(n){if(M=(g*(u-h)+y*(i-f))/(x*y-T*g),w=(f+x*M-i)/g,w<0||M<0||M>1)return null;L=w}else{if(M=((f-i)*T-(u-h)*x)/C,w=((h-u)*g-(i-f)*y)/C,M<0||M>1||w<0||w>1)return null;L=M}return e===void 0&&(e=new a),e.set(i+g*L,h+y*L,L)};c.exports=v},3073:(c,m,t)=>{/** + */var o=t(25836),v=function(a,r,n,e){n===void 0&&(n=!1);var i=a.x1,h=a.y1,s=a.x2,l=a.y2,f=r.x1,u=r.y1,d=r.x2,p=r.y2,g=s-i,y=l-h,x=d-f,C=p-u,P=g*C-y*x;if(P===0)return null;var M,w,I;if(n){if(M=(g*(u-h)+y*(i-f))/(x*y-C*g),w=(f+x*M-i)/g,w<0||M<0||M>1)return null;I=w}else{if(M=((f-i)*C-(u-h)*x)/P,w=((h-u)*g-(i-f)*y)/P,M<0||M>1||w<0||w>1)return null;I=M}return e===void 0&&(e=new o),e.set(i+g*I,h+y*I,I)};c.exports=v},3073:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36100),v=t(23031),o=t(25836),r=new v,n=new o,e=function(i,h,s,l){s===void 0&&(s=!1),l===void 0&&(l=new o);var f=!1;l.set(),n.set();for(var u=h[h.length-1],d=0;d{/** + */var o=t(36100),v=t(23031),a=t(25836),r=new v,n=new a,e=function(i,h,s,l){s===void 0&&(s=!1),l===void 0&&(l=new a);var f=!1;l.set(),n.set();for(var u=h[h.length-1],d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25836),v=t(61369),o=t(3073),r=new a,n=function(e,i,h,s){s===void 0&&(s=new v),Array.isArray(i)||(i=[i]);var l=!1;s.set(),r.set();for(var f=0;f{/** + */var o=t(25836),v=t(61369),a=t(3073),r=new o,n=function(e,i,h,s){s===void 0&&(s=new v),Array.isArray(i)||(i=[i]);var l=!1;s.set(),r.set();for(var f=0;f{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=t(76112),o=t(92773),r=function(n,e,i){if(i===void 0&&(i=[]),o(n,e))for(var h=e.getLineA(),s=e.getLineB(),l=e.getLineC(),f=e.getLineD(),u=[new a,new a,new a,new a],d=[v(h,n,u[0]),v(s,n,u[1]),v(l,n,u[2]),v(f,n,u[3])],p=0;p<4;p++)d[p]&&i.push(u[p]);return i};c.exports=r},71147:(c,m,t)=>{/** + */var o=t(2141),v=t(76112),a=t(92773),r=function(n,e,i){if(i===void 0&&(i=[]),a(n,e))for(var h=e.getLineA(),s=e.getLineB(),l=e.getLineC(),f=e.getLineD(),u=[new o,new o,new o,new o],d=[v(h,n,u[0]),v(s,n,u[1]),v(l,n,u[2]),v(f,n,u[3])],p=0;p<4;p++)d[p]&&i.push(u[p]);return i};c.exports=r},71147:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(61369),v=t(56362),o=t(23031),r=new o;function n(h,s,l,f,u){var d=Math.cos(h),p=Math.sin(h);r.setTo(s,l,s+d,l+p);var g=v(r,f,!0);g&&u.push(new a(g.x,g.y,h,g.w))}function e(h,s){return h.z-s.z}var i=function(h,s,l){Array.isArray(l)||(l=[l]);for(var f=[],u=[],d=0;d{/** + */var o=t(61369),v=t(56362),a=t(23031),r=new a;function n(h,s,l,f,u){var d=Math.cos(h),p=Math.sin(h);r.setTo(s,l,s+d,l+p);var g=v(r,f,!0);g&&u.push(new o(g.x,g.y,h,g.w))}function e(h,s){return h.z-s.z}var i=function(h,s,l){Array.isArray(l)||(l=[l]);for(var f=[],u=[],d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=t(59996),o=function(r,n,e){return e===void 0&&(e=new a),v(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};c.exports=o},52784:(c,m,t)=>{/** + */var o=t(87841),v=t(59996),a=function(r,n,e){return e===void 0&&(e=new o),v(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};c.exports=a},52784:(c,m,t)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(60646),v=t(59996),o=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=r.getLineA(),h=r.getLineB(),s=r.getLineC(),l=r.getLineD();a(i,n,e),a(h,n,e),a(s,n,e),a(l,n,e)}return e};c.exports=o},26341:(c,m,t)=>{/** + */var o=t(60646),v=t(59996),a=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=r.getLineA(),h=r.getLineB(),s=r.getLineC(),l=r.getLineD();o(i,n,e),o(h,n,e),o(s,n,e),o(l,n,e)}return e};c.exports=a},26341:(c,m,t)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(89265),v=t(60646),o=function(r,n,e){if(e===void 0&&(e=[]),a(r,n)){var i=n.getLineA(),h=n.getLineB(),s=n.getLineC();v(i,r,e),v(h,r,e),v(s,r,e)}return e};c.exports=o},38720:(c,m,t)=>{/** + */var o=t(89265),v=t(60646),a=function(r,n,e){if(e===void 0&&(e=[]),o(r,n)){var i=n.getLineA(),h=n.getLineB(),s=n.getLineC();v(i,r,e),v(h,r,e),v(s,r,e)}return e};c.exports=a},38720:(c,m,t)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(4042),v=t(67636),o=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=r.getLineA(),h=r.getLineB(),s=r.getLineC();a(i,n,e),a(h,n,e),a(s,n,e)}return e};c.exports=o},13882:(c,m,t)=>{/** + */var o=t(4042),v=t(67636),a=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=r.getLineA(),h=r.getLineB(),s=r.getLineC();o(i,n,e),o(h,n,e),o(s,n,e)}return e};c.exports=a},13882:(c,m,t)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=t(2822),o=t(76112),r=function(n,e,i){if(i===void 0&&(i=[]),v(n,e))for(var h=n.getLineA(),s=n.getLineB(),l=n.getLineC(),f=[new a,new a,new a],u=[o(h,e,f[0]),o(s,e,f[1]),o(l,e,f[2])],d=0;d<3;d++)u[d]&&i.push(f[d]);return i};c.exports=r},75636:(c,m,t)=>{/** + */var o=t(2141),v=t(2822),a=t(76112),r=function(n,e,i){if(i===void 0&&(i=[]),v(n,e))for(var h=n.getLineA(),s=n.getLineB(),l=n.getLineC(),f=[new o,new o,new o],u=[a(h,e,f[0]),a(s,e,f[1]),a(l,e,f[2])],d=0;d<3;d++)u[d]&&i.push(f[d]);return i};c.exports=r},75636:(c,m,t)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82944),v=t(13882),o=function(r,n,e){if(e===void 0&&(e=[]),a(r,n)){var i=n.getLineA(),h=n.getLineB(),s=n.getLineC();v(r,i,e),v(r,h,e),v(r,s,e)}return e};c.exports=o},80462:(c,m,t)=>{/** + */var o=t(82944),v=t(13882),a=function(r,n,e){if(e===void 0&&(e=[]),o(r,n)){var i=n.getLineA(),h=n.getLineB(),s=n.getLineC();v(r,i,e),v(r,h,e),v(r,s,e)}return e};c.exports=a},80462:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87902),v=t(2141),o=new v,r=function(n,e,i){if(i===void 0&&(i=o),a(e,n.x1,n.y1))return i.x=n.x1,i.y=n.y1,!0;if(a(e,n.x2,n.y2))return i.x=n.x2,i.y=n.y2,!0;var h=n.x2-n.x1,s=n.y2-n.y1,l=e.x-n.x1,f=e.y-n.y1,u=h*h+s*s,d=h,p=s;if(u>0){var g=(l*h+f*s)/u;d*=g,p*=g}i.x=n.x1+d,i.y=n.y1+p;var y=d*d+p*p;return y<=u&&d*h+p*s>=0&&a(e,i.x,i.y)};c.exports=r},76112:c=>{/** + */var o=t(87902),v=t(2141),a=new v,r=function(n,e,i){if(i===void 0&&(i=a),o(e,n.x1,n.y1))return i.x=n.x1,i.y=n.y1,!0;if(o(e,n.x2,n.y2))return i.x=n.x2,i.y=n.y2,!0;var h=n.x2-n.x1,s=n.y2-n.y1,l=e.x-n.x1,f=e.y-n.y1,u=h*h+s*s,d=h,p=s;if(u>0){var g=(l*h+f*s)/u;d*=g,p*=g}i.x=n.x1+d,i.y=n.y1+p;var y=d*d+p*p;return y<=u&&d*h+p*s>=0&&o(e,i.x,i.y)};c.exports=r},76112:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=t.x1,r=t.y1,n=t.x2,e=t.y2,i=a.x1,h=a.y1,s=a.x2,l=a.y2;if(o===n&&r===e||i===s&&h===l)return!1;var f=(l-h)*(n-o)-(s-i)*(e-r);if(f===0)return!1;var u=((s-i)*(r-h)-(l-h)*(o-i))/f,d=((n-o)*(r-h)-(e-r)*(o-i))/f;return u<0||u>1||d<0||d>1?!1:(v&&(v.x=o+u*(n-o),v.y=r+u*(e-r)),!0)};c.exports=m},92773:c=>{/** + */var m=function(t,o,v){var a=t.x1,r=t.y1,n=t.x2,e=t.y2,i=o.x1,h=o.y1,s=o.x2,l=o.y2;if(a===n&&r===e||i===s&&h===l)return!1;var f=(l-h)*(n-a)-(s-i)*(e-r);if(f===0)return!1;var u=((s-i)*(r-h)-(l-h)*(a-i))/f,d=((n-a)*(r-h)-(e-r)*(a-i))/f;return u<0||u>1||d<0||d>1?!1:(v&&(v.x=a+u*(n-a),v.y=r+u*(e-r)),!0)};c.exports=m},92773:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.x1,o=t.y1,r=t.x2,n=t.y2,e=a.x,i=a.y,h=a.right,s=a.bottom,l=0;if(v>=e&&v<=h&&o>=i&&o<=s||r>=e&&r<=h&&n>=i&&n<=s)return!0;if(v=e){if(l=o+(n-o)*(e-v)/(r-v),l>i&&l<=s)return!0}else if(v>h&&r<=h&&(l=o+(n-o)*(h-v)/(r-v),l>=i&&l<=s))return!0;if(o=i){if(l=v+(r-v)*(i-o)/(n-o),l>=e&&l<=h)return!0}else if(o>s&&n<=s&&(l=v+(r-v)*(s-o)/(n-o),l>=e&&l<=h))return!0;return!1};c.exports=m},16204:c=>{/** + */var m=function(t,o){var v=t.x1,a=t.y1,r=t.x2,n=t.y2,e=o.x,i=o.y,h=o.right,s=o.bottom,l=0;if(v>=e&&v<=h&&a>=i&&a<=s||r>=e&&r<=h&&n>=i&&n<=s)return!0;if(v=e){if(l=a+(n-a)*(e-v)/(r-v),l>i&&l<=s)return!0}else if(v>h&&r<=h&&(l=a+(n-a)*(h-v)/(r-v),l>=i&&l<=s))return!0;if(a=i){if(l=v+(r-v)*(i-a)/(n-a),l>=e&&l<=h)return!0}else if(a>s&&n<=s&&(l=v+(r-v)*(s-a)/(n-a),l>=e&&l<=h))return!0;return!1};c.exports=m},16204:c=>{/** * @author Richard Davey * @author Florian Mertens * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){v===void 0&&(v=1);var o=a.x1,r=a.y1,n=a.x2,e=a.y2,i=t.x,h=t.y,s=(n-o)*(n-o)+(e-r)*(e-r);if(s===0)return!1;var l=((i-o)*(n-o)+(h-r)*(e-r))/s;if(l<0)return Math.sqrt((o-i)*(o-i)+(r-h)*(r-h))<=v;if(l>=0&&l<=1){var f=((r-h)*(n-o)-(o-i)*(e-r))/s;return Math.abs(f)*Math.sqrt(s)<=v}else return Math.sqrt((n-i)*(n-i)+(e-h)*(e-h))<=v};c.exports=m},14199:(c,m,t)=>{/** + */var m=function(t,o,v){v===void 0&&(v=1);var a=o.x1,r=o.y1,n=o.x2,e=o.y2,i=t.x,h=t.y,s=(n-a)*(n-a)+(e-r)*(e-r);if(s===0)return!1;var l=((i-a)*(n-a)+(h-r)*(e-r))/s;if(l<0)return Math.sqrt((a-i)*(a-i)+(r-h)*(r-h))<=v;if(l>=0&&l<=1){var f=((r-h)*(n-a)-(a-i)*(e-r))/s;return Math.abs(f)*Math.sqrt(s)<=v}else return Math.sqrt((n-i)*(n-i)+(e-h)*(e-h))<=v};c.exports=m},14199:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(16204),v=function(o,r){if(!a(o,r))return!1;var n=Math.min(r.x1,r.x2),e=Math.max(r.x1,r.x2),i=Math.min(r.y1,r.y2),h=Math.max(r.y1,r.y2);return o.x>=n&&o.x<=e&&o.y>=i&&o.y<=h};c.exports=v},59996:c=>{/** + */var o=t(16204),v=function(a,r){if(!o(a,r))return!1;var n=Math.min(r.x1,r.x2),e=Math.max(r.x1,r.x2),i=Math.min(r.y1,r.y2),h=Math.max(r.y1,r.y2);return a.x>=n&&a.x<=e&&a.y>=i&&a.y<=h};c.exports=v},59996:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.width<=0||t.height<=0||a.width<=0||a.height<=0?!1:!(t.righta.right||t.y>a.bottom)};c.exports=m},89265:(c,m,t)=>{/** + */var m=function(t,o){return t.width<=0||t.height<=0||o.width<=0||o.height<=0?!1:!(t.righto.right||t.y>o.bottom)};c.exports=m},89265:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(76112),v=t(37303),o=t(48653),r=t(77493),n=function(e,i){if(i.left>e.right||i.righte.bottom||i.bottom0};c.exports=n},84411:c=>{/** + */var o=t(76112),v=t(37303),a=t(48653),r=t(77493),n=function(e,i){if(i.left>e.right||i.righte.bottom||i.bottom0};c.exports=n},84411:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r,n){return n===void 0&&(n=0),!(a>t.right+n||vt.bottom+n||r{/** + */var m=function(t,o,v,a,r,n){return n===void 0&&(n=0),!(o>t.right+n||vt.bottom+n||r{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(80462),v=t(10690),o=function(r,n){return r.left>n.right||r.rightn.bottom||r.bottom{/** + */var o=t(80462),v=t(10690),a=function(r,n){return r.left>n.right||r.rightn.bottom||r.bottom{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(76112),v=function(o,r){return!!(o.contains(r.x1,r.y1)||o.contains(r.x2,r.y2)||a(o.getLineA(),r)||a(o.getLineB(),r)||a(o.getLineC(),r))};c.exports=v},82944:(c,m,t)=>{/** + */var o=t(76112),v=function(a,r){return!!(a.contains(r.x1,r.y1)||a.contains(r.x2,r.y2)||o(a.getLineA(),r)||o(a.getLineB(),r)||o(a.getLineC(),r))};c.exports=v},82944:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(48653),v=t(71694),o=t(76112),r=function(n,e){if(n.left>e.right||n.righte.bottom||n.bottom0||(d=v(e),p=a(n,d,!0),p.length>0)};c.exports=r},91865:(c,m,t)=>{/** + */var o=t(48653),v=t(71694),a=t(76112),r=function(n,e){if(n.left>e.right||n.righte.bottom||n.bottom0||(d=v(e),p=o(n,d,!0),p.length>0)};c.exports=r},91865:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2489,57 +2489,57 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){a===void 0&&(a=1),v===void 0&&(v=[]);var o=Math.round(t.x1),r=Math.round(t.y1),n=Math.round(t.x2),e=Math.round(t.y2),i=Math.abs(n-o),h=Math.abs(e-r),s=o-h&&(f-=h,o+=s),d{/** + */var m=function(t,o,v){o===void 0&&(o=1),v===void 0&&(v=[]);var a=Math.round(t.x1),r=Math.round(t.y1),n=Math.round(t.x2),e=Math.round(t.y2),i=Math.abs(n-a),h=Math.abs(e-r),s=a-h&&(f-=h,a+=s),d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=a-(t.x1+t.x2)/2,r=v-(t.y1+t.y2)/2;return t.x1+=o,t.y1+=r,t.x2+=o,t.y2+=r,t};c.exports=m},31116:(c,m,t)=>{/** + */var m=function(t,o,v){var a=o-(t.x1+t.x2)/2,r=v-(t.y1+t.y2)/2;return t.x1+=a,t.y1+=r,t.x2+=a,t.y2+=r,t};c.exports=m},31116:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23031),v=function(o){return new a(o.x1,o.y1,o.x2,o.y2)};c.exports=v},59944:c=>{/** + */var o=t(23031),v=function(a){return new o(a.x1,a.y1,a.x2,a.y2)};c.exports=v},59944:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.setTo(t.x1,t.y1,t.x2,t.y2)};c.exports=m},59220:c=>{/** + */var m=function(t,o){return o.setTo(t.x1,t.y1,t.x2,t.y2)};c.exports=m},59220:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x1===a.x1&&t.y1===a.y1&&t.x2===a.x2&&t.y2===a.y2};c.exports=m},78177:(c,m,t)=>{/** + */var m=function(t,o){return t.x1===o.x1&&t.y1===o.y1&&t.x2===o.x2&&t.y2===o.y2};c.exports=m},78177:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35001),v=function(o,r,n){n===void 0&&(n=r);var e=a(o),i=o.x2-o.x1,h=o.y2-o.y1;return r&&(o.x1=o.x1-i/e*r,o.y1=o.y1-h/e*r),n&&(o.x2=o.x2+i/e*n,o.y2=o.y2+h/e*n),o};c.exports=v},26708:(c,m,t)=>{/** + */var o=t(35001),v=function(a,r,n){n===void 0&&(n=r);var e=o(a),i=a.x2-a.x1,h=a.y2-a.y1;return r&&(a.x1=a.x1-i/e*r,a.y1=a.y1-h/e*r),n&&(a.x2=a.x2+i/e*n,a.y2=a.y2+h/e*n),a};c.exports=v},26708:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(52816),v=t(6113),o=t(2141),r=function(n,e,i,h,s){h===void 0&&(h=0),s===void 0&&(s=[]);var l=[],f=n.x1,u=n.y1,d=n.x2-f,p=n.y2-u,g=v(e,s),y,x,T=i-1;for(y=0;y0){var C=l[0],M=[C];for(y=1;y=h&&(M.push(w),C=w)}var L=l[l.length-1];return a(C,L){/** + */var o=t(52816),v=t(6113),a=t(2141),r=function(n,e,i,h,s){h===void 0&&(h=0),s===void 0&&(s=[]);var l=[],f=n.x1,u=n.y1,d=n.x2-f,p=n.y2-u,g=v(e,s),y,x,C=i-1;for(y=0;y0){var P=l[0],M=[P];for(y=1;y=h&&(M.push(w),P=w)}var I=l[l.length-1];return o(P,I){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){return r===void 0&&(r=new a),r.x=(o.x1+o.x2)/2,r.y=(o.y1+o.y2)/2,r};c.exports=v},99569:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r){return r===void 0&&(r=new o),r.x=(a.x1+a.x2)/2,r.y=(a.y1+a.y2)/2,r};c.exports=v},99569:(c,m,t)=>{/** * @author Richard Davey * @author Florian Mertens * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r,n){n===void 0&&(n=new a);var e=o.x1,i=o.y1,h=o.x2,s=o.y2,l=(h-e)*(h-e)+(s-i)*(s-i);if(l===0)return n;var f=((r.x-e)*(h-e)+(r.y-i)*(s-i))/l;return n.x=e+f*(h-e),n.y=i+f*(s-i),n};c.exports=v},34638:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r,n){n===void 0&&(n=new o);var e=a.x1,i=a.y1,h=a.x2,s=a.y2,l=(h-e)*(h-e)+(s-i)*(s-i);if(l===0)return n;var f=((r.x-e)*(h-e)+(r.y-i)*(s-i))/l;return n.x=e+f*(h-e),n.y=i+f*(s-i),n};c.exports=v},34638:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=t(91938),o=t(2141),r=function(n,e){e===void 0&&(e=new o);var i=v(n)-a.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e};c.exports=r},13151:(c,m,t)=>{/** + */var o=t(36383),v=t(91938),a=t(2141),r=function(n,e){e===void 0&&(e=new a);var i=v(n)-o.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e};c.exports=r},13151:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r,n){return n===void 0&&(n=new a),n.x=o.x1+(o.x2-o.x1)*r,n.y=o.y1+(o.y2-o.y1)*r,n};c.exports=v},15258:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r,n){return n===void 0&&(n=new o),n.x=a.x1+(a.x2-a.x1)*r,n.y=a.y1+(a.y2-a.y1)*r,n};c.exports=v},15258:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35001),v=t(2141),o=function(r,n,e,i){i===void 0&&(i=[]),!n&&e>0&&(n=a(r)/e);for(var h=r.x1,s=r.y1,l=r.x2,f=r.y2,u=0;u{/** + */var o=t(35001),v=t(2141),a=function(r,n,e,i){i===void 0&&(i=[]),!n&&e>0&&(n=o(r)/e);for(var h=r.x1,s=r.y1,l=r.x2,f=r.y2,u=0;u{/** * @author Richard Davey * @author Florian Mertens * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.x1,o=t.y1,r=t.x2,n=t.y2,e=(r-v)*(r-v)+(n-o)*(n-o);if(e===0)return!1;var i=((o-a.y)*(r-v)-(v-a.x)*(n-o))/e;return Math.abs(i)*Math.sqrt(e)};c.exports=m},98770:c=>{/** + */var m=function(t,o){var v=t.x1,a=t.y1,r=t.x2,n=t.y2,e=(r-v)*(r-v)+(n-a)*(n-a);if(e===0)return!1;var i=((a-o.y)*(r-v)-(v-o.x)*(n-a))/e;return Math.abs(i)*Math.sqrt(e)};c.exports=m},98770:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2551,23 +2551,23 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(13151),o=t(15258),r=t(23777),n=t(65822),e=t(26099),i=new a({initialize:function(s,l,f,u){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),this.type=r.LINE,this.x1=s,this.y1=l,this.x2=f,this.y2=u},getPoint:function(h,s){return v(this,h,s)},getPoints:function(h,s,l){return o(this,h,s,l)},getRandomPoint:function(h){return n(this,h)},setTo:function(h,s,l,f){return h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),this.x1=h,this.y1=s,this.x2=l,this.y2=f,this},setFromObjects:function(h,s){return this.x1=h.x,this.y1=h.y,this.x2=s.x,this.y2=s.y,this},getPointA:function(h){return h===void 0&&(h=new e),h.set(this.x1,this.y1),h},getPointB:function(h){return h===void 0&&(h=new e),h.set(this.x2,this.y2),h},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(h){this.x1<=this.x2?this.x1=h:this.x2=h}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(h){this.x1>this.x2?this.x1=h:this.x2=h}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(h){this.y1<=this.y2?this.y1=h:this.y2=h}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(h){this.y1>this.y2?this.y1=h:this.y2=h}}});c.exports=i},64795:(c,m,t)=>{/** + */var o=t(83419),v=t(13151),a=t(15258),r=t(23777),n=t(65822),e=t(26099),i=new o({initialize:function(s,l,f,u){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),this.type=r.LINE,this.x1=s,this.y1=l,this.x2=f,this.y2=u},getPoint:function(h,s){return v(this,h,s)},getPoints:function(h,s,l){return a(this,h,s,l)},getRandomPoint:function(h){return n(this,h)},setTo:function(h,s,l,f){return h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),this.x1=h,this.y1=s,this.x2=l,this.y2=f,this},setFromObjects:function(h,s){return this.x1=h.x,this.y1=h.y,this.x2=s.x,this.y2=s.y,this},getPointA:function(h){return h===void 0&&(h=new e),h.set(this.x1,this.y1),h},getPointB:function(h){return h===void 0&&(h=new e),h.set(this.x2,this.y2),h},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(h){this.x1<=this.x2?this.x1=h:this.x2=h}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(h){this.x1>this.x2?this.x1=h:this.x2=h}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(h){this.y1<=this.y2?this.y1=h:this.y2=h}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(h){this.y1>this.y2?this.y1=h:this.y2=h}}});c.exports=i},64795:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=t(15994),o=t(91938),r=function(n){var e=o(n)-a.TAU;return v(e,-Math.PI,Math.PI)};c.exports=r},52616:(c,m,t)=>{/** + */var o=t(36383),v=t(15994),a=t(91938),r=function(n){var e=a(n)-o.TAU;return v(e,-Math.PI,Math.PI)};c.exports=r},52616:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=t(91938),o=function(r){return Math.cos(v(r)-a.TAU)};c.exports=o},87231:(c,m,t)=>{/** + */var o=t(36383),v=t(91938),a=function(r){return Math.cos(v(r)-o.TAU)};c.exports=a},87231:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=t(91938),o=function(r){return Math.sin(v(r)-a.TAU)};c.exports=o},89662:c=>{/** + */var o=t(36383),v=t(91938),a=function(r){return Math.sin(v(r)-o.TAU)};c.exports=a},89662:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t.x1+=a,t.y1+=v,t.x2+=a,t.y2+=v,t};c.exports=m},71165:c=>{/** + */var m=function(t,o,v){return t.x1+=o,t.y1+=v,t.x2+=o,t.y2+=v,t};c.exports=m},71165:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2575,27 +2575,27 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){r===void 0&&(r=new a);var n=Math.random();return r.x=o.x1+n*(o.x2-o.x1),r.y=o.y1+n*(o.y2-o.y1),r};c.exports=v},69777:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r){r===void 0&&(r=new o);var n=Math.random();return r.x=a.x1+n*(a.x2-a.x1),r.y=a.y1+n*(a.y2-a.y1),r};c.exports=v},69777:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91938),v=t(64795),o=function(r,n){return 2*v(n)-Math.PI-a(r)};c.exports=o},39706:(c,m,t)=>{/** + */var o=t(91938),v=t(64795),a=function(r,n){return 2*v(n)-Math.PI-o(r)};c.exports=a},39706:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(64400),v=function(o,r){var n=(o.x1+o.x2)/2,e=(o.y1+o.y2)/2;return a(o,n,e,r)};c.exports=v},82585:(c,m,t)=>{/** + */var o=t(64400),v=function(a,r){var n=(a.x1+a.x2)/2,e=(a.y1+a.y2)/2;return o(a,n,e,r)};c.exports=v},82585:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(64400),v=function(o,r,n){return a(o,r.x,r.y,n)};c.exports=v},64400:c=>{/** + */var o=t(64400),v=function(a,r,n){return o(a,r.x,r.y,n)};c.exports=v},64400:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=Math.cos(o),n=Math.sin(o),e=t.x1-a,i=t.y1-v;return t.x1=e*r-i*n+a,t.y1=e*n+i*r+v,e=t.x2-a,i=t.y2-v,t.x2=e*r-i*n+a,t.y2=e*n+i*r+v,t};c.exports=m},62377:c=>{/** + */var m=function(t,o,v,a){var r=Math.cos(a),n=Math.sin(a),e=t.x1-o,i=t.y1-v;return t.x1=e*r-i*n+o,t.y1=e*n+i*r+v,e=t.x2-o,i=t.y2-v,t.x2=e*r-i*n+o,t.y2=e*n+i*r+v,t};c.exports=m},62377:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){return t.x1=a,t.y1=v,t.x2=a+Math.cos(o)*r,t.y2=v+Math.sin(o)*r,t};c.exports=m},71366:c=>{/** + */var m=function(t,o,v,a,r){return t.x1=o,t.y1=v,t.x2=o+Math.cos(a)*r,t.y2=v+Math.sin(a)*r,t};c.exports=m},71366:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2607,45 +2607,45 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23031);a.Angle=t(91938),a.BresenhamPoints=t(84993),a.CenterOn=t(36469),a.Clone=t(31116),a.CopyFrom=t(59944),a.Equals=t(59220),a.Extend=t(78177),a.GetEasedPoints=t(26708),a.GetMidPoint=t(32125),a.GetNearestPoint=t(99569),a.GetNormal=t(34638),a.GetPoint=t(13151),a.GetPoints=t(15258),a.GetShortestDistance=t(26408),a.Height=t(98770),a.Length=t(35001),a.NormalAngle=t(64795),a.NormalX=t(52616),a.NormalY=t(87231),a.Offset=t(89662),a.PerpSlope=t(71165),a.Random=t(65822),a.ReflectAngle=t(69777),a.Rotate=t(39706),a.RotateAroundPoint=t(82585),a.RotateAroundXY=t(64400),a.SetToAngle=t(62377),a.Slope=t(71366),a.Width=t(10809),c.exports=a},83997:(c,m,t)=>{/** + */var o=t(23031);o.Angle=t(91938),o.BresenhamPoints=t(84993),o.CenterOn=t(36469),o.Clone=t(31116),o.CopyFrom=t(59944),o.Equals=t(59220),o.Extend=t(78177),o.GetEasedPoints=t(26708),o.GetMidPoint=t(32125),o.GetNearestPoint=t(99569),o.GetNormal=t(34638),o.GetPoint=t(13151),o.GetPoints=t(15258),o.GetShortestDistance=t(26408),o.Height=t(98770),o.Length=t(35001),o.NormalAngle=t(64795),o.NormalX=t(52616),o.NormalY=t(87231),o.Offset=t(89662),o.PerpSlope=t(71165),o.Random=t(65822),o.ReflectAngle=t(69777),o.Rotate=t(39706),o.RotateAroundPoint=t(82585),o.RotateAroundXY=t(64400),o.SetToAngle=t(62377),o.Slope=t(71366),o.Width=t(10809),c.exports=o},83997:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(87841),o=t(26099);function r(e,i,h,s){var l=e-h,f=i-s,u=l*l+f*f;return Math.sqrt(u)}var n=new a({initialize:function(i,h,s){this.vertex1=i,this.vertex2=h,this.vertex3=s,this.bounds=new v,this._inCenter=new o},getInCenter:function(e){e===void 0&&(e=!0);var i=this.vertex1,h=this.vertex2,s=this.vertex3,l,f,u,d,p,g;e?(l=i.x,f=i.y,u=h.x,d=h.y,p=s.x,g=s.y):(l=i.vx,f=i.vy,u=h.vx,d=h.vy,p=s.vx,g=s.vy);var y=r(p,g,u,d),x=r(l,f,p,g),T=r(u,d,l,f),C=y+x+T;return this._inCenter.set((l*y+u*x+p*T)/C,(f*y+d*x+g*T)/C)},contains:function(e,i,h){var s=this.vertex1,l=this.vertex2,f=this.vertex3,u=s.vx,d=s.vy,p=l.vx,g=l.vy,y=f.vx,x=f.vy;if(h){var T=h.a,C=h.b,M=h.c,w=h.d,L=h.e,F=h.f;u=s.vx*T+s.vy*M+L,d=s.vx*C+s.vy*w+F,p=l.vx*T+l.vy*M+L,g=l.vx*C+l.vy*w+F,y=f.vx*T+f.vy*M+L,x=f.vx*C+f.vy*w+F}var O=y-u,N=x-d,G=p-u,V=g-d,K=e-u,$=i-d,J=O*O+N*N,X=O*G+N*V,Y=O*K+N*$,D=G*G+V*V,z=G*K+V*$,W=J*D-X*X,H=W===0?0:1/W,Z=(D*Y-X*z)*H,Q=(J*z-X*Y)*H;return Z>=0&&Q>=0&&Z+Q<1},isCounterClockwise:function(e){var i=this.vertex1,h=this.vertex2,s=this.vertex3,l=(h.vx-i.vx)*(s.vy-i.vy)-(h.vy-i.vy)*(s.vx-i.vx);return e<=0?l>=0:l<0},load:function(e,i,h,s,l){return h=this.vertex1.load(e,i,h,s,l),h=this.vertex2.load(e,i,h,s,l),h=this.vertex3.load(e,i,h,s,l),h},transformCoordinatesLocal:function(e,i,h,s){return this.vertex1.transformCoordinatesLocal(e,i,h,s),this.vertex2.transformCoordinatesLocal(e,i,h,s),this.vertex3.transformCoordinatesLocal(e,i,h,s),this},updateBounds:function(){var e=this.vertex1,i=this.vertex2,h=this.vertex3,s=this.bounds;return s.x=Math.min(e.vx,i.vx,h.vx),s.y=Math.min(e.vy,i.vy,h.vy),s.width=Math.max(e.vx,i.vx,h.vx)-s.x,s.height=Math.max(e.vy,i.vy,h.vy)-s.y,this},isInView:function(e,i,h,s,l,f,u,d,p,g,y){this.update(s,l,f,u,d,p,g,y);var x=this.vertex1,T=this.vertex2,C=this.vertex3;if(x.ta<=0&&T.ta<=0&&C.ta<=0||i&&!this.isCounterClockwise(h))return!1;var M=this.bounds;M.x=Math.min(x.tx,T.tx,C.tx),M.y=Math.min(x.ty,T.ty,C.ty),M.width=Math.max(x.tx,T.tx,C.tx)-M.x,M.height=Math.max(x.ty,T.ty,C.ty)-M.y;var w=e.x+e.width,L=e.y+e.height;return M.width<=0||M.height<=0||e.width<=0||e.height<=0?!1:!(M.rightw||M.y>L)},scrollUV:function(e,i){return this.vertex1.scrollUV(e,i),this.vertex2.scrollUV(e,i),this.vertex3.scrollUV(e,i),this},scaleUV:function(e,i){return this.vertex1.scaleUV(e,i),this.vertex2.scaleUV(e,i),this.vertex3.scaleUV(e,i),this},setColor:function(e){return this.vertex1.color=e,this.vertex2.color=e,this.vertex3.color=e,this},update:function(e,i,h,s,l,f,u,d){return this.vertex1.update(i,h,s,l,f,u,d,e),this.vertex2.update(i,h,s,l,f,u,d,e),this.vertex3.update(i,h,s,l,f,u,d,e),this},translate:function(e,i){i===void 0&&(i=0);var h=this.vertex1,s=this.vertex2,l=this.vertex3;return h.x+=e,h.y+=i,s.x+=e,s.y+=i,l.x+=e,l.y+=i,this},x:{get:function(){return this.getInCenter().x},set:function(e){var i=this.getInCenter();this.translate(e-i.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(e){var i=this.getInCenter();this.translate(0,e-i.y)}},alpha:{get:function(){var e=this.vertex1,i=this.vertex2,h=this.vertex3;return(e.alpha+i.alpha+h.alpha)/3},set:function(e){this.vertex1.alpha=e,this.vertex2.alpha=e,this.vertex3.alpha=e}},depth:{get:function(){var e=this.vertex1,i=this.vertex2,h=this.vertex3;return(e.vz+i.vz+h.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});c.exports=n},48803:(c,m,t)=>{/** + */var o=t(83419),v=t(87841),a=t(26099);function r(e,i,h,s){var l=e-h,f=i-s,u=l*l+f*f;return Math.sqrt(u)}var n=new o({initialize:function(i,h,s){this.vertex1=i,this.vertex2=h,this.vertex3=s,this.bounds=new v,this._inCenter=new a},getInCenter:function(e){e===void 0&&(e=!0);var i=this.vertex1,h=this.vertex2,s=this.vertex3,l,f,u,d,p,g;e?(l=i.x,f=i.y,u=h.x,d=h.y,p=s.x,g=s.y):(l=i.vx,f=i.vy,u=h.vx,d=h.vy,p=s.vx,g=s.vy);var y=r(p,g,u,d),x=r(l,f,p,g),C=r(u,d,l,f),P=y+x+C;return this._inCenter.set((l*y+u*x+p*C)/P,(f*y+d*x+g*C)/P)},contains:function(e,i,h){var s=this.vertex1,l=this.vertex2,f=this.vertex3,u=s.vx,d=s.vy,p=l.vx,g=l.vy,y=f.vx,x=f.vy;if(h){var C=h.a,P=h.b,M=h.c,w=h.d,I=h.e,L=h.f;u=s.vx*C+s.vy*M+I,d=s.vx*P+s.vy*w+L,p=l.vx*C+l.vy*M+I,g=l.vx*P+l.vy*w+L,y=f.vx*C+f.vy*M+I,x=f.vx*P+f.vy*w+L}var B=y-u,N=x-d,G=p-u,V=g-d,K=e-u,j=i-d,J=B*B+N*N,X=B*G+N*V,Y=B*K+N*j,b=G*G+V*V,z=G*K+V*j,W=J*b-X*X,H=W===0?0:1/W,Z=(b*Y-X*z)*H,Q=(J*z-X*Y)*H;return Z>=0&&Q>=0&&Z+Q<1},isCounterClockwise:function(e){var i=this.vertex1,h=this.vertex2,s=this.vertex3,l=(h.vx-i.vx)*(s.vy-i.vy)-(h.vy-i.vy)*(s.vx-i.vx);return e<=0?l>=0:l<0},load:function(e,i,h,s,l){return h=this.vertex1.load(e,i,h,s,l),h=this.vertex2.load(e,i,h,s,l),h=this.vertex3.load(e,i,h,s,l),h},transformCoordinatesLocal:function(e,i,h,s){return this.vertex1.transformCoordinatesLocal(e,i,h,s),this.vertex2.transformCoordinatesLocal(e,i,h,s),this.vertex3.transformCoordinatesLocal(e,i,h,s),this},updateBounds:function(){var e=this.vertex1,i=this.vertex2,h=this.vertex3,s=this.bounds;return s.x=Math.min(e.vx,i.vx,h.vx),s.y=Math.min(e.vy,i.vy,h.vy),s.width=Math.max(e.vx,i.vx,h.vx)-s.x,s.height=Math.max(e.vy,i.vy,h.vy)-s.y,this},isInView:function(e,i,h,s,l,f,u,d,p,g,y){this.update(s,l,f,u,d,p,g,y);var x=this.vertex1,C=this.vertex2,P=this.vertex3;if(x.ta<=0&&C.ta<=0&&P.ta<=0||i&&!this.isCounterClockwise(h))return!1;var M=this.bounds;M.x=Math.min(x.tx,C.tx,P.tx),M.y=Math.min(x.ty,C.ty,P.ty),M.width=Math.max(x.tx,C.tx,P.tx)-M.x,M.height=Math.max(x.ty,C.ty,P.ty)-M.y;var w=e.x+e.width,I=e.y+e.height;return M.width<=0||M.height<=0||e.width<=0||e.height<=0?!1:!(M.rightw||M.y>I)},scrollUV:function(e,i){return this.vertex1.scrollUV(e,i),this.vertex2.scrollUV(e,i),this.vertex3.scrollUV(e,i),this},scaleUV:function(e,i){return this.vertex1.scaleUV(e,i),this.vertex2.scaleUV(e,i),this.vertex3.scaleUV(e,i),this},setColor:function(e){return this.vertex1.color=e,this.vertex2.color=e,this.vertex3.color=e,this},update:function(e,i,h,s,l,f,u,d){return this.vertex1.update(i,h,s,l,f,u,d,e),this.vertex2.update(i,h,s,l,f,u,d,e),this.vertex3.update(i,h,s,l,f,u,d,e),this},translate:function(e,i){i===void 0&&(i=0);var h=this.vertex1,s=this.vertex2,l=this.vertex3;return h.x+=e,h.y+=i,s.x+=e,s.y+=i,l.x+=e,l.y+=i,this},x:{get:function(){return this.getInCenter().x},set:function(e){var i=this.getInCenter();this.translate(e-i.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(e){var i=this.getInCenter();this.translate(0,e-i.y)}},alpha:{get:function(){var e=this.vertex1,i=this.vertex2,h=this.vertex3;return(e.alpha+i.alpha+h.alpha)/3},set:function(e){this.vertex1.alpha=e,this.vertex2.alpha=e,this.vertex3.alpha=e}},depth:{get:function(){var e=this.vertex1,i=this.vertex2,h=this.vertex3;return(e.vz+i.vz+h.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});c.exports=n},48803:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83997),v=t(95540),o=t(37867),r=t(25836),n=t(39318),e=new r,i=new r,h=new o,s=function(l){var f=v(l,"mesh"),u=v(l,"texture",null),d=v(l,"frame"),p=v(l,"width",1),g=v(l,"height",p),y=v(l,"widthSegments",1),x=v(l,"heightSegments",y),T=v(l,"x",0),C=v(l,"y",0),M=v(l,"z",0),w=v(l,"rotateX",0),L=v(l,"rotateY",0),F=v(l,"rotateZ",0),O=v(l,"zIsUp",!0),N=v(l,"isOrtho",f?f.dirtyCache[11]:!1),G=v(l,"colors",[16777215]),V=v(l,"alphas",[1]),K=v(l,"tile",!1),$=v(l,"flipY",!1),J=v(l,"width",null),X={faces:[],verts:[]};e.set(T,C,M),i.set(w,L,F),h.fromRotationXYTranslation(i,e,O);var Y;if(!u&&f)u=f.texture,d||(Y=f.frame);else if(f&&typeof u=="string")u=f.scene.sys.textures.get(u);else if(!u)return X;Y||(Y=u.get(d)),!J&&N&&u&&f&&(p=Y.width/f.height,g=Y.height/f.height);var D=p/2,z=g/2,W=Math.floor(y),H=Math.floor(x),Z=W+1,Q=H+1,k=p/W,et=g/H,st=[],rt=[],ot,ft,at=0,vt=1,Pt=0,Ct=1;Y&&(at=Y.u0,vt=Y.u1,$?(Pt=Y.v1,Ct=Y.v0):(Pt=Y.v0,Ct=Y.v1));var Et=vt-at,ct=Ct-Pt;for(ft=0;ft{/** + */var o=t(83997),v=t(95540),a=t(37867),r=t(25836),n=t(39318),e=new r,i=new r,h=new a,s=function(l){var f=v(l,"mesh"),u=v(l,"texture",null),d=v(l,"frame"),p=v(l,"width",1),g=v(l,"height",p),y=v(l,"widthSegments",1),x=v(l,"heightSegments",y),C=v(l,"x",0),P=v(l,"y",0),M=v(l,"z",0),w=v(l,"rotateX",0),I=v(l,"rotateY",0),L=v(l,"rotateZ",0),B=v(l,"zIsUp",!0),N=v(l,"isOrtho",f?f.dirtyCache[11]:!1),G=v(l,"colors",[16777215]),V=v(l,"alphas",[1]),K=v(l,"tile",!1),j=v(l,"flipY",!1),J=v(l,"width",null),X={faces:[],verts:[]};e.set(C,P,M),i.set(w,I,L),h.fromRotationXYTranslation(i,e,B);var Y;if(!u&&f)u=f.texture,d||(Y=f.frame);else if(f&&typeof u=="string")u=f.scene.sys.textures.get(u);else if(!u)return X;Y||(Y=u.get(d)),!J&&N&&u&&f&&(p=Y.width/f.height,g=Y.height/f.height);var b=p/2,z=g/2,W=Math.floor(y),H=Math.floor(x),Z=W+1,Q=H+1,k=p/W,et=g/H,st=[],rt=[],ot,ft,at=0,vt=1,At=0,Et=1;Y&&(at=Y.u0,vt=Y.u1,j?(At=Y.v1,Et=Y.v0):(At=Y.v0,Et=Y.v1));var Pt=vt-at,ct=Et-At;for(ft=0;ft{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83997),v=t(37867),o=t(25836),r=t(39318),n=new o,e=new o,i=new v,h=function(s,l,f,u,d,p,g,y,x,T){f===void 0&&(f=1),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=0),T===void 0&&(T=!0);var C={faces:[],verts:[]},M=s.materials;n.set(u,d,p),e.set(g,y,x),i.fromRotationXYTranslation(e,n,T);for(var w=0;w{/** + */var o=t(83997),v=t(37867),a=t(25836),r=t(39318),n=new a,e=new a,i=new v,h=function(s,l,f,u,d,p,g,y,x,C){f===void 0&&(f=1),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=0),C===void 0&&(C=!0);var P={faces:[],verts:[]},M=s.materials;n.set(u,d,p),e.set(g,y,x),i.fromRotationXYTranslation(e,n,C);for(var w=0;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83997),v=t(39318),o=function(r,n,e,i,h,s,l,f){if(i===void 0&&(i=!1),s===void 0&&(s=16777215),l===void 0&&(l=1),f===void 0&&(f=!1),r.length!==n.length&&!i){console.warn("GenerateVerts: vertices and uvs count not equal");return}var u={faces:[],vertices:[]},d,p,g,y,x,T,C,M,w,L,F,O=i?3:2,N=Array.isArray(s),G=Array.isArray(l);if(Array.isArray(e)&&e.length>0)for(d=0;d{/** + */var o=t(83997),v=t(39318),a=function(r,n,e,i,h,s,l,f){if(i===void 0&&(i=!1),s===void 0&&(s=16777215),l===void 0&&(l=1),f===void 0&&(f=!1),r.length!==n.length&&!i){console.warn("GenerateVerts: vertices and uvs count not equal");return}var u={faces:[],vertices:[]},d,p,g,y,x,C,P,M,w,I,L,B=i?3:2,N=Array.isArray(s),G=Array.isArray(l);if(Array.isArray(e)&&e.length>0)for(d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=!0,t="untitled",a="",v="";function o(p){var g=p.indexOf("#");return g>-1?p.substring(0,g):p}function r(p){return p.models.length===0&&p.models.push({faces:[],name:t,textureCoords:[],vertexNormals:[],vertices:[]}),a="",p.models[p.models.length-1]}function n(p,g){var y=p.length>=2?p[1]:t;g.models.push({faces:[],name:y,textureCoords:[],vertexNormals:[],vertices:[]}),a=""}function e(p){p.length===2&&(a=p[1])}function i(p,g){var y=p.length,x=y>=2?parseFloat(p[1]):0,T=y>=3?parseFloat(p[2]):0,C=y>=4?parseFloat(p[3]):0;r(g).vertices.push({x,y:T,z:C})}function h(p,g){var y=p.length,x=y>=2?parseFloat(p[1]):0,T=y>=3?parseFloat(p[2]):0,C=y>=4?parseFloat(p[3]):0;isNaN(x)&&(x=0),isNaN(T)&&(T=0),isNaN(C)&&(C=0),m&&(T=1-T),r(g).textureCoords.push({u:x,v:T,w:C})}function s(p,g){var y=p.length,x=y>=2?parseFloat(p[1]):0,T=y>=3?parseFloat(p[2]):0,C=y>=4?parseFloat(p[3]):0;r(g).vertexNormals.push({x,y:T,z:C})}function l(p,g){var y=p.length-1;if(!(y<3)){for(var x={group:a,material:v,vertices:[]},T=0;T3)){var L=0,F=0,O=0;L=parseInt(M[0],10),w>1&&M[1]!==""&&(F=parseInt(M[1],10)),w>2&&(O=parseInt(M[2],10)),L!==0&&(L<0&&(L=r(g).vertices.length+1+L),F-=1,L-=1,O-=1,x.vertices.push({textureCoordsIndex:F,vertexIndex:L,vertexNormalIndex:O}))}}r(g).faces.push(x)}}function f(p,g){p.length>=2&&g.materialLibraries.push(p[1])}function u(p){p.length>=2&&(v=p[1])}var d=function(p,g){g===void 0&&(g=!0),m=g;var y={materials:{},materialLibraries:[],models:[]};a="",v="";for(var x=p.split(` -`),T=0;T{/** + */var m=!0,t="untitled",o="",v="";function a(p){var g=p.indexOf("#");return g>-1?p.substring(0,g):p}function r(p){return p.models.length===0&&p.models.push({faces:[],name:t,textureCoords:[],vertexNormals:[],vertices:[]}),o="",p.models[p.models.length-1]}function n(p,g){var y=p.length>=2?p[1]:t;g.models.push({faces:[],name:y,textureCoords:[],vertexNormals:[],vertices:[]}),o=""}function e(p){p.length===2&&(o=p[1])}function i(p,g){var y=p.length,x=y>=2?parseFloat(p[1]):0,C=y>=3?parseFloat(p[2]):0,P=y>=4?parseFloat(p[3]):0;r(g).vertices.push({x,y:C,z:P})}function h(p,g){var y=p.length,x=y>=2?parseFloat(p[1]):0,C=y>=3?parseFloat(p[2]):0,P=y>=4?parseFloat(p[3]):0;isNaN(x)&&(x=0),isNaN(C)&&(C=0),isNaN(P)&&(P=0),m&&(C=1-C),r(g).textureCoords.push({u:x,v:C,w:P})}function s(p,g){var y=p.length,x=y>=2?parseFloat(p[1]):0,C=y>=3?parseFloat(p[2]):0,P=y>=4?parseFloat(p[3]):0;r(g).vertexNormals.push({x,y:C,z:P})}function l(p,g){var y=p.length-1;if(!(y<3)){for(var x={group:o,material:v,vertices:[]},C=0;C3)){var I=0,L=0,B=0;I=parseInt(M[0],10),w>1&&M[1]!==""&&(L=parseInt(M[1],10)),w>2&&(B=parseInt(M[2],10)),I!==0&&(I<0&&(I=r(g).vertices.length+1+I),L-=1,I-=1,B-=1,x.vertices.push({textureCoordsIndex:L,vertexIndex:I,vertexNormalIndex:B}))}}r(g).faces.push(x)}}function f(p,g){p.length>=2&&g.materialLibraries.push(p[1])}function u(p){p.length>=2&&(v=p[1])}var d=function(p,g){g===void 0&&(g=!0),m=g;var y={materials:{},materialLibraries:[],models:[]};o="",v="";for(var x=p.split(` +`),C=0;C{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37589),v=function(o){for(var r={},n=o.split(` -`),e="",i=0;i=2?Math.floor(s[2]*255):l,u=s.length>=3?Math.floor(s[3]*255):l;r[e]=a(l,f,u);break}}}}return r};c.exports=v},92570:c=>{/** + */var o=t(37589),v=function(a){for(var r={},n=a.split(` +`),e="",i=0;i=2?Math.floor(s[2]*255):l,u=s.length>=3?Math.floor(s[3]*255):l;r[e]=o(l,f,u);break}}}}return r};c.exports=v},92570:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r,n;if(v===void 0&&o===void 0){var e=t.getInCenter();r=e.x,n=e.y}var i=Math.cos(a),h=Math.sin(a),s=t.vertex1,l=t.vertex2,f=t.vertex3,u=s.x-r,d=s.y-n;s.set(u*i-d*h+r,u*h+d*i+n),u=l.x-r,d=l.y-n,l.set(u*i-d*h+r,u*h+d*i+n),u=f.x-r,d=f.y-n,f.set(u*i-d*h+r,u*h+d*i+n)};c.exports=m},39318:(c,m,t)=>{/** + */var m=function(t,o,v,a){var r,n;if(v===void 0&&a===void 0){var e=t.getInCenter();r=e.x,n=e.y}var i=Math.cos(o),h=Math.sin(o),s=t.vertex1,l=t.vertex2,f=t.vertex3,u=s.x-r,d=s.y-n;s.set(u*i-d*h+r,u*h+d*i+n),u=l.x-r,d=l.y-n,l.set(u*i-d*h+r,u*h+d*i+n),u=f.x-r,d=f.y-n,f.set(u*i-d*h+r,u*h+d*i+n)};c.exports=m},39318:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(70554),o=t(25836),r=new a({Extends:o,initialize:function(e,i,h,s,l,f,u,d,p,g){f===void 0&&(f=16777215),u===void 0&&(u=1),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),o.call(this,e,i,h),this.vx=0,this.vy=0,this.vz=0,this.nx=d,this.ny=p,this.nz=g,this.u=s,this.v=l,this.color=f,this.alpha=u,this.tx=0,this.ty=0,this.ta=0,this.tu=s,this.tv=l},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,i,h){var s=this.x,l=this.y,f=this.z,u=n.val,d=s*u[0]+l*u[4]+f*u[8]+u[12],p=s*u[1]+l*u[5]+f*u[9]+u[13],g=s*u[2]+l*u[6]+f*u[10]+u[14],y=s*u[3]+l*u[7]+f*u[11]+u[15];this.vx=d/y*e,this.vy=-(p/y)*i,h<=0?this.vz=g/y:this.vz=-(g/y)},resize:function(n,e,i,h,s,l){return this.x=n,this.y=e,this.vx=this.x*i,this.vy=-this.y*h,this.vz=0,s<.5?this.vx+=i*(.5-s):s>.5&&(this.vx-=i*(s-.5)),l<.5?this.vy+=h*(.5-l):l>.5&&(this.vy-=h*(l-.5)),this},update:function(n,e,i,h,s,l,f,u){var d=this.vx*n+this.vy*i+s,p=this.vx*e+this.vy*h+l;return f&&(d=Math.round(d),p=Math.round(p)),this.tx=d,this.ty=p,this.ta=this.alpha*u,this},load:function(n,e,i,h,s){return n[++i]=this.tx,n[++i]=this.ty,n[++i]=this.tu,n[++i]=this.tv,n[++i]=h,n[++i]=s,e[++i]=v.getTintAppendFloatAlpha(this.color,this.ta),i}});c.exports=r},73090:(c,m,t)=>{/** + */var o=t(83419),v=t(70554),a=t(25836),r=new o({Extends:a,initialize:function(e,i,h,s,l,f,u,d,p,g){f===void 0&&(f=16777215),u===void 0&&(u=1),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),a.call(this,e,i,h),this.vx=0,this.vy=0,this.vz=0,this.nx=d,this.ny=p,this.nz=g,this.u=s,this.v=l,this.color=f,this.alpha=u,this.tx=0,this.ty=0,this.ta=0,this.tu=s,this.tv=l},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,i,h){var s=this.x,l=this.y,f=this.z,u=n.val,d=s*u[0]+l*u[4]+f*u[8]+u[12],p=s*u[1]+l*u[5]+f*u[9]+u[13],g=s*u[2]+l*u[6]+f*u[10]+u[14],y=s*u[3]+l*u[7]+f*u[11]+u[15];this.vx=d/y*e,this.vy=-(p/y)*i,h<=0?this.vz=g/y:this.vz=-(g/y)},resize:function(n,e,i,h,s,l){return this.x=n,this.y=e,this.vx=this.x*i,this.vy=-this.y*h,this.vz=0,s<.5?this.vx+=i*(.5-s):s>.5&&(this.vx-=i*(s-.5)),l<.5?this.vy+=h*(.5-l):l>.5&&(this.vy-=h*(l-.5)),this},update:function(n,e,i,h,s,l,f,u){var d=this.vx*n+this.vy*i+s,p=this.vx*e+this.vy*h+l;return f&&(d=Math.round(d),p=Math.round(p)),this.tx=d,this.ty=p,this.ta=this.alpha*u,this},load:function(n,e,i,h,s){return n[++i]=this.tx,n[++i]=this.ty,n[++i]=this.tu,n[++i]=this.tv,n[++i]=h,n[++i]=s,e[++i]=v.getTintAppendFloatAlpha(this.color,this.ta),i}});c.exports=r},73090:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={Face:t(83997),GenerateGridVerts:t(48803),GenerateObjVerts:t(34684),GenerateVerts:t(92515),ParseObj:t(85048),ParseObjMaterial:t(61485),RotateFace:t(92570),Vertex:t(39318)};c.exports=a},96550:c=>{/** + */var o={Face:t(83997),GenerateGridVerts:t(48803),GenerateObjVerts:t(34684),GenerateVerts:t(92515),ParseObj:t(85048),ParseObjMaterial:t(61485),RotateFace:t(92570),Vertex:t(39318)};c.exports=o},96550:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2653,15 +2653,15 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o){return new a(o.x,o.y)};c.exports=v},68010:c=>{/** + */var o=t(2141),v=function(a){return new o(a.x,a.y)};c.exports=v},68010:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.setTo(t.x,t.y)};c.exports=m},27814:c=>{/** + */var m=function(t,o){return o.setTo(t.x,t.y)};c.exports=m},27814:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x===a.x&&t.y===a.y};c.exports=m},73565:c=>{/** + */var m=function(t,o){return t.x===o.x&&t.y===o.y};c.exports=m},73565:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2669,7 +2669,7 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){if(r===void 0&&(r=new a),!Array.isArray(o))throw new Error("GetCentroid points argument must be an array");var n=o.length;if(n<1)throw new Error("GetCentroid points array must not be empty");if(n===1)r.x=o[0].x,r.y=o[0].y;else{for(var e=0;e{/** + */var o=t(2141),v=function(a,r){if(r===void 0&&(r=new o),!Array.isArray(a))throw new Error("GetCentroid points argument must be an array");var n=a.length;if(n<1)throw new Error("GetCentroid points array must not be empty");if(n===1)r.x=a[0].x,r.y=a[0].y;else{for(var e=0;e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2681,11 +2681,11 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=function(o,r){r===void 0&&(r=new a);for(var n=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,h=Number.POSITIVE_INFINITY,s=0;sn&&(n=l.x),l.xi&&(i=l.y),l.y{/** + */var o=t(87841),v=function(a,r){r===void 0&&(r=new o);for(var n=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,h=Number.POSITIVE_INFINITY,s=0;sn&&(n=l.x),l.xi&&(i=l.y),l.y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r,n,e){return n===void 0&&(n=0),e===void 0&&(e=new a),e.x=o.x+(r.x-o.x)*n,e.y=o.y+(r.y-o.y)*n,e};c.exports=v},55767:c=>{/** + */var o=t(2141),v=function(a,r,n,e){return n===void 0&&(n=0),e===void 0&&(e=new o),e.x=a.x+(r.x-a.x)*n,e.y=a.y+(r.y-a.y)*n,e};c.exports=v},55767:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2693,80 +2693,80 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){return r===void 0&&(r=new a),r.setTo(-o.x,-o.y)};c.exports=v},2141:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r){return r===void 0&&(r=new o),r.setTo(-a.x,-a.y)};c.exports=v},2141:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23777),o=new a({initialize:function(n,e){n===void 0&&(n=0),e===void 0&&(e=n),this.type=v.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}});c.exports=o},72930:(c,m,t)=>{/** + */var o=t(83419),v=t(23777),a=new o({initialize:function(n,e){n===void 0&&(n=0),e===void 0&&(e=n),this.type=v.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}});c.exports=a},72930:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=t(44405),o=function(r,n,e){e===void 0&&(e=new a);var i=r.x*n.x+r.y*n.y,h=i/v(n);return h!==0&&(e.x=h*n.x,e.y=h*n.y),e};c.exports=o},62880:(c,m,t)=>{/** + */var o=t(2141),v=t(44405),a=function(r,n,e){e===void 0&&(e=new o);var i=r.x*n.x+r.y*n.y,h=i/v(n);return h!==0&&(e.x=h*n.x,e.y=h*n.y),e};c.exports=a},62880:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r,n){n===void 0&&(n=new a);var e=o.x*r.x+o.y*r.y;return e!==0&&(n.x=e*r.x,n.y=e*r.y),n};c.exports=v},15093:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r,n){n===void 0&&(n=new o);var e=a.x*r.x+a.y*r.y;return e!==0&&(n.x=e*r.x,n.y=e*r.y),n};c.exports=v},15093:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(28793),v=function(o,r){if(o.x!==0||o.y!==0){var n=a(o);o.x/=n,o.y/=n}return o.x*=r,o.y*=r,o};c.exports=v},43711:(c,m,t)=>{/** + */var o=t(28793),v=function(a,r){if(a.x!==0||a.y!==0){var n=o(a);a.x/=n,a.y/=n}return a.x*=r,a.y*=r,a};c.exports=v},43711:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141);a.Ceil=t(96550),a.Clone=t(99706),a.CopyFrom=t(68010),a.Equals=t(27814),a.Floor=t(73565),a.GetCentroid=t(87555),a.GetMagnitude=t(28793),a.GetMagnitudeSq=t(44405),a.GetRectangleFromPoints=t(20873),a.Interpolate=t(26152),a.Invert=t(55767),a.Negative=t(79432),a.Project=t(72930),a.ProjectUnit=t(62880),a.SetMagnitude=t(15093),c.exports=a},12306:(c,m,t)=>{/** + */var o=t(2141);o.Ceil=t(96550),o.Clone=t(99706),o.CopyFrom=t(68010),o.Equals=t(27814),o.Floor=t(73565),o.GetCentroid=t(87555),o.GetMagnitude=t(28793),o.GetMagnitudeSq=t(44405),o.GetRectangleFromPoints=t(20873),o.Interpolate=t(26152),o.Invert=t(55767),o.Negative=t(79432),o.Project=t(72930),o.ProjectUnit=t(62880),o.SetMagnitude=t(15093),c.exports=o},12306:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25717),v=function(o){return new a(o.points)};c.exports=v},63814:c=>{/** + */var o=t(25717),v=function(a){return new o(a.points)};c.exports=v},63814:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){for(var o=!1,r=-1,n=t.points.length-1;++r{/** + */var m=function(t,o,v){for(var a=!1,r=-1,n=t.points.length-1;++r{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(63814),v=function(o,r){return a(o,r.x,r.y)};c.exports=v},94811:c=>{/** + */var o=t(63814),v=function(a,r){return o(a,r.x,r.y)};c.exports=v},94811:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function m(X,Y,D){D=D||2;var z=Y&&Y.length,W=z?Y[0]*D:X.length,H=t(X,0,W,D,!0),Z=[];if(!H||H.next===H.prev)return Z;var Q,k,et,st,rt,ot,ft;if(z&&(H=i(X,Y,H,D)),X.length>80*D){Q=et=X[0],k=st=X[1];for(var at=D;atet&&(et=rt),ot>st&&(st=ot);ft=Math.max(et-Q,st-k),ft=ft!==0?32767/ft:0}return v(H,Z,D,Q,k,ft,0),Z}function t(X,Y,D,z,W){var H,Z;if(W===J(X,Y,D,z)>0)for(H=Y;H=Y;H-=z)Z=V(H,X[H],X[H+1],Z);return Z&&C(Z,Z.next)&&(K(Z),Z=Z.next),Z}function a(X,Y){if(!X)return X;Y||(Y=X);var D=X,z;do if(z=!1,!D.steiner&&(C(D,D.next)||T(D.prev,D,D.next)===0)){if(K(D),D=Y=D.prev,D===D.next)break;z=!0}else D=D.next;while(z||D!==Y);return Y}function v(X,Y,D,z,W,H,Z){if(X){!Z&&H&&u(X,z,W,H);for(var Q=X,k,et;X.prev!==X.next;){if(k=X.prev,et=X.next,H?r(X,z,W,H):o(X)){Y.push(k.i/D|0),Y.push(X.i/D|0),Y.push(et.i/D|0),K(X),X=et.next,Q=et.next;continue}if(X=et,X===Q){Z?Z===1?(X=n(a(X),Y,D),v(X,Y,D,z,W,H,2)):Z===2&&e(X,Y,D,z,W,H):v(a(X),Y,D,z,W,H,1);break}}}}function o(X){var Y=X.prev,D=X,z=X.next;if(T(Y,D,z)>=0)return!1;for(var W=Y.x,H=D.x,Z=z.x,Q=Y.y,k=D.y,et=z.y,st=WH?W>Z?W:Z:H>Z?H:Z,ft=Q>k?Q>et?Q:et:k>et?k:et,at=z.next;at!==Y;){if(at.x>=st&&at.x<=ot&&at.y>=rt&&at.y<=ft&&y(W,Q,H,k,Z,et,at.x,at.y)&&T(at.prev,at,at.next)>=0)return!1;at=at.next}return!0}function r(X,Y,D,z){var W=X.prev,H=X,Z=X.next;if(T(W,H,Z)>=0)return!1;for(var Q=W.x,k=H.x,et=Z.x,st=W.y,rt=H.y,ot=Z.y,ft=Qk?Q>et?Q:et:k>et?k:et,Pt=st>rt?st>ot?st:ot:rt>ot?rt:ot,Ct=p(ft,at,Y,D,z),Et=p(vt,Pt,Y,D,z),ct=X.prevZ,Tt=X.nextZ;ct&&ct.z>=Ct&&Tt&&Tt.z<=Et;){if(ct.x>=ft&&ct.x<=vt&&ct.y>=at&&ct.y<=Pt&&ct!==W&&ct!==Z&&y(Q,st,k,rt,et,ot,ct.x,ct.y)&&T(ct.prev,ct,ct.next)>=0||(ct=ct.prevZ,Tt.x>=ft&&Tt.x<=vt&&Tt.y>=at&&Tt.y<=Pt&&Tt!==W&&Tt!==Z&&y(Q,st,k,rt,et,ot,Tt.x,Tt.y)&&T(Tt.prev,Tt,Tt.next)>=0))return!1;Tt=Tt.nextZ}for(;ct&&ct.z>=Ct;){if(ct.x>=ft&&ct.x<=vt&&ct.y>=at&&ct.y<=Pt&&ct!==W&&ct!==Z&&y(Q,st,k,rt,et,ot,ct.x,ct.y)&&T(ct.prev,ct,ct.next)>=0)return!1;ct=ct.prevZ}for(;Tt&&Tt.z<=Et;){if(Tt.x>=ft&&Tt.x<=vt&&Tt.y>=at&&Tt.y<=Pt&&Tt!==W&&Tt!==Z&&y(Q,st,k,rt,et,ot,Tt.x,Tt.y)&&T(Tt.prev,Tt,Tt.next)>=0)return!1;Tt=Tt.nextZ}return!0}function n(X,Y,D){var z=X;do{var W=z.prev,H=z.next.next;!C(W,H)&&M(W,z,z.next,H)&&O(W,H)&&O(H,W)&&(Y.push(W.i/D|0),Y.push(z.i/D|0),Y.push(H.i/D|0),K(z),K(z.next),z=X=H),z=z.next}while(z!==X);return a(z)}function e(X,Y,D,z,W,H){var Z=X;do{for(var Q=Z.next.next;Q!==Z.prev;){if(Z.i!==Q.i&&x(Z,Q)){var k=G(Z,Q);Z=a(Z,Z.next),k=a(k,k.next),v(Z,Y,D,z,W,H,0),v(k,Y,D,z,W,H,0);return}Q=Q.next}Z=Z.next}while(Z!==X)}function i(X,Y,D,z){var W=[],H,Z,Q,k,et;for(H=0,Z=Y.length;H=D.next.y&&D.next.y!==D.y){var Q=D.x+(W-D.y)*(D.next.x-D.x)/(D.next.y-D.y);if(Q<=z&&Q>H&&(H=Q,Z=D.x=D.x&&D.x>=et&&z!==D.x&&y(WZ.x||D.x===Z.x&&f(Z,D)))&&(Z=D,rt=ot)),D=D.next;while(D!==k);return Z}function f(X,Y){return T(X.prev,X,Y.prev)<0&&T(Y.next,X,X.next)<0}function u(X,Y,D,z){var W=X;do W.z===0&&(W.z=p(W.x,W.y,Y,D,z)),W.prevZ=W.prev,W.nextZ=W.next,W=W.next;while(W!==X);W.prevZ.nextZ=null,W.prevZ=null,d(W)}function d(X){var Y,D,z,W,H,Z,Q,k,et=1;do{for(D=X,X=null,H=null,Z=0;D;){for(Z++,z=D,Q=0,Y=0;Y0||k>0&&z;)Q!==0&&(k===0||!z||D.z<=z.z)?(W=D,D=D.nextZ,Q--):(W=z,z=z.nextZ,k--),H?H.nextZ=W:X=W,W.prevZ=H,H=W;D=z}H.nextZ=null,et*=2}while(Z>1);return X}function p(X,Y,D,z,W){return X=(X-D)*W|0,Y=(Y-z)*W|0,X=(X|X<<8)&16711935,X=(X|X<<4)&252645135,X=(X|X<<2)&858993459,X=(X|X<<1)&1431655765,Y=(Y|Y<<8)&16711935,Y=(Y|Y<<4)&252645135,Y=(Y|Y<<2)&858993459,Y=(Y|Y<<1)&1431655765,X|Y<<1}function g(X){var Y=X,D=X;do(Y.x=(X-Z)*(H-Q)&&(X-Z)*(z-Q)>=(D-Z)*(Y-Q)&&(D-Z)*(H-Q)>=(W-Z)*(z-Q)}function x(X,Y){return X.next.i!==Y.i&&X.prev.i!==Y.i&&!F(X,Y)&&(O(X,Y)&&O(Y,X)&&N(X,Y)&&(T(X.prev,X,Y.prev)||T(X,Y.prev,Y))||C(X,Y)&&T(X.prev,X,X.next)>0&&T(Y.prev,Y,Y.next)>0)}function T(X,Y,D){return(Y.y-X.y)*(D.x-Y.x)-(Y.x-X.x)*(D.y-Y.y)}function C(X,Y){return X.x===Y.x&&X.y===Y.y}function M(X,Y,D,z){var W=L(T(X,Y,D)),H=L(T(X,Y,z)),Z=L(T(D,z,X)),Q=L(T(D,z,Y));return!!(W!==H&&Z!==Q||W===0&&w(X,D,Y)||H===0&&w(X,z,Y)||Z===0&&w(D,X,z)||Q===0&&w(D,Y,z))}function w(X,Y,D){return Y.x<=Math.max(X.x,D.x)&&Y.x>=Math.min(X.x,D.x)&&Y.y<=Math.max(X.y,D.y)&&Y.y>=Math.min(X.y,D.y)}function L(X){return X>0?1:X<0?-1:0}function F(X,Y){var D=X;do{if(D.i!==X.i&&D.next.i!==X.i&&D.i!==Y.i&&D.next.i!==Y.i&&M(D,D.next,X,Y))return!0;D=D.next}while(D!==X);return!1}function O(X,Y){return T(X.prev,X,X.next)<0?T(X,Y,X.next)>=0&&T(X,X.prev,Y)>=0:T(X,Y,X.prev)<0||T(X,X.next,Y)<0}function N(X,Y){var D=X,z=!1,W=(X.x+Y.x)/2,H=(X.y+Y.y)/2;do D.y>H!=D.next.y>H&&D.next.y!==D.y&&W<(D.next.x-D.x)*(H-D.y)/(D.next.y-D.y)+D.x&&(z=!z),D=D.next;while(D!==X);return z}function G(X,Y){var D=new $(X.i,X.x,X.y),z=new $(Y.i,Y.x,Y.y),W=X.next,H=Y.prev;return X.next=Y,Y.prev=X,D.next=W,W.prev=D,z.next=D,D.prev=z,H.next=z,z.prev=H,z}function V(X,Y,D,z){var W=new $(X,Y,D);return z?(W.next=z.next,W.prev=z,z.next.prev=W,z.next=W):(W.prev=W,W.next=W),W}function K(X){X.next.prev=X.prev,X.prev.next=X.next,X.prevZ&&(X.prevZ.nextZ=X.nextZ),X.nextZ&&(X.nextZ.prevZ=X.prevZ)}function $(X,Y,D){this.i=X,this.x=Y,this.y=D,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}m.deviation=function(X,Y,D,z){var W=Y&&Y.length,H=W?Y[0]*D:X.length,Z=Math.abs(J(X,0,H,D));if(W)for(var Q=0,k=Y.length;Q0&&(z+=X[W-1].length,D.holes.push(z))}return D},c.exports=m},13829:(c,m,t)=>{/** + */function m(X,Y,b){b=b||2;var z=Y&&Y.length,W=z?Y[0]*b:X.length,H=t(X,0,W,b,!0),Z=[];if(!H||H.next===H.prev)return Z;var Q,k,et,st,rt,ot,ft;if(z&&(H=i(X,Y,H,b)),X.length>80*b){Q=et=X[0],k=st=X[1];for(var at=b;atet&&(et=rt),ot>st&&(st=ot);ft=Math.max(et-Q,st-k),ft=ft!==0?32767/ft:0}return v(H,Z,b,Q,k,ft,0),Z}function t(X,Y,b,z,W){var H,Z;if(W===J(X,Y,b,z)>0)for(H=Y;H=Y;H-=z)Z=V(H,X[H],X[H+1],Z);return Z&&P(Z,Z.next)&&(K(Z),Z=Z.next),Z}function o(X,Y){if(!X)return X;Y||(Y=X);var b=X,z;do if(z=!1,!b.steiner&&(P(b,b.next)||C(b.prev,b,b.next)===0)){if(K(b),b=Y=b.prev,b===b.next)break;z=!0}else b=b.next;while(z||b!==Y);return Y}function v(X,Y,b,z,W,H,Z){if(X){!Z&&H&&u(X,z,W,H);for(var Q=X,k,et;X.prev!==X.next;){if(k=X.prev,et=X.next,H?r(X,z,W,H):a(X)){Y.push(k.i/b|0),Y.push(X.i/b|0),Y.push(et.i/b|0),K(X),X=et.next,Q=et.next;continue}if(X=et,X===Q){Z?Z===1?(X=n(o(X),Y,b),v(X,Y,b,z,W,H,2)):Z===2&&e(X,Y,b,z,W,H):v(o(X),Y,b,z,W,H,1);break}}}}function a(X){var Y=X.prev,b=X,z=X.next;if(C(Y,b,z)>=0)return!1;for(var W=Y.x,H=b.x,Z=z.x,Q=Y.y,k=b.y,et=z.y,st=WH?W>Z?W:Z:H>Z?H:Z,ft=Q>k?Q>et?Q:et:k>et?k:et,at=z.next;at!==Y;){if(at.x>=st&&at.x<=ot&&at.y>=rt&&at.y<=ft&&y(W,Q,H,k,Z,et,at.x,at.y)&&C(at.prev,at,at.next)>=0)return!1;at=at.next}return!0}function r(X,Y,b,z){var W=X.prev,H=X,Z=X.next;if(C(W,H,Z)>=0)return!1;for(var Q=W.x,k=H.x,et=Z.x,st=W.y,rt=H.y,ot=Z.y,ft=Qk?Q>et?Q:et:k>et?k:et,At=st>rt?st>ot?st:ot:rt>ot?rt:ot,Et=p(ft,at,Y,b,z),Pt=p(vt,At,Y,b,z),ct=X.prevZ,Ct=X.nextZ;ct&&ct.z>=Et&&Ct&&Ct.z<=Pt;){if(ct.x>=ft&&ct.x<=vt&&ct.y>=at&&ct.y<=At&&ct!==W&&ct!==Z&&y(Q,st,k,rt,et,ot,ct.x,ct.y)&&C(ct.prev,ct,ct.next)>=0||(ct=ct.prevZ,Ct.x>=ft&&Ct.x<=vt&&Ct.y>=at&&Ct.y<=At&&Ct!==W&&Ct!==Z&&y(Q,st,k,rt,et,ot,Ct.x,Ct.y)&&C(Ct.prev,Ct,Ct.next)>=0))return!1;Ct=Ct.nextZ}for(;ct&&ct.z>=Et;){if(ct.x>=ft&&ct.x<=vt&&ct.y>=at&&ct.y<=At&&ct!==W&&ct!==Z&&y(Q,st,k,rt,et,ot,ct.x,ct.y)&&C(ct.prev,ct,ct.next)>=0)return!1;ct=ct.prevZ}for(;Ct&&Ct.z<=Pt;){if(Ct.x>=ft&&Ct.x<=vt&&Ct.y>=at&&Ct.y<=At&&Ct!==W&&Ct!==Z&&y(Q,st,k,rt,et,ot,Ct.x,Ct.y)&&C(Ct.prev,Ct,Ct.next)>=0)return!1;Ct=Ct.nextZ}return!0}function n(X,Y,b){var z=X;do{var W=z.prev,H=z.next.next;!P(W,H)&&M(W,z,z.next,H)&&B(W,H)&&B(H,W)&&(Y.push(W.i/b|0),Y.push(z.i/b|0),Y.push(H.i/b|0),K(z),K(z.next),z=X=H),z=z.next}while(z!==X);return o(z)}function e(X,Y,b,z,W,H){var Z=X;do{for(var Q=Z.next.next;Q!==Z.prev;){if(Z.i!==Q.i&&x(Z,Q)){var k=G(Z,Q);Z=o(Z,Z.next),k=o(k,k.next),v(Z,Y,b,z,W,H,0),v(k,Y,b,z,W,H,0);return}Q=Q.next}Z=Z.next}while(Z!==X)}function i(X,Y,b,z){var W=[],H,Z,Q,k,et;for(H=0,Z=Y.length;H=b.next.y&&b.next.y!==b.y){var Q=b.x+(W-b.y)*(b.next.x-b.x)/(b.next.y-b.y);if(Q<=z&&Q>H&&(H=Q,Z=b.x=b.x&&b.x>=et&&z!==b.x&&y(WZ.x||b.x===Z.x&&f(Z,b)))&&(Z=b,rt=ot)),b=b.next;while(b!==k);return Z}function f(X,Y){return C(X.prev,X,Y.prev)<0&&C(Y.next,X,X.next)<0}function u(X,Y,b,z){var W=X;do W.z===0&&(W.z=p(W.x,W.y,Y,b,z)),W.prevZ=W.prev,W.nextZ=W.next,W=W.next;while(W!==X);W.prevZ.nextZ=null,W.prevZ=null,d(W)}function d(X){var Y,b,z,W,H,Z,Q,k,et=1;do{for(b=X,X=null,H=null,Z=0;b;){for(Z++,z=b,Q=0,Y=0;Y0||k>0&&z;)Q!==0&&(k===0||!z||b.z<=z.z)?(W=b,b=b.nextZ,Q--):(W=z,z=z.nextZ,k--),H?H.nextZ=W:X=W,W.prevZ=H,H=W;b=z}H.nextZ=null,et*=2}while(Z>1);return X}function p(X,Y,b,z,W){return X=(X-b)*W|0,Y=(Y-z)*W|0,X=(X|X<<8)&16711935,X=(X|X<<4)&252645135,X=(X|X<<2)&858993459,X=(X|X<<1)&1431655765,Y=(Y|Y<<8)&16711935,Y=(Y|Y<<4)&252645135,Y=(Y|Y<<2)&858993459,Y=(Y|Y<<1)&1431655765,X|Y<<1}function g(X){var Y=X,b=X;do(Y.x=(X-Z)*(H-Q)&&(X-Z)*(z-Q)>=(b-Z)*(Y-Q)&&(b-Z)*(H-Q)>=(W-Z)*(z-Q)}function x(X,Y){return X.next.i!==Y.i&&X.prev.i!==Y.i&&!L(X,Y)&&(B(X,Y)&&B(Y,X)&&N(X,Y)&&(C(X.prev,X,Y.prev)||C(X,Y.prev,Y))||P(X,Y)&&C(X.prev,X,X.next)>0&&C(Y.prev,Y,Y.next)>0)}function C(X,Y,b){return(Y.y-X.y)*(b.x-Y.x)-(Y.x-X.x)*(b.y-Y.y)}function P(X,Y){return X.x===Y.x&&X.y===Y.y}function M(X,Y,b,z){var W=I(C(X,Y,b)),H=I(C(X,Y,z)),Z=I(C(b,z,X)),Q=I(C(b,z,Y));return!!(W!==H&&Z!==Q||W===0&&w(X,b,Y)||H===0&&w(X,z,Y)||Z===0&&w(b,X,z)||Q===0&&w(b,Y,z))}function w(X,Y,b){return Y.x<=Math.max(X.x,b.x)&&Y.x>=Math.min(X.x,b.x)&&Y.y<=Math.max(X.y,b.y)&&Y.y>=Math.min(X.y,b.y)}function I(X){return X>0?1:X<0?-1:0}function L(X,Y){var b=X;do{if(b.i!==X.i&&b.next.i!==X.i&&b.i!==Y.i&&b.next.i!==Y.i&&M(b,b.next,X,Y))return!0;b=b.next}while(b!==X);return!1}function B(X,Y){return C(X.prev,X,X.next)<0?C(X,Y,X.next)>=0&&C(X,X.prev,Y)>=0:C(X,Y,X.prev)<0||C(X,X.next,Y)<0}function N(X,Y){var b=X,z=!1,W=(X.x+Y.x)/2,H=(X.y+Y.y)/2;do b.y>H!=b.next.y>H&&b.next.y!==b.y&&W<(b.next.x-b.x)*(H-b.y)/(b.next.y-b.y)+b.x&&(z=!z),b=b.next;while(b!==X);return z}function G(X,Y){var b=new j(X.i,X.x,X.y),z=new j(Y.i,Y.x,Y.y),W=X.next,H=Y.prev;return X.next=Y,Y.prev=X,b.next=W,W.prev=b,z.next=b,b.prev=z,H.next=z,z.prev=H,z}function V(X,Y,b,z){var W=new j(X,Y,b);return z?(W.next=z.next,W.prev=z,z.next.prev=W,z.next=W):(W.prev=W,W.next=W),W}function K(X){X.next.prev=X.prev,X.prev.next=X.next,X.prevZ&&(X.prevZ.nextZ=X.nextZ),X.nextZ&&(X.nextZ.prevZ=X.prevZ)}function j(X,Y,b){this.i=X,this.x=Y,this.y=b,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}m.deviation=function(X,Y,b,z){var W=Y&&Y.length,H=W?Y[0]*b:X.length,Z=Math.abs(J(X,0,H,b));if(W)for(var Q=0,k=Y.length;Q0&&(z+=X[W-1].length,b.holes.push(z))}return b},c.exports=m},13829:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=function(o,r){r===void 0&&(r=new a);for(var n=1/0,e=1/0,i=-n,h=-e,s,l=0;l{/** + */var o=t(87841),v=function(a,r){r===void 0&&(r=new o);for(var n=1/0,e=1/0,i=-n,h=-e,s,l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=[]);for(var v=0;v{/** + */var m=function(t,o){o===void 0&&(o=[]);for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35001),v=t(23031),o=t(30052),r=function(n,e,i,h){h===void 0&&(h=[]);var s=n.points,l=o(n);!e&&i>0&&(e=l/i);for(var f=0;fd+T){d+=T;continue}var C=x.getPoint((u-d)/T);h.push(C);break}return h};c.exports=r},30052:(c,m,t)=>{/** + */var o=t(35001),v=t(23031),a=t(30052),r=function(n,e,i,h){h===void 0&&(h=[]);var s=n.points,l=a(n);!e&&i>0&&(e=l/i);for(var f=0;fd+C){d+=C;continue}var P=x.getPoint((u-d)/C);h.push(P);break}return h};c.exports=r},30052:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35001),v=t(23031),o=function(r){for(var n=r.points,e=0,i=0;i{/** + */var o=t(35001),v=t(23031),a=function(r){for(var n=r.points,e=0,i=0;i{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(63814),o=t(9564),r=t(23777),n=new a({initialize:function(i){this.type=r.POLYGON,this.area=0,this.points=[],i&&this.setTo(i)},contains:function(e,i){return v(this,e,i)},setTo:function(e){if(this.area=0,this.points=[],typeof e=="string"&&(e=e.split(" ")),!Array.isArray(e))return this;for(var i,h=0;h{/** + */var o=t(83419),v=t(63814),a=t(9564),r=t(23777),n=new o({initialize:function(i){this.type=r.POLYGON,this.area=0,this.points=[],i&&this.setTo(i)},contains:function(e,i){return v(this,e,i)},setTo:function(e){if(this.area=0,this.points=[],typeof e=="string"&&(e=e.split(" ")),!Array.isArray(e))return this;for(var i,h=0;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.points.reverse(),t};c.exports=m},29524:c=>{function m(n,e){var i=n.x-e.x,h=n.y-e.y;return i*i+h*h}function t(n,e,i){var h=e.x,s=e.y,l=i.x-h,f=i.y-s;if(l!==0||f!==0){var u=((n.x-h)*l+(n.y-s)*f)/(l*l+f*f);u>1?(h=i.x,s=i.y):u>0&&(h+=l*u,s+=f*u)}return l=n.x-h,f=n.y-s,l*l+f*f}function a(n,e){for(var i=n[0],h=[i],s,l=1,f=n.length;le&&(h.push(s),i=s);return i!==s&&h.push(s),h}function v(n,e,i,h,s){for(var l=h,f,u=e+1;ul&&(f=u,l=d)}l>h&&(f-e>1&&v(n,e,f,h,s),s.push(n[f]),i-f>1&&v(n,f,i,h,s))}function o(n,e){var i=n.length-1,h=[n[0]];return v(n,0,i,e,h),h.push(n[i]),h}var r=function(n,e,i){e===void 0&&(e=1),i===void 0&&(i=!1);var h=n.points;if(h.length>2){var s=e*e;i||(h=a(h,s)),n.setTo(o(h,s))}return n};c.exports=r},5469:c=>{/** + */var m=function(t){return t.points.reverse(),t};c.exports=m},29524:c=>{function m(n,e){var i=n.x-e.x,h=n.y-e.y;return i*i+h*h}function t(n,e,i){var h=e.x,s=e.y,l=i.x-h,f=i.y-s;if(l!==0||f!==0){var u=((n.x-h)*l+(n.y-s)*f)/(l*l+f*f);u>1?(h=i.x,s=i.y):u>0&&(h+=l*u,s+=f*u)}return l=n.x-h,f=n.y-s,l*l+f*f}function o(n,e){for(var i=n[0],h=[i],s,l=1,f=n.length;le&&(h.push(s),i=s);return i!==s&&h.push(s),h}function v(n,e,i,h,s){for(var l=h,f,u=e+1;ul&&(f=u,l=d)}l>h&&(f-e>1&&v(n,e,f,h,s),s.push(n[f]),i-f>1&&v(n,f,i,h,s))}function a(n,e){var i=n.length-1,h=[n[0]];return v(n,0,i,e,h),h.push(n[i]),h}var r=function(n,e,i){e===void 0&&(e=1),i===void 0&&(i=!1);var h=n.points;if(h.length>2){var s=e*e;i||(h=o(h,s)),n.setTo(a(h,s))}return n};c.exports=r},5469:c=>{/** * @author Richard Davey * @author Igor Ognichenko * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(a,v){return a[0]=v[0],a[1]=v[1],a},t=function(a){var v,o=[],r=a.points;for(v=0;v0&&n.push(m([0,0],o[0])),v=0;v1&&n.push(m([0,0],o[o.length-1])),a.setTo(n)};c.exports=t},24709:c=>{/** + */var m=function(o,v){return o[0]=v[0],o[1]=v[1],o},t=function(o){var v,a=[],r=o.points;for(v=0;v0&&n.push(m([0,0],a[0])),v=0;v1&&n.push(m([0,0],a[a.length-1])),o.setTo(n)};c.exports=t},24709:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){for(var o=t.points,r=0;r{/** + */var m=function(t,o,v){for(var a=t.points,r=0;r{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25717);a.Clone=t(12306),a.Contains=t(63814),a.ContainsPoint=t(99338),a.Earcut=t(94811),a.GetAABB=t(13829),a.GetNumberArray=t(26173),a.GetPoints=t(9564),a.Perimeter=t(30052),a.Reverse=t(8133),a.Simplify=t(29524),a.Smooth=t(5469),a.Translate=t(24709),c.exports=a},62224:c=>{/** + */var o=t(25717);o.Clone=t(12306),o.Contains=t(63814),o.ContainsPoint=t(99338),o.Earcut=t(94811),o.GetAABB=t(13829),o.GetNumberArray=t(26173),o.GetPoints=t(9564),o.Perimeter=t(30052),o.Reverse=t(8133),o.Simplify=t(29524),o.Smooth=t(5469),o.Translate=t(24709),c.exports=o},62224:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2782,43 +2782,43 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t.x=a-t.width/2,t.y=v-t.height/2,t};c.exports=m},65085:(c,m,t)=>{/** + */var m=function(t,o,v){return t.x=o-t.width/2,t.y=v-t.height/2,t};c.exports=m},65085:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=function(o){return new a(o.x,o.y,o.width,o.height)};c.exports=v},37303:c=>{/** + */var o=t(87841),v=function(a){return new o(a.x,a.y,a.width,a.height)};c.exports=v},37303:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t.width<=0||t.height<=0?!1:t.x<=a&&t.x+t.width>=a&&t.y<=v&&t.y+t.height>=v};c.exports=m},96553:(c,m,t)=>{/** + */var m=function(t,o,v){return t.width<=0||t.height<=0?!1:t.x<=o&&t.x+t.width>=o&&t.y<=v&&t.y+t.height>=v};c.exports=m},96553:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37303),v=function(o,r){return a(o,r.x,r.y)};c.exports=v},70273:c=>{/** + */var o=t(37303),v=function(a,r){return o(a,r.x,r.y)};c.exports=v},70273:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.width*a.height>t.width*t.height?!1:a.x>t.x&&a.xt.x&&a.rightt.y&&a.yt.y&&a.bottom{/** + */var m=function(t,o){return o.width*o.height>t.width*t.height?!1:o.x>t.x&&o.xt.x&&o.rightt.y&&o.yt.y&&o.bottom{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.setTo(t.x,t.y,t.width,t.height)};c.exports=m},77493:c=>{/** + */var m=function(t,o){return o.setTo(t.x,t.y,t.width,t.height)};c.exports=m},77493:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=[]),a.push({x:t.x,y:t.y}),a.push({x:t.right,y:t.y}),a.push({x:t.right,y:t.bottom}),a.push({x:t.x,y:t.bottom}),a};c.exports=m},9219:c=>{/** + */var m=function(t,o){return o===void 0&&(o=[]),o.push({x:t.x,y:t.y}),o.push({x:t.right,y:t.y}),o.push({x:t.right,y:t.bottom}),o.push({x:t.x,y:t.bottom}),o};c.exports=m},9219:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x===a.x&&t.y===a.y&&t.width===a.width&&t.height===a.height};c.exports=m},53751:(c,m,t)=>{/** + */var m=function(t,o){return t.x===o.x&&t.y===o.y&&t.width===o.width&&t.height===o.height};c.exports=m},53751:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(8249),v=function(o,r){var n=a(o);return n{/** + */var o=t(8249),v=function(a,r){var n=o(a);return n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(8249),v=function(o,r){var n=a(o);return n>a(r)?o.setSize(r.height*n,r.height):o.setSize(r.width,r.width/n),o.setPosition(r.centerX-o.width/2,r.centerY-o.height/2)};c.exports=v},80774:c=>{/** + */var o=t(8249),v=function(a,r){var n=o(a);return n>o(r)?a.setSize(r.height*n,r.height):a.setSize(r.width,r.width/n),a.setPosition(r.centerX-a.width/2,r.centerY-a.height/2)};c.exports=v},80774:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2830,11 +2830,11 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=t(36383),o=function(r,n){if(n===void 0&&(n=new a),r.length===0)return n;for(var e=Number.MAX_VALUE,i=Number.MAX_VALUE,h=v.MIN_SAFE_INTEGER,s=v.MIN_SAFE_INTEGER,l,f,u,d=0;d{/** + */var o=t(87841),v=t(36383),a=function(r,n){if(n===void 0&&(n=new o),r.length===0)return n;for(var e=Number.MAX_VALUE,i=Number.MAX_VALUE,h=v.MIN_SAFE_INTEGER,s=v.MIN_SAFE_INTEGER,l,f,u,d=0;d{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=function(o,r,n,e,i){return i===void 0&&(i=new a),i.setTo(Math.min(o,n),Math.min(r,e),Math.abs(o-n),Math.abs(r-e))};c.exports=v},8249:c=>{/** + */var o=t(87841),v=function(a,r,n,e,i){return i===void 0&&(i=new o),i.setTo(Math.min(a,n),Math.min(r,e),Math.abs(a-n),Math.abs(r-e))};c.exports=v},8249:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2842,55 +2842,55 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){return r===void 0&&(r=new a),r.x=o.centerX,r.y=o.centerY,r};c.exports=v},20812:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r){return r===void 0&&(r=new o),r.x=a.centerX,r.y=a.centerY,r};c.exports=v},20812:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(13019),v=t(2141),o=function(r,n,e){if(e===void 0&&(e=new v),n<=0||n>=1)return e.x=r.x,e.y=r.y,e;var i=a(r)*n;return n>.5?(i-=r.width+r.height,i<=r.width?(e.x=r.right-i,e.y=r.bottom):(e.x=r.x,e.y=r.bottom-(i-r.width))):i<=r.width?(e.x=r.x+i,e.y=r.y):(e.x=r.right,e.y=r.y+(i-r.width)),e};c.exports=o},34819:(c,m,t)=>{/** + */var o=t(13019),v=t(2141),a=function(r,n,e){if(e===void 0&&(e=new v),n<=0||n>=1)return e.x=r.x,e.y=r.y,e;var i=o(r)*n;return n>.5?(i-=r.width+r.height,i<=r.width?(e.x=r.right-i,e.y=r.bottom):(e.x=r.x,e.y=r.bottom-(i-r.width))):i<=r.width?(e.x=r.x+i,e.y=r.y):(e.x=r.right,e.y=r.y+(i-r.width)),e};c.exports=a},34819:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20812),v=t(13019),o=function(r,n,e,i){i===void 0&&(i=[]),!n&&e>0&&(n=v(r)/e);for(var h=0;h{/** + */var o=t(20812),v=t(13019),a=function(r,n,e,i){i===void 0&&(i=[]),!n&&e>0&&(n=v(r)/e);for(var h=0;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){return r===void 0&&(r=new a),r.x=o.width,r.y=o.height,r};c.exports=v},86091:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r){return r===void 0&&(r=new o),r.x=a.width,r.y=a.height,r};c.exports=v},86091:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(67502),v=function(o,r,n){var e=o.centerX,i=o.centerY;return o.setSize(o.width+r*2,o.height+n*2),a(o,e,i)};c.exports=v},53951:(c,m,t)=>{/** + */var o=t(67502),v=function(a,r,n){var e=a.centerX,i=a.centerY;return a.setSize(a.width+r*2,a.height+n*2),o(a,e,i)};c.exports=v},53951:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=t(59996),o=function(r,n,e){return e===void 0&&(e=new a),v(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};c.exports=o},14649:(c,m,t)=>{/** + */var o=t(87841),v=t(59996),a=function(r,n,e){return e===void 0&&(e=new o),v(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};c.exports=a},14649:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(13019),v=t(2141),o=function(r,n,e,i){if(i===void 0&&(i=[]),!n&&!e)return i;n?e=Math.round(a(r)/n):n=a(r)/e;for(var h=r.x,s=r.y,l=0,f=0;f=r.right&&(l=1,s+=h-r.right,h=r.right);break;case 1:s+=n,s>=r.bottom&&(l=2,h-=s-r.bottom,s=r.bottom);break;case 2:h-=n,h<=r.left&&(l=3,s-=r.left-h,h=r.left);break;case 3:s-=n,s<=r.top&&(l=0,s=r.top);break}return i};c.exports=o},33595:c=>{/** + */var o=t(13019),v=t(2141),a=function(r,n,e,i){if(i===void 0&&(i=[]),!n&&!e)return i;n?e=Math.round(o(r)/n):n=o(r)/e;for(var h=r.x,s=r.y,l=0,f=0;f=r.right&&(l=1,s+=h-r.right,h=r.right);break;case 1:s+=n,s>=r.bottom&&(l=2,h-=s-r.bottom,s=r.bottom);break;case 2:h-=n,h<=r.left&&(l=3,s-=r.left-h,h=r.left);break;case 3:s-=n,s<=r.top&&(l=0,s=r.top);break}return i};c.exports=a},33595:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){for(var v=t.x,o=t.right,r=t.y,n=t.bottom,e=0;e{/** + */var m=function(t,o){for(var v=t.x,a=t.right,r=t.y,n=t.bottom,e=0;e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=Math.min(t.x,a.x),o=Math.max(t.right,a.right);t.x=v,t.width=o-v;var r=Math.min(t.y,a.y),n=Math.max(t.bottom,a.bottom);return t.y=r,t.height=n-r,t};c.exports=m},92171:c=>{/** + */var m=function(t,o){var v=Math.min(t.x,o.x),a=Math.max(t.right,o.right);t.x=v,t.width=a-v;var r=Math.min(t.y,o.y),n=Math.max(t.bottom,o.bottom);return t.y=r,t.height=n-r,t};c.exports=m},92171:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=Math.min(t.x,a),r=Math.max(t.right,a);t.x=o,t.width=r-o;var n=Math.min(t.y,v),e=Math.max(t.bottom,v);return t.y=n,t.height=e-n,t};c.exports=m},42981:c=>{/** + */var m=function(t,o,v){var a=Math.min(t.x,o),r=Math.max(t.right,o);t.x=a,t.width=r-a;var n=Math.min(t.y,v),e=Math.max(t.bottom,v);return t.y=n,t.height=e-n,t};c.exports=m},42981:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t.x+=a,t.y+=v,t};c.exports=m},46907:c=>{/** + */var m=function(t,o,v){return t.x+=o,t.y+=v,t};c.exports=m},46907:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x+=a.x,t.y+=a.y,t};c.exports=m},60170:c=>{/** + */var m=function(t,o){return t.x+=o.x,t.y+=o.y,t};c.exports=m},60170:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.xa.x&&t.ya.y};c.exports=m},13019:c=>{/** + */var m=function(t,o){return t.xo.x&&t.yo.y};c.exports=m},13019:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2898,163 +2898,163 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=t(39506),o=function(r,n,e){e===void 0&&(e=new a),n=v(n);var i=Math.sin(n),h=Math.cos(n),s=h>0?r.width/2:r.width/-2,l=i>0?r.height/2:r.height/-2;return Math.abs(s*i){/** + */var o=t(2141),v=t(39506),a=function(r,n,e){e===void 0&&(e=new o),n=v(n);var i=Math.sin(n),h=Math.cos(n),s=h>0?r.width/2:r.width/-2,l=i>0?r.height/2:r.height/-2;return Math.abs(s*i){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){return r===void 0&&(r=new a),r.x=o.x+Math.random()*o.width,r.y=o.y+Math.random()*o.height,r};c.exports=v},86470:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r){return r===void 0&&(r=new o),r.x=a.x+Math.random()*a.width,r.y=a.y+Math.random()*a.height,r};c.exports=v},86470:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(30976),v=t(70273),o=t(2141),r=function(n,e,i){if(i===void 0&&(i=new o),v(n,e))switch(a(0,3)){case 0:i.x=n.x+Math.random()*(e.right-n.x),i.y=n.y+Math.random()*(e.top-n.y);break;case 1:i.x=e.x+Math.random()*(n.right-e.x),i.y=e.bottom+Math.random()*(n.bottom-e.bottom);break;case 2:i.x=n.x+Math.random()*(e.x-n.x),i.y=e.y+Math.random()*(n.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(n.right-e.right),i.y=n.y+Math.random()*(e.bottom-n.y);break}return i};c.exports=r},87841:(c,m,t)=>{/** + */var o=t(30976),v=t(70273),a=t(2141),r=function(n,e,i){if(i===void 0&&(i=new a),v(n,e))switch(o(0,3)){case 0:i.x=n.x+Math.random()*(e.right-n.x),i.y=n.y+Math.random()*(e.top-n.y);break;case 1:i.x=e.x+Math.random()*(n.right-e.x),i.y=e.bottom+Math.random()*(n.bottom-e.bottom);break;case 2:i.x=n.x+Math.random()*(e.x-n.x),i.y=e.y+Math.random()*(n.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(n.right-e.right),i.y=n.y+Math.random()*(e.bottom-n.y);break}return i};c.exports=r},87841:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(37303),o=t(20812),r=t(34819),n=t(23777),e=t(23031),i=t(26597),h=new a({initialize:function(l,f,u,d){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),this.type=n.RECTANGLE,this.x=l,this.y=f,this.width=u,this.height=d},contains:function(s,l){return v(this,s,l)},getPoint:function(s,l){return o(this,s,l)},getPoints:function(s,l,f){return r(this,s,l,f)},getRandomPoint:function(s){return i(this,s)},setTo:function(s,l,f,u){return this.x=s,this.y=l,this.width=f,this.height=u,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(s,l){return l===void 0&&(l=s),this.x=s,this.y=l,this},setSize:function(s,l){return l===void 0&&(l=s),this.width=s,this.height=l,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(s){return s===void 0&&(s=new e),s.setTo(this.x,this.y,this.right,this.y),s},getLineB:function(s){return s===void 0&&(s=new e),s.setTo(this.right,this.y,this.right,this.bottom),s},getLineC:function(s){return s===void 0&&(s=new e),s.setTo(this.right,this.bottom,this.x,this.bottom),s},getLineD:function(s){return s===void 0&&(s=new e),s.setTo(this.x,this.bottom,this.x,this.y),s},left:{get:function(){return this.x},set:function(s){s>=this.right?this.width=0:this.width=this.right-s,this.x=s}},right:{get:function(){return this.x+this.width},set:function(s){s<=this.x?this.width=0:this.width=s-this.x}},top:{get:function(){return this.y},set:function(s){s>=this.bottom?this.height=0:this.height=this.bottom-s,this.y=s}},bottom:{get:function(){return this.y+this.height},set:function(s){s<=this.y?this.height=0:this.height=s-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(s){this.x=s-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(s){this.y=s-this.height/2}}});c.exports=h},94845:c=>{/** + */var o=t(83419),v=t(37303),a=t(20812),r=t(34819),n=t(23777),e=t(23031),i=t(26597),h=new o({initialize:function(l,f,u,d){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),this.type=n.RECTANGLE,this.x=l,this.y=f,this.width=u,this.height=d},contains:function(s,l){return v(this,s,l)},getPoint:function(s,l){return a(this,s,l)},getPoints:function(s,l,f){return r(this,s,l,f)},getRandomPoint:function(s){return i(this,s)},setTo:function(s,l,f,u){return this.x=s,this.y=l,this.width=f,this.height=u,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(s,l){return l===void 0&&(l=s),this.x=s,this.y=l,this},setSize:function(s,l){return l===void 0&&(l=s),this.width=s,this.height=l,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(s){return s===void 0&&(s=new e),s.setTo(this.x,this.y,this.right,this.y),s},getLineB:function(s){return s===void 0&&(s=new e),s.setTo(this.right,this.y,this.right,this.bottom),s},getLineC:function(s){return s===void 0&&(s=new e),s.setTo(this.right,this.bottom,this.x,this.bottom),s},getLineD:function(s){return s===void 0&&(s=new e),s.setTo(this.x,this.bottom,this.x,this.y),s},left:{get:function(){return this.x},set:function(s){s>=this.right?this.width=0:this.width=this.right-s,this.x=s}},right:{get:function(){return this.x+this.width},set:function(s){s<=this.x?this.width=0:this.width=s-this.x}},top:{get:function(){return this.y},set:function(s){s>=this.bottom?this.height=0:this.height=this.bottom-s,this.y=s}},bottom:{get:function(){return this.y+this.height},set:function(s){s<=this.y?this.height=0:this.height=s-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(s){this.x=s-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(s){this.y=s-this.height/2}}});c.exports=h},94845:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.width===a.width&&t.height===a.height};c.exports=m},31730:c=>{/** + */var m=function(t,o){return t.width===o.width&&t.height===o.height};c.exports=m},31730:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return v===void 0&&(v=a),t.width*=a,t.height*=v,t};c.exports=m},36899:(c,m,t)=>{/** + */var m=function(t,o,v){return v===void 0&&(v=o),t.width*=o,t.height*=v,t};c.exports=m},36899:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=function(o,r,n){n===void 0&&(n=new a);var e=Math.min(o.x,r.x),i=Math.min(o.y,r.y),h=Math.max(o.right,r.right)-e,s=Math.max(o.bottom,r.bottom)-i;return n.setTo(e,i,h,s)};c.exports=v},93232:(c,m,t)=>{/** + */var o=t(87841),v=function(a,r,n){n===void 0&&(n=new o);var e=Math.min(a.x,r.x),i=Math.min(a.y,r.y),h=Math.max(a.right,r.right)-e,s=Math.max(a.bottom,r.bottom)-i;return n.setTo(e,i,h,s)};c.exports=v},93232:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841);a.Area=t(62224),a.Ceil=t(98615),a.CeilAll=t(31688),a.CenterOn=t(67502),a.Clone=t(65085),a.Contains=t(37303),a.ContainsPoint=t(96553),a.ContainsRect=t(70273),a.CopyFrom=t(43459),a.Decompose=t(77493),a.Equals=t(9219),a.FitInside=t(53751),a.FitOutside=t(16088),a.Floor=t(80774),a.FloorAll=t(83859),a.FromPoints=t(19217),a.FromXY=t(9477),a.GetAspectRatio=t(8249),a.GetCenter=t(27165),a.GetPoint=t(20812),a.GetPoints=t(34819),a.GetSize=t(51313),a.Inflate=t(86091),a.Intersection=t(53951),a.MarchingAnts=t(14649),a.MergePoints=t(33595),a.MergeRect=t(20074),a.MergeXY=t(92171),a.Offset=t(42981),a.OffsetPoint=t(46907),a.Overlaps=t(60170),a.Perimeter=t(13019),a.PerimeterPoint=t(85133),a.Random=t(26597),a.RandomOutside=t(86470),a.SameDimensions=t(94845),a.Scale=t(31730),a.Union=t(36899),c.exports=a},41658:c=>{/** + */var o=t(87841);o.Area=t(62224),o.Ceil=t(98615),o.CeilAll=t(31688),o.CenterOn=t(67502),o.Clone=t(65085),o.Contains=t(37303),o.ContainsPoint=t(96553),o.ContainsRect=t(70273),o.CopyFrom=t(43459),o.Decompose=t(77493),o.Equals=t(9219),o.FitInside=t(53751),o.FitOutside=t(16088),o.Floor=t(80774),o.FloorAll=t(83859),o.FromPoints=t(19217),o.FromXY=t(9477),o.GetAspectRatio=t(8249),o.GetCenter=t(27165),o.GetPoint=t(20812),o.GetPoints=t(34819),o.GetSize=t(51313),o.Inflate=t(86091),o.Intersection=t(53951),o.MarchingAnts=t(14649),o.MergePoints=t(33595),o.MergeRect=t(20074),o.MergeXY=t(92171),o.Offset=t(42981),o.OffsetPoint=t(46907),o.Overlaps=t(60170),o.Perimeter=t(13019),o.PerimeterPoint=t(85133),o.Random=t(26597),o.RandomOutside=t(86470),o.SameDimensions=t(94845),o.Scale=t(31730),o.Union=t(36899),c.exports=o},41658:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=t.x1,v=t.y1,o=t.x2,r=t.y2,n=t.x3,e=t.y3;return Math.abs(((n-a)*(r-v)-(o-a)*(e-v))/2)};c.exports=m},39208:(c,m,t)=>{/** + */var m=function(t){var o=t.x1,v=t.y1,a=t.x2,r=t.y2,n=t.x3,e=t.y3;return Math.abs(((n-o)*(r-v)-(a-o)*(e-v))/2)};c.exports=m},39208:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(16483),v=function(o,r,n){var e=n*(Math.sqrt(3)/2),i=o,h=r,s=o+n/2,l=r+e,f=o-n/2,u=r+e;return new a(i,h,s,l,f,u)};c.exports=v},39545:(c,m,t)=>{/** + */var o=t(16483),v=function(a,r,n){var e=n*(Math.sqrt(3)/2),i=a,h=r,s=a+n/2,l=r+e,f=a-n/2,u=r+e;return new o(i,h,s,l,f,u)};c.exports=v},39545:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(94811),v=t(16483),o=function(r,n,e,i,h){n===void 0&&(n=null),e===void 0&&(e=1),i===void 0&&(i=1),h===void 0&&(h=[]);for(var s=a(r,n),l,f,u,d,p,g,y,x,T,C=0;C{/** + */var o=t(94811),v=t(16483),a=function(r,n,e,i,h){n===void 0&&(n=null),e===void 0&&(e=1),i===void 0&&(i=1),h===void 0&&(h=[]);for(var s=o(r,n),l,f,u,d,p,g,y,x,C,P=0;P{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(16483),v=function(o,r,n,e){e===void 0&&(e=n);var i=o,h=r,s=o,l=r-e,f=o+n,u=r;return new a(i,h,s,l,f,u)};c.exports=v},23707:(c,m,t)=>{/** + */var o=t(16483),v=function(a,r,n,e){e===void 0&&(e=n);var i=a,h=r,s=a,l=r-e,f=a+n,u=r;return new o(i,h,s,l,f,u)};c.exports=v},23707:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(97523),v=t(13584),o=function(r,n,e,i){i===void 0&&(i=a);var h=i(r),s=n-h.x,l=e-h.y;return v(r,s,l)};c.exports=o},97523:(c,m,t)=>{/** + */var o=t(97523),v=t(13584),a=function(r,n,e,i){i===void 0&&(i=o);var h=i(r),s=n-h.x,l=e-h.y;return v(r,s,l)};c.exports=a},97523:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){return r===void 0&&(r=new a),r.x=(o.x1+o.x2+o.x3)/3,r.y=(o.y1+o.y2+o.y3)/3,r};c.exports=v},24951:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r){return r===void 0&&(r=new o),r.x=(a.x1+a.x2+a.x3)/3,r.y=(a.y1+a.y2+a.y3)/3,r};c.exports=v},24951:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099);function v(r,n,e,i){return r*i-n*e}var o=function(r,n){n===void 0&&(n=new a);var e=r.x3,i=r.y3,h=r.x1-e,s=r.y1-i,l=r.x2-e,f=r.y2-i,u=2*v(h,s,l,f),d=v(s,h*h+s*s,f,l*l+f*f),p=v(h,h*h+s*s,l,l*l+f*f);return n.x=e-d/u,n.y=i+p/u,n};c.exports=o},85614:(c,m,t)=>{/** + */var o=t(26099);function v(r,n,e,i){return r*i-n*e}var a=function(r,n){n===void 0&&(n=new o);var e=r.x3,i=r.y3,h=r.x1-e,s=r.y1-i,l=r.x2-e,f=r.y2-i,u=2*v(h,s,l,f),d=v(s,h*h+s*s,f,l*l+f*f),p=v(h,h*h+s*s,l,l*l+f*f);return n.x=e-d/u,n.y=i+p/u,n};c.exports=a},85614:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(96503),v=function(o,r){r===void 0&&(r=new a);var n=o.x1,e=o.y1,i=o.x2,h=o.y2,s=o.x3,l=o.y3,f=i-n,u=h-e,d=s-n,p=l-e,g=f*(n+i)+u*(e+h),y=d*(n+s)+p*(e+l),x=2*(f*(l-h)-u*(s-i)),T,C;if(Math.abs(x)<1e-6){var M=Math.min(n,i,s),w=Math.min(e,h,l);T=(Math.max(n,i,s)-M)*.5,C=(Math.max(e,h,l)-w)*.5,r.x=M+T,r.y=w+C,r.radius=Math.sqrt(T*T+C*C)}else r.x=(p*g-u*y)/x,r.y=(f*y-d*g)/x,T=r.x-n,C=r.y-e,r.radius=Math.sqrt(T*T+C*C);return r};c.exports=v},74422:(c,m,t)=>{/** + */var o=t(96503),v=function(a,r){r===void 0&&(r=new o);var n=a.x1,e=a.y1,i=a.x2,h=a.y2,s=a.x3,l=a.y3,f=i-n,u=h-e,d=s-n,p=l-e,g=f*(n+i)+u*(e+h),y=d*(n+s)+p*(e+l),x=2*(f*(l-h)-u*(s-i)),C,P;if(Math.abs(x)<1e-6){var M=Math.min(n,i,s),w=Math.min(e,h,l);C=(Math.max(n,i,s)-M)*.5,P=(Math.max(e,h,l)-w)*.5,r.x=M+C,r.y=w+P,r.radius=Math.sqrt(C*C+P*P)}else r.x=(p*g-u*y)/x,r.y=(f*y-d*g)/x,C=r.x-n,P=r.y-e,r.radius=Math.sqrt(C*C+P*P);return r};c.exports=v},74422:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(16483),v=function(o){return new a(o.x1,o.y1,o.x2,o.y2,o.x3,o.y3)};c.exports=v},10690:c=>{/** + */var o=t(16483),v=function(a){return new o(a.x1,a.y1,a.x2,a.y2,a.x3,a.y3)};c.exports=v},10690:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=t.x3-t.x1,r=t.y3-t.y1,n=t.x2-t.x1,e=t.y2-t.y1,i=a-t.x1,h=v-t.y1,s=o*o+r*r,l=o*n+r*e,f=o*i+r*h,u=n*n+e*e,d=n*i+e*h,p=s*u-l*l,g=p===0?0:1/p,y=(u*f-l*d)*g,x=(s*d-l*f)*g;return y>=0&&x>=0&&y+x<1};c.exports=m},48653:c=>{/** + */var m=function(t,o,v){var a=t.x3-t.x1,r=t.y3-t.y1,n=t.x2-t.x1,e=t.y2-t.y1,i=o-t.x1,h=v-t.y1,s=a*a+r*r,l=a*n+r*e,f=a*i+r*h,u=n*n+e*e,d=n*i+e*h,p=s*u-l*l,g=p===0?0:1/p,y=(u*f-l*d)*g,x=(s*d-l*f)*g;return y>=0&&x>=0&&y+x<1};c.exports=m},48653:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v===void 0&&(v=!1),o===void 0&&(o=[]);for(var r=t.x3-t.x1,n=t.y3-t.y1,e=t.x2-t.x1,i=t.y2-t.y1,h=r*r+n*n,s=r*e+n*i,l=e*e+i*i,f=h*l-s*s,u=f===0?0:1/f,d,p,g,y,x,T,C=t.x1,M=t.y1,w=0;w=0&&p>=0&&d+p<1&&(o.push({x:a[w].x,y:a[w].y}),v)));w++);return o};c.exports=m},96006:(c,m,t)=>{/** + */var m=function(t,o,v,a){v===void 0&&(v=!1),a===void 0&&(a=[]);for(var r=t.x3-t.x1,n=t.y3-t.y1,e=t.x2-t.x1,i=t.y2-t.y1,h=r*r+n*n,s=r*e+n*i,l=e*e+i*i,f=h*l-s*s,u=f===0?0:1/f,d,p,g,y,x,C,P=t.x1,M=t.y1,w=0;w=0&&p>=0&&d+p<1&&(a.push({x:o[w].x,y:o[w].y}),v)));w++);return a};c.exports=m},96006:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10690),v=function(o,r){return a(o,r.x,r.y)};c.exports=v},71326:c=>{/** + */var o=t(10690),v=function(a,r){return o(a,r.x,r.y)};c.exports=v},71326:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)};c.exports=m},71694:c=>{/** + */var m=function(t,o){return o.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)};c.exports=m},71694:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=[]),a.push({x:t.x1,y:t.y1}),a.push({x:t.x2,y:t.y2}),a.push({x:t.x3,y:t.y3}),a};c.exports=m},33522:c=>{/** + */var m=function(t,o){return o===void 0&&(o=[]),o.push({x:t.x1,y:t.y1}),o.push({x:t.x2,y:t.y2}),o.push({x:t.x3,y:t.y3}),o};c.exports=m},33522:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x1===a.x1&&t.y1===a.y1&&t.x2===a.x2&&t.y2===a.y2&&t.x3===a.x3&&t.y3===a.y3};c.exports=m},20437:(c,m,t)=>{/** + */var m=function(t,o){return t.x1===o.x1&&t.y1===o.y1&&t.x2===o.x2&&t.y2===o.y2&&t.x3===o.x3&&t.y3===o.y3};c.exports=m},20437:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=t(35001),o=function(r,n,e){e===void 0&&(e=new a);var i=r.getLineA(),h=r.getLineB(),s=r.getLineC();if(n<=0||n>=1)return e.x=i.x1,e.y=i.y1,e;var l=v(i),f=v(h),u=v(s),d=l+f+u,p=d*n,g=0;return pl+f?(p-=l+f,g=p/u,e.x=s.x1+(s.x2-s.x1)*g,e.y=s.y1+(s.y2-s.y1)*g):(p-=l,g=p/f,e.x=h.x1+(h.x2-h.x1)*g,e.y=h.y1+(h.y2-h.y1)*g),e};c.exports=o},80672:(c,m,t)=>{/** + */var o=t(2141),v=t(35001),a=function(r,n,e){e===void 0&&(e=new o);var i=r.getLineA(),h=r.getLineB(),s=r.getLineC();if(n<=0||n>=1)return e.x=i.x1,e.y=i.y1,e;var l=v(i),f=v(h),u=v(s),d=l+f+u,p=d*n,g=0;return pl+f?(p-=l+f,g=p/u,e.x=s.x1+(s.x2-s.x1)*g,e.y=s.y1+(s.y2-s.y1)*g):(p-=l,g=p/f,e.x=h.x1+(h.x2-h.x1)*g,e.y=h.y1+(h.y2-h.y1)*g),e};c.exports=a},80672:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35001),v=t(2141),o=function(r,n,e,i){i===void 0&&(i=[]);var h=r.getLineA(),s=r.getLineB(),l=r.getLineC(),f=a(h),u=a(s),d=a(l),p=f+u+d;!n&&e>0&&(n=p/e);for(var g=0;gf+u?(y-=f+u,x=y/d,T.x=l.x1+(l.x2-l.x1)*x,T.y=l.y1+(l.y2-l.y1)*x):(y-=f,x=y/u,T.x=s.x1+(s.x2-s.x1)*x,T.y=s.y1+(s.y2-s.y1)*x),i.push(T)}return i};c.exports=o},39757:(c,m,t)=>{/** + */var o=t(35001),v=t(2141),a=function(r,n,e,i){i===void 0&&(i=[]);var h=r.getLineA(),s=r.getLineB(),l=r.getLineC(),f=o(h),u=o(s),d=o(l),p=f+u+d;!n&&e>0&&(n=p/e);for(var g=0;gf+u?(y-=f+u,x=y/d,C.x=l.x1+(l.x2-l.x1)*x,C.y=l.y1+(l.y2-l.y1)*x):(y-=f,x=y/u,C.x=s.x1+(s.x2-s.x1)*x,C.y=s.y1+(s.y2-s.y1)*x),i.push(C)}return i};c.exports=a},39757:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141);function v(r,n,e,i){var h=r-e,s=n-i,l=h*h+s*s;return Math.sqrt(l)}var o=function(r,n){n===void 0&&(n=new a);var e=r.x1,i=r.y1,h=r.x2,s=r.y2,l=r.x3,f=r.y3,u=v(l,f,h,s),d=v(e,i,l,f),p=v(h,s,e,i),g=u+d+p;return n.x=(e*u+h*d+l*p)/g,n.y=(i*u+s*d+f*p)/g,n};c.exports=o},13584:c=>{/** + */var o=t(2141);function v(r,n,e,i){var h=r-e,s=n-i,l=h*h+s*s;return Math.sqrt(l)}var a=function(r,n){n===void 0&&(n=new o);var e=r.x1,i=r.y1,h=r.x2,s=r.y2,l=r.x3,f=r.y3,u=v(l,f,h,s),d=v(e,i,l,f),p=v(h,s,e,i),g=u+d+p;return n.x=(e*u+h*d+l*p)/g,n.y=(i*u+s*d+f*p)/g,n};c.exports=a},13584:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t.x1+=a,t.y1+=v,t.x2+=a,t.y2+=v,t.x3+=a,t.y3+=v,t};c.exports=m},1376:(c,m,t)=>{/** + */var m=function(t,o,v){return t.x1+=o,t.y1+=v,t.x2+=o,t.y2+=v,t.x3+=o,t.y3+=v,t};c.exports=m},1376:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35001),v=function(o){var r=o.getLineA(),n=o.getLineB(),e=o.getLineC();return a(r)+a(n)+a(e)};c.exports=v},90260:(c,m,t)=>{/** + */var o=t(35001),v=function(a){var r=a.getLineA(),n=a.getLineB(),e=a.getLineC();return o(r)+o(n)+o(e)};c.exports=v},90260:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){r===void 0&&(r=new a);var n=o.x2-o.x1,e=o.y2-o.y1,i=o.x3-o.x1,h=o.y3-o.y1,s=Math.random(),l=Math.random();return s+l>=1&&(s=1-s,l=1-l),r.x=o.x1+(n*s+i*l),r.y=o.y1+(e*s+h*l),r};c.exports=v},52172:(c,m,t)=>{/** + */var o=t(2141),v=function(a,r){r===void 0&&(r=new o);var n=a.x2-a.x1,e=a.y2-a.y1,i=a.x3-a.x1,h=a.y3-a.y1,s=Math.random(),l=Math.random();return s+l>=1&&(s=1-s,l=1-l),r.x=a.x1+(n*s+i*l),r.y=a.y1+(e*s+h*l),r};c.exports=v},52172:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(99614),v=t(39757),o=function(r,n){var e=v(r);return a(r,e.x,e.y,n)};c.exports=o},49907:(c,m,t)=>{/** + */var o=t(99614),v=t(39757),a=function(r,n){var e=v(r);return o(r,e.x,e.y,n)};c.exports=a},49907:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(99614),v=function(o,r,n){return a(o,r.x,r.y,n)};c.exports=v},99614:c=>{/** + */var o=t(99614),v=function(a,r,n){return o(a,r.x,r.y,n)};c.exports=v},99614:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=Math.cos(o),n=Math.sin(o),e=t.x1-a,i=t.y1-v;return t.x1=e*r-i*n+a,t.y1=e*n+i*r+v,e=t.x2-a,i=t.y2-v,t.x2=e*r-i*n+a,t.y2=e*n+i*r+v,e=t.x3-a,i=t.y3-v,t.x3=e*r-i*n+a,t.y3=e*n+i*r+v,t};c.exports=m},16483:(c,m,t)=>{/** + */var m=function(t,o,v,a){var r=Math.cos(a),n=Math.sin(a),e=t.x1-o,i=t.y1-v;return t.x1=e*r-i*n+o,t.y1=e*n+i*r+v,e=t.x2-o,i=t.y2-v,t.x2=e*r-i*n+o,t.y2=e*n+i*r+v,e=t.x3-o,i=t.y3-v,t.x3=e*r-i*n+o,t.y3=e*n+i*r+v,t};c.exports=m},16483:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(10690),o=t(20437),r=t(80672),n=t(23777),e=t(23031),i=t(90260),h=new a({initialize:function(l,f,u,d,p,g){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),this.type=n.TRIANGLE,this.x1=l,this.y1=f,this.x2=u,this.y2=d,this.x3=p,this.y3=g},contains:function(s,l){return v(this,s,l)},getPoint:function(s,l){return o(this,s,l)},getPoints:function(s,l,f){return r(this,s,l,f)},getRandomPoint:function(s){return i(this,s)},setTo:function(s,l,f,u,d,p){return s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),this.x1=s,this.y1=l,this.x2=f,this.y2=u,this.x3=d,this.y3=p,this},getLineA:function(s){return s===void 0&&(s=new e),s.setTo(this.x1,this.y1,this.x2,this.y2),s},getLineB:function(s){return s===void 0&&(s=new e),s.setTo(this.x2,this.y2,this.x3,this.y3),s},getLineC:function(s){return s===void 0&&(s=new e),s.setTo(this.x3,this.y3,this.x1,this.y1),s},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(s){var l=0;this.x1<=this.x2&&this.x1<=this.x3?l=this.x1-s:this.x2<=this.x1&&this.x2<=this.x3?l=this.x2-s:l=this.x3-s,this.x1-=l,this.x2-=l,this.x3-=l}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(s){var l=0;this.x1>=this.x2&&this.x1>=this.x3?l=this.x1-s:this.x2>=this.x1&&this.x2>=this.x3?l=this.x2-s:l=this.x3-s,this.x1-=l,this.x2-=l,this.x3-=l}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(s){var l=0;this.y1<=this.y2&&this.y1<=this.y3?l=this.y1-s:this.y2<=this.y1&&this.y2<=this.y3?l=this.y2-s:l=this.y3-s,this.y1-=l,this.y2-=l,this.y3-=l}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(s){var l=0;this.y1>=this.y2&&this.y1>=this.y3?l=this.y1-s:this.y2>=this.y1&&this.y2>=this.y3?l=this.y2-s:l=this.y3-s,this.y1-=l,this.y2-=l,this.y3-=l}}});c.exports=h},84435:(c,m,t)=>{/** + */var o=t(83419),v=t(10690),a=t(20437),r=t(80672),n=t(23777),e=t(23031),i=t(90260),h=new o({initialize:function(l,f,u,d,p,g){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),this.type=n.TRIANGLE,this.x1=l,this.y1=f,this.x2=u,this.y2=d,this.x3=p,this.y3=g},contains:function(s,l){return v(this,s,l)},getPoint:function(s,l){return a(this,s,l)},getPoints:function(s,l,f){return r(this,s,l,f)},getRandomPoint:function(s){return i(this,s)},setTo:function(s,l,f,u,d,p){return s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),this.x1=s,this.y1=l,this.x2=f,this.y2=u,this.x3=d,this.y3=p,this},getLineA:function(s){return s===void 0&&(s=new e),s.setTo(this.x1,this.y1,this.x2,this.y2),s},getLineB:function(s){return s===void 0&&(s=new e),s.setTo(this.x2,this.y2,this.x3,this.y3),s},getLineC:function(s){return s===void 0&&(s=new e),s.setTo(this.x3,this.y3,this.x1,this.y1),s},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(s){var l=0;this.x1<=this.x2&&this.x1<=this.x3?l=this.x1-s:this.x2<=this.x1&&this.x2<=this.x3?l=this.x2-s:l=this.x3-s,this.x1-=l,this.x2-=l,this.x3-=l}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(s){var l=0;this.x1>=this.x2&&this.x1>=this.x3?l=this.x1-s:this.x2>=this.x1&&this.x2>=this.x3?l=this.x2-s:l=this.x3-s,this.x1-=l,this.x2-=l,this.x3-=l}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(s){var l=0;this.y1<=this.y2&&this.y1<=this.y3?l=this.y1-s:this.y2<=this.y1&&this.y2<=this.y3?l=this.y2-s:l=this.y3-s,this.y1-=l,this.y2-=l,this.y3-=l}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(s){var l=0;this.y1>=this.y2&&this.y1>=this.y3?l=this.y1-s:this.y2>=this.y1&&this.y2>=this.y3?l=this.y2-s:l=this.y3-s,this.y1-=l,this.y2-=l,this.y3-=l}}});c.exports=h},84435:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(16483);a.Area=t(41658),a.BuildEquilateral=t(39208),a.BuildFromPolygon=t(39545),a.BuildRight=t(90301),a.CenterOn=t(23707),a.Centroid=t(97523),a.CircumCenter=t(24951),a.CircumCircle=t(85614),a.Clone=t(74422),a.Contains=t(10690),a.ContainsArray=t(48653),a.ContainsPoint=t(96006),a.CopyFrom=t(71326),a.Decompose=t(71694),a.Equals=t(33522),a.GetPoint=t(20437),a.GetPoints=t(80672),a.InCenter=t(39757),a.Perimeter=t(1376),a.Offset=t(13584),a.Random=t(90260),a.Rotate=t(52172),a.RotateAroundPoint=t(49907),a.RotateAroundXY=t(99614),c.exports=a},74457:c=>{/** + */var o=t(16483);o.Area=t(41658),o.BuildEquilateral=t(39208),o.BuildFromPolygon=t(39545),o.BuildRight=t(90301),o.CenterOn=t(23707),o.Centroid=t(97523),o.CircumCenter=t(24951),o.CircumCircle=t(85614),o.Clone=t(74422),o.Contains=t(10690),o.ContainsArray=t(48653),o.ContainsPoint=t(96006),o.CopyFrom=t(71326),o.Decompose=t(71694),o.Equals=t(33522),o.GetPoint=t(20437),o.GetPoints=t(80672),o.InCenter=t(39757),o.Perimeter=t(1376),o.Offset=t(13584),o.Random=t(90260),o.Rotate=t(52172),o.RotateAroundPoint=t(49907),o.RotateAroundXY=t(99614),c.exports=o},74457:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:a,hitAreaCallback:v,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}};c.exports=m},84409:c=>{/** + */var m=function(t,o,v){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:o,hitAreaCallback:v,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}};c.exports=m},84409:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return function(v,o,r,n){var e=t.getPixelAlpha(o,r,n.texture.key,n.frame.name);return e&&e>=a}};c.exports=m},7003:(c,m,t)=>{/** + */var m=function(t,o){return function(v,a,r,n){var e=t.getPixelAlpha(a,r,n.texture.key,n.frame.name);return e&&e>=o}};c.exports=m},7003:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(93301),o=t(50792),r=t(8214),n=t(8443),e=t(78970),i=t(85098),h=t(42515),s=t(36210),l=t(61340),f=t(85955),u=new a({initialize:function(p,g){this.game=p,this.scaleManager,this.canvas,this.config=g,this.enabled=!0,this.events=new o,this.isOver=!0,this.defaultCursor="",this.keyboard=g.inputKeyboard?new e(this):null,this.mouse=g.inputMouse?new i(this):null,this.touch=g.inputTouch?new s(this):null,this.pointers=[],this.pointersTotal=g.inputActivePointers,g.inputTouch&&this.pointersTotal===1&&(this.pointersTotal=2);for(var y=0;y<=this.pointersTotal;y++){var x=new h(this,y);x.smoothFactor=g.inputSmoothFactor,this.pointers.push(x)}this.mousePointer=g.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new l,this._tempMatrix2=new l,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],p.events.once(n.BOOT,this.boot,this)},boot:function(){var d=this.game,p=d.events;this.canvas=d.canvas,this.scaleManager=d.scale,this.events.emit(r.MANAGER_BOOT),p.on(n.PRE_RENDER,this.preRender,this),p.once(n.DESTROY,this.destroy,this)},setCanvasOver:function(d){this.isOver=!0,this.events.emit(r.GAME_OVER,d)},setCanvasOut:function(d){this.isOver=!1,this.events.emit(r.GAME_OUT,d)},preRender:function(){var d=this.game.loop.now,p=this.game.loop.delta,g=this.game.scene.getScenes(!0,!0);this.time=d,this.events.emit(r.MANAGER_UPDATE);for(var y=0;y10&&(d=10-this.pointersTotal);for(var g=0;g{/** + */var o=t(83419),v=t(93301),a=t(50792),r=t(8214),n=t(8443),e=t(78970),i=t(85098),h=t(42515),s=t(36210),l=t(61340),f=t(85955),u=new o({initialize:function(p,g){this.game=p,this.scaleManager,this.canvas,this.config=g,this.enabled=!0,this.events=new a,this.isOver=!0,this.defaultCursor="",this.keyboard=g.inputKeyboard?new e(this):null,this.mouse=g.inputMouse?new i(this):null,this.touch=g.inputTouch?new s(this):null,this.pointers=[],this.pointersTotal=g.inputActivePointers,g.inputTouch&&this.pointersTotal===1&&(this.pointersTotal=2);for(var y=0;y<=this.pointersTotal;y++){var x=new h(this,y);x.smoothFactor=g.inputSmoothFactor,this.pointers.push(x)}this.mousePointer=g.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new l,this._tempMatrix2=new l,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],p.events.once(n.BOOT,this.boot,this)},boot:function(){var d=this.game,p=d.events;this.canvas=d.canvas,this.scaleManager=d.scale,this.events.emit(r.MANAGER_BOOT),p.on(n.PRE_RENDER,this.preRender,this),p.once(n.DESTROY,this.destroy,this)},setCanvasOver:function(d){this.isOver=!0,this.events.emit(r.GAME_OVER,d)},setCanvasOut:function(d){this.isOver=!1,this.events.emit(r.GAME_OUT,d)},preRender:function(){var d=this.game.loop.now,p=this.game.loop.delta,g=this.game.scene.getScenes(!0,!0);this.time=d,this.events.emit(r.MANAGER_UPDATE);for(var y=0;y10&&(d=10-this.pointersTotal);for(var g=0;g{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(96503),v=t(87902),o=t(83419),r=t(93301),n=t(74457),e=t(84409),i=t(20339),h=t(8497),s=t(81154),l=t(8214),f=t(50792),u=t(95540),d=t(23777),p=t(89639),g=t(41212),y=t(37277),x=t(87841),T=t(37303),C=t(44594),M=t(16483),w=t(10690),L=new o({Extends:f,initialize:function(O){f.call(this),this.scene=O,this.systems=O.sys,this.settings=O.sys.settings,this.manager=O.sys.game.input,this.pluginEvents=new f,this.enabled=!0,this.displayList,this.cameras,p.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var N={cancelled:!1};this._eventContainer={stopPropagation:function(){N.cancelled=!0}},this._eventData=N,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,O.sys.events.once(C.BOOT,this.boot,this),O.sys.events.on(C.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(C.DESTROY,this.destroy,this),this.pluginEvents.emit(l.BOOT)},start:function(){var F=this.systems.events;F.on(C.TRANSITION_START,this.transitionIn,this),F.on(C.TRANSITION_OUT,this.transitionOut,this),F.on(C.TRANSITION_COMPLETE,this.transitionComplete,this),F.on(C.PRE_UPDATE,this.preUpdate,this),F.once(C.SHUTDOWN,this.shutdown,this),this.manager.events.on(l.GAME_OUT,this.onGameOut,this),this.manager.events.on(l.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(l.START)},onGameOver:function(F){this.isActive()&&this.emit(l.GAME_OVER,F.timeStamp,F)},onGameOut:function(F){this.isActive()&&this.emit(l.GAME_OUT,F.timeStamp,F)},preUpdate:function(){this.pluginEvents.emit(l.PRE_UPDATE);var F=this._pendingRemoval,O=this._pendingInsertion,N=F.length,G=O.length;if(!(N===0&&G===0)){for(var V=this._list,K=0;K-1&&(V.splice(J,1),this.clear($,!0))}this._pendingRemoval.length=0,this._list=V.concat(O.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(F,O){if(!this.isActive())return!1;if(this.pluginEvents.emit(l.UPDATE,F,O),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var N,G=this.manager,V=G.pointers,K=G.pointersTotal;for(N=0;N0)if(this._pollTimer-=O,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var J=!1;for(N=0;N0&&(J=!0)}return J},update:function(F,O){if(!this.isActive())return!1;for(var N=O.length,G=!1,V=0;V0&&(G=!0)}return this._updatedThisFrame=!0,G},clear:function(F,O){O===void 0&&(O=!1),this.disable(F);var N=F.input;N&&(this.removeDebug(F),this.manager.resetCursor(N),N.gameObject=void 0,N.target=void 0,N.hitArea=void 0,N.hitAreaCallback=void 0,N.callbackContext=void 0,F.input=null),O||this.queueForRemoval(F);var G=this._draggable.indexOf(F);return G>-1&&this._draggable.splice(G,1),F},disable:function(F){var O=F.input;O&&(O.enabled=!1,O.dragState=0);for(var N=this._drag,G=this._over,V=this.manager,K=0,$;K-1&&N[K].splice($,1),$=G[K].indexOf(F),$>-1&&G[K].splice($,1);return this},enable:function(F,O,N,G){return G===void 0&&(G=!1),F.input?F.input.enabled=!0:this.setHitArea(F,O,N),F.input&&G&&!F.input.dropZone&&(F.input.dropZone=G),this},hitTestPointer:function(F){for(var O=this.cameras.getCamerasBelowPointer(F),N=0;N0)return F.camera=G,V}return F.camera=O[0],[]},processDownEvents:function(F){var O=0,N=this._temp,G=this._eventData,V=this._eventContainer;G.cancelled=!1;for(var K=!1,$=0;$0&&i(F.x,F.y,F.downX,F.downY)>=V||G>0&&O>=F.downTime+G)&&(N=!0),N)return this.setDragState(F,3),this.processDragStartList(F)},processDragStartList:function(F){if(this.getDragState(F)!==3)return 0;for(var O=this._drag[F.id],N=0;N1&&(this.sortGameObjects(N,F),this.topOnly&&N.splice(1)),this._drag[F.id]=N,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(F,3),this.processDragStartList(F)):(this.setDragState(F,2),0))},processDragMoveEvent:function(F){if(this.getDragState(F)===2&&this.processDragThresholdEvent(F,this.manager.game.loop.now),this.getDragState(F)!==4)return 0;for(var O=this._tempZones,N=this._drag[F.id],G=0;G0?(V.emit(l.GAMEOBJECT_DRAG_LEAVE,F,$),this.emit(l.DRAG_LEAVE,F,V,$),K.target=O[0],$=K.target,V.emit(l.GAMEOBJECT_DRAG_ENTER,F,$),this.emit(l.DRAG_ENTER,F,V,$)):(V.emit(l.GAMEOBJECT_DRAG_LEAVE,F,$),this.emit(l.DRAG_LEAVE,F,V,$),O[0]?(K.target=O[0],$=K.target,V.emit(l.GAMEOBJECT_DRAG_ENTER,F,$),this.emit(l.DRAG_ENTER,F,V,$)):K.target=null)}else!$&&O[0]&&(K.target=O[0],$=K.target,V.emit(l.GAMEOBJECT_DRAG_ENTER,F,$),this.emit(l.DRAG_ENTER,F,V,$));var X,Y;if(!V.parentContainer)X=F.worldX-K.dragX,Y=F.worldY-K.dragY;else{var D=F.worldX-K.dragStartXGlobal,z=F.worldY-K.dragStartYGlobal,W=V.getParentRotation(),H=D*Math.cos(W)+z*Math.sin(W),Z=z*Math.cos(W)-D*Math.sin(W);H*=1/V.parentContainer.scaleX,Z*=1/V.parentContainer.scaleY,X=H+K.dragStartX,Y=Z+K.dragStartY}V.emit(l.GAMEOBJECT_DRAG,F,X,Y),this.emit(l.DRAG,F,V,X,Y)}return N.length},processDragUpEvent:function(F){for(var O=this._drag[F.id],N=0;N0){var K=this.manager,$=this._eventData,J=this._eventContainer;$.cancelled=!1;for(var X=!1,Y=0;Y0){var V=this.manager,K=this._eventData,$=this._eventContainer;K.cancelled=!1;var J=!1;this.sortGameObjects(O,F);for(var X=0;X0){for(this.sortGameObjects(V,F),N=0;N0){for(this.sortGameObjects(K,F),N=0;N-1&&this._draggable.splice(V,1)}return this},makePixelPerfect:function(F){F===void 0&&(F=1);var O=this.systems.textures;return e(O,F)},setHitArea:function(F,O,N){if(O===void 0)return this.setHitAreaFromTexture(F);Array.isArray(F)||(F=[F]);var G=!1,V=!1,K=!1,$=!1,J=!1,X=!0;if(g(O)&&Object.keys(O).length){var Y=O,D=F.some(function(Q){return Q.hasOwnProperty("faces")});if(!D){O=u(Y,"hitArea",null),N=u(Y,"hitAreaCallback",null),J=u(Y,"pixelPerfect",!1);var z=u(Y,"alphaTolerance",1);J&&(O={},N=this.makePixelPerfect(z))}G=u(Y,"draggable",!1),V=u(Y,"dropZone",!1),K=u(Y,"cursor",!1),$=u(Y,"useHandCursor",!1),(!O||!N)&&(this.setHitAreaFromTexture(F),X=!1)}else typeof O=="function"&&!N&&(N=O,O={});for(var W=0;W{/** + */var o=t(96503),v=t(87902),a=t(83419),r=t(93301),n=t(74457),e=t(84409),i=t(20339),h=t(8497),s=t(81154),l=t(8214),f=t(50792),u=t(95540),d=t(23777),p=t(89639),g=t(41212),y=t(37277),x=t(87841),C=t(37303),P=t(44594),M=t(16483),w=t(10690),I=new a({Extends:f,initialize:function(B){f.call(this),this.scene=B,this.systems=B.sys,this.settings=B.sys.settings,this.manager=B.sys.game.input,this.pluginEvents=new f,this.enabled=!0,this.displayList,this.cameras,p.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var N={cancelled:!1};this._eventContainer={stopPropagation:function(){N.cancelled=!0}},this._eventData=N,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,B.sys.events.once(P.BOOT,this.boot,this),B.sys.events.on(P.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(P.DESTROY,this.destroy,this),this.pluginEvents.emit(l.BOOT)},start:function(){var L=this.systems.events;L.on(P.TRANSITION_START,this.transitionIn,this),L.on(P.TRANSITION_OUT,this.transitionOut,this),L.on(P.TRANSITION_COMPLETE,this.transitionComplete,this),L.on(P.PRE_UPDATE,this.preUpdate,this),L.once(P.SHUTDOWN,this.shutdown,this),this.manager.events.on(l.GAME_OUT,this.onGameOut,this),this.manager.events.on(l.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(l.START)},onGameOver:function(L){this.isActive()&&this.emit(l.GAME_OVER,L.timeStamp,L)},onGameOut:function(L){this.isActive()&&this.emit(l.GAME_OUT,L.timeStamp,L)},preUpdate:function(){this.pluginEvents.emit(l.PRE_UPDATE);var L=this._pendingRemoval,B=this._pendingInsertion,N=L.length,G=B.length;if(!(N===0&&G===0)){for(var V=this._list,K=0;K-1&&(V.splice(J,1),this.clear(j,!0))}this._pendingRemoval.length=0,this._list=V.concat(B.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(L,B){if(!this.isActive())return!1;if(this.pluginEvents.emit(l.UPDATE,L,B),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var N,G=this.manager,V=G.pointers,K=G.pointersTotal;for(N=0;N0)if(this._pollTimer-=B,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var J=!1;for(N=0;N0&&(J=!0)}return J},update:function(L,B){if(!this.isActive())return!1;for(var N=B.length,G=!1,V=0;V0&&(G=!0)}return this._updatedThisFrame=!0,G},clear:function(L,B){B===void 0&&(B=!1),this.disable(L);var N=L.input;N&&(this.removeDebug(L),this.manager.resetCursor(N),N.gameObject=void 0,N.target=void 0,N.hitArea=void 0,N.hitAreaCallback=void 0,N.callbackContext=void 0,L.input=null),B||this.queueForRemoval(L);var G=this._draggable.indexOf(L);return G>-1&&this._draggable.splice(G,1),L},disable:function(L){var B=L.input;B&&(B.enabled=!1,B.dragState=0);for(var N=this._drag,G=this._over,V=this.manager,K=0,j;K-1&&N[K].splice(j,1),j=G[K].indexOf(L),j>-1&&G[K].splice(j,1);return this},enable:function(L,B,N,G){return G===void 0&&(G=!1),L.input?L.input.enabled=!0:this.setHitArea(L,B,N),L.input&&G&&!L.input.dropZone&&(L.input.dropZone=G),this},hitTestPointer:function(L){for(var B=this.cameras.getCamerasBelowPointer(L),N=0;N0)return L.camera=G,V}return L.camera=B[0],[]},processDownEvents:function(L){var B=0,N=this._temp,G=this._eventData,V=this._eventContainer;G.cancelled=!1;for(var K=!1,j=0;j0&&i(L.x,L.y,L.downX,L.downY)>=V||G>0&&B>=L.downTime+G)&&(N=!0),N)return this.setDragState(L,3),this.processDragStartList(L)},processDragStartList:function(L){if(this.getDragState(L)!==3)return 0;for(var B=this._drag[L.id],N=0;N1&&(this.sortGameObjects(N,L),this.topOnly&&N.splice(1)),this._drag[L.id]=N,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(L,3),this.processDragStartList(L)):(this.setDragState(L,2),0))},processDragMoveEvent:function(L){if(this.getDragState(L)===2&&this.processDragThresholdEvent(L,this.manager.game.loop.now),this.getDragState(L)!==4)return 0;for(var B=this._tempZones,N=this._drag[L.id],G=0;G0?(V.emit(l.GAMEOBJECT_DRAG_LEAVE,L,j),this.emit(l.DRAG_LEAVE,L,V,j),K.target=B[0],j=K.target,V.emit(l.GAMEOBJECT_DRAG_ENTER,L,j),this.emit(l.DRAG_ENTER,L,V,j)):(V.emit(l.GAMEOBJECT_DRAG_LEAVE,L,j),this.emit(l.DRAG_LEAVE,L,V,j),B[0]?(K.target=B[0],j=K.target,V.emit(l.GAMEOBJECT_DRAG_ENTER,L,j),this.emit(l.DRAG_ENTER,L,V,j)):K.target=null)}else!j&&B[0]&&(K.target=B[0],j=K.target,V.emit(l.GAMEOBJECT_DRAG_ENTER,L,j),this.emit(l.DRAG_ENTER,L,V,j));var X,Y;if(!V.parentContainer)X=L.worldX-K.dragX,Y=L.worldY-K.dragY;else{var b=L.worldX-K.dragStartXGlobal,z=L.worldY-K.dragStartYGlobal,W=V.getParentRotation(),H=b*Math.cos(W)+z*Math.sin(W),Z=z*Math.cos(W)-b*Math.sin(W);H*=1/V.parentContainer.scaleX,Z*=1/V.parentContainer.scaleY,X=H+K.dragStartX,Y=Z+K.dragStartY}V.emit(l.GAMEOBJECT_DRAG,L,X,Y),this.emit(l.DRAG,L,V,X,Y)}return N.length},processDragUpEvent:function(L){for(var B=this._drag[L.id],N=0;N0){var K=this.manager,j=this._eventData,J=this._eventContainer;j.cancelled=!1;for(var X=!1,Y=0;Y0){var V=this.manager,K=this._eventData,j=this._eventContainer;K.cancelled=!1;var J=!1;this.sortGameObjects(B,L);for(var X=0;X0){for(this.sortGameObjects(V,L),N=0;N0){for(this.sortGameObjects(K,L),N=0;N-1&&this._draggable.splice(V,1)}return this},makePixelPerfect:function(L){L===void 0&&(L=1);var B=this.systems.textures;return e(B,L)},setHitArea:function(L,B,N){if(B===void 0)return this.setHitAreaFromTexture(L);Array.isArray(L)||(L=[L]);var G=!1,V=!1,K=!1,j=!1,J=!1,X=!0;if(g(B)&&Object.keys(B).length){var Y=B,b=L.some(function(Q){return Q.hasOwnProperty("faces")});if(!b){B=u(Y,"hitArea",null),N=u(Y,"hitAreaCallback",null),J=u(Y,"pixelPerfect",!1);var z=u(Y,"alphaTolerance",1);J&&(B={},N=this.makePixelPerfect(z))}G=u(Y,"draggable",!1),V=u(Y,"dropZone",!1),K=u(Y,"cursor",!1),j=u(Y,"useHandCursor",!1),(!B||!N)&&(this.setHitAreaFromTexture(L),X=!1)}else typeof B=="function"&&!N&&(N=B,B={});for(var W=0;W{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35154),v={},o={};o.register=function(r,n,e,i,h){v[r]={plugin:n,mapping:e,settingsKey:i,configKey:h}},o.getPlugin=function(r){return v[r]},o.install=function(r){var n=r.scene.sys,e=n.settings.input,i=n.game.config;for(var h in v){var s=v[h].plugin,l=v[h].mapping,f=v[h].settingsKey,u=v[h].configKey;a(e,f,i[u])&&(r[l]=new s(r))}},o.remove=function(r){v.hasOwnProperty(r)&&delete v[r]},c.exports=o},42515:(c,m,t)=>{/** + */var o=t(35154),v={},a={};a.register=function(r,n,e,i,h){v[r]={plugin:n,mapping:e,settingsKey:i,configKey:h}},a.getPlugin=function(r){return v[r]},a.install=function(r){var n=r.scene.sys,e=n.settings.input,i=n.game.config;for(var h in v){var s=v[h].plugin,l=v[h].mapping,f=v[h].settingsKey,u=v[h].configKey;o(e,f,i[u])&&(r[l]=new s(r))}},a.remove=function(r){v.hasOwnProperty(r)&&delete v[r]},c.exports=a},42515:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(31040),v=t(83419),o=t(20339),r=t(43855),n=t(47235),e=t(26099),i=t(25892),h=new v({initialize:function(l,f){this.manager=l,this.id=f,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=f===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(s){var l=s.getWorldPoint(this.x,this.y);return this.worldX=l.x,this.worldY=l.y,this},positionToCamera:function(s,l){return s.getWorldPoint(this.x,this.y,l)},updateMotion:function(){var s=this.position.x,l=this.position.y,f=this.midPoint.x,u=this.midPoint.y;if(!(s===f&&l===u)){var d=n(this.motionFactor,f,s),p=n(this.motionFactor,u,l);r(d,s,.1)&&(d=s),r(p,l,.1)&&(p=l),this.midPoint.set(d,p);var g=s-d,y=l-p;this.velocity.set(g,y),this.angle=a(d,p,s,l),this.distance=Math.sqrt(g*g+y*y)}},up:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.button=s.button,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),s.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=s.timeStamp,this.wasTouch=!1)},down:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.button=s.button,this.downElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),s.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),i.macOS&&s.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=s.timeStamp),this.wasTouch=!1},move:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.manager.transformPointer(this,s.pageX,s.pageY,!0),this.locked&&(this.movementX=s.movementX||s.mozMovementX||s.webkitMovementX||0,this.movementY=s.movementY||s.mozMovementY||s.webkitMovementY||0),this.moveTime=s.timeStamp,this.wasTouch=!1},wheel:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.deltaX=s.deltaX,this.deltaY=s.deltaY,this.deltaZ=s.deltaZ,this.wasTouch=!1},touchstart:function(s,l){s.pointerId&&(this.pointerId=s.pointerId),this.identifier=s.identifier,this.target=s.target,this.active=!0,this.buttons=1,this.event=l,this.downElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=l.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(s,l){this.event=l,this.manager.transformPointer(this,s.pageX,s.pageY,!0),this.moveTime=l.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(s,l){this.buttons=0,this.event=l,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=l.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(s,l){this.buttons=0,this.event=l,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=l.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return this.buttons===0},leftButtonDown:function(){return!!(this.buttons&1)},rightButtonDown:function(){return!!(this.buttons&2)},middleButtonDown:function(){return!!(this.buttons&4)},backButtonDown:function(){return!!(this.buttons&8)},forwardButtonDown:function(){return!!(this.buttons&16)},leftButtonReleased:function(){return this.button===0&&!this.isDown},rightButtonReleased:function(){return this.button===2&&!this.isDown},middleButtonReleased:function(){return this.button===1&&!this.isDown},backButtonReleased:function(){return this.button===3&&!this.isDown},forwardButtonReleased:function(){return this.button===4&&!this.isDown},getDistance:function(){return this.isDown?o(this.downX,this.downY,this.x,this.y):o(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?a(this.downX,this.downY,this.x,this.y):a(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(s,l){s===void 0&&(s=10),l===void 0&&(l=[]);for(var f=this.prevPosition.x,u=this.prevPosition.y,d=this.position.x,p=this.position.y,g=0;g{/** + */var o=t(31040),v=t(83419),a=t(20339),r=t(43855),n=t(47235),e=t(26099),i=t(25892),h=new v({initialize:function(l,f){this.manager=l,this.id=f,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=f===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(s){var l=s.getWorldPoint(this.x,this.y);return this.worldX=l.x,this.worldY=l.y,this},positionToCamera:function(s,l){return s.getWorldPoint(this.x,this.y,l)},updateMotion:function(){var s=this.position.x,l=this.position.y,f=this.midPoint.x,u=this.midPoint.y;if(!(s===f&&l===u)){var d=n(this.motionFactor,f,s),p=n(this.motionFactor,u,l);r(d,s,.1)&&(d=s),r(p,l,.1)&&(p=l),this.midPoint.set(d,p);var g=s-d,y=l-p;this.velocity.set(g,y),this.angle=o(d,p,s,l),this.distance=Math.sqrt(g*g+y*y)}},up:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.button=s.button,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),s.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=s.timeStamp,this.wasTouch=!1)},down:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.button=s.button,this.downElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),s.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),i.macOS&&s.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=s.timeStamp),this.wasTouch=!1},move:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.manager.transformPointer(this,s.pageX,s.pageY,!0),this.locked&&(this.movementX=s.movementX||s.mozMovementX||s.webkitMovementX||0,this.movementY=s.movementY||s.mozMovementY||s.webkitMovementY||0),this.moveTime=s.timeStamp,this.wasTouch=!1},wheel:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.deltaX=s.deltaX,this.deltaY=s.deltaY,this.deltaZ=s.deltaZ,this.wasTouch=!1},touchstart:function(s,l){s.pointerId&&(this.pointerId=s.pointerId),this.identifier=s.identifier,this.target=s.target,this.active=!0,this.buttons=1,this.event=l,this.downElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=l.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(s,l){this.event=l,this.manager.transformPointer(this,s.pageX,s.pageY,!0),this.moveTime=l.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(s,l){this.buttons=0,this.event=l,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=l.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(s,l){this.buttons=0,this.event=l,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=l.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return this.buttons===0},leftButtonDown:function(){return!!(this.buttons&1)},rightButtonDown:function(){return!!(this.buttons&2)},middleButtonDown:function(){return!!(this.buttons&4)},backButtonDown:function(){return!!(this.buttons&8)},forwardButtonDown:function(){return!!(this.buttons&16)},leftButtonReleased:function(){return this.button===0&&!this.isDown},rightButtonReleased:function(){return this.button===2&&!this.isDown},middleButtonReleased:function(){return this.button===1&&!this.isDown},backButtonReleased:function(){return this.button===3&&!this.isDown},forwardButtonReleased:function(){return this.button===4&&!this.isDown},getDistance:function(){return this.isDown?a(this.downX,this.downY,this.x,this.y):a(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?o(this.downX,this.downY,this.x,this.y):o(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(s,l){s===void 0&&(s=10),l===void 0&&(l=[]);for(var f=this.prevPosition.x,u=this.prevPosition.y,d=this.position.x,p=this.position.y,g=0;g{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3250,19 +3250,19 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n){this.pad=r,this.events=r.events,this.index=n,this.value=0,this.threshold=.1},update:function(o){this.value=o},getValue:function(){return Math.abs(this.value){/** + */var o=t(83419),v=new o({initialize:function(r,n){this.pad=r,this.events=r.events,this.index=n,this.value=0,this.threshold=.1},update:function(a){this.value=a},getValue:function(){return Math.abs(this.value){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(92734),o=new a({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(v.BUTTON_DOWN,n,this,r),this.pad.emit(v.GAMEPAD_BUTTON_DOWN,e,r,this)):this.pressed&&(this.pressed=!1,this.events.emit(v.BUTTON_UP,n,this,r),this.pad.emit(v.GAMEPAD_BUTTON_UP,e,r,this))},destroy:function(){this.pad=null,this.events=null}});c.exports=o},99125:(c,m,t)=>{/** + */var o=t(83419),v=t(92734),a=new o({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(v.BUTTON_DOWN,n,this,r),this.pad.emit(v.GAMEPAD_BUTTON_DOWN,e,r,this)):this.pressed&&(this.pressed=!1,this.events.emit(v.BUTTON_UP,n,this,r),this.pad.emit(v.GAMEPAD_BUTTON_UP,e,r,this))},destroy:function(){this.pad=null,this.events=null}});c.exports=a},99125:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(97421),v=t(28884),o=t(83419),r=t(50792),n=t(26099),e=new o({Extends:r,initialize:function(h,s){r.call(this),this.manager=h,this.pad=s,this.id=s.id,this.index=s.index;for(var l=[],f=0;f=2&&(this.leftStick.set(u[0].getValue(),u[1].getValue()),f>=4&&this.rightStick.set(u[2].getValue(),u[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var i;for(i=0;i{/** + */var o=t(97421),v=t(28884),a=t(83419),r=t(50792),n=t(26099),e=new a({Extends:r,initialize:function(h,s){r.call(this),this.manager=h,this.pad=s,this.id=s.id,this.index=s.index;for(var l=[],f=0;f=2&&(this.leftStick.set(u[0].getValue(),u[1].getValue()),f>=4&&this.rightStick.set(u[2].getValue(),u[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var i;for(i=0;i{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(92734),r=t(99125),n=t(35154),e=t(89639),i=t(8214),h=new a({Extends:v,initialize:function(l){v.call(this),this.scene=l.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=l,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,l.pluginEvents.once(i.BOOT,this.boot,this),l.pluginEvents.on(i.START,this.start,this)},boot:function(){var s=this.scene.sys.game,l=this.settings.input,f=s.config;this.enabled=n(l,"gamepad",f.inputGamepad)&&s.device.input.gamepads,this.target=n(l,"gamepad.target",f.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(i.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(i.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var s=this,l=this.target,f=function(u){u.defaultPrevented||!s.isActive()||(s.refreshPads(),s.queue.push(u))};this.onGamepadHandler=f,l.addEventListener("gamepadconnected",f,!1),l.addEventListener("gamepaddisconnected",f,!1),this.sceneInputPlugin.pluginEvents.on(i.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(i.UPDATE,this.update);for(var s=0;s{/** + */var o=t(83419),v=t(50792),a=t(92734),r=t(99125),n=t(35154),e=t(89639),i=t(8214),h=new o({Extends:v,initialize:function(l){v.call(this),this.scene=l.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=l,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,l.pluginEvents.once(i.BOOT,this.boot,this),l.pluginEvents.on(i.START,this.start,this)},boot:function(){var s=this.scene.sys.game,l=this.settings.input,f=s.config;this.enabled=n(l,"gamepad",f.inputGamepad)&&s.device.input.gamepads,this.target=n(l,"gamepad.target",f.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(i.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(i.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var s=this,l=this.target,f=function(u){u.defaultPrevented||!s.isActive()||(s.refreshPads(),s.queue.push(u))};this.onGamepadHandler=f,l.addEventListener("gamepadconnected",f,!1),l.addEventListener("gamepaddisconnected",f,!1),this.sceneInputPlugin.pluginEvents.on(i.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(i.UPDATE,this.update);for(var s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3314,27 +3314,27 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(93301),v=t(79291),o={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)};o=v(!1,o,a),c.exports=o},78970:(c,m,t)=>{/** + */var o=t(93301),v=t(79291),a={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)};a=v(!1,a,o),c.exports=a},78970:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(72905),v=t(83419),o=t(8443),r=t(8214),n=t(46032),e=t(29747),i=new v({initialize:function(s){this.manager=s,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=e,this.onKeyUp=e,s.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var h=this.manager.config;this.enabled=h.inputKeyboard,this.target=h.inputKeyboardEventTarget,this.addCapture(h.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(o.POST_STEP,this.postUpdate,this)},startListeners:function(){var h=this;this.onKeyDown=function(l){if(!(l.defaultPrevented||!h.enabled||!h.manager)){h.queue.push(l),h.manager.events.emit(r.MANAGER_PROCESS);var f=l.altKey||l.ctrlKey||l.shiftKey||l.metaKey;h.preventDefault&&!f&&h.captures.indexOf(l.keyCode)>-1&&l.preventDefault()}},this.onKeyUp=function(l){if(!(l.defaultPrevented||!h.enabled||!h.manager)){h.queue.push(l),h.manager.events.emit(r.MANAGER_PROCESS);var f=l.altKey||l.ctrlKey||l.shiftKey||l.metaKey;h.preventDefault&&!f&&h.captures.indexOf(l.keyCode)>-1&&l.preventDefault()}};var s=this.target;s&&(s.addEventListener("keydown",this.onKeyDown,!1),s.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var h=this.target;h.removeEventListener("keydown",this.onKeyDown,!1),h.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(h){typeof h=="string"&&(h=h.split(",")),Array.isArray(h)||(h=[h]);for(var s=this.captures,l=0;l0},removeCapture:function(h){typeof h=="string"&&(h=h.split(",")),Array.isArray(h)||(h=[h]);for(var s=this.captures,l=0;l0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(o.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});c.exports=i},28846:(c,m,t)=>{/** + */var o=t(72905),v=t(83419),a=t(8443),r=t(8214),n=t(46032),e=t(29747),i=new v({initialize:function(s){this.manager=s,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=e,this.onKeyUp=e,s.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var h=this.manager.config;this.enabled=h.inputKeyboard,this.target=h.inputKeyboardEventTarget,this.addCapture(h.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(a.POST_STEP,this.postUpdate,this)},startListeners:function(){var h=this;this.onKeyDown=function(l){if(!(l.defaultPrevented||!h.enabled||!h.manager)){h.queue.push(l),h.manager.events.emit(r.MANAGER_PROCESS);var f=l.altKey||l.ctrlKey||l.shiftKey||l.metaKey;h.preventDefault&&!f&&h.captures.indexOf(l.keyCode)>-1&&l.preventDefault()}},this.onKeyUp=function(l){if(!(l.defaultPrevented||!h.enabled||!h.manager)){h.queue.push(l),h.manager.events.emit(r.MANAGER_PROCESS);var f=l.altKey||l.ctrlKey||l.shiftKey||l.metaKey;h.preventDefault&&!f&&h.captures.indexOf(l.keyCode)>-1&&l.preventDefault()}};var s=this.target;s&&(s.addEventListener("keydown",this.onKeyDown,!1),s.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var h=this.target;h.removeEventListener("keydown",this.onKeyDown,!1),h.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(h){typeof h=="string"&&(h=h.split(",")),Array.isArray(h)||(h=[h]);for(var s=this.captures,l=0;l0},removeCapture:function(h){typeof h=="string"&&(h=h.split(",")),Array.isArray(h)||(h=[h]);for(var s=this.captures,l=0;l0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(a.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});c.exports=i},28846:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(95922),r=t(8443),n=t(35154),e=t(8214),i=t(89639),h=t(30472),s=t(46032),l=t(87960),f=t(74600),u=t(44594),d=t(56583),p=new a({Extends:v,initialize:function(y){v.call(this),this.game=y.systems.game,this.scene=y.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=y,this.manager=y.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,y.pluginEvents.once(e.BOOT,this.boot,this),y.pluginEvents.on(e.START,this.start,this)},boot:function(){var g=this.settings.input;this.enabled=n(g,"keyboard",!0);var y=n(g,"keyboard.capture",null);y&&this.addCaptures(y),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(g){return this.manager.addCapture(g),this},removeCapture:function(g){return this.manager.removeCapture(g),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:s.UP,down:s.DOWN,left:s.LEFT,right:s.RIGHT,space:s.SPACE,shift:s.SHIFT})},addKeys:function(g,y,x){y===void 0&&(y=!0),x===void 0&&(x=!1);var T={};if(typeof g=="string"){g=g.split(",");for(var C=0;C-1?T[C]=g:T[g.keyCode]=g,y&&this.addCapture(g.keyCode),g.setEmitOnRepeat(x),g}return typeof g=="string"&&(g=s[g.toUpperCase()]),T[g]||(T[g]=new h(this,g),y&&this.addCapture(g),T[g].setEmitOnRepeat(x)),T[g]},removeKey:function(g,y,x){y===void 0&&(y=!1),x===void 0&&(x=!1);var T=this.keys,C;if(g instanceof h){var M=T.indexOf(g);M>-1&&(C=this.keys[M],this.keys[M]=void 0)}else typeof g=="string"&&(g=s[g.toUpperCase()]);return T[g]&&(C=T[g],T[g]=void 0),C&&(C.plugin=null,x&&this.removeCapture(C.keyCode),y&&C.destroy()),this},removeAllKeys:function(g,y){g===void 0&&(g=!1),y===void 0&&(y=!1);for(var x=this.keys,T=0;Tg._tick)return g._tick=x,!0}return!1},update:function(){var g=this.manager.queue,y=g.length;if(!(!this.isActive()||y===0))for(var x=this.keys,T=0;T{/** + */var o=t(83419),v=t(50792),a=t(95922),r=t(8443),n=t(35154),e=t(8214),i=t(89639),h=t(30472),s=t(46032),l=t(87960),f=t(74600),u=t(44594),d=t(56583),p=new o({Extends:v,initialize:function(y){v.call(this),this.game=y.systems.game,this.scene=y.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=y,this.manager=y.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,y.pluginEvents.once(e.BOOT,this.boot,this),y.pluginEvents.on(e.START,this.start,this)},boot:function(){var g=this.settings.input;this.enabled=n(g,"keyboard",!0);var y=n(g,"keyboard.capture",null);y&&this.addCaptures(y),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(g){return this.manager.addCapture(g),this},removeCapture:function(g){return this.manager.removeCapture(g),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:s.UP,down:s.DOWN,left:s.LEFT,right:s.RIGHT,space:s.SPACE,shift:s.SHIFT})},addKeys:function(g,y,x){y===void 0&&(y=!0),x===void 0&&(x=!1);var C={};if(typeof g=="string"){g=g.split(",");for(var P=0;P-1?C[P]=g:C[g.keyCode]=g,y&&this.addCapture(g.keyCode),g.setEmitOnRepeat(x),g}return typeof g=="string"&&(g=s[g.toUpperCase()]),C[g]||(C[g]=new h(this,g),y&&this.addCapture(g),C[g].setEmitOnRepeat(x)),C[g]},removeKey:function(g,y,x){y===void 0&&(y=!1),x===void 0&&(x=!1);var C=this.keys,P;if(g instanceof h){var M=C.indexOf(g);M>-1&&(P=this.keys[M],this.keys[M]=void 0)}else typeof g=="string"&&(g=s[g.toUpperCase()]);return C[g]&&(P=C[g],C[g]=void 0),P&&(P.plugin=null,x&&this.removeCapture(P.keyCode),y&&P.destroy()),this},removeAllKeys:function(g,y){g===void 0&&(g=!1),y===void 0&&(y=!1);for(var x=this.keys,C=0;Cg._tick)return g._tick=x,!0}return!1},update:function(){var g=this.manager.queue,y=g.length;if(!(!this.isActive()||y===0))for(var x=this.keys,C=0;C{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.timeLastMatched=t.timeStamp,a.index++,a.index===a.size?!0:(a.current=a.keyCodes[a.index],!1)};c.exports=m},87960:(c,m,t)=>{/** + */var m=function(t,o){return o.timeLastMatched=t.timeStamp,o.index++,o.index===o.size?!0:(o.current=o.keyCodes[o.index],!1)};c.exports=m},87960:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95922),o=t(95540),r=t(68769),n=t(92803),e=new a({initialize:function(h,s,l){if(l===void 0&&(l={}),s.length<2)return!1;this.manager=h,this.enabled=!0,this.keyCodes=[];for(var f=0;f{/** + */var o=t(83419),v=t(95922),a=t(95540),r=t(68769),n=t(92803),e=new o({initialize:function(h,s,l){if(l===void 0&&(l={}),s.length<2)return!1;this.manager=h,this.enabled=!0,this.keyCodes=[];for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66970),v=function(o,r){if(r.matched)return!0;var n=!1,e=!1;if(o.keyCode===r.current)if(r.index>0&&r.maxKeyDelay>0){var i=r.timeLastMatched+r.maxKeyDelay;o.timeStamp<=i&&(e=!0,n=a(o,r))}else e=!0,n=a(o,r);return!e&&r.resetOnWrongKey&&(r.index=0,r.current=r.keyCodes[0]),n&&(r.timeLastMatched=o.timeStamp,r.matched=!0,r.timeMatched=o.timeStamp),n};c.exports=v},92803:c=>{/** + */var o=t(66970),v=function(a,r){if(r.matched)return!0;var n=!1,e=!1;if(a.keyCode===r.current)if(r.index>0&&r.maxKeyDelay>0){var i=r.timeLastMatched+r.maxKeyDelay;a.timeStamp<=i&&(e=!0,n=o(a,r))}else e=!0,n=o(a,r);return!e&&r.resetOnWrongKey&&(r.index=0,r.current=r.keyCodes[0]),n&&(r.timeLastMatched=a.timeStamp,r.matched=!0,r.timeMatched=a.timeStamp),n};c.exports=v},92803:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3378,7 +3378,7 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=50);var v=t.plugin.game.loop.time-t.timeDown;return t.isDown&&v{/** + */var m=function(t,o){o===void 0&&(o=50);var v=t.plugin.game.loop.time-t.timeDown;return t.isDown&&v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3390,7 +3390,7 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(95922),r=new a({Extends:v,initialize:function(e,i){v.call(this),this.plugin=e,this.keyCode=i,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(o.DOWN,this,n):(this.isDown=!0,this.isUp=!1,this.timeDown=n.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(o.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(o.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}});c.exports=r},46032:c=>{/** + */var o=t(83419),v=t(50792),a=t(95922),r=new o({Extends:v,initialize:function(e,i){v.call(this),this.plugin=e,this.keyCode=i,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(a.DOWN,this,n):(this.isDown=!0,this.isUp=!1,this.timeDown=n.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(a.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(a.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}});c.exports=r},46032:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3398,15 +3398,15 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(46032),v={};for(var o in a)v[a[o]]=o;c.exports=v},41170:c=>{/** + */var o=t(46032),v={};for(var a in o)v[o[a]]=a;c.exports=v},41170:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=50);var v=t.plugin.game.loop.time-t.timeUp;return t.isUp&&v{/** + */var m=function(t,o){o===void 0&&(o=50);var v=t.plugin.game.loop.time-t.timeUp;return t.isUp&&v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(89357),o=t(8214),r=t(29747),n=new a({initialize:function(i){this.manager=i,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,i.events.once(o.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(v.pointerLock){var e=this.target;e.requestPointerLock=e.requestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock()}},releasePointerLock:function(){v.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var e=this.target;if(e){var i=this,h=this.manager,s=h.canvas,l=window&&window.focus&&h.game.config.autoFocus;this.onMouseMove=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&(h.onMouseMove(u),i.preventDefaultMove&&u.preventDefault())},this.onMouseDown=function(u){l&&window.focus(),!u.defaultPrevented&&i.enabled&&h&&h.enabled&&(h.onMouseDown(u),i.preventDefaultDown&&u.target===s&&u.preventDefault())},this.onMouseDownWindow=function(u){u.sourceCapabilities&&u.sourceCapabilities.firesTouchEvents||!u.defaultPrevented&&i.enabled&&h&&h.enabled&&u.target!==s&&h.onMouseDown(u)},this.onMouseUp=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&(h.onMouseUp(u),i.preventDefaultUp&&u.target===s&&u.preventDefault())},this.onMouseUpWindow=function(u){u.sourceCapabilities&&u.sourceCapabilities.firesTouchEvents||!u.defaultPrevented&&i.enabled&&h&&h.enabled&&u.target!==s&&h.onMouseUp(u)},this.onMouseOver=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&h.setCanvasOver(u)},this.onMouseOut=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&h.setCanvasOut(u)},this.onMouseWheel=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&h.onMouseWheel(u),i.preventDefaultWheel&&u.target===s&&u.preventDefault()};var f={passive:!0};if(e.addEventListener("mousemove",this.onMouseMove),e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),e.addEventListener("mouseover",this.onMouseOver,f),e.addEventListener("mouseout",this.onMouseOut,f),this.preventDefaultWheel?e.addEventListener("wheel",this.onMouseWheel,{passive:!1}):e.addEventListener("wheel",this.onMouseWheel,f),window&&h.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,f),window.top.addEventListener("mouseup",this.onMouseUpWindow,f)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,f),window.addEventListener("mouseup",this.onMouseUpWindow,f),this.isTop=!1}v.pointerLock&&(this.pointerLockChange=function(u){var d=i.target;i.locked=document.pointerLockElement===d||document.mozPointerLockElement===d||document.webkitPointerLockElement===d,h.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)),v.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});c.exports=n},87078:(c,m,t)=>{/** + */var o=t(83419),v=t(89357),a=t(8214),r=t(29747),n=new o({initialize:function(i){this.manager=i,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,i.events.once(a.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(v.pointerLock){var e=this.target;e.requestPointerLock=e.requestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock()}},releasePointerLock:function(){v.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var e=this.target;if(e){var i=this,h=this.manager,s=h.canvas,l=window&&window.focus&&h.game.config.autoFocus;this.onMouseMove=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&(h.onMouseMove(u),i.preventDefaultMove&&u.preventDefault())},this.onMouseDown=function(u){l&&window.focus(),!u.defaultPrevented&&i.enabled&&h&&h.enabled&&(h.onMouseDown(u),i.preventDefaultDown&&u.target===s&&u.preventDefault())},this.onMouseDownWindow=function(u){u.sourceCapabilities&&u.sourceCapabilities.firesTouchEvents||!u.defaultPrevented&&i.enabled&&h&&h.enabled&&u.target!==s&&h.onMouseDown(u)},this.onMouseUp=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&(h.onMouseUp(u),i.preventDefaultUp&&u.target===s&&u.preventDefault())},this.onMouseUpWindow=function(u){u.sourceCapabilities&&u.sourceCapabilities.firesTouchEvents||!u.defaultPrevented&&i.enabled&&h&&h.enabled&&u.target!==s&&h.onMouseUp(u)},this.onMouseOver=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&h.setCanvasOver(u)},this.onMouseOut=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&h.setCanvasOut(u)},this.onMouseWheel=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&h.onMouseWheel(u),i.preventDefaultWheel&&u.target===s&&u.preventDefault()};var f={passive:!0};if(e.addEventListener("mousemove",this.onMouseMove),e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),e.addEventListener("mouseover",this.onMouseOver,f),e.addEventListener("mouseout",this.onMouseOut,f),this.preventDefaultWheel?e.addEventListener("wheel",this.onMouseWheel,{passive:!1}):e.addEventListener("wheel",this.onMouseWheel,f),window&&h.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,f),window.top.addEventListener("mouseup",this.onMouseUpWindow,f)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,f),window.addEventListener("mouseup",this.onMouseUpWindow,f),this.isTop=!1}v.pointerLock&&(this.pointerLockChange=function(u){var d=i.target;i.locked=document.pointerLockElement===d||document.mozPointerLockElement===d||document.webkitPointerLockElement===d,h.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)),v.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});c.exports=n},87078:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3414,7 +3414,7 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(8214),o=t(29747),r=new a({initialize:function(e){this.manager=e,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=o,this.onTouchStartWindow=o,this.onTouchMove=o,this.onTouchEnd=o,this.onTouchEndWindow=o,this.onTouchCancel=o,this.onTouchCancelWindow=o,this.isTop=!0,e.events.once(v.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,i=this.manager,h=i.canvas,s=window&&window.focus&&i.game.config.autoFocus;this.onTouchMove=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchMove(d),e.capture&&d.cancelable&&d.preventDefault())},this.onTouchStart=function(d){s&&window.focus(),!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchStart(d),e.capture&&d.cancelable&&d.target===h&&d.preventDefault())},this.onTouchStartWindow=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&d.target!==h&&i.onTouchStart(d)},this.onTouchEnd=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchEnd(d),e.capture&&d.cancelable&&d.target===h&&d.preventDefault())},this.onTouchEndWindow=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&d.target!==h&&i.onTouchEnd(d)},this.onTouchCancel=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchCancel(d),e.capture&&d.preventDefault())},this.onTouchCancelWindow=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onTouchCancel(d)};var l=this.capture,f={passive:!0},u={passive:!1};if(n.addEventListener("touchstart",this.onTouchStart,l?u:f),n.addEventListener("touchmove",this.onTouchMove,l?u:f),n.addEventListener("touchend",this.onTouchEnd,l?u:f),n.addEventListener("touchcancel",this.onTouchCancel,l?u:f),window&&i.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}});c.exports=r},95618:(c,m,t)=>{/** + */var o=t(83419),v=t(8214),a=t(29747),r=new o({initialize:function(e){this.manager=e,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=a,this.onTouchStartWindow=a,this.onTouchMove=a,this.onTouchEnd=a,this.onTouchEndWindow=a,this.onTouchCancel=a,this.onTouchCancelWindow=a,this.isTop=!0,e.events.once(v.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,i=this.manager,h=i.canvas,s=window&&window.focus&&i.game.config.autoFocus;this.onTouchMove=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchMove(d),e.capture&&d.cancelable&&d.preventDefault())},this.onTouchStart=function(d){s&&window.focus(),!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchStart(d),e.capture&&d.cancelable&&d.target===h&&d.preventDefault())},this.onTouchStartWindow=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&d.target!==h&&i.onTouchStart(d)},this.onTouchEnd=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchEnd(d),e.capture&&d.cancelable&&d.target===h&&d.preventDefault())},this.onTouchEndWindow=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&d.target!==h&&i.onTouchEnd(d)},this.onTouchCancel=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchCancel(d),e.capture&&d.preventDefault())},this.onTouchCancelWindow=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onTouchCancel(d)};var l=this.capture,f={passive:!0},u={passive:!1};if(n.addEventListener("touchstart",this.onTouchStart,l?u:f),n.addEventListener("touchmove",this.onTouchMove,l?u:f),n.addEventListener("touchend",this.onTouchEnd,l?u:f),n.addEventListener("touchcancel",this.onTouchCancel,l?u:f),window&&i.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}});c.exports=r},95618:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3422,35 +3422,35 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(54899),r=t(95540),n=t(98356),e=t(3374),i=t(84376),h=t(92638),s=new a({initialize:function(f,u){if(this.loader=f,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 d=this.key;if(f.prefix&&f.prefix!==""&&(this.key=f.prefix+d),!this.key)throw new Error("Invalid File key: "+this.key);var p=r(u,"url");p===void 0?p=f.path+d+"."+r(u,"extension",""):typeof p=="string"&&!p.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(p=f.path+p),this.url=p,this.src="",this.xhrSettings=h(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"?v.FILE_POPULATED:v.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 p=="string"&&p.indexOf("data:")===0},setLink:function(l){this.linkFile=l,l.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===v.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=v.FILE_LOADING,this.src=n(this,this.loader.baseURL),this.src.indexOf("data:")===0&&(this.base64=!0),this.xhrLoader=i(this,this.loader.xhr))},onLoad:function(l,f){var u=l.responseURL&&this.loader.localSchemes.some(function(g){return l.responseURL.indexOf(g)===0}),d=u&&f.target.status===0,p=!(f.target&&f.target.status!==200)||d;l.readyState===4&&l.status>=400&&l.status<=599&&(p=!1),this.state=v.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,p)},onBase64Load:function(l){this.xhrLoader=l,this.state=v.FILE_LOADED,this.percentComplete=1,this.loader.emit(o.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(l){l.lengthComputable&&(this.bytesLoaded=l.loaded,this.bytesTotal=l.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(o.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=v.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=v.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=v.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(l){if(this.state!==v.FILE_PENDING_DESTROY){l===void 0&&(l=this.data);var f=this.key,u=this.type;this.loader.emit(o.FILE_COMPLETE,f,u,l),this.loader.emit(o.FILE_KEY_COMPLETE+u+"-"+f,f,u,l),this.loader.flagForRemoval(this),this.state=v.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});s.createObjectURL=function(l,f,u){if(typeof URL=="function")l.src=URL.createObjectURL(f);else{var d=new FileReader;d.onload=function(){l.removeAttribute("crossOrigin"),l.src="data:"+(f.type||u)+";base64,"+d.result.split(",")[1]},d.onerror=l.onerror,d.readAsDataURL(f)}},s.revokeObjectURL=function(l){typeof URL=="function"&&URL.revokeObjectURL(l.src)},c.exports=s},74099:c=>{/** + */var o=t(83419),v=t(23906),a=t(54899),r=t(95540),n=t(98356),e=t(3374),i=t(84376),h=t(92638),s=new o({initialize:function(f,u){if(this.loader=f,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 d=this.key;if(f.prefix&&f.prefix!==""&&(this.key=f.prefix+d),!this.key)throw new Error("Invalid File key: "+this.key);var p=r(u,"url");p===void 0?p=f.path+d+"."+r(u,"extension",""):typeof p=="string"&&!p.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(p=f.path+p),this.url=p,this.src="",this.xhrSettings=h(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"?v.FILE_POPULATED:v.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 p=="string"&&p.indexOf("data:")===0},setLink:function(l){this.linkFile=l,l.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===v.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=v.FILE_LOADING,this.src=n(this,this.loader.baseURL),this.src.indexOf("data:")===0&&(this.base64=!0),this.xhrLoader=i(this,this.loader.xhr))},onLoad:function(l,f){var u=l.responseURL&&this.loader.localSchemes.some(function(g){return l.responseURL.indexOf(g)===0}),d=u&&f.target.status===0,p=!(f.target&&f.target.status!==200)||d;l.readyState===4&&l.status>=400&&l.status<=599&&(p=!1),this.state=v.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,p)},onBase64Load:function(l){this.xhrLoader=l,this.state=v.FILE_LOADED,this.percentComplete=1,this.loader.emit(a.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(l){l.lengthComputable&&(this.bytesLoaded=l.loaded,this.bytesTotal=l.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(a.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=v.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=v.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=v.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(l){if(this.state!==v.FILE_PENDING_DESTROY){l===void 0&&(l=this.data);var f=this.key,u=this.type;this.loader.emit(a.FILE_COMPLETE,f,u,l),this.loader.emit(a.FILE_KEY_COMPLETE+u+"-"+f,f,u,l),this.loader.flagForRemoval(this),this.state=v.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});s.createObjectURL=function(l,f,u){if(typeof URL=="function")l.src=URL.createObjectURL(f);else{var d=new FileReader;d.onload=function(){l.removeAttribute("crossOrigin"),l.src="data:"+(f.type||u)+";base64,"+d.result.split(",")[1]},d.onerror=l.onerror,d.readAsDataURL(f)}},s.revokeObjectURL=function(l){typeof URL=="function"&&URL.revokeObjectURL(l.src)},c.exports=s},74099:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={},t={install:function(a){for(var v in m)a[v]=m[v]},register:function(a,v){m[a]=v},destroy:function(){m={}}};c.exports=t},98356:c=>{/** + */var m={},t={install:function(o){for(var v in m)o[v]=m[v]},register:function(o,v){m[o]=v},destroy:function(){m={}}};c.exports=t},98356:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.url?t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:a+t.url:!1};c.exports=m},74261:(c,m,t)=>{/** + */var m=function(t,o){return t.url?t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:o+t.url:!1};c.exports=m},74261:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(35072),r=t(50792),n=t(54899),e=t(74099),i=t(95540),h=t(35154),s=t(37277),l=t(44594),f=t(92638),u=new a({Extends:r,initialize:function(p){r.call(this);var g=p.sys.game.config,y=p.sys.settings.loader;this.scene=p,this.systems=p.sys,this.cacheManager=p.sys.cache,this.textureManager=p.sys.textures,this.sceneManager=p.sys.game.scene,e.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(i(y,"baseURL",g.loaderBaseURL)),this.setPath(i(y,"path",g.loaderPath)),this.setPrefix(i(y,"prefix",g.loaderPrefix)),this.maxParallelDownloads=i(y,"maxParallelDownloads",g.loaderMaxParallelDownloads),this.xhr=f(i(y,"responseType",g.loaderResponseType),i(y,"async",g.loaderAsync),i(y,"user",g.loaderUser),i(y,"password",g.loaderPassword),i(y,"timeout",g.loaderTimeout),i(y,"withCredentials",g.loaderWithCredentials)),this.crossOrigin=i(y,"crossOrigin",g.loaderCrossOrigin),this.imageLoadType=i(y,"imageLoadType",g.loaderImageLoadType),this.localSchemes=i(y,"localScheme",g.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new o,this.inflight=new o,this.queue=new o,this._deleteQueue=new o,this.totalFailed=0,this.totalComplete=0,this.state=v.LOADER_IDLE,this.multiKeyIndex=0,p.sys.events.once(l.BOOT,this.boot,this),p.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(d){return d===void 0&&(d=""),d!==""&&d.substr(-1)!=="/"&&(d=d.concat("/")),this.baseURL=d,this},setPath:function(d){return d===void 0&&(d=""),d!==""&&d.substr(-1)!=="/"&&(d=d.concat("/")),this.path=d,this},setPrefix:function(d){return d===void 0&&(d=""),this.prefix=d,this},setCORS:function(d){return this.crossOrigin=d,this},addFile:function(d){Array.isArray(d)||(d=[d]);for(var p=0;p0},isLoading:function(){return this.state===v.LOADER_LOADING||this.state===v.LOADER_PROCESSING},isReady:function(){return this.state===v.LOADER_IDLE||this.state===v.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=v.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===v.LOADER_LOADING&&this.list.size>0&&this.inflight.size{/** + */var o=t(83419),v=t(23906),a=t(35072),r=t(50792),n=t(54899),e=t(74099),i=t(95540),h=t(35154),s=t(37277),l=t(44594),f=t(92638),u=new o({Extends:r,initialize:function(p){r.call(this);var g=p.sys.game.config,y=p.sys.settings.loader;this.scene=p,this.systems=p.sys,this.cacheManager=p.sys.cache,this.textureManager=p.sys.textures,this.sceneManager=p.sys.game.scene,e.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(i(y,"baseURL",g.loaderBaseURL)),this.setPath(i(y,"path",g.loaderPath)),this.setPrefix(i(y,"prefix",g.loaderPrefix)),this.maxParallelDownloads=i(y,"maxParallelDownloads",g.loaderMaxParallelDownloads),this.xhr=f(i(y,"responseType",g.loaderResponseType),i(y,"async",g.loaderAsync),i(y,"user",g.loaderUser),i(y,"password",g.loaderPassword),i(y,"timeout",g.loaderTimeout),i(y,"withCredentials",g.loaderWithCredentials)),this.crossOrigin=i(y,"crossOrigin",g.loaderCrossOrigin),this.imageLoadType=i(y,"imageLoadType",g.loaderImageLoadType),this.localSchemes=i(y,"localScheme",g.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new a,this.inflight=new a,this.queue=new a,this._deleteQueue=new a,this.totalFailed=0,this.totalComplete=0,this.state=v.LOADER_IDLE,this.multiKeyIndex=0,p.sys.events.once(l.BOOT,this.boot,this),p.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(d){return d===void 0&&(d=""),d!==""&&d.substr(-1)!=="/"&&(d=d.concat("/")),this.baseURL=d,this},setPath:function(d){return d===void 0&&(d=""),d!==""&&d.substr(-1)!=="/"&&(d=d.concat("/")),this.path=d,this},setPrefix:function(d){return d===void 0&&(d=""),this.prefix=d,this},setCORS:function(d){return this.crossOrigin=d,this},addFile:function(d){Array.isArray(d)||(d=[d]);for(var p=0;p0},isLoading:function(){return this.state===v.LOADER_LOADING||this.state===v.LOADER_PROCESSING},isReady:function(){return this.state===v.LOADER_IDLE||this.state===v.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=v.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===v.LOADER_LOADING&&this.list.size>0&&this.inflight.size{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79291),v=t(92638),o=function(r,n){var e=r===void 0?v():a({},r);if(n)for(var i in n)n[i]!==void 0&&(e[i]=n[i]);return e};c.exports=o},26430:(c,m,t)=>{/** + */var o=t(79291),v=t(92638),a=function(r,n){var e=r===void 0?v():o({},r);if(n)for(var i in n)n[i]!==void 0&&(e[i]=n[i]);return e};c.exports=a},26430:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(54899),r=new a({initialize:function(e,i,h,s){var l=[];s.forEach(function(d){d&&l.push(d)}),this.loader=e,this.type=i,this.key=h;var f=this.key;e.prefix&&e.prefix!==""&&(this.key=e.prefix+f),this.multiKeyIndex=e.multiKeyIndex++,this.files=l,this.state=v.FILE_PENDING,this.complete=!1,this.pending=l.length,this.failed=0,this.config={},this.baseURL=e.baseURL,this.path=e.path,this.prefix=e.prefix;for(var u=0;u{/** + */var o=t(83419),v=t(23906),a=t(54899),r=new o({initialize:function(e,i,h,s){var l=[];s.forEach(function(d){d&&l.push(d)}),this.loader=e,this.type=i,this.key=h;var f=this.key;e.prefix&&e.prefix!==""&&(this.key=e.prefix+f),this.multiKeyIndex=e.multiKeyIndex++,this.files=l,this.state=v.FILE_PENDING,this.complete=!1,this.pending=l.length,this.failed=0,this.config={},this.baseURL=e.baseURL,this.path=e.path,this.prefix=e.prefix;for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(3374),v=function(o,r){var n=a(r,o.xhrSettings);if(o.base64){var e=o.url.split(";base64,").pop()||o.url.split(",").pop(),i={responseText:atob(e)};o.onBase64Load(i);return}var h=new XMLHttpRequest;if(h.open("GET",o.src,n.async,n.user,n.password),h.responseType=o.xhrSettings.responseType,h.timeout=n.timeout,n.headers)for(var s in n.headers)h.setRequestHeader(s,n.headers[s]);return n.header&&n.headerValue&&h.setRequestHeader(n.header,n.headerValue),n.requestedWith&&h.setRequestHeader("X-Requested-With",n.requestedWith),n.overrideMimeType&&h.overrideMimeType(n.overrideMimeType),n.withCredentials&&(h.withCredentials=!0),h.onload=o.onLoad.bind(o,h),h.onerror=o.onError.bind(o,h),h.onprogress=o.onProgress.bind(o),h.ontimeout=o.onError.bind(o,h),h.send(),h};c.exports=v},92638:c=>{/** + */var o=t(3374),v=function(a,r){var n=o(r,a.xhrSettings);if(a.base64){var e=a.url.split(";base64,").pop()||a.url.split(",").pop(),i={responseText:atob(e)};a.onBase64Load(i);return}var h=new XMLHttpRequest;if(h.open("GET",a.src,n.async,n.user,n.password),h.responseType=a.xhrSettings.responseType,h.timeout=n.timeout,n.headers)for(var s in n.headers)h.setRequestHeader(s,n.headers[s]);return n.header&&n.headerValue&&h.setRequestHeader(n.header,n.headerValue),n.requestedWith&&h.setRequestHeader("X-Requested-With",n.requestedWith),n.overrideMimeType&&h.overrideMimeType(n.overrideMimeType),n.withCredentials&&(h.withCredentials=!0),h.onload=a.onLoad.bind(a,h),h.onerror=a.onError.bind(a,h),h.onprogress=a.onProgress.bind(a),h.ontimeout=a.onError.bind(a,h),h.send(),h};c.exports=v},92638:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r,n){return t===void 0&&(t=""),a===void 0&&(a=!0),v===void 0&&(v=""),o===void 0&&(o=""),r===void 0&&(r=0),n===void 0&&(n=!1),{responseType:t,async:a,user:v,password:o,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}};c.exports=m},23906:c=>{/** + */var m=function(t,o,v,a,r,n){return t===void 0&&(t=""),o===void 0&&(o=!0),v===void 0&&(v=""),a===void 0&&(a=""),r===void 0&&(r=0),n===void 0&&(n=!1),{responseType:t,async:o,user:v,password:a,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}};c.exports=m},23906:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3502,140 +3502,140 @@ import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as Uu,r as or,a as Ie,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(518),r=t(54899),n=new a({Extends:o,initialize:function(i,h,s,l,f){o.call(this,i,h,s,l,f),this.type="animationJSON"},onProcess:function(){this.loader.once(r.POST_PROCESS,this.onLoadComplete,this),o.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});v.register("animation",function(e,i,h,s){if(Array.isArray(e))for(var l=0;l{/** + */var o=t(83419),v=t(74099),a=t(518),r=t(54899),n=new o({Extends:a,initialize:function(i,h,s,l,f){a.call(this,i,h,s,l,f),this.type="animationJSON"},onProcess:function(){this.loader.once(r.POST_PROCESS,this.onLoadComplete,this),a.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});v.register("animation",function(e,i,h,s){if(Array.isArray(e))for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(518),i=t(26430),h=new a({Extends:i,initialize:function(l,f,u,d,p,g){var y,x;if(n(f)){var T=f;f=o(T,"key"),y=new r(l,{key:f,url:o(T,"textureURL"),extension:o(T,"textureExtension","png"),normalMap:o(T,"normalMap"),xhrSettings:o(T,"textureXhrSettings")}),x=new e(l,{key:f,url:o(T,"atlasURL"),extension:o(T,"atlasExtension","json"),xhrSettings:o(T,"atlasXhrSettings")})}else y=new r(l,f,u,p),x=new e(l,f,d,g);y.linkFile?i.call(this,l,"atlasjson",f,[y,x,y.linkFile]):i.call(this,l,"atlasjson",f,[y,x])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(s.key,s.data,l.data,f),l.addToCache(),this.complete=!0}}});v.register("aseprite",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** + */var o=t(83419),v=t(74099),a=t(95540),r=t(19550),n=t(41212),e=t(518),i=t(26430),h=new o({Extends:i,initialize:function(l,f,u,d,p,g){var y,x;if(n(f)){var C=f;f=a(C,"key"),y=new r(l,{key:f,url:a(C,"textureURL"),extension:a(C,"textureExtension","png"),normalMap:a(C,"normalMap"),xhrSettings:a(C,"textureXhrSettings")}),x=new e(l,{key:f,url:a(C,"atlasURL"),extension:a(C,"atlasExtension","json"),xhrSettings:a(C,"atlasXhrSettings")})}else y=new r(l,f,u,p),x=new e(l,f,d,g);y.linkFile?i.call(this,l,"atlasjson",f,[y,x,y.linkFile]):i.call(this,l,"atlasjson",f,[y,x])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(s.key,s.data,l.data,f),l.addToCache(),this.complete=!0}}});v.register("aseprite",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(518),i=t(26430),h=new a({Extends:i,initialize:function(l,f,u,d,p,g){var y,x;if(n(f)){var T=f;f=o(T,"key"),y=new r(l,{key:f,url:o(T,"textureURL"),extension:o(T,"textureExtension","png"),normalMap:o(T,"normalMap"),xhrSettings:o(T,"textureXhrSettings")}),x=new e(l,{key:f,url:o(T,"atlasURL"),extension:o(T,"atlasExtension","json"),xhrSettings:o(T,"atlasXhrSettings")})}else y=new r(l,f,u,p),x=new e(l,f,d,g);y.linkFile?i.call(this,l,"atlasjson",f,[y,x,y.linkFile]):i.call(this,l,"atlasjson",f,[y,x])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(s.key,s.data,l.data,f),this.complete=!0}}});v.register("atlas",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** + */var o=t(83419),v=t(74099),a=t(95540),r=t(19550),n=t(41212),e=t(518),i=t(26430),h=new o({Extends:i,initialize:function(l,f,u,d,p,g){var y,x;if(n(f)){var C=f;f=a(C,"key"),y=new r(l,{key:f,url:a(C,"textureURL"),extension:a(C,"textureExtension","png"),normalMap:a(C,"normalMap"),xhrSettings:a(C,"textureXhrSettings")}),x=new e(l,{key:f,url:a(C,"atlasURL"),extension:a(C,"atlasExtension","json"),xhrSettings:a(C,"atlasXhrSettings")})}else y=new r(l,f,u,p),x=new e(l,f,d,g);y.linkFile?i.call(this,l,"atlasjson",f,[y,x,y.linkFile]):i.call(this,l,"atlasjson",f,[y,x])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(s.key,s.data,l.data,f),this.complete=!0}}});v.register("atlas",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(26430),i=t(57318),h=new a({Extends:e,initialize:function(l,f,u,d,p,g){var y,x;if(n(f)){var T=f;f=o(T,"key"),y=new r(l,{key:f,url:o(T,"textureURL"),extension:o(T,"textureExtension","png"),normalMap:o(T,"normalMap"),xhrSettings:o(T,"textureXhrSettings")}),x=new i(l,{key:f,url:o(T,"atlasURL"),extension:o(T,"atlasExtension","xml"),xhrSettings:o(T,"atlasXhrSettings")})}else y=new r(l,f,u,p),x=new i(l,f,d,g);y.linkFile?e.call(this,l,"atlasxml",f,[y,x,y.linkFile]):e.call(this,l,"atlasxml",f,[y,x])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(s.key,s.data,l.data,f),this.complete=!0}}});v.register("atlasXML",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** + */var o=t(83419),v=t(74099),a=t(95540),r=t(19550),n=t(41212),e=t(26430),i=t(57318),h=new o({Extends:e,initialize:function(l,f,u,d,p,g){var y,x;if(n(f)){var C=f;f=a(C,"key"),y=new r(l,{key:f,url:a(C,"textureURL"),extension:a(C,"textureExtension","png"),normalMap:a(C,"normalMap"),xhrSettings:a(C,"textureXhrSettings")}),x=new i(l,{key:f,url:a(C,"atlasURL"),extension:a(C,"atlasExtension","xml"),xhrSettings:a(C,"atlasXhrSettings")})}else y=new r(l,f,u,p),x=new i(l,f,d,g);y.linkFile?e.call(this,l,"atlasxml",f,[y,x,y.linkFile]):e.call(this,l,"atlasxml",f,[y,x])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(s.key,s.data,l.data,f),this.complete=!0}}});v.register("atlasXML",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(89749),i=t(41212),h=new a({Extends:o,initialize:function(l,f,u,d,p){if(i(f)){var g=f;f=n(g,"key"),d=n(g,"xhrSettings"),p=n(g,"context",p)}var y={type:"audio",cache:l.cacheManager.audio,extension:u.type,responseType:"arraybuffer",key:f,url:u.url,xhrSettings:d,config:{context:p}};o.call(this,l,y)},onProcess:function(){this.state=v.FILE_PROCESSING;var s=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(l){s.data=l,s.onProcessComplete()},function(l){console.error("Error decoding audio: "+s.key+" - ",l?l.message:null),s.onProcessError()}),this.config.context=null}});h.create=function(s,l,f,u,d){var p=s.systems.game,g=p.config.audio,y=p.device.audio;i(l)&&(f=n(l,"url",[]),u=n(l,"config",{}));var x=h.getAudioURL(p,f);return x?y.webAudio&&!g.disableWebAudio?new h(s,l,x,d,p.sound.context):new e(s,l,x,u):(console.warn('No audio URLs for "%s" matched this device',l),null)},h.getAudioURL=function(s,l){Array.isArray(l)||(l=[l]);for(var f=0;f{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(89749),i=t(41212),h=new o({Extends:a,initialize:function(l,f,u,d,p){if(i(f)){var g=f;f=n(g,"key"),d=n(g,"xhrSettings"),p=n(g,"context",p)}var y={type:"audio",cache:l.cacheManager.audio,extension:u.type,responseType:"arraybuffer",key:f,url:u.url,xhrSettings:d,config:{context:p}};a.call(this,l,y)},onProcess:function(){this.state=v.FILE_PROCESSING;var s=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(l){s.data=l,s.onProcessComplete()},function(l){console.error("Error decoding audio: "+s.key+" - ",l?l.message:null),s.onProcessError()}),this.config.context=null}});h.create=function(s,l,f,u,d){var p=s.systems.game,g=p.config.audio,y=p.device.audio;i(l)&&(f=n(l,"url",[]),u=n(l,"config",{}));var x=h.getAudioURL(p,f);return x?y.webAudio&&!g.disableWebAudio?new h(s,l,x,d,p.sound.context):new e(s,l,x,u):(console.warn('No audio URLs for "%s" matched this device',l),null)},h.getAudioURL=function(s,l){Array.isArray(l)||(l=[l]);for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(21097),v=t(83419),o=t(74099),r=t(95540),n=t(41212),e=t(518),i=t(26430),h=new v({Extends:i,initialize:function(l,f,u,d,p,g,y){if(n(f)){var x=f;f=r(x,"key"),u=r(x,"jsonURL"),d=r(x,"audioURL"),p=r(x,"audioConfig"),g=r(x,"audioXhrSettings"),y=r(x,"jsonXhrSettings")}var T;if(!d)T=new e(l,f,u,y),i.call(this,l,"audiosprite",f,[T]),this.config.resourceLoad=!0,this.config.audioConfig=p,this.config.audioXhrSettings=g;else{var C=a.create(l,f,d,p,g);C&&(T=new e(l,f,u,y),i.call(this,l,"audiosprite",f,[C,T]),this.config.resourceLoad=!1)}},onFileComplete:function(s){var l=this.files.indexOf(s);if(l!==-1&&(this.pending--,this.config.resourceLoad&&s.type==="json"&&s.data.hasOwnProperty("resources"))){var f=s.data.resources,u=r(this.config,"audioConfig"),d=r(this.config,"audioXhrSettings"),p=a.create(this.loader,s.key,f,u,d);p&&(this.addToMultiFile(p),this.loader.addFile(p))}},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1];s.addToCache(),l.addToCache(),this.complete=!0}}});o.register("audioSprite",function(s,l,f,u,d,p){var g=this.systems.game,y=g.config.audio,x=g.device.audio;if(y&&y.noAudio||!x.webAudio&&!x.audioData)return this;var T;if(Array.isArray(s))for(var C=0;C{/** + */var o=t(21097),v=t(83419),a=t(74099),r=t(95540),n=t(41212),e=t(518),i=t(26430),h=new v({Extends:i,initialize:function(l,f,u,d,p,g,y){if(n(f)){var x=f;f=r(x,"key"),u=r(x,"jsonURL"),d=r(x,"audioURL"),p=r(x,"audioConfig"),g=r(x,"audioXhrSettings"),y=r(x,"jsonXhrSettings")}var C;if(!d)C=new e(l,f,u,y),i.call(this,l,"audiosprite",f,[C]),this.config.resourceLoad=!0,this.config.audioConfig=p,this.config.audioXhrSettings=g;else{var P=o.create(l,f,d,p,g);P&&(C=new e(l,f,u,y),i.call(this,l,"audiosprite",f,[P,C]),this.config.resourceLoad=!1)}},onFileComplete:function(s){var l=this.files.indexOf(s);if(l!==-1&&(this.pending--,this.config.resourceLoad&&s.type==="json"&&s.data.hasOwnProperty("resources"))){var f=s.data.resources,u=r(this.config,"audioConfig"),d=r(this.config,"audioXhrSettings"),p=o.create(this.loader,s.key,f,u,d);p&&(this.addToMultiFile(p),this.loader.addFile(p))}},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1];s.addToCache(),l.addToCache(),this.complete=!0}}});a.register("audioSprite",function(s,l,f,u,d,p){var g=this.systems.game,y=g.config.audio,x=g.device.audio;if(y&&y.noAudio||!x.webAudio&&!x.audioData)return this;var C;if(Array.isArray(s))for(var P=0;P{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d){var p="bin";if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),u=n(g,"xhrSettings"),p=n(g,"extension",p),d=n(g,"dataType",d)}var y={type:"binary",cache:s.cacheManager.binary,extension:p,responseType:"arraybuffer",key:l,url:f,xhrSettings:u,config:{dataType:d}};o.call(this,s,y)},onProcess:function(){this.state=v.FILE_PROCESSING;var h=this.config.dataType;this.data=h?new h(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});r.register("binary",function(h,s,l,f){if(Array.isArray(h))for(var u=0;u{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new o({Extends:a,initialize:function(s,l,f,u,d){var p="bin";if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),u=n(g,"xhrSettings"),p=n(g,"extension",p),d=n(g,"dataType",d)}var y={type:"binary",cache:s.cacheManager.binary,extension:p,responseType:"arraybuffer",key:l,url:f,xhrSettings:u,config:{dataType:d}};a.call(this,s,y)},onProcess:function(){this.state=v.FILE_PROCESSING;var h=this.config.dataType;this.data=h?new h(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});r.register("binary",function(h,s,l,f){if(Array.isArray(h))for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(26430),i=t(21859),h=t(57318),s=new a({Extends:e,initialize:function(f,u,d,p,g,y){var x,T;if(n(u)){var C=u;u=o(C,"key"),x=new r(f,{key:u,url:o(C,"textureURL"),extension:o(C,"textureExtension","png"),normalMap:o(C,"normalMap"),xhrSettings:o(C,"textureXhrSettings")}),T=new h(f,{key:u,url:o(C,"fontDataURL"),extension:o(C,"fontDataExtension","xml"),xhrSettings:o(C,"fontDataXhrSettings")})}else x=new r(f,u,d,g),T=new h(f,u,p,y);x.linkFile?e.call(this,f,"bitmapfont",u,[x,T,x.linkFile]):e.call(this,f,"bitmapfont",u,[x,T])},addToCache:function(){if(this.isReadyToProcess()){var l=this.files[0],f=this.files[1];l.addToCache();var u=l.cache.get(l.key),d=i(f.data,l.cache.getFrame(l.key),0,0,u);this.loader.cacheManager.bitmapFont.add(l.key,{data:d,texture:l.key,frame:null}),this.complete=!0}}});v.register("bitmapFont",function(l,f,u,d,p){var g;if(Array.isArray(l))for(var y=0;y{/** + */var o=t(83419),v=t(74099),a=t(95540),r=t(19550),n=t(41212),e=t(26430),i=t(21859),h=t(57318),s=new o({Extends:e,initialize:function(f,u,d,p,g,y){var x,C;if(n(u)){var P=u;u=a(P,"key"),x=new r(f,{key:u,url:a(P,"textureURL"),extension:a(P,"textureExtension","png"),normalMap:a(P,"normalMap"),xhrSettings:a(P,"textureXhrSettings")}),C=new h(f,{key:u,url:a(P,"fontDataURL"),extension:a(P,"fontDataExtension","xml"),xhrSettings:a(P,"fontDataXhrSettings")})}else x=new r(f,u,d,g),C=new h(f,u,p,y);x.linkFile?e.call(this,f,"bitmapfont",u,[x,C,x.linkFile]):e.call(this,f,"bitmapfont",u,[x,C])},addToCache:function(){if(this.isReadyToProcess()){var l=this.files[0],f=this.files[1];l.addToCache();var u=l.cache.get(l.key),d=i(f.data,l.cache.getFrame(l.key),0,0,u);this.loader.cacheManager.bitmapFont.add(l.key,{data:d,texture:l.key,frame:null}),this.complete=!0}}});v.register("bitmapFont",function(l,f,u,d,p){var g;if(Array.isArray(l))for(var y=0;y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){var d="css";if(e(l)){var p=l;l=n(p,"key"),f=n(p,"url"),u=n(p,"xhrSettings"),d=n(p,"extension",d)}var g={type:"script",cache:!1,extension:d,responseType:"text",key:l,url:f,xhrSettings:u};o.call(this,s,g)},onProcess:function(){this.state=v.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(h,s,l){if(Array.isArray(h))for(var f=0;f{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new o({Extends:a,initialize:function(s,l,f,u){var d="css";if(e(l)){var p=l;l=n(p,"key"),f=n(p,"url"),u=n(p,"xhrSettings"),d=n(p,"extension",d)}var g={type:"script",cache:!1,extension:d,responseType:"text",key:l,url:f,xhrSettings:u};a.call(this,s,g)},onProcess:function(){this.state=v.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(h,s,l){if(Array.isArray(h))for(var f=0;f{/** * @author Richard Davey * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(38734),v=t(85722),o=t(83419),r=t(74099),n=t(95540),e=t(19550),i=t(41212),h=t(518),s=t(31403),l=t(46975),f=t(59327),u=t(26430),d=t(82038),p=t(55222),g=new o({Extends:u,initialize:function(x,T,C,M){if(C.multiAtlasURL){var w=new h(x,{key:T,url:C.multiAtlasURL,xhrSettings:M,config:C});u.call(this,x,"texture",T,[w])}else{var L=C.textureURL.substr(C.textureURL.length-3);C.type||(C.type=L.toLowerCase()==="ktx"?"KTX":"PVR");var F=new v(x,{key:T,url:C.textureURL,extension:L,xhrSettings:M,config:C});if(C.atlasURL){var O=new h(x,{key:T,url:C.atlasURL,xhrSettings:M,config:C});u.call(this,x,"texture",T,[F,O])}else u.call(this,x,"texture",T,[F])}this.config=C},onFileComplete:function(y){var x=this.files.indexOf(y);if(x!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(y.type==="json"&&y.data.hasOwnProperty("textures")){var T=y.data.textures,C=this.config,M=this.loader,w=M.baseURL,L=M.path,F=M.prefix,O=n(C,"multiBaseURL",this.baseURL),N=n(C,"multiPath",this.path),G=n(C,"prefix",this.prefix),V=n(C,"textureXhrSettings");O&&M.setBaseURL(O),N&&M.setPath(N),G&&M.setPrefix(G);for(var K=0;K{/** + */var o=t(38734),v=t(85722),a=t(83419),r=t(74099),n=t(95540),e=t(19550),i=t(41212),h=t(518),s=t(31403),l=t(46975),f=t(59327),u=t(26430),d=t(82038),p=t(55222),g=new a({Extends:u,initialize:function(x,C,P,M){if(P.multiAtlasURL){var w=new h(x,{key:C,url:P.multiAtlasURL,xhrSettings:M,config:P});u.call(this,x,"texture",C,[w])}else{var I=P.textureURL.substr(P.textureURL.length-3);P.type||(P.type=I.toLowerCase()==="ktx"?"KTX":"PVR");var L=new v(x,{key:C,url:P.textureURL,extension:I,xhrSettings:M,config:P});if(P.atlasURL){var B=new h(x,{key:C,url:P.atlasURL,xhrSettings:M,config:P});u.call(this,x,"texture",C,[L,B])}else u.call(this,x,"texture",C,[L])}this.config=P},onFileComplete:function(y){var x=this.files.indexOf(y);if(x!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(y.type==="json"&&y.data.hasOwnProperty("textures")){var C=y.data.textures,P=this.config,M=this.loader,w=M.baseURL,I=M.path,L=M.prefix,B=n(P,"multiBaseURL",this.baseURL),N=n(P,"multiPath",this.path),G=n(P,"prefix",this.prefix),V=n(P,"textureXhrSettings");B&&M.setBaseURL(B),N&&M.setPath(N),G&&M.setPrefix(G);for(var K=0;K{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(73894),h=new a({Extends:o,initialize:function(l,f,u,d,p){var g="glsl";if(e(f)){var y=f;f=n(y,"key"),u=n(y,"url"),d=n(y,"shaderType","fragment"),p=n(y,"xhrSettings"),g=n(y,"extension",g)}else d===void 0&&(d="fragment");var x={type:"glsl",cache:l.cacheManager.shader,extension:g,responseType:"text",key:f,url:u,config:{shaderType:d},xhrSettings:p};o.call(this,l,x)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var s=this.data.split(` -`),l=this.extractBlock(s,0);if(l)for(;l;){var f=this.getShaderName(l.header),u=this.getShaderType(l.header),d=this.getShaderUniforms(l.header),p=l.shader;if(this.cache.has(f)){var g=this.cache.get(f);u==="fragment"?g.fragmentSrc=p:g.vertexSrc=p,g.uniforms||(g.uniforms=d)}else u==="fragment"?this.cache.add(f,new i(f,p,"",d)):this.cache.add(f,new i(f,"",p,d));l=this.extractBlock(s,l.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new i(this.key,this.data)):this.cache.add(this.key,new i(this.key,"",this.data))},getShaderName:function(s){for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(54899),o=t(41299),r=t(95540),n=t(98356),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){if(e(l)){var d=l;l=r(d,"key"),u=r(d,"config",u)}var p={type:"audio",cache:s.cacheManager.audio,extension:f.type,key:l,url:f.url,config:u};o.call(this,s,p),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var h=0;h{/** + */var o=t(83419),v=t(54899),a=t(41299),r=t(95540),n=t(98356),e=t(41212),i=new o({Extends:a,initialize:function(s,l,f,u){if(e(l)){var d=l;l=r(d,"key"),u=r(d,"config",u)}var p={type:"audio",cache:s.cacheManager.audio,extension:f.type,key:l,url:f.url,config:u};a.call(this,s,p),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var h=0;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){var d="html";if(e(l)){var p=l;l=n(p,"key"),f=n(p,"url"),u=n(p,"xhrSettings"),d=n(p,"extension",d)}var g={type:"text",cache:s.cacheManager.html,extension:d,responseType:"text",key:l,url:f,xhrSettings:u};o.call(this,s,g)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("html",function(h,s,l){if(Array.isArray(h))for(var f=0;f{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new o({Extends:a,initialize:function(s,l,f,u){var d="html";if(e(l)){var p=l;l=n(p,"key"),f=n(p,"url"),u=n(p,"xhrSettings"),d=n(p,"extension",d)}var g={type:"text",cache:s.cacheManager.html,extension:d,responseType:"text",key:l,url:f,xhrSettings:u};a.call(this,s,g)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("html",function(h,s,l){if(Array.isArray(h))for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d,p){u===void 0&&(u=512),d===void 0&&(d=512);var g="html";if(e(l)){var y=l;l=n(y,"key"),f=n(y,"url"),p=n(y,"xhrSettings"),g=n(y,"extension",g),u=n(y,"width",u),d=n(y,"height",d)}var x={type:"html",cache:s.textureManager,extension:g,responseType:"text",key:l,url:f,xhrSettings:p,config:{width:u,height:d}};o.call(this,s,x)},onProcess:function(){this.state=v.FILE_PROCESSING;var h=this.config.width,s=this.config.height,l=[];l.push(''),l.push(''),l.push(''),l.push(this.xhrLoader.responseText),l.push(""),l.push(""),l.push("");var f=[l.join(` -`)],u=this;try{var d=new window.Blob(f,{type:"image/svg+xml;charset=utf-8"})}catch{u.state=v.FILE_ERRORED,u.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){o.revokeObjectURL(u.data),u.onProcessComplete()},this.data.onerror=function(){o.revokeObjectURL(u.data),u.onProcessError()},o.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("htmlTexture",function(h,s,l,f,u){if(Array.isArray(h))for(var d=0;d{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new o({Extends:a,initialize:function(s,l,f,u,d,p){u===void 0&&(u=512),d===void 0&&(d=512);var g="html";if(e(l)){var y=l;l=n(y,"key"),f=n(y,"url"),p=n(y,"xhrSettings"),g=n(y,"extension",g),u=n(y,"width",u),d=n(y,"height",d)}var x={type:"html",cache:s.textureManager,extension:g,responseType:"text",key:l,url:f,xhrSettings:p,config:{width:u,height:d}};a.call(this,s,x)},onProcess:function(){this.state=v.FILE_PROCESSING;var h=this.config.width,s=this.config.height,l=[];l.push(''),l.push(''),l.push(''),l.push(this.xhrLoader.responseText),l.push(""),l.push(""),l.push("");var f=[l.join(` +`)],u=this;try{var d=new window.Blob(f,{type:"image/svg+xml;charset=utf-8"})}catch{u.state=v.FILE_ERRORED,u.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){a.revokeObjectURL(u.data),u.onProcessComplete()},this.data.onerror=function(){a.revokeObjectURL(u.data),u.onProcessError()},a.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("htmlTexture",function(h,s,l,f,u){if(Array.isArray(h))for(var d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(98356),h=new a({Extends:o,initialize:function s(l,f,u,d,p){var g="png",y;if(e(f)){var x=f;f=n(x,"key"),u=n(x,"url"),y=n(x,"normalMap"),d=n(x,"xhrSettings"),g=n(x,"extension",g),p=n(x,"frameConfig")}Array.isArray(u)&&(y=u[1],u=u[0]);var T={type:"image",cache:l.textureManager,extension:g,responseType:"blob",key:f,url:u,xhrSettings:d,config:p};if(o.call(this,l,T),y){var C=new s(l,this.key,y,d,p);C.type="normalMap",this.setLink(C),l.addFile(C)}this.useImageElementLoad=l.imageLoadType==="HTMLImageElement"||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var s=this;this.data.onload=function(){o.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){o.revokeObjectURL(s.data),s.onProcessError()},o.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var s=this.state;this.state=v.FILE_PROCESSING,s===v.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=v.FILE_LOADING,this.src=i(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var s=this;this.data.onload=function(){s.state=v.FILE_LOADED,s.loader.nextFile(s,!0)},this.data.onerror=function(){s.loader.nextFile(s,!1)},this.data.src=this.src},addToCache:function(){var s=this.linkFile;s?s.state>=v.FILE_COMPLETE&&(s.type==="spritesheet"?s.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,s.data,this.data):this.cache.addImage(this.key,this.data,s.data)):this.cache.addImage(this.key,this.data)}});r.register("image",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(98356),h=new o({Extends:a,initialize:function s(l,f,u,d,p){var g="png",y;if(e(f)){var x=f;f=n(x,"key"),u=n(x,"url"),y=n(x,"normalMap"),d=n(x,"xhrSettings"),g=n(x,"extension",g),p=n(x,"frameConfig")}Array.isArray(u)&&(y=u[1],u=u[0]);var C={type:"image",cache:l.textureManager,extension:g,responseType:"blob",key:f,url:u,xhrSettings:d,config:p};if(a.call(this,l,C),y){var P=new s(l,this.key,y,d,p);P.type="normalMap",this.setLink(P),l.addFile(P)}this.useImageElementLoad=l.imageLoadType==="HTMLImageElement"||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var s=this;this.data.onload=function(){a.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){a.revokeObjectURL(s.data),s.onProcessError()},a.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var s=this.state;this.state=v.FILE_PROCESSING,s===v.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=v.FILE_LOADING,this.src=i(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var s=this;this.data.onload=function(){s.state=v.FILE_LOADED,s.loader.nextFile(s,!0)},this.data.onerror=function(){s.loader.nextFile(s,!1)},this.data.src=this.src},addToCache:function(){var s=this.linkFile;s?s.state>=v.FILE_COMPLETE&&(s.type==="spritesheet"?s.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,s.data,this.data):this.cache.addImage(this.key,this.data,s.data)):this.cache.addImage(this.key,this.data)}});r.register("image",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(35154),i=t(41212),h=new a({Extends:o,initialize:function(l,f,u,d,p){var g="json";if(i(f)){var y=f;f=n(y,"key"),u=n(y,"url"),d=n(y,"xhrSettings"),g=n(y,"extension",g),p=n(y,"dataKey",p)}var x={type:"json",cache:l.cacheManager.json,extension:g,responseType:"text",key:f,url:u,xhrSettings:d,config:p};o.call(this,l,x),i(u)&&(p?this.data=e(u,p):this.data=u,this.state=v.FILE_POPULATED)},onProcess:function(){if(this.state!==v.FILE_POPULATED){this.state=v.FILE_PROCESSING;try{var s=JSON.parse(this.xhrLoader.responseText)}catch(f){throw this.onProcessError(),f}var l=this.config;typeof l=="string"?this.data=e(s,l,s):this.data=s}this.onProcessComplete()}});r.register("json",function(s,l,f,u){if(Array.isArray(s))for(var d=0;d{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(35154),i=t(41212),h=new o({Extends:a,initialize:function(l,f,u,d,p){var g="json";if(i(f)){var y=f;f=n(y,"key"),u=n(y,"url"),d=n(y,"xhrSettings"),g=n(y,"extension",g),p=n(y,"dataKey",p)}var x={type:"json",cache:l.cacheManager.json,extension:g,responseType:"text",key:f,url:u,xhrSettings:d,config:p};a.call(this,l,x),i(u)&&(p?this.data=e(u,p):this.data=u,this.state=v.FILE_POPULATED)},onProcess:function(){if(this.state!==v.FILE_POPULATED){this.state=v.FILE_PROCESSING;try{var s=JSON.parse(this.xhrLoader.responseText)}catch(f){throw this.onProcessError(),f}var l=this.config;typeof l=="string"?this.data=e(s,l,s):this.data=s}this.onProcessComplete()}});r.register("json",function(s,l,f,u){if(Array.isArray(s))for(var d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(518),i=t(26430),h=new a({Extends:i,initialize:function(l,f,u,d,p,g,y){if(n(f)){var x=f;f=o(x,"key"),o(x,"url",!1)?u=o(x,"url"):u=o(x,"atlasURL"),g=o(x,"xhrSettings"),d=o(x,"path"),p=o(x,"baseURL"),y=o(x,"textureXhrSettings")}var T=new e(l,f,u,g);i.call(this,l,"multiatlas",f,[T]),this.config.path=d,this.config.baseURL=p,this.config.textureXhrSettings=y},onFileComplete:function(s){var l=this.files.indexOf(s);if(l!==-1&&(this.pending--,s.type==="json"&&s.data.hasOwnProperty("textures"))){var f=s.data.textures,u=this.config,d=this.loader,p=d.baseURL,g=d.path,y=d.prefix,x=o(u,"baseURL",this.baseURL),T=o(u,"path",this.path),C=o(u,"prefix",this.prefix),M=o(u,"textureXhrSettings");d.setBaseURL(x),d.setPath(T),d.setPrefix(C);for(var w=0;w{/** + */var o=t(83419),v=t(74099),a=t(95540),r=t(19550),n=t(41212),e=t(518),i=t(26430),h=new o({Extends:i,initialize:function(l,f,u,d,p,g,y){if(n(f)){var x=f;f=a(x,"key"),a(x,"url",!1)?u=a(x,"url"):u=a(x,"atlasURL"),g=a(x,"xhrSettings"),d=a(x,"path"),p=a(x,"baseURL"),y=a(x,"textureXhrSettings")}var C=new e(l,f,u,g);i.call(this,l,"multiatlas",f,[C]),this.config.path=d,this.config.baseURL=p,this.config.textureXhrSettings=y},onFileComplete:function(s){var l=this.files.indexOf(s);if(l!==-1&&(this.pending--,s.type==="json"&&s.data.hasOwnProperty("textures"))){var f=s.data.textures,u=this.config,d=this.loader,p=d.baseURL,g=d.path,y=d.prefix,x=a(u,"baseURL",this.baseURL),C=a(u,"path",this.path),P=a(u,"prefix",this.prefix),M=a(u,"textureXhrSettings");d.setBaseURL(x),d.setPath(C),d.setPrefix(P);for(var w=0;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(41212),n=t(26430),e=t(34328),i=new a({Extends:n,initialize:function(s,l,f,u){var d="js",p=[];if(r(l)){var g=l;l=o(g,"key"),f=o(g,"url"),u=o(g,"xhrSettings"),d=o(g,"extension",d)}Array.isArray(f)||(f=[f]);for(var y=0;y{/** + */var o=t(83419),v=t(74099),a=t(95540),r=t(41212),n=t(26430),e=t(34328),i=new o({Extends:n,initialize:function(s,l,f,u){var d="js",p=[];if(r(l)){var g=l;l=a(g,"key"),f=a(g,"url"),u=a(g,"xhrSettings"),d=a(g,"extension",d)}Array.isArray(f)||(f=[f]);for(var y=0;y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(41212),n=t(26430),e=t(85048),i=t(61485),h=t(78776),s=new a({Extends:n,initialize:function(f,u,d,p,g,y){var x,T,C=f.cacheManager.obj;if(r(u)){var M=u;u=o(M,"key"),x=new h(f,{key:u,type:"obj",cache:C,url:o(M,"url"),extension:o(M,"extension","obj"),xhrSettings:o(M,"xhrSettings"),config:{flipUV:o(M,"flipUV",g)}}),p=o(M,"matURL"),p&&(T=new h(f,{key:u,type:"mat",cache:C,url:p,extension:o(M,"matExtension","mat"),xhrSettings:o(M,"xhrSettings")}))}else x=new h(f,{key:u,url:d,type:"obj",cache:C,extension:"obj",xhrSettings:y,config:{flipUV:g}}),p&&(T=new h(f,{key:u,url:p,type:"mat",cache:C,extension:"mat",xhrSettings:y}));n.call(this,f,"obj",u,[x,T])},addToCache:function(){if(this.isReadyToProcess()){var l=this.files[0],f=this.files[1],u=e(l.data,l.config.flipUV);f&&(u.materials=i(f.data)),l.cache.add(l.key,u),this.complete=!0}}});v.register("obj",function(l,f,u,d,p){var g;if(Array.isArray(l))for(var y=0;y{/** + */var o=t(83419),v=t(74099),a=t(95540),r=t(41212),n=t(26430),e=t(85048),i=t(61485),h=t(78776),s=new o({Extends:n,initialize:function(f,u,d,p,g,y){var x,C,P=f.cacheManager.obj;if(r(u)){var M=u;u=a(M,"key"),x=new h(f,{key:u,type:"obj",cache:P,url:a(M,"url"),extension:a(M,"extension","obj"),xhrSettings:a(M,"xhrSettings"),config:{flipUV:a(M,"flipUV",g)}}),p=a(M,"matURL"),p&&(C=new h(f,{key:u,type:"mat",cache:P,url:p,extension:a(M,"matExtension","mat"),xhrSettings:a(M,"xhrSettings")}))}else x=new h(f,{key:u,url:d,type:"obj",cache:P,extension:"obj",xhrSettings:y,config:{flipUV:g}}),p&&(C=new h(f,{key:u,url:p,type:"mat",cache:P,extension:"mat",xhrSettings:y}));n.call(this,f,"obj",u,[x,C])},addToCache:function(){if(this.isReadyToProcess()){var l=this.files[0],f=this.files[1],u=e(l.data,l.config.flipUV);f&&(u.materials=i(f.data)),l.cache.add(l.key,u),this.complete=!0}}});v.register("obj",function(l,f,u,d,p){var g;if(Array.isArray(l))for(var y=0;y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(74099),r=t(518),n=new a({Extends:r,initialize:function(i,h,s,l,f){r.call(this,i,h,s,l,f),this.type="packfile"},onProcess:function(){if(this.state!==v.FILE_POPULATED&&(this.state=v.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()}});o.register("pack",function(e,i,h,s){if(Array.isArray(e))for(var l=0;l{/** + */var o=t(83419),v=t(23906),a=t(74099),r=t(518),n=new o({Extends:r,initialize:function(i,h,s,l,f){r.call(this,i,h,s,l,f),this.type="packfile"},onProcess:function(){if(this.state!==v.FILE_POPULATED&&(this.state=v.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()}});a.register("pack",function(e,i,h,s){if(Array.isArray(e))for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d,p){var g="js";if(e(l)){var y=l;l=n(y,"key"),f=n(y,"url"),p=n(y,"xhrSettings"),g=n(y,"extension",g),u=n(y,"start"),d=n(y,"mapping")}var x={type:"plugin",cache:!1,extension:g,responseType:"text",key:l,url:f,xhrSettings:p,config:{start:u,mapping:d}};o.call(this,s,x),typeof f=="function"&&(this.data=f,this.state=v.FILE_POPULATED)},onProcess:function(){var h=this.loader.systems.plugins,s=this.config,l=n(s,"start",!1),f=n(s,"mapping",null);if(this.state===v.FILE_POPULATED)h.install(this.key,this.data,l,f);else{this.state=v.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=h.install(this.key,window[this.key],l,f);(l||f)&&(this.loader.systems[f]=u,this.loader.scene[f]=u)}this.onProcessComplete()}});r.register("plugin",function(h,s,l,f,u){if(Array.isArray(h))for(var d=0;d{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new o({Extends:a,initialize:function(s,l,f,u,d,p){var g="js";if(e(l)){var y=l;l=n(y,"key"),f=n(y,"url"),p=n(y,"xhrSettings"),g=n(y,"extension",g),u=n(y,"start"),d=n(y,"mapping")}var x={type:"plugin",cache:!1,extension:g,responseType:"text",key:l,url:f,xhrSettings:p,config:{start:u,mapping:d}};a.call(this,s,x),typeof f=="function"&&(this.data=f,this.state=v.FILE_POPULATED)},onProcess:function(){var h=this.loader.systems.plugins,s=this.config,l=n(s,"start",!1),f=n(s,"mapping",null);if(this.state===v.FILE_POPULATED)h.install(this.key,this.data,l,f);else{this.state=v.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=h.install(this.key,window[this.key],l,f);(l||f)&&(this.loader.systems[f]=u,this.loader.scene[f]=u)}this.onProcessComplete()}});r.register("plugin",function(h,s,l,f,u){if(Array.isArray(h))for(var d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d){var p="svg";if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),u=n(g,"svgConfig",{}),d=n(g,"xhrSettings"),p=n(g,"extension",p)}var y={type:"svg",cache:s.textureManager,extension:p,responseType:"text",key:l,url:f,xhrSettings:d,config:{width:n(u,"width"),height:n(u,"height"),scale:n(u,"scale")}};o.call(this,s,y)},onProcess:function(){this.state=v.FILE_PROCESSING;var h=this.xhrLoader.responseText,s=[h],l=this.config.width,f=this.config.height,u=this.config.scale;t:if(l&&f||u){var d=null,p=new DOMParser;d=p.parseFromString(h,"text/xml");var g=d.getElementsByTagName("svg")[0],y=g.hasAttribute("viewBox"),x=parseFloat(g.getAttribute("width")),T=parseFloat(g.getAttribute("height"));if(!y&&x&&T)g.setAttribute("viewBox","0 0 "+x+" "+T);else if(y&&!x&&!T){var C=g.getAttribute("viewBox").split(/\s+|,/);x=C[2],T=C[3]}if(u)if(x&&T)l=x*u,f=T*u;else break t;g.setAttribute("width",l.toString()+"px"),g.setAttribute("height",f.toString()+"px"),s=[new XMLSerializer().serializeToString(g)]}try{var M=new window.Blob(s,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var w=this,L=!1;this.data.onload=function(){L||o.revokeObjectURL(w.data),w.onProcessComplete()},this.data.onerror=function(){L?w.onProcessError():(L=!0,o.revokeObjectURL(w.data),w.data.src="data:image/svg+xml,"+encodeURIComponent(s.join("")))},o.createObjectURL(this.data,M,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("svg",function(h,s,l,f){if(Array.isArray(h))for(var u=0;u{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new o({Extends:a,initialize:function(s,l,f,u,d){var p="svg";if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),u=n(g,"svgConfig",{}),d=n(g,"xhrSettings"),p=n(g,"extension",p)}var y={type:"svg",cache:s.textureManager,extension:p,responseType:"text",key:l,url:f,xhrSettings:d,config:{width:n(u,"width"),height:n(u,"height"),scale:n(u,"scale")}};a.call(this,s,y)},onProcess:function(){this.state=v.FILE_PROCESSING;var h=this.xhrLoader.responseText,s=[h],l=this.config.width,f=this.config.height,u=this.config.scale;t:if(l&&f||u){var d=null,p=new DOMParser;d=p.parseFromString(h,"text/xml");var g=d.getElementsByTagName("svg")[0],y=g.hasAttribute("viewBox"),x=parseFloat(g.getAttribute("width")),C=parseFloat(g.getAttribute("height"));if(!y&&x&&C)g.setAttribute("viewBox","0 0 "+x+" "+C);else if(y&&!x&&!C){var P=g.getAttribute("viewBox").split(/\s+|,/);x=P[2],C=P[3]}if(u)if(x&&C)l=x*u,f=C*u;else break t;g.setAttribute("width",l.toString()+"px"),g.setAttribute("height",f.toString()+"px"),s=[new XMLSerializer().serializeToString(g)]}try{var M=new window.Blob(s,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var w=this,I=!1;this.data.onload=function(){I||a.revokeObjectURL(w.data),w.onProcessComplete()},this.data.onerror=function(){I?w.onProcessError():(I=!0,a.revokeObjectURL(w.data),w.data.src="data:image/svg+xml,"+encodeURIComponent(s.join("")))},a.createObjectURL(this.data,M,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("svg",function(h,s,l,f){if(Array.isArray(h))for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){var d="js";if(e(l)){var p=l;l=n(p,"key"),f=n(p,"url"),u=n(p,"xhrSettings"),d=n(p,"extension",d)}var g={type:"text",extension:d,responseType:"text",key:l,url:f,xhrSettings:u};o.call(this,s,g)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var h=this.data.concat(`(function(){ + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new o({Extends:a,initialize:function(s,l,f,u){var d="js";if(e(l)){var p=l;l=n(p,"key"),f=n(p,"url"),u=n(p,"xhrSettings"),d=n(p,"extension",d)}var g={type:"text",extension:d,responseType:"text",key:l,url:f,xhrSettings:u};a.call(this,s,g)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var h=this.data.concat(`(function(){ return new `+this.key+`(); }).call(this);`),s=eval;this.loader.sceneManager.add(this.key,s(h)),this.complete=!0}});r.register("sceneFile",function(h,s,l){if(Array.isArray(h))for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d,p){var g="js";if(e(l)){var y=l;l=n(y,"key"),f=n(y,"url"),p=n(y,"xhrSettings"),g=n(y,"extension",g),u=n(y,"systemKey"),d=n(y,"sceneKey")}var x={type:"scenePlugin",cache:!1,extension:g,responseType:"text",key:l,url:f,xhrSettings:p,config:{systemKey:u,sceneKey:d}};o.call(this,s,x),typeof f=="function"&&(this.data=f,this.state=v.FILE_POPULATED)},onProcess:function(){var h=this.loader.systems.plugins,s=this.config,l=this.key,f=n(s,"systemKey",l),u=n(s,"sceneKey",l);this.state===v.FILE_POPULATED?h.installScenePlugin(f,this.data,u,this.loader.scene,!0):(this.state=v.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),h.installScenePlugin(f,window[this.key],u,this.loader.scene,!0)),this.onProcessComplete()}});r.register("scenePlugin",function(h,s,l,f,u){if(Array.isArray(h))for(var d=0;d{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new o({Extends:a,initialize:function(s,l,f,u,d,p){var g="js";if(e(l)){var y=l;l=n(y,"key"),f=n(y,"url"),p=n(y,"xhrSettings"),g=n(y,"extension",g),u=n(y,"systemKey"),d=n(y,"sceneKey")}var x={type:"scenePlugin",cache:!1,extension:g,responseType:"text",key:l,url:f,xhrSettings:p,config:{systemKey:u,sceneKey:d}};a.call(this,s,x),typeof f=="function"&&(this.data=f,this.state=v.FILE_POPULATED)},onProcess:function(){var h=this.loader.systems.plugins,s=this.config,l=this.key,f=n(s,"systemKey",l),u=n(s,"sceneKey",l);this.state===v.FILE_POPULATED?h.installScenePlugin(f,this.data,u,this.loader.scene,!0):(this.state=v.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),h.installScenePlugin(f,window[this.key],u,this.loader.scene,!0)),this.onProcessComplete()}});r.register("scenePlugin",function(h,s,l,f,u){if(Array.isArray(h))for(var d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d){var p="js";if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),u=n(g,"type","script"),d=n(g,"xhrSettings"),p=n(g,"extension",p)}else u===void 0&&(u="script");var y={type:u,cache:!1,extension:p,responseType:"text",key:l,url:f,xhrSettings:d};o.call(this,s,y)},onProcess:function(){this.state=v.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(h,s,l,f){if(Array.isArray(h))for(var u=0;u{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new o({Extends:a,initialize:function(s,l,f,u,d){var p="js";if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),u=n(g,"type","script"),d=n(g,"xhrSettings"),p=n(g,"extension",p)}else u===void 0&&(u="script");var y={type:u,cache:!1,extension:p,responseType:"text",key:l,url:f,xhrSettings:d};a.call(this,s,y)},onProcess:function(){this.state=v.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(h,s,l,f){if(Array.isArray(h))for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(74099),r=t(19550),n=new a({Extends:r,initialize:function(i,h,s,l,f){r.call(this,i,h,s,f,l),this.type="spritesheet"},addToCache:function(){var e=this.linkFile;e?e.state>=v.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)}});o.register("spritesheet",function(e,i,h,s){if(Array.isArray(e))for(var l=0;l{/** + */var o=t(83419),v=t(23906),a=t(74099),r=t(19550),n=new o({Extends:r,initialize:function(i,h,s,l,f){r.call(this,i,h,s,f,l),this.type="spritesheet"},addToCache:function(){var e=this.linkFile;e?e.state>=v.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)}});a.register("spritesheet",function(e,i,h,s){if(Array.isArray(e))for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){var d="text",p="txt",g=s.cacheManager.text;if(e(l)){var y=l;l=n(y,"key"),f=n(y,"url"),u=n(y,"xhrSettings"),p=n(y,"extension",p),d=n(y,"type",d),g=n(y,"cache",g)}var x={type:d,cache:g,extension:p,responseType:"text",key:l,url:f,xhrSettings:u};o.call(this,s,x)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("text",function(h,s,l){if(Array.isArray(h))for(var f=0;f{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new o({Extends:a,initialize:function(s,l,f,u){var d="text",p="txt",g=s.cacheManager.text;if(e(l)){var y=l;l=n(y,"key"),f=n(y,"url"),u=n(y,"xhrSettings"),p=n(y,"extension",p),d=n(y,"type",d),g=n(y,"cache",g)}var x={type:d,cache:g,extension:p,responseType:"text",key:l,url:f,xhrSettings:u};a.call(this,s,x)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("text",function(h,s,l){if(Array.isArray(h))for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(80341),h=new a({Extends:o,initialize:function(l,f,u,d){var p="csv";if(e(f)){var g=f;f=n(g,"key"),u=n(g,"url"),d=n(g,"xhrSettings"),p=n(g,"extension",p)}var y={type:"tilemapCSV",cache:l.cacheManager.tilemap,extension:p,responseType:"text",key:f,url:u,xhrSettings:d};o.call(this,l,y),this.tilemapFormat=i.CSV},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var s={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,s)}});r.register("tilemapCSV",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(80341),h=new o({Extends:a,initialize:function(l,f,u,d){var p="csv";if(e(f)){var g=f;f=n(g,"key"),u=n(g,"url"),d=n(g,"xhrSettings"),p=n(g,"extension",p)}var y={type:"tilemapCSV",cache:l.cacheManager.tilemap,extension:p,responseType:"text",key:f,url:u,xhrSettings:d};a.call(this,l,y),this.tilemapFormat=i.CSV},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var s={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,s)}});r.register("tilemapCSV",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(518),r=t(80341),n=new a({Extends:o,initialize:function(i,h,s,l){o.call(this,i,h,s,l),this.type="tilemapJSON",this.cache=i.cacheManager.tilemap},addToCache:function(){var e={format:r.WELTMEISTER,data:this.data};this.cache.add(this.key,e)}});v.register("tilemapImpact",function(e,i,h){if(Array.isArray(e))for(var s=0;s{/** + */var o=t(83419),v=t(74099),a=t(518),r=t(80341),n=new o({Extends:a,initialize:function(i,h,s,l){a.call(this,i,h,s,l),this.type="tilemapJSON",this.cache=i.cacheManager.tilemap},addToCache:function(){var e={format:r.WELTMEISTER,data:this.data};this.cache.add(this.key,e)}});v.register("tilemapImpact",function(e,i,h){if(Array.isArray(e))for(var s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(518),r=t(80341),n=new a({Extends:o,initialize:function(i,h,s,l){o.call(this,i,h,s,l),this.type="tilemapJSON",this.cache=i.cacheManager.tilemap},addToCache:function(){var e={format:r.TILED_JSON,data:this.data};this.cache.add(this.key,e)}});v.register("tilemapTiledJSON",function(e,i,h){if(Array.isArray(e))for(var s=0;s{/** + */var o=t(83419),v=t(74099),a=t(518),r=t(80341),n=new o({Extends:a,initialize:function(i,h,s,l){a.call(this,i,h,s,l),this.type="tilemapJSON",this.cache=i.cacheManager.tilemap},addToCache:function(){var e={format:r.TILED_JSON,data:this.data};this.cache.add(this.key,e)}});v.register("tilemapTiledJSON",function(e,i,h){if(Array.isArray(e))for(var s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(26430),i=t(78776),h=new a({Extends:e,initialize:function(l,f,u,d,p,g){var y,x;if(n(f)){var T=f;f=o(T,"key"),y=new r(l,{key:f,url:o(T,"textureURL"),extension:o(T,"textureExtension","png"),normalMap:o(T,"normalMap"),xhrSettings:o(T,"textureXhrSettings")}),x=new i(l,{key:f,url:o(T,"atlasURL"),extension:o(T,"atlasExtension","txt"),xhrSettings:o(T,"atlasXhrSettings")})}else y=new r(l,f,u,p),x=new i(l,f,d,g);y.linkFile?e.call(this,l,"unityatlas",f,[y,x,y.linkFile]):e.call(this,l,"unityatlas",f,[y,x])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(s.key,s.data,l.data,f),this.complete=!0}}});v.register("unityAtlas",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** + */var o=t(83419),v=t(74099),a=t(95540),r=t(19550),n=t(41212),e=t(26430),i=t(78776),h=new o({Extends:e,initialize:function(l,f,u,d,p,g){var y,x;if(n(f)){var C=f;f=a(C,"key"),y=new r(l,{key:f,url:a(C,"textureURL"),extension:a(C,"textureExtension","png"),normalMap:a(C,"normalMap"),xhrSettings:a(C,"textureXhrSettings")}),x=new i(l,{key:f,url:a(C,"atlasURL"),extension:a(C,"atlasExtension","txt"),xhrSettings:a(C,"atlasXhrSettings")})}else y=new r(l,f,u,p),x=new i(l,f,d,g);y.linkFile?e.call(this,l,"unityatlas",f,[y,x,y.linkFile]):e.call(this,l,"unityatlas",f,[y,x])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(s.key,s.data,l.data,f),this.complete=!0}}});v.register("unityAtlas",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(98356),e=t(95540),i=t(41212),h=new a({Extends:o,initialize:function(l,f,u,d){if(d===void 0&&(d=!1),i(f)){var p=f;f=e(p,"key"),u=e(p,"url",[]),d=e(p,"noAudio",!1)}var g=l.systems.game.device.video.getVideoURL(u);g||console.warn("VideoFile: No supported format for "+f);var y={type:"video",cache:l.cacheManager.video,extension:g.type,key:f,url:g.url,config:{noAudio:d}};o.call(this,l,y)},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=v.FILE_LOADED,this.loader.nextFile(this,!0)}});r.register("video",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(98356),e=t(95540),i=t(41212),h=new o({Extends:a,initialize:function(l,f,u,d){if(d===void 0&&(d=!1),i(f)){var p=f;f=e(p,"key"),u=e(p,"url",[]),d=e(p,"noAudio",!1)}var g=l.systems.game.device.video.getVideoURL(u);g||console.warn("VideoFile: No supported format for "+f);var y={type:"video",cache:l.cacheManager.video,extension:g.type,key:f,url:g.url,config:{noAudio:d}};a.call(this,l,y)},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=v.FILE_LOADED,this.loader.nextFile(this,!0)}});r.register("video",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(56836),h=new a({Extends:o,initialize:function(l,f,u,d){var p="xml";if(e(f)){var g=f;f=n(g,"key"),u=n(g,"url"),d=n(g,"xhrSettings"),p=n(g,"extension",p)}var y={type:"xml",cache:l.cacheManager.xml,extension:p,responseType:"text",key:f,url:u,xhrSettings:d};o.call(this,l,y)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=i(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});r.register("xml",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** + */var o=t(83419),v=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(56836),h=new o({Extends:a,initialize:function(l,f,u,d){var p="xml";if(e(f)){var g=f;f=n(g,"key"),u=n(g,"url"),d=n(g,"xhrSettings"),p=n(g,"extension",p)}var y={type:"xml",cache:l.cacheManager.xml,extension:p,responseType:"text",key:f,url:u,xhrSettings:d};a.call(this,l,y)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=i(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});r.register("xml",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3643,63 +3643,63 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23906),v=t(79291),o={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)};o=v(!1,o,a),c.exports=o},53307:c=>{/** + */var o=t(23906),v=t(79291),a={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)};a=v(!1,a,o),c.exports=a},53307:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){for(var a=0,v=0;v{/** + */var m=function(t){for(var o=0,v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(6411),v=function(o,r){return a(o)/a(r)/a(o-r)};c.exports=v},30976:c=>{/** + */var o=t(6411),v=function(a,r){return o(a)/o(r)/o(a-r)};c.exports=v},30976:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return Math.floor(Math.random()*(a-t+1)+t)};c.exports=m},87842:c=>{/** + */var m=function(t,o){return Math.floor(Math.random()*(o-t+1)+t)};c.exports=m},87842:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){var n=(o-a)*.5,e=(r-v)*.5,i=t*t,h=t*i;return(2*v-2*o+n+e)*h+(-3*v+3*o-2*n-e)*i+n*t+v};c.exports=m},26302:c=>{/** + */var m=function(t,o,v,a,r){var n=(a-o)*.5,e=(r-v)*.5,i=t*t,h=t*i;return(2*v-2*a+n+e)*h+(-3*v+3*a-2*n-e)*i+n*t+v};c.exports=m},26302:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){a===void 0&&(a=0),v===void 0&&(v=10);var o=Math.pow(v,-a);return Math.ceil(t*o)/o};c.exports=m},45319:c=>{/** + */var m=function(t,o,v){o===void 0&&(o=0),v===void 0&&(v=10);var a=Math.pow(v,-o);return Math.ceil(t*a)/a};c.exports=m},45319:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return Math.max(a,Math.min(v,t))};c.exports=m},39506:(c,m,t)=>{/** + */var m=function(t,o,v){return Math.max(o,Math.min(v,t))};c.exports=m},39506:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=function(o){return o*a.DEG_TO_RAD};c.exports=v},61241:c=>{/** + */var o=t(36383),v=function(a){return a*o.DEG_TO_RAD};c.exports=v},61241:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return Math.abs(t-a)};c.exports=m},38857:(c,m,t)=>{/** + */var m=function(t,o){return Math.abs(t-o)};c.exports=m},38857:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(37867),r=t(29747),n=new o,e=new v({initialize:function i(h,s,l,f){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=i.DefaultOrder),this._x=h,this._y=s,this._z=l,this._order=f,this.onChangeCallback=r},x:{get:function(){return this._x},set:function(i){this._x=i,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(i){this._y=i,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(i){this._z=i,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(i){this._order=i,this.onChangeCallback(this)}},set:function(i,h,s,l){return l===void 0&&(l=this._order),this._x=i,this._y=h,this._z=s,this._order=l,this.onChangeCallback(this),this},copy:function(i){return this.set(i.x,i.y,i.z,i.order)},setFromQuaternion:function(i,h,s){return h===void 0&&(h=this._order),s===void 0&&(s=!1),n.fromQuat(i),this.setFromRotationMatrix(n,h,s)},setFromRotationMatrix:function(i,h,s){h===void 0&&(h=this._order),s===void 0&&(s=!1);var l=i.val,f=l[0],u=l[4],d=l[8],p=l[1],g=l[5],y=l[9],x=l[2],T=l[6],C=l[10],M=0,w=0,L=0,F=.99999;switch(h){case"XYZ":{w=Math.asin(a(d,-1,1)),Math.abs(d){/** + */var o=t(45319),v=t(83419),a=t(37867),r=t(29747),n=new a,e=new v({initialize:function i(h,s,l,f){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=i.DefaultOrder),this._x=h,this._y=s,this._z=l,this._order=f,this.onChangeCallback=r},x:{get:function(){return this._x},set:function(i){this._x=i,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(i){this._y=i,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(i){this._z=i,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(i){this._order=i,this.onChangeCallback(this)}},set:function(i,h,s,l){return l===void 0&&(l=this._order),this._x=i,this._y=h,this._z=s,this._order=l,this.onChangeCallback(this),this},copy:function(i){return this.set(i.x,i.y,i.z,i.order)},setFromQuaternion:function(i,h,s){return h===void 0&&(h=this._order),s===void 0&&(s=!1),n.fromQuat(i),this.setFromRotationMatrix(n,h,s)},setFromRotationMatrix:function(i,h,s){h===void 0&&(h=this._order),s===void 0&&(s=!1);var l=i.val,f=l[0],u=l[4],d=l[8],p=l[1],g=l[5],y=l[9],x=l[2],C=l[6],P=l[10],M=0,w=0,I=0,L=.99999;switch(h){case"XYZ":{w=Math.asin(o(d,-1,1)),Math.abs(d){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){if(t===0)return 1;for(var a=t;--t;)a*=t;return a};c.exports=m},99472:c=>{/** + */var m=function(t){if(t===0)return 1;for(var o=t;--t;)o*=t;return o};c.exports=m},99472:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return Math.random()*(a-t)+t};c.exports=m},77623:c=>{/** + */var m=function(t,o){return Math.random()*(o-t)+t};c.exports=m},77623:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){a===void 0&&(a=0),v===void 0&&(v=10);var o=Math.pow(v,-a);return Math.floor(t*o)/o};c.exports=m},62945:(c,m,t)=>{/** + */var m=function(t,o,v){o===void 0&&(o=0),v===void 0&&(v=10);var a=Math.pow(v,-o);return Math.floor(t*a)/a};c.exports=m},62945:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=function(o,r,n){return o=a(o,0,1),(n-r)*o+r};c.exports=v},38265:c=>{/** + */var o=t(45319),v=function(a,r,n){return a=o(a,0,1),(n-r)*a+r};c.exports=v},38265:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t/a/1e3};c.exports=m},78702:c=>{/** + */var m=function(t,o){return t/o/1e3};c.exports=m},78702:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3711,75 +3711,75 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return(a-t)*v+t};c.exports=m},94908:c=>{/** + */var m=function(t,o,v){return(o-t)*v+t};c.exports=m},94908:c=>{/** * @author Greg McLean * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return v===void 0&&(v=0),t.clone().lerp(a,v)};c.exports=m},94434:(c,m,t)=>{/** + */var m=function(t,o,v){return v===void 0&&(v=0),t.clone().lerp(o,v)};c.exports=m},94434:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r){this.val=new Float32Array(9),r?this.copy(r):this.identity()},clone:function(){return new v(this)},set:function(o){return this.copy(o)},copy:function(o){var r=this.val,n=o.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(o){var r=o.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(o){var r=this.val;return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r[4]=o[4],r[5]=o[5],r[6]=o[6],r[7]=o[7],r[8]=o[8],this},identity:function(){var o=this.val;return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=1,o[5]=0,o[6]=0,o[7]=0,o[8]=1,this},transpose:function(){var o=this.val,r=o[1],n=o[2],e=o[5];return o[1]=o[3],o[2]=o[6],o[3]=r,o[5]=o[7],o[6]=n,o[7]=e,this},invert:function(){var o=this.val,r=o[0],n=o[1],e=o[2],i=o[3],h=o[4],s=o[5],l=o[6],f=o[7],u=o[8],d=u*h-s*f,p=-u*i+s*l,g=f*i-h*l,y=r*d+n*p+e*g;return y?(y=1/y,o[0]=d*y,o[1]=(-u*n+e*f)*y,o[2]=(s*n-e*h)*y,o[3]=p*y,o[4]=(u*r-e*l)*y,o[5]=(-s*r+e*i)*y,o[6]=g*y,o[7]=(-f*r+n*l)*y,o[8]=(h*r-n*i)*y,this):null},adjoint:function(){var o=this.val,r=o[0],n=o[1],e=o[2],i=o[3],h=o[4],s=o[5],l=o[6],f=o[7],u=o[8];return o[0]=h*u-s*f,o[1]=e*f-n*u,o[2]=n*s-e*h,o[3]=s*l-i*u,o[4]=r*u-e*l,o[5]=e*i-r*s,o[6]=i*f-h*l,o[7]=n*l-r*f,o[8]=r*h-n*i,this},determinant:function(){var o=this.val,r=o[0],n=o[1],e=o[2],i=o[3],h=o[4],s=o[5],l=o[6],f=o[7],u=o[8];return r*(u*h-s*f)+n*(-u*i+s*l)+e*(f*i-h*l)},multiply:function(o){var r=this.val,n=r[0],e=r[1],i=r[2],h=r[3],s=r[4],l=r[5],f=r[6],u=r[7],d=r[8],p=o.val,g=p[0],y=p[1],x=p[2],T=p[3],C=p[4],M=p[5],w=p[6],L=p[7],F=p[8];return r[0]=g*n+y*h+x*f,r[1]=g*e+y*s+x*u,r[2]=g*i+y*l+x*d,r[3]=T*n+C*h+M*f,r[4]=T*e+C*s+M*u,r[5]=T*i+C*l+M*d,r[6]=w*n+L*h+F*f,r[7]=w*e+L*s+F*u,r[8]=w*i+L*l+F*d,this},translate:function(o){var r=this.val,n=o.x,e=o.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(o){var r=this.val,n=r[0],e=r[1],i=r[2],h=r[3],s=r[4],l=r[5],f=Math.sin(o),u=Math.cos(o);return r[0]=u*n+f*h,r[1]=u*e+f*s,r[2]=u*i+f*l,r[3]=u*h-f*n,r[4]=u*s-f*e,r[5]=u*l-f*i,this},scale:function(o){var r=this.val,n=o.x,e=o.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(o){var r=o.x,n=o.y,e=o.z,i=o.w,h=r+r,s=n+n,l=e+e,f=r*h,u=r*s,d=r*l,p=n*s,g=n*l,y=e*l,x=i*h,T=i*s,C=i*l,M=this.val;return M[0]=1-(p+y),M[3]=u+C,M[6]=d-T,M[1]=u-C,M[4]=1-(f+y),M[7]=g+x,M[2]=d+T,M[5]=g-x,M[8]=1-(f+p),this},normalFromMat4:function(o){var r=o.val,n=this.val,e=r[0],i=r[1],h=r[2],s=r[3],l=r[4],f=r[5],u=r[6],d=r[7],p=r[8],g=r[9],y=r[10],x=r[11],T=r[12],C=r[13],M=r[14],w=r[15],L=e*f-i*l,F=e*u-h*l,O=e*d-s*l,N=i*u-h*f,G=i*d-s*f,V=h*d-s*u,K=p*C-g*T,$=p*M-y*T,J=p*w-x*T,X=g*M-y*C,Y=g*w-x*C,D=y*w-x*M,z=L*D-F*Y+O*X+N*J-G*$+V*K;return z?(z=1/z,n[0]=(f*D-u*Y+d*X)*z,n[1]=(u*J-l*D-d*$)*z,n[2]=(l*Y-f*J+d*K)*z,n[3]=(h*Y-i*D-s*X)*z,n[4]=(e*D-h*J+s*$)*z,n[5]=(i*J-e*Y-s*K)*z,n[6]=(C*V-M*G+w*N)*z,n[7]=(M*O-T*V-w*F)*z,n[8]=(T*G-C*O+w*L)*z,this):null}});c.exports=v},37867:(c,m,t)=>{/** + */var o=t(83419),v=new o({initialize:function(r){this.val=new Float32Array(9),r?this.copy(r):this.identity()},clone:function(){return new v(this)},set:function(a){return this.copy(a)},copy:function(a){var r=this.val,n=a.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(a){var r=a.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(a){var r=this.val;return r[0]=a[0],r[1]=a[1],r[2]=a[2],r[3]=a[3],r[4]=a[4],r[5]=a[5],r[6]=a[6],r[7]=a[7],r[8]=a[8],this},identity:function(){var a=this.val;return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=1,a[5]=0,a[6]=0,a[7]=0,a[8]=1,this},transpose:function(){var a=this.val,r=a[1],n=a[2],e=a[5];return a[1]=a[3],a[2]=a[6],a[3]=r,a[5]=a[7],a[6]=n,a[7]=e,this},invert:function(){var a=this.val,r=a[0],n=a[1],e=a[2],i=a[3],h=a[4],s=a[5],l=a[6],f=a[7],u=a[8],d=u*h-s*f,p=-u*i+s*l,g=f*i-h*l,y=r*d+n*p+e*g;return y?(y=1/y,a[0]=d*y,a[1]=(-u*n+e*f)*y,a[2]=(s*n-e*h)*y,a[3]=p*y,a[4]=(u*r-e*l)*y,a[5]=(-s*r+e*i)*y,a[6]=g*y,a[7]=(-f*r+n*l)*y,a[8]=(h*r-n*i)*y,this):null},adjoint:function(){var a=this.val,r=a[0],n=a[1],e=a[2],i=a[3],h=a[4],s=a[5],l=a[6],f=a[7],u=a[8];return a[0]=h*u-s*f,a[1]=e*f-n*u,a[2]=n*s-e*h,a[3]=s*l-i*u,a[4]=r*u-e*l,a[5]=e*i-r*s,a[6]=i*f-h*l,a[7]=n*l-r*f,a[8]=r*h-n*i,this},determinant:function(){var a=this.val,r=a[0],n=a[1],e=a[2],i=a[3],h=a[4],s=a[5],l=a[6],f=a[7],u=a[8];return r*(u*h-s*f)+n*(-u*i+s*l)+e*(f*i-h*l)},multiply:function(a){var r=this.val,n=r[0],e=r[1],i=r[2],h=r[3],s=r[4],l=r[5],f=r[6],u=r[7],d=r[8],p=a.val,g=p[0],y=p[1],x=p[2],C=p[3],P=p[4],M=p[5],w=p[6],I=p[7],L=p[8];return r[0]=g*n+y*h+x*f,r[1]=g*e+y*s+x*u,r[2]=g*i+y*l+x*d,r[3]=C*n+P*h+M*f,r[4]=C*e+P*s+M*u,r[5]=C*i+P*l+M*d,r[6]=w*n+I*h+L*f,r[7]=w*e+I*s+L*u,r[8]=w*i+I*l+L*d,this},translate:function(a){var r=this.val,n=a.x,e=a.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(a){var r=this.val,n=r[0],e=r[1],i=r[2],h=r[3],s=r[4],l=r[5],f=Math.sin(a),u=Math.cos(a);return r[0]=u*n+f*h,r[1]=u*e+f*s,r[2]=u*i+f*l,r[3]=u*h-f*n,r[4]=u*s-f*e,r[5]=u*l-f*i,this},scale:function(a){var r=this.val,n=a.x,e=a.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(a){var r=a.x,n=a.y,e=a.z,i=a.w,h=r+r,s=n+n,l=e+e,f=r*h,u=r*s,d=r*l,p=n*s,g=n*l,y=e*l,x=i*h,C=i*s,P=i*l,M=this.val;return M[0]=1-(p+y),M[3]=u+P,M[6]=d-C,M[1]=u-P,M[4]=1-(f+y),M[7]=g+x,M[2]=d+C,M[5]=g-x,M[8]=1-(f+p),this},normalFromMat4:function(a){var r=a.val,n=this.val,e=r[0],i=r[1],h=r[2],s=r[3],l=r[4],f=r[5],u=r[6],d=r[7],p=r[8],g=r[9],y=r[10],x=r[11],C=r[12],P=r[13],M=r[14],w=r[15],I=e*f-i*l,L=e*u-h*l,B=e*d-s*l,N=i*u-h*f,G=i*d-s*f,V=h*d-s*u,K=p*P-g*C,j=p*M-y*C,J=p*w-x*C,X=g*M-y*P,Y=g*w-x*P,b=y*w-x*M,z=I*b-L*Y+B*X+N*J-G*j+V*K;return z?(z=1/z,n[0]=(f*b-u*Y+d*X)*z,n[1]=(u*J-l*b-d*j)*z,n[2]=(l*Y-f*J+d*K)*z,n[3]=(h*Y-i*b-s*X)*z,n[4]=(e*b-h*J+s*j)*z,n[5]=(i*J-e*Y-s*K)*z,n[6]=(P*V-M*G+w*N)*z,n[7]=(M*B-C*V-w*L)*z,n[8]=(C*G-P*B+w*I)*z,this):null}});c.exports=v},37867:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(25836),o=1e-6,r=new a({initialize:function(f){this.val=new Float32Array(16),f?this.copy(f):this.identity()},clone:function(){return new r(this)},set:function(l){return this.copy(l)},setValues:function(l,f,u,d,p,g,y,x,T,C,M,w,L,F,O,N){var G=this.val;return G[0]=l,G[1]=f,G[2]=u,G[3]=d,G[4]=p,G[5]=g,G[6]=y,G[7]=x,G[8]=T,G[9]=C,G[10]=M,G[11]=w,G[12]=L,G[13]=F,G[14]=O,G[15]=N,this},copy:function(l){var f=l.val;return this.setValues(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15])},fromArray:function(l){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])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(l,f,u){var d=n.fromQuat(u),p=d.val,g=f.x,y=f.y,x=f.z;return this.setValues(p[0]*g,p[1]*g,p[2]*g,0,p[4]*y,p[5]*y,p[6]*y,0,p[8]*x,p[9]*x,p[10]*x,0,l.x,l.y,l.z,1)},xyz:function(l,f,u){this.identity();var d=this.val;return d[12]=l,d[13]=f,d[14]=u,this},scaling:function(l,f,u){this.zero();var d=this.val;return d[0]=l,d[5]=f,d[10]=u,d[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var l=this.val,f=l[1],u=l[2],d=l[3],p=l[6],g=l[7],y=l[11];return l[1]=l[4],l[2]=l[8],l[3]=l[12],l[4]=f,l[6]=l[9],l[7]=l[13],l[8]=u,l[9]=p,l[11]=l[14],l[12]=d,l[13]=g,l[14]=y,this},getInverse:function(l){return this.copy(l),this.invert()},invert:function(){var l=this.val,f=l[0],u=l[1],d=l[2],p=l[3],g=l[4],y=l[5],x=l[6],T=l[7],C=l[8],M=l[9],w=l[10],L=l[11],F=l[12],O=l[13],N=l[14],G=l[15],V=f*y-u*g,K=f*x-d*g,$=f*T-p*g,J=u*x-d*y,X=u*T-p*y,Y=d*T-p*x,D=C*O-M*F,z=C*N-w*F,W=C*G-L*F,H=M*N-w*O,Z=M*G-L*O,Q=w*G-L*N,k=V*Q-K*Z+$*H+J*W-X*z+Y*D;return k?(k=1/k,this.setValues((y*Q-x*Z+T*H)*k,(d*Z-u*Q-p*H)*k,(O*Y-N*X+G*J)*k,(w*X-M*Y-L*J)*k,(x*W-g*Q-T*z)*k,(f*Q-d*W+p*z)*k,(N*$-F*Y-G*K)*k,(C*Y-w*$+L*K)*k,(g*Z-y*W+T*D)*k,(u*W-f*Z-p*D)*k,(F*X-O*$+G*V)*k,(M*$-C*X-L*V)*k,(y*z-g*H-x*D)*k,(f*H-u*z+d*D)*k,(O*K-F*J-N*V)*k,(C*J-M*K+w*V)*k)):this},adjoint:function(){var l=this.val,f=l[0],u=l[1],d=l[2],p=l[3],g=l[4],y=l[5],x=l[6],T=l[7],C=l[8],M=l[9],w=l[10],L=l[11],F=l[12],O=l[13],N=l[14],G=l[15];return this.setValues(y*(w*G-L*N)-M*(x*G-T*N)+O*(x*L-T*w),-(u*(w*G-L*N)-M*(d*G-p*N)+O*(d*L-p*w)),u*(x*G-T*N)-y*(d*G-p*N)+O*(d*T-p*x),-(u*(x*L-T*w)-y*(d*L-p*w)+M*(d*T-p*x)),-(g*(w*G-L*N)-C*(x*G-T*N)+F*(x*L-T*w)),f*(w*G-L*N)-C*(d*G-p*N)+F*(d*L-p*w),-(f*(x*G-T*N)-g*(d*G-p*N)+F*(d*T-p*x)),f*(x*L-T*w)-g*(d*L-p*w)+C*(d*T-p*x),g*(M*G-L*O)-C*(y*G-T*O)+F*(y*L-T*M),-(f*(M*G-L*O)-C*(u*G-p*O)+F*(u*L-p*M)),f*(y*G-T*O)-g*(u*G-p*O)+F*(u*T-p*y),-(f*(y*L-T*M)-g*(u*L-p*M)+C*(u*T-p*y)),-(g*(M*N-w*O)-C*(y*N-x*O)+F*(y*w-x*M)),f*(M*N-w*O)-C*(u*N-d*O)+F*(u*w-d*M),-(f*(y*N-x*O)-g*(u*N-d*O)+F*(u*x-d*y)),f*(y*w-x*M)-g*(u*w-d*M)+C*(u*x-d*y))},determinant:function(){var l=this.val,f=l[0],u=l[1],d=l[2],p=l[3],g=l[4],y=l[5],x=l[6],T=l[7],C=l[8],M=l[9],w=l[10],L=l[11],F=l[12],O=l[13],N=l[14],G=l[15],V=f*y-u*g,K=f*x-d*g,$=f*T-p*g,J=u*x-d*y,X=u*T-p*y,Y=d*T-p*x,D=C*O-M*F,z=C*N-w*F,W=C*G-L*F,H=M*N-w*O,Z=M*G-L*O,Q=w*G-L*N;return V*Q-K*Z+$*H+J*W-X*z+Y*D},multiply:function(l){var f=this.val,u=f[0],d=f[1],p=f[2],g=f[3],y=f[4],x=f[5],T=f[6],C=f[7],M=f[8],w=f[9],L=f[10],F=f[11],O=f[12],N=f[13],G=f[14],V=f[15],K=l.val,$=K[0],J=K[1],X=K[2],Y=K[3];return f[0]=$*u+J*y+X*M+Y*O,f[1]=$*d+J*x+X*w+Y*N,f[2]=$*p+J*T+X*L+Y*G,f[3]=$*g+J*C+X*F+Y*V,$=K[4],J=K[5],X=K[6],Y=K[7],f[4]=$*u+J*y+X*M+Y*O,f[5]=$*d+J*x+X*w+Y*N,f[6]=$*p+J*T+X*L+Y*G,f[7]=$*g+J*C+X*F+Y*V,$=K[8],J=K[9],X=K[10],Y=K[11],f[8]=$*u+J*y+X*M+Y*O,f[9]=$*d+J*x+X*w+Y*N,f[10]=$*p+J*T+X*L+Y*G,f[11]=$*g+J*C+X*F+Y*V,$=K[12],J=K[13],X=K[14],Y=K[15],f[12]=$*u+J*y+X*M+Y*O,f[13]=$*d+J*x+X*w+Y*N,f[14]=$*p+J*T+X*L+Y*G,f[15]=$*g+J*C+X*F+Y*V,this},multiplyLocal:function(l){var f=this.val,u=l.val;return this.setValues(f[0]*u[0]+f[1]*u[4]+f[2]*u[8]+f[3]*u[12],f[0]*u[1]+f[1]*u[5]+f[2]*u[9]+f[3]*u[13],f[0]*u[2]+f[1]*u[6]+f[2]*u[10]+f[3]*u[14],f[0]*u[3]+f[1]*u[7]+f[2]*u[11]+f[3]*u[15],f[4]*u[0]+f[5]*u[4]+f[6]*u[8]+f[7]*u[12],f[4]*u[1]+f[5]*u[5]+f[6]*u[9]+f[7]*u[13],f[4]*u[2]+f[5]*u[6]+f[6]*u[10]+f[7]*u[14],f[4]*u[3]+f[5]*u[7]+f[6]*u[11]+f[7]*u[15],f[8]*u[0]+f[9]*u[4]+f[10]*u[8]+f[11]*u[12],f[8]*u[1]+f[9]*u[5]+f[10]*u[9]+f[11]*u[13],f[8]*u[2]+f[9]*u[6]+f[10]*u[10]+f[11]*u[14],f[8]*u[3]+f[9]*u[7]+f[10]*u[11]+f[11]*u[15],f[12]*u[0]+f[13]*u[4]+f[14]*u[8]+f[15]*u[12],f[12]*u[1]+f[13]*u[5]+f[14]*u[9]+f[15]*u[13],f[12]*u[2]+f[13]*u[6]+f[14]*u[10]+f[15]*u[14],f[12]*u[3]+f[13]*u[7]+f[14]*u[11]+f[15]*u[15])},premultiply:function(l){return this.multiplyMatrices(l,this)},multiplyMatrices:function(l,f){var u=l.val,d=f.val,p=u[0],g=u[4],y=u[8],x=u[12],T=u[1],C=u[5],M=u[9],w=u[13],L=u[2],F=u[6],O=u[10],N=u[14],G=u[3],V=u[7],K=u[11],$=u[15],J=d[0],X=d[4],Y=d[8],D=d[12],z=d[1],W=d[5],H=d[9],Z=d[13],Q=d[2],k=d[6],et=d[10],st=d[14],rt=d[3],ot=d[7],ft=d[11],at=d[15];return this.setValues(p*J+g*z+y*Q+x*rt,T*J+C*z+M*Q+w*rt,L*J+F*z+O*Q+N*rt,G*J+V*z+K*Q+$*rt,p*X+g*W+y*k+x*ot,T*X+C*W+M*k+w*ot,L*X+F*W+O*k+N*ot,G*X+V*W+K*k+$*ot,p*Y+g*H+y*et+x*ft,T*Y+C*H+M*et+w*ft,L*Y+F*H+O*et+N*ft,G*Y+V*H+K*et+$*ft,p*D+g*Z+y*st+x*at,T*D+C*Z+M*st+w*at,L*D+F*Z+O*st+N*at,G*D+V*Z+K*st+$*at)},translate:function(l){return this.translateXYZ(l.x,l.y,l.z)},translateXYZ:function(l,f,u){var d=this.val;return d[12]=d[0]*l+d[4]*f+d[8]*u+d[12],d[13]=d[1]*l+d[5]*f+d[9]*u+d[13],d[14]=d[2]*l+d[6]*f+d[10]*u+d[14],d[15]=d[3]*l+d[7]*f+d[11]*u+d[15],this},scale:function(l){return this.scaleXYZ(l.x,l.y,l.z)},scaleXYZ:function(l,f,u){var d=this.val;return d[0]=d[0]*l,d[1]=d[1]*l,d[2]=d[2]*l,d[3]=d[3]*l,d[4]=d[4]*f,d[5]=d[5]*f,d[6]=d[6]*f,d[7]=d[7]*f,d[8]=d[8]*u,d[9]=d[9]*u,d[10]=d[10]*u,d[11]=d[11]*u,this},makeRotationAxis:function(l,f){var u=Math.cos(f),d=Math.sin(f),p=1-u,g=l.x,y=l.y,x=l.z,T=p*g,C=p*y;return this.setValues(T*g+u,T*y-d*x,T*x+d*y,0,T*y+d*x,C*y+u,C*x-d*g,0,T*x-d*y,C*x+d*g,p*x*x+u,0,0,0,0,1)},rotate:function(l,f){var u=this.val,d=f.x,p=f.y,g=f.z,y=Math.sqrt(d*d+p*p+g*g);if(Math.abs(y){/** + */var o=t(83419),v=t(25836),a=1e-6,r=new o({initialize:function(f){this.val=new Float32Array(16),f?this.copy(f):this.identity()},clone:function(){return new r(this)},set:function(l){return this.copy(l)},setValues:function(l,f,u,d,p,g,y,x,C,P,M,w,I,L,B,N){var G=this.val;return G[0]=l,G[1]=f,G[2]=u,G[3]=d,G[4]=p,G[5]=g,G[6]=y,G[7]=x,G[8]=C,G[9]=P,G[10]=M,G[11]=w,G[12]=I,G[13]=L,G[14]=B,G[15]=N,this},copy:function(l){var f=l.val;return this.setValues(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15])},fromArray:function(l){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])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(l,f,u){var d=n.fromQuat(u),p=d.val,g=f.x,y=f.y,x=f.z;return this.setValues(p[0]*g,p[1]*g,p[2]*g,0,p[4]*y,p[5]*y,p[6]*y,0,p[8]*x,p[9]*x,p[10]*x,0,l.x,l.y,l.z,1)},xyz:function(l,f,u){this.identity();var d=this.val;return d[12]=l,d[13]=f,d[14]=u,this},scaling:function(l,f,u){this.zero();var d=this.val;return d[0]=l,d[5]=f,d[10]=u,d[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var l=this.val,f=l[1],u=l[2],d=l[3],p=l[6],g=l[7],y=l[11];return l[1]=l[4],l[2]=l[8],l[3]=l[12],l[4]=f,l[6]=l[9],l[7]=l[13],l[8]=u,l[9]=p,l[11]=l[14],l[12]=d,l[13]=g,l[14]=y,this},getInverse:function(l){return this.copy(l),this.invert()},invert:function(){var l=this.val,f=l[0],u=l[1],d=l[2],p=l[3],g=l[4],y=l[5],x=l[6],C=l[7],P=l[8],M=l[9],w=l[10],I=l[11],L=l[12],B=l[13],N=l[14],G=l[15],V=f*y-u*g,K=f*x-d*g,j=f*C-p*g,J=u*x-d*y,X=u*C-p*y,Y=d*C-p*x,b=P*B-M*L,z=P*N-w*L,W=P*G-I*L,H=M*N-w*B,Z=M*G-I*B,Q=w*G-I*N,k=V*Q-K*Z+j*H+J*W-X*z+Y*b;return k?(k=1/k,this.setValues((y*Q-x*Z+C*H)*k,(d*Z-u*Q-p*H)*k,(B*Y-N*X+G*J)*k,(w*X-M*Y-I*J)*k,(x*W-g*Q-C*z)*k,(f*Q-d*W+p*z)*k,(N*j-L*Y-G*K)*k,(P*Y-w*j+I*K)*k,(g*Z-y*W+C*b)*k,(u*W-f*Z-p*b)*k,(L*X-B*j+G*V)*k,(M*j-P*X-I*V)*k,(y*z-g*H-x*b)*k,(f*H-u*z+d*b)*k,(B*K-L*J-N*V)*k,(P*J-M*K+w*V)*k)):this},adjoint:function(){var l=this.val,f=l[0],u=l[1],d=l[2],p=l[3],g=l[4],y=l[5],x=l[6],C=l[7],P=l[8],M=l[9],w=l[10],I=l[11],L=l[12],B=l[13],N=l[14],G=l[15];return this.setValues(y*(w*G-I*N)-M*(x*G-C*N)+B*(x*I-C*w),-(u*(w*G-I*N)-M*(d*G-p*N)+B*(d*I-p*w)),u*(x*G-C*N)-y*(d*G-p*N)+B*(d*C-p*x),-(u*(x*I-C*w)-y*(d*I-p*w)+M*(d*C-p*x)),-(g*(w*G-I*N)-P*(x*G-C*N)+L*(x*I-C*w)),f*(w*G-I*N)-P*(d*G-p*N)+L*(d*I-p*w),-(f*(x*G-C*N)-g*(d*G-p*N)+L*(d*C-p*x)),f*(x*I-C*w)-g*(d*I-p*w)+P*(d*C-p*x),g*(M*G-I*B)-P*(y*G-C*B)+L*(y*I-C*M),-(f*(M*G-I*B)-P*(u*G-p*B)+L*(u*I-p*M)),f*(y*G-C*B)-g*(u*G-p*B)+L*(u*C-p*y),-(f*(y*I-C*M)-g*(u*I-p*M)+P*(u*C-p*y)),-(g*(M*N-w*B)-P*(y*N-x*B)+L*(y*w-x*M)),f*(M*N-w*B)-P*(u*N-d*B)+L*(u*w-d*M),-(f*(y*N-x*B)-g*(u*N-d*B)+L*(u*x-d*y)),f*(y*w-x*M)-g*(u*w-d*M)+P*(u*x-d*y))},determinant:function(){var l=this.val,f=l[0],u=l[1],d=l[2],p=l[3],g=l[4],y=l[5],x=l[6],C=l[7],P=l[8],M=l[9],w=l[10],I=l[11],L=l[12],B=l[13],N=l[14],G=l[15],V=f*y-u*g,K=f*x-d*g,j=f*C-p*g,J=u*x-d*y,X=u*C-p*y,Y=d*C-p*x,b=P*B-M*L,z=P*N-w*L,W=P*G-I*L,H=M*N-w*B,Z=M*G-I*B,Q=w*G-I*N;return V*Q-K*Z+j*H+J*W-X*z+Y*b},multiply:function(l){var f=this.val,u=f[0],d=f[1],p=f[2],g=f[3],y=f[4],x=f[5],C=f[6],P=f[7],M=f[8],w=f[9],I=f[10],L=f[11],B=f[12],N=f[13],G=f[14],V=f[15],K=l.val,j=K[0],J=K[1],X=K[2],Y=K[3];return f[0]=j*u+J*y+X*M+Y*B,f[1]=j*d+J*x+X*w+Y*N,f[2]=j*p+J*C+X*I+Y*G,f[3]=j*g+J*P+X*L+Y*V,j=K[4],J=K[5],X=K[6],Y=K[7],f[4]=j*u+J*y+X*M+Y*B,f[5]=j*d+J*x+X*w+Y*N,f[6]=j*p+J*C+X*I+Y*G,f[7]=j*g+J*P+X*L+Y*V,j=K[8],J=K[9],X=K[10],Y=K[11],f[8]=j*u+J*y+X*M+Y*B,f[9]=j*d+J*x+X*w+Y*N,f[10]=j*p+J*C+X*I+Y*G,f[11]=j*g+J*P+X*L+Y*V,j=K[12],J=K[13],X=K[14],Y=K[15],f[12]=j*u+J*y+X*M+Y*B,f[13]=j*d+J*x+X*w+Y*N,f[14]=j*p+J*C+X*I+Y*G,f[15]=j*g+J*P+X*L+Y*V,this},multiplyLocal:function(l){var f=this.val,u=l.val;return this.setValues(f[0]*u[0]+f[1]*u[4]+f[2]*u[8]+f[3]*u[12],f[0]*u[1]+f[1]*u[5]+f[2]*u[9]+f[3]*u[13],f[0]*u[2]+f[1]*u[6]+f[2]*u[10]+f[3]*u[14],f[0]*u[3]+f[1]*u[7]+f[2]*u[11]+f[3]*u[15],f[4]*u[0]+f[5]*u[4]+f[6]*u[8]+f[7]*u[12],f[4]*u[1]+f[5]*u[5]+f[6]*u[9]+f[7]*u[13],f[4]*u[2]+f[5]*u[6]+f[6]*u[10]+f[7]*u[14],f[4]*u[3]+f[5]*u[7]+f[6]*u[11]+f[7]*u[15],f[8]*u[0]+f[9]*u[4]+f[10]*u[8]+f[11]*u[12],f[8]*u[1]+f[9]*u[5]+f[10]*u[9]+f[11]*u[13],f[8]*u[2]+f[9]*u[6]+f[10]*u[10]+f[11]*u[14],f[8]*u[3]+f[9]*u[7]+f[10]*u[11]+f[11]*u[15],f[12]*u[0]+f[13]*u[4]+f[14]*u[8]+f[15]*u[12],f[12]*u[1]+f[13]*u[5]+f[14]*u[9]+f[15]*u[13],f[12]*u[2]+f[13]*u[6]+f[14]*u[10]+f[15]*u[14],f[12]*u[3]+f[13]*u[7]+f[14]*u[11]+f[15]*u[15])},premultiply:function(l){return this.multiplyMatrices(l,this)},multiplyMatrices:function(l,f){var u=l.val,d=f.val,p=u[0],g=u[4],y=u[8],x=u[12],C=u[1],P=u[5],M=u[9],w=u[13],I=u[2],L=u[6],B=u[10],N=u[14],G=u[3],V=u[7],K=u[11],j=u[15],J=d[0],X=d[4],Y=d[8],b=d[12],z=d[1],W=d[5],H=d[9],Z=d[13],Q=d[2],k=d[6],et=d[10],st=d[14],rt=d[3],ot=d[7],ft=d[11],at=d[15];return this.setValues(p*J+g*z+y*Q+x*rt,C*J+P*z+M*Q+w*rt,I*J+L*z+B*Q+N*rt,G*J+V*z+K*Q+j*rt,p*X+g*W+y*k+x*ot,C*X+P*W+M*k+w*ot,I*X+L*W+B*k+N*ot,G*X+V*W+K*k+j*ot,p*Y+g*H+y*et+x*ft,C*Y+P*H+M*et+w*ft,I*Y+L*H+B*et+N*ft,G*Y+V*H+K*et+j*ft,p*b+g*Z+y*st+x*at,C*b+P*Z+M*st+w*at,I*b+L*Z+B*st+N*at,G*b+V*Z+K*st+j*at)},translate:function(l){return this.translateXYZ(l.x,l.y,l.z)},translateXYZ:function(l,f,u){var d=this.val;return d[12]=d[0]*l+d[4]*f+d[8]*u+d[12],d[13]=d[1]*l+d[5]*f+d[9]*u+d[13],d[14]=d[2]*l+d[6]*f+d[10]*u+d[14],d[15]=d[3]*l+d[7]*f+d[11]*u+d[15],this},scale:function(l){return this.scaleXYZ(l.x,l.y,l.z)},scaleXYZ:function(l,f,u){var d=this.val;return d[0]=d[0]*l,d[1]=d[1]*l,d[2]=d[2]*l,d[3]=d[3]*l,d[4]=d[4]*f,d[5]=d[5]*f,d[6]=d[6]*f,d[7]=d[7]*f,d[8]=d[8]*u,d[9]=d[9]*u,d[10]=d[10]*u,d[11]=d[11]*u,this},makeRotationAxis:function(l,f){var u=Math.cos(f),d=Math.sin(f),p=1-u,g=l.x,y=l.y,x=l.z,C=p*g,P=p*y;return this.setValues(C*g+u,C*y-d*x,C*x+d*y,0,C*y+d*x,P*y+u,P*x-d*g,0,C*x-d*y,P*x+d*g,p*x*x+u,0,0,0,0,1)},rotate:function(l,f){var u=this.val,d=f.x,p=f.y,g=f.z,y=Math.sqrt(d*d+p*p+g*g);if(Math.abs(y){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return Math.min(t+a,v)};c.exports=m},50040:c=>{/** + */var m=function(t,o,v){return Math.min(t+o,v)};c.exports=m},50040:c=>{/** * @author Vladislav Forsh * @copyright 2021 RoboWhale * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=t.length;if(a===0)return 0;t.sort(function(o,r){return o-r});var v=Math.floor(a/2);return a%2===0?(t[v]+t[v-1])/2:t[v]};c.exports=m},37204:c=>{/** + */var m=function(t){var o=t.length;if(o===0)return 0;t.sort(function(a,r){return a-r});var v=Math.floor(o/2);return o%2===0?(t[v]+t[v-1])/2:t[v]};c.exports=m},37204:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return Math.max(t-a,v)};c.exports=m},65201:c=>{/** + */var m=function(t,o,v){return Math.max(t-o,v)};c.exports=m},65201:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v===void 0&&(v=a+1);var r=(t-a)/(v-a);return r>1?o!==void 0?(r=(o-t)/(o-v),r<0&&(r=0)):r=1:r<0&&(r=0),r};c.exports=m},15746:(c,m,t)=>{/** + */var m=function(t,o,v,a){v===void 0&&(v=o+1);var r=(t-o)/(v-o);return r>1?a!==void 0?(r=(a-t)/(a-v),r<0&&(r=0)):r=1:r<0&&(r=0),r};c.exports=m},15746:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(94434),o=t(29747),r=t(25836),n=1e-6,e=new Int8Array([1,2,0]),i=new Float32Array([0,0,0]),h=new r(1,0,0),s=new r(0,1,0),l=new r,f=new v,u=new a({initialize:function(p,g,y,x){this.onChangeCallback=o,this.set(p,g,y,x)},x:{get:function(){return this._x},set:function(d){this._x=d,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(d){this._y=d,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(d){this._z=d,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(d){this._w=d,this.onChangeCallback(this)}},copy:function(d){return this.set(d)},set:function(d,p,g,y,x){return x===void 0&&(x=!0),typeof d=="object"?(this._x=d.x||0,this._y=d.y||0,this._z=d.z||0,this._w=d.w||0):(this._x=d||0,this._y=p||0,this._z=g||0,this._w=y||0),x&&this.onChangeCallback(this),this},add:function(d){return this._x+=d.x,this._y+=d.y,this._z+=d.z,this._w+=d.w,this.onChangeCallback(this),this},subtract:function(d){return this._x-=d.x,this._y-=d.y,this._z-=d.z,this._w-=d.w,this.onChangeCallback(this),this},scale:function(d){return this._x*=d,this._y*=d,this._z*=d,this._w*=d,this.onChangeCallback(this),this},length:function(){var d=this.x,p=this.y,g=this.z,y=this.w;return Math.sqrt(d*d+p*p+g*g+y*y)},lengthSq:function(){var d=this.x,p=this.y,g=this.z,y=this.w;return d*d+p*p+g*g+y*y},normalize:function(){var d=this.x,p=this.y,g=this.z,y=this.w,x=d*d+p*p+g*g+y*y;return x>0&&(x=1/Math.sqrt(x),this._x=d*x,this._y=p*x,this._z=g*x,this._w=y*x),this.onChangeCallback(this),this},dot:function(d){return this.x*d.x+this.y*d.y+this.z*d.z+this.w*d.w},lerp:function(d,p){p===void 0&&(p=0);var g=this.x,y=this.y,x=this.z,T=this.w;return this.set(g+p*(d.x-g),y+p*(d.y-y),x+p*(d.z-x),T+p*(d.w-T))},rotationTo:function(d,p){var g=d.x*p.x+d.y*p.y+d.z*p.z;return g<-.999999?(l.copy(h).cross(d).length().999999?this.set(0,0,0,1):(l.copy(d).cross(p),this._x=l.x,this._y=l.y,this._z=l.z,this._w=1+g,this.normalize())},setAxes:function(d,p,g){var y=f.val;return y[0]=p.x,y[3]=p.y,y[6]=p.z,y[1]=g.x,y[4]=g.y,y[7]=g.z,y[2]=-d.x,y[5]=-d.y,y[8]=-d.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(d,p){p=p*.5;var g=Math.sin(p);return this.set(g*d.x,g*d.y,g*d.z,Math.cos(p))},multiply:function(d){var p=this.x,g=this.y,y=this.z,x=this.w,T=d.x,C=d.y,M=d.z,w=d.w;return this.set(p*w+x*T+g*M-y*C,g*w+x*C+y*T-p*M,y*w+x*M+p*C-g*T,x*w-p*T-g*C-y*M)},slerp:function(d,p){var g=this.x,y=this.y,x=this.z,T=this.w,C=d.x,M=d.y,w=d.z,L=d.w,F=g*C+y*M+x*w+T*L;F<0&&(F=-F,C=-C,M=-M,w=-w,L=-L);var O=1-p,N=p;if(1-F>n){var G=Math.acos(F),V=Math.sin(G);O=Math.sin((1-p)*G)/V,N=Math.sin(p*G)/V}return this.set(O*g+N*C,O*y+N*M,O*x+N*w,O*T+N*L)},invert:function(){var d=this.x,p=this.y,g=this.z,y=this.w,x=d*d+p*p+g*g+y*y,T=x?1/x:0;return this.set(-d*T,-p*T,-g*T,y*T)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(d){d*=.5;var p=this.x,g=this.y,y=this.z,x=this.w,T=Math.sin(d),C=Math.cos(d);return this.set(p*C+x*T,g*C+y*T,y*C-g*T,x*C-p*T)},rotateY:function(d){d*=.5;var p=this.x,g=this.y,y=this.z,x=this.w,T=Math.sin(d),C=Math.cos(d);return this.set(p*C-y*T,g*C+x*T,y*C+p*T,x*C-g*T)},rotateZ:function(d){d*=.5;var p=this.x,g=this.y,y=this.z,x=this.w,T=Math.sin(d),C=Math.cos(d);return this.set(p*C+g*T,g*C-p*T,y*C+x*T,x*C-y*T)},calculateW:function(){var d=this.x,p=this.y,g=this.z;return this.w=-Math.sqrt(1-d*d-p*p-g*g),this},setFromEuler:function(d,p){var g=d.x/2,y=d.y/2,x=d.z/2,T=Math.cos(g),C=Math.cos(y),M=Math.cos(x),w=Math.sin(g),L=Math.sin(y),F=Math.sin(x);switch(d.order){case"XYZ":{this.set(w*C*M+T*L*F,T*L*M-w*C*F,T*C*F+w*L*M,T*C*M-w*L*F,p);break}case"YXZ":{this.set(w*C*M+T*L*F,T*L*M-w*C*F,T*C*F-w*L*M,T*C*M+w*L*F,p);break}case"ZXY":{this.set(w*C*M-T*L*F,T*L*M+w*C*F,T*C*F+w*L*M,T*C*M-w*L*F,p);break}case"ZYX":{this.set(w*C*M-T*L*F,T*L*M+w*C*F,T*C*F-w*L*M,T*C*M+w*L*F,p);break}case"YZX":{this.set(w*C*M+T*L*F,T*L*M+w*C*F,T*C*F-w*L*M,T*C*M-w*L*F,p);break}case"XZY":{this.set(w*C*M-T*L*F,T*L*M-w*C*F,T*C*F+w*L*M,T*C*M+w*L*F,p);break}}return this},setFromRotationMatrix:function(d){var p=d.val,g=p[0],y=p[4],x=p[8],T=p[1],C=p[5],M=p[9],w=p[2],L=p[6],F=p[10],O=g+C+F,N;return O>0?(N=.5/Math.sqrt(O+1),this.set((L-M)*N,(x-w)*N,(T-y)*N,.25/N)):g>C&&g>F?(N=2*Math.sqrt(1+g-C-F),this.set(.25*N,(y+T)/N,(x+w)/N,(L-M)/N)):C>F?(N=2*Math.sqrt(1+C-g-F),this.set((y+T)/N,.25*N,(M+L)/N,(x-w)/N)):(N=2*Math.sqrt(1+F-g-C),this.set((x+w)/N,(M+L)/N,.25*N,(T-y)/N)),this},fromMat3:function(d){var p=d.val,g=p[0]+p[4]+p[8],y;if(g>0)y=Math.sqrt(g+1),this.w=.5*y,y=.5/y,this._x=(p[7]-p[5])*y,this._y=(p[2]-p[6])*y,this._z=(p[3]-p[1])*y;else{var x=0;p[4]>p[0]&&(x=1),p[8]>p[x*3+x]&&(x=2);var T=e[x],C=e[T];y=Math.sqrt(p[x*3+x]-p[T*3+T]-p[C*3+C]+1),i[x]=.5*y,y=.5/y,i[T]=(p[T*3+x]+p[x*3+T])*y,i[C]=(p[C*3+x]+p[x*3+C])*y,this._x=i[0],this._y=i[1],this._z=i[2],this._w=(p[C*3+T]-p[T*3+C])*y}return this.onChangeCallback(this),this}});c.exports=u},43396:(c,m,t)=>{/** + */var o=t(83419),v=t(94434),a=t(29747),r=t(25836),n=1e-6,e=new Int8Array([1,2,0]),i=new Float32Array([0,0,0]),h=new r(1,0,0),s=new r(0,1,0),l=new r,f=new v,u=new o({initialize:function(p,g,y,x){this.onChangeCallback=a,this.set(p,g,y,x)},x:{get:function(){return this._x},set:function(d){this._x=d,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(d){this._y=d,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(d){this._z=d,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(d){this._w=d,this.onChangeCallback(this)}},copy:function(d){return this.set(d)},set:function(d,p,g,y,x){return x===void 0&&(x=!0),typeof d=="object"?(this._x=d.x||0,this._y=d.y||0,this._z=d.z||0,this._w=d.w||0):(this._x=d||0,this._y=p||0,this._z=g||0,this._w=y||0),x&&this.onChangeCallback(this),this},add:function(d){return this._x+=d.x,this._y+=d.y,this._z+=d.z,this._w+=d.w,this.onChangeCallback(this),this},subtract:function(d){return this._x-=d.x,this._y-=d.y,this._z-=d.z,this._w-=d.w,this.onChangeCallback(this),this},scale:function(d){return this._x*=d,this._y*=d,this._z*=d,this._w*=d,this.onChangeCallback(this),this},length:function(){var d=this.x,p=this.y,g=this.z,y=this.w;return Math.sqrt(d*d+p*p+g*g+y*y)},lengthSq:function(){var d=this.x,p=this.y,g=this.z,y=this.w;return d*d+p*p+g*g+y*y},normalize:function(){var d=this.x,p=this.y,g=this.z,y=this.w,x=d*d+p*p+g*g+y*y;return x>0&&(x=1/Math.sqrt(x),this._x=d*x,this._y=p*x,this._z=g*x,this._w=y*x),this.onChangeCallback(this),this},dot:function(d){return this.x*d.x+this.y*d.y+this.z*d.z+this.w*d.w},lerp:function(d,p){p===void 0&&(p=0);var g=this.x,y=this.y,x=this.z,C=this.w;return this.set(g+p*(d.x-g),y+p*(d.y-y),x+p*(d.z-x),C+p*(d.w-C))},rotationTo:function(d,p){var g=d.x*p.x+d.y*p.y+d.z*p.z;return g<-.999999?(l.copy(h).cross(d).length().999999?this.set(0,0,0,1):(l.copy(d).cross(p),this._x=l.x,this._y=l.y,this._z=l.z,this._w=1+g,this.normalize())},setAxes:function(d,p,g){var y=f.val;return y[0]=p.x,y[3]=p.y,y[6]=p.z,y[1]=g.x,y[4]=g.y,y[7]=g.z,y[2]=-d.x,y[5]=-d.y,y[8]=-d.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(d,p){p=p*.5;var g=Math.sin(p);return this.set(g*d.x,g*d.y,g*d.z,Math.cos(p))},multiply:function(d){var p=this.x,g=this.y,y=this.z,x=this.w,C=d.x,P=d.y,M=d.z,w=d.w;return this.set(p*w+x*C+g*M-y*P,g*w+x*P+y*C-p*M,y*w+x*M+p*P-g*C,x*w-p*C-g*P-y*M)},slerp:function(d,p){var g=this.x,y=this.y,x=this.z,C=this.w,P=d.x,M=d.y,w=d.z,I=d.w,L=g*P+y*M+x*w+C*I;L<0&&(L=-L,P=-P,M=-M,w=-w,I=-I);var B=1-p,N=p;if(1-L>n){var G=Math.acos(L),V=Math.sin(G);B=Math.sin((1-p)*G)/V,N=Math.sin(p*G)/V}return this.set(B*g+N*P,B*y+N*M,B*x+N*w,B*C+N*I)},invert:function(){var d=this.x,p=this.y,g=this.z,y=this.w,x=d*d+p*p+g*g+y*y,C=x?1/x:0;return this.set(-d*C,-p*C,-g*C,y*C)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(d){d*=.5;var p=this.x,g=this.y,y=this.z,x=this.w,C=Math.sin(d),P=Math.cos(d);return this.set(p*P+x*C,g*P+y*C,y*P-g*C,x*P-p*C)},rotateY:function(d){d*=.5;var p=this.x,g=this.y,y=this.z,x=this.w,C=Math.sin(d),P=Math.cos(d);return this.set(p*P-y*C,g*P+x*C,y*P+p*C,x*P-g*C)},rotateZ:function(d){d*=.5;var p=this.x,g=this.y,y=this.z,x=this.w,C=Math.sin(d),P=Math.cos(d);return this.set(p*P+g*C,g*P-p*C,y*P+x*C,x*P-y*C)},calculateW:function(){var d=this.x,p=this.y,g=this.z;return this.w=-Math.sqrt(1-d*d-p*p-g*g),this},setFromEuler:function(d,p){var g=d.x/2,y=d.y/2,x=d.z/2,C=Math.cos(g),P=Math.cos(y),M=Math.cos(x),w=Math.sin(g),I=Math.sin(y),L=Math.sin(x);switch(d.order){case"XYZ":{this.set(w*P*M+C*I*L,C*I*M-w*P*L,C*P*L+w*I*M,C*P*M-w*I*L,p);break}case"YXZ":{this.set(w*P*M+C*I*L,C*I*M-w*P*L,C*P*L-w*I*M,C*P*M+w*I*L,p);break}case"ZXY":{this.set(w*P*M-C*I*L,C*I*M+w*P*L,C*P*L+w*I*M,C*P*M-w*I*L,p);break}case"ZYX":{this.set(w*P*M-C*I*L,C*I*M+w*P*L,C*P*L-w*I*M,C*P*M+w*I*L,p);break}case"YZX":{this.set(w*P*M+C*I*L,C*I*M+w*P*L,C*P*L-w*I*M,C*P*M-w*I*L,p);break}case"XZY":{this.set(w*P*M-C*I*L,C*I*M-w*P*L,C*P*L+w*I*M,C*P*M+w*I*L,p);break}}return this},setFromRotationMatrix:function(d){var p=d.val,g=p[0],y=p[4],x=p[8],C=p[1],P=p[5],M=p[9],w=p[2],I=p[6],L=p[10],B=g+P+L,N;return B>0?(N=.5/Math.sqrt(B+1),this.set((I-M)*N,(x-w)*N,(C-y)*N,.25/N)):g>P&&g>L?(N=2*Math.sqrt(1+g-P-L),this.set(.25*N,(y+C)/N,(x+w)/N,(I-M)/N)):P>L?(N=2*Math.sqrt(1+P-g-L),this.set((y+C)/N,.25*N,(M+I)/N,(x-w)/N)):(N=2*Math.sqrt(1+L-g-P),this.set((x+w)/N,(M+I)/N,.25*N,(C-y)/N)),this},fromMat3:function(d){var p=d.val,g=p[0]+p[4]+p[8],y;if(g>0)y=Math.sqrt(g+1),this.w=.5*y,y=.5/y,this._x=(p[7]-p[5])*y,this._y=(p[2]-p[6])*y,this._z=(p[3]-p[1])*y;else{var x=0;p[4]>p[0]&&(x=1),p[8]>p[x*3+x]&&(x=2);var C=e[x],P=e[C];y=Math.sqrt(p[x*3+x]-p[C*3+C]-p[P*3+P]+1),i[x]=.5*y,y=.5/y,i[C]=(p[C*3+x]+p[x*3+C])*y,i[P]=(p[P*3+x]+p[x*3+P])*y,this._x=i[0],this._y=i[1],this._z=i[2],this._w=(p[P*3+C]-p[C*3+P])*y}return this.onChangeCallback(this),this}});c.exports=u},43396:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=function(o){return o*a.RAD_TO_DEG};c.exports=v},74362:c=>{/** + */var o=t(36383),v=function(a){return a*o.RAD_TO_DEG};c.exports=v},74362:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=1);var v=Math.random()*2*Math.PI;return t.x=Math.cos(v)*a,t.y=Math.sin(v)*a,t};c.exports=m},60706:c=>{/** + */var m=function(t,o){o===void 0&&(o=1);var v=Math.random()*2*Math.PI;return t.x=Math.cos(v)*o,t.y=Math.sin(v)*o,t};c.exports=m},60706:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=1);var v=Math.random()*2*Math.PI,o=Math.random()*2-1,r=Math.sqrt(1-o*o)*a;return t.x=Math.cos(v)*r,t.y=Math.sin(v)*r,t.z=o*a,t};c.exports=m},67421:c=>{/** + */var m=function(t,o){o===void 0&&(o=1);var v=Math.random()*2*Math.PI,a=Math.random()*2-1,r=Math.sqrt(1-a*a)*o;return t.x=Math.cos(v)*r,t.y=Math.sin(v)*r,t.z=a*o,t};c.exports=m},67421:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=1),t.x=(Math.random()*2-1)*a,t.y=(Math.random()*2-1)*a,t.z=(Math.random()*2-1)*a,t.w=(Math.random()*2-1)*a,t};c.exports=m},36305:c=>{/** + */var m=function(t,o){return o===void 0&&(o=1),t.x=(Math.random()*2-1)*o,t.y=(Math.random()*2-1)*o,t.z=(Math.random()*2-1)*o,t.w=(Math.random()*2-1)*o,t};c.exports=m},36305:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.x,o=t.y;return t.x=v*Math.cos(a)-o*Math.sin(a),t.y=v*Math.sin(a)+o*Math.cos(a),t};c.exports=m},11520:c=>{/** + */var m=function(t,o){var v=t.x,a=t.y;return t.x=v*Math.cos(o)-a*Math.sin(o),t.y=v*Math.sin(o)+a*Math.cos(o),t};c.exports=m},11520:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=Math.cos(o),n=Math.sin(o),e=t.x-a,i=t.y-v;return t.x=e*r-i*n+a,t.y=e*n+i*r+v,t};c.exports=m},1163:c=>{/** + */var m=function(t,o,v,a){var r=Math.cos(a),n=Math.sin(a),e=t.x-o,i=t.y-v;return t.x=e*r-i*n+o,t.y=e*n+i*r+v,t};c.exports=m},1163:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){var n=o+Math.atan2(t.y-v,t.x-a);return t.x=a+r*Math.cos(n),t.y=v+r*Math.sin(n),t};c.exports=m},70336:c=>{/** + */var m=function(t,o,v,a,r){var n=a+Math.atan2(t.y-v,t.x-o);return t.x=o+r*Math.cos(n),t.y=v+r*Math.sin(n),t};c.exports=m},70336:c=>{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){return t.x=a+r*Math.cos(o),t.y=v+r*Math.sin(o),t};c.exports=m},72678:(c,m,t)=>{/** + */var m=function(t,o,v,a,r){return t.x=o+r*Math.cos(a),t.y=v+r*Math.sin(a),t};c.exports=m},72678:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25836),v=t(37867),o=t(15746),r=new v,n=new o,e=new a,i=function(h,s,l){return n.setAxisAngle(s,l),r.fromRotationTranslation(n,e.set(0,0,0)),h.transformMat4(r)};c.exports=i},2284:c=>{/** + */var o=t(25836),v=t(37867),a=t(15746),r=new v,n=new a,e=new o,i=function(h,s,l){return n.setAxisAngle(s,l),r.fromRotationTranslation(n,e.set(0,0,0)),h.transformMat4(r)};c.exports=i},2284:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3787,67 +3787,67 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){a===void 0&&(a=0),v===void 0&&(v=10);var o=Math.pow(v,-a);return Math.round(t*o)/o};c.exports=m},16922:c=>{/** + */var m=function(t,o,v){o===void 0&&(o=0),v===void 0&&(v=10);var a=Math.pow(v,-o);return Math.round(t*a)/a};c.exports=m},16922:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){a===void 0&&(a=1),v===void 0&&(v=1),o===void 0&&(o=1),o*=Math.PI/t;for(var r=[],n=[],e=0;e{/** + */var m=function(t,o,v,a){o===void 0&&(o=1),v===void 0&&(v=1),a===void 0&&(a=1),a*=Math.PI/t;for(var r=[],n=[],e=0;e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t<=a?0:t>=v?1:(t=(t-a)/(v-a),t*t*(3-2*t))};c.exports=m},54261:c=>{/** + */var m=function(t,o,v){return t<=o?0:t>=v?1:(t=(t-o)/(v-o),t*t*(3-2*t))};c.exports=m},54261:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t=Math.max(0,Math.min(1,(t-a)/(v-a))),t*t*t*(t*(t*6-15)+10)};c.exports=m},44408:(c,m,t)=>{/** + */var m=function(t,o,v){return t=Math.max(0,Math.min(1,(t-o)/(v-o))),t*t*t*(t*(t*6-15)+10)};c.exports=m},44408:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e){e===void 0&&(e=new a);var i=0,h=0,s=r*n;return o>0&&o<=s&&(o>r-1?(h=Math.floor(o/r),i=o-h*r):i=o),e.set(i,h)};c.exports=v},85955:(c,m,t)=>{/** + */var o=t(26099),v=function(a,r,n,e){e===void 0&&(e=new o);var i=0,h=0,s=r*n;return a>0&&a<=s&&(a>r-1?(h=Math.floor(a/r),i=a-h*r):i=a),e.set(i,h)};c.exports=v},85955:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i,h,s,l){l===void 0&&(l=new a);var f=Math.sin(i),u=Math.cos(i),d=u*h,p=f*h,g=-f*s,y=u*s,x=1/(d*y+g*-p);return l.x=y*x*o+-g*x*r+(e*g-n*y)*x,l.y=d*x*r+-p*x*o+(-e*d+n*p)*x,l};c.exports=v},26099:(c,m,t)=>{/** + */var o=t(26099),v=function(a,r,n,e,i,h,s,l){l===void 0&&(l=new o);var f=Math.sin(i),u=Math.cos(i),d=u*h,p=f*h,g=-f*s,y=u*s,x=1/(d*y+g*-p);return l.x=y*x*a+-g*x*r+(e*g-n*y)*x,l.y=d*x*r+-p*x*a+(-e*d+n*p)*x,l};c.exports=v},26099:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(43855),o=new a({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 o(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 v(this.x,r.x,n)&&v(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,i=this.y;return this.x=e+n*(r.x-e),this.y=i+n*(r.y-i),this},transformMat3:function(r){var n=this.x,e=this.y,i=r.val;return this.x=i[0]*n+i[3]*e+i[6],this.y=i[1]*n+i[4]*e+i[7],this},transformMat4:function(r){var n=this.x,e=this.y,i=r.val;return this.x=i[0]*n+i[4]*e+i[12],this.y=i[1]*n+i[5]*e+i[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)}});o.ZERO=new o,o.RIGHT=new o(1,0),o.LEFT=new o(-1,0),o.UP=new o(0,-1),o.DOWN=new o(0,1),o.ONE=new o(1,1),c.exports=o},25836:(c,m,t)=>{/** + */var o=t(83419),v=t(43855),a=new o({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 a(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 v(this.x,r.x,n)&&v(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,i=this.y;return this.x=e+n*(r.x-e),this.y=i+n*(r.y-i),this},transformMat3:function(r){var n=this.x,e=this.y,i=r.val;return this.x=i[0]*n+i[3]*e+i[6],this.y=i[1]*n+i[4]*e+i[7],this},transformMat4:function(r){var n=this.x,e=this.y,i=r.val;return this.x=i[0]*n+i[4]*e+i[12],this.y=i[1]*n+i[5]*e+i[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)}});a.ZERO=new a,a.RIGHT=new a(1,0),a.LEFT=new a(-1,0),a.UP=new a(0,-1),a.DOWN=new a(0,1),a.ONE=new a(1,1),c.exports=a},25836:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({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(o){return this.x=Math.min(this.x,o.x),this.y=Math.min(this.y,o.y),this.z=Math.min(this.z,o.z),this},max:function(o){return this.x=Math.max(this.x,o.x),this.y=Math.max(this.y,o.y),this.z=Math.max(this.z,o.z),this},clone:function(){return new v(this.x,this.y,this.z)},addVectors:function(o,r){return this.x=o.x+r.x,this.y=o.y+r.y,this.z=o.z+r.z,this},crossVectors:function(o,r){var n=o.x,e=o.y,i=o.z,h=r.x,s=r.y,l=r.z;return this.x=e*l-i*s,this.y=i*h-n*l,this.z=n*s-e*h,this},equals:function(o){return this.x===o.x&&this.y===o.y&&this.z===o.z},copy:function(o){return this.x=o.x,this.y=o.y,this.z=o.z||0,this},set:function(o,r,n){return typeof o=="object"?(this.x=o.x||0,this.y=o.y||0,this.z=o.z||0):(this.x=o||0,this.y=r||0,this.z=n||0),this},setFromMatrixPosition:function(o){return this.fromArray(o.val,12)},setFromMatrixColumn:function(o,r){return this.fromArray(o.val,r*4)},fromArray:function(o,r){return r===void 0&&(r=0),this.x=o[r],this.y=o[r+1],this.z=o[r+2],this},add:function(o){return this.x+=o.x,this.y+=o.y,this.z+=o.z||0,this},addScalar:function(o){return this.x+=o,this.y+=o,this.z+=o,this},addScale:function(o,r){return this.x+=o.x*r,this.y+=o.y*r,this.z+=o.z*r||0,this},subtract:function(o){return this.x-=o.x,this.y-=o.y,this.z-=o.z||0,this},multiply:function(o){return this.x*=o.x,this.y*=o.y,this.z*=o.z||1,this},scale:function(o){return isFinite(o)?(this.x*=o,this.y*=o,this.z*=o):(this.x=0,this.y=0,this.z=0),this},divide:function(o){return this.x/=o.x,this.y/=o.y,this.z/=o.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(o){var r=o.x-this.x,n=o.y-this.y,e=o.z-this.z||0;return Math.sqrt(r*r+n*n+e*e)},distanceSq:function(o){var r=o.x-this.x,n=o.y-this.y,e=o.z-this.z||0;return r*r+n*n+e*e},length:function(){var o=this.x,r=this.y,n=this.z;return Math.sqrt(o*o+r*r+n*n)},lengthSq:function(){var o=this.x,r=this.y,n=this.z;return o*o+r*r+n*n},normalize:function(){var o=this.x,r=this.y,n=this.z,e=o*o+r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=o*e,this.y=r*e,this.z=n*e),this},dot:function(o){return this.x*o.x+this.y*o.y+this.z*o.z},cross:function(o){var r=this.x,n=this.y,e=this.z,i=o.x,h=o.y,s=o.z;return this.x=n*s-e*h,this.y=e*i-r*s,this.z=r*h-n*i,this},lerp:function(o,r){r===void 0&&(r=0);var n=this.x,e=this.y,i=this.z;return this.x=n+r*(o.x-n),this.y=e+r*(o.y-e),this.z=i+r*(o.z-i),this},applyMatrix3:function(o){var r=this.x,n=this.y,e=this.z,i=o.val;return this.x=i[0]*r+i[3]*n+i[6]*e,this.y=i[1]*r+i[4]*n+i[7]*e,this.z=i[2]*r+i[5]*n+i[8]*e,this},applyMatrix4:function(o){var r=this.x,n=this.y,e=this.z,i=o.val,h=1/(i[3]*r+i[7]*n+i[11]*e+i[15]);return this.x=(i[0]*r+i[4]*n+i[8]*e+i[12])*h,this.y=(i[1]*r+i[5]*n+i[9]*e+i[13])*h,this.z=(i[2]*r+i[6]*n+i[10]*e+i[14])*h,this},transformMat3:function(o){var r=this.x,n=this.y,e=this.z,i=o.val;return this.x=r*i[0]+n*i[3]+e*i[6],this.y=r*i[1]+n*i[4]+e*i[7],this.z=r*i[2]+n*i[5]+e*i[8],this},transformMat4:function(o){var r=this.x,n=this.y,e=this.z,i=o.val;return this.x=i[0]*r+i[4]*n+i[8]*e+i[12],this.y=i[1]*r+i[5]*n+i[9]*e+i[13],this.z=i[2]*r+i[6]*n+i[10]*e+i[14],this},transformCoordinates:function(o){var r=this.x,n=this.y,e=this.z,i=o.val,h=r*i[0]+n*i[4]+e*i[8]+i[12],s=r*i[1]+n*i[5]+e*i[9]+i[13],l=r*i[2]+n*i[6]+e*i[10]+i[14],f=r*i[3]+n*i[7]+e*i[11]+i[15];return this.x=h/f,this.y=s/f,this.z=l/f,this},transformQuat:function(o){var r=this.x,n=this.y,e=this.z,i=o.x,h=o.y,s=o.z,l=o.w,f=l*r+h*e-s*n,u=l*n+s*r-i*e,d=l*e+i*n-h*r,p=-i*r-h*n-s*e;return this.x=f*l+p*-i+u*-s-d*-h,this.y=u*l+p*-h+d*-i-f*-s,this.z=d*l+p*-s+f*-h-u*-i,this},project:function(o){var r=this.x,n=this.y,e=this.z,i=o.val,h=i[0],s=i[1],l=i[2],f=i[3],u=i[4],d=i[5],p=i[6],g=i[7],y=i[8],x=i[9],T=i[10],C=i[11],M=i[12],w=i[13],L=i[14],F=i[15],O=1/(r*f+n*g+e*C+F);return this.x=(r*h+n*u+e*y+M)*O,this.y=(r*s+n*d+e*x+w)*O,this.z=(r*l+n*p+e*T+L)*O,this},projectViewMatrix:function(o,r){return this.applyMatrix4(o).applyMatrix4(r)},unprojectViewMatrix:function(o,r){return this.applyMatrix4(o).applyMatrix4(r)},unproject:function(o,r){var n=o.x,e=o.y,i=o.z,h=o.w,s=this.x-n,l=h-this.y-1-e,f=this.z;return this.x=2*s/i-1,this.y=2*l/h-1,this.z=2*f-1,this.project(r)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});v.ZERO=new v,v.RIGHT=new v(1,0,0),v.LEFT=new v(-1,0,0),v.UP=new v(0,-1,0),v.DOWN=new v(0,1,0),v.FORWARD=new v(0,0,1),v.BACK=new v(0,0,-1),v.ONE=new v(1,1,1),c.exports=v},61369:(c,m,t)=>{/** + */var o=t(83419),v=new o({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(a){return this.x=Math.min(this.x,a.x),this.y=Math.min(this.y,a.y),this.z=Math.min(this.z,a.z),this},max:function(a){return this.x=Math.max(this.x,a.x),this.y=Math.max(this.y,a.y),this.z=Math.max(this.z,a.z),this},clone:function(){return new v(this.x,this.y,this.z)},addVectors:function(a,r){return this.x=a.x+r.x,this.y=a.y+r.y,this.z=a.z+r.z,this},crossVectors:function(a,r){var n=a.x,e=a.y,i=a.z,h=r.x,s=r.y,l=r.z;return this.x=e*l-i*s,this.y=i*h-n*l,this.z=n*s-e*h,this},equals:function(a){return this.x===a.x&&this.y===a.y&&this.z===a.z},copy:function(a){return this.x=a.x,this.y=a.y,this.z=a.z||0,this},set:function(a,r,n){return typeof a=="object"?(this.x=a.x||0,this.y=a.y||0,this.z=a.z||0):(this.x=a||0,this.y=r||0,this.z=n||0),this},setFromMatrixPosition:function(a){return this.fromArray(a.val,12)},setFromMatrixColumn:function(a,r){return this.fromArray(a.val,r*4)},fromArray:function(a,r){return r===void 0&&(r=0),this.x=a[r],this.y=a[r+1],this.z=a[r+2],this},add:function(a){return this.x+=a.x,this.y+=a.y,this.z+=a.z||0,this},addScalar:function(a){return this.x+=a,this.y+=a,this.z+=a,this},addScale:function(a,r){return this.x+=a.x*r,this.y+=a.y*r,this.z+=a.z*r||0,this},subtract:function(a){return this.x-=a.x,this.y-=a.y,this.z-=a.z||0,this},multiply:function(a){return this.x*=a.x,this.y*=a.y,this.z*=a.z||1,this},scale:function(a){return isFinite(a)?(this.x*=a,this.y*=a,this.z*=a):(this.x=0,this.y=0,this.z=0),this},divide:function(a){return this.x/=a.x,this.y/=a.y,this.z/=a.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(a){var r=a.x-this.x,n=a.y-this.y,e=a.z-this.z||0;return Math.sqrt(r*r+n*n+e*e)},distanceSq:function(a){var r=a.x-this.x,n=a.y-this.y,e=a.z-this.z||0;return r*r+n*n+e*e},length:function(){var a=this.x,r=this.y,n=this.z;return Math.sqrt(a*a+r*r+n*n)},lengthSq:function(){var a=this.x,r=this.y,n=this.z;return a*a+r*r+n*n},normalize:function(){var a=this.x,r=this.y,n=this.z,e=a*a+r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=a*e,this.y=r*e,this.z=n*e),this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},cross:function(a){var r=this.x,n=this.y,e=this.z,i=a.x,h=a.y,s=a.z;return this.x=n*s-e*h,this.y=e*i-r*s,this.z=r*h-n*i,this},lerp:function(a,r){r===void 0&&(r=0);var n=this.x,e=this.y,i=this.z;return this.x=n+r*(a.x-n),this.y=e+r*(a.y-e),this.z=i+r*(a.z-i),this},applyMatrix3:function(a){var r=this.x,n=this.y,e=this.z,i=a.val;return this.x=i[0]*r+i[3]*n+i[6]*e,this.y=i[1]*r+i[4]*n+i[7]*e,this.z=i[2]*r+i[5]*n+i[8]*e,this},applyMatrix4:function(a){var r=this.x,n=this.y,e=this.z,i=a.val,h=1/(i[3]*r+i[7]*n+i[11]*e+i[15]);return this.x=(i[0]*r+i[4]*n+i[8]*e+i[12])*h,this.y=(i[1]*r+i[5]*n+i[9]*e+i[13])*h,this.z=(i[2]*r+i[6]*n+i[10]*e+i[14])*h,this},transformMat3:function(a){var r=this.x,n=this.y,e=this.z,i=a.val;return this.x=r*i[0]+n*i[3]+e*i[6],this.y=r*i[1]+n*i[4]+e*i[7],this.z=r*i[2]+n*i[5]+e*i[8],this},transformMat4:function(a){var r=this.x,n=this.y,e=this.z,i=a.val;return this.x=i[0]*r+i[4]*n+i[8]*e+i[12],this.y=i[1]*r+i[5]*n+i[9]*e+i[13],this.z=i[2]*r+i[6]*n+i[10]*e+i[14],this},transformCoordinates:function(a){var r=this.x,n=this.y,e=this.z,i=a.val,h=r*i[0]+n*i[4]+e*i[8]+i[12],s=r*i[1]+n*i[5]+e*i[9]+i[13],l=r*i[2]+n*i[6]+e*i[10]+i[14],f=r*i[3]+n*i[7]+e*i[11]+i[15];return this.x=h/f,this.y=s/f,this.z=l/f,this},transformQuat:function(a){var r=this.x,n=this.y,e=this.z,i=a.x,h=a.y,s=a.z,l=a.w,f=l*r+h*e-s*n,u=l*n+s*r-i*e,d=l*e+i*n-h*r,p=-i*r-h*n-s*e;return this.x=f*l+p*-i+u*-s-d*-h,this.y=u*l+p*-h+d*-i-f*-s,this.z=d*l+p*-s+f*-h-u*-i,this},project:function(a){var r=this.x,n=this.y,e=this.z,i=a.val,h=i[0],s=i[1],l=i[2],f=i[3],u=i[4],d=i[5],p=i[6],g=i[7],y=i[8],x=i[9],C=i[10],P=i[11],M=i[12],w=i[13],I=i[14],L=i[15],B=1/(r*f+n*g+e*P+L);return this.x=(r*h+n*u+e*y+M)*B,this.y=(r*s+n*d+e*x+w)*B,this.z=(r*l+n*p+e*C+I)*B,this},projectViewMatrix:function(a,r){return this.applyMatrix4(a).applyMatrix4(r)},unprojectViewMatrix:function(a,r){return this.applyMatrix4(a).applyMatrix4(r)},unproject:function(a,r){var n=a.x,e=a.y,i=a.z,h=a.w,s=this.x-n,l=h-this.y-1-e,f=this.z;return this.x=2*s/i-1,this.y=2*l/h-1,this.z=2*f-1,this.project(r)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});v.ZERO=new v,v.RIGHT=new v(1,0,0),v.LEFT=new v(-1,0,0),v.UP=new v(0,-1,0),v.DOWN=new v(0,1,0),v.FORWARD=new v(0,0,1),v.BACK=new v(0,0,-1),v.ONE=new v(1,1,1),c.exports=v},61369:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e,i){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=i||0)},clone:function(){return new v(this.x,this.y,this.z,this.w)},copy:function(o){return this.x=o.x,this.y=o.y,this.z=o.z||0,this.w=o.w||0,this},equals:function(o){return this.x===o.x&&this.y===o.y&&this.z===o.z&&this.w===o.w},set:function(o,r,n,e){return typeof o=="object"?(this.x=o.x||0,this.y=o.y||0,this.z=o.z||0,this.w=o.w||0):(this.x=o||0,this.y=r||0,this.z=n||0,this.w=e||0),this},add:function(o){return this.x+=o.x,this.y+=o.y,this.z+=o.z||0,this.w+=o.w||0,this},subtract:function(o){return this.x-=o.x,this.y-=o.y,this.z-=o.z||0,this.w-=o.w||0,this},scale:function(o){return this.x*=o,this.y*=o,this.z*=o,this.w*=o,this},length:function(){var o=this.x,r=this.y,n=this.z,e=this.w;return Math.sqrt(o*o+r*r+n*n+e*e)},lengthSq:function(){var o=this.x,r=this.y,n=this.z,e=this.w;return o*o+r*r+n*n+e*e},normalize:function(){var o=this.x,r=this.y,n=this.z,e=this.w,i=o*o+r*r+n*n+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=o*i,this.y=r*i,this.z=n*i,this.w=e*i),this},dot:function(o){return this.x*o.x+this.y*o.y+this.z*o.z+this.w*o.w},lerp:function(o,r){r===void 0&&(r=0);var n=this.x,e=this.y,i=this.z,h=this.w;return this.x=n+r*(o.x-n),this.y=e+r*(o.y-e),this.z=i+r*(o.z-i),this.w=h+r*(o.w-h),this},multiply:function(o){return this.x*=o.x,this.y*=o.y,this.z*=o.z||1,this.w*=o.w||1,this},divide:function(o){return this.x/=o.x,this.y/=o.y,this.z/=o.z||1,this.w/=o.w||1,this},distance:function(o){var r=o.x-this.x,n=o.y-this.y,e=o.z-this.z||0,i=o.w-this.w||0;return Math.sqrt(r*r+n*n+e*e+i*i)},distanceSq:function(o){var r=o.x-this.x,n=o.y-this.y,e=o.z-this.z||0,i=o.w-this.w||0;return r*r+n*n+e*e+i*i},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(o){var r=this.x,n=this.y,e=this.z,i=this.w,h=o.val;return this.x=h[0]*r+h[4]*n+h[8]*e+h[12]*i,this.y=h[1]*r+h[5]*n+h[9]*e+h[13]*i,this.z=h[2]*r+h[6]*n+h[10]*e+h[14]*i,this.w=h[3]*r+h[7]*n+h[11]*e+h[15]*i,this},transformQuat:function(o){var r=this.x,n=this.y,e=this.z,i=o.x,h=o.y,s=o.z,l=o.w,f=l*r+h*e-s*n,u=l*n+s*r-i*e,d=l*e+i*n-h*r,p=-i*r-h*n-s*e;return this.x=f*l+p*-i+u*-s-d*-h,this.y=u*l+p*-h+d*-i-f*-s,this.z=d*l+p*-s+f*-h-u*-i,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});v.prototype.sub=v.prototype.subtract,v.prototype.mul=v.prototype.multiply,v.prototype.div=v.prototype.divide,v.prototype.dist=v.prototype.distance,v.prototype.distSq=v.prototype.distanceSq,v.prototype.len=v.prototype.length,v.prototype.lenSq=v.prototype.lengthSq,c.exports=v},60417:c=>{/** + */var o=t(83419),v=new o({initialize:function(r,n,e,i){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=i||0)},clone:function(){return new v(this.x,this.y,this.z,this.w)},copy:function(a){return this.x=a.x,this.y=a.y,this.z=a.z||0,this.w=a.w||0,this},equals:function(a){return this.x===a.x&&this.y===a.y&&this.z===a.z&&this.w===a.w},set:function(a,r,n,e){return typeof a=="object"?(this.x=a.x||0,this.y=a.y||0,this.z=a.z||0,this.w=a.w||0):(this.x=a||0,this.y=r||0,this.z=n||0,this.w=e||0),this},add:function(a){return this.x+=a.x,this.y+=a.y,this.z+=a.z||0,this.w+=a.w||0,this},subtract:function(a){return this.x-=a.x,this.y-=a.y,this.z-=a.z||0,this.w-=a.w||0,this},scale:function(a){return this.x*=a,this.y*=a,this.z*=a,this.w*=a,this},length:function(){var a=this.x,r=this.y,n=this.z,e=this.w;return Math.sqrt(a*a+r*r+n*n+e*e)},lengthSq:function(){var a=this.x,r=this.y,n=this.z,e=this.w;return a*a+r*r+n*n+e*e},normalize:function(){var a=this.x,r=this.y,n=this.z,e=this.w,i=a*a+r*r+n*n+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=a*i,this.y=r*i,this.z=n*i,this.w=e*i),this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w},lerp:function(a,r){r===void 0&&(r=0);var n=this.x,e=this.y,i=this.z,h=this.w;return this.x=n+r*(a.x-n),this.y=e+r*(a.y-e),this.z=i+r*(a.z-i),this.w=h+r*(a.w-h),this},multiply:function(a){return this.x*=a.x,this.y*=a.y,this.z*=a.z||1,this.w*=a.w||1,this},divide:function(a){return this.x/=a.x,this.y/=a.y,this.z/=a.z||1,this.w/=a.w||1,this},distance:function(a){var r=a.x-this.x,n=a.y-this.y,e=a.z-this.z||0,i=a.w-this.w||0;return Math.sqrt(r*r+n*n+e*e+i*i)},distanceSq:function(a){var r=a.x-this.x,n=a.y-this.y,e=a.z-this.z||0,i=a.w-this.w||0;return r*r+n*n+e*e+i*i},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(a){var r=this.x,n=this.y,e=this.z,i=this.w,h=a.val;return this.x=h[0]*r+h[4]*n+h[8]*e+h[12]*i,this.y=h[1]*r+h[5]*n+h[9]*e+h[13]*i,this.z=h[2]*r+h[6]*n+h[10]*e+h[14]*i,this.w=h[3]*r+h[7]*n+h[11]*e+h[15]*i,this},transformQuat:function(a){var r=this.x,n=this.y,e=this.z,i=a.x,h=a.y,s=a.z,l=a.w,f=l*r+h*e-s*n,u=l*n+s*r-i*e,d=l*e+i*n-h*r,p=-i*r-h*n-s*e;return this.x=f*l+p*-i+u*-s-d*-h,this.y=u*l+p*-h+d*-i-f*-s,this.z=d*l+p*-s+f*-h-u*-i,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});v.prototype.sub=v.prototype.subtract,v.prototype.mul=v.prototype.multiply,v.prototype.div=v.prototype.divide,v.prototype.dist=v.prototype.distance,v.prototype.distSq=v.prototype.distanceSq,v.prototype.len=v.prototype.length,v.prototype.lenSq=v.prototype.lengthSq,c.exports=v},60417:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return Math.abs(t-a)<=v};c.exports=m},15994:c=>{/** + */var m=function(t,o,v){return Math.abs(t-o)<=v};c.exports=m},15994:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=v-a;return a+((t-a)%o+o)%o};c.exports=m},31040:c=>{/** + */var m=function(t,o,v){var a=v-o;return o+((t-o)%a+a)%a};c.exports=m},31040:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return Math.atan2(o-a,v-t)};c.exports=m},55495:c=>{/** + */var m=function(t,o,v,a){return Math.atan2(a-o,v-t)};c.exports=m},55495:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return Math.atan2(a.y-t.y,a.x-t.x)};c.exports=m},128:c=>{/** + */var m=function(t,o){return Math.atan2(o.y-t.y,o.x-t.x)};c.exports=m},128:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return Math.atan2(a.x-t.x,a.y-t.y)};c.exports=m},41273:c=>{/** + */var m=function(t,o){return Math.atan2(o.x-t.x,o.y-t.y)};c.exports=m},41273:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return Math.atan2(v-t,o-a)};c.exports=m},1432:(c,m,t)=>{/** + */var m=function(t,o,v,a){return Math.atan2(v-t,a-o)};c.exports=m},1432:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=function(o){return o>Math.PI&&(o-=a.PI2),Math.abs(((o+a.TAU)%a.PI2-a.PI2)%a.PI2)};c.exports=v},12407:c=>{/** + */var o=t(36383),v=function(a){return a>Math.PI&&(a-=o.PI2),Math.abs(((a+o.TAU)%o.PI2-o.PI2)%o.PI2)};c.exports=v},12407:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3856,32 +3856,32 @@ return new `+this.key+`(); * @author @samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(99472),v=function(){return a(-Math.PI,Math.PI)};c.exports=v},86564:(c,m,t)=>{/** + */var o=t(99472),v=function(){return o(-Math.PI,Math.PI)};c.exports=v},86564:(c,m,t)=>{/** * @author Richard Davey * @author @samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(99472),v=function(){return a(-180,180)};c.exports=v},90154:(c,m,t)=>{/** + */var o=t(99472),v=function(){return o(-180,180)};c.exports=v},90154:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(12407),v=function(o){return a(o+Math.PI)};c.exports=v},48736:(c,m,t)=>{/** + */var o=t(12407),v=function(a){return o(a+Math.PI)};c.exports=v},48736:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=function(o,r,n){return n===void 0&&(n=.05),o===r||(Math.abs(r-o)<=n||Math.abs(r-o)>=a.PI2-n?o=r:(Math.abs(r-o)>Math.PI&&(ro?o+=n:r{/** + */var o=t(36383),v=function(a,r,n){return n===void 0&&(n=.05),a===r||(Math.abs(r-a)<=n||Math.abs(r-a)>=o.PI2-n?a=r:(Math.abs(r-a)>Math.PI&&(ra?a+=n:r{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=a-t;if(v===0)return 0;var o=Math.floor((v- -180)/360);return v-o*360};c.exports=m},86554:(c,m,t)=>{/** + */var m=function(t,o){var v=o-t;if(v===0)return 0;var a=Math.floor((v- -180)/360);return v-a*360};c.exports=m},86554:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(15994),v=function(o){return a(o,-Math.PI,Math.PI)};c.exports=v},30954:(c,m,t)=>{/** + */var o=t(15994),v=function(a){return o(a,-Math.PI,Math.PI)};c.exports=v},30954:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(15994),v=function(o){return a(o,-180,180)};c.exports=v},25588:(c,m,t)=>{/** + */var o=t(15994),v=function(a){return o(a,-180,180)};c.exports=v},25588:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3893,31 +3893,31 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=t-v,n=a-o;return Math.sqrt(r*r+n*n)};c.exports=m},52816:c=>{/** + */var m=function(t,o,v,a){var r=t-v,n=o-a;return Math.sqrt(r*r+n*n)};c.exports=m},52816:c=>{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.x-a.x,o=t.y-a.y;return Math.sqrt(v*v+o*o)};c.exports=m},64559:c=>{/** + */var m=function(t,o){var v=t.x-o.x,a=t.y-o.y;return Math.sqrt(v*v+a*a)};c.exports=m},64559:c=>{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.x-a.x,o=t.y-a.y;return v*v+o*o};c.exports=m},82340:c=>{/** + */var m=function(t,o){var v=t.x-o.x,a=t.y-o.y;return v*v+a*a};c.exports=m},82340:c=>{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return Math.max(Math.abs(t-v),Math.abs(a-o))};c.exports=m},14390:c=>{/** + */var m=function(t,o,v,a){return Math.max(Math.abs(t-v),Math.abs(o-a))};c.exports=m},14390:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){return r===void 0&&(r=2),Math.sqrt(Math.pow(v-t,r)+Math.pow(o-a,r))};c.exports=m},2243:c=>{/** + */var m=function(t,o,v,a,r){return r===void 0&&(r=2),Math.sqrt(Math.pow(v-t,r)+Math.pow(a-o,r))};c.exports=m},2243:c=>{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return Math.abs(t-v)+Math.abs(a-o)};c.exports=m},89774:c=>{/** + */var m=function(t,o,v,a){return Math.abs(t-v)+Math.abs(o-a)};c.exports=m},89774:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=t-v,n=a-o;return r*r+n*n};c.exports=m},50994:(c,m,t)=>{/** + */var m=function(t,o,v,a){var r=t-v,n=o-a;return r*r+n*n};c.exports=m},50994:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3925,19 +3925,19 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(54178),v=t(41521),o=t(79980),r=t(85433),n=t(99140),e=t(48857),i=t(81596),h=t(59133),s=t(98516),l=t(35248),f=t(82500),u=t(49752);c.exports={Power0:i,Power1:h.Out,Power2:r.Out,Power3:s.Out,Power4:l.Out,Linear:i,Quad:h.Out,Cubic:r.Out,Quart:s.Out,Quint:l.Out,Sine:f.Out,Expo:e.Out,Circ:o.Out,Elastic:n.Out,Back:a.Out,Bounce:v.Out,Stepped:u,"Quad.easeIn":h.In,"Cubic.easeIn":r.In,"Quart.easeIn":s.In,"Quint.easeIn":l.In,"Sine.easeIn":f.In,"Expo.easeIn":e.In,"Circ.easeIn":o.In,"Elastic.easeIn":n.In,"Back.easeIn":a.In,"Bounce.easeIn":v.In,"Quad.easeOut":h.Out,"Cubic.easeOut":r.Out,"Quart.easeOut":s.Out,"Quint.easeOut":l.Out,"Sine.easeOut":f.Out,"Expo.easeOut":e.Out,"Circ.easeOut":o.Out,"Elastic.easeOut":n.Out,"Back.easeOut":a.Out,"Bounce.easeOut":v.Out,"Quad.easeInOut":h.InOut,"Cubic.easeInOut":r.InOut,"Quart.easeInOut":s.InOut,"Quint.easeInOut":l.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":e.InOut,"Circ.easeInOut":o.InOut,"Elastic.easeInOut":n.InOut,"Back.easeInOut":a.InOut,"Bounce.easeInOut":v.InOut}},1639:c=>{/** + */var o=t(54178),v=t(41521),a=t(79980),r=t(85433),n=t(99140),e=t(48857),i=t(81596),h=t(59133),s=t(98516),l=t(35248),f=t(82500),u=t(49752);c.exports={Power0:i,Power1:h.Out,Power2:r.Out,Power3:s.Out,Power4:l.Out,Linear:i,Quad:h.Out,Cubic:r.Out,Quart:s.Out,Quint:l.Out,Sine:f.Out,Expo:e.Out,Circ:a.Out,Elastic:n.Out,Back:o.Out,Bounce:v.Out,Stepped:u,"Quad.easeIn":h.In,"Cubic.easeIn":r.In,"Quart.easeIn":s.In,"Quint.easeIn":l.In,"Sine.easeIn":f.In,"Expo.easeIn":e.In,"Circ.easeIn":a.In,"Elastic.easeIn":n.In,"Back.easeIn":o.In,"Bounce.easeIn":v.In,"Quad.easeOut":h.Out,"Cubic.easeOut":r.Out,"Quart.easeOut":s.Out,"Quint.easeOut":l.Out,"Sine.easeOut":f.Out,"Expo.easeOut":e.Out,"Circ.easeOut":a.Out,"Elastic.easeOut":n.Out,"Back.easeOut":o.Out,"Bounce.easeOut":v.Out,"Quad.easeInOut":h.InOut,"Cubic.easeInOut":r.InOut,"Quart.easeInOut":s.InOut,"Quint.easeInOut":l.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":e.InOut,"Circ.easeInOut":a.InOut,"Elastic.easeInOut":n.InOut,"Back.easeInOut":o.InOut,"Bounce.easeInOut":v.InOut}},1639:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=1.70158),t*t*((a+1)*t-a)};c.exports=m},50099:c=>{/** + */var m=function(t,o){return o===void 0&&(o=1.70158),t*t*((o+1)*t-o)};c.exports=m},50099:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=1.70158);var v=a*1.525;return(t*=2)<1?.5*(t*t*((v+1)*t-v)):.5*((t-=2)*t*((v+1)*t+v)+2)};c.exports=m},41286:c=>{/** + */var m=function(t,o){o===void 0&&(o=1.70158);var v=o*1.525;return(t*=2)<1?.5*(t*t*((v+1)*t-v)):.5*((t-=2)*t*((v+1)*t+v)+2)};c.exports=m},41286:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=1.70158),--t*t*((a+1)*t+a)+1};c.exports=m},54178:(c,m,t)=>{/** + */var m=function(t,o){return o===void 0&&(o=1.70158),--t*t*((o+1)*t+o)+1};c.exports=m},54178:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3949,7 +3949,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=!1;return t<.5?(t=1-t*2,a=!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,a?(1-t)*.5:t*.5+.5};c.exports=m},69905:c=>{/** + */var m=function(t){var o=!1;return t<.5?(t=1-t*2,o=!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,o?(1-t)*.5:t*.5+.5};c.exports=m},69905:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3993,15 +3993,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(a===void 0&&(a=.1),v===void 0&&(v=.1),t===0)return 0;if(t===1)return 1;var o=v/4;return a<1?a=1:o=v*Math.asin(1/a)/(2*Math.PI),-(a*Math.pow(2,10*(t-=1))*Math.sin((t-o)*(2*Math.PI)/v))};c.exports=m},50665:c=>{/** + */var m=function(t,o,v){if(o===void 0&&(o=.1),v===void 0&&(v=.1),t===0)return 0;if(t===1)return 1;var a=v/4;return o<1?o=1:a=v*Math.asin(1/o)/(2*Math.PI),-(o*Math.pow(2,10*(t-=1))*Math.sin((t-a)*(2*Math.PI)/v))};c.exports=m},50665:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(a===void 0&&(a=.1),v===void 0&&(v=.1),t===0)return 0;if(t===1)return 1;var o=v/4;return a<1?a=1:o=v*Math.asin(1/a)/(2*Math.PI),(t*=2)<1?-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t-o)*(2*Math.PI)/v)):a*Math.pow(2,-10*(t-=1))*Math.sin((t-o)*(2*Math.PI)/v)*.5+1};c.exports=m},7744:c=>{/** + */var m=function(t,o,v){if(o===void 0&&(o=.1),v===void 0&&(v=.1),t===0)return 0;if(t===1)return 1;var a=v/4;return o<1?o=1:a=v*Math.asin(1/o)/(2*Math.PI),(t*=2)<1?-.5*(o*Math.pow(2,10*(t-=1))*Math.sin((t-a)*(2*Math.PI)/v)):o*Math.pow(2,-10*(t-=1))*Math.sin((t-a)*(2*Math.PI)/v)*.5+1};c.exports=m},7744:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(a===void 0&&(a=.1),v===void 0&&(v=.1),t===0)return 0;if(t===1)return 1;var o=v/4;return a<1?a=1:o=v*Math.asin(1/a)/(2*Math.PI),a*Math.pow(2,-10*t)*Math.sin((t-o)*(2*Math.PI)/v)+1};c.exports=m},99140:(c,m,t)=>{/** + */var m=function(t,o,v){if(o===void 0&&(o=.1),v===void 0&&(v=.1),t===0)return 0;if(t===1)return 1;var a=v/4;return o<1?o=1:a=v*Math.asin(1/o)/(2*Math.PI),o*Math.pow(2,-10*t)*Math.sin((t-a)*(2*Math.PI)/v)+1};c.exports=m},99140:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4101,7 +4101,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=1),t<=0?0:t>=1?1:((a*t|0)+1)*(1/a)};c.exports=m},49752:(c,m,t)=>{/** + */var m=function(t,o){return o===void 0&&(o=1),t<=0?0:t>=1?1:((o*t|0)+1)*(1/o)};c.exports=m},49752:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4109,23 +4109,23 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=1e-4),Math.ceil(t-a)};c.exports=m},43855:c=>{/** + */var m=function(t,o){return o===void 0&&(o=1e-4),Math.ceil(t-o)};c.exports=m},43855:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return v===void 0&&(v=1e-4),Math.abs(t-a){/** + */var m=function(t,o,v){return v===void 0&&(v=1e-4),Math.abs(t-o){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=1e-4),Math.floor(t+a)};c.exports=m},5470:c=>{/** + */var m=function(t,o){return o===void 0&&(o=1e-4),Math.floor(t+o)};c.exports=m},5470:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return v===void 0&&(v=1e-4),t>a-v};c.exports=m},94977:c=>{/** + */var m=function(t,o,v){return v===void 0&&(v=1e-4),t>o-v};c.exports=m},94977:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return v===void 0&&(v=1e-4),t{/** + */var m=function(t,o,v){return v===void 0&&(v=1e-4),t{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4133,35 +4133,35 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=t(79291),o={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)};o=v(!1,o,a),c.exports=o},89318:(c,m,t)=>{/** + */var o=t(36383),v=t(79291),a={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)};a=v(!1,a,o),c.exports=a},89318:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(85710),v=function(o,r){for(var n=0,e=o.length-1,i=0;i<=e;i++)n+=Math.pow(1-r,e-i)*Math.pow(r,i)*o[i]*a(e,i);return n};c.exports=v},77259:(c,m,t)=>{/** + */var o=t(85710),v=function(a,r){for(var n=0,e=a.length-1,i=0;i<=e;i++)n+=Math.pow(1-r,e-i)*Math.pow(r,i)*a[i]*o(e,i);return n};c.exports=v},77259:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87842),v=function(o,r){var n=o.length-1,e=n*r,i=Math.floor(e);return o[0]===o[n]?(r<0&&(i=Math.floor(e=n*(1+r))),a(e-i,o[(i-1+n)%n],o[i],o[(i+1)%n],o[(i+2)%n])):r<0?o[0]-(a(-e,o[0],o[0],o[1],o[1])-o[0]):r>1?o[n]-(a(e-n,o[n],o[n],o[n-1],o[n-1])-o[n]):a(e-i,o[i?i-1:0],o[i],o[n{/** + */var o=t(87842),v=function(a,r){var n=a.length-1,e=n*r,i=Math.floor(e);return a[0]===a[n]?(r<0&&(i=Math.floor(e=n*(1+r))),o(e-i,a[(i-1+n)%n],a[i],a[(i+1)%n],a[(i+2)%n])):r<0?a[0]-(o(-e,a[0],a[0],a[1],a[1])-a[0]):r>1?a[n]-(o(e-n,a[n],a[n],a[n-1],a[n-1])-a[n]):o(e-i,a[i?i-1:0],a[i],a[n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function m(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 a(r,n){return 3*(1-r)*r*r*n}function v(r,n){return r*r*r*n}var o=function(r,n,e,i,h){return m(r,n)+t(r,e)+a(r,i)+v(r,h)};c.exports=o},28392:(c,m,t)=>{/** + */function m(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 o(r,n){return 3*(1-r)*r*r*n}function v(r,n){return r*r*r*n}var a=function(r,n,e,i,h){return m(r,n)+t(r,e)+o(r,i)+v(r,h)};c.exports=a},28392:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(28915),v=function(o,r){var n=o.length-1,e=n*r,i=Math.floor(e);return r<0?a(o[0],o[1],e):r>1?a(o[n],o[n-1],n-e):a(o[i],o[i+1>n?n:i+1],e-i)};c.exports=v},32112:c=>{/** + */var o=t(28915),v=function(a,r){var n=a.length-1,e=n*r,i=Math.floor(e);return r<0?o(a[0],a[1],e):r>1?o(a[n],a[n-1],n-e):o(a[i],a[i+1>n?n:i+1],e-i)};c.exports=v},32112:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function m(o,r){var n=1-o;return n*n*r}function t(o,r){return 2*(1-o)*o*r}function a(o,r){return o*o*r}var v=function(o,r,n,e){return m(o,r)+t(o,n)+a(o,e)};c.exports=v},47235:(c,m,t)=>{/** + */function m(a,r){var n=1-a;return n*n*r}function t(a,r){return 2*(1-a)*a*r}function o(a,r){return a*a*r}var v=function(a,r,n,e){return m(a,r)+t(a,n)+o(a,e)};c.exports=v},47235:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7602),v=function(o,r,n){return r+(n-r)*a(o,0,1)};c.exports=v},50178:(c,m,t)=>{/** + */var o=t(7602),v=function(a,r,n){return r+(n-r)*o(a,0,1)};c.exports=v},50178:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(54261),v=function(o,r,n){return r+(n-r)*a(o,0,1)};c.exports=v},38289:(c,m,t)=>{/** + */var o=t(54261),v=function(a,r,n){return r+(n-r)*o(a,0,1)};c.exports=v},38289:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4169,11 +4169,11 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=Math.log(t)/.6931471805599453;return 1<{/** + */var m=function(t){var o=Math.log(t)/.6931471805599453;return 1<{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t>0&&(t&t-1)===0&&a>0&&(a&a-1)===0};c.exports=m},81230:c=>{/** + */var m=function(t,o){return t>0&&(t&t-1)===0&&o>0&&(o&o-1)===0};c.exports=m},81230:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4185,19 +4185,19 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({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 o=2091639*this.s0+this.c*23283064365386963e-26;return this.c=o|0,this.s0=this.s1,this.s1=this.s2,this.s2=o-this.c,this.s2},hash:function(o){var r,n=this.n;o=o.toString();for(var e=0;e>>0,r-=n,r*=n,n=r>>>0,r-=n,n+=r*4294967296;return this.n=n,(n>>>0)*23283064365386963e-26},init:function(o){typeof o=="string"?this.state(o):this.sow(o)},sow:function(o){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!o)for(var r=0;r0;n--){var e=Math.floor(this.frac()*(n+1)),i=o[e];o[e]=o[n],o[n]=i}return o}});c.exports=v},63448:c=>{/** + */var o=t(83419),v=new o({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 a=2091639*this.s0+this.c*23283064365386963e-26;return this.c=a|0,this.s0=this.s1,this.s1=this.s2,this.s2=a-this.c,this.s2},hash:function(a){var r,n=this.n;a=a.toString();for(var e=0;e>>0,r-=n,r*=n,n=r>>>0,r-=n,n+=r*4294967296;return this.n=n,(n>>>0)*23283064365386963e-26},init:function(a){typeof a=="string"?this.state(a):this.sow(a)},sow:function(a){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!a)for(var r=0;r0;n--){var e=Math.floor(this.frac()*(n+1)),i=a[e];a[e]=a[n],a[n]=i}return a}});c.exports=v},63448:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return v===void 0&&(v=0),a===0?t:(t-=v,t=a*Math.ceil(t/a),o?(v+t)/a:v+t)};c.exports=m},56583:c=>{/** + */var m=function(t,o,v,a){return v===void 0&&(v=0),o===0?t:(t-=v,t=o*Math.ceil(t/o),a?(v+t)/o:v+t)};c.exports=m},56583:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return v===void 0&&(v=0),a===0?t:(t-=v,t=a*Math.floor(t/a),o?(v+t)/a:v+t)};c.exports=m},77720:c=>{/** + */var m=function(t,o,v,a){return v===void 0&&(v=0),o===0?t:(t-=v,t=o*Math.floor(t/o),a?(v+t)/o:v+t)};c.exports=m},77720:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return v===void 0&&(v=0),a===0?t:(t-=v,t=a*Math.round(t/a),o?(v+t)/a:v+t)};c.exports=m},73697:(c,m,t)=>{/** + */var m=function(t,o,v,a){return v===void 0&&(v=0),o===0?t:(t-=v,t=o*Math.round(t/o),a?(v+t)/o:v+t)};c.exports=m},73697:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4205,83 +4205,83 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */t(63595);var a=t(8054),v=t(79291),o={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)};o.Sound=t(23717),o=v(!1,o,a),c.exports=o,t.g.Phaser=o},71289:(c,m,t)=>{/** + */t(63595);var o=t(8054),v=t(79291),a={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)};a.Sound=t(23717),a=v(!1,a,o),c.exports=a,t.g.Phaser=a},71289:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(92209),o=t(88571),r=new a({Extends:o,Mixins:[v.Acceleration,v.Angular,v.Bounce,v.Collision,v.Debug,v.Drag,v.Enable,v.Friction,v.Gravity,v.Immovable,v.Mass,v.Pushable,v.Size,v.Velocity],initialize:function(e,i,h,s,l){o.call(this,e,i,h,s,l),this.body=null}});c.exports=r},86689:(c,m,t)=>{/** + */var o=t(83419),v=t(92209),a=t(88571),r=new o({Extends:a,Mixins:[v.Acceleration,v.Angular,v.Bounce,v.Collision,v.Debug,v.Drag,v.Enable,v.Friction,v.Gravity,v.Immovable,v.Mass,v.Pushable,v.Size,v.Velocity],initialize:function(e,i,h,s,l){a.call(this,e,i,h,s,l),this.body=null}});c.exports=r},86689:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(39506),o=t(20339),r=t(89774),n=t(66022),e=t(95540),i=t(46975),h=t(72441),s=t(47956),l=t(37277),f=t(44594),u=t(26099),d=t(82248),p=new a({initialize:function(y){this.scene=y,this.systems=y.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,y.sys.events.once(f.BOOT,this.boot,this),y.sys.events.on(f.START,this.start,this)},boot:function(){this.world=new d(this.scene,this.config),this.add=new n(this.world),this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new d(this.scene,this.config),this.add=new n(this.world));var g=this.systems.events;e(this.config,"customUpdate",!1)||g.on(f.UPDATE,this.world.update,this.world),g.on(f.POST_UPDATE,this.world.postUpdate,this.world),g.once(f.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(f.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(f.UPDATE,this.world.update,this.world)},getConfig:function(){var g=this.systems.game.config.physics,y=this.systems.settings.physics,x=i(e(y,"arcade",{}),e(g,"arcade",{}));return x},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(g,y,x,T,C){return x===void 0&&(x=null),T===void 0&&(T=null),C===void 0&&(C=x),this.world.collideObjects(g,y,x,T,C,!0)},collide:function(g,y,x,T,C){return x===void 0&&(x=null),T===void 0&&(T=null),C===void 0&&(C=x),this.world.collideObjects(g,y,x,T,C,!1)},collideTiles:function(g,y,x,T,C){return this.world.collideTiles(g,y,x,T,C)},overlapTiles:function(g,y,x,T,C){return this.world.overlapTiles(g,y,x,T,C)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(g,y,x,T,C,M){T===void 0&&(T=60);var w=Math.atan2(x-g.y,y-g.x);return g.body.acceleration.setToPolar(w,T),C!==void 0&&M!==void 0&&g.body.maxVelocity.set(C,M),w},accelerateToObject:function(g,y,x,T,C){return this.accelerateTo(g,y.x,y.y,x,T,C)},closest:function(g,y){y||(y=this.world.bodies.entries);for(var x=Number.MAX_VALUE,T=null,C=g.x,M=g.y,w=y.length,L=0;Lx&&(T=F,x=N)}}return T},moveTo:function(g,y,x,T,C){T===void 0&&(T=60),C===void 0&&(C=0);var M=Math.atan2(x-g.y,y-g.x);return C>0&&(T=o(g.x,g.y,y,x)/(C/1e3)),g.body.velocity.setToPolar(M,T),M},moveToObject:function(g,y,x,T){return this.moveTo(g,y.x,y.y,x,T)},velocityFromAngle:function(g,y,x){return y===void 0&&(y=60),x===void 0&&(x=new u),x.setToPolar(v(g),y)},velocityFromRotation:function(g,y,x){return y===void 0&&(y=60),x===void 0&&(x=new u),x.setToPolar(g,y)},overlapRect:function(g,y,x,T,C,M){return s(this.world,g,y,x,T,C,M)},overlapCirc:function(g,y,x,T,C){return h(this.world,g,y,x,T,C)},shutdown:function(){if(this.world){var g=this.systems.events;g.off(f.UPDATE,this.world.update,this.world),g.off(f.POST_UPDATE,this.world.postUpdate,this.world),g.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null,this._category=1}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});l.register("ArcadePhysics",p,"arcadePhysics"),c.exports=p},13759:(c,m,t)=>{/** + */var o=t(83419),v=t(39506),a=t(20339),r=t(89774),n=t(66022),e=t(95540),i=t(46975),h=t(72441),s=t(47956),l=t(37277),f=t(44594),u=t(26099),d=t(82248),p=new o({initialize:function(y){this.scene=y,this.systems=y.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,y.sys.events.once(f.BOOT,this.boot,this),y.sys.events.on(f.START,this.start,this)},boot:function(){this.world=new d(this.scene,this.config),this.add=new n(this.world),this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new d(this.scene,this.config),this.add=new n(this.world));var g=this.systems.events;e(this.config,"customUpdate",!1)||g.on(f.UPDATE,this.world.update,this.world),g.on(f.POST_UPDATE,this.world.postUpdate,this.world),g.once(f.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(f.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(f.UPDATE,this.world.update,this.world)},getConfig:function(){var g=this.systems.game.config.physics,y=this.systems.settings.physics,x=i(e(y,"arcade",{}),e(g,"arcade",{}));return x},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(g,y,x,C,P){return x===void 0&&(x=null),C===void 0&&(C=null),P===void 0&&(P=x),this.world.collideObjects(g,y,x,C,P,!0)},collide:function(g,y,x,C,P){return x===void 0&&(x=null),C===void 0&&(C=null),P===void 0&&(P=x),this.world.collideObjects(g,y,x,C,P,!1)},collideTiles:function(g,y,x,C,P){return this.world.collideTiles(g,y,x,C,P)},overlapTiles:function(g,y,x,C,P){return this.world.overlapTiles(g,y,x,C,P)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(g,y,x,C,P,M){C===void 0&&(C=60);var w=Math.atan2(x-g.y,y-g.x);return g.body.acceleration.setToPolar(w,C),P!==void 0&&M!==void 0&&g.body.maxVelocity.set(P,M),w},accelerateToObject:function(g,y,x,C,P){return this.accelerateTo(g,y.x,y.y,x,C,P)},closest:function(g,y){y||(y=this.world.bodies.entries);for(var x=Number.MAX_VALUE,C=null,P=g.x,M=g.y,w=y.length,I=0;Ix&&(C=L,x=N)}}return C},moveTo:function(g,y,x,C,P){C===void 0&&(C=60),P===void 0&&(P=0);var M=Math.atan2(x-g.y,y-g.x);return P>0&&(C=a(g.x,g.y,y,x)/(P/1e3)),g.body.velocity.setToPolar(M,C),M},moveToObject:function(g,y,x,C){return this.moveTo(g,y.x,y.y,x,C)},velocityFromAngle:function(g,y,x){return y===void 0&&(y=60),x===void 0&&(x=new u),x.setToPolar(v(g),y)},velocityFromRotation:function(g,y,x){return y===void 0&&(y=60),x===void 0&&(x=new u),x.setToPolar(g,y)},overlapRect:function(g,y,x,C,P,M){return s(this.world,g,y,x,C,P,M)},overlapCirc:function(g,y,x,C,P){return h(this.world,g,y,x,C,P)},shutdown:function(){if(this.world){var g=this.systems.events;g.off(f.UPDATE,this.world.update,this.world),g.off(f.POST_UPDATE,this.world.postUpdate,this.world),g.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null,this._category=1}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});l.register("ArcadePhysics",p,"arcadePhysics"),c.exports=p},13759:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(92209),o=t(68287),r=new a({Extends:o,Mixins:[v.Acceleration,v.Angular,v.Bounce,v.Collision,v.Debug,v.Drag,v.Enable,v.Friction,v.Gravity,v.Immovable,v.Mass,v.Pushable,v.Size,v.Velocity],initialize:function(e,i,h,s,l){o.call(this,e,i,h,s,l),this.body=null}});c.exports=r},37742:(c,m,t)=>{/** + */var o=t(83419),v=t(92209),a=t(68287),r=new o({Extends:a,Mixins:[v.Acceleration,v.Angular,v.Bounce,v.Collision,v.Debug,v.Drag,v.Enable,v.Friction,v.Gravity,v.Immovable,v.Mass,v.Pushable,v.Size,v.Velocity],initialize:function(e,i,h,s,l){a.call(this,e,i,h,s,l),this.body=null}});c.exports=r},37742:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(78389),o=t(37747),r=t(63012),n=t(43396),e=t(87841),i=t(37303),h=t(95829),s=t(26099),l=new a({Mixins:[v],initialize:function(u,d){var p=64,g=64,y={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},x=d!==void 0;x&&d.displayWidth&&(p=d.displayWidth,g=d.displayHeight),x||(d=y),this.world=u,this.gameObject=x?d:void 0,this.isBody=!0,this.transform={x:d.x,y:d.y,rotation:d.angle,scaleX:d.scaleX,scaleY:d.scaleY,displayOriginX:d.displayOriginX,displayOriginY:d.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 s,this.position=new s(d.x-d.scaleX*d.displayOriginX,d.y-d.scaleY*d.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=d.angle,this.preRotation=d.angle,this.width=p,this.height=g,this.sourceWidth=p,this.sourceHeight=g,d.frame&&(this.sourceWidth=d.frame.realWidth,this.sourceHeight=d.frame.realHeight),this.halfWidth=Math.abs(p/2),this.halfHeight=Math.abs(g/2),this.center=new s(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new s,this.newVelocity=new s,this.deltaMax=new s,this.acceleration=new s,this.allowDrag=!0,this.drag=new s,this.allowGravity=!0,this.gravity=new s,this.bounce=new s,this.worldBounce=null,this.customBoundsRectangle=u.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new s(1e4,1e4),this.maxSpeed=-1,this.friction=new s(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=o.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new s(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=h(!1),this.touching=h(!0),this.wasTouching=h(!0),this.blocked=h(!0),this.syncBounds=!1,this.physicsType=o.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=d.scaleX,this._sy=d.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 f=this.gameObject,u=this.transform;if(f.parentContainer){var d=f.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);u.x=d.tx,u.y=d.ty,u.rotation=n(d.rotation),u.scaleX=d.scaleX,u.scaleY=d.scaleY,u.displayOriginX=f.displayOriginX,u.displayOriginY=f.displayOriginY}else u.x=f.x,u.y=f.y,u.rotation=f.angle,u.scaleX=f.scaleX,u.scaleY=f.scaleY,u.displayOriginX=f.displayOriginX,u.displayOriginY=f.displayOriginY;var p=!1;if(this.syncBounds){var g=f.getBounds(this._bounds);this.width=g.width,this.height=g.height,p=!0}else{var y=Math.abs(u.scaleX),x=Math.abs(u.scaleY);(this._sx!==y||this._sy!==x)&&(this.width=this.sourceWidth*y,this.height=this.sourceHeight*x,this._sx=y,this._sy=x,p=!0)}p&&(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 f=this.transform;this.position.x=f.x+f.scaleX*(this.offset.x-f.displayOriginX),this.position.y=f.y+f.scaleY*(this.offset.y-f.displayOriginY),this.updateCenter()},resetFlags:function(f){f===void 0&&(f=!1);var u=this.wasTouching,d=this.touching,p=this.blocked;f?h(!0,u):(u.none=d.none,u.up=d.up,u.down=d.down,u.left=d.left,u.right=d.right),h(!0,d),h(!0,p),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(f,u){if(f&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var d=this.position;this.prev.x=d.x,this.prev.y=d.y,this.prevFrame.x=d.x,this.prevFrame.y=d.y}f&&this.update(u)},update:function(f){var u=this.prev,d=this.position,p=this.velocity;if(u.set(d.x,d.y),!this.moves){this._dx=d.x-u.x,this._dy=d.y-u.y;return}if(this.directControl){var g=this.autoFrame;p.set((d.x-g.x)/f,(d.y-g.y)/f),this.world.updateMotion(this,f),this._dx=d.x-g.x,this._dy=d.y-g.y}else this.world.updateMotion(this,f),this.newVelocity.set(p.x*f,p.y*f),d.add(this.newVelocity),this._dx=d.x-u.x,this._dy=d.y-u.y;var y=p.x,x=p.y;if(this.updateCenter(),this.angle=Math.atan2(x,y),this.speed=Math.sqrt(y*y+x*x),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var T=this.blocked;this.world.emit(r.WORLD_BOUNDS,this,T.up,T.down,T.left,T.right)}},postUpdate:function(){var f=this.position,u=f.x-this.prevFrame.x,d=f.y-this.prevFrame.y,p=this.gameObject;if(this.moves){var g=this.deltaMax.x,y=this.deltaMax.y;g!==0&&u!==0&&(u<0&&u<-g?u=-g:u>0&&u>g&&(u=g)),y!==0&&d!==0&&(d<0&&d<-y?d=-y:d>0&&d>y&&(d=y)),p&&(p.x+=u,p.y+=d)}u<0?this.facing=o.FACING_LEFT:u>0&&(this.facing=o.FACING_RIGHT),d<0?this.facing=o.FACING_UP:d>0&&(this.facing=o.FACING_DOWN),this.allowRotation&&p&&(p.angle+=this.deltaZ()),this._tx=u,this._ty=d,this.autoFrame.set(f.x,f.y)},setBoundsRectangle:function(f){return this.customBoundsRectangle=f||this.world.bounds,this},checkWorldBounds:function(){var f=this.position,u=this.velocity,d=this.blocked,p=this.customBoundsRectangle,g=this.world.checkCollision,y=this.worldBounce?-this.worldBounce.x:-this.bounce.x,x=this.worldBounce?-this.worldBounce.y:-this.bounce.y,T=!1;return f.xp.right&&g.right&&(f.x=p.right-this.width,u.x*=y,d.right=!0,T=!0),f.yp.bottom&&g.down&&(f.y=p.bottom-this.height,u.y*=x,d.down=!0,T=!0),T&&(this.blocked.none=!1,this.updateCenter()),T},setOffset:function(f,u){return u===void 0&&(u=f),this.offset.set(f,u),this},setGameObject:function(f,u){return u===void 0&&(u=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=f,f.body&&(f.body=this),this.setSize(),this.world.add(this),this.enable=u,this},setSize:function(f,u,d){d===void 0&&(d=!0);var p=this.gameObject;if(p&&(!f&&p.frame&&(f=p.frame.realWidth),!u&&p.frame&&(u=p.frame.realHeight)),this.sourceWidth=f,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(),d&&p&&p.getCenter){var g=(p.width-f)/2,y=(p.height-u)/2;this.offset.set(g,y)}return this.isCircle=!1,this.radius=0,this},setCircle:function(f,u,d){return u===void 0&&(u=this.offset.x),d===void 0&&(d=this.offset.y),f>0?(this.isCircle=!0,this.radius=f,this.sourceWidth=f*2,this.sourceHeight=f*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,d),this.updateCenter()):this.isCircle=!1,this},reset:function(f,u){this.stop();var d=this.gameObject;d&&(d.setPosition(f,u),this.rotation=d.angle,this.preRotation=d.angle);var p=this.position;d&&d.getTopLeft?d.getTopLeft(p):p.set(f,u),this.prev.copy(p),this.prevFrame.copy(p),this.autoFrame.copy(p),d&&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(f){return f.x=this.x,f.y=this.y,f.right=this.right,f.bottom=this.bottom,f},hitTest:function(f,u){if(!this.isCircle)return i(this,f,u);if(this.radius>0&&f>=this.left&&f<=this.right&&u>=this.top&&u<=this.bottom){var d=(this.center.x-f)*(this.center.x-f),p=(this.center.y-u)*(this.center.y-u);return d+p<=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(f){var u=this.position,d=u.x+this.halfWidth,p=u.y+this.halfHeight;this.debugShowBody&&(f.lineStyle(f.defaultStrokeWidth,this.debugBodyColor),this.isCircle?f.strokeCircle(d,p,this.width/2):(this.checkCollision.up&&f.lineBetween(u.x,u.y,u.x+this.width,u.y),this.checkCollision.right&&f.lineBetween(u.x+this.width,u.y,u.x+this.width,u.y+this.height),this.checkCollision.down&&f.lineBetween(u.x,u.y+this.height,u.x+this.width,u.y+this.height),this.checkCollision.left&&f.lineBetween(u.x,u.y,u.x,u.y+this.height))),this.debugShowVelocity&&(f.lineStyle(f.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),f.lineBetween(d,p,d+this.velocity.x/2,p+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(f){return f===void 0&&(f=!0),this.directControl=f,this},setCollideWorldBounds:function(f,u,d,p){f===void 0&&(f=!0),this.collideWorldBounds=f;var g=u!==void 0,y=d!==void 0;return(g||y)&&(this.worldBounce||(this.worldBounce=new s),g&&(this.worldBounce.x=u),y&&(this.worldBounce.y=d)),p!==void 0&&(this.onWorldBounds=p),this},setVelocity:function(f,u){return this.velocity.set(f,u),f=this.velocity.x,u=this.velocity.y,this.speed=Math.sqrt(f*f+u*u),this},setVelocityX:function(f){return this.setVelocity(f,this.velocity.y)},setVelocityY:function(f){return this.setVelocity(this.velocity.x,f)},setMaxVelocity:function(f,u){return this.maxVelocity.set(f,u),this},setMaxVelocityX:function(f){return this.maxVelocity.x=f,this},setMaxVelocityY:function(f){return this.maxVelocity.y=f,this},setMaxSpeed:function(f){return this.maxSpeed=f,this},setSlideFactor:function(f,u){return this.slideFactor.set(f,u),this},setBounce:function(f,u){return this.bounce.set(f,u),this},setBounceX:function(f){return this.bounce.x=f,this},setBounceY:function(f){return this.bounce.y=f,this},setAcceleration:function(f,u){return this.acceleration.set(f,u),this},setAccelerationX:function(f){return this.acceleration.x=f,this},setAccelerationY:function(f){return this.acceleration.y=f,this},setAllowDrag:function(f){return f===void 0&&(f=!0),this.allowDrag=f,this},setAllowGravity:function(f){return f===void 0&&(f=!0),this.allowGravity=f,this},setAllowRotation:function(f){return f===void 0&&(f=!0),this.allowRotation=f,this},setDrag:function(f,u){return this.drag.set(f,u),this},setDamping:function(f){return this.useDamping=f,this},setDragX:function(f){return this.drag.x=f,this},setDragY:function(f){return this.drag.y=f,this},setGravity:function(f,u){return this.gravity.set(f,u),this},setGravityX:function(f){return this.gravity.x=f,this},setGravityY:function(f){return this.gravity.y=f,this},setFriction:function(f,u){return this.friction.set(f,u),this},setFrictionX:function(f){return this.friction.x=f,this},setFrictionY:function(f){return this.friction.y=f,this},setAngularVelocity:function(f){return this.angularVelocity=f,this},setAngularAcceleration:function(f){return this.angularAcceleration=f,this},setAngularDrag:function(f){return this.angularDrag=f,this},setMass:function(f){return this.mass=f,this},setImmovable:function(f){return f===void 0&&(f=!0),this.immovable=f,this},setEnable:function(f){return f===void 0&&(f=!0),this.enable=f,this},processX:function(f,u,d,p){this.x+=f,this.updateCenter(),u!==null&&(this.velocity.x=u*this.slideFactor.x);var g=this.blocked;d&&(g.left=!0,g.none=!1),p&&(g.right=!0,g.none=!1)},processY:function(f,u,d,p){this.y+=f,this.updateCenter(),u!==null&&(this.velocity.y=u*this.slideFactor.y);var g=this.blocked;d&&(g.up=!0,g.none=!1),p&&(g.down=!0,g.none=!1)},x:{get:function(){return this.position.x},set:function(f){this.position.x=f}},y:{get:function(){return this.position.y},set:function(f){this.position.y=f}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});c.exports=l},79342:(c,m,t)=>{/** + */var o=t(83419),v=t(78389),a=t(37747),r=t(63012),n=t(43396),e=t(87841),i=t(37303),h=t(95829),s=t(26099),l=new o({Mixins:[v],initialize:function(u,d){var p=64,g=64,y={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},x=d!==void 0;x&&d.displayWidth&&(p=d.displayWidth,g=d.displayHeight),x||(d=y),this.world=u,this.gameObject=x?d:void 0,this.isBody=!0,this.transform={x:d.x,y:d.y,rotation:d.angle,scaleX:d.scaleX,scaleY:d.scaleY,displayOriginX:d.displayOriginX,displayOriginY:d.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 s,this.position=new s(d.x-d.scaleX*d.displayOriginX,d.y-d.scaleY*d.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=d.angle,this.preRotation=d.angle,this.width=p,this.height=g,this.sourceWidth=p,this.sourceHeight=g,d.frame&&(this.sourceWidth=d.frame.realWidth,this.sourceHeight=d.frame.realHeight),this.halfWidth=Math.abs(p/2),this.halfHeight=Math.abs(g/2),this.center=new s(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new s,this.newVelocity=new s,this.deltaMax=new s,this.acceleration=new s,this.allowDrag=!0,this.drag=new s,this.allowGravity=!0,this.gravity=new s,this.bounce=new s,this.worldBounce=null,this.customBoundsRectangle=u.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new s(1e4,1e4),this.maxSpeed=-1,this.friction=new s(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=a.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new s(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=h(!1),this.touching=h(!0),this.wasTouching=h(!0),this.blocked=h(!0),this.syncBounds=!1,this.physicsType=a.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=d.scaleX,this._sy=d.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 f=this.gameObject,u=this.transform;if(f.parentContainer){var d=f.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);u.x=d.tx,u.y=d.ty,u.rotation=n(d.rotation),u.scaleX=d.scaleX,u.scaleY=d.scaleY,u.displayOriginX=f.displayOriginX,u.displayOriginY=f.displayOriginY}else u.x=f.x,u.y=f.y,u.rotation=f.angle,u.scaleX=f.scaleX,u.scaleY=f.scaleY,u.displayOriginX=f.displayOriginX,u.displayOriginY=f.displayOriginY;var p=!1;if(this.syncBounds){var g=f.getBounds(this._bounds);this.width=g.width,this.height=g.height,p=!0}else{var y=Math.abs(u.scaleX),x=Math.abs(u.scaleY);(this._sx!==y||this._sy!==x)&&(this.width=this.sourceWidth*y,this.height=this.sourceHeight*x,this._sx=y,this._sy=x,p=!0)}p&&(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 f=this.transform;this.position.x=f.x+f.scaleX*(this.offset.x-f.displayOriginX),this.position.y=f.y+f.scaleY*(this.offset.y-f.displayOriginY),this.updateCenter()},resetFlags:function(f){f===void 0&&(f=!1);var u=this.wasTouching,d=this.touching,p=this.blocked;f?h(!0,u):(u.none=d.none,u.up=d.up,u.down=d.down,u.left=d.left,u.right=d.right),h(!0,d),h(!0,p),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(f,u){if(f&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var d=this.position;this.prev.x=d.x,this.prev.y=d.y,this.prevFrame.x=d.x,this.prevFrame.y=d.y}f&&this.update(u)},update:function(f){var u=this.prev,d=this.position,p=this.velocity;if(u.set(d.x,d.y),!this.moves){this._dx=d.x-u.x,this._dy=d.y-u.y;return}if(this.directControl){var g=this.autoFrame;p.set((d.x-g.x)/f,(d.y-g.y)/f),this.world.updateMotion(this,f),this._dx=d.x-g.x,this._dy=d.y-g.y}else this.world.updateMotion(this,f),this.newVelocity.set(p.x*f,p.y*f),d.add(this.newVelocity),this._dx=d.x-u.x,this._dy=d.y-u.y;var y=p.x,x=p.y;if(this.updateCenter(),this.angle=Math.atan2(x,y),this.speed=Math.sqrt(y*y+x*x),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var C=this.blocked;this.world.emit(r.WORLD_BOUNDS,this,C.up,C.down,C.left,C.right)}},postUpdate:function(){var f=this.position,u=f.x-this.prevFrame.x,d=f.y-this.prevFrame.y,p=this.gameObject;if(this.moves){var g=this.deltaMax.x,y=this.deltaMax.y;g!==0&&u!==0&&(u<0&&u<-g?u=-g:u>0&&u>g&&(u=g)),y!==0&&d!==0&&(d<0&&d<-y?d=-y:d>0&&d>y&&(d=y)),p&&(p.x+=u,p.y+=d)}u<0?this.facing=a.FACING_LEFT:u>0&&(this.facing=a.FACING_RIGHT),d<0?this.facing=a.FACING_UP:d>0&&(this.facing=a.FACING_DOWN),this.allowRotation&&p&&(p.angle+=this.deltaZ()),this._tx=u,this._ty=d,this.autoFrame.set(f.x,f.y)},setBoundsRectangle:function(f){return this.customBoundsRectangle=f||this.world.bounds,this},checkWorldBounds:function(){var f=this.position,u=this.velocity,d=this.blocked,p=this.customBoundsRectangle,g=this.world.checkCollision,y=this.worldBounce?-this.worldBounce.x:-this.bounce.x,x=this.worldBounce?-this.worldBounce.y:-this.bounce.y,C=!1;return f.xp.right&&g.right&&(f.x=p.right-this.width,u.x*=y,d.right=!0,C=!0),f.yp.bottom&&g.down&&(f.y=p.bottom-this.height,u.y*=x,d.down=!0,C=!0),C&&(this.blocked.none=!1,this.updateCenter()),C},setOffset:function(f,u){return u===void 0&&(u=f),this.offset.set(f,u),this},setGameObject:function(f,u){return u===void 0&&(u=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=f,f.body&&(f.body=this),this.setSize(),this.world.add(this),this.enable=u,this},setSize:function(f,u,d){d===void 0&&(d=!0);var p=this.gameObject;if(p&&(!f&&p.frame&&(f=p.frame.realWidth),!u&&p.frame&&(u=p.frame.realHeight)),this.sourceWidth=f,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(),d&&p&&p.getCenter){var g=(p.width-f)/2,y=(p.height-u)/2;this.offset.set(g,y)}return this.isCircle=!1,this.radius=0,this},setCircle:function(f,u,d){return u===void 0&&(u=this.offset.x),d===void 0&&(d=this.offset.y),f>0?(this.isCircle=!0,this.radius=f,this.sourceWidth=f*2,this.sourceHeight=f*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,d),this.updateCenter()):this.isCircle=!1,this},reset:function(f,u){this.stop();var d=this.gameObject;d&&(d.setPosition(f,u),this.rotation=d.angle,this.preRotation=d.angle);var p=this.position;d&&d.getTopLeft?d.getTopLeft(p):p.set(f,u),this.prev.copy(p),this.prevFrame.copy(p),this.autoFrame.copy(p),d&&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(f){return f.x=this.x,f.y=this.y,f.right=this.right,f.bottom=this.bottom,f},hitTest:function(f,u){if(!this.isCircle)return i(this,f,u);if(this.radius>0&&f>=this.left&&f<=this.right&&u>=this.top&&u<=this.bottom){var d=(this.center.x-f)*(this.center.x-f),p=(this.center.y-u)*(this.center.y-u);return d+p<=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(f){var u=this.position,d=u.x+this.halfWidth,p=u.y+this.halfHeight;this.debugShowBody&&(f.lineStyle(f.defaultStrokeWidth,this.debugBodyColor),this.isCircle?f.strokeCircle(d,p,this.width/2):(this.checkCollision.up&&f.lineBetween(u.x,u.y,u.x+this.width,u.y),this.checkCollision.right&&f.lineBetween(u.x+this.width,u.y,u.x+this.width,u.y+this.height),this.checkCollision.down&&f.lineBetween(u.x,u.y+this.height,u.x+this.width,u.y+this.height),this.checkCollision.left&&f.lineBetween(u.x,u.y,u.x,u.y+this.height))),this.debugShowVelocity&&(f.lineStyle(f.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),f.lineBetween(d,p,d+this.velocity.x/2,p+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(f){return f===void 0&&(f=!0),this.directControl=f,this},setCollideWorldBounds:function(f,u,d,p){f===void 0&&(f=!0),this.collideWorldBounds=f;var g=u!==void 0,y=d!==void 0;return(g||y)&&(this.worldBounce||(this.worldBounce=new s),g&&(this.worldBounce.x=u),y&&(this.worldBounce.y=d)),p!==void 0&&(this.onWorldBounds=p),this},setVelocity:function(f,u){return this.velocity.set(f,u),f=this.velocity.x,u=this.velocity.y,this.speed=Math.sqrt(f*f+u*u),this},setVelocityX:function(f){return this.setVelocity(f,this.velocity.y)},setVelocityY:function(f){return this.setVelocity(this.velocity.x,f)},setMaxVelocity:function(f,u){return this.maxVelocity.set(f,u),this},setMaxVelocityX:function(f){return this.maxVelocity.x=f,this},setMaxVelocityY:function(f){return this.maxVelocity.y=f,this},setMaxSpeed:function(f){return this.maxSpeed=f,this},setSlideFactor:function(f,u){return this.slideFactor.set(f,u),this},setBounce:function(f,u){return this.bounce.set(f,u),this},setBounceX:function(f){return this.bounce.x=f,this},setBounceY:function(f){return this.bounce.y=f,this},setAcceleration:function(f,u){return this.acceleration.set(f,u),this},setAccelerationX:function(f){return this.acceleration.x=f,this},setAccelerationY:function(f){return this.acceleration.y=f,this},setAllowDrag:function(f){return f===void 0&&(f=!0),this.allowDrag=f,this},setAllowGravity:function(f){return f===void 0&&(f=!0),this.allowGravity=f,this},setAllowRotation:function(f){return f===void 0&&(f=!0),this.allowRotation=f,this},setDrag:function(f,u){return this.drag.set(f,u),this},setDamping:function(f){return this.useDamping=f,this},setDragX:function(f){return this.drag.x=f,this},setDragY:function(f){return this.drag.y=f,this},setGravity:function(f,u){return this.gravity.set(f,u),this},setGravityX:function(f){return this.gravity.x=f,this},setGravityY:function(f){return this.gravity.y=f,this},setFriction:function(f,u){return this.friction.set(f,u),this},setFrictionX:function(f){return this.friction.x=f,this},setFrictionY:function(f){return this.friction.y=f,this},setAngularVelocity:function(f){return this.angularVelocity=f,this},setAngularAcceleration:function(f){return this.angularAcceleration=f,this},setAngularDrag:function(f){return this.angularDrag=f,this},setMass:function(f){return this.mass=f,this},setImmovable:function(f){return f===void 0&&(f=!0),this.immovable=f,this},setEnable:function(f){return f===void 0&&(f=!0),this.enable=f,this},processX:function(f,u,d,p){this.x+=f,this.updateCenter(),u!==null&&(this.velocity.x=u*this.slideFactor.x);var g=this.blocked;d&&(g.left=!0,g.none=!1),p&&(g.right=!0,g.none=!1)},processY:function(f,u,d,p){this.y+=f,this.updateCenter(),u!==null&&(this.velocity.y=u*this.slideFactor.y);var g=this.blocked;d&&(g.up=!0,g.none=!1),p&&(g.down=!0,g.none=!1)},x:{get:function(){return this.position.x},set:function(f){this.position.x=f}},y:{get:function(){return this.position.y},set:function(f){this.position.y=f}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});c.exports=l},79342:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e,i,h,s,l){this.world=r,this.name="",this.active=!0,this.overlapOnly=n,this.object1=e,this.object2=i,this.collideCallback=h,this.processCallback=s,this.callbackContext=l},setName:function(o){return this.name=o,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});c.exports=v},66022:(c,m,t)=>{/** + */var o=t(83419),v=new o({initialize:function(r,n,e,i,h,s,l){this.world=r,this.name="",this.active=!0,this.overlapOnly=n,this.object1=e,this.object2=i,this.collideCallback=h,this.processCallback=s,this.callbackContext=l},setName:function(a){return this.name=a,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});c.exports=v},66022:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(71289),v=t(13759),o=t(37742),r=t(83419),n=t(37747),e=t(60758),i=t(72624),h=t(71464),s=new r({initialize:function(f){this.world=f,this.scene=f.scene,this.sys=f.scene.sys},collider:function(l,f,u,d,p){return this.world.addCollider(l,f,u,d,p)},overlap:function(l,f,u,d,p){return this.world.addOverlap(l,f,u,d,p)},existing:function(l,f){var u=f?n.STATIC_BODY:n.DYNAMIC_BODY;return this.world.enableBody(l,u),l},staticImage:function(l,f,u,d){var p=new a(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.world.enableBody(p,n.STATIC_BODY),p},image:function(l,f,u,d){var p=new a(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.world.enableBody(p,n.DYNAMIC_BODY),p},staticSprite:function(l,f,u,d){var p=new v(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.sys.updateList.add(p),this.world.enableBody(p,n.STATIC_BODY),p},sprite:function(l,f,u,d){var p=new v(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.sys.updateList.add(p),this.world.enableBody(p,n.DYNAMIC_BODY),p},staticGroup:function(l,f){return this.sys.updateList.add(new h(this.world,this.world.scene,l,f))},group:function(l,f){return this.sys.updateList.add(new e(this.world,this.world.scene,l,f))},body:function(l,f,u,d){var p=new o(this.world);return p.position.set(l,f),u&&d&&p.setSize(u,d),this.world.add(p,n.DYNAMIC_BODY),p},staticBody:function(l,f,u,d){var p=new i(this.world);return p.position.set(l,f),u&&d&&p.setSize(u,d),this.world.add(p,n.STATIC_BODY),p},destroy:function(){this.world=null,this.scene=null,this.sys=null}});c.exports=s},79599:c=>{/** + */var o=t(71289),v=t(13759),a=t(37742),r=t(83419),n=t(37747),e=t(60758),i=t(72624),h=t(71464),s=new r({initialize:function(f){this.world=f,this.scene=f.scene,this.sys=f.scene.sys},collider:function(l,f,u,d,p){return this.world.addCollider(l,f,u,d,p)},overlap:function(l,f,u,d,p){return this.world.addOverlap(l,f,u,d,p)},existing:function(l,f){var u=f?n.STATIC_BODY:n.DYNAMIC_BODY;return this.world.enableBody(l,u),l},staticImage:function(l,f,u,d){var p=new o(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.world.enableBody(p,n.STATIC_BODY),p},image:function(l,f,u,d){var p=new o(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.world.enableBody(p,n.DYNAMIC_BODY),p},staticSprite:function(l,f,u,d){var p=new v(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.sys.updateList.add(p),this.world.enableBody(p,n.STATIC_BODY),p},sprite:function(l,f,u,d){var p=new v(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.sys.updateList.add(p),this.world.enableBody(p,n.DYNAMIC_BODY),p},staticGroup:function(l,f){return this.sys.updateList.add(new h(this.world,this.world.scene,l,f))},group:function(l,f){return this.sys.updateList.add(new e(this.world,this.world.scene,l,f))},body:function(l,f,u,d){var p=new a(this.world);return p.position.set(l,f),u&&d&&p.setSize(u,d),this.world.add(p,n.DYNAMIC_BODY),p},staticBody:function(l,f,u,d){var p=new i(this.world);return p.position.set(l,f),u&&d&&p.setSize(u,d),this.world.add(p,n.STATIC_BODY),p},destroy:function(){this.world=null,this.scene=null,this.sys=null}});c.exports=s},79599:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=0;if(!Array.isArray(t))a=t;else for(var v=0;v{/** + */var m=function(t){var o=0;if(!Array.isArray(t))o=t;else for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37747),v=function(o,r,n,e){var i=0,h=o.deltaAbsX()+r.deltaAbsX()+e;return o._dx===0&&r._dx===0?(o.embedded=!0,r.embedded=!0):o._dx>r._dx?(i=o.right-r.x,i>h&&!n||o.checkCollision.right===!1||r.checkCollision.left===!1?i=0:(o.touching.none=!1,o.touching.right=!0,r.touching.none=!1,r.touching.left=!0,r.physicsType===a.STATIC_BODY&&!n&&(o.blocked.none=!1,o.blocked.right=!0),o.physicsType===a.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.left=!0))):o._dxh&&!n||o.checkCollision.left===!1||r.checkCollision.right===!1?i=0:(o.touching.none=!1,o.touching.left=!0,r.touching.none=!1,r.touching.right=!0,r.physicsType===a.STATIC_BODY&&!n&&(o.blocked.none=!1,o.blocked.left=!0),o.physicsType===a.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.right=!0))),o.overlapX=i,r.overlapX=i,i};c.exports=v},45170:(c,m,t)=>{/** + */var o=t(37747),v=function(a,r,n,e){var i=0,h=a.deltaAbsX()+r.deltaAbsX()+e;return a._dx===0&&r._dx===0?(a.embedded=!0,r.embedded=!0):a._dx>r._dx?(i=a.right-r.x,i>h&&!n||a.checkCollision.right===!1||r.checkCollision.left===!1?i=0:(a.touching.none=!1,a.touching.right=!0,r.touching.none=!1,r.touching.left=!0,r.physicsType===o.STATIC_BODY&&!n&&(a.blocked.none=!1,a.blocked.right=!0),a.physicsType===o.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.left=!0))):a._dxh&&!n||a.checkCollision.left===!1||r.checkCollision.right===!1?i=0:(a.touching.none=!1,a.touching.left=!0,r.touching.none=!1,r.touching.right=!0,r.physicsType===o.STATIC_BODY&&!n&&(a.blocked.none=!1,a.blocked.left=!0),a.physicsType===o.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.right=!0))),a.overlapX=i,r.overlapX=i,i};c.exports=v},45170:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37747),v=function(o,r,n,e){var i=0,h=o.deltaAbsY()+r.deltaAbsY()+e;return o._dy===0&&r._dy===0?(o.embedded=!0,r.embedded=!0):o._dy>r._dy?(i=o.bottom-r.y,i>h&&!n||o.checkCollision.down===!1||r.checkCollision.up===!1?i=0:(o.touching.none=!1,o.touching.down=!0,r.touching.none=!1,r.touching.up=!0,r.physicsType===a.STATIC_BODY&&!n&&(o.blocked.none=!1,o.blocked.down=!0),o.physicsType===a.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.up=!0))):o._dyh&&!n||o.checkCollision.up===!1||r.checkCollision.down===!1?i=0:(o.touching.none=!1,o.touching.up=!0,r.touching.none=!1,r.touching.down=!0,r.physicsType===a.STATIC_BODY&&!n&&(o.blocked.none=!1,o.blocked.up=!0),o.physicsType===a.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.down=!0))),o.overlapY=i,r.overlapY=i,i};c.exports=v},60758:(c,m,t)=>{/** + */var o=t(37747),v=function(a,r,n,e){var i=0,h=a.deltaAbsY()+r.deltaAbsY()+e;return a._dy===0&&r._dy===0?(a.embedded=!0,r.embedded=!0):a._dy>r._dy?(i=a.bottom-r.y,i>h&&!n||a.checkCollision.down===!1||r.checkCollision.up===!1?i=0:(a.touching.none=!1,a.touching.down=!0,r.touching.none=!1,r.touching.up=!0,r.physicsType===o.STATIC_BODY&&!n&&(a.blocked.none=!1,a.blocked.down=!0),a.physicsType===o.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.up=!0))):a._dyh&&!n||a.checkCollision.up===!1||r.checkCollision.down===!1?i=0:(a.touching.none=!1,a.touching.up=!0,r.touching.none=!1,r.touching.down=!0,r.physicsType===o.STATIC_BODY&&!n&&(a.blocked.none=!1,a.blocked.up=!0),a.physicsType===o.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.down=!0))),a.overlapY=i,r.overlapY=i,i};c.exports=v},60758:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(13759),v=t(83419),o=t(78389),r=t(37747),n=t(95540),e=t(26479),i=t(41212),h=new v({Extends:e,Mixins:[o],initialize:function(l,f,u,d){if(!u&&!d)d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(i(u))d=u,u=null,d.internalCreateCallback=this.createCallbackHandler,d.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(u)&&i(u[0])){var p=this;u.forEach(function(g){g.internalCreateCallback=p.createCallbackHandler,g.internalRemoveCallback=p.removeCallbackHandler,g.classType=n(g,"classType",a)}),d=null}else d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=l,d&&(d.classType=n(d,"classType",a)),this.physicsType=r.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this.defaults={setCollideWorldBounds:n(d,"collideWorldBounds",!1),setBoundsRectangle:n(d,"customBoundsRectangle",null),setAccelerationX:n(d,"accelerationX",0),setAccelerationY:n(d,"accelerationY",0),setAllowDrag:n(d,"allowDrag",!0),setAllowGravity:n(d,"allowGravity",!0),setAllowRotation:n(d,"allowRotation",!0),setDamping:n(d,"useDamping",!1),setBounceX:n(d,"bounceX",0),setBounceY:n(d,"bounceY",0),setDragX:n(d,"dragX",0),setDragY:n(d,"dragY",0),setEnable:n(d,"enable",!0),setGravityX:n(d,"gravityX",0),setGravityY:n(d,"gravityY",0),setFrictionX:n(d,"frictionX",0),setFrictionY:n(d,"frictionY",0),setMaxSpeed:n(d,"maxSpeed",-1),setMaxVelocityX:n(d,"maxVelocityX",1e4),setMaxVelocityY:n(d,"maxVelocityY",1e4),setVelocityX:n(d,"velocityX",0),setVelocityY:n(d,"velocityY",0),setAngularVelocity:n(d,"angularVelocity",0),setAngularAcceleration:n(d,"angularAcceleration",0),setAngularDrag:n(d,"angularDrag",0),setMass:n(d,"mass",1),setImmovable:n(d,"immovable",!1)},e.call(this,f,u,d),this.type="PhysicsGroup"},createCallbackHandler:function(s){s.body||this.world.enableBody(s,r.DYNAMIC_BODY);var l=s.body;for(var f in this.defaults)l[f](this.defaults[f])},removeCallbackHandler:function(s){s.body&&this.world.disableBody(s)},setVelocity:function(s,l,f){f===void 0&&(f=0);for(var u=this.getChildren(),d=0;d{/** + */var o=t(13759),v=t(83419),a=t(78389),r=t(37747),n=t(95540),e=t(26479),i=t(41212),h=new v({Extends:e,Mixins:[a],initialize:function(l,f,u,d){if(!u&&!d)d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(i(u))d=u,u=null,d.internalCreateCallback=this.createCallbackHandler,d.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(u)&&i(u[0])){var p=this;u.forEach(function(g){g.internalCreateCallback=p.createCallbackHandler,g.internalRemoveCallback=p.removeCallbackHandler,g.classType=n(g,"classType",o)}),d=null}else d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=l,d&&(d.classType=n(d,"classType",o)),this.physicsType=r.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this.defaults={setCollideWorldBounds:n(d,"collideWorldBounds",!1),setBoundsRectangle:n(d,"customBoundsRectangle",null),setAccelerationX:n(d,"accelerationX",0),setAccelerationY:n(d,"accelerationY",0),setAllowDrag:n(d,"allowDrag",!0),setAllowGravity:n(d,"allowGravity",!0),setAllowRotation:n(d,"allowRotation",!0),setDamping:n(d,"useDamping",!1),setBounceX:n(d,"bounceX",0),setBounceY:n(d,"bounceY",0),setDragX:n(d,"dragX",0),setDragY:n(d,"dragY",0),setEnable:n(d,"enable",!0),setGravityX:n(d,"gravityX",0),setGravityY:n(d,"gravityY",0),setFrictionX:n(d,"frictionX",0),setFrictionY:n(d,"frictionY",0),setMaxSpeed:n(d,"maxSpeed",-1),setMaxVelocityX:n(d,"maxVelocityX",1e4),setMaxVelocityY:n(d,"maxVelocityY",1e4),setVelocityX:n(d,"velocityX",0),setVelocityY:n(d,"velocityY",0),setAngularVelocity:n(d,"angularVelocity",0),setAngularAcceleration:n(d,"angularAcceleration",0),setAngularDrag:n(d,"angularDrag",0),setMass:n(d,"mass",1),setImmovable:n(d,"immovable",!1)},e.call(this,f,u,d),this.type="PhysicsGroup"},createCallbackHandler:function(s){s.body||this.world.enableBody(s,r.DYNAMIC_BODY);var l=s.body;for(var f in this.defaults)l[f](this.defaults[f])},removeCallbackHandler:function(s){s.body&&this.world.disableBody(s)},setVelocity:function(s,l,f){f===void 0&&(f=0);for(var u=this.getChildren(),d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m,t,a,v,o,r,n,e,i,h,s,l,f,u,d,p,g,y=function(L,F,O){m=L,t=F;var N=m.velocity.x,G=t.velocity.x;return a=m.pushable,i=m._dx<0,h=m._dx>0,s=m._dx===0,d=Math.abs(m.right-t.x)<=Math.abs(t.right-m.x),n=G-N*m.bounce.x,v=t.pushable,l=t._dx<0,f=t._dx>0,u=t._dx===0,p=!d,e=N-G*t.bounce.x,g=Math.abs(O),x()},x=function(){return h&&d&&t.blocked.right?(m.processX(-g,n,!1,!0),1):i&&p&&t.blocked.left?(m.processX(g,n,!0),1):f&&p&&m.blocked.right?(t.processX(-g,e,!1,!0),2):l&&d&&m.blocked.left?(t.processX(g,e,!0),2):0},T=function(){var L=m.velocity.x,F=t.velocity.x,O=Math.sqrt(F*F*t.mass/m.mass)*(F>0?1:-1),N=Math.sqrt(L*L*m.mass/t.mass)*(L>0?1:-1),G=(O+N)*.5;return O-=G,N-=G,o=G+O*m.bounce.x,r=G+N*t.bounce.x,i&&p?C(0):l&&d?C(1):h&&d?C(2):f&&p?C(3):!1},C=function(L){if(a&&v)g*=.5,L===0||L===3?(m.processX(g,o),t.processX(-g,r)):(m.processX(-g,o),t.processX(g,r));else if(a&&!v)L===0||L===3?m.processX(g,n,!0):m.processX(-g,n,!1,!0);else if(!a&&v)L===0||L===3?t.processX(-g,e,!1,!0):t.processX(g,e,!0);else{var F=g*.5;L===0?u?(m.processX(g,0,!0),t.processX(0,null,!1,!0)):f?(m.processX(F,0,!0),t.processX(-F,0,!1,!0)):(m.processX(F,t.velocity.x,!0),t.processX(-F,null,!1,!0)):L===1?s?(m.processX(0,null,!1,!0),t.processX(g,0,!0)):h?(m.processX(-F,0,!1,!0),t.processX(F,0,!0)):(m.processX(-F,null,!1,!0),t.processX(F,m.velocity.x,!0)):L===2?u?(m.processX(-g,0,!1,!0),t.processX(0,null,!0)):l?(m.processX(-F,0,!1,!0),t.processX(F,0,!0)):(m.processX(-F,t.velocity.x,!1,!0),t.processX(F,null,!0)):L===3&&(s?(m.processX(0,null,!0),t.processX(-g,0,!1,!0)):i?(m.processX(F,0,!0),t.processX(-F,0,!1,!0)):(m.processX(F,t.velocity.y,!0),t.processX(-F,null,!1,!0)))}return!0},M=function(L){L===1?t.velocity.x=0:d?t.processX(g,e,!0):t.processX(-g,e,!1,!0),m.moves&&(t.y+=(m.y-m.prev.y)*m.friction.y,t._dy=t.y-t.prev.y)},w=function(L){L===2?m.velocity.x=0:p?m.processX(g,n,!0):m.processX(-g,n,!1,!0),t.moves&&(m.y+=(t.y-t.prev.y)*t.friction.y,m._dy=m.y-m.prev.y)};c.exports={BlockCheck:x,Check:T,Set:y,Run:C,RunImmovableBody1:M,RunImmovableBody2:w}},47962:c=>{/** + */var m,t,o,v,a,r,n,e,i,h,s,l,f,u,d,p,g,y=function(I,L,B){m=I,t=L;var N=m.velocity.x,G=t.velocity.x;return o=m.pushable,i=m._dx<0,h=m._dx>0,s=m._dx===0,d=Math.abs(m.right-t.x)<=Math.abs(t.right-m.x),n=G-N*m.bounce.x,v=t.pushable,l=t._dx<0,f=t._dx>0,u=t._dx===0,p=!d,e=N-G*t.bounce.x,g=Math.abs(B),x()},x=function(){return h&&d&&t.blocked.right?(m.processX(-g,n,!1,!0),1):i&&p&&t.blocked.left?(m.processX(g,n,!0),1):f&&p&&m.blocked.right?(t.processX(-g,e,!1,!0),2):l&&d&&m.blocked.left?(t.processX(g,e,!0),2):0},C=function(){var I=m.velocity.x,L=t.velocity.x,B=Math.sqrt(L*L*t.mass/m.mass)*(L>0?1:-1),N=Math.sqrt(I*I*m.mass/t.mass)*(I>0?1:-1),G=(B+N)*.5;return B-=G,N-=G,a=G+B*m.bounce.x,r=G+N*t.bounce.x,i&&p?P(0):l&&d?P(1):h&&d?P(2):f&&p?P(3):!1},P=function(I){if(o&&v)g*=.5,I===0||I===3?(m.processX(g,a),t.processX(-g,r)):(m.processX(-g,a),t.processX(g,r));else if(o&&!v)I===0||I===3?m.processX(g,n,!0):m.processX(-g,n,!1,!0);else if(!o&&v)I===0||I===3?t.processX(-g,e,!1,!0):t.processX(g,e,!0);else{var L=g*.5;I===0?u?(m.processX(g,0,!0),t.processX(0,null,!1,!0)):f?(m.processX(L,0,!0),t.processX(-L,0,!1,!0)):(m.processX(L,t.velocity.x,!0),t.processX(-L,null,!1,!0)):I===1?s?(m.processX(0,null,!1,!0),t.processX(g,0,!0)):h?(m.processX(-L,0,!1,!0),t.processX(L,0,!0)):(m.processX(-L,null,!1,!0),t.processX(L,m.velocity.x,!0)):I===2?u?(m.processX(-g,0,!1,!0),t.processX(0,null,!0)):l?(m.processX(-L,0,!1,!0),t.processX(L,0,!0)):(m.processX(-L,t.velocity.x,!1,!0),t.processX(L,null,!0)):I===3&&(s?(m.processX(0,null,!0),t.processX(-g,0,!1,!0)):i?(m.processX(L,0,!0),t.processX(-L,0,!1,!0)):(m.processX(L,t.velocity.y,!0),t.processX(-L,null,!1,!0)))}return!0},M=function(I){I===1?t.velocity.x=0:d?t.processX(g,e,!0):t.processX(-g,e,!1,!0),m.moves&&(t.y+=(m.y-m.prev.y)*m.friction.y,t._dy=t.y-t.prev.y)},w=function(I){I===2?m.velocity.x=0:p?m.processX(g,n,!0):m.processX(-g,n,!1,!0),t.moves&&(m.y+=(t.y-t.prev.y)*t.friction.y,m._dy=m.y-m.prev.y)};c.exports={BlockCheck:x,Check:C,Set:y,Run:P,RunImmovableBody1:M,RunImmovableBody2:w}},47962:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m,t,a,v,o,r,n,e,i,h,s,l,f,u,d,p,g,y=function(L,F,O){m=L,t=F;var N=m.velocity.y,G=t.velocity.y;return a=m.pushable,i=m._dy<0,h=m._dy>0,s=m._dy===0,d=Math.abs(m.bottom-t.y)<=Math.abs(t.bottom-m.y),n=G-N*m.bounce.y,v=t.pushable,l=t._dy<0,f=t._dy>0,u=t._dy===0,p=!d,e=N-G*t.bounce.y,g=Math.abs(O),x()},x=function(){return h&&d&&t.blocked.down?(m.processY(-g,n,!1,!0),1):i&&p&&t.blocked.up?(m.processY(g,n,!0),1):f&&p&&m.blocked.down?(t.processY(-g,e,!1,!0),2):l&&d&&m.blocked.up?(t.processY(g,e,!0),2):0},T=function(){var L=m.velocity.y,F=t.velocity.y,O=Math.sqrt(F*F*t.mass/m.mass)*(F>0?1:-1),N=Math.sqrt(L*L*m.mass/t.mass)*(L>0?1:-1),G=(O+N)*.5;return O-=G,N-=G,o=G+O*m.bounce.y,r=G+N*t.bounce.y,i&&p?C(0):l&&d?C(1):h&&d?C(2):f&&p?C(3):!1},C=function(L){if(a&&v)g*=.5,L===0||L===3?(m.processY(g,o),t.processY(-g,r)):(m.processY(-g,o),t.processY(g,r));else if(a&&!v)L===0||L===3?m.processY(g,n,!0):m.processY(-g,n,!1,!0);else if(!a&&v)L===0||L===3?t.processY(-g,e,!1,!0):t.processY(g,e,!0);else{var F=g*.5;L===0?u?(m.processY(g,0,!0),t.processY(0,null,!1,!0)):f?(m.processY(F,0,!0),t.processY(-F,0,!1,!0)):(m.processY(F,t.velocity.y,!0),t.processY(-F,null,!1,!0)):L===1?s?(m.processY(0,null,!1,!0),t.processY(g,0,!0)):h?(m.processY(-F,0,!1,!0),t.processY(F,0,!0)):(m.processY(-F,null,!1,!0),t.processY(F,m.velocity.y,!0)):L===2?u?(m.processY(-g,0,!1,!0),t.processY(0,null,!0)):l?(m.processY(-F,0,!1,!0),t.processY(F,0,!0)):(m.processY(-F,t.velocity.y,!1,!0),t.processY(F,null,!0)):L===3&&(s?(m.processY(0,null,!0),t.processY(-g,0,!1,!0)):i?(m.processY(F,0,!0),t.processY(-F,0,!1,!0)):(m.processY(F,t.velocity.y,!0),t.processY(-F,null,!1,!0)))}return!0},M=function(L){L===1?t.velocity.y=0:d?t.processY(g,e,!0):t.processY(-g,e,!1,!0),m.moves&&(t.x+=(m.x-m.prev.x)*m.friction.x,t._dx=t.x-t.prev.x)},w=function(L){L===2?m.velocity.y=0:p?m.processY(g,n,!0):m.processY(-g,n,!1,!0),t.moves&&(m.x+=(t.x-t.prev.x)*t.friction.x,m._dx=m.x-m.prev.x)};c.exports={BlockCheck:x,Check:T,Set:y,Run:C,RunImmovableBody1:M,RunImmovableBody2:w}},14087:(c,m,t)=>{/** + */var m,t,o,v,a,r,n,e,i,h,s,l,f,u,d,p,g,y=function(I,L,B){m=I,t=L;var N=m.velocity.y,G=t.velocity.y;return o=m.pushable,i=m._dy<0,h=m._dy>0,s=m._dy===0,d=Math.abs(m.bottom-t.y)<=Math.abs(t.bottom-m.y),n=G-N*m.bounce.y,v=t.pushable,l=t._dy<0,f=t._dy>0,u=t._dy===0,p=!d,e=N-G*t.bounce.y,g=Math.abs(B),x()},x=function(){return h&&d&&t.blocked.down?(m.processY(-g,n,!1,!0),1):i&&p&&t.blocked.up?(m.processY(g,n,!0),1):f&&p&&m.blocked.down?(t.processY(-g,e,!1,!0),2):l&&d&&m.blocked.up?(t.processY(g,e,!0),2):0},C=function(){var I=m.velocity.y,L=t.velocity.y,B=Math.sqrt(L*L*t.mass/m.mass)*(L>0?1:-1),N=Math.sqrt(I*I*m.mass/t.mass)*(I>0?1:-1),G=(B+N)*.5;return B-=G,N-=G,a=G+B*m.bounce.y,r=G+N*t.bounce.y,i&&p?P(0):l&&d?P(1):h&&d?P(2):f&&p?P(3):!1},P=function(I){if(o&&v)g*=.5,I===0||I===3?(m.processY(g,a),t.processY(-g,r)):(m.processY(-g,a),t.processY(g,r));else if(o&&!v)I===0||I===3?m.processY(g,n,!0):m.processY(-g,n,!1,!0);else if(!o&&v)I===0||I===3?t.processY(-g,e,!1,!0):t.processY(g,e,!0);else{var L=g*.5;I===0?u?(m.processY(g,0,!0),t.processY(0,null,!1,!0)):f?(m.processY(L,0,!0),t.processY(-L,0,!1,!0)):(m.processY(L,t.velocity.y,!0),t.processY(-L,null,!1,!0)):I===1?s?(m.processY(0,null,!1,!0),t.processY(g,0,!0)):h?(m.processY(-L,0,!1,!0),t.processY(L,0,!0)):(m.processY(-L,null,!1,!0),t.processY(L,m.velocity.y,!0)):I===2?u?(m.processY(-g,0,!1,!0),t.processY(0,null,!0)):l?(m.processY(-L,0,!1,!0),t.processY(L,0,!0)):(m.processY(-L,t.velocity.y,!1,!0),t.processY(L,null,!0)):I===3&&(s?(m.processY(0,null,!0),t.processY(-g,0,!1,!0)):i?(m.processY(L,0,!0),t.processY(-L,0,!1,!0)):(m.processY(L,t.velocity.y,!0),t.processY(-L,null,!1,!0)))}return!0},M=function(I){I===1?t.velocity.y=0:d?t.processY(g,e,!0):t.processY(-g,e,!1,!0),m.moves&&(t.x+=(m.x-m.prev.x)*m.friction.x,t._dx=t.x-t.prev.x)},w=function(I){I===2?m.velocity.y=0:p?m.processY(g,n,!0):m.processY(-g,n,!1,!0),t.moves&&(m.x+=(t.x-t.prev.x)*t.friction.x,m._dx=m.x-m.prev.x)};c.exports={BlockCheck:x,Check:C,Set:y,Run:P,RunImmovableBody1:M,RunImmovableBody2:w}},14087:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(64897),v=t(3017),o=function(r,n,e,i,h){h===void 0&&(h=a(r,n,e,i));var s=r.immovable,l=n.immovable;if(e||h===0||s&&l||r.customSeparateX||n.customSeparateX)return h!==0||r.embedded&&n.embedded;var f=v.Set(r,n,h);return!s&&!l?f>0?!0:v.Check():(s?v.RunImmovableBody1(f):l&&v.RunImmovableBody2(f),!0)};c.exports=o},89936:(c,m,t)=>{/** + */var o=t(64897),v=t(3017),a=function(r,n,e,i,h){h===void 0&&(h=o(r,n,e,i));var s=r.immovable,l=n.immovable;if(e||h===0||s&&l||r.customSeparateX||n.customSeparateX)return h!==0||r.embedded&&n.embedded;var f=v.Set(r,n,h);return!s&&!l?f>0?!0:v.Check():(s?v.RunImmovableBody1(f):l&&v.RunImmovableBody2(f),!0)};c.exports=a},89936:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45170),v=t(47962),o=function(r,n,e,i,h){h===void 0&&(h=a(r,n,e,i));var s=r.immovable,l=n.immovable;if(e||h===0||s&&l||r.customSeparateY||n.customSeparateY)return h!==0||r.embedded&&n.embedded;var f=v.Set(r,n,h);return!s&&!l?f>0?!0:v.Check():(s?v.RunImmovableBody1(f):l&&v.RunImmovableBody2(f),!0)};c.exports=o},95829:c=>{/** + */var o=t(45170),v=t(47962),a=function(r,n,e,i,h){h===void 0&&(h=o(r,n,e,i));var s=r.immovable,l=n.immovable;if(e||h===0||s&&l||r.customSeparateY||n.customSeparateY)return h!==0||r.embedded&&n.embedded;var f=v.Set(r,n,h);return!s&&!l?f>0?!0:v.Check():(s?v.RunImmovableBody1(f):l&&v.RunImmovableBody2(f),!0)};c.exports=a},95829:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a={}),a.none=t,a.up=!1,a.down=!1,a.left=!1,a.right=!1,t||(a.up=!0,a.down=!0,a.left=!0,a.right=!0),a};c.exports=m},72624:(c,m,t)=>{/** + */var m=function(t,o){return o===void 0&&(o={}),o.none=t,o.up=!1,o.down=!1,o.left=!1,o.right=!1,t||(o.up=!0,o.down=!0,o.left=!0,o.right=!0),o};c.exports=m},72624:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87902),v=t(83419),o=t(78389),r=t(37747),n=t(37303),e=t(95829),i=t(26099),h=new v({Mixins:[o],initialize:function(l,f){var u=64,d=64,p={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},g=f!==void 0;g&&f.displayWidth&&(u=f.displayWidth,d=f.displayHeight),g||(f=p),this.world=l,this.gameObject=g?f:void 0,this.isBody=!0,this.debugShowBody=l.defaults.debugShowStaticBody,this.debugBodyColor=l.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new i,this.position=new i(f.x-u*f.originX,f.y-d*f.originY),this.width=u,this.height=d,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new i(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=i.ZERO,this.allowGravity=!1,this.gravity=i.ZERO,this.bounce=i.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(s,l){return s&&s!==this.gameObject&&(this.gameObject.body=null,s.body=this,this.gameObject=s),l&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var s=this.gameObject;return s.getTopLeft(this.position),this.width=s.displayWidth,this.height=s.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(s,l){return l===void 0&&(l=s),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s,l),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(s,l,f){f===void 0&&(f=!0);var u=this.gameObject;if(u&&u.frame&&(s||(s=u.frame.realWidth),l||(l=u.frame.realHeight)),this.world.staticTree.remove(this),this.width=s,this.height=l,this.halfWidth=Math.floor(s/2),this.halfHeight=Math.floor(l/2),f&&u&&u.getCenter){var d=u.displayWidth/2,p=u.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(d-this.halfWidth,p-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(s,l,f){return l===void 0&&(l=this.offset.x),f===void 0&&(f=this.offset.y),s>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=s,this.width=s*2,this.height=s*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(l,f),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(s,l){var f=this.gameObject;s===void 0&&(s=f.x),l===void 0&&(l=f.y),this.world.staticTree.remove(this),f.setPosition(s,l),f.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(s){return s.x=this.x,s.y=this.y,s.right=this.right,s.bottom=this.bottom,s},hitTest:function(s,l){return this.isCircle?a(this,s,l):n(this,s,l)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(s){var l=this.position,f=l.x+this.halfWidth,u=l.y+this.halfHeight;this.debugShowBody&&(s.lineStyle(s.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?s.strokeCircle(f,u,this.width/2):s.strokeRect(l.x,l.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(s){return s<=0&&(s=.1),this.mass=s,this},x:{get:function(){return this.position.x},set:function(s){this.world.staticTree.remove(this),this.position.x=s,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(s){this.world.staticTree.remove(this),this.position.y=s,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});c.exports=h},71464:(c,m,t)=>{/** + */var o=t(87902),v=t(83419),a=t(78389),r=t(37747),n=t(37303),e=t(95829),i=t(26099),h=new v({Mixins:[a],initialize:function(l,f){var u=64,d=64,p={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},g=f!==void 0;g&&f.displayWidth&&(u=f.displayWidth,d=f.displayHeight),g||(f=p),this.world=l,this.gameObject=g?f:void 0,this.isBody=!0,this.debugShowBody=l.defaults.debugShowStaticBody,this.debugBodyColor=l.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new i,this.position=new i(f.x-u*f.originX,f.y-d*f.originY),this.width=u,this.height=d,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new i(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=i.ZERO,this.allowGravity=!1,this.gravity=i.ZERO,this.bounce=i.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(s,l){return s&&s!==this.gameObject&&(this.gameObject.body=null,s.body=this,this.gameObject=s),l&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var s=this.gameObject;return s.getTopLeft(this.position),this.width=s.displayWidth,this.height=s.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(s,l){return l===void 0&&(l=s),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s,l),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(s,l,f){f===void 0&&(f=!0);var u=this.gameObject;if(u&&u.frame&&(s||(s=u.frame.realWidth),l||(l=u.frame.realHeight)),this.world.staticTree.remove(this),this.width=s,this.height=l,this.halfWidth=Math.floor(s/2),this.halfHeight=Math.floor(l/2),f&&u&&u.getCenter){var d=u.displayWidth/2,p=u.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(d-this.halfWidth,p-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(s,l,f){return l===void 0&&(l=this.offset.x),f===void 0&&(f=this.offset.y),s>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=s,this.width=s*2,this.height=s*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(l,f),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(s,l){var f=this.gameObject;s===void 0&&(s=f.x),l===void 0&&(l=f.y),this.world.staticTree.remove(this),f.setPosition(s,l),f.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(s){return s.x=this.x,s.y=this.y,s.right=this.right,s.bottom=this.bottom,s},hitTest:function(s,l){return this.isCircle?o(this,s,l):n(this,s,l)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(s){var l=this.position,f=l.x+this.halfWidth,u=l.y+this.halfHeight;this.debugShowBody&&(s.lineStyle(s.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?s.strokeCircle(f,u,this.width/2):s.strokeRect(l.x,l.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(s){return s<=0&&(s=.1),this.mass=s,this},x:{get:function(){return this.position.x},set:function(s){this.world.staticTree.remove(this),this.position.x=s,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(s){this.world.staticTree.remove(this),this.position.y=s,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});c.exports=h},71464:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(13759),v=t(83419),o=t(78389),r=t(37747),n=t(95540),e=t(26479),i=t(41212),h=new v({Extends:e,Mixins:[o],initialize:function(l,f,u,d){!u&&!d?d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:a}:i(u)?(d=u,u=null,d.internalCreateCallback=this.createCallbackHandler,d.internalRemoveCallback=this.removeCallbackHandler,d.createMultipleCallback=this.createMultipleCallbackHandler,d.classType=n(d,"classType",a)):Array.isArray(u)&&i(u[0])?(d=u,u=null,d.forEach(function(p){p.internalCreateCallback=this.createCallbackHandler,p.internalRemoveCallback=this.removeCallbackHandler,p.createMultipleCallback=this.createMultipleCallbackHandler,p.classType=n(p,"classType",a)})):d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=l,this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,e.call(this,f,u,d),this.type="StaticPhysicsGroup"},createCallbackHandler:function(s){s.body||this.world.enableBody(s,r.STATIC_BODY)},removeCallbackHandler:function(s){s.body&&this.world.disableBody(s)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var s=this.children.entries,l=0;l{/** + */var o=t(13759),v=t(83419),a=t(78389),r=t(37747),n=t(95540),e=t(26479),i=t(41212),h=new v({Extends:e,Mixins:[a],initialize:function(l,f,u,d){!u&&!d?d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:o}:i(u)?(d=u,u=null,d.internalCreateCallback=this.createCallbackHandler,d.internalRemoveCallback=this.removeCallbackHandler,d.createMultipleCallback=this.createMultipleCallbackHandler,d.classType=n(d,"classType",o)):Array.isArray(u)&&i(u[0])?(d=u,u=null,d.forEach(function(p){p.internalCreateCallback=this.createCallbackHandler,p.internalRemoveCallback=this.removeCallbackHandler,p.createMultipleCallback=this.createMultipleCallbackHandler,p.classType=n(p,"classType",o)})):d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=l,this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,e.call(this,f,u,d),this.type="StaticPhysicsGroup"},createCallbackHandler:function(s){s.body||this.world.enableBody(s,r.STATIC_BODY)},removeCallbackHandler:function(s){s.body&&this.world.disableBody(s)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var s=this.children.entries,l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(55495),v=t(37742),o=t(45319),r=t(83419),n=t(79342),e=t(37747),i=t(20339),h=t(52816),s=t(50792),l=t(63012),f=t(43855),u=t(5470),d=t(94977),p=t(64897),g=t(45170),y=t(96523),x=t(35154),T=t(36383),C=t(25774),M=t(96602),w=t(87841),L=t(59542),F=t(40012),O=t(14087),N=t(89936),G=t(35072),V=t(72624),K=t(2483),$=t(61340),J=t(26099),X=t(15994),Y=new r({Extends:s,initialize:function(z,W){s.call(this),this.scene=z,this.bodies=new G,this.staticBodies=new G,this.pendingDestroy=new G,this.colliders=new C,this.gravity=new J(x(W,"gravity.x",0),x(W,"gravity.y",0)),this.bounds=new w(x(W,"x",0),x(W,"y",0),x(W,"width",z.sys.scale.width),x(W,"height",z.sys.scale.height)),this.checkCollision={up:x(W,"checkCollision.up",!0),down:x(W,"checkCollision.down",!0),left:x(W,"checkCollision.left",!0),right:x(W,"checkCollision.right",!0)},this.fps=x(W,"fps",60),this.fixedStep=x(W,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=x(W,"timeScale",1),this.OVERLAP_BIAS=x(W,"overlapBias",4),this.TILE_BIAS=x(W,"tileBias",16),this.forceX=x(W,"forceX",!1),this.isPaused=x(W,"isPaused",!1),this._total=0,this.drawDebug=x(W,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:x(W,"debugShowBody",!0),debugShowStaticBody:x(W,"debugShowStaticBody",!0),debugShowVelocity:x(W,"debugShowVelocity",!0),bodyDebugColor:x(W,"debugBodyColor",16711935),staticBodyDebugColor:x(W,"debugStaticBodyColor",255),velocityDebugColor:x(W,"debugVelocityColor",65280)},this.maxEntries=x(W,"maxEntries",16),this.useTree=x(W,"useTree",!0),this.tree=new L(this.maxEntries),this.staticTree=new L(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new $,this._tempMatrix2=new $,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(D,z){z===void 0&&(z=e.DYNAMIC_BODY),Array.isArray(D)||(D=[D]);for(var W=0;W=Z;for(this.fixedStep||(H=z*.001,et=!0,this._elapsed=0),W=0;W=Z;)this._elapsed-=Z,this.step(H)}},step:function(D){var z,W,H=this.bodies.entries,Z=H.length;for(z=0;z0){var st=this.tree,rt=this.staticTree;for(W=et.entries,H=W.length,D=0;D-1&&D.velocity.length()>ft&&(D.velocity.normalize().scale(ft),ot=ft),D.speed=ot},separate:function(D,z,W,H,Z){var Q,k,et=!1,st=!0;if(!D.enable||!z.enable||D.checkCollision.none||z.checkCollision.none||!this.intersects(D,z)||W&&W.call(H,D.gameObject,z.gameObject)===!1)return et;if(D.isCircle||z.isCircle){var rt=this.separateCircle(D,z,Z);rt.result?(et=!0,st=!1):(Q=rt.x,k=rt.y,st=!0)}if(st){var ot=!1,ft=!1,at=this.OVERLAP_BIAS;Z?(ot=O(D,z,Z,at,Q),ft=N(D,z,Z,at,k)):this.forceX||Math.abs(this.gravity.y+D.gravity.y)Tt&&(ft=i(vt,Pt,Tt,ct)-Ct):Pt>pt&&(vtTt&&(ft=i(vt,Pt,Tt,pt)-Ct)),ft*=-1}else ft=D.halfWidth+z.halfWidth-h(Q,k);D.overlapR=ft,z.overlapR=ft;var Mt=a(Q,k),It=(ft+T.EPSILON)*Math.cos(Mt),Kt=(ft+T.EPSILON)*Math.sin(Mt),Gt={overlap:ft,result:!1,x:It,y:Kt};if(W&&(!at||at&&ft!==0))return Gt.result=!0,Gt;if(!at&&ft===0||et&&st||D.customSeparateX||z.customSeparateX)return Gt.x=void 0,Gt.y=void 0,Gt;var Wt=!D.pushable&&!z.pushable;if(at){var Bt=Q.x-k.x,ie=Q.y-k.y,Zt=Math.sqrt(Math.pow(Bt,2)+Math.pow(ie,2)),le=(k.x-Q.x)/Zt||0,fe=(k.y-Q.y)/Zt||0,Se=2*(rt.x*le+rt.y*fe-ot.x*le-ot.y*fe)/(D.mass+z.mass);(et||st)&&(Se*=2),et||(rt.x=rt.x-Se/D.mass*le,rt.y=rt.y-Se/D.mass*fe,rt.multiply(D.bounce)),st||(ot.x=ot.x+Se/z.mass*le,ot.y=ot.y+Se/z.mass*fe,ot.multiply(z.bounce)),!et&&!st&&(It*=.5,Kt*=.5),et||(D.x-=It,D.y-=Kt,D.updateCenter()),st||(z.x+=It,z.y+=Kt,z.updateCenter()),Gt.result=!0}else!et||D.pushable||Wt?(D.x-=It,D.y-=Kt,D.updateCenter()):(!st||z.pushable||Wt)&&(z.x+=It,z.y+=Kt,z.updateCenter()),Gt.x=void 0,Gt.y=void 0;return Gt},intersects:function(D,z){return D===z?!1:!D.isCircle&&!z.isCircle?!(D.right<=z.left||D.bottom<=z.top||D.left>=z.right||D.top>=z.bottom):D.isCircle?z.isCircle?h(D.center,z.center)<=D.halfWidth+z.halfWidth:this.circleBodyIntersects(D,z):this.circleBodyIntersects(z,D)},circleBodyIntersects:function(D,z){var W=o(D.center.x,z.left,z.right),H=o(D.center.y,z.top,z.bottom),Z=(D.center.x-W)*(D.center.x-W),Q=(D.center.y-H)*(D.center.y-H);return Z+Q<=D.halfWidth*D.halfWidth},overlap:function(D,z,W,H,Z){return W===void 0&&(W=null),H===void 0&&(H=null),Z===void 0&&(Z=W),this.collideObjects(D,z,W,H,Z,!0)},collide:function(D,z,W,H,Z){return W===void 0&&(W=null),H===void 0&&(H=null),Z===void 0&&(Z=W),this.collideObjects(D,z,W,H,Z,!1)},collideObjects:function(D,z,W,H,Z,Q){var k,et;D.isParent&&(D.physicsType===void 0||z===void 0||D===z)&&(D=D.children.entries),z&&z.isParent&&z.physicsType===void 0&&(z=z.children.entries);var st=Array.isArray(D),rt=Array.isArray(z);if(this._total=0,!st&&!rt)this.collideHandler(D,z,W,H,Z,Q);else if(!st&&rt)for(k=0;k0},collideHandler:function(D,z,W,H,Z,Q){if(z===void 0&&D.isParent)return this.collideGroupVsGroup(D,D,W,H,Z,Q);if(!D||!z)return!1;if(D.body||D.isBody){if(z.body||z.isBody)return this.collideSpriteVsSprite(D,z,W,H,Z,Q);if(z.isParent)return this.collideSpriteVsGroup(D,z,W,H,Z,Q);if(z.isTilemap)return this.collideSpriteVsTilemapLayer(D,z,W,H,Z,Q)}else if(D.isParent){if(z.body||z.isBody)return this.collideSpriteVsGroup(z,D,W,H,Z,Q);if(z.isParent)return this.collideGroupVsGroup(D,z,W,H,Z,Q);if(z.isTilemap)return this.collideGroupVsTilemapLayer(D,z,W,H,Z,Q)}else if(D.isTilemap){if(z.body||z.isBody)return this.collideSpriteVsTilemapLayer(z,D,W,H,Z,Q);if(z.isParent)return this.collideGroupVsTilemapLayer(z,D,W,H,Z,Q)}},canCollide:function(D,z){return D&&z&&(D.collisionMask&z.collisionCategory)!==0&&(z.collisionMask&D.collisionCategory)!==0},collideSpriteVsSprite:function(D,z,W,H,Z,Q){var k=D.isBody?D:D.body,et=z.isBody?z:z.body;return this.canCollide(k,et)?(this.separate(k,et,H,Z,Q)&&(W&&W.call(Z,D,z),this._total++),!0):!1},collideSpriteVsGroup:function(D,z,W,H,Z,Q){var k=D.isBody?D:D.body;if(!(z.length===0||!k||!k.enable||k.checkCollision.none||!this.canCollide(k,z))){var et,st,rt;if(this.useTree||z.physicsType===e.STATIC_BODY){var ot=this.treeMinMax;ot.minX=k.left,ot.minY=k.top,ot.maxX=k.right,ot.maxY=k.bottom;var ft=z.physicsType===e.DYNAMIC_BODY?this.tree.search(ot):this.staticTree.search(ot);for(st=ft.length,et=0;et{/** + */var o=t(55495),v=t(37742),a=t(45319),r=t(83419),n=t(79342),e=t(37747),i=t(20339),h=t(52816),s=t(50792),l=t(63012),f=t(43855),u=t(5470),d=t(94977),p=t(64897),g=t(45170),y=t(96523),x=t(35154),C=t(36383),P=t(25774),M=t(96602),w=t(87841),I=t(59542),L=t(40012),B=t(14087),N=t(89936),G=t(35072),V=t(72624),K=t(2483),j=t(61340),J=t(26099),X=t(15994),Y=new r({Extends:s,initialize:function(z,W){s.call(this),this.scene=z,this.bodies=new G,this.staticBodies=new G,this.pendingDestroy=new G,this.colliders=new P,this.gravity=new J(x(W,"gravity.x",0),x(W,"gravity.y",0)),this.bounds=new w(x(W,"x",0),x(W,"y",0),x(W,"width",z.sys.scale.width),x(W,"height",z.sys.scale.height)),this.checkCollision={up:x(W,"checkCollision.up",!0),down:x(W,"checkCollision.down",!0),left:x(W,"checkCollision.left",!0),right:x(W,"checkCollision.right",!0)},this.fps=x(W,"fps",60),this.fixedStep=x(W,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=x(W,"timeScale",1),this.OVERLAP_BIAS=x(W,"overlapBias",4),this.TILE_BIAS=x(W,"tileBias",16),this.forceX=x(W,"forceX",!1),this.isPaused=x(W,"isPaused",!1),this._total=0,this.drawDebug=x(W,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:x(W,"debugShowBody",!0),debugShowStaticBody:x(W,"debugShowStaticBody",!0),debugShowVelocity:x(W,"debugShowVelocity",!0),bodyDebugColor:x(W,"debugBodyColor",16711935),staticBodyDebugColor:x(W,"debugStaticBodyColor",255),velocityDebugColor:x(W,"debugVelocityColor",65280)},this.maxEntries=x(W,"maxEntries",16),this.useTree=x(W,"useTree",!0),this.tree=new I(this.maxEntries),this.staticTree=new I(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new j,this._tempMatrix2=new j,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(b,z){z===void 0&&(z=e.DYNAMIC_BODY),Array.isArray(b)||(b=[b]);for(var W=0;W=Z;for(this.fixedStep||(H=z*.001,et=!0,this._elapsed=0),W=0;W=Z;)this._elapsed-=Z,this.step(H)}},step:function(b){var z,W,H=this.bodies.entries,Z=H.length;for(z=0;z0){var st=this.tree,rt=this.staticTree;for(W=et.entries,H=W.length,b=0;b-1&&b.velocity.length()>ft&&(b.velocity.normalize().scale(ft),ot=ft),b.speed=ot},separate:function(b,z,W,H,Z){var Q,k,et=!1,st=!0;if(!b.enable||!z.enable||b.checkCollision.none||z.checkCollision.none||!this.intersects(b,z)||W&&W.call(H,b.gameObject,z.gameObject)===!1)return et;if(b.isCircle||z.isCircle){var rt=this.separateCircle(b,z,Z);rt.result?(et=!0,st=!1):(Q=rt.x,k=rt.y,st=!0)}if(st){var ot=!1,ft=!1,at=this.OVERLAP_BIAS;Z?(ot=B(b,z,Z,at,Q),ft=N(b,z,Z,at,k)):this.forceX||Math.abs(this.gravity.y+b.gravity.y)Ct&&(ft=i(vt,At,Ct,ct)-Et):At>pt&&(vtCt&&(ft=i(vt,At,Ct,pt)-Et)),ft*=-1}else ft=b.halfWidth+z.halfWidth-h(Q,k);b.overlapR=ft,z.overlapR=ft;var wt=o(Q,k),Bt=(ft+C.EPSILON)*Math.cos(wt),jt=(ft+C.EPSILON)*Math.sin(wt),zt={overlap:ft,result:!1,x:Bt,y:jt};if(W&&(!at||at&&ft!==0))return zt.result=!0,zt;if(!at&&ft===0||et&&st||b.customSeparateX||z.customSeparateX)return zt.x=void 0,zt.y=void 0,zt;var Yt=!b.pushable&&!z.pushable;if(at){var bt=Q.x-k.x,ne=Q.y-k.y,Qt=Math.sqrt(Math.pow(bt,2)+Math.pow(ne,2)),fe=(k.x-Q.x)/Qt||0,ce=(k.y-Q.y)/Qt||0,Pe=2*(rt.x*fe+rt.y*ce-ot.x*fe-ot.y*ce)/(b.mass+z.mass);(et||st)&&(Pe*=2),et||(rt.x=rt.x-Pe/b.mass*fe,rt.y=rt.y-Pe/b.mass*ce,rt.multiply(b.bounce)),st||(ot.x=ot.x+Pe/z.mass*fe,ot.y=ot.y+Pe/z.mass*ce,ot.multiply(z.bounce)),!et&&!st&&(Bt*=.5,jt*=.5),et||(b.x-=Bt,b.y-=jt,b.updateCenter()),st||(z.x+=Bt,z.y+=jt,z.updateCenter()),zt.result=!0}else!et||b.pushable||Yt?(b.x-=Bt,b.y-=jt,b.updateCenter()):(!st||z.pushable||Yt)&&(z.x+=Bt,z.y+=jt,z.updateCenter()),zt.x=void 0,zt.y=void 0;return zt},intersects:function(b,z){return b===z?!1:!b.isCircle&&!z.isCircle?!(b.right<=z.left||b.bottom<=z.top||b.left>=z.right||b.top>=z.bottom):b.isCircle?z.isCircle?h(b.center,z.center)<=b.halfWidth+z.halfWidth:this.circleBodyIntersects(b,z):this.circleBodyIntersects(z,b)},circleBodyIntersects:function(b,z){var W=a(b.center.x,z.left,z.right),H=a(b.center.y,z.top,z.bottom),Z=(b.center.x-W)*(b.center.x-W),Q=(b.center.y-H)*(b.center.y-H);return Z+Q<=b.halfWidth*b.halfWidth},overlap:function(b,z,W,H,Z){return W===void 0&&(W=null),H===void 0&&(H=null),Z===void 0&&(Z=W),this.collideObjects(b,z,W,H,Z,!0)},collide:function(b,z,W,H,Z){return W===void 0&&(W=null),H===void 0&&(H=null),Z===void 0&&(Z=W),this.collideObjects(b,z,W,H,Z,!1)},collideObjects:function(b,z,W,H,Z,Q){var k,et;b.isParent&&(b.physicsType===void 0||z===void 0||b===z)&&(b=b.children.entries),z&&z.isParent&&z.physicsType===void 0&&(z=z.children.entries);var st=Array.isArray(b),rt=Array.isArray(z);if(this._total=0,!st&&!rt)this.collideHandler(b,z,W,H,Z,Q);else if(!st&&rt)for(k=0;k0},collideHandler:function(b,z,W,H,Z,Q){if(z===void 0&&b.isParent)return this.collideGroupVsGroup(b,b,W,H,Z,Q);if(!b||!z)return!1;if(b.body||b.isBody){if(z.body||z.isBody)return this.collideSpriteVsSprite(b,z,W,H,Z,Q);if(z.isParent)return this.collideSpriteVsGroup(b,z,W,H,Z,Q);if(z.isTilemap)return this.collideSpriteVsTilemapLayer(b,z,W,H,Z,Q)}else if(b.isParent){if(z.body||z.isBody)return this.collideSpriteVsGroup(z,b,W,H,Z,Q);if(z.isParent)return this.collideGroupVsGroup(b,z,W,H,Z,Q);if(z.isTilemap)return this.collideGroupVsTilemapLayer(b,z,W,H,Z,Q)}else if(b.isTilemap){if(z.body||z.isBody)return this.collideSpriteVsTilemapLayer(z,b,W,H,Z,Q);if(z.isParent)return this.collideGroupVsTilemapLayer(z,b,W,H,Z,Q)}},canCollide:function(b,z){return b&&z&&(b.collisionMask&z.collisionCategory)!==0&&(z.collisionMask&b.collisionCategory)!==0},collideSpriteVsSprite:function(b,z,W,H,Z,Q){var k=b.isBody?b:b.body,et=z.isBody?z:z.body;return this.canCollide(k,et)?(this.separate(k,et,H,Z,Q)&&(W&&W.call(Z,b,z),this._total++),!0):!1},collideSpriteVsGroup:function(b,z,W,H,Z,Q){var k=b.isBody?b:b.body;if(!(z.length===0||!k||!k.enable||k.checkCollision.none||!this.canCollide(k,z))){var et,st,rt;if(this.useTree||z.physicsType===e.STATIC_BODY){var ot=this.treeMinMax;ot.minX=k.left,ot.minY=k.top,ot.maxX=k.right,ot.maxY=k.bottom;var ft=z.physicsType===e.DYNAMIC_BODY?this.tree.search(ot):this.staticTree.search(ot);for(st=ft.length,et=0;et{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setAcceleration:function(t,a){return this.body.acceleration.set(t,a),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}};c.exports=m},59023:c=>{/** + */var m={setAcceleration:function(t,o){return this.body.acceleration.set(t,o),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}};c.exports=m},59023:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4289,31 +4289,31 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setBounce:function(t,a){return this.body.bounce.set(t,a),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,a,v,o){return this.body.setCollideWorldBounds(t,a,v,o),this}};c.exports=m},78389:(c,m,t)=>{/** + */var m={setBounce:function(t,o){return this.body.bounce.set(t,o),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,o,v,a){return this.body.setCollideWorldBounds(t,o,v,a),this}};c.exports=m},78389:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79599),v={setCollisionCategory:function(o){var r=this.body?this.body:this;return r.collisionCategory=o,this},willCollideWith:function(o){var r=this.body?this.body:this;return(r.collisionMask&o)!==0},addCollidesWith:function(o){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask|o,this},removeCollidesWith:function(o){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask&~o,this},setCollidesWith:function(o){var r=this.body?this.body:this;return r.collisionMask=a(o),this},resetCollisionCategory:function(){var o=this.body?this.body:this;return o.collisionCategory=1,o.collisionMask=1,this}};c.exports=v},87118:c=>{/** + */var o=t(79599),v={setCollisionCategory:function(a){var r=this.body?this.body:this;return r.collisionCategory=a,this},willCollideWith:function(a){var r=this.body?this.body:this;return(r.collisionMask&a)!==0},addCollidesWith:function(a){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask|a,this},removeCollidesWith:function(a){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask&~a,this},setCollidesWith:function(a){var r=this.body?this.body:this;return r.collisionMask=o(a),this},resetCollisionCategory:function(){var a=this.body?this.body:this;return a.collisionCategory=1,a.collisionMask=1,this}};c.exports=v},87118:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setDebug:function(t,a,v){return this.debugShowBody=t,this.debugShowVelocity=a,this.debugBodyColor=v,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}}};c.exports=m},52819:c=>{/** + */var m={setDebug:function(t,o,v){return this.debugShowBody=t,this.debugShowVelocity=o,this.debugBodyColor=v,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}}};c.exports=m},52819:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setDrag:function(t,a){return this.body.drag.set(t,a),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}};c.exports=m},4074:c=>{/** + */var m={setDrag:function(t,o){return this.body.drag.set(t,o),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}};c.exports=m},4074:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,a,v,o,r){return t&&this.body.reset(a,v),o&&(this.body.gameObject.active=!0),r&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,a){return t===void 0&&(t=!1),a===void 0&&(a=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),a&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};c.exports=m},40831:c=>{/** + */var m={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,o,v,a,r){return t&&this.body.reset(o,v),a&&(this.body.gameObject.active=!0),r&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,o){return t===void 0&&(t=!1),o===void 0&&(o=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),o&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};c.exports=m},40831:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setFriction:function(t,a){return this.body.friction.set(t,a),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}};c.exports=m},26775:c=>{/** + */var m={setFriction:function(t,o){return this.body.friction.set(t,o),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}};c.exports=m},26775:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setGravity:function(t,a){return this.body.gravity.set(t,a),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}};c.exports=m},9437:c=>{/** + */var m={setGravity:function(t,o){return this.body.gravity.set(t,o),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}};c.exports=m},9437:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4321,7 +4321,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setMass:function(t){return this.body.mass=t,this}};c.exports=m},72441:(c,m,t)=>{var a=t(47956),v=t(96503),o=t(2044),r=t(81491),n=function(e,i,h,s,l,f){var u=a(e,i-s,h-s,2*s,2*s,l,f);if(u.length===0)return u;for(var d=new v(i,h,s),p=new v,g=[],y=0;y{var m=function(t,a,v,o,r,n,e){n===void 0&&(n=!0),e===void 0&&(e=!1);var i=[],h=[],s=t.treeMinMax;if(s.minX=a,s.minY=v,s.maxX=a+o,s.maxY=v+r,e&&(h=t.staticTree.search(s)),n&&t.useTree)i=t.tree.search(s);else if(n){var l=t.bodies,f={position:{x:a,y:v},left:a,top:v,right:a+o,bottom:v+r,isCircle:!1},u=t.intersects;l.iterate(function(d){u(d,f)&&i.push(d)})}return h.concat(i)};c.exports=m},62121:c=>{/** + */var m={setMass:function(t){return this.body.mass=t,this}};c.exports=m},72441:(c,m,t)=>{var o=t(47956),v=t(96503),a=t(2044),r=t(81491),n=function(e,i,h,s,l,f){var u=o(e,i-s,h-s,2*s,2*s,l,f);if(u.length===0)return u;for(var d=new v(i,h,s),p=new v,g=[],y=0;y{var m=function(t,o,v,a,r,n,e){n===void 0&&(n=!0),e===void 0&&(e=!1);var i=[],h=[],s=t.treeMinMax;if(s.minX=o,s.minY=v,s.maxX=o+a,s.maxY=v+r,e&&(h=t.staticTree.search(s)),n&&t.useTree)i=t.tree.search(s);else if(n){var l=t.bodies,f={position:{x:o,y:v},left:o,top:v,right:o+a,bottom:v+r,isCircle:!1},u=t.intersects;l.iterate(function(d){u(d,f)&&i.push(d)})}return h.concat(i)};c.exports=m},62121:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4329,11 +4329,11 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setOffset:function(t,a){return this.body.setOffset(t,a),this},setSize:function(t,a,v){return this.body.setSize(t,a,v),this},setBodySize:function(t,a,v){return this.body.setSize(t,a,v),this},setCircle:function(t,a,v){return this.body.setCircle(t,a,v),this}};c.exports=m},15098:c=>{/** + */var m={setOffset:function(t,o){return this.body.setOffset(t,o),this},setSize:function(t,o,v){return this.body.setSize(t,o,v),this},setBodySize:function(t,o,v){return this.body.setSize(t,o,v),this},setCircle:function(t,o,v){return this.body.setCircle(t,o,v),this}};c.exports=m},15098:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setVelocity:function(t,a){return this.body.setVelocity(t,a),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,a){return this.body.maxVelocity.set(t,a),this}};c.exports=m},92209:(c,m,t)=>{/** + */var m={setVelocity:function(t,o){return this.body.setVelocity(t,o),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,o){return this.body.maxVelocity.set(t,o),this}};c.exports=m},92209:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4381,39 +4381,39 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37747),v=t(79291),o={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)};o=v(!1,o,a),c.exports=o},96602:c=>{/** + */var o=t(37747),v=t(79291),a={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)};a=v(!1,a,o),c.exports=a},96602:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,a,t):t.layer.callbacks[t.index]?!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,a,t):!0};c.exports=m},36294:c=>{/** + */var m=function(t,o){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,o,t):t.layer.callbacks[t.index]?!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,o,t):!0};c.exports=m},36294:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a<0?(t.blocked.none=!1,t.blocked.left=!0):a>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=a,t.updateCenter(),t.bounce.x===0?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x};c.exports=m},67013:c=>{/** + */var m=function(t,o){o<0?(t.blocked.none=!1,t.blocked.left=!0):o>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=o,t.updateCenter(),t.bounce.x===0?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x};c.exports=m},67013:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a<0?(t.blocked.none=!1,t.blocked.up=!0):a>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=a,t.updateCenter(),t.bounce.y===0?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y};c.exports=m},40012:(c,m,t)=>{/** + */var m=function(t,o){o<0?(t.blocked.none=!1,t.blocked.up=!0):o>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=o,t.updateCenter(),t.bounce.y===0?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y};c.exports=m},40012:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(21329),v=t(53442),o=t(2483),r=function(n,e,i,h,s,l,f){var u=h.left,d=h.top,p=h.right,g=h.bottom,y=i.faceLeft||i.faceRight,x=i.faceTop||i.faceBottom;if(f||(y=!0,x=!0),!y&&!x)return!1;var T=0,C=0,M=0,w=1;if(e.deltaAbsX()>e.deltaAbsY()?M=-1:e.deltaAbsX(){/** + */var o=t(21329),v=t(53442),a=t(2483),r=function(n,e,i,h,s,l,f){var u=h.left,d=h.top,p=h.right,g=h.bottom,y=i.faceLeft||i.faceRight,x=i.faceTop||i.faceBottom;if(f||(y=!0,x=!0),!y&&!x)return!1;var C=0,P=0,M=0,w=1;if(e.deltaAbsX()>e.deltaAbsY()?M=-1:e.deltaAbsX(){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36294),v=function(o,r,n,e,i,h){var s=0,l=r.faceLeft,f=r.faceRight,u=r.collideLeft,d=r.collideRight;return h||(l=!0,f=!0,u=!0,d=!0),o.deltaX()<0&&d&&o.checkCollision.left?f&&o.x0&&u&&o.checkCollision.right&&l&&o.right>n&&(s=o.right-n,s>i&&(s=0)),s!==0&&(o.customSeparateX?o.overlapX=s:a(o,s)),s};c.exports=v},53442:(c,m,t)=>{/** + */var o=t(36294),v=function(a,r,n,e,i,h){var s=0,l=r.faceLeft,f=r.faceRight,u=r.collideLeft,d=r.collideRight;return h||(l=!0,f=!0,u=!0,d=!0),a.deltaX()<0&&d&&a.checkCollision.left?f&&a.x0&&u&&a.checkCollision.right&&l&&a.right>n&&(s=a.right-n,s>i&&(s=0)),s!==0&&(a.customSeparateX?a.overlapX=s:o(a,s)),s};c.exports=v},53442:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(67013),v=function(o,r,n,e,i,h){var s=0,l=r.faceTop,f=r.faceBottom,u=r.collideUp,d=r.collideDown;return h||(l=!0,f=!0,u=!0,d=!0),o.deltaY()<0&&d&&o.checkCollision.up?f&&o.y0&&u&&o.checkCollision.down&&l&&o.bottom>n&&(s=o.bottom-n,s>i&&(s=0)),s!==0&&(o.customSeparateY?o.overlapY=s:a(o,s)),s};c.exports=v},2483:c=>{/** + */var o=t(67013),v=function(a,r,n,e,i,h){var s=0,l=r.faceTop,f=r.faceBottom,u=r.collideUp,d=r.collideDown;return h||(l=!0,f=!0,u=!0,d=!0),a.deltaY()<0&&d&&a.checkCollision.up?f&&a.y0&&u&&a.checkCollision.down&&l&&a.bottom>n&&(s=a.bottom-n,s>i&&(s=0)),s!==0&&(a.customSeparateY?a.overlapY=s:o(a,s)),s};c.exports=v},2483:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return!(a.right<=t.left||a.bottom<=t.top||a.position.x>=t.right||a.position.y>=t.bottom)};c.exports=m},55173:(c,m,t)=>{/** + */var m=function(t,o){return!(o.right<=t.left||o.bottom<=t.top||o.position.x>=t.right||o.position.y>=t.bottom)};c.exports=m},55173:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={ProcessTileCallbacks:t(96602),ProcessTileSeparationX:t(36294),ProcessTileSeparationY:t(67013),SeparateTile:t(40012),TileCheckX:t(21329),TileCheckY:t(53442),TileIntersectsBody:t(2483)};c.exports=a},44563:(c,m,t)=>{/** + */var o={ProcessTileCallbacks:t(96602),ProcessTileSeparationX:t(36294),ProcessTileSeparationY:t(67013),SeparateTile:t(40012),TileCheckX:t(21329),TileCheckY:t(53442),TileIntersectsBody:t(2483)};c.exports=o},44563:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4421,53 +4421,53 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(26099),o=new a({initialize:function(){this.boundsCenter=new v,this.centerDiff=new v},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,i=r.bounds.max.x-r.bounds.min.x,h=r.bounds.max.y-r.bounds.min.y,s=i*r.centerOfMass.x,l=h*r.centerOfMass.y;return n.set(i/2,h/2),e.set(s-n.x,l-n.y),!0},getTopLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+i.x+h.x,e+i.y+h.y)}return!1},getTopCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+h.x,e+i.y+h.y)}return!1},getTopRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n-(i.x-h.x),e+i.y+h.y)}return!1},getLeftCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+i.x+h.x,e+h.y)}return!1},getCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.centerDiff;return new v(n+i.x,e+i.y)}return!1},getRightCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n-(i.x-h.x),e+h.y)}return!1},getBottomLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+i.x+h.x,e-(i.y-h.y))}return!1},getBottomCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+h.x,e-(i.y-h.y))}return!1},getBottomRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n-(i.x-h.x),e-(i.y-h.y))}return!1}});c.exports=o},19933:(c,m,t)=>{/** + */var o=t(83419),v=t(26099),a=new o({initialize:function(){this.boundsCenter=new v,this.centerDiff=new v},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,i=r.bounds.max.x-r.bounds.min.x,h=r.bounds.max.y-r.bounds.min.y,s=i*r.centerOfMass.x,l=h*r.centerOfMass.y;return n.set(i/2,h/2),e.set(s-n.x,l-n.y),!0},getTopLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+i.x+h.x,e+i.y+h.y)}return!1},getTopCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+h.x,e+i.y+h.y)}return!1},getTopRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n-(i.x-h.x),e+i.y+h.y)}return!1},getLeftCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+i.x+h.x,e+h.y)}return!1},getCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.centerDiff;return new v(n+i.x,e+i.y)}return!1},getRightCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n-(i.x-h.x),e+h.y)}return!1},getBottomLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+i.x+h.x,e-(i.y-h.y))}return!1},getBottomCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+h.x,e-(i.y-h.y))}return!1},getBottomRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n-(i.x-h.x),e-(i.y-h.y))}return!1}});c.exports=a},19933:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(6790);a.Body=t(22562),a.Composite=t(69351),a.World=t(4372),a.Collision=t(52284),a.Detector=t(81388),a.Pairs=t(99561),a.Pair=t(4506),a.Query=t(73296),a.Resolver=t(66272),a.Constraint=t(48140),a.Common=t(53402),a.Engine=t(48413),a.Events=t(35810),a.Sleeping=t(53614),a.Plugin=t(73832),a.Bodies=t(66280),a.Composites=t(74116),a.Axes=t(66615),a.Bounds=t(15647),a.Svg=t(74058),a.Vector=t(31725),a.Vertices=t(41598),a.World.add=a.Composite.add,a.World.remove=a.Composite.remove,a.World.addComposite=a.Composite.addComposite,a.World.addBody=a.Composite.addBody,a.World.addConstraint=a.Composite.addConstraint,a.World.clear=a.Composite.clear,c.exports=a},28137:(c,m,t)=>{/** + */var o=t(6790);o.Body=t(22562),o.Composite=t(69351),o.World=t(4372),o.Collision=t(52284),o.Detector=t(81388),o.Pairs=t(99561),o.Pair=t(4506),o.Query=t(73296),o.Resolver=t(66272),o.Constraint=t(48140),o.Common=t(53402),o.Engine=t(48413),o.Events=t(35810),o.Sleeping=t(53614),o.Plugin=t(73832),o.Bodies=t(66280),o.Composites=t(74116),o.Axes=t(66615),o.Bounds=t(15647),o.Svg=t(74058),o.Vector=t(31725),o.Vertices=t(41598),o.World.add=o.Composite.add,o.World.remove=o.Composite.remove,o.World.addComposite=o.Composite.addComposite,o.World.addBody=o.Composite.addBody,o.World.addConstraint=o.Composite.addConstraint,o.World.clear=o.Composite.clear,c.exports=o},28137:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66280),v=t(83419),o=t(74116),r=t(48140),n=t(74058),e=t(75803),i=t(23181),h=t(34803),s=t(73834),l=t(19496),f=t(85791),u=t(98713),d=t(41598),p=new v({initialize:function(y){this.world=y,this.scene=y.scene,this.sys=y.scene.sys},rectangle:function(g,y,x,T,C){var M=a.rectangle(g,y,x,T,C);return this.world.add(M),M},trapezoid:function(g,y,x,T,C,M){var w=a.trapezoid(g,y,x,T,C,M);return this.world.add(w),w},circle:function(g,y,x,T,C){var M=a.circle(g,y,x,T,C);return this.world.add(M),M},polygon:function(g,y,x,T,C){var M=a.polygon(g,y,x,T,C);return this.world.add(M),M},fromVertices:function(g,y,x,T,C,M,w){typeof x=="string"&&(x=d.fromPath(x));var L=a.fromVertices(g,y,x,T,C,M,w);return this.world.add(L),L},fromPhysicsEditor:function(g,y,x,T,C){C===void 0&&(C=!0);var M=l.parseBody(g,y,x,T);return C&&!this.world.has(M)&&this.world.add(M),M},fromSVG:function(g,y,x,T,C,M){T===void 0&&(T=1),C===void 0&&(C={}),M===void 0&&(M=!0);for(var w=x.getElementsByTagName("path"),L=[],F=0;F{/** + */var o=t(66280),v=t(83419),a=t(74116),r=t(48140),n=t(74058),e=t(75803),i=t(23181),h=t(34803),s=t(73834),l=t(19496),f=t(85791),u=t(98713),d=t(41598),p=new v({initialize:function(y){this.world=y,this.scene=y.scene,this.sys=y.scene.sys},rectangle:function(g,y,x,C,P){var M=o.rectangle(g,y,x,C,P);return this.world.add(M),M},trapezoid:function(g,y,x,C,P,M){var w=o.trapezoid(g,y,x,C,P,M);return this.world.add(w),w},circle:function(g,y,x,C,P){var M=o.circle(g,y,x,C,P);return this.world.add(M),M},polygon:function(g,y,x,C,P){var M=o.polygon(g,y,x,C,P);return this.world.add(M),M},fromVertices:function(g,y,x,C,P,M,w){typeof x=="string"&&(x=d.fromPath(x));var I=o.fromVertices(g,y,x,C,P,M,w);return this.world.add(I),I},fromPhysicsEditor:function(g,y,x,C,P){P===void 0&&(P=!0);var M=l.parseBody(g,y,x,C);return P&&!this.world.has(M)&&this.world.add(M),M},fromSVG:function(g,y,x,C,P,M){C===void 0&&(C=1),P===void 0&&(P={}),M===void 0&&(M=!0);for(var w=x.getElementsByTagName("path"),I=[],L=0;L{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(31884),v=t(95540),o=t(26099);function r(e){return!!e.get&&typeof e.get=="function"||!!e.set&&typeof e.set=="function"}var n=function(e,i,h,s){h===void 0&&(h={}),s===void 0&&(s=!0);var l=i.x,f=i.y;i.body={temp:!0,position:{x:l,y:f}};var u=[a.Bounce,a.Collision,a.Force,a.Friction,a.Gravity,a.Mass,a.Sensor,a.SetBody,a.Sleep,a.Static,a.Transform,a.Velocity];if(u.forEach(function(p){for(var g in p)r(p[g])?Object.defineProperty(i,g,{get:p[g].get,set:p[g].set}):Object.defineProperty(i,g,{value:p[g]})}),i.world=e,i._tempVec2=new o(l,f),h.hasOwnProperty("type")&&h.type==="body")i.setExistingBody(h,s);else{var d=v(h,"shape",null);d||(d="rectangle"),h.addToWorld=s,i.setBody(d,h)}return i};c.exports=n},23181:(c,m,t)=>{/** + */var o=t(31884),v=t(95540),a=t(26099);function r(e){return!!e.get&&typeof e.get=="function"||!!e.set&&typeof e.set=="function"}var n=function(e,i,h,s){h===void 0&&(h={}),s===void 0&&(s=!0);var l=i.x,f=i.y;i.body={temp:!0,position:{x:l,y:f}};var u=[o.Bounce,o.Collision,o.Force,o.Friction,o.Gravity,o.Mass,o.Sensor,o.SetBody,o.Sleep,o.Static,o.Transform,o.Velocity];if(u.forEach(function(p){for(var g in p)r(p[g])?Object.defineProperty(i,g,{get:p[g].get,set:p[g].set}):Object.defineProperty(i,g,{value:p[g]})}),i.world=e,i._tempVec2=new a(l,f),h.hasOwnProperty("type")&&h.type==="body")i.setExistingBody(h,s);else{var d=v(h,"shape",null);d||(d="rectangle"),h.addToWorld=s,i.setBody(d,h)}return i};c.exports=n},23181:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31884),o=t(95643),r=t(95540),n=t(88571),e=t(72699),i=t(26099),h=new a({Extends:n,Mixins:[v.Bounce,v.Collision,v.Force,v.Friction,v.Gravity,v.Mass,v.Sensor,v.SetBody,v.Sleep,v.Static,v.Transform,v.Velocity,e],initialize:function(l,f,u,d,p,g){o.call(this,l.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(d,p),this.setSizeToFrame(),this.setOrigin(),this.world=l,this._tempVec2=new i(f,u);var y=r(g,"shape",null);y?this.setBody(y,g):this.setRectangle(this.width,this.height,g),this.setPosition(f,u),this.initPipeline(),this.initPostPipeline(!0)}});c.exports=h},42045:(c,m,t)=>{/** + */var o=t(83419),v=t(31884),a=t(95643),r=t(95540),n=t(88571),e=t(72699),i=t(26099),h=new o({Extends:n,Mixins:[v.Bounce,v.Collision,v.Force,v.Friction,v.Gravity,v.Mass,v.Sensor,v.SetBody,v.Sleep,v.Static,v.Transform,v.Velocity,e],initialize:function(l,f,u,d,p,g){a.call(this,l.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(d,p),this.setSizeToFrame(),this.setOrigin(),this.world=l,this._tempVec2=new i(f,u);var y=r(g,"shape",null);y?this.setBody(y,g):this.setRectangle(this.width,this.height,g),this.setPosition(f,u),this.initPipeline(),this.initPostPipeline(!0)}});c.exports=h},42045:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(60461),v=t(66615),o=t(66280),r=t(22562),n=t(68174),e=t(15647),i=t(83419),h=t(52284),s=t(53402),l=t(69351),f=t(74116),u=t(48140),d=t(81388),p=t(20339),g=t(28137),y=t(95540),x=t(35154),T=t(18210),C=t(40178),M=t(6790),w=t(74507),L=t(46975),F=t(4506),O=t(99561),N=t(73832),G=t(37277),V=t(73296),K=t(66272),$=t(44594),J=t(74058),X=t(31725),Y=t(41598),D=t(68243);s.setDecomp(t(55973));var z=new i({initialize:function(H){this.scene=H,this.systems=H.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=r,this.composite=l,this.collision=h,this.detector=d,this.pair=F,this.pairs=O,this.query=V,this.resolver=K,this.constraint=u,this.bodies=o,this.composites=f,this.axes=v,this.bounds=e,this.svg=J,this.vector=X,this.vertices=Y,this.verts=Y,this._tempVec2=X.create(),x(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),x(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),x(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),K._restingThresh=x(this.config,"restingThresh",4),K._restingThreshTangent=x(this.config,"restingThreshTangent",6),K._positionDampen=x(this.config,"positionDampen",.9),K._positionWarming=x(this.config,"positionWarming",.8),K._frictionNormalMultiplier=x(this.config,"frictionNormalMultiplier",5),H.sys.events.once($.BOOT,this.boot,this),H.sys.events.on($.START,this.start,this)},boot:function(){this.world=new D(this.scene,this.config),this.add=new g(this.world),this.bodyBounds=new n,this.systems.events.once($.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new D(this.scene,this.config),this.add=new g(this.world));var W=this.systems.events;W.on($.UPDATE,this.world.update,this.world),W.on($.POST_UPDATE,this.world.postUpdate,this.world),W.once($.SHUTDOWN,this.shutdown,this)},getConfig:function(){var W=this.systems.game.config.physics,H=this.systems.settings.physics,Z=L(y(H,"matter",{}),y(W,"matter",{}));return Z},enableAttractorPlugin:function(){return N.register(T),N.use(M,T),this},enableWrapPlugin:function(){return N.register(w),N.use(M,w),this},enableCollisionEventsPlugin:function(){return N.register(C),N.use(M,C),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(W,H){this.world.step(W,H)},containsPoint:function(W,H,Z){W=this.getMatterBodies(W);var Q=X.create(H,Z),k=V.point(W,Q);return k.length>0},intersectPoint:function(W,H,Z){Z=this.getMatterBodies(Z);var Q=X.create(W,H),k=[],et=V.point(Z,Q);return et.forEach(function(st){k.indexOf(st)===-1&&k.push(st)}),k},intersectRect:function(W,H,Z,Q,k,et){k===void 0&&(k=!1),et=this.getMatterBodies(et);var st={min:{x:W,y:H},max:{x:W+Z,y:H+Q}},rt=[],ot=V.region(et,st,k);return ot.forEach(function(ft){rt.indexOf(ft)===-1&&rt.push(ft)}),rt},intersectRay:function(W,H,Z,Q,k,et){k===void 0&&(k=1),et=this.getMatterBodies(et);for(var st=[],rt=V.ray(et,X.create(W,H),X.create(Z,Q),k),ot=0;ot{/** + */var o=t(60461),v=t(66615),a=t(66280),r=t(22562),n=t(68174),e=t(15647),i=t(83419),h=t(52284),s=t(53402),l=t(69351),f=t(74116),u=t(48140),d=t(81388),p=t(20339),g=t(28137),y=t(95540),x=t(35154),C=t(18210),P=t(40178),M=t(6790),w=t(74507),I=t(46975),L=t(4506),B=t(99561),N=t(73832),G=t(37277),V=t(73296),K=t(66272),j=t(44594),J=t(74058),X=t(31725),Y=t(41598),b=t(68243);s.setDecomp(t(55973));var z=new i({initialize:function(H){this.scene=H,this.systems=H.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=r,this.composite=l,this.collision=h,this.detector=d,this.pair=L,this.pairs=B,this.query=V,this.resolver=K,this.constraint=u,this.bodies=a,this.composites=f,this.axes=v,this.bounds=e,this.svg=J,this.vector=X,this.vertices=Y,this.verts=Y,this._tempVec2=X.create(),x(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),x(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),x(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),K._restingThresh=x(this.config,"restingThresh",4),K._restingThreshTangent=x(this.config,"restingThreshTangent",6),K._positionDampen=x(this.config,"positionDampen",.9),K._positionWarming=x(this.config,"positionWarming",.8),K._frictionNormalMultiplier=x(this.config,"frictionNormalMultiplier",5),H.sys.events.once(j.BOOT,this.boot,this),H.sys.events.on(j.START,this.start,this)},boot:function(){this.world=new b(this.scene,this.config),this.add=new g(this.world),this.bodyBounds=new n,this.systems.events.once(j.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new b(this.scene,this.config),this.add=new g(this.world));var W=this.systems.events;W.on(j.UPDATE,this.world.update,this.world),W.on(j.POST_UPDATE,this.world.postUpdate,this.world),W.once(j.SHUTDOWN,this.shutdown,this)},getConfig:function(){var W=this.systems.game.config.physics,H=this.systems.settings.physics,Z=I(y(H,"matter",{}),y(W,"matter",{}));return Z},enableAttractorPlugin:function(){return N.register(C),N.use(M,C),this},enableWrapPlugin:function(){return N.register(w),N.use(M,w),this},enableCollisionEventsPlugin:function(){return N.register(P),N.use(M,P),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(W,H){this.world.step(W,H)},containsPoint:function(W,H,Z){W=this.getMatterBodies(W);var Q=X.create(H,Z),k=V.point(W,Q);return k.length>0},intersectPoint:function(W,H,Z){Z=this.getMatterBodies(Z);var Q=X.create(W,H),k=[],et=V.point(Z,Q);return et.forEach(function(st){k.indexOf(st)===-1&&k.push(st)}),k},intersectRect:function(W,H,Z,Q,k,et){k===void 0&&(k=!1),et=this.getMatterBodies(et);var st={min:{x:W,y:H},max:{x:W+Z,y:H+Q}},rt=[],ot=V.region(et,st,k);return ot.forEach(function(ft){rt.indexOf(ft)===-1&&rt.push(ft)}),rt},intersectRay:function(W,H,Z,Q,k,et){k===void 0&&(k=1),et=this.getMatterBodies(et);for(var st=[],rt=V.ray(et,X.create(W,H),X.create(Z,Q),k),ot=0;ot{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(9674),v=t(83419),o=t(31884),r=t(95643),n=t(95540),e=t(72699),i=t(68287),h=t(26099),s=new v({Extends:i,Mixins:[o.Bounce,o.Collision,o.Force,o.Friction,o.Gravity,o.Mass,o.Sensor,o.SetBody,o.Sleep,o.Static,o.Transform,o.Velocity,e],initialize:function(f,u,d,p,g,y){r.call(this,f.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new a(this),this.setTexture(p,g),this.setSizeToFrame(),this.setOrigin(),this.world=f,this._tempVec2=new h(u,d);var x=n(y,"shape",null);x?this.setBody(x,y):this.setRectangle(this.width,this.height,y),this.setPosition(u,d),this.initPipeline(),this.initPostPipeline(!0)}});c.exports=s},73834:(c,m,t)=>{/** + */var o=t(9674),v=t(83419),a=t(31884),r=t(95643),n=t(95540),e=t(72699),i=t(68287),h=t(26099),s=new v({Extends:i,Mixins:[a.Bounce,a.Collision,a.Force,a.Friction,a.Gravity,a.Mass,a.Sensor,a.SetBody,a.Sleep,a.Static,a.Transform,a.Velocity,e],initialize:function(f,u,d,p,g,y){r.call(this,f.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new o(this),this.setTexture(p,g),this.setSizeToFrame(),this.setOrigin(),this.world=f,this._tempVec2=new h(u,d);var x=n(y,"shape",null);x?this.setBody(x,y):this.setRectangle(this.width,this.height,y),this.setPosition(u,d),this.initPipeline(),this.initPostPipeline(!0)}});c.exports=s},73834:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66280),v=t(22562),o=t(83419),r=t(31884),n=t(62644),e=t(50792),i=t(95540),h=t(97022),s=t(41598),l=new o({Extends:e,Mixins:[r.Bounce,r.Collision,r.Friction,r.Gravity,r.Mass,r.Sensor,r.Sleep,r.Static],initialize:function(u,d,p){e.call(this),this.tile=d,this.world=u,d.physics.matterBody&&d.physics.matterBody.destroy(),d.physics.matterBody=this;var g=i(p,"body",null),y=i(p,"addToWorld",!0);if(g)this.setBody(g,y);else{var x=d.getCollisionGroup(),T=i(x,"objects",[]);T.length>0?this.setFromTileCollision(p):this.setFromTileRectangle(p)}if(d.flipX||d.flipY){var C={x:d.getCenterX(),y:d.getCenterY()},M=d.flipX?-1:1,w=d.flipY?-1:1;v.scale(g,M,w,C)}},setFromTileRectangle:function(f){f===void 0&&(f={}),h(f,"isStatic")||(f.isStatic=!0),h(f,"addToWorld")||(f.addToWorld=!0);var u=this.tile.getBounds(),d=u.x+u.width/2,p=u.y+u.height/2,g=a.rectangle(d,p,u.width,u.height,f);return this.setBody(g,f.addToWorld),this},setFromTileCollision:function(f){f===void 0&&(f={}),h(f,"isStatic")||(f.isStatic=!0),h(f,"addToWorld")||(f.addToWorld=!0);for(var u=this.tile.tilemapLayer.scaleX,d=this.tile.tilemapLayer.scaleY,p=this.tile.getLeft(),g=this.tile.getTop(),y=this.tile.getCollisionGroup(),x=i(y,"objects",[]),T=[],C=0;C1){var J=n(f);J.parts=T,this.setBody(v.create(J),J.addToWorld)}return this},setBody:function(f,u){return u===void 0&&(u=!0),this.body&&this.removeBody(),this.body=f,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()}});c.exports=l},19496:(c,m,t)=>{/** + */var o=t(66280),v=t(22562),a=t(83419),r=t(31884),n=t(62644),e=t(50792),i=t(95540),h=t(97022),s=t(41598),l=new a({Extends:e,Mixins:[r.Bounce,r.Collision,r.Friction,r.Gravity,r.Mass,r.Sensor,r.Sleep,r.Static],initialize:function(u,d,p){e.call(this),this.tile=d,this.world=u,d.physics.matterBody&&d.physics.matterBody.destroy(),d.physics.matterBody=this;var g=i(p,"body",null),y=i(p,"addToWorld",!0);if(g)this.setBody(g,y);else{var x=d.getCollisionGroup(),C=i(x,"objects",[]);C.length>0?this.setFromTileCollision(p):this.setFromTileRectangle(p)}if(d.flipX||d.flipY){var P={x:d.getCenterX(),y:d.getCenterY()},M=d.flipX?-1:1,w=d.flipY?-1:1;v.scale(g,M,w,P)}},setFromTileRectangle:function(f){f===void 0&&(f={}),h(f,"isStatic")||(f.isStatic=!0),h(f,"addToWorld")||(f.addToWorld=!0);var u=this.tile.getBounds(),d=u.x+u.width/2,p=u.y+u.height/2,g=o.rectangle(d,p,u.width,u.height,f);return this.setBody(g,f.addToWorld),this},setFromTileCollision:function(f){f===void 0&&(f={}),h(f,"isStatic")||(f.isStatic=!0),h(f,"addToWorld")||(f.addToWorld=!0);for(var u=this.tile.tilemapLayer.scaleX,d=this.tile.tilemapLayer.scaleY,p=this.tile.getLeft(),g=this.tile.getTop(),y=this.tile.getCollisionGroup(),x=i(y,"objects",[]),C=[],P=0;P1){var J=n(f);J.parts=C,this.setBody(v.create(J),J.addToWorld)}return this},setBody:function(f,u){return u===void 0&&(u=!0),this.body&&this.removeBody(),this.body=f,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()}});c.exports=l},19496:(c,m,t)=>{/** * @author Joachim Grill * @author Richard Davey * @copyright 2018 CodeAndWeb GmbH * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66280),v=t(22562),o=t(53402),r=t(95540),n=t(41598),e={parseBody:function(i,h,s,l){l===void 0&&(l={});for(var f=r(s,"fixtures",[]),u=[],d=0;d{/** + */var o=t(66280),v=t(22562),a=t(53402),r=t(95540),n=t(41598),e={parseBody:function(i,h,s,l){l===void 0&&(l={});for(var f=r(s,"fixtures",[]),u=[],d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66280),v=t(22562),o={parseBody:function(r,n,e,i){i===void 0&&(i={});var h,s=e.vertices;if(s.length===1)i.vertices=s[0],h=v.create(i),a.flagCoincidentParts(h.parts);else{for(var l=[],f=0;f{/** + */var o=t(66280),v=t(22562),a={parseBody:function(r,n,e,i){i===void 0&&(i={});var h,s=e.vertices;if(s.length===1)i.vertices=s[0],h=v.create(i),o.flagCoincidentParts(h.parts);else{for(var l=[],f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(15647),v=t(83419),o=t(69351),r=t(48140),n=t(81388),e=t(1121),i=t(8214),h=t(46975),s=t(53614),l=t(26099),f=t(41598),u=new v({initialize:function(p,g,y){y===void 0&&(y={});var x={label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}};this.scene=p,this.world=g,this.camera=null,this.pointer=null,this.active=!0,this.position=new l,this.body=null,this.part=null,this.constraint=r.create(h(y,x)),this.world.on(e.BEFORE_UPDATE,this.update,this),p.sys.input.on(i.POINTER_DOWN,this.onDown,this),p.sys.input.on(i.POINTER_UP,this.onUp,this)},onDown:function(d){this.pointer||(this.pointer=d,this.camera=d.camera)},onUp:function(d){d===this.pointer&&(this.pointer=null)},getBody:function(d){var p=this.position,g=this.constraint;this.camera.getWorldPoint(d.x,d.y,p);for(var y=o.allBodies(this.world.localWorld),x=0;x1?1:0,T=x;T{/** + */var o=t(15647),v=t(83419),a=t(69351),r=t(48140),n=t(81388),e=t(1121),i=t(8214),h=t(46975),s=t(53614),l=t(26099),f=t(41598),u=new v({initialize:function(p,g,y){y===void 0&&(y={});var x={label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}};this.scene=p,this.world=g,this.camera=null,this.pointer=null,this.active=!0,this.position=new l,this.body=null,this.part=null,this.constraint=r.create(h(y,x)),this.world.on(e.BEFORE_UPDATE,this.update,this),p.sys.input.on(i.POINTER_DOWN,this.onDown,this),p.sys.input.on(i.POINTER_UP,this.onUp,this)},onDown:function(d){this.pointer||(this.pointer=d,this.camera=d.camera)},onUp:function(d){d===this.pointer&&(this.pointer=null)},getBody:function(d){var p=this.position,g=this.constraint;this.camera.getWorldPoint(d.x,d.y,p);for(var y=a.allBodies(this.world.localWorld),x=0;x1?1:0,C=x;C{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66280),v=t(22562),o=t(83419),r=t(53402),n=t(69351),e=t(48413),i=t(50792),h=t(1121),s=t(95540),l=t(35154),f=t(22562),u=t(35810),d=t(73834),p=t(4372),g=t(31725),y=new o({Extends:i,initialize:function(T,C){i.call(this),this.scene=T,this.engine=e.create(C),this.localWorld=this.engine.world;var M=l(C,"gravity",null);M?this.setGravity(M.x,M.y,M.scale):M===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=l(C,"enabled",!0),this.getDelta=l(C,"getDelta",this.update60Hz);var w=s(C,"runner",{}),L=s(w,"fps",!1),F=s(w,"fps",60),O=s(w,"delta",1e3/F),N=s(w,"deltaMin",1e3/F),G=s(w,"deltaMax",1e3/(F*.5));L||(F=1e3/O),this.runner={fps:F,deltaSampleSize:s(w,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:s(w,"isFixed",!1),delta:O,deltaMin:N,deltaMax:G},this.autoUpdate=l(C,"autoUpdate",!0);var V=l(C,"debug",!1);if(this.drawDebug=typeof V=="object"?!0:V,this.debugGraphic,this.debugConfig={showAxes:s(V,"showAxes",!1),showAngleIndicator:s(V,"showAngleIndicator",!1),angleColor:s(V,"angleColor",15208787),showBroadphase:s(V,"showBroadphase",!1),broadphaseColor:s(V,"broadphaseColor",16757760),showBounds:s(V,"showBounds",!1),boundsColor:s(V,"boundsColor",16777215),showVelocity:s(V,"showVelocity",!1),velocityColor:s(V,"velocityColor",44783),showCollisions:s(V,"showCollisions",!1),collisionColor:s(V,"collisionColor",16094476),showSeparations:s(V,"showSeparations",!1),separationColor:s(V,"separationColor",16753920),showBody:s(V,"showBody",!0),showStaticBody:s(V,"showStaticBody",!0),showInternalEdges:s(V,"showInternalEdges",!1),renderFill:s(V,"renderFill",!1),renderLine:s(V,"renderLine",!0),fillColor:s(V,"fillColor",1075465),fillOpacity:s(V,"fillOpacity",1),lineColor:s(V,"lineColor",2678297),lineOpacity:s(V,"lineOpacity",1),lineThickness:s(V,"lineThickness",1),staticFillColor:s(V,"staticFillColor",857979),staticLineColor:s(V,"staticLineColor",1255396),showSleeping:s(V,"showSleeping",!1),staticBodySleepOpacity:s(V,"staticBodySleepOpacity",.7),sleepFillColor:s(V,"sleepFillColor",4605510),sleepLineColor:s(V,"sleepLineColor",10066585),showSensors:s(V,"showSensors",!0),sensorFillColor:s(V,"sensorFillColor",857979),sensorLineColor:s(V,"sensorLineColor",1255396),showPositions:s(V,"showPositions",!0),positionSize:s(V,"positionSize",4),positionColor:s(V,"positionColor",14697178),showJoint:s(V,"showJoint",!0),jointColor:s(V,"jointColor",14737474),jointLineOpacity:s(V,"jointLineOpacity",1),jointLineThickness:s(V,"jointLineThickness",2),pinSize:s(V,"pinSize",4),pinColor:s(V,"pinColor",4382944),springColor:s(V,"springColor",14697184),anchorColor:s(V,"anchorColor",15724527),anchorSize:s(V,"anchorSize",4),showConvexHulls:s(V,"showConvexHulls",!1),hullColor:s(V,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),s(C,"setBounds",!1)){var K=C.setBounds;if(typeof K=="boolean")this.setBounds();else{var $=s(K,"x",0),J=s(K,"y",0),X=s(K,"width",T.sys.scale.width),Y=s(K,"height",T.sys.scale.height),D=s(K,"thickness",64),z=s(K,"left",!0),W=s(K,"right",!0),H=s(K,"top",!0),Z=s(K,"bottom",!0);this.setBounds($,J,X,Y,D,z,W,H,Z)}}},setCompositeRenderStyle:function(x){var T=x.bodies,C=x.constraints,M=x.composites,w,L,F;for(w=0;w0&&(L=w[0].bodyA,F=w[0].bodyB),x.emit(h.COLLISION_START,M,L,F)}),u.on(T,"collisionActive",function(M){var w=M.pairs,L,F;w.length>0&&(L=w[0].bodyA,F=w[0].bodyB),x.emit(h.COLLISION_ACTIVE,M,L,F)}),u.on(T,"collisionEnd",function(M){var w=M.pairs,L,F;w.length>0&&(L=w[0].bodyA,F=w[0].bodyB),x.emit(h.COLLISION_END,M,L,F)})},setBounds:function(x,T,C,M,w,L,F,O,N){return x===void 0&&(x=0),T===void 0&&(T=0),C===void 0&&(C=this.scene.sys.scale.width),M===void 0&&(M=this.scene.sys.scale.height),w===void 0&&(w=64),L===void 0&&(L=!0),F===void 0&&(F=!0),O===void 0&&(O=!0),N===void 0&&(N=!0),this.updateWall(L,"left",x-w,T-w,w,M+w*2),this.updateWall(F,"right",x+C,T-w,w,M+w*2),this.updateWall(O,"top",x,T-w,C,w),this.updateWall(N,"bottom",x,T+M,C,w),this},updateWall:function(x,T,C,M,w,L){var F=this.walls[T];x?(F&&p.remove(this.localWorld,F),C+=w/2,M+=L/2,this.walls[T]=this.create(C,M,w,L,{isStatic:!0,friction:0,frictionStatic:0})):(F&&p.remove(this.localWorld,F),this.walls[T]=null)},createDebugGraphic:function(){var x=this.scene.sys.add.graphics({x:0,y:0});return x.setDepth(Number.MAX_VALUE),this.debugGraphic=x,this.drawDebug=!0,x},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(x,T,C){return x===void 0&&(x=0),T===void 0&&(T=1),C===void 0&&(C=.001),this.localWorld.gravity.x=x,this.localWorld.gravity.y=T,this.localWorld.gravity.scale=C,this},create:function(x,T,C,M,w){var L=a.rectangle(x,T,C,M,w);return p.add(this.localWorld,L),L},add:function(x){return p.add(this.localWorld,x),this},remove:function(x,T){Array.isArray(x)||(x=[x]);for(var C=0;CM.deltaMax?M.deltaMax:T,M.delta=T),M.timeScalePrev=w.timeScale,M.frameCounter+=1,x-M.counterTimestamp>=1e3&&(M.fps=M.frameCounter*((x-M.counterTimestamp)/1e3),M.counterTimestamp=x,M.frameCounter=0),e.update(C,T)}},step:function(x){e.update(this.engine,x)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(x){var T=x.hasOwnProperty("body")?x.body:x;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 x=this.debugConfig,T=this.engine,C=this.debugGraphic,M=n.allBodies(this.localWorld);this.debugGraphic.clear(),x.showBroadphase&&T.broadphase.controller&&this.renderGrid(T.broadphase,C,x.broadphaseColor,.5),x.showBounds&&this.renderBodyBounds(M,C,x.boundsColor,.5),(x.showBody||x.showStaticBody)&&this.renderBodies(M),x.showJoint&&this.renderJoints(),(x.showAxes||x.showAngleIndicator)&&this.renderBodyAxes(M,C,x.showAxes,x.angleColor,.5),x.showVelocity&&this.renderBodyVelocity(M,C,x.velocityColor,1,2),x.showSeparations&&this.renderSeparations(T.pairs.list,C,x.separationColor),x.showCollisions&&this.renderCollisions(T.pairs.list,C,x.collisionColor)}},renderGrid:function(x,T,C,M){T.lineStyle(1,C,M);for(var w=r.keys(x.buckets),L=0;L0){var V=G[0].vertex.x,K=G[0].vertex.y;G.length===2&&(V=(G[0].vertex.x+G[1].vertex.x)/2,K=(G[0].vertex.y+G[1].vertex.y)/2),N.bodyB===N.supports[0].body||N.bodyA.isStatic?T.lineBetween(V-N.normal.x*8,K-N.normal.y*8,V,K):T.lineBetween(V+N.normal.x*8,K+N.normal.y*8,V,K)}}return this},renderBodyBounds:function(x,T,C,M){T.lineStyle(1,C,M);for(var w=0;w1?1:0;N1?1:0;G1?1:0;G1&&this.renderConvexHull(Y,T,J,W)}}},renderBody:function(x,T,C,M,w,L,F,O){M===void 0&&(M=null),w===void 0&&(w=null),L===void 0&&(L=1),F===void 0&&(F=null),O===void 0&&(O=null);for(var N=this.debugConfig,G=N.sensorFillColor,V=N.sensorLineColor,K=x.parts,$=K.length,J=$>1?1:0;J<$;J++){var X=K[J],Y=X.render,D=Y.opacity;if(!(!Y.visible||D===0||X.isSensor&&!N.showSensors)){var z=X.circleRadius;if(T.beginPath(),X.isSensor?(F!==null&&T.fillStyle(G,O*D),M!==null&&T.lineStyle(L,V,w*D)):(F!==null&&T.fillStyle(F,O*D),M!==null&&T.lineStyle(L,M,w*D)),z)T.arc(X.position.x,X.position.y,z,0,2*Math.PI);else{var W=X.vertices,H=W.length;T.moveTo(W[0].x,W[0].y);for(var Z=1;Z1){var F=x.vertices;T.lineStyle(M,C),T.beginPath(),T.moveTo(F[0].x,F[0].y);for(var O=1;O0&&(T.fillStyle(F),T.fillCircle(K.x,K.y,O),T.fillCircle($.x,$.y,O)),this},resetCollisionIDs:function(){return v._nextCollidingGroupId=1,v._nextNonCollidingGroupId=-1,v._nextCategory=1,this},shutdown:function(){u.off(this.engine),this.removeAllListeners(),p.clear(this.localWorld,!1),e.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});c.exports=y},70410:c=>{/** + */var o=t(66280),v=t(22562),a=t(83419),r=t(53402),n=t(69351),e=t(48413),i=t(50792),h=t(1121),s=t(95540),l=t(35154),f=t(22562),u=t(35810),d=t(73834),p=t(4372),g=t(31725),y=new a({Extends:i,initialize:function(C,P){i.call(this),this.scene=C,this.engine=e.create(P),this.localWorld=this.engine.world;var M=l(P,"gravity",null);M?this.setGravity(M.x,M.y,M.scale):M===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=l(P,"enabled",!0),this.getDelta=l(P,"getDelta",this.update60Hz);var w=s(P,"runner",{}),I=s(w,"fps",!1),L=s(w,"fps",60),B=s(w,"delta",1e3/L),N=s(w,"deltaMin",1e3/L),G=s(w,"deltaMax",1e3/(L*.5));I||(L=1e3/B),this.runner={fps:L,deltaSampleSize:s(w,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:s(w,"isFixed",!1),delta:B,deltaMin:N,deltaMax:G},this.autoUpdate=l(P,"autoUpdate",!0);var V=l(P,"debug",!1);if(this.drawDebug=typeof V=="object"?!0:V,this.debugGraphic,this.debugConfig={showAxes:s(V,"showAxes",!1),showAngleIndicator:s(V,"showAngleIndicator",!1),angleColor:s(V,"angleColor",15208787),showBroadphase:s(V,"showBroadphase",!1),broadphaseColor:s(V,"broadphaseColor",16757760),showBounds:s(V,"showBounds",!1),boundsColor:s(V,"boundsColor",16777215),showVelocity:s(V,"showVelocity",!1),velocityColor:s(V,"velocityColor",44783),showCollisions:s(V,"showCollisions",!1),collisionColor:s(V,"collisionColor",16094476),showSeparations:s(V,"showSeparations",!1),separationColor:s(V,"separationColor",16753920),showBody:s(V,"showBody",!0),showStaticBody:s(V,"showStaticBody",!0),showInternalEdges:s(V,"showInternalEdges",!1),renderFill:s(V,"renderFill",!1),renderLine:s(V,"renderLine",!0),fillColor:s(V,"fillColor",1075465),fillOpacity:s(V,"fillOpacity",1),lineColor:s(V,"lineColor",2678297),lineOpacity:s(V,"lineOpacity",1),lineThickness:s(V,"lineThickness",1),staticFillColor:s(V,"staticFillColor",857979),staticLineColor:s(V,"staticLineColor",1255396),showSleeping:s(V,"showSleeping",!1),staticBodySleepOpacity:s(V,"staticBodySleepOpacity",.7),sleepFillColor:s(V,"sleepFillColor",4605510),sleepLineColor:s(V,"sleepLineColor",10066585),showSensors:s(V,"showSensors",!0),sensorFillColor:s(V,"sensorFillColor",857979),sensorLineColor:s(V,"sensorLineColor",1255396),showPositions:s(V,"showPositions",!0),positionSize:s(V,"positionSize",4),positionColor:s(V,"positionColor",14697178),showJoint:s(V,"showJoint",!0),jointColor:s(V,"jointColor",14737474),jointLineOpacity:s(V,"jointLineOpacity",1),jointLineThickness:s(V,"jointLineThickness",2),pinSize:s(V,"pinSize",4),pinColor:s(V,"pinColor",4382944),springColor:s(V,"springColor",14697184),anchorColor:s(V,"anchorColor",15724527),anchorSize:s(V,"anchorSize",4),showConvexHulls:s(V,"showConvexHulls",!1),hullColor:s(V,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),s(P,"setBounds",!1)){var K=P.setBounds;if(typeof K=="boolean")this.setBounds();else{var j=s(K,"x",0),J=s(K,"y",0),X=s(K,"width",C.sys.scale.width),Y=s(K,"height",C.sys.scale.height),b=s(K,"thickness",64),z=s(K,"left",!0),W=s(K,"right",!0),H=s(K,"top",!0),Z=s(K,"bottom",!0);this.setBounds(j,J,X,Y,b,z,W,H,Z)}}},setCompositeRenderStyle:function(x){var C=x.bodies,P=x.constraints,M=x.composites,w,I,L;for(w=0;w0&&(I=w[0].bodyA,L=w[0].bodyB),x.emit(h.COLLISION_START,M,I,L)}),u.on(C,"collisionActive",function(M){var w=M.pairs,I,L;w.length>0&&(I=w[0].bodyA,L=w[0].bodyB),x.emit(h.COLLISION_ACTIVE,M,I,L)}),u.on(C,"collisionEnd",function(M){var w=M.pairs,I,L;w.length>0&&(I=w[0].bodyA,L=w[0].bodyB),x.emit(h.COLLISION_END,M,I,L)})},setBounds:function(x,C,P,M,w,I,L,B,N){return x===void 0&&(x=0),C===void 0&&(C=0),P===void 0&&(P=this.scene.sys.scale.width),M===void 0&&(M=this.scene.sys.scale.height),w===void 0&&(w=64),I===void 0&&(I=!0),L===void 0&&(L=!0),B===void 0&&(B=!0),N===void 0&&(N=!0),this.updateWall(I,"left",x-w,C-w,w,M+w*2),this.updateWall(L,"right",x+P,C-w,w,M+w*2),this.updateWall(B,"top",x,C-w,P,w),this.updateWall(N,"bottom",x,C+M,P,w),this},updateWall:function(x,C,P,M,w,I){var L=this.walls[C];x?(L&&p.remove(this.localWorld,L),P+=w/2,M+=I/2,this.walls[C]=this.create(P,M,w,I,{isStatic:!0,friction:0,frictionStatic:0})):(L&&p.remove(this.localWorld,L),this.walls[C]=null)},createDebugGraphic:function(){var x=this.scene.sys.add.graphics({x:0,y:0});return x.setDepth(Number.MAX_VALUE),this.debugGraphic=x,this.drawDebug=!0,x},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(x,C,P){return x===void 0&&(x=0),C===void 0&&(C=1),P===void 0&&(P=.001),this.localWorld.gravity.x=x,this.localWorld.gravity.y=C,this.localWorld.gravity.scale=P,this},create:function(x,C,P,M,w){var I=o.rectangle(x,C,P,M,w);return p.add(this.localWorld,I),I},add:function(x){return p.add(this.localWorld,x),this},remove:function(x,C){Array.isArray(x)||(x=[x]);for(var P=0;PM.deltaMax?M.deltaMax:C,M.delta=C),M.timeScalePrev=w.timeScale,M.frameCounter+=1,x-M.counterTimestamp>=1e3&&(M.fps=M.frameCounter*((x-M.counterTimestamp)/1e3),M.counterTimestamp=x,M.frameCounter=0),e.update(P,C)}},step:function(x){e.update(this.engine,x)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(x){var C=x.hasOwnProperty("body")?x.body:x;return n.get(this.localWorld,C.id,C.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 x=this.debugConfig,C=this.engine,P=this.debugGraphic,M=n.allBodies(this.localWorld);this.debugGraphic.clear(),x.showBroadphase&&C.broadphase.controller&&this.renderGrid(C.broadphase,P,x.broadphaseColor,.5),x.showBounds&&this.renderBodyBounds(M,P,x.boundsColor,.5),(x.showBody||x.showStaticBody)&&this.renderBodies(M),x.showJoint&&this.renderJoints(),(x.showAxes||x.showAngleIndicator)&&this.renderBodyAxes(M,P,x.showAxes,x.angleColor,.5),x.showVelocity&&this.renderBodyVelocity(M,P,x.velocityColor,1,2),x.showSeparations&&this.renderSeparations(C.pairs.list,P,x.separationColor),x.showCollisions&&this.renderCollisions(C.pairs.list,P,x.collisionColor)}},renderGrid:function(x,C,P,M){C.lineStyle(1,P,M);for(var w=r.keys(x.buckets),I=0;I0){var V=G[0].vertex.x,K=G[0].vertex.y;G.length===2&&(V=(G[0].vertex.x+G[1].vertex.x)/2,K=(G[0].vertex.y+G[1].vertex.y)/2),N.bodyB===N.supports[0].body||N.bodyA.isStatic?C.lineBetween(V-N.normal.x*8,K-N.normal.y*8,V,K):C.lineBetween(V+N.normal.x*8,K+N.normal.y*8,V,K)}}return this},renderBodyBounds:function(x,C,P,M){C.lineStyle(1,P,M);for(var w=0;w1?1:0;N1?1:0;G1?1:0;G1&&this.renderConvexHull(Y,C,J,W)}}},renderBody:function(x,C,P,M,w,I,L,B){M===void 0&&(M=null),w===void 0&&(w=null),I===void 0&&(I=1),L===void 0&&(L=null),B===void 0&&(B=null);for(var N=this.debugConfig,G=N.sensorFillColor,V=N.sensorLineColor,K=x.parts,j=K.length,J=j>1?1:0;J1){var L=x.vertices;C.lineStyle(M,P),C.beginPath(),C.moveTo(L[0].x,L[0].y);for(var B=1;B0&&(C.fillStyle(L),C.fillCircle(K.x,K.y,B),C.fillCircle(j.x,j.y,B)),this},resetCollisionIDs:function(){return v._nextCollidingGroupId=1,v._nextNonCollidingGroupId=-1,v._nextCategory=1,this},shutdown:function(){u.off(this.engine),this.removeAllListeners(),p.clear(this.localWorld,!1),e.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});c.exports=y},70410:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4475,15 +4475,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var a=0;if(!Array.isArray(t))a=t;else for(var v=0;v{/** + */var m={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var o=0;if(!Array.isArray(t))o=t;else for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22562),v={applyForce:function(o){return this._tempVec2.set(this.body.position.x,this.body.position.y),a.applyForce(this.body,this._tempVec2,o),this},applyForceFrom:function(o,r){return a.applyForce(this.body,o,r),this},thrust:function(o){var r=this.body.angle;return this._tempVec2.set(o*Math.cos(r),o*Math.sin(r)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(o){var r=this.body.angle-Math.PI/2;return this._tempVec2.set(o*Math.cos(r),o*Math.sin(r)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(o){var r=this.body.angle+Math.PI/2;return this._tempVec2.set(o*Math.cos(r),o*Math.sin(r)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(o){var r=this.body.angle-Math.PI;return this._tempVec2.set(o*Math.cos(r),o*Math.sin(r)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};c.exports=v},5436:c=>{/** + */var o=t(22562),v={applyForce:function(a){return this._tempVec2.set(this.body.position.x,this.body.position.y),o.applyForce(this.body,this._tempVec2,a),this},applyForceFrom:function(a,r){return o.applyForce(this.body,a,r),this},thrust:function(a){var r=this.body.angle;return this._tempVec2.set(a*Math.cos(r),a*Math.sin(r)),o.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(a){var r=this.body.angle-Math.PI/2;return this._tempVec2.set(a*Math.cos(r),a*Math.sin(r)),o.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(a){var r=this.body.angle+Math.PI/2;return this._tempVec2.set(a*Math.cos(r),a*Math.sin(r)),o.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(a){var r=this.body.angle-Math.PI;return this._tempVec2.set(a*Math.cos(r),a*Math.sin(r)),o.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};c.exports=v},5436:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setFriction:function(t,a,v){return this.body.friction=t,a!==void 0&&(this.body.frictionAir=a),v!==void 0&&(this.body.frictionStatic=v),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};c.exports=m},39858:c=>{/** + */var m={setFriction:function(t,o,v){return this.body.friction=t,o!==void 0&&(this.body.frictionAir=o),v!==void 0&&(this.body.frictionStatic=v),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};c.exports=m},39858:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4491,7 +4491,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22562),v=t(26099),o={setMass:function(r){return a.setMass(this.body,r),this},setDensity:function(r){return a.setDensity(this.body,r),this},centerOfMass:{get:function(){return new v(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};c.exports=o},39132:c=>{/** + */var o=t(22562),v=t(26099),a={setMass:function(r){return o.setMass(this.body,r),this},setDensity:function(r){return o.setDensity(this.body,r),this},centerOfMass:{get:function(){return new v(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};c.exports=a},39132:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4499,23 +4499,23 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66280),v=t(22562),o=t(43855),r=t(95540),n=t(19496),e=t(85791),i=t(41598),h={setRectangle:function(s,l,f){return this.setBody({type:"rectangle",width:s,height:l},f)},setCircle:function(s,l){return this.setBody({type:"circle",radius:s},l)},setPolygon:function(s,l,f){return this.setBody({type:"polygon",sides:l,radius:s},f)},setTrapezoid:function(s,l,f,u){return this.setBody({type:"trapezoid",width:s,height:l,slope:f},u)},setExistingBody:function(s,l){l===void 0&&(l=!0),this.body&&this.world.remove(this.body,!0),this.body=s;for(var f=0;f{/** + */var o=t(66280),v=t(22562),a=t(43855),r=t(95540),n=t(19496),e=t(85791),i=t(41598),h={setRectangle:function(s,l,f){return this.setBody({type:"rectangle",width:s,height:l},f)},setCircle:function(s,l){return this.setBody({type:"circle",radius:s},l)},setPolygon:function(s,l,f){return this.setBody({type:"polygon",sides:l,radius:s},f)},setTrapezoid:function(s,l,f,u){return this.setBody({type:"trapezoid",width:s,height:l,slope:f},u)},setExistingBody:function(s,l){l===void 0&&(l=!0),this.body&&this.world.remove(this.body,!0),this.body=s;for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(1121),v=t(53614),o=t(35810),r={setToSleep:function(){return v.set(this.body,!0),this},setAwake:function(){return v.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;o.on(this.body,"sleepStart",function(i){e.emit(a.SLEEP_START,i,this)})}else o.off(this.body,"sleepStart");return this},setSleepEndEvent:function(n){if(n){var e=this.world;o.on(this.body,"sleepEnd",function(i){e.emit(a.SLEEP_END,i,this)})}else o.off(this.body,"sleepEnd");return this}};c.exports=r},90556:(c,m,t)=>{/** + */var o=t(1121),v=t(53614),a=t(35810),r={setToSleep:function(){return v.set(this.body,!0),this},setAwake:function(){return v.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;a.on(this.body,"sleepStart",function(i){e.emit(o.SLEEP_START,i,this)})}else a.off(this.body,"sleepStart");return this},setSleepEndEvent:function(n){if(n){var e=this.world;a.on(this.body,"sleepEnd",function(i){e.emit(o.SLEEP_END,i,this)})}else a.off(this.body,"sleepEnd");return this}};c.exports=r},90556:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22562),v={setStatic:function(o){return a.setStatic(this.body,o),this},isStatic:function(){return this.body.isStatic}};c.exports=v},85436:(c,m,t)=>{/** + */var o=t(22562),v={setStatic:function(a){return o.setStatic(this.body,a),this},isStatic:function(){return this.body.isStatic}};c.exports=v},85436:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22562),v=t(36383),o=t(86554),r=t(30954),n=4,e={x:{get:function(){return this.body.position.x},set:function(i){this._tempVec2.set(i,this.y),a.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(i){this._tempVec2.set(this.x,i),a.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(i){var h=1/this._scaleX,s=1/this._scaleY;this._scaleX=i,this._scaleX===0?this.renderFlags&=~n:this.renderFlags|=n,a.scale(this.body,h,s),a.scale(this.body,i,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(i){var h=1/this._scaleX,s=1/this._scaleY;this._scaleY=i,this._scaleY===0?this.renderFlags&=~n:this.renderFlags|=n,a.scale(this.body,h,s),a.scale(this.body,this._scaleX,i)}},angle:{get:function(){return r(this.body.angle*v.RAD_TO_DEG)},set:function(i){this.rotation=r(i)*v.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(i){this._rotation=o(i),a.setAngle(this.body,this._rotation)}},setPosition:function(i,h){return i===void 0&&(i=0),h===void 0&&(h=i),this._tempVec2.set(i,h),a.setPosition(this.body,this._tempVec2),this},setRotation:function(i){return i===void 0&&(i=0),this._rotation=o(i),a.setAngle(this.body,i),this},setFixedRotation:function(){return a.setInertia(this.body,1/0),this},setAngle:function(i){return i===void 0&&(i=0),this.angle=i,a.setAngle(this.body,this.rotation),this},setScale:function(i,h,s){i===void 0&&(i=1),h===void 0&&(h=i);var l=1/this._scaleX,f=1/this._scaleY;return this._scaleX=i,this._scaleY=h,a.scale(this.body,l,f,s),a.scale(this.body,i,h,s),this}};c.exports=e},42081:(c,m,t)=>{/** + */var o=t(22562),v=t(36383),a=t(86554),r=t(30954),n=4,e={x:{get:function(){return this.body.position.x},set:function(i){this._tempVec2.set(i,this.y),o.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(i){this._tempVec2.set(this.x,i),o.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(i){var h=1/this._scaleX,s=1/this._scaleY;this._scaleX=i,this._scaleX===0?this.renderFlags&=~n:this.renderFlags|=n,o.scale(this.body,h,s),o.scale(this.body,i,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(i){var h=1/this._scaleX,s=1/this._scaleY;this._scaleY=i,this._scaleY===0?this.renderFlags&=~n:this.renderFlags|=n,o.scale(this.body,h,s),o.scale(this.body,this._scaleX,i)}},angle:{get:function(){return r(this.body.angle*v.RAD_TO_DEG)},set:function(i){this.rotation=r(i)*v.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(i){this._rotation=a(i),o.setAngle(this.body,this._rotation)}},setPosition:function(i,h){return i===void 0&&(i=0),h===void 0&&(h=i),this._tempVec2.set(i,h),o.setPosition(this.body,this._tempVec2),this},setRotation:function(i){return i===void 0&&(i=0),this._rotation=a(i),o.setAngle(this.body,i),this},setFixedRotation:function(){return o.setInertia(this.body,1/0),this},setAngle:function(i){return i===void 0&&(i=0),this.angle=i,o.setAngle(this.body,this.rotation),this},setScale:function(i,h,s){i===void 0&&(i=1),h===void 0&&(h=i);var l=1/this._scaleX,f=1/this._scaleY;return this._scaleX=i,this._scaleY=h,o.scale(this.body,l,f,s),o.scale(this.body,i,h,s),this}};c.exports=e},42081:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22562),v={setVelocityX:function(o){return this._tempVec2.set(o,this.body.velocity.y),a.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(o){return this._tempVec2.set(this.body.velocity.x,o),a.setVelocity(this.body,this._tempVec2),this},setVelocity:function(o,r){return this._tempVec2.set(o,r),a.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return a.getVelocity(this.body)},setAngularVelocity:function(o){return a.setAngularVelocity(this.body,o),this},getAngularVelocity:function(){return a.getAngularVelocity(this.body)},setAngularSpeed:function(o){return a.setAngularSpeed(this.body,o),this},getAngularSpeed:function(){return a.getAngularSpeed(this.body)}};c.exports=v},31884:(c,m,t)=>{/** + */var o=t(22562),v={setVelocityX:function(a){return this._tempVec2.set(a,this.body.velocity.y),o.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(a){return this._tempVec2.set(this.body.velocity.x,a),o.setVelocity(this.body,this._tempVec2),this},setVelocity:function(a,r){return this._tempVec2.set(a,r),o.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return o.getVelocity(this.body)},setAngularVelocity:function(a){return o.setAngularVelocity(this.body,a),this},getAngularVelocity:function(){return o.getAngularVelocity(this.body)},setAngularSpeed:function(a){return o.setAngularSpeed(this.body,a),this},getAngularSpeed:function(){return o.getAngularSpeed(this.body)}};c.exports=v},31884:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4591,18 +4591,18 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.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:(c,m,t)=>{var a={};c.exports=a;var v=t(41598),o=t(31725),r=t(53614),n=t(53402),e=t(15647),i=t(66615);(function(){a._timeCorrection=!0,a._inertiaScale=4,a._nextCollidingGroupId=1,a._nextNonCollidingGroupId=-1,a._nextCategory=1,a._baseDelta=16.666666666666668,a.create=function(s){var l={id:n.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},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:{}};!s.hasOwnProperty("position")&&s.hasOwnProperty("vertices")?s.position=v.centre(s.vertices):s.hasOwnProperty("vertices")||(l.vertices=v.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var f=n.extend(l,s);return h(f,s),f.setOnCollideWith=function(u,d){return d?this.onCollideWith[u.id]=d:delete this.onCollideWith[u.id],this},f},a.nextGroup=function(s){return s?a._nextNonCollidingGroupId--:a._nextCollidingGroupId++},a.nextCategory=function(){return a._nextCategory=a._nextCategory<<1,a._nextCategory};var h=function(s,l){if(l=l||{},a.set(s,{bounds:s.bounds||e.create(s.vertices),positionPrev:s.positionPrev||o.clone(s.position),anglePrev:s.anglePrev||s.angle,vertices:s.vertices,parts:s.parts||[s],isStatic:s.isStatic,isSleeping:s.isSleeping,parent:s.parent||s}),v.rotate(s.vertices,s.angle,s.position),i.rotate(s.axes,s.angle),e.update(s.bounds,s.vertices,s.velocity),a.set(s,{axes:l.axes||s.axes,area:l.area||s.area,mass:l.mass||s.mass,inertia:l.inertia||s.inertia}),s.parts.length===1){var f=s.bounds,u=s.centerOfMass,d=s.centerOffset,p=f.max.x-f.min.x,g=f.max.y-f.min.y;u.x=-(f.min.x-s.position.x)/p,u.y=-(f.min.y-s.position.y)/g,d.x=p*u.x,d.y=g*u.y}};a.set=function(s,l,f){var u;typeof l=="string"&&(u=l,l={},l[u]=f);for(u in l)if(Object.prototype.hasOwnProperty.call(l,u))switch(f=l[u],u){case"isStatic":a.setStatic(s,f);break;case"isSleeping":r.set(s,f);break;case"mass":a.setMass(s,f);break;case"density":a.setDensity(s,f);break;case"inertia":a.setInertia(s,f);break;case"vertices":a.setVertices(s,f);break;case"position":a.setPosition(s,f);break;case"angle":a.setAngle(s,f);break;case"velocity":a.setVelocity(s,f);break;case"angularVelocity":a.setAngularVelocity(s,f);break;case"speed":a.setSpeed(s,f);break;case"angularSpeed":a.setAngularSpeed(s,f);break;case"parts":a.setParts(s,f);break;case"centre":a.setCentre(s,f);break;default:s[u]=f}},a.setStatic=function(s,l){for(var f=0;f0&&o.rotateAbout(p.position,u,s.position,p.position)}},a.setVelocity=function(s,l){var f=s.deltaTime/a._baseDelta;s.positionPrev.x=s.position.x-l.x*f,s.positionPrev.y=s.position.y-l.y*f,s.velocity.x=(s.position.x-s.positionPrev.x)/f,s.velocity.y=(s.position.y-s.positionPrev.y)/f,s.speed=o.magnitude(s.velocity)},a.getVelocity=function(s){var l=a._baseDelta/s.deltaTime;return{x:(s.position.x-s.positionPrev.x)*l,y:(s.position.y-s.positionPrev.y)*l}},a.getSpeed=function(s){return o.magnitude(a.getVelocity(s))},a.setSpeed=function(s,l){a.setVelocity(s,o.mult(o.normalise(a.getVelocity(s)),l))},a.setAngularVelocity=function(s,l){var f=s.deltaTime/a._baseDelta;s.anglePrev=s.angle-l*f,s.angularVelocity=(s.angle-s.anglePrev)/f,s.angularSpeed=Math.abs(s.angularVelocity)},a.getAngularVelocity=function(s){return(s.angle-s.anglePrev)*a._baseDelta/s.deltaTime},a.getAngularSpeed=function(s){return Math.abs(a.getAngularVelocity(s))},a.setAngularSpeed=function(s,l){a.setAngularVelocity(s,n.sign(a.getAngularVelocity(s))*l)},a.translate=function(s,l,f){a.setPosition(s,o.add(s.position,l),f)},a.rotate=function(s,l,f,u){if(!f)a.setAngle(s,s.angle+l,u);else{var d=Math.cos(l),p=Math.sin(l),g=s.position.x-f.x,y=s.position.y-f.y;a.setPosition(s,{x:f.x+(g*d-y*p),y:f.y+(g*p+y*d)},u),a.setAngle(s,s.angle+l,u)}},a.scale=function(s,l,f,u){var d=0,p=0;u=u||s.position;for(var g=s.inertia===1/0,y=0;y0&&(d+=x.area,p+=x.inertia),x.position.x=u.x+(x.position.x-u.x)*l,x.position.y=u.y+(x.position.y-u.y)*f,e.update(x.bounds,x.vertices,s.velocity)}s.parts.length>1&&(s.area=d,s.isStatic||(a.setMass(s,s.density*d),a.setInertia(s,p))),s.circleRadius&&(l===f?s.circleRadius*=l:s.circleRadius=null),g&&a.setInertia(s,1/0)},a.update=function(s,l){l=(typeof l<"u"?l:16.666666666666668)*s.timeScale;var f=l*l,u=a._timeCorrection?l/(s.deltaTime||l):1,d=1-s.frictionAir*(l/n._baseDelta),p=(s.position.x-s.positionPrev.x)*u,g=(s.position.y-s.positionPrev.y)*u;s.velocity.x=p*d+s.force.x/s.mass*f,s.velocity.y=g*d+s.force.y/s.mass*f,s.positionPrev.x=s.position.x,s.positionPrev.y=s.position.y,s.position.x+=s.velocity.x,s.position.y+=s.velocity.y,s.deltaTime=l,s.angularVelocity=(s.angle-s.anglePrev)*d*u+s.torque/s.inertia*f,s.anglePrev=s.angle,s.angle+=s.angularVelocity,s.speed=o.magnitude(s.velocity),s.angularSpeed=Math.abs(s.angularVelocity);for(var y=0;y0&&(x.position.x+=s.velocity.x,x.position.y+=s.velocity.y),s.angularVelocity!==0&&(v.rotate(x.vertices,s.angularVelocity,s.position),i.rotate(x.axes,s.angularVelocity),y>0&&o.rotateAbout(x.position,s.angularVelocity,s.position,x.position)),e.update(x.bounds,x.vertices,s.velocity)}},a.updateVelocities=function(s){var l=a._baseDelta/s.deltaTime,f=s.velocity;f.x=(s.position.x-s.positionPrev.x)*l,f.y=(s.position.y-s.positionPrev.y)*l,s.speed=Math.sqrt(f.x*f.x+f.y*f.y),s.angularVelocity=(s.angle-s.anglePrev)*l,s.angularSpeed=Math.abs(s.angularVelocity)},a.applyForce=function(s,l,f){var u={x:l.x-s.position.x,y:l.y-s.position.y};s.force.x+=f.x,s.force.y+=f.y,s.torque+=u.x*f.y-u.y*f.x},a._totalProperties=function(s){for(var l={mass:0,area:0,inertia:0,centre:{x:0,y:0}},f=s.parts.length===1?0:1;f{var a={};c.exports=a;var v=t(35810),o=t(53402),r=t(15647),n=t(22562);(function(){a.create=function(e){return o.extend({id:o.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},a.setModified=function(e,i,h,s){if(v.trigger(e,"compositeModified",e),e.isModified=i,i&&e.cache&&(e.cache.allBodies=null,e.cache.allConstraints=null,e.cache.allComposites=null),h&&e.parent&&a.setModified(e.parent,i,h,s),s)for(var l=0;l{var a={};c.exports=a;var v=t(69351);(function(){a.create=v.create,a.add=v.add,a.remove=v.remove,a.clear=v.clear,a.addComposite=v.addComposite,a.addBody=v.addBody,a.addConstraint=v.addConstraint})()},52284:(c,m,t)=>{var a={};c.exports=a;var v=t(41598),o=t(4506);(function(){var r=[],n={overlap:0,axis:null},e={overlap:0,axis:null};a.create=function(i,h){return{pair:null,collided:!1,bodyA:i,bodyB:h,parentA:i.parent,parentB:h.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[]}},a.collides=function(i,h,s){if(a._overlapAxes(n,i.vertices,h.vertices,i.axes),n.overlap<=0||(a._overlapAxes(e,h.vertices,i.vertices,h.axes),e.overlap<=0))return null;var l=s&&s.table[o.id(i,h)],f;l?f=l.collision:(f=a.create(i,h),f.collided=!0,f.bodyA=i.idX?X=F:F<$&&($=F);for(N=1;NY?Y=F:Ff?f=d:d{var m={};c.exports=m,function(){m.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}}()},81388:(c,m,t)=>{var a={};c.exports=a;var v=t(53402),o=t(52284);(function(){a.create=function(r){var n={bodies:[],pairs:null};return v.extend(n,r)},a.setBodies=function(r,n){r.bodies=n.slice(0)},a.clear=function(r){r.bodies=[]},a.collisions=function(r){var n=[],e=r.pairs,i=r.bodies,h=i.length,s=a.canCollide,l=o.collides,f,u;for(i.sort(a._compareBoundsX),f=0;fg)break;if(!(yL.max.y)&&!(T&&(w.isStatic||w.isSleeping))&&s(d.collisionFilter,w.collisionFilter)){var F=w.parts.length;if(M&&F===1){var O=l(d,w,e);O&&n.push(O)}else for(var N=C>1?1:0,G=F>1?1:0,V=N;VL.max.x||p.max.xL.max.y)){var O=l(K,J,e);O&&n.push(O)}}}}}return n},a.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},a._compareBoundsX=function(r,n){return r.bounds.min.x-n.bounds.min.x}})()},4506:(c,m,t)=>{var a={};c.exports=a;var v=t(43424);(function(){a.create=function(o,r){var n=o.bodyA,e=o.bodyB,i={id:a.id(n,e),bodyA:n,bodyB:e,collision:o,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||e.isSensor,timeCreated:r,timeUpdated:r,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return a.update(i,o,r),i},a.update=function(o,r,n){var e=o.contacts,i=r.supports,h=o.activeContacts,s=r.parentA,l=r.parentB,f=s.vertices.length;o.isActive=!0,o.timeUpdated=n,o.collision=r,o.separation=r.depth,o.inverseMass=s.inverseMass+l.inverseMass,o.friction=s.frictionl.frictionStatic?s.frictionStatic:l.frictionStatic,o.restitution=s.restitution>l.restitution?s.restitution:l.restitution,o.slop=s.slop>l.slop?s.slop:l.slop,r.pair=o,h.length=0;for(var u=0;u{var a={};c.exports=a;var v=t(4506),o=t(53402);(function(){a.create=function(r){return o.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},r)},a.update=function(r,n,e){var i=r.list,h=i.length,s=r.table,l=n.length,f=r.collisionStart,u=r.collisionEnd,d=r.collisionActive,p,g,y,x;for(f.length=0,u.length=0,d.length=0,x=0;x{var a={};c.exports=a;var v=t(31725),o=t(52284),r=t(15647),n=t(66280),e=t(41598);(function(){a.collides=function(i,h){for(var s=[],l=h.length,f=i.bounds,u=o.collides,d=r.overlaps,p=0;p{var a={};c.exports=a;var v=t(41598),o=t(53402),r=t(15647);(function(){a._restingThresh=2,a._restingThreshTangent=Math.sqrt(6),a._positionDampen=.9,a._positionWarming=.8,a._frictionNormalMultiplier=5,a._frictionMaxStatic=Number.MAX_VALUE,a.preSolvePosition=function(n){var e,i,h,s=n.length;for(e=0;ect?(y=Pt>0?Pt:-Pt,g=C.friction*(Pt>0?1:-1)*s,g<-y?g=-y:g>y&&(g=y)):(g=Pt,y=d);var Tt=H*G-Z*N,pt=Q*G-k*N,Mt=X/(Y+w.inverseInertia*Tt*Tt+L.inverseInertia*pt*pt),It=(1+C.restitution)*vt*Mt;if(g*=Mt,vt0&&(z.normalImpulse=0),It=z.normalImpulse-Kt}if(Pt<-f||Pt>f)z.tangentImpulse=0;else{var Gt=z.tangentImpulse;z.tangentImpulse+=g,z.tangentImpulse<-y&&(z.tangentImpulse=-y),z.tangentImpulse>y&&(z.tangentImpulse=y),g=z.tangentImpulse-Gt}var Wt=N*It+V*g,Bt=G*It+K*g;w.isStatic||w.isSleeping||(w.positionPrev.x+=Wt*w.inverseMass,w.positionPrev.y+=Bt*w.inverseMass,w.anglePrev+=(H*Bt-Z*Wt)*w.inverseInertia),L.isStatic||L.isSleeping||(L.positionPrev.x-=Wt*L.inverseMass,L.positionPrev.y-=Bt*L.inverseMass,L.anglePrev-=(Q*Bt-k*Wt)*L.inverseInertia)}}}}})()},48140:(c,m,t)=>{var a={};c.exports=a;var v=t(41598),o=t(31725),r=t(53614),n=t(15647),e=t(66615),i=t(53402);(function(){a._warming=.4,a._torqueDampen=1,a._minLength=1e-6,a.create=function(h){var s=h;s.bodyA&&!s.pointA&&(s.pointA={x:0,y:0}),s.bodyB&&!s.pointB&&(s.pointB={x:0,y:0});var l=s.bodyA?o.add(s.bodyA.position,s.pointA):s.pointA,f=s.bodyB?o.add(s.bodyB.position,s.pointB):s.pointB,u=o.magnitude(o.sub(l,f));s.length=typeof s.length<"u"?s.length:u,s.id=s.id||i.nextId(),s.label=s.label||"Constraint",s.type="constraint",s.stiffness=s.stiffness||(s.length>0?1:.7),s.damping=s.damping||0,s.angularStiffness=s.angularStiffness||0,s.angleA=s.bodyA?s.bodyA.angle:s.angleA,s.angleB=s.bodyB?s.bodyB.angle:s.angleB,s.plugin={};var d={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return s.length===0&&s.stiffness>.1?(d.type="pin",d.anchors=!1):s.stiffness<.9&&(d.type="spring"),s.render=i.extend(d,s.render),s},a.preSolveAll=function(h){for(var s=0;s=1||h.length===0,M=C?h.stiffness*s:h.stiffness*s*s,w=h.damping*s,L=o.mult(y,T*M),F=(l?l.inverseMass:0)+(f?f.inverseMass:0),O=(l?l.inverseInertia:0)+(f?f.inverseInertia:0),N=F+O,G,V,K,$,J;if(w>0){var X=o.create();K=o.div(y,x),J=o.sub(f&&o.sub(f.position,f.positionPrev)||X,l&&o.sub(l.position,l.positionPrev)||X),$=o.dot(K,J)}l&&!l.isStatic&&(V=l.inverseMass/F,l.constraintImpulse.x-=L.x*V,l.constraintImpulse.y-=L.y*V,l.position.x-=L.x*V,l.position.y-=L.y*V,w>0&&(l.positionPrev.x-=w*K.x*$*V,l.positionPrev.y-=w*K.y*$*V),G=o.cross(u,L)/N*a._torqueDampen*l.inverseInertia*(1-h.angularStiffness),l.constraintImpulse.angle-=G,l.angle-=G),f&&!f.isStatic&&(V=f.inverseMass/F,f.constraintImpulse.x+=L.x*V,f.constraintImpulse.y+=L.y*V,f.position.x+=L.x*V,f.position.y+=L.y*V,w>0&&(f.positionPrev.x+=w*K.x*$*V,f.positionPrev.y+=w*K.y*$*V),G=o.cross(d,L)/N*a._torqueDampen*f.inverseInertia*(1-h.angularStiffness),f.constraintImpulse.angle+=G,f.angle+=G)}}},a.postSolveAll=function(h){for(var s=0;s0&&(d.position.x+=f.x,d.position.y+=f.y),f.angle!==0&&(v.rotate(d.vertices,f.angle,l.position),e.rotate(d.axes,f.angle),u>0&&o.rotateAbout(d.position,f.angle,l.position,d.position)),n.update(d.bounds,d.vertices,l.velocity)}f.angle*=a._warming,f.x*=a._warming,f.y*=a._warming}}},a.pointAWorld=function(h){return{x:(h.bodyA?h.bodyA.position.x:0)+(h.pointA?h.pointA.x:0),y:(h.bodyA?h.bodyA.position.y:0)+(h.pointA?h.pointA.y:0)}},a.pointBWorld=function(h){return{x:(h.bodyB?h.bodyB.position.x:0)+(h.pointB?h.pointB.x:0),y:(h.bodyB?h.bodyB.position.y:0)+(h.pointB?h.pointB.y:0)}},a.currentLength=function(h){var s=(h.bodyA?h.bodyA.position.x:0)+(h.pointA?h.pointA.x:0),l=(h.bodyA?h.bodyA.position.y:0)+(h.pointA?h.pointA.y:0),f=(h.bodyB?h.bodyB.position.x:0)+(h.pointB?h.pointB.x:0),u=(h.bodyB?h.bodyB.position.y:0)+(h.pointB?h.pointB.y:0),d=s-f,p=l-u;return Math.sqrt(d*d+p*p)}})()},53402:(c,m,t)=>{var a={};c.exports=a,function(){a._baseDelta=16.666666666666668,a._nextId=0,a._seed=0,a._nowStartTime=+new Date,a._warnedOnce={},a._decomp=null,a.extend=function(o,r){var n,e;typeof r=="boolean"?(n=2,e=r):(n=1,e=!0);for(var i=n;i0;r--){var n=Math.floor(a.random()*(r+1)),e=o[r];o[r]=o[n],o[n]=e}return o},a.choose=function(o){return o[Math.floor(a.random()*o.length)]},a.isElement=function(o){return typeof HTMLElement<"u"?o instanceof HTMLElement:!!(o&&o.nodeType&&o.nodeName)},a.isArray=function(o){return Object.prototype.toString.call(o)==="[object Array]"},a.isFunction=function(o){return typeof o=="function"},a.isPlainObject=function(o){return typeof o=="object"&&o.constructor===Object},a.isString=function(o){return toString.call(o)==="[object String]"},a.clamp=function(o,r,n){return on?n:o},a.sign=function(o){return o<0?-1:1},a.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-a._nowStartTime},a.random=function(o,r){return o=typeof o<"u"?o:0,r=typeof r<"u"?r:1,o+v()*(r-o)};var v=function(){return a._seed=(a._seed*9301+49297)%233280,a._seed/233280};a.colorToNumber=function(o){return o=o.replace("#",""),o.length==3&&(o=o.charAt(0)+o.charAt(0)+o.charAt(1)+o.charAt(1)+o.charAt(2)+o.charAt(2)),parseInt(o,16)},a.logLevel=1,a.log=function(){console&&a.logLevel>0&&a.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},a.info=function(){console&&a.logLevel>0&&a.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},a.warn=function(){console&&a.logLevel>0&&a.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},a.warnOnce=function(){var o=Array.prototype.slice.call(arguments).join(" ");a._warnedOnce[o]||(a.warn(o),a._warnedOnce[o]=!0)},a.deprecated=function(o,r,n){o[r]=a.chain(function(){a.warnOnce("🔅 deprecated 🔅",n)},o[r])},a.nextId=function(){return a._nextId++},a.indexOf=function(o,r){if(o.indexOf)return o.indexOf(r);for(var n=0;n{var a={};c.exports=a;var v=t(53614),o=t(66272),r=t(81388),n=t(99561),e=t(35810),i=t(69351),h=t(48140),s=t(53402),l=t(22562);(function(){a.create=function(f){f=f||{};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}},d=s.extend(u,f);return d.world=f.world||i.create({label:"World"}),d.pairs=f.pairs||n.create(),d.detector=f.detector||r.create(),d.grid={buckets:[]},d.world.gravity=d.gravity,d.broadphase=d.grid,d.metrics={},d},a.update=function(f,u){var d=s.now(),p=f.world,g=f.detector,y=f.pairs,x=f.timing,T=x.timestamp,C;u=typeof u<"u"?u:s._baseDelta,u*=x.timeScale,x.timestamp+=u,x.lastDelta=u;var M={timestamp:x.timestamp,delta:u};e.trigger(f,"beforeUpdate",M);var w=i.allBodies(p),L=i.allConstraints(p);for(p.isModified&&(r.setBodies(g,w),i.setModified(p,!1,!1,!0)),f.enableSleeping&&v.update(w,u),a._bodiesApplyGravity(w,f.gravity),u>0&&a._bodiesUpdate(w,u),e.trigger(f,"beforeSolve",M),h.preSolveAll(w),C=0;C0&&e.trigger(f,"collisionStart",{pairs:y.collisionStart,timestamp:x.timestamp,delta:u});var O=s.clamp(20/f.positionIterations,0,1);for(o.preSolvePosition(y.list),C=0;C0&&e.trigger(f,"collisionActive",{pairs:y.collisionActive,timestamp:x.timestamp,delta:u}),y.collisionEnd.length>0&&e.trigger(f,"collisionEnd",{pairs:y.collisionEnd,timestamp:x.timestamp,delta:u}),a._bodiesClearForces(w),e.trigger(f,"afterUpdate",M),f.timing.lastElapsed=s.now()-d,f},a.merge=function(f,u){if(s.extend(f,u),u.world){f.world=u.world,a.clear(f);for(var d=i.allBodies(f.world),p=0;p{var a={};c.exports=a;var v=t(53402);(function(){a.on=function(o,r,n){for(var e=r.split(" "),i,h=0;h0){n||(n={}),e=r.split(" ");for(var f=0;f{var a={};c.exports=a;var v=t(73832),o=t(53402);(function(){a.name="matter-js",a.version="0.19.0",a.uses=[],a.used=[],a.use=function(){v.use(a,Array.prototype.slice.call(arguments))},a.before=function(r,n){return r=r.replace(/^Matter./,""),o.chainPathBefore(a,r,n)},a.after=function(r,n){return r=r.replace(/^Matter./,""),o.chainPathAfter(a,r,n)}})()},73832:(c,m,t)=>{var a={};c.exports=a;var v=t(53402);(function(){a._registry={},a.register=function(o){if(a.isPlugin(o)||v.warn("Plugin.register:",a.toString(o),"does not implement all required fields."),o.name in a._registry){var r=a._registry[o.name],n=a.versionParse(o.version).number,e=a.versionParse(r.version).number;n>e?(v.warn("Plugin.register:",a.toString(r),"was upgraded to",a.toString(o)),a._registry[o.name]=o):n-1},a.isFor=function(o,r){var n=o.for&&a.dependencyParse(o.for);return!o.for||r.name===n.name&&a.versionSatisfies(r.version,n.range)},a.use=function(o,r){if(o.uses=(o.uses||[]).concat(r||[]),o.uses.length===0){v.warn("Plugin.use:",a.toString(o),"does not specify any dependencies to install.");return}for(var n=a.dependencies(o),e=v.topologicalSort(n),i=[],h=0;h0&&!s.silent&&v.info(i.join(" "))},a.dependencies=function(o,r){var n=a.dependencyParse(o),e=n.name;if(r=r||{},!(e in r)){o=a.resolve(o)||o,r[e]=v.map(o.uses||[],function(h){a.isPlugin(h)&&a.register(h);var s=a.dependencyParse(h),l=a.resolve(h);return l&&!a.versionSatisfies(l.version,s.range)?(v.warn("Plugin.dependencies:",a.toString(l),"does not satisfy",a.toString(s),"used by",a.toString(n)+"."),l._warned=!0,o._warned=!0):l||(v.warn("Plugin.dependencies:",a.toString(h),"used by",a.toString(n),"could not be resolved."),o._warned=!0),s.name});for(var i=0;i=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;r.test(o)||v.warn("Plugin.versionParse:",o,"is not a valid version or range.");var n=r.exec(o),e=Number(n[4]),i=Number(n[5]),h=Number(n[6]);return{isRange:!!(n[1]||n[2]),version:n[3],range:o,operator:n[1]||n[2]||"",major:e,minor:i,patch:h,parts:[e,i,h],prerelease:n[7],number:e*1e8+i*1e4+h}},a.versionSatisfies=function(o,r){r=r||"*";var n=a.versionParse(r),e=a.versionParse(o);if(n.isRange){if(n.operator==="*"||o==="*")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 o===r||o==="*"}})()},53614:(c,m,t)=>{var a={};c.exports=a;var v=t(22562),o=t(35810),r=t(53402);(function(){a._motionWakeThreshold=.18,a._motionSleepThreshold=.08,a._minBias=.9,a.update=function(n,e){for(var i=e/r._baseDelta,h=a._motionSleepThreshold,s=0;s0&&l.motion=l.sleepThreshold/i&&a.set(l,!0)):l.sleepCounter>0&&(l.sleepCounter-=1)}},a.afterCollisions=function(n){for(var e=a._motionSleepThreshold,i=0;ie&&a.set(u,!1)}}}},a.set=function(n,e){var i=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,i||o.trigger(n,"sleepStart")):(n.isSleeping=!1,n.sleepCounter=0,i&&o.trigger(n,"sleepEnd"))}})()},66280:(c,m,t)=>{var a={};c.exports=a;var v=t(41598),o=t(53402),r=t(22562),n=t(15647),e=t(31725);(function(){a.rectangle=function(i,h,s,l,f){f=f||{};var u={label:"Rectangle Body",position:{x:i,y:h},vertices:v.fromPath("L 0 0 L "+s+" 0 L "+s+" "+l+" L 0 "+l)};if(f.chamfer){var d=f.chamfer;u.vertices=v.chamfer(u.vertices,d.radius,d.quality,d.qualityMin,d.qualityMax),delete f.chamfer}return r.create(o.extend({},u,f))},a.trapezoid=function(i,h,s,l,f,u){u=u||{},f*=.5;var d=(1-f*2)*s,p=s*f,g=p+d,y=g+p,x;f<.5?x="L 0 0 L "+p+" "+-l+" L "+g+" "+-l+" L "+y+" 0":x="L 0 0 L "+g+" "+-l+" L "+y+" 0";var T={label:"Trapezoid Body",position:{x:i,y:h},vertices:v.fromPath(x)};if(u.chamfer){var C=u.chamfer;T.vertices=v.chamfer(T.vertices,C.radius,C.quality,C.qualityMin,C.qualityMax),delete u.chamfer}return r.create(o.extend({},T,u))},a.circle=function(i,h,s,l,f){l=l||{};var u={label:"Circle Body",circleRadius:s};f=f||25;var d=Math.ceil(Math.max(10,Math.min(f,s)));return d%2===1&&(d+=1),a.polygon(i,h,d,s,o.extend({},u,l))},a.polygon=function(i,h,s,l,f){if(f=f||{},s<3)return a.circle(i,h,l,f);for(var u=2*Math.PI/s,d="",p=u*.5,g=0;g0&&v.area(J)1?(x=r.create(o.extend({parts:T.slice(0)},l)),r.setPosition(x,{x:i,y:h}),x):T[0]},a.flagCoincidentParts=function(i,h){h===void 0&&(h=5);for(var s=0;s{var a={};c.exports=a;var v=t(69351),o=t(48140),r=t(53402),n=t(22562),e=t(66280);(function(){a.stack=function(i,h,s,l,f,u,d){for(var p=v.create({label:"Stack"}),g=i,y=h,x,T=0,C=0;CM&&(M=F),n.translate(L,{x:O*.5,y:F*.5}),g=L.bounds.max.x+f,v.addBody(p,L),x=L,T+=1}else g+=f}y+=M+u,g=i}return p},a.chain=function(i,h,s,l,f,u){for(var d=i.bodies,p=1;p0)for(p=0;p0&&(x=u[p-1+(d-1)*h],v.addConstraint(i,o.create(r.extend({bodyA:x,bodyB:y},f)))),l&&pM)){x=M-x;var L=x,F=s-1-x;if(!(yF)){C===1&&n.translate(T,{x:(y+(s%2===1?1:-1))*w,y:0});var O=T?y*w:0;return d(i+O+y*f,g,y,x,T,C)}}})},a.newtonsCradle=function(i,h,s,l,f){for(var u=v.create({label:"Newtons Cradle"}),d=0;d{var a={};c.exports=a;var v=t(31725),o=t(53402);(function(){a.fromVertices=function(r){for(var n={},e=0;e{var m={};c.exports=m,function(){m.create=function(t){var a={min:{x:0,y:0},max:{x:0,y:0}};return t&&m.update(a,t),a},m.update=function(t,a,v){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var o=0;ot.max.x&&(t.max.x=r.x),r.xt.max.y&&(t.max.y=r.y),r.y0?t.max.x+=v.x:t.min.x+=v.x,v.y>0?t.max.y+=v.y:t.min.y+=v.y)},m.contains=function(t,a){return a.x>=t.min.x&&a.x<=t.max.x&&a.y>=t.min.y&&a.y<=t.max.y},m.overlaps=function(t,a){return t.min.x<=a.max.x&&t.max.x>=a.min.x&&t.max.y>=a.min.y&&t.min.y<=a.max.y},m.translate=function(t,a){t.min.x+=a.x,t.max.x+=a.x,t.min.y+=a.y,t.max.y+=a.y},m.shift=function(t,a){var v=t.max.x-t.min.x,o=t.max.y-t.min.y;t.min.x=a.x,t.max.x=a.x+v,t.min.y=a.y,t.max.y=a.y+o}}()},74058:(c,m,t)=>{var a={};c.exports=a,t(15647);var v=t(53402);(function(){a.pathToVertices=function(o,r){typeof window<"u"&&!("SVGPathSeg"in window)&&v.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var n,e,i,h,s,l,f,u,d,p,g=[],y,x,T=0,C=0,M=0;r=r||15;var w=function(F,O,N){var G=N%2===1&&N>1;if(!d||F!=d.x||O!=d.y){d&&G?(y=d.x,x=d.y):(y=0,x=0);var V={x:y+F,y:x+O};(G||!d)&&(d=V),g.push(V),C=y+F,M=x+O}},L=function(F){var O=F.pathSegTypeAsLetter.toUpperCase();if(O!=="Z"){switch(O){case"M":case"L":case"T":case"C":case"S":case"Q":C=F.x,M=F.y;break;case"H":C=F.x;break;case"V":M=F.y;break}w(C,M,F.pathSegType)}};for(a._svgPathToAbsolute(o),i=o.getTotalLength(),l=[],n=0;n{var m={};c.exports=m,function(){m.create=function(t,a){return{x:t||0,y:a||0}},m.clone=function(t){return{x:t.x,y:t.y}},m.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},m.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},m.rotate=function(t,a,v){var o=Math.cos(a),r=Math.sin(a);v||(v={});var n=t.x*o-t.y*r;return v.y=t.x*r+t.y*o,v.x=n,v},m.rotateAbout=function(t,a,v,o){var r=Math.cos(a),n=Math.sin(a);o||(o={});var e=v.x+((t.x-v.x)*r-(t.y-v.y)*n);return o.y=v.y+((t.x-v.x)*n+(t.y-v.y)*r),o.x=e,o},m.normalise=function(t){var a=m.magnitude(t);return a===0?{x:0,y:0}:{x:t.x/a,y:t.y/a}},m.dot=function(t,a){return t.x*a.x+t.y*a.y},m.cross=function(t,a){return t.x*a.y-t.y*a.x},m.cross3=function(t,a,v){return(a.x-t.x)*(v.y-t.y)-(a.y-t.y)*(v.x-t.x)},m.add=function(t,a,v){return v||(v={}),v.x=t.x+a.x,v.y=t.y+a.y,v},m.sub=function(t,a,v){return v||(v={}),v.x=t.x-a.x,v.y=t.y-a.y,v},m.mult=function(t,a){return{x:t.x*a,y:t.y*a}},m.div=function(t,a){return{x:t.x/a,y:t.y/a}},m.perp=function(t,a){return a=a===!0?-1:1,{x:a*-t.y,y:a*t.x}},m.neg=function(t){return{x:-t.x,y:-t.y}},m.angle=function(t,a){return Math.atan2(a.y-t.y,a.x-t.x)},m._temp=[m.create(),m.create(),m.create(),m.create(),m.create(),m.create()]}()},41598:(c,m,t)=>{var a={};c.exports=a;var v=t(31725),o=t(53402);(function(){a.create=function(r,n){for(var e=[],i=0;i0)return!1;s=l}return!0},a.scale=function(r,n,e,i){if(n===1&&e===1)return r;i=i||a.centre(r);for(var h,s,l=0;l=0?l-1:r.length-1],u=r[l],d=r[(l+1)%r.length],p=n[l0&&(n|=2),n===3)return!1;return n!==0?!0:null},a.hull=function(r){var n=[],e=[],i,h;for(r=r.slice(0),r.sort(function(s,l){var f=s.x-l.x;return f!==0?f:s.y-l.y}),h=0;h=2&&v.cross3(e[e.length-2],e[e.length-1],i)<=0;)e.pop();e.push(i)}for(h=r.length-1;h>=0;h-=1){for(i=r[h];n.length>=2&&v.cross3(n[n.length-2],n[n.length-1],i)<=0;)n.pop();n.push(i)}return n.pop(),e.pop(),n.concat(e)}})()},18210:(c,m,t)=>{var a=t(19933),v={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.19.0",silent:!0,install:function(o){o.after("Body.create",function(){v.Body.init(this)}),o.before("Engine.update",function(r){v.Engine.update(r)})},Body:{init:function(o){o.plugin.attractors=o.plugin.attractors||[]}},Engine:{update:function(o){for(var r=a.Composite.allBodies(o.world),n=0;n0)for(var h=0;h{/** + */c.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:(c,m,t)=>{var o={};c.exports=o;var v=t(41598),a=t(31725),r=t(53614),n=t(53402),e=t(15647),i=t(66615);(function(){o._timeCorrection=!0,o._inertiaScale=4,o._nextCollidingGroupId=1,o._nextNonCollidingGroupId=-1,o._nextCategory=1,o._baseDelta=16.666666666666668,o.create=function(s){var l={id:n.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},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:{}};!s.hasOwnProperty("position")&&s.hasOwnProperty("vertices")?s.position=v.centre(s.vertices):s.hasOwnProperty("vertices")||(l.vertices=v.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var f=n.extend(l,s);return h(f,s),f.setOnCollideWith=function(u,d){return d?this.onCollideWith[u.id]=d:delete this.onCollideWith[u.id],this},f},o.nextGroup=function(s){return s?o._nextNonCollidingGroupId--:o._nextCollidingGroupId++},o.nextCategory=function(){return o._nextCategory=o._nextCategory<<1,o._nextCategory};var h=function(s,l){if(l=l||{},o.set(s,{bounds:s.bounds||e.create(s.vertices),positionPrev:s.positionPrev||a.clone(s.position),anglePrev:s.anglePrev||s.angle,vertices:s.vertices,parts:s.parts||[s],isStatic:s.isStatic,isSleeping:s.isSleeping,parent:s.parent||s}),v.rotate(s.vertices,s.angle,s.position),i.rotate(s.axes,s.angle),e.update(s.bounds,s.vertices,s.velocity),o.set(s,{axes:l.axes||s.axes,area:l.area||s.area,mass:l.mass||s.mass,inertia:l.inertia||s.inertia}),s.parts.length===1){var f=s.bounds,u=s.centerOfMass,d=s.centerOffset,p=f.max.x-f.min.x,g=f.max.y-f.min.y;u.x=-(f.min.x-s.position.x)/p,u.y=-(f.min.y-s.position.y)/g,d.x=p*u.x,d.y=g*u.y}};o.set=function(s,l,f){var u;typeof l=="string"&&(u=l,l={},l[u]=f);for(u in l)if(Object.prototype.hasOwnProperty.call(l,u))switch(f=l[u],u){case"isStatic":o.setStatic(s,f);break;case"isSleeping":r.set(s,f);break;case"mass":o.setMass(s,f);break;case"density":o.setDensity(s,f);break;case"inertia":o.setInertia(s,f);break;case"vertices":o.setVertices(s,f);break;case"position":o.setPosition(s,f);break;case"angle":o.setAngle(s,f);break;case"velocity":o.setVelocity(s,f);break;case"angularVelocity":o.setAngularVelocity(s,f);break;case"speed":o.setSpeed(s,f);break;case"angularSpeed":o.setAngularSpeed(s,f);break;case"parts":o.setParts(s,f);break;case"centre":o.setCentre(s,f);break;default:s[u]=f}},o.setStatic=function(s,l){for(var f=0;f0&&a.rotateAbout(p.position,u,s.position,p.position)}},o.setVelocity=function(s,l){var f=s.deltaTime/o._baseDelta;s.positionPrev.x=s.position.x-l.x*f,s.positionPrev.y=s.position.y-l.y*f,s.velocity.x=(s.position.x-s.positionPrev.x)/f,s.velocity.y=(s.position.y-s.positionPrev.y)/f,s.speed=a.magnitude(s.velocity)},o.getVelocity=function(s){var l=o._baseDelta/s.deltaTime;return{x:(s.position.x-s.positionPrev.x)*l,y:(s.position.y-s.positionPrev.y)*l}},o.getSpeed=function(s){return a.magnitude(o.getVelocity(s))},o.setSpeed=function(s,l){o.setVelocity(s,a.mult(a.normalise(o.getVelocity(s)),l))},o.setAngularVelocity=function(s,l){var f=s.deltaTime/o._baseDelta;s.anglePrev=s.angle-l*f,s.angularVelocity=(s.angle-s.anglePrev)/f,s.angularSpeed=Math.abs(s.angularVelocity)},o.getAngularVelocity=function(s){return(s.angle-s.anglePrev)*o._baseDelta/s.deltaTime},o.getAngularSpeed=function(s){return Math.abs(o.getAngularVelocity(s))},o.setAngularSpeed=function(s,l){o.setAngularVelocity(s,n.sign(o.getAngularVelocity(s))*l)},o.translate=function(s,l,f){o.setPosition(s,a.add(s.position,l),f)},o.rotate=function(s,l,f,u){if(!f)o.setAngle(s,s.angle+l,u);else{var d=Math.cos(l),p=Math.sin(l),g=s.position.x-f.x,y=s.position.y-f.y;o.setPosition(s,{x:f.x+(g*d-y*p),y:f.y+(g*p+y*d)},u),o.setAngle(s,s.angle+l,u)}},o.scale=function(s,l,f,u){var d=0,p=0;u=u||s.position;for(var g=s.inertia===1/0,y=0;y0&&(d+=x.area,p+=x.inertia),x.position.x=u.x+(x.position.x-u.x)*l,x.position.y=u.y+(x.position.y-u.y)*f,e.update(x.bounds,x.vertices,s.velocity)}s.parts.length>1&&(s.area=d,s.isStatic||(o.setMass(s,s.density*d),o.setInertia(s,p))),s.circleRadius&&(l===f?s.circleRadius*=l:s.circleRadius=null),g&&o.setInertia(s,1/0)},o.update=function(s,l){l=(typeof l<"u"?l:16.666666666666668)*s.timeScale;var f=l*l,u=o._timeCorrection?l/(s.deltaTime||l):1,d=1-s.frictionAir*(l/n._baseDelta),p=(s.position.x-s.positionPrev.x)*u,g=(s.position.y-s.positionPrev.y)*u;s.velocity.x=p*d+s.force.x/s.mass*f,s.velocity.y=g*d+s.force.y/s.mass*f,s.positionPrev.x=s.position.x,s.positionPrev.y=s.position.y,s.position.x+=s.velocity.x,s.position.y+=s.velocity.y,s.deltaTime=l,s.angularVelocity=(s.angle-s.anglePrev)*d*u+s.torque/s.inertia*f,s.anglePrev=s.angle,s.angle+=s.angularVelocity,s.speed=a.magnitude(s.velocity),s.angularSpeed=Math.abs(s.angularVelocity);for(var y=0;y0&&(x.position.x+=s.velocity.x,x.position.y+=s.velocity.y),s.angularVelocity!==0&&(v.rotate(x.vertices,s.angularVelocity,s.position),i.rotate(x.axes,s.angularVelocity),y>0&&a.rotateAbout(x.position,s.angularVelocity,s.position,x.position)),e.update(x.bounds,x.vertices,s.velocity)}},o.updateVelocities=function(s){var l=o._baseDelta/s.deltaTime,f=s.velocity;f.x=(s.position.x-s.positionPrev.x)*l,f.y=(s.position.y-s.positionPrev.y)*l,s.speed=Math.sqrt(f.x*f.x+f.y*f.y),s.angularVelocity=(s.angle-s.anglePrev)*l,s.angularSpeed=Math.abs(s.angularVelocity)},o.applyForce=function(s,l,f){var u={x:l.x-s.position.x,y:l.y-s.position.y};s.force.x+=f.x,s.force.y+=f.y,s.torque+=u.x*f.y-u.y*f.x},o._totalProperties=function(s){for(var l={mass:0,area:0,inertia:0,centre:{x:0,y:0}},f=s.parts.length===1?0:1;f{var o={};c.exports=o;var v=t(35810),a=t(53402),r=t(15647),n=t(22562);(function(){o.create=function(e){return a.extend({id:a.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},o.setModified=function(e,i,h,s){if(v.trigger(e,"compositeModified",e),e.isModified=i,i&&e.cache&&(e.cache.allBodies=null,e.cache.allConstraints=null,e.cache.allComposites=null),h&&e.parent&&o.setModified(e.parent,i,h,s),s)for(var l=0;l{var o={};c.exports=o;var v=t(69351);(function(){o.create=v.create,o.add=v.add,o.remove=v.remove,o.clear=v.clear,o.addComposite=v.addComposite,o.addBody=v.addBody,o.addConstraint=v.addConstraint})()},52284:(c,m,t)=>{var o={};c.exports=o;var v=t(41598),a=t(4506);(function(){var r=[],n={overlap:0,axis:null},e={overlap:0,axis:null};o.create=function(i,h){return{pair:null,collided:!1,bodyA:i,bodyB:h,parentA:i.parent,parentB:h.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[]}},o.collides=function(i,h,s){if(o._overlapAxes(n,i.vertices,h.vertices,i.axes),n.overlap<=0||(o._overlapAxes(e,h.vertices,i.vertices,h.axes),e.overlap<=0))return null;var l=s&&s.table[a.id(i,h)],f;l?f=l.collision:(f=o.create(i,h),f.collided=!0,f.bodyA=i.idX?X=L:LY?Y=L:Lf?f=d:d{var m={};c.exports=m,function(){m.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}}()},81388:(c,m,t)=>{var o={};c.exports=o;var v=t(53402),a=t(52284);(function(){o.create=function(r){var n={bodies:[],pairs:null};return v.extend(n,r)},o.setBodies=function(r,n){r.bodies=n.slice(0)},o.clear=function(r){r.bodies=[]},o.collisions=function(r){var n=[],e=r.pairs,i=r.bodies,h=i.length,s=o.canCollide,l=a.collides,f,u;for(i.sort(o._compareBoundsX),f=0;fg)break;if(!(yI.max.y)&&!(C&&(w.isStatic||w.isSleeping))&&s(d.collisionFilter,w.collisionFilter)){var L=w.parts.length;if(M&&L===1){var B=l(d,w,e);B&&n.push(B)}else for(var N=P>1?1:0,G=L>1?1:0,V=N;VI.max.x||p.max.xI.max.y)){var B=l(K,J,e);B&&n.push(B)}}}}}return n},o.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},o._compareBoundsX=function(r,n){return r.bounds.min.x-n.bounds.min.x}})()},4506:(c,m,t)=>{var o={};c.exports=o;var v=t(43424);(function(){o.create=function(a,r){var n=a.bodyA,e=a.bodyB,i={id:o.id(n,e),bodyA:n,bodyB:e,collision:a,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||e.isSensor,timeCreated:r,timeUpdated:r,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return o.update(i,a,r),i},o.update=function(a,r,n){var e=a.contacts,i=r.supports,h=a.activeContacts,s=r.parentA,l=r.parentB,f=s.vertices.length;a.isActive=!0,a.timeUpdated=n,a.collision=r,a.separation=r.depth,a.inverseMass=s.inverseMass+l.inverseMass,a.friction=s.frictionl.frictionStatic?s.frictionStatic:l.frictionStatic,a.restitution=s.restitution>l.restitution?s.restitution:l.restitution,a.slop=s.slop>l.slop?s.slop:l.slop,r.pair=a,h.length=0;for(var u=0;u{var o={};c.exports=o;var v=t(4506),a=t(53402);(function(){o.create=function(r){return a.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},r)},o.update=function(r,n,e){var i=r.list,h=i.length,s=r.table,l=n.length,f=r.collisionStart,u=r.collisionEnd,d=r.collisionActive,p,g,y,x;for(f.length=0,u.length=0,d.length=0,x=0;x{var o={};c.exports=o;var v=t(31725),a=t(52284),r=t(15647),n=t(66280),e=t(41598);(function(){o.collides=function(i,h){for(var s=[],l=h.length,f=i.bounds,u=a.collides,d=r.overlaps,p=0;p{var o={};c.exports=o;var v=t(41598),a=t(53402),r=t(15647);(function(){o._restingThresh=2,o._restingThreshTangent=Math.sqrt(6),o._positionDampen=.9,o._positionWarming=.8,o._frictionNormalMultiplier=5,o._frictionMaxStatic=Number.MAX_VALUE,o.preSolvePosition=function(n){var e,i,h,s=n.length;for(e=0;ect?(y=At>0?At:-At,g=P.friction*(At>0?1:-1)*s,g<-y?g=-y:g>y&&(g=y)):(g=At,y=d);var Ct=H*G-Z*N,pt=Q*G-k*N,wt=X/(Y+w.inverseInertia*Ct*Ct+I.inverseInertia*pt*pt),Bt=(1+P.restitution)*vt*wt;if(g*=wt,vt0&&(z.normalImpulse=0),Bt=z.normalImpulse-jt}if(At<-f||At>f)z.tangentImpulse=0;else{var zt=z.tangentImpulse;z.tangentImpulse+=g,z.tangentImpulse<-y&&(z.tangentImpulse=-y),z.tangentImpulse>y&&(z.tangentImpulse=y),g=z.tangentImpulse-zt}var Yt=N*Bt+V*g,bt=G*Bt+K*g;w.isStatic||w.isSleeping||(w.positionPrev.x+=Yt*w.inverseMass,w.positionPrev.y+=bt*w.inverseMass,w.anglePrev+=(H*bt-Z*Yt)*w.inverseInertia),I.isStatic||I.isSleeping||(I.positionPrev.x-=Yt*I.inverseMass,I.positionPrev.y-=bt*I.inverseMass,I.anglePrev-=(Q*bt-k*Yt)*I.inverseInertia)}}}}})()},48140:(c,m,t)=>{var o={};c.exports=o;var v=t(41598),a=t(31725),r=t(53614),n=t(15647),e=t(66615),i=t(53402);(function(){o._warming=.4,o._torqueDampen=1,o._minLength=1e-6,o.create=function(h){var s=h;s.bodyA&&!s.pointA&&(s.pointA={x:0,y:0}),s.bodyB&&!s.pointB&&(s.pointB={x:0,y:0});var l=s.bodyA?a.add(s.bodyA.position,s.pointA):s.pointA,f=s.bodyB?a.add(s.bodyB.position,s.pointB):s.pointB,u=a.magnitude(a.sub(l,f));s.length=typeof s.length<"u"?s.length:u,s.id=s.id||i.nextId(),s.label=s.label||"Constraint",s.type="constraint",s.stiffness=s.stiffness||(s.length>0?1:.7),s.damping=s.damping||0,s.angularStiffness=s.angularStiffness||0,s.angleA=s.bodyA?s.bodyA.angle:s.angleA,s.angleB=s.bodyB?s.bodyB.angle:s.angleB,s.plugin={};var d={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return s.length===0&&s.stiffness>.1?(d.type="pin",d.anchors=!1):s.stiffness<.9&&(d.type="spring"),s.render=i.extend(d,s.render),s},o.preSolveAll=function(h){for(var s=0;s=1||h.length===0,M=P?h.stiffness*s:h.stiffness*s*s,w=h.damping*s,I=a.mult(y,C*M),L=(l?l.inverseMass:0)+(f?f.inverseMass:0),B=(l?l.inverseInertia:0)+(f?f.inverseInertia:0),N=L+B,G,V,K,j,J;if(w>0){var X=a.create();K=a.div(y,x),J=a.sub(f&&a.sub(f.position,f.positionPrev)||X,l&&a.sub(l.position,l.positionPrev)||X),j=a.dot(K,J)}l&&!l.isStatic&&(V=l.inverseMass/L,l.constraintImpulse.x-=I.x*V,l.constraintImpulse.y-=I.y*V,l.position.x-=I.x*V,l.position.y-=I.y*V,w>0&&(l.positionPrev.x-=w*K.x*j*V,l.positionPrev.y-=w*K.y*j*V),G=a.cross(u,I)/N*o._torqueDampen*l.inverseInertia*(1-h.angularStiffness),l.constraintImpulse.angle-=G,l.angle-=G),f&&!f.isStatic&&(V=f.inverseMass/L,f.constraintImpulse.x+=I.x*V,f.constraintImpulse.y+=I.y*V,f.position.x+=I.x*V,f.position.y+=I.y*V,w>0&&(f.positionPrev.x+=w*K.x*j*V,f.positionPrev.y+=w*K.y*j*V),G=a.cross(d,I)/N*o._torqueDampen*f.inverseInertia*(1-h.angularStiffness),f.constraintImpulse.angle+=G,f.angle+=G)}}},o.postSolveAll=function(h){for(var s=0;s0&&(d.position.x+=f.x,d.position.y+=f.y),f.angle!==0&&(v.rotate(d.vertices,f.angle,l.position),e.rotate(d.axes,f.angle),u>0&&a.rotateAbout(d.position,f.angle,l.position,d.position)),n.update(d.bounds,d.vertices,l.velocity)}f.angle*=o._warming,f.x*=o._warming,f.y*=o._warming}}},o.pointAWorld=function(h){return{x:(h.bodyA?h.bodyA.position.x:0)+(h.pointA?h.pointA.x:0),y:(h.bodyA?h.bodyA.position.y:0)+(h.pointA?h.pointA.y:0)}},o.pointBWorld=function(h){return{x:(h.bodyB?h.bodyB.position.x:0)+(h.pointB?h.pointB.x:0),y:(h.bodyB?h.bodyB.position.y:0)+(h.pointB?h.pointB.y:0)}},o.currentLength=function(h){var s=(h.bodyA?h.bodyA.position.x:0)+(h.pointA?h.pointA.x:0),l=(h.bodyA?h.bodyA.position.y:0)+(h.pointA?h.pointA.y:0),f=(h.bodyB?h.bodyB.position.x:0)+(h.pointB?h.pointB.x:0),u=(h.bodyB?h.bodyB.position.y:0)+(h.pointB?h.pointB.y:0),d=s-f,p=l-u;return Math.sqrt(d*d+p*p)}})()},53402:(c,m,t)=>{var o={};c.exports=o,function(){o._baseDelta=16.666666666666668,o._nextId=0,o._seed=0,o._nowStartTime=+new Date,o._warnedOnce={},o._decomp=null,o.extend=function(a,r){var n,e;typeof r=="boolean"?(n=2,e=r):(n=1,e=!0);for(var i=n;i0;r--){var n=Math.floor(o.random()*(r+1)),e=a[r];a[r]=a[n],a[n]=e}return a},o.choose=function(a){return a[Math.floor(o.random()*a.length)]},o.isElement=function(a){return typeof HTMLElement<"u"?a instanceof HTMLElement:!!(a&&a.nodeType&&a.nodeName)},o.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"},o.isFunction=function(a){return typeof a=="function"},o.isPlainObject=function(a){return typeof a=="object"&&a.constructor===Object},o.isString=function(a){return toString.call(a)==="[object String]"},o.clamp=function(a,r,n){return an?n:a},o.sign=function(a){return a<0?-1:1},o.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-o._nowStartTime},o.random=function(a,r){return a=typeof a<"u"?a:0,r=typeof r<"u"?r:1,a+v()*(r-a)};var v=function(){return o._seed=(o._seed*9301+49297)%233280,o._seed/233280};o.colorToNumber=function(a){return a=a.replace("#",""),a.length==3&&(a=a.charAt(0)+a.charAt(0)+a.charAt(1)+a.charAt(1)+a.charAt(2)+a.charAt(2)),parseInt(a,16)},o.logLevel=1,o.log=function(){console&&o.logLevel>0&&o.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},o.info=function(){console&&o.logLevel>0&&o.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},o.warn=function(){console&&o.logLevel>0&&o.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},o.warnOnce=function(){var a=Array.prototype.slice.call(arguments).join(" ");o._warnedOnce[a]||(o.warn(a),o._warnedOnce[a]=!0)},o.deprecated=function(a,r,n){a[r]=o.chain(function(){o.warnOnce("🔅 deprecated 🔅",n)},a[r])},o.nextId=function(){return o._nextId++},o.indexOf=function(a,r){if(a.indexOf)return a.indexOf(r);for(var n=0;n{var o={};c.exports=o;var v=t(53614),a=t(66272),r=t(81388),n=t(99561),e=t(35810),i=t(69351),h=t(48140),s=t(53402),l=t(22562);(function(){o.create=function(f){f=f||{};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}},d=s.extend(u,f);return d.world=f.world||i.create({label:"World"}),d.pairs=f.pairs||n.create(),d.detector=f.detector||r.create(),d.grid={buckets:[]},d.world.gravity=d.gravity,d.broadphase=d.grid,d.metrics={},d},o.update=function(f,u){var d=s.now(),p=f.world,g=f.detector,y=f.pairs,x=f.timing,C=x.timestamp,P;u=typeof u<"u"?u:s._baseDelta,u*=x.timeScale,x.timestamp+=u,x.lastDelta=u;var M={timestamp:x.timestamp,delta:u};e.trigger(f,"beforeUpdate",M);var w=i.allBodies(p),I=i.allConstraints(p);for(p.isModified&&(r.setBodies(g,w),i.setModified(p,!1,!1,!0)),f.enableSleeping&&v.update(w,u),o._bodiesApplyGravity(w,f.gravity),u>0&&o._bodiesUpdate(w,u),e.trigger(f,"beforeSolve",M),h.preSolveAll(w),P=0;P0&&e.trigger(f,"collisionStart",{pairs:y.collisionStart,timestamp:x.timestamp,delta:u});var B=s.clamp(20/f.positionIterations,0,1);for(a.preSolvePosition(y.list),P=0;P0&&e.trigger(f,"collisionActive",{pairs:y.collisionActive,timestamp:x.timestamp,delta:u}),y.collisionEnd.length>0&&e.trigger(f,"collisionEnd",{pairs:y.collisionEnd,timestamp:x.timestamp,delta:u}),o._bodiesClearForces(w),e.trigger(f,"afterUpdate",M),f.timing.lastElapsed=s.now()-d,f},o.merge=function(f,u){if(s.extend(f,u),u.world){f.world=u.world,o.clear(f);for(var d=i.allBodies(f.world),p=0;p{var o={};c.exports=o;var v=t(53402);(function(){o.on=function(a,r,n){for(var e=r.split(" "),i,h=0;h0){n||(n={}),e=r.split(" ");for(var f=0;f{var o={};c.exports=o;var v=t(73832),a=t(53402);(function(){o.name="matter-js",o.version="0.19.0",o.uses=[],o.used=[],o.use=function(){v.use(o,Array.prototype.slice.call(arguments))},o.before=function(r,n){return r=r.replace(/^Matter./,""),a.chainPathBefore(o,r,n)},o.after=function(r,n){return r=r.replace(/^Matter./,""),a.chainPathAfter(o,r,n)}})()},73832:(c,m,t)=>{var o={};c.exports=o;var v=t(53402);(function(){o._registry={},o.register=function(a){if(o.isPlugin(a)||v.warn("Plugin.register:",o.toString(a),"does not implement all required fields."),a.name in o._registry){var r=o._registry[a.name],n=o.versionParse(a.version).number,e=o.versionParse(r.version).number;n>e?(v.warn("Plugin.register:",o.toString(r),"was upgraded to",o.toString(a)),o._registry[a.name]=a):n-1},o.isFor=function(a,r){var n=a.for&&o.dependencyParse(a.for);return!a.for||r.name===n.name&&o.versionSatisfies(r.version,n.range)},o.use=function(a,r){if(a.uses=(a.uses||[]).concat(r||[]),a.uses.length===0){v.warn("Plugin.use:",o.toString(a),"does not specify any dependencies to install.");return}for(var n=o.dependencies(a),e=v.topologicalSort(n),i=[],h=0;h0&&!s.silent&&v.info(i.join(" "))},o.dependencies=function(a,r){var n=o.dependencyParse(a),e=n.name;if(r=r||{},!(e in r)){a=o.resolve(a)||a,r[e]=v.map(a.uses||[],function(h){o.isPlugin(h)&&o.register(h);var s=o.dependencyParse(h),l=o.resolve(h);return l&&!o.versionSatisfies(l.version,s.range)?(v.warn("Plugin.dependencies:",o.toString(l),"does not satisfy",o.toString(s),"used by",o.toString(n)+"."),l._warned=!0,a._warned=!0):l||(v.warn("Plugin.dependencies:",o.toString(h),"used by",o.toString(n),"could not be resolved."),a._warned=!0),s.name});for(var i=0;i=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;r.test(a)||v.warn("Plugin.versionParse:",a,"is not a valid version or range.");var n=r.exec(a),e=Number(n[4]),i=Number(n[5]),h=Number(n[6]);return{isRange:!!(n[1]||n[2]),version:n[3],range:a,operator:n[1]||n[2]||"",major:e,minor:i,patch:h,parts:[e,i,h],prerelease:n[7],number:e*1e8+i*1e4+h}},o.versionSatisfies=function(a,r){r=r||"*";var n=o.versionParse(r),e=o.versionParse(a);if(n.isRange){if(n.operator==="*"||a==="*")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 a===r||a==="*"}})()},53614:(c,m,t)=>{var o={};c.exports=o;var v=t(22562),a=t(35810),r=t(53402);(function(){o._motionWakeThreshold=.18,o._motionSleepThreshold=.08,o._minBias=.9,o.update=function(n,e){for(var i=e/r._baseDelta,h=o._motionSleepThreshold,s=0;s0&&l.motion=l.sleepThreshold/i&&o.set(l,!0)):l.sleepCounter>0&&(l.sleepCounter-=1)}},o.afterCollisions=function(n){for(var e=o._motionSleepThreshold,i=0;ie&&o.set(u,!1)}}}},o.set=function(n,e){var i=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,i||a.trigger(n,"sleepStart")):(n.isSleeping=!1,n.sleepCounter=0,i&&a.trigger(n,"sleepEnd"))}})()},66280:(c,m,t)=>{var o={};c.exports=o;var v=t(41598),a=t(53402),r=t(22562),n=t(15647),e=t(31725);(function(){o.rectangle=function(i,h,s,l,f){f=f||{};var u={label:"Rectangle Body",position:{x:i,y:h},vertices:v.fromPath("L 0 0 L "+s+" 0 L "+s+" "+l+" L 0 "+l)};if(f.chamfer){var d=f.chamfer;u.vertices=v.chamfer(u.vertices,d.radius,d.quality,d.qualityMin,d.qualityMax),delete f.chamfer}return r.create(a.extend({},u,f))},o.trapezoid=function(i,h,s,l,f,u){u=u||{},f*=.5;var d=(1-f*2)*s,p=s*f,g=p+d,y=g+p,x;f<.5?x="L 0 0 L "+p+" "+-l+" L "+g+" "+-l+" L "+y+" 0":x="L 0 0 L "+g+" "+-l+" L "+y+" 0";var C={label:"Trapezoid Body",position:{x:i,y:h},vertices:v.fromPath(x)};if(u.chamfer){var P=u.chamfer;C.vertices=v.chamfer(C.vertices,P.radius,P.quality,P.qualityMin,P.qualityMax),delete u.chamfer}return r.create(a.extend({},C,u))},o.circle=function(i,h,s,l,f){l=l||{};var u={label:"Circle Body",circleRadius:s};f=f||25;var d=Math.ceil(Math.max(10,Math.min(f,s)));return d%2===1&&(d+=1),o.polygon(i,h,d,s,a.extend({},u,l))},o.polygon=function(i,h,s,l,f){if(f=f||{},s<3)return o.circle(i,h,l,f);for(var u=2*Math.PI/s,d="",p=u*.5,g=0;g0&&v.area(J)1?(x=r.create(a.extend({parts:C.slice(0)},l)),r.setPosition(x,{x:i,y:h}),x):C[0]},o.flagCoincidentParts=function(i,h){h===void 0&&(h=5);for(var s=0;s{var o={};c.exports=o;var v=t(69351),a=t(48140),r=t(53402),n=t(22562),e=t(66280);(function(){o.stack=function(i,h,s,l,f,u,d){for(var p=v.create({label:"Stack"}),g=i,y=h,x,C=0,P=0;PM&&(M=L),n.translate(I,{x:B*.5,y:L*.5}),g=I.bounds.max.x+f,v.addBody(p,I),x=I,C+=1}else g+=f}y+=M+u,g=i}return p},o.chain=function(i,h,s,l,f,u){for(var d=i.bodies,p=1;p0)for(p=0;p0&&(x=u[p-1+(d-1)*h],v.addConstraint(i,a.create(r.extend({bodyA:x,bodyB:y},f)))),l&&pM)){x=M-x;var I=x,L=s-1-x;if(!(yL)){P===1&&n.translate(C,{x:(y+(s%2===1?1:-1))*w,y:0});var B=C?y*w:0;return d(i+B+y*f,g,y,x,C,P)}}})},o.newtonsCradle=function(i,h,s,l,f){for(var u=v.create({label:"Newtons Cradle"}),d=0;d{var o={};c.exports=o;var v=t(31725),a=t(53402);(function(){o.fromVertices=function(r){for(var n={},e=0;e{var m={};c.exports=m,function(){m.create=function(t){var o={min:{x:0,y:0},max:{x:0,y:0}};return t&&m.update(o,t),o},m.update=function(t,o,v){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var a=0;at.max.x&&(t.max.x=r.x),r.xt.max.y&&(t.max.y=r.y),r.y0?t.max.x+=v.x:t.min.x+=v.x,v.y>0?t.max.y+=v.y:t.min.y+=v.y)},m.contains=function(t,o){return o.x>=t.min.x&&o.x<=t.max.x&&o.y>=t.min.y&&o.y<=t.max.y},m.overlaps=function(t,o){return t.min.x<=o.max.x&&t.max.x>=o.min.x&&t.max.y>=o.min.y&&t.min.y<=o.max.y},m.translate=function(t,o){t.min.x+=o.x,t.max.x+=o.x,t.min.y+=o.y,t.max.y+=o.y},m.shift=function(t,o){var v=t.max.x-t.min.x,a=t.max.y-t.min.y;t.min.x=o.x,t.max.x=o.x+v,t.min.y=o.y,t.max.y=o.y+a}}()},74058:(c,m,t)=>{var o={};c.exports=o,t(15647);var v=t(53402);(function(){o.pathToVertices=function(a,r){typeof window<"u"&&!("SVGPathSeg"in window)&&v.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var n,e,i,h,s,l,f,u,d,p,g=[],y,x,C=0,P=0,M=0;r=r||15;var w=function(L,B,N){var G=N%2===1&&N>1;if(!d||L!=d.x||B!=d.y){d&&G?(y=d.x,x=d.y):(y=0,x=0);var V={x:y+L,y:x+B};(G||!d)&&(d=V),g.push(V),P=y+L,M=x+B}},I=function(L){var B=L.pathSegTypeAsLetter.toUpperCase();if(B!=="Z"){switch(B){case"M":case"L":case"T":case"C":case"S":case"Q":P=L.x,M=L.y;break;case"H":P=L.x;break;case"V":M=L.y;break}w(P,M,L.pathSegType)}};for(o._svgPathToAbsolute(a),i=a.getTotalLength(),l=[],n=0;n{var m={};c.exports=m,function(){m.create=function(t,o){return{x:t||0,y:o||0}},m.clone=function(t){return{x:t.x,y:t.y}},m.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},m.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},m.rotate=function(t,o,v){var a=Math.cos(o),r=Math.sin(o);v||(v={});var n=t.x*a-t.y*r;return v.y=t.x*r+t.y*a,v.x=n,v},m.rotateAbout=function(t,o,v,a){var r=Math.cos(o),n=Math.sin(o);a||(a={});var e=v.x+((t.x-v.x)*r-(t.y-v.y)*n);return a.y=v.y+((t.x-v.x)*n+(t.y-v.y)*r),a.x=e,a},m.normalise=function(t){var o=m.magnitude(t);return o===0?{x:0,y:0}:{x:t.x/o,y:t.y/o}},m.dot=function(t,o){return t.x*o.x+t.y*o.y},m.cross=function(t,o){return t.x*o.y-t.y*o.x},m.cross3=function(t,o,v){return(o.x-t.x)*(v.y-t.y)-(o.y-t.y)*(v.x-t.x)},m.add=function(t,o,v){return v||(v={}),v.x=t.x+o.x,v.y=t.y+o.y,v},m.sub=function(t,o,v){return v||(v={}),v.x=t.x-o.x,v.y=t.y-o.y,v},m.mult=function(t,o){return{x:t.x*o,y:t.y*o}},m.div=function(t,o){return{x:t.x/o,y:t.y/o}},m.perp=function(t,o){return o=o===!0?-1:1,{x:o*-t.y,y:o*t.x}},m.neg=function(t){return{x:-t.x,y:-t.y}},m.angle=function(t,o){return Math.atan2(o.y-t.y,o.x-t.x)},m._temp=[m.create(),m.create(),m.create(),m.create(),m.create(),m.create()]}()},41598:(c,m,t)=>{var o={};c.exports=o;var v=t(31725),a=t(53402);(function(){o.create=function(r,n){for(var e=[],i=0;i0)return!1;s=l}return!0},o.scale=function(r,n,e,i){if(n===1&&e===1)return r;i=i||o.centre(r);for(var h,s,l=0;l=0?l-1:r.length-1],u=r[l],d=r[(l+1)%r.length],p=n[l0&&(n|=2),n===3)return!1;return n!==0?!0:null},o.hull=function(r){var n=[],e=[],i,h;for(r=r.slice(0),r.sort(function(s,l){var f=s.x-l.x;return f!==0?f:s.y-l.y}),h=0;h=2&&v.cross3(e[e.length-2],e[e.length-1],i)<=0;)e.pop();e.push(i)}for(h=r.length-1;h>=0;h-=1){for(i=r[h];n.length>=2&&v.cross3(n[n.length-2],n[n.length-1],i)<=0;)n.pop();n.push(i)}return n.pop(),e.pop(),n.concat(e)}})()},18210:(c,m,t)=>{var o=t(19933),v={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.19.0",silent:!0,install:function(a){a.after("Body.create",function(){v.Body.init(this)}),a.before("Engine.update",function(r){v.Engine.update(r)})},Body:{init:function(a){a.plugin.attractors=a.plugin.attractors||[]}},Engine:{update:function(a){for(var r=o.Composite.allBodies(a.world),n=0;n0)for(var h=0;h{/** * @author @dxu https://github.com/dxu/matter-collision-events * @author Richard Davey * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.19.0",silent:!0,install:function(t){t.after("Engine.create",function(){t.Events.on(this,"collisionStart",function(a){a.pairs.map(function(v){var o=v.bodyA,r=v.bodyB;o.gameObject&&o.gameObject.emit("collide",o,r,v),r.gameObject&&r.gameObject.emit("collide",r,o,v),t.Events.trigger(o,"onCollide",{pair:v}),t.Events.trigger(r,"onCollide",{pair:v}),o.onCollideCallback&&o.onCollideCallback(v),r.onCollideCallback&&r.onCollideCallback(v),o.onCollideWith[r.id]&&o.onCollideWith[r.id](r,v),r.onCollideWith[o.id]&&r.onCollideWith[o.id](o,v)})}),t.Events.on(this,"collisionActive",function(a){a.pairs.map(function(v){var o=v.bodyA,r=v.bodyB;o.gameObject&&o.gameObject.emit("collideActive",o,r,v),r.gameObject&&r.gameObject.emit("collideActive",r,o,v),t.Events.trigger(o,"onCollideActive",{pair:v}),t.Events.trigger(r,"onCollideActive",{pair:v}),o.onCollideActiveCallback&&o.onCollideActiveCallback(v),r.onCollideActiveCallback&&r.onCollideActiveCallback(v)})}),t.Events.on(this,"collisionEnd",function(a){a.pairs.map(function(v){var o=v.bodyA,r=v.bodyB;o.gameObject&&o.gameObject.emit("collideEnd",o,r,v),r.gameObject&&r.gameObject.emit("collideEnd",r,o,v),t.Events.trigger(o,"onCollideEnd",{pair:v}),t.Events.trigger(r,"onCollideEnd",{pair:v}),o.onCollideEndCallback&&o.onCollideEndCallback(v),r.onCollideEndCallback&&r.onCollideEndCallback(v)})})})}};c.exports=m},74507:(c,m,t)=>{var a=t(19933),v={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.19.0",silent:!0,install:function(o){o.after("Engine.update",function(){v.Engine.update(this)})},Engine:{update:function(o){for(var r=o.world,n=a.Composite.allBodies(r),e=a.Composite.allComposites(r),i=0;ir.max.x?n=r.min.x-o.max.x:o.max.xr.max.y?e=r.min.y-o.max.y:o.max.y{/** + */var m={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.19.0",silent:!0,install:function(t){t.after("Engine.create",function(){t.Events.on(this,"collisionStart",function(o){o.pairs.map(function(v){var a=v.bodyA,r=v.bodyB;a.gameObject&&a.gameObject.emit("collide",a,r,v),r.gameObject&&r.gameObject.emit("collide",r,a,v),t.Events.trigger(a,"onCollide",{pair:v}),t.Events.trigger(r,"onCollide",{pair:v}),a.onCollideCallback&&a.onCollideCallback(v),r.onCollideCallback&&r.onCollideCallback(v),a.onCollideWith[r.id]&&a.onCollideWith[r.id](r,v),r.onCollideWith[a.id]&&r.onCollideWith[a.id](a,v)})}),t.Events.on(this,"collisionActive",function(o){o.pairs.map(function(v){var a=v.bodyA,r=v.bodyB;a.gameObject&&a.gameObject.emit("collideActive",a,r,v),r.gameObject&&r.gameObject.emit("collideActive",r,a,v),t.Events.trigger(a,"onCollideActive",{pair:v}),t.Events.trigger(r,"onCollideActive",{pair:v}),a.onCollideActiveCallback&&a.onCollideActiveCallback(v),r.onCollideActiveCallback&&r.onCollideActiveCallback(v)})}),t.Events.on(this,"collisionEnd",function(o){o.pairs.map(function(v){var a=v.bodyA,r=v.bodyB;a.gameObject&&a.gameObject.emit("collideEnd",a,r,v),r.gameObject&&r.gameObject.emit("collideEnd",r,a,v),t.Events.trigger(a,"onCollideEnd",{pair:v}),t.Events.trigger(r,"onCollideEnd",{pair:v}),a.onCollideEndCallback&&a.onCollideEndCallback(v),r.onCollideEndCallback&&r.onCollideEndCallback(v)})})})}};c.exports=m},74507:(c,m,t)=>{var o=t(19933),v={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.19.0",silent:!0,install:function(a){a.after("Engine.update",function(){v.Engine.update(this)})},Engine:{update:function(a){for(var r=a.world,n=o.Composite.allBodies(r),e=o.Composite.allComposites(r),i=0;ir.max.x?n=r.min.x-a.max.x:a.max.xr.max.y?e=r.min.y-a.max.y:a.max.y{/** * @author Stefan Hedman (http://steffe.se) * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={decomp:L,quickDecomp:G,isSimple:O,removeCollinearPoints:V,removeDuplicatePoints:K,makeCCW:d};function m(X,Y,D){D=D||0;var z=[0,0],W,H,Z,Q,k,et,st;return W=X[1][1]-X[0][1],H=X[0][0]-X[1][0],Z=W*X[0][0]+H*X[0][1],Q=Y[1][1]-Y[0][1],k=Y[0][0]-Y[1][0],et=Q*Y[0][0]+k*Y[0][1],st=W*k-Q*H,$(st,0,D)||(z[0]=(k*Z-H*et)/st,z[1]=(W*et-Q*Z)/st),z}function t(X,Y,D,z){var W=Y[0]-X[0],H=Y[1]-X[1],Z=z[0]-D[0],Q=z[1]-D[1];if(Z*H-Q*W===0)return!1;var k=(W*(D[1]-X[1])+H*(X[0]-D[0]))/(Z*H-Q*W),et=(Z*(X[1]-D[1])+Q*(D[0]-X[0]))/(Q*W-Z*H);return k>=0&&k<=1&&et>=0&&et<=1}function a(X,Y,D){return(Y[0]-X[0])*(D[1]-X[1])-(D[0]-X[0])*(Y[1]-X[1])}function v(X,Y,D){return a(X,Y,D)>0}function o(X,Y,D){return a(X,Y,D)>=0}function r(X,Y,D){return a(X,Y,D)<0}function n(X,Y,D){return a(X,Y,D)<=0}var e=[],i=[];function h(X,Y,D,z){if(z){var W=e,H=i;W[0]=Y[0]-X[0],W[1]=Y[1]-X[1],H[0]=D[0]-Y[0],H[1]=D[1]-Y[1];var Z=W[0]*H[0]+W[1]*H[1],Q=Math.sqrt(W[0]*W[0]+W[1]*W[1]),k=Math.sqrt(H[0]*H[0]+H[1]*H[1]),et=Math.acos(Z/(Q*k));return etD[Y][0])&&(Y=z);return v(l(X,Y-1),l(X,Y),l(X,Y+1))?!1:(p(X),!0)}function p(X){for(var Y=[],D=X.length,z=0;z!==D;z++)Y.push(X.pop());for(var z=0;z!==D;z++)X[z]=Y[z]}function g(X,Y){return r(l(X,Y-1),l(X,Y),l(X,Y+1))}var y=[],x=[];function T(X,Y,D){var z,W,H=y,Z=x;if(o(l(X,Y+1),l(X,Y),l(X,D))&&n(l(X,Y-1),l(X,Y),l(X,D)))return!1;W=s(l(X,Y),l(X,D));for(var Q=0;Q!==X.length;++Q)if(!((Q+1)%X.length===Y||Q===Y)&&o(l(X,Y),l(X,D),l(X,Q+1))&&n(l(X,Y),l(X,D),l(X,Q))&&(H[0]=l(X,Y),H[1]=l(X,D),Z[0]=l(X,Q),Z[1]=l(X,Q+1),z=m(H,Z),s(l(X,Y),z)0?F(X,Y):[X]}function F(X,Y){if(Y.length===0)return[X];if(Y instanceof Array&&Y.length&&Y[0]instanceof Array&&Y[0].length===2&&Y[0][0]instanceof Array){for(var D=[X],z=0;zH)return console.warn("quickDecomp: max level ("+H+") reached."),Y;for(var pt=0;ptat&&(at+=X.length),ft=Number.MAX_VALUE,at3&&z>=0;--z)h(l(X,z-1),l(X,z),l(X,z+1),Y)&&(X.splice(z%X.length,1),D++);return D}function K(X,Y){for(var D=X.length-1;D>=1;--D)for(var z=X[D],W=D-1;W>=0;--W)if(J(z,X[W],Y)){X.splice(D,1);continue}}function $(X,Y,D){return D=D||0,Math.abs(X-Y)<=D}function J(X,Y,D){return $(X[0],Y[0],D)&&$(X[1],Y[1],D)}},52018:(c,m,t)=>{/** + */c.exports={decomp:I,quickDecomp:G,isSimple:B,removeCollinearPoints:V,removeDuplicatePoints:K,makeCCW:d};function m(X,Y,b){b=b||0;var z=[0,0],W,H,Z,Q,k,et,st;return W=X[1][1]-X[0][1],H=X[0][0]-X[1][0],Z=W*X[0][0]+H*X[0][1],Q=Y[1][1]-Y[0][1],k=Y[0][0]-Y[1][0],et=Q*Y[0][0]+k*Y[0][1],st=W*k-Q*H,j(st,0,b)||(z[0]=(k*Z-H*et)/st,z[1]=(W*et-Q*Z)/st),z}function t(X,Y,b,z){var W=Y[0]-X[0],H=Y[1]-X[1],Z=z[0]-b[0],Q=z[1]-b[1];if(Z*H-Q*W===0)return!1;var k=(W*(b[1]-X[1])+H*(X[0]-b[0]))/(Z*H-Q*W),et=(Z*(X[1]-b[1])+Q*(b[0]-X[0]))/(Q*W-Z*H);return k>=0&&k<=1&&et>=0&&et<=1}function o(X,Y,b){return(Y[0]-X[0])*(b[1]-X[1])-(b[0]-X[0])*(Y[1]-X[1])}function v(X,Y,b){return o(X,Y,b)>0}function a(X,Y,b){return o(X,Y,b)>=0}function r(X,Y,b){return o(X,Y,b)<0}function n(X,Y,b){return o(X,Y,b)<=0}var e=[],i=[];function h(X,Y,b,z){if(z){var W=e,H=i;W[0]=Y[0]-X[0],W[1]=Y[1]-X[1],H[0]=b[0]-Y[0],H[1]=b[1]-Y[1];var Z=W[0]*H[0]+W[1]*H[1],Q=Math.sqrt(W[0]*W[0]+W[1]*W[1]),k=Math.sqrt(H[0]*H[0]+H[1]*H[1]),et=Math.acos(Z/(Q*k));return etb[Y][0])&&(Y=z);return v(l(X,Y-1),l(X,Y),l(X,Y+1))?!1:(p(X),!0)}function p(X){for(var Y=[],b=X.length,z=0;z!==b;z++)Y.push(X.pop());for(var z=0;z!==b;z++)X[z]=Y[z]}function g(X,Y){return r(l(X,Y-1),l(X,Y),l(X,Y+1))}var y=[],x=[];function C(X,Y,b){var z,W,H=y,Z=x;if(a(l(X,Y+1),l(X,Y),l(X,b))&&n(l(X,Y-1),l(X,Y),l(X,b)))return!1;W=s(l(X,Y),l(X,b));for(var Q=0;Q!==X.length;++Q)if(!((Q+1)%X.length===Y||Q===Y)&&a(l(X,Y),l(X,b),l(X,Q+1))&&n(l(X,Y),l(X,b),l(X,Q))&&(H[0]=l(X,Y),H[1]=l(X,b),Z[0]=l(X,Q),Z[1]=l(X,Q+1),z=m(H,Z),s(l(X,Y),z)0?L(X,Y):[X]}function L(X,Y){if(Y.length===0)return[X];if(Y instanceof Array&&Y.length&&Y[0]instanceof Array&&Y[0].length===2&&Y[0][0]instanceof Array){for(var b=[X],z=0;zH)return console.warn("quickDecomp: max level ("+H+") reached."),Y;for(var pt=0;ptat&&(at+=X.length),ft=Number.MAX_VALUE,at3&&z>=0;--z)h(l(X,z-1),l(X,z),l(X,z+1),Y)&&(X.splice(z%X.length,1),b++);return b}function K(X,Y){for(var b=X.length-1;b>=1;--b)for(var z=X[b],W=b-1;W>=0;--W)if(J(z,X[W],Y)){X.splice(b,1);continue}}function j(X,Y,b){return b=b||0,Math.abs(X-Y)<=b}function J(X,Y,b){return j(X[0],Y[0],b)&&j(X[1],Y[1],b)}},52018:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} -*/var a=t(83419),v=new a({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}});c.exports=v},42363:c=>{/** +*/var o=t(83419),v=new o({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}});c.exports=v},42363:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4610,19 +4610,19 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={},t={},a={};a.register=function(v,o,r,n){n===void 0&&(n=!1),m[v]={plugin:o,mapping:r,custom:n}},a.registerCustom=function(v,o,r,n){t[v]={plugin:o,mapping:r,data:n}},a.hasCore=function(v){return m.hasOwnProperty(v)},a.hasCustom=function(v){return t.hasOwnProperty(v)},a.getCore=function(v){return m[v]},a.getCustom=function(v){return t[v]},a.getCustomClass=function(v){return t.hasOwnProperty(v)?t[v].plugin:null},a.remove=function(v){m.hasOwnProperty(v)&&delete m[v]},a.removeCustom=function(v){t.hasOwnProperty(v)&&delete t[v]},a.destroyCorePlugins=function(){for(var v in m)m.hasOwnProperty(v)&&delete m[v]},a.destroyCustomPlugins=function(){for(var v in t)t.hasOwnProperty(v)&&delete t[v]},c.exports=a},77332:(c,m,t)=>{/** + */var m={},t={},o={};o.register=function(v,a,r,n){n===void 0&&(n=!1),m[v]={plugin:a,mapping:r,custom:n}},o.registerCustom=function(v,a,r,n){t[v]={plugin:a,mapping:r,data:n}},o.hasCore=function(v){return m.hasOwnProperty(v)},o.hasCustom=function(v){return t.hasOwnProperty(v)},o.getCore=function(v){return m[v]},o.getCustom=function(v){return t[v]},o.getCustomClass=function(v){return t.hasOwnProperty(v)?t[v].plugin:null},o.remove=function(v){m.hasOwnProperty(v)&&delete m[v]},o.removeCustom=function(v){t.hasOwnProperty(v)&&delete t[v]},o.destroyCorePlugins=function(){for(var v in m)m.hasOwnProperty(v)&&delete m[v]},o.destroyCustomPlugins=function(){for(var v in t)t.hasOwnProperty(v)&&delete t[v]},c.exports=o},77332:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(8443),o=t(50792),r=t(74099),n=t(44603),e=t(39429),i=t(95540),h=t(37277),s=t(72905),l=new a({Extends:o,initialize:function(u){o.call(this),this.game=u,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],u.isBooted?this.boot():u.events.once(v.BOOT,this.boot,this)},boot:function(){var f,u,d,p,g,y,x,T=this.game.config,C=T.installGlobalPlugins;for(C=C.concat(this._pendingGlobal),f=0;f{/** + */var o=t(83419),v=t(8443),a=t(50792),r=t(74099),n=t(44603),e=t(39429),i=t(95540),h=t(37277),s=t(72905),l=new o({Extends:a,initialize:function(u){a.call(this),this.game=u,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],u.isBooted?this.boot():u.events.once(v.BOOT,this.boot,this)},boot:function(){var f,u,d,p,g,y,x,C=this.game.config,P=C.installGlobalPlugins;for(P=P.concat(this._pendingGlobal),f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} -*/var a=t(52018),v=t(83419),o=t(44594),r=new v({Extends:a,initialize:function(e,i,h){a.call(this,i),this.scene=e,this.systems=e.sys,this.pluginKey=h,e.sys.events.once(o.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});c.exports=r},18922:(c,m,t)=>{/** +*/var o=t(52018),v=t(83419),a=t(44594),r=new v({Extends:o,initialize:function(e,i,h){o.call(this,i),this.scene=e,this.systems=e.sys,this.pluginKey=h,e.sys.events.once(a.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});c.exports=r},18922:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={BasePlugin:t(52018),DefaultPlugins:t(42363),PluginCache:t(37277),PluginManager:t(77332),ScenePlugin:t(45145)}},63595:()=>{HTMLVideoElement&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(c){const m=performance.now(),t=this.getVideoPlaybackQuality(),a=this.mozPresentedFrames||this.mozPaintedFrames||t.totalVideoFrames-t.droppedVideoFrames,v=(o,r)=>{const n=this.getVideoPlaybackQuality(),e=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames;if(e>a){const i=this.mozFrameDelay||n.totalFrameDelay-t.totalFrameDelay||0,h=r-o;c(r,{presentationTime:r+i*1e3,expectedDisplayTime:r+h,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+h/1e3,presentedFrames:e,processingDuration:i}),delete this._rvfcpolyfillmap[m]}else this._rvfcpolyfillmap[m]=requestAnimationFrame(i=>v(r,i))};return this._rvfcpolyfillmap[m]=requestAnimationFrame(o=>v(m,o)),m},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(c){cancelAnimationFrame(this._rvfcpolyfillmap[c]),delete this._rvfcpolyfillmap[c]})},10312:c=>{/** + */c.exports={BasePlugin:t(52018),DefaultPlugins:t(42363),PluginCache:t(37277),PluginManager:t(77332),ScenePlugin:t(45145)}},63595:()=>{HTMLVideoElement&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(c){const m=performance.now(),t=this.getVideoPlaybackQuality(),o=this.mozPresentedFrames||this.mozPaintedFrames||t.totalVideoFrames-t.droppedVideoFrames,v=(a,r)=>{const n=this.getVideoPlaybackQuality(),e=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames;if(e>o){const i=this.mozFrameDelay||n.totalFrameDelay-t.totalFrameDelay||0,h=r-a;c(r,{presentationTime:r+i*1e3,expectedDisplayTime:r+h,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+h/1e3,presentedFrames:e,processingDuration:i}),delete this._rvfcpolyfillmap[m]}else this._rvfcpolyfillmap[m]=requestAnimationFrame(i=>v(r,i))};return this._rvfcpolyfillmap[m]=requestAnimationFrame(a=>v(m,a)),m},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(c){cancelAnimationFrame(this._rvfcpolyfillmap[c]),delete this._rvfcpolyfillmap[c]})},10312:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4635,7 +4635,7 @@ return new `+this.key+`(); * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(19715),v=t(32880),o=t(83419),r=t(8054),n=t(50792),e=t(92503),i=t(56373),h=t(97480),s=t(69442),l=t(61340),f=new o({Extends:n,initialize:function(d){n.call(this);var p=d.config;this.config={clearBeforeRender:p.clearBeforeRender,backgroundColor:p.backgroundColor,antialias:p.antialias,roundPixels:p.roundPixels},this.game=d,this.type=r.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=d.canvas;var g={alpha:d.config.transparent,desynchronized:d.config.desynchronized,willReadFrequently:!1};this.gameContext=p.context?p.context:this.gameCanvas.getContext("2d",g),this.currentContext=this.gameContext,this.antialias=d.config.antialias,this.blendModes=i(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(s.READY,this.boot,this)},boot:function(){var u=this.game,d=u.scale.baseSize;this.width=d.width,this.height=d.height,this.isBooted=!0,u.scale.on(h.RESIZE,this.onResize,this),this.resize(d.width,d.height)},onResize:function(u,d){(d.width!==this.width||d.height!==this.height)&&this.resize(d.width,d.height)},resize:function(u,d){this.width=u,this.height=d,this.emit(e.RESIZE,u,d)},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,d=this.config,p=this.width,g=this.height;u.globalAlpha=1,u.globalCompositeOperation="source-over",u.setTransform(1,0,0,1,0,0),d.clearBeforeRender&&(u.clearRect(0,0,p,g),d.transparent||(u.fillStyle=d.backgroundColor.rgba,u.fillRect(0,0,p,g))),u.save(),this.drawCount=0,this.emit(e.PRE_RENDER)},render:function(u,d,p){var g=d.length;this.emit(e.RENDER,u,p);var y=p.x,x=p.y,T=p.width,C=p.height,M=p.renderToTexture?p.context:u.sys.context;M.save(),this.game.scene.customViewports&&(M.beginPath(),M.rect(y,x,T,C),M.clip()),p.emit(a.PRE_RENDER,p),this.currentContext=M;var w=p.mask;w&&w.preRenderCanvas(this,null,p._maskCamera),p.transparent||(M.fillStyle=p.backgroundColor.rgba,M.fillRect(y,x,T,C)),M.globalAlpha=p.alpha,M.globalCompositeOperation="source-over",this.drawCount+=g,p.renderToTexture&&p.emit(a.PRE_RENDER,p),p.matrix.copyToContext(M);for(var L=0;L=0?$=-($+F):$<0&&($=Math.abs($)-F)),u.flipY&&(J>=0?J=-(J+O):J<0&&(J=Math.abs(J)-O))}var Y=1,D=1;u.flipX&&(N||($+=-d.realWidth+V*2),Y=-1),u.flipY&&(N||(J+=-d.realHeight+K*2),D=-1);var z=u.x,W=u.y;C.applyITRS(z,W,u.rotation,u.scaleX*Y,u.scaleY*D),T.copyFrom(p.matrix),g?(T.multiplyWithOffset(g,-p.scrollX*u.scrollFactorX,-p.scrollY*u.scrollFactorY),C.e=z,C.f=W):(C.e-=p.scrollX*u.scrollFactorX,C.f-=p.scrollY*u.scrollFactorY),T.multiply(C),p.roundPixels&&(T.e=Math.round(T.e),T.f=Math.round(T.f)),x.save(),T.setToContext(x),x.globalCompositeOperation=this.blendModes[u.blendMode],x.globalAlpha=y,x.imageSmoothingEnabled=!d.source.scaleMode,u.mask&&u.mask.preRenderCanvas(this,u,p),F>0&&O>0&&(p.roundPixels?x.drawImage(d.source.image,w,L,F,O,Math.round($),Math.round(J),Math.round(F/G),Math.round(O/G)):x.drawImage(d.source.image,w,L,F,O,$,J,F/G,O/G)),u.mask&&u.mask.postRenderCanvas(this,u,p),x.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});c.exports=f},55830:(c,m,t)=>{/** + */var o=t(19715),v=t(32880),a=t(83419),r=t(8054),n=t(50792),e=t(92503),i=t(56373),h=t(97480),s=t(69442),l=t(61340),f=new a({Extends:n,initialize:function(d){n.call(this);var p=d.config;this.config={clearBeforeRender:p.clearBeforeRender,backgroundColor:p.backgroundColor,antialias:p.antialias,roundPixels:p.roundPixels},this.game=d,this.type=r.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=d.canvas;var g={alpha:d.config.transparent,desynchronized:d.config.desynchronized,willReadFrequently:!1};this.gameContext=p.context?p.context:this.gameCanvas.getContext("2d",g),this.currentContext=this.gameContext,this.antialias=d.config.antialias,this.blendModes=i(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(s.READY,this.boot,this)},boot:function(){var u=this.game,d=u.scale.baseSize;this.width=d.width,this.height=d.height,this.isBooted=!0,u.scale.on(h.RESIZE,this.onResize,this),this.resize(d.width,d.height)},onResize:function(u,d){(d.width!==this.width||d.height!==this.height)&&this.resize(d.width,d.height)},resize:function(u,d){this.width=u,this.height=d,this.emit(e.RESIZE,u,d)},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,d=this.config,p=this.width,g=this.height;u.globalAlpha=1,u.globalCompositeOperation="source-over",u.setTransform(1,0,0,1,0,0),d.clearBeforeRender&&(u.clearRect(0,0,p,g),d.transparent||(u.fillStyle=d.backgroundColor.rgba,u.fillRect(0,0,p,g))),u.save(),this.drawCount=0,this.emit(e.PRE_RENDER)},render:function(u,d,p){var g=d.length;this.emit(e.RENDER,u,p);var y=p.x,x=p.y,C=p.width,P=p.height,M=p.renderToTexture?p.context:u.sys.context;M.save(),this.game.scene.customViewports&&(M.beginPath(),M.rect(y,x,C,P),M.clip()),p.emit(o.PRE_RENDER,p),this.currentContext=M;var w=p.mask;w&&w.preRenderCanvas(this,null,p._maskCamera),p.transparent||(M.fillStyle=p.backgroundColor.rgba,M.fillRect(y,x,C,P)),M.globalAlpha=p.alpha,M.globalCompositeOperation="source-over",this.drawCount+=g,p.renderToTexture&&p.emit(o.PRE_RENDER,p),p.matrix.copyToContext(M);for(var I=0;I=0?j=-(j+L):j<0&&(j=Math.abs(j)-L)),u.flipY&&(J>=0?J=-(J+B):J<0&&(J=Math.abs(J)-B))}var Y=1,b=1;u.flipX&&(N||(j+=-d.realWidth+V*2),Y=-1),u.flipY&&(N||(J+=-d.realHeight+K*2),b=-1);var z=u.x,W=u.y;P.applyITRS(z,W,u.rotation,u.scaleX*Y,u.scaleY*b),C.copyFrom(p.matrix),g?(C.multiplyWithOffset(g,-p.scrollX*u.scrollFactorX,-p.scrollY*u.scrollFactorY),P.e=z,P.f=W):(P.e-=p.scrollX*u.scrollFactorX,P.f-=p.scrollY*u.scrollFactorY),C.multiply(P),p.roundPixels&&(C.e=Math.round(C.e),C.f=Math.round(C.f)),x.save(),C.setToContext(x),x.globalCompositeOperation=this.blendModes[u.blendMode],x.globalAlpha=y,x.imageSmoothingEnabled=!d.source.scaleMode,u.mask&&u.mask.preRenderCanvas(this,u,p),L>0&&B>0&&(p.roundPixels?x.drawImage(d.source.image,w,I,L,B,Math.round(j),Math.round(J),Math.round(L/G),Math.round(B/G)):x.drawImage(d.source.image,w,I,L,B,j,J,L/G,B/G)),u.mask&&u.mask.postRenderCanvas(this,u,p),x.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});c.exports=f},55830:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4643,11 +4643,11 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10312),v=t(89289),o=function(){var r=[],n=v.supportNewBlendModes,e="source-over";return r[a.NORMAL]=e,r[a.ADD]="lighter",r[a.MULTIPLY]=n?"multiply":e,r[a.SCREEN]=n?"screen":e,r[a.OVERLAY]=n?"overlay":e,r[a.DARKEN]=n?"darken":e,r[a.LIGHTEN]=n?"lighten":e,r[a.COLOR_DODGE]=n?"color-dodge":e,r[a.COLOR_BURN]=n?"color-burn":e,r[a.HARD_LIGHT]=n?"hard-light":e,r[a.SOFT_LIGHT]=n?"soft-light":e,r[a.DIFFERENCE]=n?"difference":e,r[a.EXCLUSION]=n?"exclusion":e,r[a.HUE]=n?"hue":e,r[a.SATURATION]=n?"saturation":e,r[a.COLOR]=n?"color":e,r[a.LUMINOSITY]=n?"luminosity":e,r[a.ERASE]="destination-out",r[a.SOURCE_IN]="source-in",r[a.SOURCE_OUT]="source-out",r[a.SOURCE_ATOP]="source-atop",r[a.DESTINATION_OVER]="destination-over",r[a.DESTINATION_IN]="destination-in",r[a.DESTINATION_OUT]="destination-out",r[a.DESTINATION_ATOP]="destination-atop",r[a.LIGHTER]="lighter",r[a.COPY]="copy",r[a.XOR]="xor",r};c.exports=o},20926:(c,m,t)=>{/** + */var o=t(10312),v=t(89289),a=function(){var r=[],n=v.supportNewBlendModes,e="source-over";return r[o.NORMAL]=e,r[o.ADD]="lighter",r[o.MULTIPLY]=n?"multiply":e,r[o.SCREEN]=n?"screen":e,r[o.OVERLAY]=n?"overlay":e,r[o.DARKEN]=n?"darken":e,r[o.LIGHTEN]=n?"lighten":e,r[o.COLOR_DODGE]=n?"color-dodge":e,r[o.COLOR_BURN]=n?"color-burn":e,r[o.HARD_LIGHT]=n?"hard-light":e,r[o.SOFT_LIGHT]=n?"soft-light":e,r[o.DIFFERENCE]=n?"difference":e,r[o.EXCLUSION]=n?"exclusion":e,r[o.HUE]=n?"hue":e,r[o.SATURATION]=n?"saturation":e,r[o.COLOR]=n?"color":e,r[o.LUMINOSITY]=n?"luminosity":e,r[o.ERASE]="destination-out",r[o.SOURCE_IN]="source-in",r[o.SOURCE_OUT]="source-out",r[o.SOURCE_ATOP]="source-atop",r[o.DESTINATION_OVER]="destination-over",r[o.DESTINATION_IN]="destination-in",r[o.DESTINATION_OUT]="destination-out",r[o.DESTINATION_ATOP]="destination-atop",r[o.LIGHTER]="lighter",r[o.COPY]="copy",r[o.XOR]="xor",r};c.exports=a},20926:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=function(o,r,n,e,i){var h=e.alpha*n.alpha;if(h<=0)return!1;var s=a(n,e,i).calc;return r.globalCompositeOperation=o.blendModes[n.blendMode],r.globalAlpha=h,r.save(),s.setToContext(r),r.imageSmoothingEnabled=n.frame?!n.frame.source.scaleMode:o.antialias,!0};c.exports=v},63899:c=>{/** + */var o=t(91296),v=function(a,r,n,e,i){var h=e.alpha*n.alpha;if(h<=0)return!1;var s=o(n,e,i).calc;return r.globalCompositeOperation=a.blendModes[n.blendMode],r.globalAlpha=h,r.save(),s.setToContext(r),r.imageSmoothingEnabled=n.frame?!n.frame.source.scaleMode:a.antialias,!0};c.exports=v},63899:c=>{/** * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4683,11 +4683,11 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(27919),v=t(40987),o=t(95540),r=function(n,e){var i=o(e,"callback"),h=o(e,"type","image/png"),s=o(e,"encoder",.92),l=Math.abs(Math.round(o(e,"x",0))),f=Math.abs(Math.round(o(e,"y",0))),u=Math.floor(o(e,"width",n.width)),d=Math.floor(o(e,"height",n.height)),p=o(e,"getPixel",!1);if(p){var g=n.getContext("2d",{willReadFrequently:!1}),y=g.getImageData(l,f,1,1),x=y.data;i.call(null,new v(x[0],x[1],x[2],x[3]))}else if(l!==0||f!==0||u!==n.width||d!==n.height){var T=a.createWebGL(this,u,d),C=T.getContext("2d",{willReadFrequently:!0});u>0&&d>0&&C.drawImage(n,l,f,u,d,0,0,u,d);var M=new Image;M.onerror=function(){i.call(null),a.remove(T)},M.onload=function(){i.call(null,M),a.remove(T)},M.src=T.toDataURL(h,s)}else{var w=new Image;w.onerror=function(){i.call(null)},w.onload=function(){i.call(null,w)},w.src=n.toDataURL(h,s)}};c.exports=r},88815:(c,m,t)=>{/** + */var o=t(27919),v=t(40987),a=t(95540),r=function(n,e){var i=a(e,"callback"),h=a(e,"type","image/png"),s=a(e,"encoder",.92),l=Math.abs(Math.round(a(e,"x",0))),f=Math.abs(Math.round(a(e,"y",0))),u=Math.floor(a(e,"width",n.width)),d=Math.floor(a(e,"height",n.height)),p=a(e,"getPixel",!1);if(p){var g=n.getContext("2d",{willReadFrequently:!1}),y=g.getImageData(l,f,1,1),x=y.data;i.call(null,new v(x[0],x[1],x[2],x[3]))}else if(l!==0||f!==0||u!==n.width||d!==n.height){var C=o.createWebGL(this,u,d),P=C.getContext("2d",{willReadFrequently:!0});u>0&&d>0&&P.drawImage(n,l,f,u,d,0,0,u,d);var M=new Image;M.onerror=function(){i.call(null),o.remove(C)},M.onload=function(){i.call(null,M),o.remove(C)},M.src=C.toDataURL(h,s)}else{var w=new Image;w.onerror=function(){i.call(null)},w.onload=function(){i.call(null,w)},w.src=n.toDataURL(h,s)}};c.exports=r},88815:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(27919),v=t(40987),o=t(95540),r=function(n,e){var i=n,h=o(e,"callback"),s=o(e,"type","image/png"),l=o(e,"encoder",.92),f=Math.abs(Math.round(o(e,"x",0))),u=Math.abs(Math.round(o(e,"y",0))),d=o(e,"getPixel",!1),p=o(e,"isFramebuffer",!1),g=p?o(e,"bufferWidth",1):i.drawingBufferWidth,y=p?o(e,"bufferHeight",1):i.drawingBufferHeight;if(d){var x=new Uint8Array(4),T=p?u:y-u;i.readPixels(f,T,1,1,i.RGBA,i.UNSIGNED_BYTE,x),h.call(null,new v(x[0],x[1],x[2],x[3]))}else{var C=Math.floor(o(e,"width",g)),M=Math.floor(o(e,"height",y)),w=C*M*4,L=new Uint8Array(w);i.readPixels(f,y-u-M,C,M,i.RGBA,i.UNSIGNED_BYTE,L);for(var F=a.createWebGL(this,C,M),O=F.getContext("2d",{willReadFrequently:!0}),N=O.getImageData(0,0,C,M),G=N.data,V=0;V{/** + */var o=t(27919),v=t(40987),a=t(95540),r=function(n,e){var i=n,h=a(e,"callback"),s=a(e,"type","image/png"),l=a(e,"encoder",.92),f=Math.abs(Math.round(a(e,"x",0))),u=Math.abs(Math.round(a(e,"y",0))),d=a(e,"getPixel",!1),p=a(e,"isFramebuffer",!1),g=p?a(e,"bufferWidth",1):i.drawingBufferWidth,y=p?a(e,"bufferHeight",1):i.drawingBufferHeight;if(d){var x=new Uint8Array(4),C=p?u:y-u;i.readPixels(f,C,1,1,i.RGBA,i.UNSIGNED_BYTE,x),h.call(null,new v(x[0],x[1],x[2],x[3]))}else{var P=Math.floor(a(e,"width",g)),M=Math.floor(a(e,"height",y)),w=P*M*4,I=new Uint8Array(w);i.readPixels(f,y-u-M,P,M,i.RGBA,i.UNSIGNED_BYTE,I);for(var L=o.createWebGL(this,P,M),B=L.getContext("2d",{willReadFrequently:!0}),N=B.getImageData(0,0,P,M),G=N.data,V=0;V{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4695,35 +4695,35 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(36060),o=t(90330),r=t(82264),n=t(95540),e=t(32302),i=t(63448),h=t(31302),s=t(58918),l=t(14811),f=t(92651),u=t(96569),d=t(56527),p=t(57516),g=t(43439),y=t(81041),x=t(12385),T=t(7589),C=t(95428),M=t(72905),w=new a({initialize:function(F){this.game=F.game,this.renderer=F,this.classes=new o([[v.UTILITY_PIPELINE,T],[v.MULTI_PIPELINE,p],[v.BITMAPMASK_PIPELINE,h],[v.SINGLE_PIPELINE,x],[v.ROPE_PIPELINE,y],[v.LIGHT_PIPELINE,u],[v.POINTLIGHT_PIPELINE,g],[v.MOBILE_PIPELINE,d]]),this.postPipelineClasses=new o,this.pipelines=new o,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(L,F,O){var N=this.renderer,G=this.renderTargets;this.frameInc=Math.floor(n(L,"frameInc",32));var V=N.width,K=N.height,$=this.game.config.disablePreFX,J=this.game.config.disablePostFX;if(J||this.postPipelineClasses.setAll([[String(l.BARREL),s.Barrel],[String(l.BLOOM),s.Bloom],[String(l.BLUR),s.Blur],[String(l.BOKEH),s.Bokeh],[String(l.CIRCLE),s.Circle],[String(l.COLOR_MATRIX),s.ColorMatrix],[String(l.DISPLACEMENT),s.Displacement],[String(l.GLOW),s.Glow],[String(l.GRADIENT),s.Gradient],[String(l.PIXELATE),s.Pixelate],[String(l.SHADOW),s.Shadow],[String(l.SHINE),s.Shine],[String(l.VIGNETTE),s.Vignette],[String(l.WIPE),s.Wipe]]),!$){this.classes.set(v.FX_PIPELINE,f);for(var X=Math.min(V,K),Y=Math.ceil(X/this.frameInc),D=1;D=0;O--){var N=F[O];N.active&&N.preBatch(L)}}},postBatch:function(L){if(L.hasPostPipeline){this.flush();for(var F=L.postPipelines,O=0;O=0;O--){var N=F[O];N.active&&N.preBatch(L)}}},postBatchCamera:function(L){if(L.hasPostPipeline){this.flush();for(var F=L.postPipelines,O=0;Othis.maxDimension)return this.targetIndex=F.length-O,F[this.targetIndex];var N=(i(L,this.frameInc,0,!0)-1)*O;return this.targetIndex=N,F[N]},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}});c.exports=w},32302:(c,m,t)=>{/** + */var o=t(83419),v=t(36060),a=t(90330),r=t(82264),n=t(95540),e=t(32302),i=t(63448),h=t(31302),s=t(58918),l=t(14811),f=t(92651),u=t(96569),d=t(56527),p=t(57516),g=t(43439),y=t(81041),x=t(12385),C=t(7589),P=t(95428),M=t(72905),w=new o({initialize:function(L){this.game=L.game,this.renderer=L,this.classes=new a([[v.UTILITY_PIPELINE,C],[v.MULTI_PIPELINE,p],[v.BITMAPMASK_PIPELINE,h],[v.SINGLE_PIPELINE,x],[v.ROPE_PIPELINE,y],[v.LIGHT_PIPELINE,u],[v.POINTLIGHT_PIPELINE,g],[v.MOBILE_PIPELINE,d]]),this.postPipelineClasses=new a,this.pipelines=new a,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(I,L,B){var N=this.renderer,G=this.renderTargets;this.frameInc=Math.floor(n(I,"frameInc",32));var V=N.width,K=N.height,j=this.game.config.disablePreFX,J=this.game.config.disablePostFX;if(J||this.postPipelineClasses.setAll([[String(l.BARREL),s.Barrel],[String(l.BLOOM),s.Bloom],[String(l.BLUR),s.Blur],[String(l.BOKEH),s.Bokeh],[String(l.CIRCLE),s.Circle],[String(l.COLOR_MATRIX),s.ColorMatrix],[String(l.DISPLACEMENT),s.Displacement],[String(l.GLOW),s.Glow],[String(l.GRADIENT),s.Gradient],[String(l.PIXELATE),s.Pixelate],[String(l.SHADOW),s.Shadow],[String(l.SHINE),s.Shine],[String(l.VIGNETTE),s.Vignette],[String(l.WIPE),s.Wipe]]),!j){this.classes.set(v.FX_PIPELINE,f);for(var X=Math.min(V,K),Y=Math.ceil(X/this.frameInc),b=1;b=0;B--){var N=L[B];N.active&&N.preBatch(I)}}},postBatch:function(I){if(I.hasPostPipeline){this.flush();for(var L=I.postPipelines,B=0;B=0;B--){var N=L[B];N.active&&N.preBatch(I)}}},postBatchCamera:function(I){if(I.hasPostPipeline){this.flush();for(var L=I.postPipelines,B=0;Bthis.maxDimension)return this.targetIndex=L.length-B,L[this.targetIndex];var N=(i(I,this.frameInc,0,!0)-1)*B;return this.targetIndex=N,L[N]},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}});c.exports=w},32302:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(92503),o=new a({initialize:function(n,e,i,h,s,l,f,u,d){h===void 0&&(h=1),s===void 0&&(s=0),l===void 0&&(l=!0),f===void 0&&(f=!1),u===void 0&&(u=!0),d===void 0&&(d=!0),this.renderer=n,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=h,this.minFilter=s,this.autoClear=l,this.autoResize=!0,this.hasDepthBuffer=u,this.forceClamp=d,this.resize(e,i),f?this.setAutoResize(!0):this.autoResize=!1},setAutoResize:function(r){return r&&!this.autoResize?(this.renderer.on(v.RESIZE,this.resize,this),this.autoResize=!0):!r&&this.autoResize&&(this.renderer.off(v.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(r,n){if(r=Math.round(r*this.scale),n=Math.round(n*this.scale),r<=0&&(r=1),n<=0&&(n=1),this.autoResize&&(r!==this.width||n!==this.height)){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 r=Math.round(r*this.scale),n=Math.round(n*this.scale),r<=0&&(r=1),n<=0&&(n=1),r!==this.width||n!==this.height},bind:function(r,n,e){r===void 0&&(r=!1);var i=this.renderer;if(r&&i.flush(),n&&e&&this.resize(n,e),i.pushFramebuffer(this.framebuffer,!1,!1),r&&this.adjustViewport(),this.autoClear){var h=this.renderer.gl;h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT)}i.clearStencilMask()},adjustViewport:function(){var r=this.renderer.gl;r.viewport(0,0,this.width,this.height),r.disable(r.SCISSOR_TEST)},clear:function(){var r=this.renderer,n=r.gl;r.pushFramebuffer(this.framebuffer),n.disable(n.SCISSOR_TEST),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),r.popFramebuffer(),r.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(v.RESIZE,this.resize,this),r.deleteFramebuffer(this.framebuffer),r.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});c.exports=o},70554:c=>{/** + */var o=t(83419),v=t(92503),a=new o({initialize:function(n,e,i,h,s,l,f,u,d){h===void 0&&(h=1),s===void 0&&(s=0),l===void 0&&(l=!0),f===void 0&&(f=!1),u===void 0&&(u=!0),d===void 0&&(d=!0),this.renderer=n,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=h,this.minFilter=s,this.autoClear=l,this.autoResize=!0,this.hasDepthBuffer=u,this.forceClamp=d,this.resize(e,i),f?this.setAutoResize(!0):this.autoResize=!1},setAutoResize:function(r){return r&&!this.autoResize?(this.renderer.on(v.RESIZE,this.resize,this),this.autoResize=!0):!r&&this.autoResize&&(this.renderer.off(v.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(r,n){if(r=Math.round(r*this.scale),n=Math.round(n*this.scale),r<=0&&(r=1),n<=0&&(n=1),this.autoResize&&(r!==this.width||n!==this.height)){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 r=Math.round(r*this.scale),n=Math.round(n*this.scale),r<=0&&(r=1),n<=0&&(n=1),r!==this.width||n!==this.height},bind:function(r,n,e){r===void 0&&(r=!1);var i=this.renderer;if(r&&i.flush(),n&&e&&this.resize(n,e),i.pushFramebuffer(this.framebuffer,!1,!1),r&&this.adjustViewport(),this.autoClear){var h=this.renderer.gl;h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT)}i.clearStencilMask()},adjustViewport:function(){var r=this.renderer.gl;r.viewport(0,0,this.width,this.height),r.disable(r.SCISSOR_TEST)},clear:function(){var r=this.renderer,n=r.gl;r.pushFramebuffer(this.framebuffer),n.disable(n.SCISSOR_TEST),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),r.popFramebuffer(),r.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(v.RESIZE,this.resize,this),r.deleteFramebuffer(this.framebuffer),r.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});c.exports=a},70554:c=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @author Matthew Groves <@doormat> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={getTintFromFloats:function(m,t,a,v){var o=(m*255|0)&255,r=(t*255|0)&255,n=(a*255|0)&255,e=(v*255|0)&255;return(e<<24|o<<16|r<<8|n)>>>0},getTintAppendFloatAlpha:function(m,t){var a=(t*255|0)&255;return(a<<24|m)>>>0},getTintAppendFloatAlphaAndSwap:function(m,t){var a=(m>>16|0)&255,v=(m>>8|0)&255,o=(m|0)&255,r=(t*255|0)&255;return(r<<24|o<<16|v<<8|a)>>>0},getFloatsFromUintRGB:function(m){var t=(m>>16|0)&255,a=(m>>8|0)&255,v=(m|0)&255;return[t/255,a/255,v/255]},checkShaderMax:function(m,t){var a=Math.min(16,m.getParameter(m.MAX_TEXTURE_IMAGE_UNITS));return!t||t===-1?a:Math.min(a,t)},parseFragmentShaderMaxTextures:function(m,t){if(!m)return"";for(var a="",v=0;v0&&(a+=` - else `),v{/** + */c.exports={getTintFromFloats:function(m,t,o,v){var a=(m*255|0)&255,r=(t*255|0)&255,n=(o*255|0)&255,e=(v*255|0)&255;return(e<<24|a<<16|r<<8|n)>>>0},getTintAppendFloatAlpha:function(m,t){var o=(t*255|0)&255;return(o<<24|m)>>>0},getTintAppendFloatAlphaAndSwap:function(m,t){var o=(m>>16|0)&255,v=(m>>8|0)&255,a=(m|0)&255,r=(t*255|0)&255;return(r<<24|a<<16|v<<8|o)>>>0},getFloatsFromUintRGB:function(m){var t=(m>>16|0)&255,o=(m>>8|0)&255,v=(m|0)&255;return[t/255,o/255,v/255]},checkShaderMax:function(m,t){var o=Math.min(16,m.getParameter(m.MAX_TEXTURE_IMAGE_UNITS));return!t||t===-1?o:Math.min(o,t)},parseFragmentShaderMaxTextures:function(m,t){if(!m)return"";for(var o="",v=0;v0&&(o+=` + else `),v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(62644),o=t(50792),r=t(77085),n=t(95540),e=t(37867),i=t(92503),h=t(32302),s=t(70554),l=t(38683),f=new a({Extends:o,initialize:function(d){o.call(this);var p=d.game,g=p.renderer,y=g.gl;this.name=n(d,"name","WebGLPipeline"),this.game=p,this.renderer=g,this.manager,this.gl=y,this.view=p.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=n(d,"topology",y.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=n(d,"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=d,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=n(d,"resizeUniform","")},boot:function(){var u,d=this.gl,p=this.config,g=this.renderer;this.isPostFX||(this.projectionMatrix=new e().identity());var y=this.renderTargets,x=n(p,"renderTarget",!1);typeof x=="boolean"&&x&&(x=1);var T=g.width,C=g.height;if(typeof x=="number")for(u=0;uV&&(V=G[u].vertexSize);var K=n(p,"batchSize",g.config.batchSize);this.vertexCapacity=K*6;var $=new ArrayBuffer(this.vertexCapacity*V);this.vertexData=$,this.bytes=new Uint8Array($),this.vertexViewF32=new Float32Array($),this.vertexViewU32=new Uint32Array($);var J=n(p,"vertices",null);for(J?(this.vertexViewF32.set(J),this.vertexBuffer=g.createVertexBuffer($,d.STATIC_DRAW)):this.vertexBuffer=g.createVertexBuffer($.byteLength,d.DYNAMIC_DRAW),this.setVertexBuffer(),u=G.length-1;u>=0;u--)G[u].rebind();this.hasBooted=!0,g.on(i.RESIZE,this.resize,this),g.on(i.PRE_RENDER,this.onPreRender,this),g.on(i.RENDER,this.onRender,this),g.on(i.POST_RENDER,this.onPostRender,this),this.emit(r.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(u,d,p){var g=this.renderer;if(u!==this.currentShader||g.currentProgram!==this.currentShader.program){this.flush();var y=this.setVertexBuffer(p);y&&!d&&(d=!0),u.bind(d,!1),this.currentShader=u}return this},getShaderByName:function(u){for(var d=this.shaders,p=0;p-1&&(G=X.substring(20))}V&&K&&O.push(new l(this,G,V,K,v($)))}this.shaders=O}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 d=this.currentBatch;d&&(d.texture.push(u),d.unit++,d.maxUnit++)},pushBatch:function(u){if(!this.currentBatch||this.forceZero&&u!==this.currentTexture)return this.createBatch(u);if(u===this.currentTexture)return this.currentUnit;var d=this.currentBatch,p=d.texture.indexOf(u);return p===-1?d.texture.length===this.renderer.maxTextures?this.createBatch(u):(d.unit++,d.maxUnit++,d.texture.push(u),this.currentUnit=d.unit,this.currentTexture=u,d.unit):(this.currentUnit=p,this.currentTexture=u,p)},setGameObject:function(u,d){return d===void 0&&(d=u.frame),this.pushBatch(d.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,d){(u!==this.width||d!==this.height)&&this.flush(),this.width=u,this.height=d;for(var p=this.renderTargets,g=0;g=0;p--){var g=d[p].rebind();(!u||g===u)&&(this.currentShader=g)}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,d=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,d&&this.setVertexBuffer();for(var p=0;p0){this.emit(r.BEFORE_FLUSH,this,u),this.onBeforeFlush(u);var d=this.gl,p=this.vertexCount,g=this.currentShader.vertexSize,y=this.topology;if(this.active){this.setVertexBuffer(),p===this.vertexCapacity?d.bufferData(d.ARRAY_BUFFER,this.vertexData,d.DYNAMIC_DRAW):d.bufferSubData(d.ARRAY_BUFFER,0,this.bytes.subarray(0,p*g));var x,T,C,M=this.batch,w=this.activeTextures;if(this.forceZero)for(w[0]||d.activeTexture(d.TEXTURE0),x=0;x{/** + */var o=t(83419),v=t(62644),a=t(50792),r=t(77085),n=t(95540),e=t(37867),i=t(92503),h=t(32302),s=t(70554),l=t(38683),f=new o({Extends:a,initialize:function(d){a.call(this);var p=d.game,g=p.renderer,y=g.gl;this.name=n(d,"name","WebGLPipeline"),this.game=p,this.renderer=g,this.manager,this.gl=y,this.view=p.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=n(d,"topology",y.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=n(d,"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=d,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=n(d,"resizeUniform","")},boot:function(){var u,d=this.gl,p=this.config,g=this.renderer;this.isPostFX||(this.projectionMatrix=new e().identity());var y=this.renderTargets,x=n(p,"renderTarget",!1);typeof x=="boolean"&&x&&(x=1);var C=g.width,P=g.height;if(typeof x=="number")for(u=0;uV&&(V=G[u].vertexSize);var K=n(p,"batchSize",g.config.batchSize);this.vertexCapacity=K*6;var j=new ArrayBuffer(this.vertexCapacity*V);this.vertexData=j,this.bytes=new Uint8Array(j),this.vertexViewF32=new Float32Array(j),this.vertexViewU32=new Uint32Array(j);var J=n(p,"vertices",null);for(J?(this.vertexViewF32.set(J),this.vertexBuffer=g.createVertexBuffer(j,d.STATIC_DRAW)):this.vertexBuffer=g.createVertexBuffer(j.byteLength,d.DYNAMIC_DRAW),this.setVertexBuffer(),u=G.length-1;u>=0;u--)G[u].rebind();this.hasBooted=!0,g.on(i.RESIZE,this.resize,this),g.on(i.PRE_RENDER,this.onPreRender,this),g.on(i.RENDER,this.onRender,this),g.on(i.POST_RENDER,this.onPostRender,this),this.emit(r.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(u,d,p){var g=this.renderer;if(u!==this.currentShader||g.currentProgram!==this.currentShader.program){this.flush();var y=this.setVertexBuffer(p);y&&!d&&(d=!0),u.bind(d,!1),this.currentShader=u}return this},getShaderByName:function(u){for(var d=this.shaders,p=0;p-1&&(G=X.substring(20))}V&&K&&B.push(new l(this,G,V,K,v(j)))}this.shaders=B}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 d=this.currentBatch;d&&(d.texture.push(u),d.unit++,d.maxUnit++)},pushBatch:function(u){if(!this.currentBatch||this.forceZero&&u!==this.currentTexture)return this.createBatch(u);if(u===this.currentTexture)return this.currentUnit;var d=this.currentBatch,p=d.texture.indexOf(u);return p===-1?d.texture.length===this.renderer.maxTextures?this.createBatch(u):(d.unit++,d.maxUnit++,d.texture.push(u),this.currentUnit=d.unit,this.currentTexture=u,d.unit):(this.currentUnit=p,this.currentTexture=u,p)},setGameObject:function(u,d){return d===void 0&&(d=u.frame),this.pushBatch(d.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,d){(u!==this.width||d!==this.height)&&this.flush(),this.width=u,this.height=d;for(var p=this.renderTargets,g=0;g=0;p--){var g=d[p].rebind();(!u||g===u)&&(this.currentShader=g)}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,d=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,d&&this.setVertexBuffer();for(var p=0;p0){this.emit(r.BEFORE_FLUSH,this,u),this.onBeforeFlush(u);var d=this.gl,p=this.vertexCount,g=this.currentShader.vertexSize,y=this.topology;if(this.active){this.setVertexBuffer(),p===this.vertexCapacity?d.bufferData(d.ARRAY_BUFFER,this.vertexData,d.DYNAMIC_DRAW):d.bufferSubData(d.ARRAY_BUFFER,0,this.bytes.subarray(0,p*g));var x,C,P,M=this.batch,w=this.activeTextures;if(this.forceZero)for(w[0]||d.activeTexture(d.TEXTURE0),x=0;x{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95428),v=t(72905),o=t(19715),r=t(83419),n=t(8054),e=t(50792),i=t(92503),h=t(50030),s=t(37867),l=t(29747),f=t(7530),u=t(32302),d=t(97480),p=t(69442),g=t(70554),y=t(88815),x=t(26128),T=t(1482),C=t(82751),M=t(84387),w=t(93567),L=t(57183),F=new r({Extends:e,initialize:function(N){e.call(this);var G=N.config,V={alpha:G.transparent,desynchronized:G.desynchronized,depth:!0,antialias:G.antialiasGL,premultipliedAlpha:G.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:G.failIfMajorPerformanceCaveat,powerPreference:G.powerPreference,preserveDrawingBuffer:G.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:G.clearBeforeRender,antialias:G.antialias,backgroundColor:G.backgroundColor,contextCreation:V,roundPixels:G.roundPixels,maxTextures:G.maxTextures,maxTextureSize:G.maxTextureSize,batchSize:G.batchSize,maxLights:G.maxLights,mipmapFilter:G.mipmapFilter},this.game=N,this.type=n.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=N.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=l,this.contextRestoredHandler=l,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(O){var N,G=this.game,V=this.canvas,K=O.backgroundColor;if(G.config.context?N=G.config.context:N=V.getContext("webgl",O.contextCreation)||V.getContext("experimental-webgl",O.contextCreation),!N||N.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=N;var $=this,J=function(){var D=N.getSupportedExtensions();$.supportedExtensions=D;var z="ANGLE_instanced_arrays";$.instancedArraysExtension=D.indexOf(z)>-1?N.getExtension(z):null;var W="OES_vertex_array_object";$.vaoExtension=D.indexOf(W)>-1?N.getExtension(W):null};J(),this.contextLostHandler=function(D){$.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),$.emit(i.LOSE_WEBGL,$),D.preventDefault()},V.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.contextRestoredHandler=function(D){if(N.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}$.currentProgram=null,$.currentFramebuffer=null,$.setBlendMode(n.BlendModes.NORMAL),N.disable(N.BLEND),N.disable(N.DEPTH_TEST),N.enable(N.CULL_FACE),$.compression=$.getCompressedTextures();var z=function(W){W.createResource()};a($.glTextureWrappers,z),a($.glBufferWrappers,z),a($.glFramebufferWrappers,z),a($.glProgramWrappers,z),a($.glAttribLocationWrappers,z),a($.glUniformLocationWrappers,z),$.createTemporaryTextures(),$.pipelines.restoreContext(),$.resize($.game.scale.baseSize.width,$.game.scale.baseSize.height),J(),$.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),$.emit(i.RESTORE_WEBGL,$),D.preventDefault()},V.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),G.context=N;for(var X=0;X<=27;X++)this.blendModes.push({func:[N.ONE,N.ONE_MINUS_SRC_ALPHA],equation:N.FUNC_ADD});this.blendModes[1].func=[N.ONE,N.DST_ALPHA],this.blendModes[2].func=[N.DST_COLOR,N.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[N.ONE,N.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[N.ZERO,N.ONE_MINUS_SRC_ALPHA],equation:N.FUNC_REVERSE_SUBTRACT},this.glFormats=[N.BYTE,N.SHORT,N.UNSIGNED_BYTE,N.UNSIGNED_SHORT,N.FLOAT],this.glFuncMap={mat2:{func:N.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:N.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:N.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:N.uniform1f,length:1},"1fv":{func:N.uniform1fv,length:1},"1i":{func:N.uniform1i,length:1},"1iv":{func:N.uniform1iv,length:1},"2f":{func:N.uniform2f,length:2},"2fv":{func:N.uniform2fv,length:1},"2i":{func:N.uniform2i,length:2},"2iv":{func:N.uniform2iv,length:1},"3f":{func:N.uniform3f,length:3},"3fv":{func:N.uniform3fv,length:1},"3i":{func:N.uniform3i,length:3},"3iv":{func:N.uniform3iv,length:1},"4f":{func:N.uniform4f,length:4},"4fv":{func:N.uniform4fv,length:1},"4i":{func:N.uniform4i,length:4},"4iv":{func:N.uniform4iv,length:1}},(!O.maxTextures||O.maxTextures===-1)&&(O.maxTextures=N.getParameter(N.MAX_TEXTURE_IMAGE_UNITS)),O.maxTextureSize||(O.maxTextureSize=N.getParameter(N.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),N.disable(N.DEPTH_TEST),N.disable(N.CULL_FACE),N.enable(N.BLEND),N.clearColor(K.redGL,K.greenGL,K.blueGL,K.alphaGL);var Y=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return Y.indexOf(O.mipmapFilter)!==-1&&(this.mipmapFilter=N[O.mipmapFilter]),this.maxTextures=g.checkShaderMax(N,O.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new f(this),this.setBlendMode(n.BlendModes.NORMAL),this.projectionMatrix=new s().identity(),G.textures.once(p.READY,this.boot,this),this},boot:function(){var O=this.game,N=this.pipelines,G=O.scale.baseSize,V=G.width,K=G.height;this.width=V,this.height=K,this.isBooted=!0,this.renderTarget=new u(this,V,K,1,0,!0,!0),this.maskTarget=new u(this,V,K,1,0,!0,!0),this.maskSource=new u(this,V,K,1,0,!0,!0);var $=O.config;N.boot($.pipeline,$.defaultPipeline,$.autoMobilePipeline),this.blankTexture=O.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=O.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=O.textures.getFrame("__WHITE").glTexture;var J=this.gl;J.bindFramebuffer(J.FRAMEBUFFER,null),J.enable(J.SCISSOR_TEST),O.scale.on(d.RESIZE,this.onResize,this),this.resize(V,K)},createTemporaryTextures:function(){for(var O=this.gl,N=0;N0&&V>0;if(J&&X){var Y=J[0],D=J[1],z=J[2],W=J[3];X=Y!==O||D!==N||z!==G||W!==V}X&&(this.flush(),$.scissor(O,K-N-V,G,V))},resetScissor:function(){var O=this.gl;O.enable(O.SCISSOR_TEST);var N=this.currentScissor;if(N){var G=N[0],V=N[1],K=N[2],$=N[3];K>0&&$>0&&O.scissor(G,this.drawingBufferHeight-V-$,K,$)}},popScissor:function(){var O=this.scissorStack;O.pop();var N=O[O.length-1];N&&this.setScissor(N[0],N[1],N[2],N[3]),this.currentScissor=N},hasActiveStencilMask:function(){var O=this.currentMask.mask,N=this.currentCameraMask.mask;return O&&O.isStencil||N&&N.isStencil},resetViewport:function(){var O=this.gl;O.viewport(0,0,this.width,this.height),this.drawingBufferHeight=O.drawingBufferHeight},setBlendMode:function(O,N){N===void 0&&(N=!1);var G=this.gl,V=this.blendModes[O];return N||O!==n.BlendModes.SKIP_CHECK&&this.currentBlendMode!==O?(this.flush(),G.enable(G.BLEND),G.blendEquation(V.equation),V.func.length>2?G.blendFuncSeparate(V.func[0],V.func[1],V.func[2],V.func[3]):G.blendFunc(V.func[0],V.func[1]),this.currentBlendMode=O,!0):!1},addBlendMode:function(O,N){var G=this.blendModes.push({func:O,equation:N});return G-1},updateBlendMode:function(O,N,G){return this.blendModes[O]&&(this.blendModes[O].func=N,G&&(this.blendModes[O].equation=G)),this},removeBlendMode:function(O){return O>17&&this.blendModes[O]&&this.blendModes.splice(O,1),this},pushFramebuffer:function(O,N,G,V,K){return O===this.currentFramebuffer?this:(this.fboStack.push(O),this.setFramebuffer(O,N,G,V,K))},setFramebuffer:function(O,N,G,V,K){if(N===void 0&&(N=!1),G===void 0&&(G=!0),V===void 0&&(V=null),K===void 0&&(K=!1),O===this.currentFramebuffer)return this;var $=this.gl,J=this.width,X=this.height;return O&&O.renderTexture&&G?(J=O.renderTexture.width,X=O.renderTexture.height):this.flush(),O?$.bindFramebuffer($.FRAMEBUFFER,O.webGLFramebuffer):$.bindFramebuffer($.FRAMEBUFFER,null),G&&$.viewport(0,0,J,X),V&&$.framebufferTexture2D($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,$.TEXTURE_2D,V.webGLTexture,0),K&&($.clearColor(0,0,0,0),$.clear($.COLOR_BUFFER_BIT)),N&&(O?(this.drawingBufferHeight=X,this.pushScissor(0,0,J,X)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=O,this},popFramebuffer:function(O,N){O===void 0&&(O=!1),N===void 0&&(N=!0);var G=this.fboStack;G.pop();var V=G[G.length-1];return V||(V=null),this.setFramebuffer(V,O,N),V},restoreFramebuffer:function(O,N){O===void 0&&(O=!1),N===void 0&&(N=!0);var G=this.fboStack,V=G[G.length-1];V||(V=null),this.currentFramebuffer=null,this.setFramebuffer(V,O,N)},setProgram:function(O){return O!==this.currentProgram?(this.flush(),this.gl.useProgram(O.webGLProgram),this.currentProgram=O,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(O,N,G,V,K){K===void 0&&(K=!1);var $=this.gl,J=$.NEAREST,X=$.NEAREST,Y=$.CLAMP_TO_EDGE,D=null;N=O?O.width:N,G=O?O.height:G;var z=h(N,G);if(z&&!K&&(Y=$.REPEAT),V===n.ScaleModes.LINEAR&&this.config.antialias){var W=O&&O.compressed,H=!W&&z||W&&O.mipmaps.length>1;J=this.mipmapFilter&&H?this.mipmapFilter:$.LINEAR,X=$.LINEAR}return!O&&typeof N=="number"&&typeof G=="number"?D=this.createTexture2D(0,J,X,Y,Y,$.RGBA,null,N,G):D=this.createTexture2D(0,J,X,Y,Y,$.RGBA,O),D},createTexture2D:function(O,N,G,V,K,$,J,X,Y,D,z,W){typeof X!="number"&&(X=J?J.width:1),typeof Y!="number"&&(Y=J?J.height:1);var H=new C(this.gl,O,N,G,V,K,$,J,X,Y,D,z,W);return this.glTextureWrappers.push(H),H},createFramebuffer:function(O,N,G,V){this.currentFramebuffer=null;var K=new M(this.gl,O,N,G,V);return this.glFramebufferWrappers.push(K),K},beginBitmapMask:function(O,N){var G=this.gl;G&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==O&&(this.currentMask.mask=O,this.currentMask.camera=N))},drawBitmapMask:function(O,N,G){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),O.renderWebGL(this,O,N),this.maskSource.unbind(!0),this.maskTarget.unbind();var V=this.gl,K=this.getCurrentStencilMask();K?(V.enable(V.STENCIL_TEST),K.mask.applyStencil(this,K.camera,!0)):this.currentMask.mask=null,this.pipelines.set(G),V.activeTexture(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,this.maskTarget.texture.webGLTexture),V.activeTexture(V.TEXTURE1),V.bindTexture(V.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(O,N){var G=new T(this.gl,O,N);return this.glProgramWrappers.push(G),G},createVertexBuffer:function(O,N){var G=this.gl,V=new x(G,O,G.ARRAY_BUFFER,N);return this.glBufferWrappers.push(V),V},createAttribLocation:function(O,N){var G=new w(this.gl,O,N);return this.glAttribLocationWrappers.push(G),G},createUniformLocation:function(O,N){var G=new L(this.gl,O,N);return this.glUniformLocationWrappers.push(G),G},createIndexBuffer:function(O,N){var G=this.gl,V=new x(G,O,G.ELEMENT_ARRAY_BUFFER,N);return this.glBufferWrappers.push(V),V},deleteTexture:function(O){if(O)return v(this.glTextureWrappers,O),O.destroy(),this},deleteFramebuffer:function(O){return O?(v(this.fboStack,O),v(this.glFramebufferWrappers,O),O.destroy(),this):this},deleteProgram:function(O){return O&&(v(this.glProgramWrappers,O),O.destroy()),this},deleteAttribLocation:function(O){return O&&(v(this.glAttribLocationWrappers,O),O.destroy()),this},deleteUniformLocation:function(O){return O&&(v(this.glUniformLocationWrappers,O),O.destroy()),this},deleteBuffer:function(O){return O?(v(this.glBufferWrappers,O),O.destroy(),this):this},preRenderCamera:function(O){var N=O.x,G=O.y,V=O.width,K=O.height,$=O.backgroundColor;if(O.emit(o.PRE_RENDER,O),this.pipelines.preBatchCamera(O),this.pushScissor(N,G,V,K),O.mask&&(this.currentCameraMask.mask=O.mask,this.currentCameraMask.camera=O._maskCamera,O.mask.preRenderWebGL(this,O,O._maskCamera)),$.alphaGL>0){var J=this.pipelines.setMulti();J.drawFillRect(N,G,V,K,g.getTintFromFloats($.blueGL,$.greenGL,$.redGL,1),$.alphaGL)}},getCurrentStencilMask:function(){var O=null,N=this.maskStack,G=this.currentCameraMask;return N.length>0?O=N[N.length-1]:G.mask&&G.mask.isStencil&&(O=G),O},postRenderCamera:function(O){var N=O.flashEffect,G=O.fadeEffect;if(N.isRunning||G.isRunning||G.isComplete){var V=this.pipelines.setMulti();N.postRenderWebGL(V,g.getTintFromFloats),G.postRenderWebGL(V,g.getTintFromFloats)}O.dirty=!1,this.popScissor(),O.mask&&(this.currentCameraMask.mask=null,O.mask.postRenderWebGL(this,O._maskCamera)),this.pipelines.postBatchCamera(O),O.emit(o.POST_RENDER,O)},preRender:function(){if(!this.contextLost){var O=this.gl;if(O.bindFramebuffer(O.FRAMEBUFFER,null),this.config.clearBeforeRender){var N=this.config.backgroundColor;O.clearColor(N.redGL,N.greenGL,N.blueGL,N.alphaGL),O.clear(O.COLOR_BUFFER_BIT|O.DEPTH_BUFFER_BIT|O.STENCIL_BUFFER_BIT)}O.enable(O.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&O.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(i.PRE_RENDER)}},render:function(O,N,G){if(!this.contextLost){var V=N.length;if(this.emit(i.RENDER,O,G),this.preRenderCamera(G),V===0){this.setBlendMode(n.BlendModes.NORMAL),this.postRenderCamera(G);return}this.currentType="";for(var K=this.currentMask,$=0;${/** + */var o=t(95428),v=t(72905),a=t(19715),r=t(83419),n=t(8054),e=t(50792),i=t(92503),h=t(50030),s=t(37867),l=t(29747),f=t(7530),u=t(32302),d=t(97480),p=t(69442),g=t(70554),y=t(88815),x=t(26128),C=t(1482),P=t(82751),M=t(84387),w=t(93567),I=t(57183),L=new r({Extends:e,initialize:function(N){e.call(this);var G=N.config,V={alpha:G.transparent,desynchronized:G.desynchronized,depth:!0,antialias:G.antialiasGL,premultipliedAlpha:G.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:G.failIfMajorPerformanceCaveat,powerPreference:G.powerPreference,preserveDrawingBuffer:G.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:G.clearBeforeRender,antialias:G.antialias,backgroundColor:G.backgroundColor,contextCreation:V,roundPixels:G.roundPixels,maxTextures:G.maxTextures,maxTextureSize:G.maxTextureSize,batchSize:G.batchSize,maxLights:G.maxLights,mipmapFilter:G.mipmapFilter},this.game=N,this.type=n.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=N.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=l,this.contextRestoredHandler=l,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(B){var N,G=this.game,V=this.canvas,K=B.backgroundColor;if(G.config.context?N=G.config.context:N=V.getContext("webgl",B.contextCreation)||V.getContext("experimental-webgl",B.contextCreation),!N||N.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=N;var j=this,J=function(){var b=N.getSupportedExtensions();j.supportedExtensions=b;var z="ANGLE_instanced_arrays";j.instancedArraysExtension=b.indexOf(z)>-1?N.getExtension(z):null;var W="OES_vertex_array_object";j.vaoExtension=b.indexOf(W)>-1?N.getExtension(W):null};J(),this.contextLostHandler=function(b){j.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),j.emit(i.LOSE_WEBGL,j),b.preventDefault()},V.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.contextRestoredHandler=function(b){if(N.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}j.currentProgram=null,j.currentFramebuffer=null,j.setBlendMode(n.BlendModes.NORMAL),N.disable(N.BLEND),N.disable(N.DEPTH_TEST),N.enable(N.CULL_FACE),j.compression=j.getCompressedTextures();var z=function(W){W.createResource()};o(j.glTextureWrappers,z),o(j.glBufferWrappers,z),o(j.glFramebufferWrappers,z),o(j.glProgramWrappers,z),o(j.glAttribLocationWrappers,z),o(j.glUniformLocationWrappers,z),j.createTemporaryTextures(),j.pipelines.restoreContext(),j.resize(j.game.scale.baseSize.width,j.game.scale.baseSize.height),J(),j.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),j.emit(i.RESTORE_WEBGL,j),b.preventDefault()},V.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),G.context=N;for(var X=0;X<=27;X++)this.blendModes.push({func:[N.ONE,N.ONE_MINUS_SRC_ALPHA],equation:N.FUNC_ADD});this.blendModes[1].func=[N.ONE,N.DST_ALPHA],this.blendModes[2].func=[N.DST_COLOR,N.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[N.ONE,N.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[N.ZERO,N.ONE_MINUS_SRC_ALPHA],equation:N.FUNC_REVERSE_SUBTRACT},this.glFormats=[N.BYTE,N.SHORT,N.UNSIGNED_BYTE,N.UNSIGNED_SHORT,N.FLOAT],this.glFuncMap={mat2:{func:N.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:N.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:N.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:N.uniform1f,length:1},"1fv":{func:N.uniform1fv,length:1},"1i":{func:N.uniform1i,length:1},"1iv":{func:N.uniform1iv,length:1},"2f":{func:N.uniform2f,length:2},"2fv":{func:N.uniform2fv,length:1},"2i":{func:N.uniform2i,length:2},"2iv":{func:N.uniform2iv,length:1},"3f":{func:N.uniform3f,length:3},"3fv":{func:N.uniform3fv,length:1},"3i":{func:N.uniform3i,length:3},"3iv":{func:N.uniform3iv,length:1},"4f":{func:N.uniform4f,length:4},"4fv":{func:N.uniform4fv,length:1},"4i":{func:N.uniform4i,length:4},"4iv":{func:N.uniform4iv,length:1}},(!B.maxTextures||B.maxTextures===-1)&&(B.maxTextures=N.getParameter(N.MAX_TEXTURE_IMAGE_UNITS)),B.maxTextureSize||(B.maxTextureSize=N.getParameter(N.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),N.disable(N.DEPTH_TEST),N.disable(N.CULL_FACE),N.enable(N.BLEND),N.clearColor(K.redGL,K.greenGL,K.blueGL,K.alphaGL);var Y=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return Y.indexOf(B.mipmapFilter)!==-1&&(this.mipmapFilter=N[B.mipmapFilter]),this.maxTextures=g.checkShaderMax(N,B.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new f(this),this.setBlendMode(n.BlendModes.NORMAL),this.projectionMatrix=new s().identity(),G.textures.once(p.READY,this.boot,this),this},boot:function(){var B=this.game,N=this.pipelines,G=B.scale.baseSize,V=G.width,K=G.height;this.width=V,this.height=K,this.isBooted=!0,this.renderTarget=new u(this,V,K,1,0,!0,!0),this.maskTarget=new u(this,V,K,1,0,!0,!0),this.maskSource=new u(this,V,K,1,0,!0,!0);var j=B.config;N.boot(j.pipeline,j.defaultPipeline,j.autoMobilePipeline),this.blankTexture=B.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=B.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=B.textures.getFrame("__WHITE").glTexture;var J=this.gl;J.bindFramebuffer(J.FRAMEBUFFER,null),J.enable(J.SCISSOR_TEST),B.scale.on(d.RESIZE,this.onResize,this),this.resize(V,K)},createTemporaryTextures:function(){for(var B=this.gl,N=0;N0&&V>0;if(J&&X){var Y=J[0],b=J[1],z=J[2],W=J[3];X=Y!==B||b!==N||z!==G||W!==V}X&&(this.flush(),j.scissor(B,K-N-V,G,V))},resetScissor:function(){var B=this.gl;B.enable(B.SCISSOR_TEST);var N=this.currentScissor;if(N){var G=N[0],V=N[1],K=N[2],j=N[3];K>0&&j>0&&B.scissor(G,this.drawingBufferHeight-V-j,K,j)}},popScissor:function(){var B=this.scissorStack;B.pop();var N=B[B.length-1];N&&this.setScissor(N[0],N[1],N[2],N[3]),this.currentScissor=N},hasActiveStencilMask:function(){var B=this.currentMask.mask,N=this.currentCameraMask.mask;return B&&B.isStencil||N&&N.isStencil},resetViewport:function(){var B=this.gl;B.viewport(0,0,this.width,this.height),this.drawingBufferHeight=B.drawingBufferHeight},setBlendMode:function(B,N){N===void 0&&(N=!1);var G=this.gl,V=this.blendModes[B];return N||B!==n.BlendModes.SKIP_CHECK&&this.currentBlendMode!==B?(this.flush(),G.enable(G.BLEND),G.blendEquation(V.equation),V.func.length>2?G.blendFuncSeparate(V.func[0],V.func[1],V.func[2],V.func[3]):G.blendFunc(V.func[0],V.func[1]),this.currentBlendMode=B,!0):!1},addBlendMode:function(B,N){var G=this.blendModes.push({func:B,equation:N});return G-1},updateBlendMode:function(B,N,G){return this.blendModes[B]&&(this.blendModes[B].func=N,G&&(this.blendModes[B].equation=G)),this},removeBlendMode:function(B){return B>17&&this.blendModes[B]&&this.blendModes.splice(B,1),this},pushFramebuffer:function(B,N,G,V,K){return B===this.currentFramebuffer?this:(this.fboStack.push(B),this.setFramebuffer(B,N,G,V,K))},setFramebuffer:function(B,N,G,V,K){if(N===void 0&&(N=!1),G===void 0&&(G=!0),V===void 0&&(V=null),K===void 0&&(K=!1),B===this.currentFramebuffer)return this;var j=this.gl,J=this.width,X=this.height;return B&&B.renderTexture&&G?(J=B.renderTexture.width,X=B.renderTexture.height):this.flush(),B?j.bindFramebuffer(j.FRAMEBUFFER,B.webGLFramebuffer):j.bindFramebuffer(j.FRAMEBUFFER,null),G&&j.viewport(0,0,J,X),V&&j.framebufferTexture2D(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,j.TEXTURE_2D,V.webGLTexture,0),K&&(j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT)),N&&(B?(this.drawingBufferHeight=X,this.pushScissor(0,0,J,X)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=B,this},popFramebuffer:function(B,N){B===void 0&&(B=!1),N===void 0&&(N=!0);var G=this.fboStack;G.pop();var V=G[G.length-1];return V||(V=null),this.setFramebuffer(V,B,N),V},restoreFramebuffer:function(B,N){B===void 0&&(B=!1),N===void 0&&(N=!0);var G=this.fboStack,V=G[G.length-1];V||(V=null),this.currentFramebuffer=null,this.setFramebuffer(V,B,N)},setProgram:function(B){return B!==this.currentProgram?(this.flush(),this.gl.useProgram(B.webGLProgram),this.currentProgram=B,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(B,N,G,V,K){K===void 0&&(K=!1);var j=this.gl,J=j.NEAREST,X=j.NEAREST,Y=j.CLAMP_TO_EDGE,b=null;N=B?B.width:N,G=B?B.height:G;var z=h(N,G);if(z&&!K&&(Y=j.REPEAT),V===n.ScaleModes.LINEAR&&this.config.antialias){var W=B&&B.compressed,H=!W&&z||W&&B.mipmaps.length>1;J=this.mipmapFilter&&H?this.mipmapFilter:j.LINEAR,X=j.LINEAR}return!B&&typeof N=="number"&&typeof G=="number"?b=this.createTexture2D(0,J,X,Y,Y,j.RGBA,null,N,G):b=this.createTexture2D(0,J,X,Y,Y,j.RGBA,B),b},createTexture2D:function(B,N,G,V,K,j,J,X,Y,b,z,W){typeof X!="number"&&(X=J?J.width:1),typeof Y!="number"&&(Y=J?J.height:1);var H=new P(this.gl,B,N,G,V,K,j,J,X,Y,b,z,W);return this.glTextureWrappers.push(H),H},createFramebuffer:function(B,N,G,V){this.currentFramebuffer=null;var K=new M(this.gl,B,N,G,V);return this.glFramebufferWrappers.push(K),K},beginBitmapMask:function(B,N){var G=this.gl;G&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==B&&(this.currentMask.mask=B,this.currentMask.camera=N))},drawBitmapMask:function(B,N,G){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),B.renderWebGL(this,B,N),this.maskSource.unbind(!0),this.maskTarget.unbind();var V=this.gl,K=this.getCurrentStencilMask();K?(V.enable(V.STENCIL_TEST),K.mask.applyStencil(this,K.camera,!0)):this.currentMask.mask=null,this.pipelines.set(G),V.activeTexture(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,this.maskTarget.texture.webGLTexture),V.activeTexture(V.TEXTURE1),V.bindTexture(V.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(B,N){var G=new C(this.gl,B,N);return this.glProgramWrappers.push(G),G},createVertexBuffer:function(B,N){var G=this.gl,V=new x(G,B,G.ARRAY_BUFFER,N);return this.glBufferWrappers.push(V),V},createAttribLocation:function(B,N){var G=new w(this.gl,B,N);return this.glAttribLocationWrappers.push(G),G},createUniformLocation:function(B,N){var G=new I(this.gl,B,N);return this.glUniformLocationWrappers.push(G),G},createIndexBuffer:function(B,N){var G=this.gl,V=new x(G,B,G.ELEMENT_ARRAY_BUFFER,N);return this.glBufferWrappers.push(V),V},deleteTexture:function(B){if(B)return v(this.glTextureWrappers,B),B.destroy(),this},deleteFramebuffer:function(B){return B?(v(this.fboStack,B),v(this.glFramebufferWrappers,B),B.destroy(),this):this},deleteProgram:function(B){return B&&(v(this.glProgramWrappers,B),B.destroy()),this},deleteAttribLocation:function(B){return B&&(v(this.glAttribLocationWrappers,B),B.destroy()),this},deleteUniformLocation:function(B){return B&&(v(this.glUniformLocationWrappers,B),B.destroy()),this},deleteBuffer:function(B){return B?(v(this.glBufferWrappers,B),B.destroy(),this):this},preRenderCamera:function(B){var N=B.x,G=B.y,V=B.width,K=B.height,j=B.backgroundColor;if(B.emit(a.PRE_RENDER,B),this.pipelines.preBatchCamera(B),this.pushScissor(N,G,V,K),B.mask&&(this.currentCameraMask.mask=B.mask,this.currentCameraMask.camera=B._maskCamera,B.mask.preRenderWebGL(this,B,B._maskCamera)),j.alphaGL>0){var J=this.pipelines.setMulti();J.drawFillRect(N,G,V,K,g.getTintFromFloats(j.blueGL,j.greenGL,j.redGL,1),j.alphaGL)}},getCurrentStencilMask:function(){var B=null,N=this.maskStack,G=this.currentCameraMask;return N.length>0?B=N[N.length-1]:G.mask&&G.mask.isStencil&&(B=G),B},postRenderCamera:function(B){var N=B.flashEffect,G=B.fadeEffect;if(N.isRunning||G.isRunning||G.isComplete){var V=this.pipelines.setMulti();N.postRenderWebGL(V,g.getTintFromFloats),G.postRenderWebGL(V,g.getTintFromFloats)}B.dirty=!1,this.popScissor(),B.mask&&(this.currentCameraMask.mask=null,B.mask.postRenderWebGL(this,B._maskCamera)),this.pipelines.postBatchCamera(B),B.emit(a.POST_RENDER,B)},preRender:function(){if(!this.contextLost){var B=this.gl;if(B.bindFramebuffer(B.FRAMEBUFFER,null),this.config.clearBeforeRender){var N=this.config.backgroundColor;B.clearColor(N.redGL,N.greenGL,N.blueGL,N.alphaGL),B.clear(B.COLOR_BUFFER_BIT|B.DEPTH_BUFFER_BIT|B.STENCIL_BUFFER_BIT)}B.enable(B.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&B.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(i.PRE_RENDER)}},render:function(B,N,G){if(!this.contextLost){var V=N.length;if(this.emit(i.RENDER,B,G),this.preRenderCamera(G),V===0){this.setBlendMode(n.BlendModes.NORMAL),this.postRenderCamera(G);return}this.currentType="";for(var K=this.currentMask,j=0;j{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95428),o=t(95540),r=t(14500),n=new a({initialize:function(i,h,s,l,f){this.pipeline=i,this.name=h,this.renderer=i.renderer,this.gl=this.renderer.gl,this.fragSrc=l,this.vertSrc=s,this.program=this.renderer.createProgram(s,l),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(f),this.createUniforms()},createAttributes:function(e){var i=0,h=0,s=[];this.vertexComponentCount=0;for(var l=0;l=0?(i.enableVertexAttribArray(M.webGLAttribLocation),i.vertexAttribPointer(M.webGLAttribLocation,p,g,C,s,y),d.enabled=!0,d.location=M):M.webGLAttribLocation!==-1&&i.disableVertexAttribArray(M.webGLAttribLocation)}else x?i.vertexAttribPointer(T.webGLAttribLocation,p,g,C,s,y):!x&&T!==-1&&T.webGLAttribLocation>-1&&(i.disableVertexAttribArray(T.webGLAttribLocation),d.location=-1)}return this},createUniforms:function(){var e=this.gl,i=this.program,h=this.uniforms,s,l,f,u=e.getProgramParameter(i.webGLProgram,e.ACTIVE_UNIFORMS);for(s=0;s0&&(l=l.substr(0,p),h.hasOwnProperty(l)||(f=this.renderer.createUniformLocation(i,l),f!==null&&(h[l]={name:l,location:f,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 i in this.uniforms){var h=this.uniforms[i];h.setter&&h.setter.call(e,h.location.webGLUniformLocation,h.value1,h.value2,h.value3,h.value4)}},hasUniform:function(e){return this.uniforms.hasOwnProperty(e)},resetUniform:function(e){var i=this.uniforms[e];return i&&(i.value1=null,i.value2=null,i.value3=null,i.value4=null),this},setUniform1:function(e,i,h,s){var l=this.uniforms[i];return l?((s||l.value1!==h)&&(l.setter||(l.setter=e),l.value1=h,this.renderer.setProgram(this.program),e.call(this.gl,l.location.webGLUniformLocation,h),this.pipeline.currentShader=this),this):this},setUniform2:function(e,i,h,s,l){var f=this.uniforms[i];return f?((l||f.value1!==h||f.value2!==s)&&(f.setter||(f.setter=e),f.value1=h,f.value2=s,this.renderer.setProgram(this.program),e.call(this.gl,f.location.webGLUniformLocation,h,s),this.pipeline.currentShader=this),this):this},setUniform3:function(e,i,h,s,l,f){var u=this.uniforms[i];return u?((f||u.value1!==h||u.value2!==s||u.value3!==l)&&(u.setter||(u.setter=e),u.value1=h,u.value2=s,u.value3=l,this.renderer.setProgram(this.program),e.call(this.gl,u.location.webGLUniformLocation,h,s,l),this.pipeline.currentShader=this),this):this},setUniform4:function(e,i,h,s,l,f,u){var d=this.uniforms[i];return d?((u||d.value1!==h||d.value2!==s||d.value3!==l||d.value4!==f)&&(d.setter||(d.setter=e),d.value1=h,d.value2=s,d.value3=l,d.value4=f,this.renderer.setProgram(this.program),e.call(this.gl,d.location.webGLUniformLocation,h,s,l,f),this.pipeline.currentShader=this),this):this},setBoolean:function(e,i){return this.setUniform1(this.gl.uniform1i,e,Number(i))},set1f:function(e,i){return this.setUniform1(this.gl.uniform1f,e,i)},set2f:function(e,i,h){return this.setUniform2(this.gl.uniform2f,e,i,h)},set3f:function(e,i,h,s){return this.setUniform3(this.gl.uniform3f,e,i,h,s)},set4f:function(e,i,h,s,l){return this.setUniform4(this.gl.uniform4f,e,i,h,s,l)},set1fv:function(e,i){return this.setUniform1(this.gl.uniform1fv,e,i,!0)},set2fv:function(e,i){return this.setUniform1(this.gl.uniform2fv,e,i,!0)},set3fv:function(e,i){return this.setUniform1(this.gl.uniform3fv,e,i,!0)},set4fv:function(e,i){return this.setUniform1(this.gl.uniform4fv,e,i,!0)},set1iv:function(e,i){return this.setUniform1(this.gl.uniform1iv,e,i,!0)},set2iv:function(e,i){return this.setUniform1(this.gl.uniform2iv,e,i,!0)},set3iv:function(e,i){return this.setUniform1(this.gl.uniform3iv,e,i,!0)},set4iv:function(e,i){return this.setUniform1(this.gl.uniform4iv,e,i,!0)},set1i:function(e,i){return this.setUniform1(this.gl.uniform1i,e,i)},set2i:function(e,i,h){return this.setUniform2(this.gl.uniform2i,e,i,h)},set3i:function(e,i,h,s){return this.setUniform3(this.gl.uniform3i,e,i,h,s)},set4i:function(e,i,h,s,l){return this.setUniform4(this.gl.uniform4i,e,i,h,s,l)},setMatrix2fv:function(e,i,h){return this.setUniform2(this.gl.uniformMatrix2fv,e,i,h,!0)},setMatrix3fv:function(e,i,h){return this.setUniform2(this.gl.uniformMatrix3fv,e,i,h,!0)},setMatrix4fv:function(e,i,h){return this.setUniform2(this.gl.uniformMatrix4fv,e,i,h,!0)},createProgram:function(e,i){return e===void 0&&(e=this.vertSrc),i===void 0&&(i=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=e,this.fragSrc=i,this.program=this.renderer.createProgram(e,i),this.createUniforms(),this.rebind()},destroy:function(){var e=this.renderer;v(this.uniforms,function(i){e.deleteUniformLocation(i.location)}),this.uniforms=null,v(this.attributes,function(i){e.deleteAttribLocation(i.location)}),this.attributes=null,e.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});c.exports=n},14500:c=>{/** + */var o=t(83419),v=t(95428),a=t(95540),r=t(14500),n=new o({initialize:function(i,h,s,l,f){this.pipeline=i,this.name=h,this.renderer=i.renderer,this.gl=this.renderer.gl,this.fragSrc=l,this.vertSrc=s,this.program=this.renderer.createProgram(s,l),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(f),this.createUniforms()},createAttributes:function(e){var i=0,h=0,s=[];this.vertexComponentCount=0;for(var l=0;l=0?(i.enableVertexAttribArray(M.webGLAttribLocation),i.vertexAttribPointer(M.webGLAttribLocation,p,g,P,s,y),d.enabled=!0,d.location=M):M.webGLAttribLocation!==-1&&i.disableVertexAttribArray(M.webGLAttribLocation)}else x?i.vertexAttribPointer(C.webGLAttribLocation,p,g,P,s,y):!x&&C!==-1&&C.webGLAttribLocation>-1&&(i.disableVertexAttribArray(C.webGLAttribLocation),d.location=-1)}return this},createUniforms:function(){var e=this.gl,i=this.program,h=this.uniforms,s,l,f,u=e.getProgramParameter(i.webGLProgram,e.ACTIVE_UNIFORMS);for(s=0;s0&&(l=l.substr(0,p),h.hasOwnProperty(l)||(f=this.renderer.createUniformLocation(i,l),f!==null&&(h[l]={name:l,location:f,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 i in this.uniforms){var h=this.uniforms[i];h.setter&&h.setter.call(e,h.location.webGLUniformLocation,h.value1,h.value2,h.value3,h.value4)}},hasUniform:function(e){return this.uniforms.hasOwnProperty(e)},resetUniform:function(e){var i=this.uniforms[e];return i&&(i.value1=null,i.value2=null,i.value3=null,i.value4=null),this},setUniform1:function(e,i,h,s){var l=this.uniforms[i];return l?((s||l.value1!==h)&&(l.setter||(l.setter=e),l.value1=h,this.renderer.setProgram(this.program),e.call(this.gl,l.location.webGLUniformLocation,h),this.pipeline.currentShader=this),this):this},setUniform2:function(e,i,h,s,l){var f=this.uniforms[i];return f?((l||f.value1!==h||f.value2!==s)&&(f.setter||(f.setter=e),f.value1=h,f.value2=s,this.renderer.setProgram(this.program),e.call(this.gl,f.location.webGLUniformLocation,h,s),this.pipeline.currentShader=this),this):this},setUniform3:function(e,i,h,s,l,f){var u=this.uniforms[i];return u?((f||u.value1!==h||u.value2!==s||u.value3!==l)&&(u.setter||(u.setter=e),u.value1=h,u.value2=s,u.value3=l,this.renderer.setProgram(this.program),e.call(this.gl,u.location.webGLUniformLocation,h,s,l),this.pipeline.currentShader=this),this):this},setUniform4:function(e,i,h,s,l,f,u){var d=this.uniforms[i];return d?((u||d.value1!==h||d.value2!==s||d.value3!==l||d.value4!==f)&&(d.setter||(d.setter=e),d.value1=h,d.value2=s,d.value3=l,d.value4=f,this.renderer.setProgram(this.program),e.call(this.gl,d.location.webGLUniformLocation,h,s,l,f),this.pipeline.currentShader=this),this):this},setBoolean:function(e,i){return this.setUniform1(this.gl.uniform1i,e,Number(i))},set1f:function(e,i){return this.setUniform1(this.gl.uniform1f,e,i)},set2f:function(e,i,h){return this.setUniform2(this.gl.uniform2f,e,i,h)},set3f:function(e,i,h,s){return this.setUniform3(this.gl.uniform3f,e,i,h,s)},set4f:function(e,i,h,s,l){return this.setUniform4(this.gl.uniform4f,e,i,h,s,l)},set1fv:function(e,i){return this.setUniform1(this.gl.uniform1fv,e,i,!0)},set2fv:function(e,i){return this.setUniform1(this.gl.uniform2fv,e,i,!0)},set3fv:function(e,i){return this.setUniform1(this.gl.uniform3fv,e,i,!0)},set4fv:function(e,i){return this.setUniform1(this.gl.uniform4fv,e,i,!0)},set1iv:function(e,i){return this.setUniform1(this.gl.uniform1iv,e,i,!0)},set2iv:function(e,i){return this.setUniform1(this.gl.uniform2iv,e,i,!0)},set3iv:function(e,i){return this.setUniform1(this.gl.uniform3iv,e,i,!0)},set4iv:function(e,i){return this.setUniform1(this.gl.uniform4iv,e,i,!0)},set1i:function(e,i){return this.setUniform1(this.gl.uniform1i,e,i)},set2i:function(e,i,h){return this.setUniform2(this.gl.uniform2i,e,i,h)},set3i:function(e,i,h,s){return this.setUniform3(this.gl.uniform3i,e,i,h,s)},set4i:function(e,i,h,s,l){return this.setUniform4(this.gl.uniform4i,e,i,h,s,l)},setMatrix2fv:function(e,i,h){return this.setUniform2(this.gl.uniformMatrix2fv,e,i,h,!0)},setMatrix3fv:function(e,i,h){return this.setUniform2(this.gl.uniformMatrix3fv,e,i,h,!0)},setMatrix4fv:function(e,i,h){return this.setUniform2(this.gl.uniformMatrix4fv,e,i,h,!0)},createProgram:function(e,i){return e===void 0&&(e=this.vertSrc),i===void 0&&(i=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=e,this.fragSrc=i,this.program=this.renderer.createProgram(e,i),this.createUniforms(),this.rebind()},destroy:function(){var e=this.renderer;v(this.uniforms,function(i){e.deleteUniformLocation(i.location)}),this.uniforms=null,v(this.attributes,function(i){e.deleteAttribLocation(i.location)}),this.attributes=null,e.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});c.exports=n},14500:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4731,54 +4731,54 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(14500),v=t(79291),o={PipelineManager:t(7530),Pipelines:t(96615),RenderTarget:t(32302),Utils:t(70554),WebGLPipeline:t(29100),WebGLRenderer:t(74797),WebGLShader:t(38683),Wrappers:t(9503)};o=v(!1,o,a),c.exports=o},31302:(c,m,t)=>{/** + */var o=t(14500),v=t(79291),a={PipelineManager:t(7530),Pipelines:t(96615),RenderTarget:t(32302),Utils:t(70554),WebGLPipeline:t(29100),WebGLRenderer:t(74797),WebGLShader:t(38683),Wrappers:t(9503)};a=v(!1,a,o),c.exports=a},31302:(c,m,t)=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(78908),r=t(85191),n=t(14500),e=t(29100),i=new a({Extends:e,initialize:function(s){s.fragShader=v(s,"fragShader",o),s.vertShader=v(s,"vertShader",r),s.batchSize=v(s,"batchSize",1),s.vertices=v(s,"vertices",[-1,1,-1,-7,7,1]),s.attributes=v(s,"attributes",[{name:"inPosition",size:2,type:n.FLOAT}]),e.call(this,s)},boot:function(){e.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(h,s){e.prototype.resize.call(this,h,s),this.set2f("uResolution",h,s)},beginMask:function(h,s,l){this.renderer.beginBitmapMask(h,l)},endMask:function(h,s,l){var f=this.gl,u=this.renderer,d=h.bitmapMask;d&&f&&(u.drawBitmapMask(d,s,this),l&&this.set2f("uResolution",l.width,l.height),this.set1i("uInvertMaskAlpha",h.invertAlpha),f.drawArrays(this.topology,0,3),l&&this.set2f("uResolution",this.width,this.height),f.bindTexture(f.TEXTURE_2D,null))}});c.exports=i},92651:(c,m,t)=>{/** + */var o=t(83419),v=t(95540),a=t(78908),r=t(85191),n=t(14500),e=t(29100),i=new o({Extends:e,initialize:function(s){s.fragShader=v(s,"fragShader",a),s.vertShader=v(s,"vertShader",r),s.batchSize=v(s,"batchSize",1),s.vertices=v(s,"vertices",[-1,1,-1,-7,7,1]),s.attributes=v(s,"attributes",[{name:"inPosition",size:2,type:n.FLOAT}]),e.call(this,s)},boot:function(){e.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(h,s){e.prototype.resize.call(this,h,s),this.set2f("uResolution",h,s)},beginMask:function(h,s,l){this.renderer.beginBitmapMask(h,l)},endMask:function(h,s,l){var f=this.gl,u=this.renderer,d=h.bitmapMask;d&&f&&(u.drawBitmapMask(d,s,this),l&&this.set2f("uResolution",l.width,l.height),this.set1i("uInvertMaskAlpha",h.invertAlpha),f.drawArrays(this.topology,0,3),l&&this.set2f("uResolution",this.width,this.height),f.bindTexture(f.TEXTURE_2D,null))}});c.exports=i},92651:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(58918),o=t(14811),r=t(95540),n=t(43558),e=t(89350),i=t(70554),h=new a({Extends:n,initialize:function(l){l.shaders=[i.setGlowQuality(e.FXGlowFrag,l.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,l);var f=this.game;this.glow=new v.Glow(f),this.shadow=new v.Shadow(f),this.pixelate=new v.Pixelate(f),this.vignette=new v.Vignette(f),this.shine=new v.Shine(f),this.gradient=new v.Gradient(f),this.circle=new v.Circle(f),this.barrel=new v.Barrel(f),this.wipe=new v.Wipe(f),this.bokeh=new v.Bokeh(f);var u=[];u[o.GLOW]=this.onGlow,u[o.SHADOW]=this.onShadow,u[o.PIXELATE]=this.onPixelate,u[o.VIGNETTE]=this.onVignette,u[o.SHINE]=this.onShine,u[o.BLUR]=this.onBlur,u[o.GRADIENT]=this.onGradient,u[o.BLOOM]=this.onBloom,u[o.COLOR_MATRIX]=this.onColorMatrix,u[o.CIRCLE]=this.onCircle,u[o.BARREL]=this.onBarrel,u[o.DISPLACEMENT]=this.onDisplacement,u[o.WIPE]=this.onWipe,u[o.BOKEH]=this.onBokeh,this.fxHandlers=u,this.source,this.target,this.swap},onDraw:function(s,l,f){this.source=s,this.target=l,this.swap=f;var u=s.width,d=s.height,p=this.tempSprite,g=this.fxHandlers;if(p&&p.preFX)for(var y=p.preFX.list,x=0;x{/** + */var o=t(83419),v=t(58918),a=t(14811),r=t(95540),n=t(43558),e=t(89350),i=t(70554),h=new o({Extends:n,initialize:function(l){l.shaders=[i.setGlowQuality(e.FXGlowFrag,l.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,l);var f=this.game;this.glow=new v.Glow(f),this.shadow=new v.Shadow(f),this.pixelate=new v.Pixelate(f),this.vignette=new v.Vignette(f),this.shine=new v.Shine(f),this.gradient=new v.Gradient(f),this.circle=new v.Circle(f),this.barrel=new v.Barrel(f),this.wipe=new v.Wipe(f),this.bokeh=new v.Bokeh(f);var u=[];u[a.GLOW]=this.onGlow,u[a.SHADOW]=this.onShadow,u[a.PIXELATE]=this.onPixelate,u[a.VIGNETTE]=this.onVignette,u[a.SHINE]=this.onShine,u[a.BLUR]=this.onBlur,u[a.GRADIENT]=this.onGradient,u[a.BLOOM]=this.onBloom,u[a.COLOR_MATRIX]=this.onColorMatrix,u[a.CIRCLE]=this.onCircle,u[a.BARREL]=this.onBarrel,u[a.DISPLACEMENT]=this.onDisplacement,u[a.WIPE]=this.onWipe,u[a.BOKEH]=this.onBokeh,this.fxHandlers=u,this.source,this.target,this.swap},onDraw:function(s,l,f){this.source=s,this.target=l,this.swap=f;var u=s.width,d=s.height,p=this.tempSprite,g=this.fxHandlers;if(p&&p.preFX)for(var y=p.preFX.list,x=0;x{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(31063),r=t(57516),n=t(61340),e=t(26099),i=t(29100),h=new a({Extends:r,initialize:function(l){var f=v(l,"fragShader",o);l.fragShader=f.replace("%LIGHT_COUNT%",l.game.renderer.config.maxLights),r.call(this,l),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(){i.prototype.boot.call(this)},onRender:function(s,l){var f=s.sys.lights;if(this.lightsActive=!1,!(!f||!f.active)){var u=f.getLights(l),d=u.length;this.lightsActive=!0;var p,g=this.renderer,y=g.height,x=l.matrix,T=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",l.x,l.y,l.rotation,l.zoom),this.set3f("uAmbientLightColor",f.ambientColor.r,f.ambientColor.g,f.ambientColor.b),this.set1i("uLightCount",d),p=0;p0&&this.flush();var l=this.inverseRotationMatrix;if(s){var f=-s,u=Math.cos(f),d=Math.sin(f);l[1]=d,l[3]=-d,l[0]=l[4]=u}else l[0]=l[4]=1,l[1]=l[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,l),this.currentNormalMapRotation=s}},setTexture2D:function(s,l){var f=this.renderer;s===void 0&&(s=f.whiteTexture);var u=this.getNormalMap(l);this.isNewNormalMap(s,u)&&(this.flush(),this.createBatch(s),this.addTextureToBatch(u),this.currentNormalMap=u);var d=0;if(l&&l.parentContainer){var p=l.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);d=p.rotationNormalized}else l&&(d=l.rotation);return this.setNormalMapRotation(d),0},setGameObject:function(s,l){l===void 0&&(l=s.frame);var f=l.glTexture,u=this.getNormalMap(s);if(this.isNewNormalMap(f,u)&&(this.flush(),this.createBatch(f),this.addTextureToBatch(u),this.currentNormalMap=u),s.parentContainer){var d=s.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(d.rotationNormalized)}else this.setNormalMapRotation(s.rotation);return 0},isNewNormalMap:function(s,l){return this.currentTexture!==s||this.currentNormalMap!==l},getNormalMap:function(s){var l;if(s)s.displayTexture?l=s.displayTexture.dataSource[s.displayFrame.sourceIndex]:s.texture?l=s.texture.dataSource[s.frame.sourceIndex]:s.tileset&&(Array.isArray(s.tileset)?l=s.tileset[0].image.dataSource[0]:l=s.tileset.image.dataSource[0]);else return this.renderer.normalTexture;return l?l.glTexture:this.renderer.normalTexture},batchSprite:function(s,l,f){this.lightsActive&&r.prototype.batchSprite.call(this,s,l,f)},batchTexture:function(s,l,f,u,d,p,g,y,x,T,C,M,w,L,F,O,N,G,V,K,$,J,X,Y,D,z,W,H,Z,Q,k,et){this.lightsActive&&r.prototype.batchTexture.call(this,s,l,f,u,d,p,g,y,x,T,C,M,w,L,F,O,N,G,V,K,$,J,X,Y,D,z,W,H,Z,Q,k,et)},batchTextureFrame:function(s,l,f,u,d,p,g){this.lightsActive&&r.prototype.batchTextureFrame.call(this,s,l,f,u,d,p,g)}});c.exports=h},56527:(c,m,t)=>{/** + */var o=t(83419),v=t(95540),a=t(31063),r=t(57516),n=t(61340),e=t(26099),i=t(29100),h=new o({Extends:r,initialize:function(l){var f=v(l,"fragShader",a);l.fragShader=f.replace("%LIGHT_COUNT%",l.game.renderer.config.maxLights),r.call(this,l),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(){i.prototype.boot.call(this)},onRender:function(s,l){var f=s.sys.lights;if(this.lightsActive=!1,!(!f||!f.active)){var u=f.getLights(l),d=u.length;this.lightsActive=!0;var p,g=this.renderer,y=g.height,x=l.matrix,C=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",l.x,l.y,l.rotation,l.zoom),this.set3f("uAmbientLightColor",f.ambientColor.r,f.ambientColor.g,f.ambientColor.b),this.set1i("uLightCount",d),p=0;p0&&this.flush();var l=this.inverseRotationMatrix;if(s){var f=-s,u=Math.cos(f),d=Math.sin(f);l[1]=d,l[3]=-d,l[0]=l[4]=u}else l[0]=l[4]=1,l[1]=l[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,l),this.currentNormalMapRotation=s}},setTexture2D:function(s,l){var f=this.renderer;s===void 0&&(s=f.whiteTexture);var u=this.getNormalMap(l);this.isNewNormalMap(s,u)&&(this.flush(),this.createBatch(s),this.addTextureToBatch(u),this.currentNormalMap=u);var d=0;if(l&&l.parentContainer){var p=l.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);d=p.rotationNormalized}else l&&(d=l.rotation);return this.setNormalMapRotation(d),0},setGameObject:function(s,l){l===void 0&&(l=s.frame);var f=l.glTexture,u=this.getNormalMap(s);if(this.isNewNormalMap(f,u)&&(this.flush(),this.createBatch(f),this.addTextureToBatch(u),this.currentNormalMap=u),s.parentContainer){var d=s.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(d.rotationNormalized)}else this.setNormalMapRotation(s.rotation);return 0},isNewNormalMap:function(s,l){return this.currentTexture!==s||this.currentNormalMap!==l},getNormalMap:function(s){var l;if(s)s.displayTexture?l=s.displayTexture.dataSource[s.displayFrame.sourceIndex]:s.texture?l=s.texture.dataSource[s.frame.sourceIndex]:s.tileset&&(Array.isArray(s.tileset)?l=s.tileset[0].image.dataSource[0]:l=s.tileset.image.dataSource[0]);else return this.renderer.normalTexture;return l?l.glTexture:this.renderer.normalTexture},batchSprite:function(s,l,f){this.lightsActive&&r.prototype.batchSprite.call(this,s,l,f)},batchTexture:function(s,l,f,u,d,p,g,y,x,C,P,M,w,I,L,B,N,G,V,K,j,J,X,Y,b,z,W,H,Z,Q,k,et){this.lightsActive&&r.prototype.batchTexture.call(this,s,l,f,u,d,p,g,y,x,C,P,M,w,I,L,B,N,G,V,K,j,J,X,Y,b,z,W,H,Z,Q,k,et)},batchTextureFrame:function(s,l,f,u,d,p,g){this.lightsActive&&r.prototype.batchTextureFrame.call(this,s,l,f,u,d,p,g)}});c.exports=h},56527:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(57516),r=t(45561),n=t(60722),e=t(14500),i=t(29100),h=new a({Extends:o,initialize:function(l){l.fragShader=v(l,"fragShader",r),l.vertShader=v(l,"vertShader",n),l.attributes=v(l,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),l.forceZero=!0,l.resizeUniform="uResolution",o.call(this,l)},boot:function(){i.prototype.boot.call(this);var s=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",s.width,s.height),this.set1i("uRoundPixels",s.config.roundPixels)}});c.exports=h},57516:(c,m,t)=>{/** + */var o=t(83419),v=t(95540),a=t(57516),r=t(45561),n=t(60722),e=t(14500),i=t(29100),h=new o({Extends:a,initialize:function(l){l.fragShader=v(l,"fragShader",r),l.vertShader=v(l,"vertShader",n),l.attributes=v(l,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),l.forceZero=!0,l.resizeUniform="uResolution",a.call(this,l)},boot:function(){i.prototype.boot.call(this);var s=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",s.width,s.height),this.set1i("uRoundPixels",s.config.roundPixels)}});c.exports=h},57516:(c,m,t)=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(94811),o=t(95540),r=t(98840),n=t(44667),e=t(61340),i=t(70554),h=t(14500),s=t(29100),l=new a({Extends:s,initialize:function(u){var d=u.game.renderer,p=o(u,"fragShader",r);u.fragShader=i.parseFragmentShaderMaxTextures(p,d.maxTextures),u.vertShader=o(u,"vertShader",n),u.attributes=o(u,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),u.resizeUniform="uResolution",s.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(){s.prototype.boot.call(this);var f=this.renderer;this.set1iv("uMainSampler",f.textureIndexes),this.set2f("uResolution",f.width,f.height),this.set1i("uRoundPixels",f.config.roundPixels)},batchSprite:function(f,u,d){this.manager.set(this,f);var p=this._tempMatrix1,g=this._tempMatrix2,y=this._tempMatrix3,x=f.frame,T=x.glTexture,C=x.u0,M=x.v0,w=x.u1,L=x.v1,F=x.x,O=x.y,N=x.cutWidth,G=x.cutHeight,V=x.customPivot,K=f.displayOriginX,$=f.displayOriginY,J=-K+F,X=-$+O;if(f.isCropped){var Y=f._crop;(Y.flipX!==f.flipX||Y.flipY!==f.flipY)&&x.updateCropUVs(Y,f.flipX,f.flipY),C=Y.u0,M=Y.v0,w=Y.u1,L=Y.v1,N=Y.width,G=Y.height,F=Y.x,O=Y.y,J=-K+F,X=-$+O}var D=1,z=1;f.flipX&&(V||(J+=-x.realWidth+K*2),D=-1),f.flipY&&(V||(X+=-x.realHeight+$*2),z=-1);var W=f.x,H=f.y;g.applyITRS(W,H,f.rotation,f.scaleX*D,f.scaleY*z),p.copyFrom(u.matrix),d?(p.multiplyWithOffset(d,-u.scrollX*f.scrollFactorX,-u.scrollY*f.scrollFactorY),g.e=W,g.f=H):(g.e-=u.scrollX*f.scrollFactorX,g.f-=u.scrollY*f.scrollFactorY),p.multiply(g,y);var Z=y.setQuad(J,X,J+N,X+G),Q=i.getTintAppendFloatAlpha,k=u.alpha,et=Q(f.tintTopLeft,k*f._alphaTL),st=Q(f.tintTopRight,k*f._alphaTR),rt=Q(f.tintBottomLeft,k*f._alphaBL),ot=Q(f.tintBottomRight,k*f._alphaBR);this.shouldFlush(6)&&this.flush();var ft=this.setGameObject(f,x);this.manager.preBatch(f),this.currentShader.set1i("uRoundPixels",u.roundPixels),this.batchQuad(f,Z[0],Z[1],Z[2],Z[3],Z[4],Z[5],Z[6],Z[7],C,M,w,L,et,st,rt,ot,f.tintFill,T,ft),this.manager.postBatch(f)},batchTexture:function(f,u,d,p,g,y,x,T,C,M,w,L,F,O,N,G,V,K,$,J,X,Y,D,z,W,H,Z,Q,k,et,st,rt,ot){ot===void 0&&(ot=!1),this.manager.set(this,f);var ft=this._tempMatrix1,at=this._tempMatrix2,vt=this._tempMatrix3,Pt=K/d+Z,Ct=$/p+Q,Et=(K+J)/d+Z,ct=($+X)/p+Q,Tt=x,pt=T,Mt=-G,It=-V;if(f.isCropped){var Kt=f._crop,Gt=Kt.width,Wt=Kt.height;Tt=Gt,pt=Wt,x=Gt,T=Wt,K=Kt.x,$=Kt.y;var Bt=K,ie=$;L&&(Bt=J-Kt.x-Gt),F&&(ie=X-Kt.y-Wt),Pt=Bt/d+Z,Ct=ie/p+Q,Et=(Bt+Gt)/d+Z,ct=(ie+Wt)/p+Q,Mt=-G+K,It=-V+$}F=F^(!st&&u.isRenderTexture?1:0),L&&(Tt*=-1,Mt+=x),F&&(pt*=-1,It+=T),at.applyITRS(g,y,w,C,M),ft.copyFrom(k.matrix),et?(ft.multiplyWithOffset(et,-k.scrollX*O,-k.scrollY*N),at.e=g,at.f=y):(at.e-=k.scrollX*O,at.f-=k.scrollY*N),ft.multiply(at,vt);var Zt=vt.setQuad(Mt,It,Mt+Tt,It+pt);rt==null&&(rt=this.setTexture2D(u)),f&&!ot&&this.manager.preBatch(f),this.currentShader.set1i("uRoundPixels",k.roundPixels),this.batchQuad(f,Zt[0],Zt[1],Zt[2],Zt[3],Zt[4],Zt[5],Zt[6],Zt[7],Pt,Ct,Et,ct,Y,D,z,W,H,u,rt),f&&!ot&&this.manager.postBatch(f)},batchTextureFrame:function(f,u,d,p,g,y,x){this.manager.set(this);var T=this._tempMatrix1.copyFrom(y),C=this._tempMatrix2;x?T.multiply(x,C):C=T;var M=C.setQuad(u,d,u+f.width,d+f.height),w=this.setTexture2D(f.source.glTexture);p=i.getTintAppendFloatAlpha(p,g),this.batchQuad(null,M[0],M[1],M[2],M[3],M[4],M[5],M[6],M[7],f.u0,f.v0,f.u1,f.v1,p,p,p,p,0,f.glTexture,w)},batchFillRect:function(f,u,d,p,g,y){this.renderer.pipelines.set(this);var x=this.calcMatrix;y&&y.multiply(g,x);var T=x.setQuad(f,u,f+d,u+p),C=this.fillTint;this.batchQuad(null,T[0],T[1],T[2],T[3],T[4],T[5],T[6],T[7],0,0,1,1,C.TL,C.TR,C.BL,C.BR,2)},batchFillTriangle:function(f,u,d,p,g,y,x,T){this.renderer.pipelines.set(this);var C=this.calcMatrix;T&&T.multiply(x,C);var M=C.getX(f,u),w=C.getY(f,u),L=C.getX(d,p),F=C.getY(d,p),O=C.getX(g,y),N=C.getY(g,y),G=this.fillTint;this.currentShader.set1i("uRoundPixels",!1),this.batchTri(null,M,w,L,F,O,N,0,0,1,1,G.TL,G.TR,G.BL,2)},batchStrokeTriangle:function(f,u,d,p,g,y,x,T,C){var M=this.tempTriangle;M[0].x=f,M[0].y=u,M[0].width=x,M[1].x=d,M[1].y=p,M[1].width=x,M[2].x=g,M[2].y=y,M[2].width=x,M[3].x=f,M[3].y=u,M[3].width=x,this.batchStrokePath(M,x,!1,T,C)},batchFillPath:function(f,u,d){this.renderer.pipelines.set(this);var p=this.calcMatrix;d&&d.multiply(u,p);for(var g=f.length,y=this.polygonCache,x,T,C=this.fillTint.TL,M=this.fillTint.TR,w=this.fillTint.BL,L=0;L0&&Tt[4]?this.batchQuad(null,ft,at,et,st,Tt[0],Tt[1],Tt[2],Tt[3],0,0,1,1,Pt,Ct,Et,ct,2):(pt[0]=ft,pt[1]=at,pt[2]=et,pt[3]=st,pt[4]=1),C&&pt[4]?this.batchQuad(null,Q,k,rt,ot,pt[0],pt[1],pt[2],pt[3],0,0,1,1,Pt,Ct,Et,ct,2):(Tt[0]=Q,Tt[1]=k,Tt[2]=rt,Tt[3]=ot,Tt[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,s.prototype.destroy.call(this),this}});c.exports=l},43439:(c,m,t)=>{/** + */var o=t(83419),v=t(94811),a=t(95540),r=t(98840),n=t(44667),e=t(61340),i=t(70554),h=t(14500),s=t(29100),l=new o({Extends:s,initialize:function(u){var d=u.game.renderer,p=a(u,"fragShader",r);u.fragShader=i.parseFragmentShaderMaxTextures(p,d.maxTextures),u.vertShader=a(u,"vertShader",n),u.attributes=a(u,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),u.resizeUniform="uResolution",s.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(){s.prototype.boot.call(this);var f=this.renderer;this.set1iv("uMainSampler",f.textureIndexes),this.set2f("uResolution",f.width,f.height),this.set1i("uRoundPixels",f.config.roundPixels)},batchSprite:function(f,u,d){this.manager.set(this,f);var p=this._tempMatrix1,g=this._tempMatrix2,y=this._tempMatrix3,x=f.frame,C=x.glTexture,P=x.u0,M=x.v0,w=x.u1,I=x.v1,L=x.x,B=x.y,N=x.cutWidth,G=x.cutHeight,V=x.customPivot,K=f.displayOriginX,j=f.displayOriginY,J=-K+L,X=-j+B;if(f.isCropped){var Y=f._crop;(Y.flipX!==f.flipX||Y.flipY!==f.flipY)&&x.updateCropUVs(Y,f.flipX,f.flipY),P=Y.u0,M=Y.v0,w=Y.u1,I=Y.v1,N=Y.width,G=Y.height,L=Y.x,B=Y.y,J=-K+L,X=-j+B}var b=1,z=1;f.flipX&&(V||(J+=-x.realWidth+K*2),b=-1),f.flipY&&(V||(X+=-x.realHeight+j*2),z=-1);var W=f.x,H=f.y;g.applyITRS(W,H,f.rotation,f.scaleX*b,f.scaleY*z),p.copyFrom(u.matrix),d?(p.multiplyWithOffset(d,-u.scrollX*f.scrollFactorX,-u.scrollY*f.scrollFactorY),g.e=W,g.f=H):(g.e-=u.scrollX*f.scrollFactorX,g.f-=u.scrollY*f.scrollFactorY),p.multiply(g,y);var Z=y.setQuad(J,X,J+N,X+G),Q=i.getTintAppendFloatAlpha,k=u.alpha,et=Q(f.tintTopLeft,k*f._alphaTL),st=Q(f.tintTopRight,k*f._alphaTR),rt=Q(f.tintBottomLeft,k*f._alphaBL),ot=Q(f.tintBottomRight,k*f._alphaBR);this.shouldFlush(6)&&this.flush();var ft=this.setGameObject(f,x);this.manager.preBatch(f),this.currentShader.set1i("uRoundPixels",u.roundPixels),this.batchQuad(f,Z[0],Z[1],Z[2],Z[3],Z[4],Z[5],Z[6],Z[7],P,M,w,I,et,st,rt,ot,f.tintFill,C,ft),this.manager.postBatch(f)},batchTexture:function(f,u,d,p,g,y,x,C,P,M,w,I,L,B,N,G,V,K,j,J,X,Y,b,z,W,H,Z,Q,k,et,st,rt,ot){ot===void 0&&(ot=!1),this.manager.set(this,f);var ft=this._tempMatrix1,at=this._tempMatrix2,vt=this._tempMatrix3,At=K/d+Z,Et=j/p+Q,Pt=(K+J)/d+Z,ct=(j+X)/p+Q,Ct=x,pt=C,wt=-G,Bt=-V;if(f.isCropped){var jt=f._crop,zt=jt.width,Yt=jt.height;Ct=zt,pt=Yt,x=zt,C=Yt,K=jt.x,j=jt.y;var bt=K,ne=j;I&&(bt=J-jt.x-zt),L&&(ne=X-jt.y-Yt),At=bt/d+Z,Et=ne/p+Q,Pt=(bt+zt)/d+Z,ct=(ne+Yt)/p+Q,wt=-G+K,Bt=-V+j}L=L^(!st&&u.isRenderTexture?1:0),I&&(Ct*=-1,wt+=x),L&&(pt*=-1,Bt+=C),at.applyITRS(g,y,w,P,M),ft.copyFrom(k.matrix),et?(ft.multiplyWithOffset(et,-k.scrollX*B,-k.scrollY*N),at.e=g,at.f=y):(at.e-=k.scrollX*B,at.f-=k.scrollY*N),ft.multiply(at,vt);var Qt=vt.setQuad(wt,Bt,wt+Ct,Bt+pt);rt==null&&(rt=this.setTexture2D(u)),f&&!ot&&this.manager.preBatch(f),this.currentShader.set1i("uRoundPixels",k.roundPixels),this.batchQuad(f,Qt[0],Qt[1],Qt[2],Qt[3],Qt[4],Qt[5],Qt[6],Qt[7],At,Et,Pt,ct,Y,b,z,W,H,u,rt),f&&!ot&&this.manager.postBatch(f)},batchTextureFrame:function(f,u,d,p,g,y,x){this.manager.set(this);var C=this._tempMatrix1.copyFrom(y),P=this._tempMatrix2;x?C.multiply(x,P):P=C;var M=P.setQuad(u,d,u+f.width,d+f.height),w=this.setTexture2D(f.source.glTexture);p=i.getTintAppendFloatAlpha(p,g),this.batchQuad(null,M[0],M[1],M[2],M[3],M[4],M[5],M[6],M[7],f.u0,f.v0,f.u1,f.v1,p,p,p,p,0,f.glTexture,w)},batchFillRect:function(f,u,d,p,g,y){this.renderer.pipelines.set(this);var x=this.calcMatrix;y&&y.multiply(g,x);var C=x.setQuad(f,u,f+d,u+p),P=this.fillTint;this.batchQuad(null,C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],0,0,1,1,P.TL,P.TR,P.BL,P.BR,2)},batchFillTriangle:function(f,u,d,p,g,y,x,C){this.renderer.pipelines.set(this);var P=this.calcMatrix;C&&C.multiply(x,P);var M=P.getX(f,u),w=P.getY(f,u),I=P.getX(d,p),L=P.getY(d,p),B=P.getX(g,y),N=P.getY(g,y),G=this.fillTint;this.currentShader.set1i("uRoundPixels",!1),this.batchTri(null,M,w,I,L,B,N,0,0,1,1,G.TL,G.TR,G.BL,2)},batchStrokeTriangle:function(f,u,d,p,g,y,x,C,P){var M=this.tempTriangle;M[0].x=f,M[0].y=u,M[0].width=x,M[1].x=d,M[1].y=p,M[1].width=x,M[2].x=g,M[2].y=y,M[2].width=x,M[3].x=f,M[3].y=u,M[3].width=x,this.batchStrokePath(M,x,!1,C,P)},batchFillPath:function(f,u,d){this.renderer.pipelines.set(this);var p=this.calcMatrix;d&&d.multiply(u,p);for(var g=f.length,y=this.polygonCache,x,C,P=this.fillTint.TL,M=this.fillTint.TR,w=this.fillTint.BL,I=0;I0&&Ct[4]?this.batchQuad(null,ft,at,et,st,Ct[0],Ct[1],Ct[2],Ct[3],0,0,1,1,At,Et,Pt,ct,2):(pt[0]=ft,pt[1]=at,pt[2]=et,pt[3]=st,pt[4]=1),P&&pt[4]?this.batchQuad(null,Q,k,rt,ot,pt[0],pt[1],pt[2],pt[3],0,0,1,1,At,Et,Pt,ct,2):(Ct[0]=Q,Ct[1]=k,Ct[2]=rt,Ct[3]=ot,Ct[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,s.prototype.destroy.call(this),this}});c.exports=l},43439:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(4127),r=t(89924),n=t(29100),e=new a({Extends:n,initialize:function(h){h.vertShader=v(h,"vertShader",r),h.fragShader=v(h,"fragShader",o),h.attributes=v(h,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),n.call(this,h)},onRender:function(i,h){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",h.zoom)},batchPointLight:function(i,h,s,l,f,u,d,p,g,y,x,T){var C=i.color,M=i.intensity,w=i.radius,L=i.attenuation,F=C.r*M,O=C.g*M,N=C.b*M,G=h.alpha*i.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(s,l,x,T,w,L,F,O,N,G),this.batchLightVert(f,u,x,T,w,L,F,O,N,G),this.batchLightVert(d,p,x,T,w,L,F,O,N,G),this.batchLightVert(s,l,x,T,w,L,F,O,N,G),this.batchLightVert(d,p,x,T,w,L,F,O,N,G),this.batchLightVert(g,y,x,T,w,L,F,O,N,G),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(i,h,s,l,f,u,d,p,g,y){var x=this.vertexViewF32,T=this.vertexCount*this.currentShader.vertexComponentCount-1;x[++T]=i,x[++T]=h,x[++T]=s,x[++T]=l,x[++T]=f,x[++T]=u,x[++T]=d,x[++T]=p,x[++T]=g,x[++T]=y,this.vertexCount++}});c.exports=e},84057:(c,m,t)=>{/** + */var o=t(83419),v=t(95540),a=t(4127),r=t(89924),n=t(29100),e=new o({Extends:n,initialize:function(h){h.vertShader=v(h,"vertShader",r),h.fragShader=v(h,"fragShader",a),h.attributes=v(h,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),n.call(this,h)},onRender:function(i,h){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",h.zoom)},batchPointLight:function(i,h,s,l,f,u,d,p,g,y,x,C){var P=i.color,M=i.intensity,w=i.radius,I=i.attenuation,L=P.r*M,B=P.g*M,N=P.b*M,G=h.alpha*i.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(s,l,x,C,w,I,L,B,N,G),this.batchLightVert(f,u,x,C,w,I,L,B,N,G),this.batchLightVert(d,p,x,C,w,I,L,B,N,G),this.batchLightVert(s,l,x,C,w,I,L,B,N,G),this.batchLightVert(d,p,x,C,w,I,L,B,N,G),this.batchLightVert(g,y,x,C,w,I,L,B,N,G),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(i,h,s,l,f,u,d,p,g,y){var x=this.vertexViewF32,C=this.vertexCount*this.currentShader.vertexComponentCount-1;x[++C]=i,x[++C]=h,x[++C]=s,x[++C]=l,x[++C]=f,x[++C]=u,x[++C]=d,x[++C]=p,x[++C]=g,x[++C]=y,this.vertexCount++}});c.exports=e},84057:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(89422),o=t(95540),r=t(27681),n=t(49627),e=t(29100),i=new a({Extends:e,initialize:function(s){s.renderTarget=o(s,"renderTarget",1),s.fragShader=o(s,"fragShader",r),s.vertShader=o(s,"vertShader",n),s.attributes=o(s,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),s.batchSize=1,s.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,s),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new v,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){e.prototype.boot.call(this);var h=this.manager.UTILITY_PIPELINE;this.fullFrame1=h.fullFrame1,this.fullFrame2=h.fullFrame2,this.halfFrame1=h.halfFrame1,this.halfFrame2=h.halfFrame2;var s=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",s.width,s.height),this.set1i("uRoundPixels",s.config.roundPixels);for(var l=this.renderTargets,f=0;f{/** + */var o=t(83419),v=t(89422),a=t(95540),r=t(27681),n=t(49627),e=t(29100),i=new o({Extends:e,initialize:function(s){s.renderTarget=a(s,"renderTarget",1),s.fragShader=a(s,"fragShader",r),s.vertShader=a(s,"vertShader",n),s.attributes=a(s,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),s.batchSize=1,s.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,s),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new v,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){e.prototype.boot.call(this);var h=this.manager.UTILITY_PIPELINE;this.fullFrame1=h.fullFrame1,this.fullFrame2=h.fullFrame2,this.halfFrame1=h.halfFrame1,this.halfFrame2=h.halfFrame2;var s=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",s.width,s.height),this.set1i("uRoundPixels",s.config.roundPixels);for(var l=this.renderTargets,f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10312),v=t(67502),o=t(83419),r=t(96293),n=t(95540),e=t(57516),i=t(27681),h=t(87841),s=t(32302),l=t(45561),f=t(60722),u=t(29100),d=new o({Extends:e,initialize:function(g){var y=n(g,"fragShader",i),x=n(g,"vertShader",f),T=n(g,"drawShader",i),C=[{name:"DrawSprite",fragShader:l,vertShader:f},{name:"CopySprite",fragShader:y,vertShader:x},{name:"DrawGame",fragShader:T,vertShader:f},{name:"ColorMatrix",fragShader:r}],M=n(g,"shaders",[]);g.shaders=C.concat(M),g.vertShader||(g.vertShader=x),g.batchSize=1,e.call(this,g),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new h,this.targetBounds=new h,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){u.prototype.boot.call(this);var p=this.shaders,g=this.renderer;this.drawSpriteShader=p[0],this.copyShader=p[1],this.gameShader=p[2],this.colorMatrixShader=p[3],this.fsTarget=new s(g,g.width,g.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var y=new ArrayBuffer(168);this.quadVertexData=y,this.quadVertexViewF32=new Float32Array(y),this.quadVertexBuffer=g.createVertexBuffer(y,this.gl.STATIC_DRAW),this.onResize(g.width,g.height),this.currentShader=this.copyShader,this.set2f("uResolution",g.width,g.height),this.set1i("uRoundPixels",g.config.roundPixels)},onResize:function(p,g){var y=this.quadVertexViewF32;y[1]=g,y[22]=g,y[14]=p,y[28]=p,y[35]=p,y[36]=g},batchQuad:function(p,g,y,x,T,C,M,w,L,F,O,N,G,V,K,$,J,X,Y){var D=Math.min(g,x,C,w),z=Math.min(y,T,M,L),W=Math.max(g,x,C,w),H=Math.max(y,T,M,L),Z=W-D,Q=H-z,k=this.spriteBounds.setTo(D,z,Z,Q),et=p?p.preFX.padding:0,st=Z+et*2,rt=Q+et*2,ot=Math.abs(Math.max(st,rt)),ft=this.manager.getRenderTarget(ot),at=this.targetBounds.setTo(0,0,ft.width,ft.height);v(at,k.centerX,k.centerY),this.tempSprite=p;var vt=this.gl,Pt=this.renderer;Pt.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",Pt.width,Pt.height),this.set1i("uRoundPixels",Pt.config.roundPixels),this.flipProjectionMatrix(!0),p&&(this.onDrawSprite(p,ft),p.preFX.onFX(this));var Ct=this.fsTarget;return this.flush(),vt.viewport(0,0,Pt.width,Pt.height),vt.bindFramebuffer(vt.FRAMEBUFFER,Ct.framebuffer.webGLFramebuffer),vt.framebufferTexture2D(vt.FRAMEBUFFER,vt.COLOR_ATTACHMENT0,vt.TEXTURE_2D,Ct.texture.webGLTexture,0),vt.clearColor(0,0,0,0),vt.clear(vt.COLOR_BUFFER_BIT),this.setTexture2D(Y),this.batchVert(g,y,F,O,0,X,V),this.batchVert(x,T,F,G,0,X,$),this.batchVert(C,M,N,G,0,X,J),this.batchVert(g,y,F,O,0,X,V),this.batchVert(C,M,N,G,0,X,J),this.batchVert(w,L,N,O,0,X,K),this.flush(),this.flipProjectionMatrix(!1),vt.activeTexture(vt.TEXTURE0),vt.bindTexture(vt.TEXTURE_2D,ft.texture.webGLTexture),vt.copyTexSubImage2D(vt.TEXTURE_2D,0,0,0,at.x,at.y,at.width,at.height),vt.bindFramebuffer(vt.FRAMEBUFFER,null),vt.bindTexture(vt.TEXTURE_2D,null),this.onBatch(p),this.currentShader=this.copyShader,this.onDraw(ft,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(p,g,y,x,T,C,M){y===void 0&&(y=!0),x===void 0&&(x=!0),T===void 0&&(T=!1),M===void 0&&(M=this.copyShader);var w=this.gl,L=this.tempSprite;C&&(M=this.colorMatrixShader),this.currentShader=M;var F=this.setVertexBuffer(this.quadVertexBuffer);M.bind(F,!1);var O=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",O.width,O.height),this.set1i("uRoundPixels",O.config.roundPixels),L.preFX.onFXCopy(this),this.onCopySprite(p,g,L),C&&(this.set1fv("uColorMatrix",C.getData()),this.set1f("uAlpha",C.alpha)),w.activeTexture(w.TEXTURE0),w.bindTexture(w.TEXTURE_2D,p.texture.webGLTexture),p.height>g.height)w.viewport(0,0,p.width,p.height),this.setTargetUVs(p,g);else{var N=g.height-p.height;w.viewport(0,N,p.width,p.height),this.resetUVs()}if(w.bindFramebuffer(w.FRAMEBUFFER,g.framebuffer.webGLFramebuffer),w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_2D,g.texture.webGLTexture,0),y&&(w.clearColor(0,0,0,+!x),w.clear(w.COLOR_BUFFER_BIT)),T){var G=this.renderer.currentBlendMode;this.renderer.setBlendMode(a.ERASE)}w.bufferData(w.ARRAY_BUFFER,this.quadVertexData,w.STATIC_DRAW),w.drawArrays(w.TRIANGLES,0,6),T&&this.renderer.setBlendMode(G),w.bindFramebuffer(w.FRAMEBUFFER,null)},copy:function(p,g){var y=this.gl;this.set1i("uMainSampler",0),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,p.texture.webGLTexture),y.viewport(0,0,p.width,p.height),this.setUVs(0,0,0,1,1,1,1,0),y.bindFramebuffer(y.FRAMEBUFFER,g.framebuffer.webGLFramebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,g.texture.webGLTexture,0),y.clearColor(0,0,0,0),y.clear(y.COLOR_BUFFER_BIT),y.bufferData(y.ARRAY_BUFFER,this.quadVertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),y.bindFramebuffer(y.FRAMEBUFFER,null)},blendFrames:function(p,g,y,x,T){this.manager.blendFrames(p,g,y,x,T)},blendFramesAdditive:function(p,g,y,x,T){this.manager.blendFramesAdditive(p,g,y,x,T)},drawToGame:function(p){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(p)},copyToGame:function(p){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(p)},bindAndDraw:function(p){var g=this.gl,y=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(p.texture);var x=this._tempMatrix1.loadIdentity(),T=this.targetBounds.x,C=this.targetBounds.y,M=T+p.width,w=C+p.height,L=x.getX(T,C),F=x.getX(T,w),O=x.getX(M,w),N=x.getX(M,C),G=x.getY(T,C),V=x.getY(T,w),K=x.getY(M,w),$=x.getY(M,C),J=16777215;this.batchVert(L,G,0,0,0,0,J),this.batchVert(F,V,0,1,0,0,J),this.batchVert(O,K,1,1,0,0,J),this.batchVert(L,G,0,0,0,0,J),this.batchVert(O,K,1,1,0,0,J),this.batchVert(N,$,1,0,0,0,J),y.restoreFramebuffer(!1,!0),y.currentFramebuffer||g.viewport(0,0,y.width,y.height),y.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(p){this.drawToGame(p)},setUVs:function(p,g,y,x,T,C,M,w){var L=this.quadVertexViewF32;L[2]=p,L[3]=g,L[9]=y,L[10]=x,L[16]=T,L[17]=C,L[23]=p,L[24]=g,L[30]=T,L[31]=C,L[37]=M,L[38]=w},setTargetUVs:function(p,g){var y=g.height/p.height;y>.5?y=.5-(y-.5):y=.5+(.5-y),this.setUVs(0,y,0,1+y,1,1+y,1,y)},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}});c.exports=d},81041:(c,m,t)=>{/** + */var o=t(10312),v=t(67502),a=t(83419),r=t(96293),n=t(95540),e=t(57516),i=t(27681),h=t(87841),s=t(32302),l=t(45561),f=t(60722),u=t(29100),d=new a({Extends:e,initialize:function(g){var y=n(g,"fragShader",i),x=n(g,"vertShader",f),C=n(g,"drawShader",i),P=[{name:"DrawSprite",fragShader:l,vertShader:f},{name:"CopySprite",fragShader:y,vertShader:x},{name:"DrawGame",fragShader:C,vertShader:f},{name:"ColorMatrix",fragShader:r}],M=n(g,"shaders",[]);g.shaders=P.concat(M),g.vertShader||(g.vertShader=x),g.batchSize=1,e.call(this,g),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new h,this.targetBounds=new h,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){u.prototype.boot.call(this);var p=this.shaders,g=this.renderer;this.drawSpriteShader=p[0],this.copyShader=p[1],this.gameShader=p[2],this.colorMatrixShader=p[3],this.fsTarget=new s(g,g.width,g.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var y=new ArrayBuffer(168);this.quadVertexData=y,this.quadVertexViewF32=new Float32Array(y),this.quadVertexBuffer=g.createVertexBuffer(y,this.gl.STATIC_DRAW),this.onResize(g.width,g.height),this.currentShader=this.copyShader,this.set2f("uResolution",g.width,g.height),this.set1i("uRoundPixels",g.config.roundPixels)},onResize:function(p,g){var y=this.quadVertexViewF32;y[1]=g,y[22]=g,y[14]=p,y[28]=p,y[35]=p,y[36]=g},batchQuad:function(p,g,y,x,C,P,M,w,I,L,B,N,G,V,K,j,J,X,Y){var b=Math.min(g,x,P,w),z=Math.min(y,C,M,I),W=Math.max(g,x,P,w),H=Math.max(y,C,M,I),Z=W-b,Q=H-z,k=this.spriteBounds.setTo(b,z,Z,Q),et=p?p.preFX.padding:0,st=Z+et*2,rt=Q+et*2,ot=Math.abs(Math.max(st,rt)),ft=this.manager.getRenderTarget(ot),at=this.targetBounds.setTo(0,0,ft.width,ft.height);v(at,k.centerX,k.centerY),this.tempSprite=p;var vt=this.gl,At=this.renderer;At.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",At.width,At.height),this.set1i("uRoundPixels",At.config.roundPixels),this.flipProjectionMatrix(!0),p&&(this.onDrawSprite(p,ft),p.preFX.onFX(this));var Et=this.fsTarget;return this.flush(),vt.viewport(0,0,At.width,At.height),vt.bindFramebuffer(vt.FRAMEBUFFER,Et.framebuffer.webGLFramebuffer),vt.framebufferTexture2D(vt.FRAMEBUFFER,vt.COLOR_ATTACHMENT0,vt.TEXTURE_2D,Et.texture.webGLTexture,0),vt.clearColor(0,0,0,0),vt.clear(vt.COLOR_BUFFER_BIT),this.setTexture2D(Y),this.batchVert(g,y,L,B,0,X,V),this.batchVert(x,C,L,G,0,X,j),this.batchVert(P,M,N,G,0,X,J),this.batchVert(g,y,L,B,0,X,V),this.batchVert(P,M,N,G,0,X,J),this.batchVert(w,I,N,B,0,X,K),this.flush(),this.flipProjectionMatrix(!1),vt.activeTexture(vt.TEXTURE0),vt.bindTexture(vt.TEXTURE_2D,ft.texture.webGLTexture),vt.copyTexSubImage2D(vt.TEXTURE_2D,0,0,0,at.x,at.y,at.width,at.height),vt.bindFramebuffer(vt.FRAMEBUFFER,null),vt.bindTexture(vt.TEXTURE_2D,null),this.onBatch(p),this.currentShader=this.copyShader,this.onDraw(ft,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(p,g,y,x,C,P,M){y===void 0&&(y=!0),x===void 0&&(x=!0),C===void 0&&(C=!1),M===void 0&&(M=this.copyShader);var w=this.gl,I=this.tempSprite;P&&(M=this.colorMatrixShader),this.currentShader=M;var L=this.setVertexBuffer(this.quadVertexBuffer);M.bind(L,!1);var B=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",B.width,B.height),this.set1i("uRoundPixels",B.config.roundPixels),I.preFX.onFXCopy(this),this.onCopySprite(p,g,I),P&&(this.set1fv("uColorMatrix",P.getData()),this.set1f("uAlpha",P.alpha)),w.activeTexture(w.TEXTURE0),w.bindTexture(w.TEXTURE_2D,p.texture.webGLTexture),p.height>g.height)w.viewport(0,0,p.width,p.height),this.setTargetUVs(p,g);else{var N=g.height-p.height;w.viewport(0,N,p.width,p.height),this.resetUVs()}if(w.bindFramebuffer(w.FRAMEBUFFER,g.framebuffer.webGLFramebuffer),w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_2D,g.texture.webGLTexture,0),y&&(w.clearColor(0,0,0,+!x),w.clear(w.COLOR_BUFFER_BIT)),C){var G=this.renderer.currentBlendMode;this.renderer.setBlendMode(o.ERASE)}w.bufferData(w.ARRAY_BUFFER,this.quadVertexData,w.STATIC_DRAW),w.drawArrays(w.TRIANGLES,0,6),C&&this.renderer.setBlendMode(G),w.bindFramebuffer(w.FRAMEBUFFER,null)},copy:function(p,g){var y=this.gl;this.set1i("uMainSampler",0),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,p.texture.webGLTexture),y.viewport(0,0,p.width,p.height),this.setUVs(0,0,0,1,1,1,1,0),y.bindFramebuffer(y.FRAMEBUFFER,g.framebuffer.webGLFramebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,g.texture.webGLTexture,0),y.clearColor(0,0,0,0),y.clear(y.COLOR_BUFFER_BIT),y.bufferData(y.ARRAY_BUFFER,this.quadVertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),y.bindFramebuffer(y.FRAMEBUFFER,null)},blendFrames:function(p,g,y,x,C){this.manager.blendFrames(p,g,y,x,C)},blendFramesAdditive:function(p,g,y,x,C){this.manager.blendFramesAdditive(p,g,y,x,C)},drawToGame:function(p){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(p)},copyToGame:function(p){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(p)},bindAndDraw:function(p){var g=this.gl,y=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(p.texture);var x=this._tempMatrix1.loadIdentity(),C=this.targetBounds.x,P=this.targetBounds.y,M=C+p.width,w=P+p.height,I=x.getX(C,P),L=x.getX(C,w),B=x.getX(M,w),N=x.getX(M,P),G=x.getY(C,P),V=x.getY(C,w),K=x.getY(M,w),j=x.getY(M,P),J=16777215;this.batchVert(I,G,0,0,0,0,J),this.batchVert(L,V,0,1,0,0,J),this.batchVert(B,K,1,1,0,0,J),this.batchVert(I,G,0,0,0,0,J),this.batchVert(B,K,1,1,0,0,J),this.batchVert(N,j,1,0,0,0,J),y.restoreFramebuffer(!1,!0),y.currentFramebuffer||g.viewport(0,0,y.width,y.height),y.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(p){this.drawToGame(p)},setUVs:function(p,g,y,x,C,P,M,w){var I=this.quadVertexViewF32;I[2]=p,I[3]=g,I[9]=y,I[10]=x,I[16]=C,I[17]=P,I[23]=p,I[24]=g,I[30]=C,I[31]=P,I[37]=M,I[38]=w},setTargetUVs:function(p,g){var y=g.height/p.height;y>.5?y=.5-(y-.5):y=.5+(.5-y),this.setUVs(0,y,0,1+y,1,1+y,1,y)},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}});c.exports=d},81041:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(57516),r=new a({Extends:o,initialize:function(e){e.topology=5,e.batchSize=v(e,"batchSize",256),o.call(this,e)}});c.exports=r},12385:(c,m,t)=>{/** + */var o=t(83419),v=t(95540),a=t(57516),r=new o({Extends:a,initialize:function(e){e.topology=5,e.batchSize=v(e,"batchSize",256),a.call(this,e)}});c.exports=r},12385:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(57516),r=t(45561),n=t(60722),e=t(29100),i=new a({Extends:o,initialize:function(s){s.fragShader=v(s,"fragShader",r),s.vertShader=v(s,"vertShader",n),s.forceZero=!0,o.call(this,s)},boot:function(){e.prototype.boot.call(this);var h=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",h.width,h.height),this.set1i("uRoundPixels",h.config.roundPixels)}});c.exports=i},7589:(c,m,t)=>{/** + */var o=t(83419),v=t(95540),a=t(57516),r=t(45561),n=t(60722),e=t(29100),i=new o({Extends:a,initialize:function(s){s.fragShader=v(s,"fragShader",r),s.vertShader=v(s,"vertShader",n),s.forceZero=!0,a.call(this,s)},boot:function(){e.prototype.boot.call(this);var h=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",h.width,h.height),this.set1i("uRoundPixels",h.config.roundPixels)}});c.exports=i},7589:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35407),v=t(10312),o=t(83419),r=t(89422),n=t(96293),e=t(36682),i=t(95540),h=t(48247),s=t(49627),l=t(29100),f=new o({Extends:l,initialize:function(d){d.renderTarget=i(d,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),d.vertShader=i(d,"vertShader",s),d.shaders=i(d,"shaders",[{name:"Copy",fragShader:e},{name:"AddBlend",fragShader:a},{name:"LinearBlend",fragShader:h},{name:"ColorMatrix",fragShader:n}]),d.attributes=i(d,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),d.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],d.batchSize=1,l.call(this,d),this.colorMatrix=new r,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){l.prototype.boot.call(this);var u=this.shaders,d=this.renderTargets;this.copyShader=u[0],this.addShader=u[1],this.linearShader=u[2],this.colorMatrixShader=u[3],this.fullFrame1=d[0],this.fullFrame2=d[1],this.halfFrame1=d[2],this.halfFrame2=d[3]},copyFrame:function(u,d,p,g,y){p===void 0&&(p=1),g===void 0&&(g=!0),y===void 0&&(y=!0);var x=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",p),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,u.texture.webGLTexture),d?(x.viewport(0,0,d.width,d.height),x.bindFramebuffer(x.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,d.texture.webGLTexture,0)):x.viewport(0,0,u.width,u.height),g&&(y?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,d,p,g,y,x,T){p===void 0&&(p=1),g===void 0&&(g=!0),y===void 0&&(y=!0),x===void 0&&(x=!1),T===void 0&&(T=!1);var C=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",p),C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,u.texture.webGLTexture),u.height>d.height)C.viewport(0,0,u.width,u.height),this.setTargetUVs(u,d);else{var M=d.height-u.height;C.viewport(0,M,u.width,u.height)}if(C.bindFramebuffer(C.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,d.texture.webGLTexture,0),g&&(y?C.clearColor(0,0,0,0):C.clearColor(0,0,0,1),C.clear(C.COLOR_BUFFER_BIT)),x){var w=this.renderer.currentBlendMode;this.renderer.setBlendMode(v.ERASE)}T&&this.flipY(),C.bufferData(C.ARRAY_BUFFER,this.vertexData,C.STATIC_DRAW),C.drawArrays(C.TRIANGLES,0,6),x&&this.renderer.setBlendMode(w),C.bindFramebuffer(C.FRAMEBUFFER,null),C.bindTexture(C.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(u,d,p,g,y,x,T,C){T===void 0&&(T=!0),C===void 0&&(C=!0);var M=this.gl;M.bindFramebuffer(M.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),M.framebufferTexture2D(M.FRAMEBUFFER,M.COLOR_ATTACHMENT0,M.TEXTURE_2D,u.texture.webGLTexture,0),T&&(C?M.clearColor(0,0,0,0):M.clearColor(0,0,0,1),M.clear(M.COLOR_BUFFER_BIT)),M.activeTexture(M.TEXTURE0),M.bindTexture(M.TEXTURE_2D,d.texture.webGLTexture),M.copyTexSubImage2D(M.TEXTURE_2D,0,0,0,p,g,y,x),M.bindFramebuffer(M.FRAMEBUFFER,null),M.bindTexture(M.TEXTURE_2D,null)},copyToGame:function(u){var d=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,u.texture.webGLTexture),d.bufferData(d.ARRAY_BUFFER,this.vertexData,d.STATIC_DRAW),d.drawArrays(d.TRIANGLES,0,6)},drawFrame:function(u,d,p,g){p===void 0&&(p=!0),g===void 0&&(g=this.colorMatrix);var y=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",g.getData()),this.set1f("uAlpha",g.alpha),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,u.texture.webGLTexture),d?(y.viewport(0,0,d.width,d.height),y.bindFramebuffer(y.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,d.texture.webGLTexture,0)):y.viewport(0,0,u.width,u.height),p?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)},blendFrames:function(u,d,p,g,y,x){g===void 0&&(g=1),y===void 0&&(y=!0),x===void 0&&(x=this.linearShader);var T=this.gl;this.setShader(x),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",g),T.activeTexture(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,u.texture.webGLTexture),T.activeTexture(T.TEXTURE1),T.bindTexture(T.TEXTURE_2D,d.texture.webGLTexture),p?(T.bindFramebuffer(T.FRAMEBUFFER,p.framebuffer.webGLFramebuffer),T.framebufferTexture2D(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,T.TEXTURE_2D,p.texture.webGLTexture,0),T.viewport(0,0,p.width,p.height)):T.viewport(0,0,u.width,u.height),y?T.clearColor(0,0,0,0):T.clearColor(0,0,0,1),T.clear(T.COLOR_BUFFER_BIT),T.bufferData(T.ARRAY_BUFFER,this.vertexData,T.STATIC_DRAW),T.drawArrays(T.TRIANGLES,0,6),T.bindFramebuffer(T.FRAMEBUFFER,null),T.bindTexture(T.TEXTURE_2D,null)},blendFramesAdditive:function(u,d,p,g,y){this.blendFrames(u,d,p,g,y,this.addShader)},clearFrame:function(u,d){d===void 0&&(d=!0);var p=this.gl;p.viewport(0,0,u.width,u.height),p.bindFramebuffer(p.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),d?p.clearColor(0,0,0,0):p.clearColor(0,0,0,1),p.clear(p.COLOR_BUFFER_BIT);var g=this.renderer.currentFramebuffer;p.bindFramebuffer(p.FRAMEBUFFER,g.webGLFramebuffer)},setUVs:function(u,d,p,g,y,x,T,C){var M=this.vertexViewF32;M[2]=u,M[3]=d,M[6]=p,M[7]=g,M[10]=y,M[11]=x,M[14]=u,M[15]=d,M[18]=y,M[19]=x,M[22]=T,M[23]=C},setTargetUVs:function(u,d){var p=d.height/u.height;p>.5?p=.5-(p-.5):p=.5+(.5-p),this.setUVs(0,p,0,1+p,1,1+p,1,p)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});c.exports=f},36060:c=>{/** + */var o=t(35407),v=t(10312),a=t(83419),r=t(89422),n=t(96293),e=t(36682),i=t(95540),h=t(48247),s=t(49627),l=t(29100),f=new a({Extends:l,initialize:function(d){d.renderTarget=i(d,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),d.vertShader=i(d,"vertShader",s),d.shaders=i(d,"shaders",[{name:"Copy",fragShader:e},{name:"AddBlend",fragShader:o},{name:"LinearBlend",fragShader:h},{name:"ColorMatrix",fragShader:n}]),d.attributes=i(d,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),d.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],d.batchSize=1,l.call(this,d),this.colorMatrix=new r,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){l.prototype.boot.call(this);var u=this.shaders,d=this.renderTargets;this.copyShader=u[0],this.addShader=u[1],this.linearShader=u[2],this.colorMatrixShader=u[3],this.fullFrame1=d[0],this.fullFrame2=d[1],this.halfFrame1=d[2],this.halfFrame2=d[3]},copyFrame:function(u,d,p,g,y){p===void 0&&(p=1),g===void 0&&(g=!0),y===void 0&&(y=!0);var x=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",p),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,u.texture.webGLTexture),d?(x.viewport(0,0,d.width,d.height),x.bindFramebuffer(x.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,d.texture.webGLTexture,0)):x.viewport(0,0,u.width,u.height),g&&(y?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,d,p,g,y,x,C){p===void 0&&(p=1),g===void 0&&(g=!0),y===void 0&&(y=!0),x===void 0&&(x=!1),C===void 0&&(C=!1);var P=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",p),P.activeTexture(P.TEXTURE0),P.bindTexture(P.TEXTURE_2D,u.texture.webGLTexture),u.height>d.height)P.viewport(0,0,u.width,u.height),this.setTargetUVs(u,d);else{var M=d.height-u.height;P.viewport(0,M,u.width,u.height)}if(P.bindFramebuffer(P.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_2D,d.texture.webGLTexture,0),g&&(y?P.clearColor(0,0,0,0):P.clearColor(0,0,0,1),P.clear(P.COLOR_BUFFER_BIT)),x){var w=this.renderer.currentBlendMode;this.renderer.setBlendMode(v.ERASE)}C&&this.flipY(),P.bufferData(P.ARRAY_BUFFER,this.vertexData,P.STATIC_DRAW),P.drawArrays(P.TRIANGLES,0,6),x&&this.renderer.setBlendMode(w),P.bindFramebuffer(P.FRAMEBUFFER,null),P.bindTexture(P.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(u,d,p,g,y,x,C,P){C===void 0&&(C=!0),P===void 0&&(P=!0);var M=this.gl;M.bindFramebuffer(M.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),M.framebufferTexture2D(M.FRAMEBUFFER,M.COLOR_ATTACHMENT0,M.TEXTURE_2D,u.texture.webGLTexture,0),C&&(P?M.clearColor(0,0,0,0):M.clearColor(0,0,0,1),M.clear(M.COLOR_BUFFER_BIT)),M.activeTexture(M.TEXTURE0),M.bindTexture(M.TEXTURE_2D,d.texture.webGLTexture),M.copyTexSubImage2D(M.TEXTURE_2D,0,0,0,p,g,y,x),M.bindFramebuffer(M.FRAMEBUFFER,null),M.bindTexture(M.TEXTURE_2D,null)},copyToGame:function(u){var d=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,u.texture.webGLTexture),d.bufferData(d.ARRAY_BUFFER,this.vertexData,d.STATIC_DRAW),d.drawArrays(d.TRIANGLES,0,6)},drawFrame:function(u,d,p,g){p===void 0&&(p=!0),g===void 0&&(g=this.colorMatrix);var y=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",g.getData()),this.set1f("uAlpha",g.alpha),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,u.texture.webGLTexture),d?(y.viewport(0,0,d.width,d.height),y.bindFramebuffer(y.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,d.texture.webGLTexture,0)):y.viewport(0,0,u.width,u.height),p?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)},blendFrames:function(u,d,p,g,y,x){g===void 0&&(g=1),y===void 0&&(y=!0),x===void 0&&(x=this.linearShader);var C=this.gl;this.setShader(x),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",g),C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,u.texture.webGLTexture),C.activeTexture(C.TEXTURE1),C.bindTexture(C.TEXTURE_2D,d.texture.webGLTexture),p?(C.bindFramebuffer(C.FRAMEBUFFER,p.framebuffer.webGLFramebuffer),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,p.texture.webGLTexture,0),C.viewport(0,0,p.width,p.height)):C.viewport(0,0,u.width,u.height),y?C.clearColor(0,0,0,0):C.clearColor(0,0,0,1),C.clear(C.COLOR_BUFFER_BIT),C.bufferData(C.ARRAY_BUFFER,this.vertexData,C.STATIC_DRAW),C.drawArrays(C.TRIANGLES,0,6),C.bindFramebuffer(C.FRAMEBUFFER,null),C.bindTexture(C.TEXTURE_2D,null)},blendFramesAdditive:function(u,d,p,g,y){this.blendFrames(u,d,p,g,y,this.addShader)},clearFrame:function(u,d){d===void 0&&(d=!0);var p=this.gl;p.viewport(0,0,u.width,u.height),p.bindFramebuffer(p.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),d?p.clearColor(0,0,0,0):p.clearColor(0,0,0,1),p.clear(p.COLOR_BUFFER_BIT);var g=this.renderer.currentFramebuffer;p.bindFramebuffer(p.FRAMEBUFFER,g.webGLFramebuffer)},setUVs:function(u,d,p,g,y,x,C,P){var M=this.vertexViewF32;M[2]=u,M[3]=d,M[6]=p,M[7]=g,M[10]=y,M[11]=x,M[14]=u,M[15]=d,M[18]=y,M[19]=x,M[22]=C,M[23]=P},setTargetUVs:function(u,d){var p=d.height/u.height;p>.5?p=.5-(p-.5):p=.5+(.5-p),this.setUVs(0,p,0,1+p,1,1+p,1,p)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});c.exports=f},36060:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4818,67 +4818,67 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(99155),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.amount=1},onPreRender:function(n,e){n=this.getController(n),this.set1f("amount",n.amount,e)}});c.exports=r},67329:(c,m,t)=>{/** + */var o=t(83419),v=t(99155),a=t(84057),r=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:v}),this.amount=1},onPreRender:function(n,e){n=this.getController(n),this.set1f("amount",n.amount,e)}});c.exports=r},67329:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(24400),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),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(),i=this.fullFrame1,h=this.fullFrame2;this.copyFrame(n,h);for(var s=2/n.width*e.offsetX,l=2/n.height*e.offsetY,f=0;f{/** + */var o=t(83419),v=t(24400),a=t(84057),r=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:v}),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(),i=this.fullFrame1,h=this.fullFrame2;this.copyFrame(n,h);for(var s=2/n.width*e.offsetX,l=2/n.height*e.offsetY,f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(41514),o=t(51078),r=t(94328),n=t(84057),e=new a({Extends:n,initialize:function(h){n.call(this,{game:h,shaders:[{name:"Gaussian5",fragShader:v},{name:"Gaussian9",fragShader:o},{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(i){var h=this.getController(),s=this.gl,l=this.fullFrame1,f=s.getParameter(s.FRAMEBUFFER_BINDING);this.bind(this.shaders[h.quality]),s.activeTexture(s.TEXTURE0),s.viewport(0,0,i.width,i.height),this.set1i("uMainSampler",0),this.set2f("resolution",i.width,i.height),this.set1f("strength",h.strength),this.set3fv("color",h.glcolor);for(var u=0;u{/** + */var o=t(83419),v=t(41514),a=t(51078),r=t(94328),n=t(84057),e=new o({Extends:n,initialize:function(h){n.call(this,{game:h,shaders:[{name:"Gaussian5",fragShader:v},{name:"Gaussian9",fragShader:a},{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(i){var h=this.getController(),s=this.gl,l=this.fullFrame1,f=s.getParameter(s.FRAMEBUFFER_BINDING);this.bind(this.shaders[h.quality]),s.activeTexture(s.TEXTURE0),s.viewport(0,0,i.width,i.height),this.set1i("uMainSampler",0),this.set2f("resolution",i.width,i.height),this.set1f("strength",h.strength),this.set3fv("color",h.glcolor);for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(90610),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),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,i,h){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),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});c.exports=r},89428:(c,m,t)=>{/** + */var o=t(83419),v=t(90610),a=t(84057),r=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:v}),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,i,h){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),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});c.exports=r},89428:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(91899),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(n,e,i,h){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),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});c.exports=r},88904:(c,m,t)=>{/** + */var o=t(83419),v=t(91899),a=t(84057),r=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:v}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(n,e,i,h){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),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});c.exports=r},88904:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(84057),o=new a({Extends:v,initialize:function(n){v.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)}});c.exports=o},63563:(c,m,t)=>{/** + */var o=t(83419),v=t(84057),a=new o({Extends:v,initialize:function(n){v.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)}});c.exports=a},63563:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(47838),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),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(),i=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,i),this.copyToGame(i)}});c.exports=r},94045:(c,m,t)=>{/** + */var o=t(83419),v=t(47838),a=t(84057),r=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:v}),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(),i=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,i),this.copyToGame(i)}});c.exports=r},94045:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(98656),r=t(84057),n=t(70554),e=new a({Extends:r,initialize:function(h,s){var l=v(s,"quality",.1),f=v(s,"distance",10);r.call(this,{game:h,fragShader:n.setGlowQuality(o,h,l,f)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(i,h,s,l){i=this.getController(i),this.set1f("outerStrength",i.outerStrength,h),this.set1f("innerStrength",i.innerStrength,h),this.set4fv("glowColor",i.glcolor,h),this.setBoolean("knockout",i.knockout,h),s&&l&&this.set2f("resolution",s,l,h)},onDraw:function(i){this.set2f("resolution",i.width,i.height),this.bindAndDraw(i)}});c.exports=e},74088:(c,m,t)=>{/** + */var o=t(83419),v=t(95540),a=t(98656),r=t(84057),n=t(70554),e=new o({Extends:r,initialize:function(h,s){var l=v(s,"quality",.1),f=v(s,"distance",10);r.call(this,{game:h,fragShader:n.setGlowQuality(a,h,l,f)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(i,h,s,l){i=this.getController(i),this.set1f("outerStrength",i.outerStrength,h),this.set1f("innerStrength",i.innerStrength,h),this.set4fv("glowColor",i.glcolor,h),this.setBoolean("knockout",i.knockout,h),s&&l&&this.set2f("resolution",s,l,h)},onDraw:function(i){this.set2f("resolution",i.width,i.height),this.bindAndDraw(i)}});c.exports=e},74088:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(70463),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),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)}});c.exports=r},99636:(c,m,t)=>{/** + */var o=t(83419),v=t(70463),a=t(84057),r=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:v}),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)}});c.exports=r},99636:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50831),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.amount=1},onPreRender:function(n,e,i,h){n=this.getController(n),this.set1f("amount",n.amount,e),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});c.exports=r},34700:(c,m,t)=>{/** + */var o=t(83419),v=t(50831),a=t(84057),r=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:v}),this.amount=1},onPreRender:function(n,e,i,h){n=this.getController(n),this.set1f("amount",n.amount,e),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});c.exports=r},34700:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(92595),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),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 i=n.samples;this.set1i("samples",i,e),this.set1f("intensity",n.intensity,e),this.set1f("decay",n.decay,e),this.set1f("power",n.power/i,e),this.set2f("lightPosition",n.x,n.y,e),this.set4fv("color",n.glcolor,e)}});c.exports=r},91157:(c,m,t)=>{/** + */var o=t(83419),v=t(92595),a=t(84057),r=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:v}),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 i=n.samples;this.set1i("samples",i,e),this.set1f("intensity",n.intensity,e),this.set1f("decay",n.decay,e),this.set1f("power",n.power/i,e),this.set2f("lightPosition",n.x,n.y,e),this.set4fv("color",n.glcolor,e)}});c.exports=r},91157:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72464),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(n,e,i,h){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),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});c.exports=r},27797:(c,m,t)=>{/** + */var o=t(83419),v=t(72464),a=t(84057),r=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:v}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(n,e,i,h){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),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});c.exports=r},27797:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(39249),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),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)}});c.exports=r},67603:(c,m,t)=>{/** + */var o=t(83419),v=t(39249),a=t(84057),r=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:v}),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)}});c.exports=r},67603:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(2878),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(n,e){n=this.getController(n);var i=n.progress,h=n.wipeWidth,s=n.direction,l=n.axis;this.set4f("config",i,h,s,l,e),this.setBoolean("reveal",n.reveal,e)}});c.exports=r},58918:(c,m,t)=>{/** + */var o=t(83419),v=t(2878),a=t(84057),r=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:v}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(n,e){n=this.getController(n);var i=n.progress,h=n.wipeWidth,s=n.direction,l=n.axis;this.set4f("config",i,h,s,l,e),this.setBoolean("reveal",n.reveal,e)}});c.exports=r},58918:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={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)};c.exports=a},96615:(c,m,t)=>{/** + */var o={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)};c.exports=o},96615:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36060),v=t(79291),o={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)};o=v(!1,o,a),c.exports=o},35407:c=>{c.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = frame1 + frame2 * uStrength;","}"].join(` + */var o=t(36060),v=t(79291),a={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)};a=v(!1,a,o),c.exports=a},35407:c=>{c.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = frame1 + frame2 * uStrength;","}"].join(` `)},78908:c=>{c.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","precision mediump float;","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }"," gl_FragColor = mainColor;","}"].join(` `)},85191:c=>{c.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","precision mediump float;","attribute vec2 inPosition;","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}"].join(` `)},96293:c=>{c.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","varying vec2 outTexCoord;","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);"," if (uAlpha == 0.0)"," {"," gl_FragColor = c;"," return;"," }"," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }"," vec4 result;"," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];"," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);"," rgb *= result.a;"," gl_FragColor = vec4(rgb, result.a);","}"].join(` @@ -4920,36 +4920,36 @@ return new `+this.key+`(); * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({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 o=this.gl;o.isContextLost()||(this.webGLAttribLocation=o.getAttribLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});c.exports=v},26128:(c,m,t)=>{/** + */var o=t(83419),v=new o({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 a=this.gl;a.isContextLost()||(this.webGLAttribLocation=a.getAttribLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});c.exports=v},26128:(c,m,t)=>{/** * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e,i){this.webGLBuffer=null,this.gl=r,this.initialDataOrSize=n,this.bufferType=e,this.bufferUsage=i,this.createResource()},createResource:function(){if(this.initialDataOrSize!==null){var o=this.gl;if(!o.isContextLost()){var r=this.bufferType,n=o.createBuffer();this.webGLBuffer=n,o.bindBuffer(r,this.webGLBuffer),o.bufferData(r,this.initialDataOrSize,this.bufferUsage),o.bindBuffer(r,null)}}},destroy:function(){var o=this.gl;o.isContextLost()||o.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});c.exports=v},84387:(c,m,t)=>{/** + */var o=t(83419),v=new o({initialize:function(r,n,e,i){this.webGLBuffer=null,this.gl=r,this.initialDataOrSize=n,this.bufferType=e,this.bufferUsage=i,this.createResource()},createResource:function(){if(this.initialDataOrSize!==null){var a=this.gl;if(!a.isContextLost()){var r=this.bufferType,n=a.createBuffer();this.webGLBuffer=n,a.bindBuffer(r,this.webGLBuffer),a.bufferData(r,this.initialDataOrSize,this.bufferUsage),a.bindBuffer(r,null)}}},destroy:function(){var a=this.gl;a.isContextLost()||a.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});c.exports=v},84387:(c,m,t)=>{/** * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},o=new a({initialize:function(n,e,i,h,s){this.webGLFramebuffer=null,this.gl=n,this.width=e,this.height=i,this.renderTexture=h,this.addDepthStencilBuffer=!!s,this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){var n=this.renderTexture,e=0,i=r.createFramebuffer();if(this.webGLFramebuffer=i,r.bindFramebuffer(r.FRAMEBUFFER,i),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: "+(v[e]||e));if(this.addDepthStencilBuffer){var h=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,h),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,this.width,this.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,h)}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}}});c.exports=o},1482:(c,m,t)=>{/** + */var o=t(83419),v={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},a=new o({initialize:function(n,e,i,h,s){this.webGLFramebuffer=null,this.gl=n,this.width=e,this.height=i,this.renderTexture=h,this.addDepthStencilBuffer=!!s,this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){var n=this.renderTexture,e=0,i=r.createFramebuffer();if(this.webGLFramebuffer=i,r.bindFramebuffer(r.FRAMEBUFFER,i),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: "+(v[e]||e));if(this.addDepthStencilBuffer){var h=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,h),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,this.width,this.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,h)}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}}});c.exports=a},1482:(c,m,t)=>{/** * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e){this.webGLProgram=null,this.gl=r,this.vertexSource=n,this.fragmentSource=e,this.createResource()},createResource:function(){var o=this.gl;if(!o.isContextLost()){var r=o.createProgram(),n=o.createShader(o.VERTEX_SHADER),e=o.createShader(o.FRAGMENT_SHADER);o.shaderSource(n,this.vertexSource),o.shaderSource(e,this.fragmentSource),o.compileShader(n),o.compileShader(e);var i=`Shader failed: -`;if(!o.getShaderParameter(n,o.COMPILE_STATUS))throw new Error("Vertex "+i+o.getShaderInfoLog(n));if(!o.getShaderParameter(e,o.COMPILE_STATUS))throw new Error("Fragment "+i+o.getShaderInfoLog(e));if(o.attachShader(r,n),o.attachShader(r,e),o.linkProgram(r),!o.getProgramParameter(r,o.LINK_STATUS))throw new Error("Link "+i+o.getProgramInfoLog(r));o.useProgram(r),this.webGLProgram=r}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});c.exports=v},82751:(c,m,t)=>{/** + */var o=t(83419),v=new o({initialize:function(r,n,e){this.webGLProgram=null,this.gl=r,this.vertexSource=n,this.fragmentSource=e,this.createResource()},createResource:function(){var a=this.gl;if(!a.isContextLost()){var r=a.createProgram(),n=a.createShader(a.VERTEX_SHADER),e=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(n,this.vertexSource),a.shaderSource(e,this.fragmentSource),a.compileShader(n),a.compileShader(e);var i=`Shader failed: +`;if(!a.getShaderParameter(n,a.COMPILE_STATUS))throw new Error("Vertex "+i+a.getShaderInfoLog(n));if(!a.getShaderParameter(e,a.COMPILE_STATUS))throw new Error("Fragment "+i+a.getShaderInfoLog(e));if(a.attachShader(r,n),a.attachShader(r,e),a.linkProgram(r),!a.getProgramParameter(r,a.LINK_STATUS))throw new Error("Link "+i+a.getProgramInfoLog(r));a.useProgram(r),this.webGLProgram=r}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});c.exports=v},82751:(c,m,t)=>{/** * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50030),o=new a({initialize:function(n,e,i,h,s,l,f,u,d,p,g,y,x){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=n,this.mipLevel=e,this.minFilter=i,this.magFilter=h,this.wrapT=s,this.wrapS=l,this.format=f,this.pixels=u,this.width=d,this.height=p,this.pma=g??!0,this.forceSize=!!y,this.flipY=!!x,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){if(this.pixels instanceof o){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,i,h,s,l,f,u){if(!(n===0||e===0)){this.pixels=r,this.width=n,this.height=e,this.flipY=i,this.wrapS=h,this.wrapT=s,this.minFilter=l,this.magFilter=f,this.format=u;var d=this.gl;d.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,i=this.mipLevel,h=this.width,s=this.height,l=this.format,f=!1;if(e==null)r.texImage2D(r.TEXTURE_2D,i,l,h,s,0,l,r.UNSIGNED_BYTE,null),f=v(h,s);else if(e.compressed){h=e.width,s=e.height,f=e.generateMipmap;for(var u=0;u{/** + */var o=t(83419),v=t(50030),a=new o({initialize:function(n,e,i,h,s,l,f,u,d,p,g,y,x){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=n,this.mipLevel=e,this.minFilter=i,this.magFilter=h,this.wrapT=s,this.wrapS=l,this.format=f,this.pixels=u,this.width=d,this.height=p,this.pma=g??!0,this.forceSize=!!y,this.flipY=!!x,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){if(this.pixels instanceof a){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,i,h,s,l,f,u){if(!(n===0||e===0)){this.pixels=r,this.width=n,this.height=e,this.flipY=i,this.wrapS=h,this.wrapT=s,this.minFilter=l,this.magFilter=f,this.format=u;var d=this.gl;d.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,i=this.mipLevel,h=this.width,s=this.height,l=this.format,f=!1;if(e==null)r.texImage2D(r.TEXTURE_2D,i,l,h,s,0,l,r.UNSIGNED_BYTE,null),f=v(h,s);else if(e.compressed){h=e.width,s=e.height,f=e.generateMipmap;for(var u=0;u{/** * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({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 o=this.gl;o.isContextLost()||(this.webGLUniformLocation=o.getUniformLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});c.exports=v},9503:(c,m,t)=>{/** + */var o=t(83419),v=new o({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 a=this.gl;a.isContextLost()||(this.webGLUniformLocation=a.getUniformLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});c.exports=v},9503:(c,m,t)=>{/** * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={WebGLAttribLocationWrapper:t(93567),WebGLBufferWrapper:t(26128),WebGLProgramWrapper:t(1482),WebGLTextureWrapper:t(82751),WebGLFramebufferWrapper:t(84387),WebGLUniformLocationWrapper:t(57183)};c.exports=a},76531:(c,m,t)=>{/** + */var o={WebGLAttribLocationWrapper:t(93567),WebGLBufferWrapper:t(26128),WebGLProgramWrapper:t(1482),WebGLTextureWrapper:t(82751),WebGLFramebufferWrapper:t(84387),WebGLUniformLocationWrapper:t(57183)};c.exports=o},76531:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(13560),v=t(83419),o=t(50792),r=t(97480),n=t(8443),e=t(57811),i=t(74403),h=t(45818),s=t(29747),l=t(87841),f=t(86555),u=t(56583),d=t(26099),p=t(38058),g=new v({Extends:o,initialize:function(x){o.call(this),this.game=x,this.canvas,this.canvasBounds=new l,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=a.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new d(1,1),this.autoRound=!1,this.autoCenter=a.CENTER.NO_CENTER,this.orientation=a.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:s,windowResize:s,fullScreenChange:s,fullScreenError:s}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(n.BOOT,this.boot,this)},boot:function(){var y=this.game;this.canvas=y.canvas,this.fullscreen=y.device.fullscreen,this.scaleMode!==a.SCALE_MODE.RESIZE&&this.scaleMode!==a.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===a.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()),y.events.on(n.PRE_STEP,this.step,this),y.events.once(n.READY,this.refresh,this),y.events.once(n.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(y){this.getParent(y),this.getParentBounds();var x=y.width,T=y.height,C=y.scaleMode,M=y.zoom,w=y.autoRound;if(typeof x=="string")if(x.substr(-1)!=="%")x=parseInt(x,10);else{var L=this.parentSize.width;L===0&&(L=window.innerWidth);var F=parseInt(x,10)/100;x=Math.floor(L*F)}if(typeof T=="string")if(T.substr(-1)!=="%")T=parseInt(T,10);else{var O=this.parentSize.height;O===0&&(O=window.innerHeight);var N=parseInt(T,10)/100;T=Math.floor(O*N)}this.scaleMode=C,this.autoRound=w,this.autoCenter=y.autoCenter,this.resizeInterval=y.resizeInterval,w&&(x=Math.floor(x),T=Math.floor(T)),this.gameSize.setSize(x,T),M===a.ZOOM.MAX_ZOOM&&(M=this.getMaxZoom()),this.zoom=M,M!==1&&(this._resetZoom=!0),this.baseSize.setSize(x,T),w&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),y.minWidth>0&&this.displaySize.setMin(y.minWidth*M,y.minHeight*M),y.maxWidth>0&&this.displaySize.setMax(y.maxWidth*M,y.maxHeight*M),this.displaySize.setSize(x,T),(y.snapWidth>0||y.snapHeight>0)&&this.displaySize.setSnap(y.snapWidth,y.snapHeight),this.orientation=h(x,T)},getParent:function(y){var x=y.parent;if(x!==null){if(this.parent=i(x),this.parentIsWindow=this.parent===document.body,y.expandParent&&y.scaleMode!==a.SCALE_MODE.NONE){var T=this.parent.getBoundingClientRect();(this.parentIsWindow||T.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",T=this.parent.getBoundingClientRect(),!this.parentIsWindow&&T.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}y.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=i(y.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var y=this.parentSize,x=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(x.height=e(!0));var T=x.width,C=x.height;if(y.width!==T||y.height!==C)return y.setSize(T,C),!0;if(this.canvas){var M=this.canvasBounds,w=this.canvas.getBoundingClientRect();if(w.x!==M.x||w.y!==M.y)return!0}return!1},lockOrientation:function(y){var x=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return x?x.call(screen,y):!1},setParentSize:function(y,x){return this.parentSize.setSize(y,x),this.refresh()},setGameSize:function(y,x){var T=this.autoRound;T&&(y=Math.floor(y),x=Math.floor(x));var C=this.width,M=this.height;return this.gameSize.resize(y,x),this.baseSize.resize(y,x),T&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(y/x),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(C,M)},resize:function(y,x){var T=this.zoom,C=this.autoRound;C&&(y=Math.floor(y),x=Math.floor(x));var M=this.width,w=this.height;this.gameSize.resize(y,x),this.baseSize.resize(y,x),C&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(y*T,x*T),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var L=this.canvas.style,F=y*T,O=x*T;return C&&(F=Math.floor(F),O=Math.floor(O)),(F!==y||O!==x)&&(L.width=F+"px",L.height=O+"px"),this.refresh(M,w)},setZoom:function(y){return this.zoom=y,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(y,x){return y===void 0&&(y=0),x===void 0&&(x=y),this.displaySize.setSnap(y,x),this.refresh()},refresh:function(y,x){y===void 0&&(y=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 T=this.game.domContainer;if(T){this.baseSize.setCSS(T);var C=this.canvas.style,M=T.style;M.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",M.marginLeft=C.marginLeft,M.marginTop=C.marginTop}return this.emit(r.RESIZE,this.gameSize,this.baseSize,this.displaySize,y,x),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var y=h(this.width,this.height);y!==this.orientation&&(this.orientation=y,this.emit(r.ORIENTATION_CHANGE,y))}},updateScale:function(){var y=this.canvas.style,x=this.gameSize.width,T=this.gameSize.height,C,M,w=this.zoom,L=this.autoRound;if(this.scaleMode===a.SCALE_MODE.NONE)this.displaySize.setSize(x*w,T*w),C=this.displaySize.width,M=this.displaySize.height,L&&(C=Math.floor(C),M=Math.floor(M)),this._resetZoom&&(y.width=C+"px",y.height=M+"px",this._resetZoom=!1);else if(this.scaleMode===a.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),C=this.displaySize.width,M=this.displaySize.height,L&&(C=Math.floor(C),M=Math.floor(M)),this.canvas.width=C,this.canvas.height=M;else if(this.scaleMode===a.SCALE_MODE.EXPAND){this.displaySize.setSize(this.parentSize.width,this.parentSize.height),C=this.displaySize.width,M=this.displaySize.height,L&&(C=Math.floor(C),M=Math.floor(M)),y.width=C+"px",y.height=M+"px";var F=this.parentSize.width/this.gameSize.width,O=this.parentSize.height/this.gameSize.height;F=0?0:-(M.x*w.x),F=M.y>=0?0:-(M.y*w.y),O;C.width>=M.width?O=T.width:O=T.width-(M.width-C.width)*w.x;var N;return C.height>=M.height?N=T.height:N=T.height-(M.height-C.height)*w.y,x.setTo(L,F,O,N),y&&(x.width/=y.zoomX,x.height/=y.zoomY,x.centerX=y.centerX+y.scrollX,x.centerY=y.centerY+y.scrollY),x},step:function(y,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 y=this.domlisteners;window.removeEventListener("orientationchange",y.orientationChange,!1),window.removeEventListener("resize",y.windowResize,!1);var x=["webkit","moz",""];x.forEach(function(T){document.removeEventListener(T+"fullscreenchange",y.fullScreenChange,!1),document.removeEventListener(T+"fullscreenerror",y.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",y.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",y.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===a.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===a.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});c.exports=g},64743:c=>{/** + */var o=t(13560),v=t(83419),a=t(50792),r=t(97480),n=t(8443),e=t(57811),i=t(74403),h=t(45818),s=t(29747),l=t(87841),f=t(86555),u=t(56583),d=t(26099),p=t(38058),g=new v({Extends:a,initialize:function(x){a.call(this),this.game=x,this.canvas,this.canvasBounds=new l,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=o.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new d(1,1),this.autoRound=!1,this.autoCenter=o.CENTER.NO_CENTER,this.orientation=o.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:s,windowResize:s,fullScreenChange:s,fullScreenError:s}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(n.BOOT,this.boot,this)},boot:function(){var y=this.game;this.canvas=y.canvas,this.fullscreen=y.device.fullscreen,this.scaleMode!==o.SCALE_MODE.RESIZE&&this.scaleMode!==o.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===o.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()),y.events.on(n.PRE_STEP,this.step,this),y.events.once(n.READY,this.refresh,this),y.events.once(n.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(y){this.getParent(y),this.getParentBounds();var x=y.width,C=y.height,P=y.scaleMode,M=y.zoom,w=y.autoRound;if(typeof x=="string")if(x.substr(-1)!=="%")x=parseInt(x,10);else{var I=this.parentSize.width;I===0&&(I=window.innerWidth);var L=parseInt(x,10)/100;x=Math.floor(I*L)}if(typeof C=="string")if(C.substr(-1)!=="%")C=parseInt(C,10);else{var B=this.parentSize.height;B===0&&(B=window.innerHeight);var N=parseInt(C,10)/100;C=Math.floor(B*N)}this.scaleMode=P,this.autoRound=w,this.autoCenter=y.autoCenter,this.resizeInterval=y.resizeInterval,w&&(x=Math.floor(x),C=Math.floor(C)),this.gameSize.setSize(x,C),M===o.ZOOM.MAX_ZOOM&&(M=this.getMaxZoom()),this.zoom=M,M!==1&&(this._resetZoom=!0),this.baseSize.setSize(x,C),w&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),y.minWidth>0&&this.displaySize.setMin(y.minWidth*M,y.minHeight*M),y.maxWidth>0&&this.displaySize.setMax(y.maxWidth*M,y.maxHeight*M),this.displaySize.setSize(x,C),(y.snapWidth>0||y.snapHeight>0)&&this.displaySize.setSnap(y.snapWidth,y.snapHeight),this.orientation=h(x,C)},getParent:function(y){var x=y.parent;if(x!==null){if(this.parent=i(x),this.parentIsWindow=this.parent===document.body,y.expandParent&&y.scaleMode!==o.SCALE_MODE.NONE){var C=this.parent.getBoundingClientRect();(this.parentIsWindow||C.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",C=this.parent.getBoundingClientRect(),!this.parentIsWindow&&C.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}y.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=i(y.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var y=this.parentSize,x=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(x.height=e(!0));var C=x.width,P=x.height;if(y.width!==C||y.height!==P)return y.setSize(C,P),!0;if(this.canvas){var M=this.canvasBounds,w=this.canvas.getBoundingClientRect();if(w.x!==M.x||w.y!==M.y)return!0}return!1},lockOrientation:function(y){var x=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return x?x.call(screen,y):!1},setParentSize:function(y,x){return this.parentSize.setSize(y,x),this.refresh()},setGameSize:function(y,x){var C=this.autoRound;C&&(y=Math.floor(y),x=Math.floor(x));var P=this.width,M=this.height;return this.gameSize.resize(y,x),this.baseSize.resize(y,x),C&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(y/x),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(P,M)},resize:function(y,x){var C=this.zoom,P=this.autoRound;P&&(y=Math.floor(y),x=Math.floor(x));var M=this.width,w=this.height;this.gameSize.resize(y,x),this.baseSize.resize(y,x),P&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(y*C,x*C),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var I=this.canvas.style,L=y*C,B=x*C;return P&&(L=Math.floor(L),B=Math.floor(B)),(L!==y||B!==x)&&(I.width=L+"px",I.height=B+"px"),this.refresh(M,w)},setZoom:function(y){return this.zoom=y,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(y,x){return y===void 0&&(y=0),x===void 0&&(x=y),this.displaySize.setSnap(y,x),this.refresh()},refresh:function(y,x){y===void 0&&(y=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 C=this.game.domContainer;if(C){this.baseSize.setCSS(C);var P=this.canvas.style,M=C.style;M.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",M.marginLeft=P.marginLeft,M.marginTop=P.marginTop}return this.emit(r.RESIZE,this.gameSize,this.baseSize,this.displaySize,y,x),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var y=h(this.width,this.height);y!==this.orientation&&(this.orientation=y,this.emit(r.ORIENTATION_CHANGE,y))}},updateScale:function(){var y=this.canvas.style,x=this.gameSize.width,C=this.gameSize.height,P,M,w=this.zoom,I=this.autoRound;if(this.scaleMode===o.SCALE_MODE.NONE)this.displaySize.setSize(x*w,C*w),P=this.displaySize.width,M=this.displaySize.height,I&&(P=Math.floor(P),M=Math.floor(M)),this._resetZoom&&(y.width=P+"px",y.height=M+"px",this._resetZoom=!1);else if(this.scaleMode===o.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),P=this.displaySize.width,M=this.displaySize.height,I&&(P=Math.floor(P),M=Math.floor(M)),this.canvas.width=P,this.canvas.height=M;else if(this.scaleMode===o.SCALE_MODE.EXPAND){this.displaySize.setSize(this.parentSize.width,this.parentSize.height),P=this.displaySize.width,M=this.displaySize.height,I&&(P=Math.floor(P),M=Math.floor(M)),y.width=P+"px",y.height=M+"px";var L=this.parentSize.width/this.gameSize.width,B=this.parentSize.height/this.gameSize.height;L=0?0:-(M.x*w.x),L=M.y>=0?0:-(M.y*w.y),B;P.width>=M.width?B=C.width:B=C.width-(M.width-P.width)*w.x;var N;return P.height>=M.height?N=C.height:N=C.height-(M.height-P.height)*w.y,x.setTo(I,L,B,N),y&&(x.width/=y.zoomX,x.height/=y.zoomY,x.centerX=y.centerX+y.scrollX,x.centerY=y.centerY+y.scrollY),x},step:function(y,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 y=this.domlisteners;window.removeEventListener("orientationchange",y.orientationChange,!1),window.removeEventListener("resize",y.windowResize,!1);var x=["webkit","moz",""];x.forEach(function(C){document.removeEventListener(C+"fullscreenchange",y.fullScreenChange,!1),document.removeEventListener(C+"fullscreenerror",y.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",y.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",y.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===o.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===o.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});c.exports=g},64743:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4969,7 +4969,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={CENTER:t(64743),ORIENTATION:t(39218),SCALE_MODE:t(81050),ZOOM:t(80805)};c.exports=a},56139:c=>{/** + */var o={CENTER:t(64743),ORIENTATION:t(39218),SCALE_MODE:t(81050),ZOOM:t(80805)};c.exports=o},56139:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5001,15 +5001,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79291),v=t(13560),o={Center:t(64743),Events:t(97480),Orientation:t(39218),ScaleManager:t(76531),ScaleModes:t(81050),Zoom:t(80805)};o=a(!1,o,v.CENTER),o=a(!1,o,v.ORIENTATION),o=a(!1,o,v.SCALE_MODE),o=a(!1,o,v.ZOOM),c.exports=o},27397:(c,m,t)=>{/** + */var o=t(79291),v=t(13560),a={Center:t(64743),Events:t(97480),Orientation:t(39218),ScaleManager:t(76531),ScaleModes:t(81050),Zoom:t(80805)};a=o(!1,a,v.CENTER),a=o(!1,a,v.ORIENTATION),a=o(!1,a,v.SCALE_MODE),a=o(!1,a,v.ZOOM),c.exports=a},27397:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=t(35355),o=function(r){var n=r.game.config.defaultPhysicsSystem,e=a(r.settings,"physics",!1);if(!(!n&&!e)){var i=[];if(n&&i.push(v(n+"Physics")),e)for(var h in e)h=v(h.concat("Physics")),i.indexOf(h)===-1&&i.push(h);return i}};c.exports=o},52106:(c,m,t)=>{/** + */var o=t(95540),v=t(35355),a=function(r){var n=r.game.config.defaultPhysicsSystem,e=o(r.settings,"physics",!1);if(!(!n&&!e)){var i=[];if(n&&i.push(v(n+"Physics")),e)for(var h in e)h=v(h.concat("Physics")),i.indexOf(h)===-1&&i.push(h);return i}};c.exports=a},52106:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=function(o){var r=o.plugins.getDefaultScenePlugins(),n=a(o.settings,"plugins",!1);return Array.isArray(n)?n:r||[]};c.exports=v},87033:c=>{/** + */var o=t(95540),v=function(a){var r=a.plugins.getDefaultScenePlugins(),n=o(a.settings,"plugins",!1);return Array.isArray(n)?n:r||[]};c.exports=v},87033:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5017,24 +5017,24 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(2368),o=new a({initialize:function(n){this.sys=new v(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(){}});c.exports=o},60903:(c,m,t)=>{/** + */var o=t(83419),v=t(2368),a=new o({initialize:function(n){this.sys=new v(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(){}});c.exports=a},60903:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(89993),o=t(44594),r=t(8443),n=t(35154),e=t(54899),i=t(29747),h=t(97482),s=t(2368),l=new a({initialize:function(u,d){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,d){Array.isArray(d)||(d=[d]);for(var p=0;p-1&&(delete this.keys[p],this.scenes.splice(d,1),this._start.indexOf(p)>-1&&(d=this._start.indexOf(p),this._start.splice(d,1)),u.sys.destroy())}return this},bootScene:function(f){var u=f.sys,d=u.settings;u.sceneUpdate=i,f.init&&(f.init.call(f,d.data),d.status=v.INIT,d.isTransition&&u.events.emit(o.TRANSITION_INIT,d.transitionFrom,d.transitionDuration));var p;u.load&&(p=u.load,p.reset()),p&&f.preload?(f.preload.call(f),d.status=v.LOADING,p.once(e.COMPLETE,this.loadComplete,this),p.start()):this.create(f)},loadComplete:function(f){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(f.scene)},payloadComplete:function(f){this.bootScene(f.scene)},update:function(f,u){this.processQueue(),this.isProcessing=!0;for(var d=this.scenes.length-1;d>=0;d--){var p=this.scenes[d].sys;p.settings.status>v.START&&p.settings.status<=v.RUNNING&&p.step(f,u),p.scenePlugin&&p.scenePlugin._target&&p.scenePlugin.step(f,u)}},render:function(f){for(var u=0;u=v.LOADING&&d.settings.status=v.START&&g<=v.CREATING)return this;if(g>=v.RUNNING&&g<=v.SLEEPING)p.shutdown(),p.sceneUpdate=i,p.start(u);else{p.sceneUpdate=i,p.start(u);var y;if(p.load&&(y=p.load),y&&p.settings.hasOwnProperty("pack")&&(y.reset(),y.addPack({payload:p.settings.pack})))return p.settings.status=v.LOADING,y.once(e.COMPLETE,this.payloadComplete,this),y.start(),this}return this.bootScene(d),this},stop:function(f,u){var d=this.getScene(f);if(d&&!d.sys.isTransitioning()&&d.sys.settings.status!==v.SHUTDOWN){var p=d.sys.load;p&&(p.off(e.COMPLETE,this.loadComplete,this),p.off(e.COMPLETE,this.payloadComplete,this)),d.sys.shutdown(u)}return this},switch:function(f,u){var d=this.getScene(f),p=this.getScene(u);return d&&p&&d!==p&&(this.sleep(f),this.isSleeping(u)?this.wake(u):this.start(u)),this},getAt:function(f){return this.scenes[f]},getIndex:function(f){var u=this.getScene(f);return this.scenes.indexOf(u)},bringToTop:function(f){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:f,keyB:null});else{var u=this.getIndex(f);if(u!==-1&&u0){var d=this.getScene(f);this.scenes.splice(u,1),this.scenes.unshift(d)}}return this},moveDown:function(f){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:f,keyB:null});else{var u=this.getIndex(f);if(u>0){var d=u-1,p=this.getScene(f),g=this.getAt(d);this.scenes[u]=g,this.scenes[d]=p}}return this},moveUp:function(f){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:f,keyB:null});else{var u=this.getIndex(f);if(ud),0,g)}}return this},moveBelow:function(f,u){if(f===u)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:f,keyB:u});else{var d=this.getIndex(f),p=this.getIndex(u);if(d!==-1&&p!==-1&&p>d){var g=this.getAt(p);this.scenes.splice(p,1),d===0?this.scenes.unshift(g):this.scenes.splice(d-(p-1&&(delete this.keys[p],this.scenes.splice(d,1),this._start.indexOf(p)>-1&&(d=this._start.indexOf(p),this._start.splice(d,1)),u.sys.destroy())}return this},bootScene:function(f){var u=f.sys,d=u.settings;u.sceneUpdate=i,f.init&&(f.init.call(f,d.data),d.status=v.INIT,d.isTransition&&u.events.emit(a.TRANSITION_INIT,d.transitionFrom,d.transitionDuration));var p;u.load&&(p=u.load,p.reset()),p&&f.preload?(f.preload.call(f),d.status=v.LOADING,p.once(e.COMPLETE,this.loadComplete,this),p.start()):this.create(f)},loadComplete:function(f){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(f.scene)},payloadComplete:function(f){this.bootScene(f.scene)},update:function(f,u){this.processQueue(),this.isProcessing=!0;for(var d=this.scenes.length-1;d>=0;d--){var p=this.scenes[d].sys;p.settings.status>v.START&&p.settings.status<=v.RUNNING&&p.step(f,u),p.scenePlugin&&p.scenePlugin._target&&p.scenePlugin.step(f,u)}},render:function(f){for(var u=0;u=v.LOADING&&d.settings.status=v.START&&g<=v.CREATING)return this;if(g>=v.RUNNING&&g<=v.SLEEPING)p.shutdown(),p.sceneUpdate=i,p.start(u);else{p.sceneUpdate=i,p.start(u);var y;if(p.load&&(y=p.load),y&&p.settings.hasOwnProperty("pack")&&(y.reset(),y.addPack({payload:p.settings.pack})))return p.settings.status=v.LOADING,y.once(e.COMPLETE,this.payloadComplete,this),y.start(),this}return this.bootScene(d),this},stop:function(f,u){var d=this.getScene(f);if(d&&!d.sys.isTransitioning()&&d.sys.settings.status!==v.SHUTDOWN){var p=d.sys.load;p&&(p.off(e.COMPLETE,this.loadComplete,this),p.off(e.COMPLETE,this.payloadComplete,this)),d.sys.shutdown(u)}return this},switch:function(f,u){var d=this.getScene(f),p=this.getScene(u);return d&&p&&d!==p&&(this.sleep(f),this.isSleeping(u)?this.wake(u):this.start(u)),this},getAt:function(f){return this.scenes[f]},getIndex:function(f){var u=this.getScene(f);return this.scenes.indexOf(u)},bringToTop:function(f){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:f,keyB:null});else{var u=this.getIndex(f);if(u!==-1&&u0){var d=this.getScene(f);this.scenes.splice(u,1),this.scenes.unshift(d)}}return this},moveDown:function(f){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:f,keyB:null});else{var u=this.getIndex(f);if(u>0){var d=u-1,p=this.getScene(f),g=this.getAt(d);this.scenes[u]=g,this.scenes[d]=p}}return this},moveUp:function(f){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:f,keyB:null});else{var u=this.getIndex(f);if(ud),0,g)}}return this},moveBelow:function(f,u){if(f===u)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:f,keyB:u});else{var d=this.getIndex(f),p=this.getIndex(u);if(d!==-1&&p!==-1&&p>d){var g=this.getAt(p);this.scenes.splice(p,1),d===0?this.scenes.unshift(g):this.scenes.splice(d-(p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(44594),r=t(95540),n=t(37277),e=new v({initialize:function(h){this.scene=h,this.systems=h.sys,this.settings=h.sys.settings,this.key=h.sys.settings.key,this.manager=h.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,h.sys.events.once(o.BOOT,this.boot,this),h.sys.events.on(o.START,this.pluginStart,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(o.SHUTDOWN,this.shutdown,this)},start:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",i,h),this},restart:function(i){var h=this.key;return this.manager.queueOp("stop",h),this.manager.queueOp("start",h,i),this},transition:function(i){i===void 0&&(i={});var h=r(i,"target",!1),s=this.manager.getScene(h);if(!h||!this.checkValidTransition(s))return!1;var l=r(i,"duration",1e3);this._elapsed=0,this._target=s,this._duration=l,this._willSleep=r(i,"sleep",!1),this._willRemove=r(i,"remove",!1);var f=r(i,"onUpdate",null);f&&(this._onUpdate=f,this._onUpdateScope=r(i,"onUpdateScope",this.scene));var u=r(i,"allowInput",!1);this.settings.transitionAllowInput=u;var d=s.sys.settings;d.isTransition=!0,d.transitionFrom=this.scene,d.transitionDuration=l,d.transitionAllowInput=u,r(i,"moveAbove",!1)?this.manager.moveAbove(this.key,h):r(i,"moveBelow",!1)&&this.manager.moveBelow(this.key,h),s.sys.isSleeping()?s.sys.wake(r(i,"data")):this.manager.start(h,r(i,"data"));var p=r(i,"onStart",null),g=r(i,"onStartScope",this.scene);return p&&p.call(g,this.scene,s,l),this.systems.events.emit(o.TRANSITION_OUT,s,l),!0},checkValidTransition:function(i){return!(!i||i.sys.isActive()||i.sys.isTransitioning()||i===this.scene||this.systems.isTransitioning())},step:function(i,h){this._elapsed+=h,this.transitionProgress=a(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var i=this._target.sys,h=this._target.sys.settings;i.events.emit(o.TRANSITION_COMPLETE,this.scene),h.isTransition=!1,h.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(i,h,s,l){return this.manager.add(i,h,s,l)},launch:function(i,h){return i&&i!==this.key&&this.manager.queueOp("start",i,h),this},run:function(i,h){return i&&i!==this.key&&this.manager.queueOp("run",i,h),this},pause:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("pause",i,h),this},resume:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("resume",i,h),this},sleep:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("sleep",i,h),this},wake:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("wake",i,h),this},switch:function(i){return i!==this.key&&this.manager.queueOp("switch",this.key,i),this},stop:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("stop",i,h),this},setActive:function(i,h,s){h===void 0&&(h=this.key);var l=this.manager.getScene(h);return l&&l.sys.setActive(i,s),this},setVisible:function(i,h){h===void 0&&(h=this.key);var s=this.manager.getScene(h);return s&&s.sys.setVisible(i),this},isSleeping:function(i){return i===void 0&&(i=this.key),this.manager.isSleeping(i)},isActive:function(i){return i===void 0&&(i=this.key),this.manager.isActive(i)},isPaused:function(i){return i===void 0&&(i=this.key),this.manager.isPaused(i)},isVisible:function(i){return i===void 0&&(i=this.key),this.manager.isVisible(i)},swapPosition:function(i,h){return h===void 0&&(h=this.key),i!==h&&this.manager.swapPosition(i,h),this},moveAbove:function(i,h){return h===void 0&&(h=this.key),i!==h&&this.manager.moveAbove(i,h),this},moveBelow:function(i,h){return h===void 0&&(h=this.key),i!==h&&this.manager.moveBelow(i,h),this},remove:function(i){return i===void 0&&(i=this.key),this.manager.remove(i),this},moveUp:function(i){return i===void 0&&(i=this.key),this.manager.moveUp(i),this},moveDown:function(i){return i===void 0&&(i=this.key),this.manager.moveDown(i),this},bringToTop:function(i){return i===void 0&&(i=this.key),this.manager.bringToTop(i),this},sendToBack:function(i){return i===void 0&&(i=this.key),this.manager.sendToBack(i),this},get:function(i){return this.manager.getScene(i)},getStatus:function(i){var h=this.manager.getScene(i);if(h)return h.sys.getStatus()},getIndex:function(i){return i===void 0&&(i=this.key),this.manager.getIndex(i)},shutdown:function(){var i=this.systems.events;i.off(o.SHUTDOWN,this.shutdown,this),i.off(o.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});n.register("ScenePlugin",e,"scenePlugin"),c.exports=e},55681:(c,m,t)=>{/** + */var o=t(45319),v=t(83419),a=t(44594),r=t(95540),n=t(37277),e=new v({initialize:function(h){this.scene=h,this.systems=h.sys,this.settings=h.sys.settings,this.key=h.sys.settings.key,this.manager=h.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,h.sys.events.once(a.BOOT,this.boot,this),h.sys.events.on(a.START,this.pluginStart,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(a.SHUTDOWN,this.shutdown,this)},start:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",i,h),this},restart:function(i){var h=this.key;return this.manager.queueOp("stop",h),this.manager.queueOp("start",h,i),this},transition:function(i){i===void 0&&(i={});var h=r(i,"target",!1),s=this.manager.getScene(h);if(!h||!this.checkValidTransition(s))return!1;var l=r(i,"duration",1e3);this._elapsed=0,this._target=s,this._duration=l,this._willSleep=r(i,"sleep",!1),this._willRemove=r(i,"remove",!1);var f=r(i,"onUpdate",null);f&&(this._onUpdate=f,this._onUpdateScope=r(i,"onUpdateScope",this.scene));var u=r(i,"allowInput",!1);this.settings.transitionAllowInput=u;var d=s.sys.settings;d.isTransition=!0,d.transitionFrom=this.scene,d.transitionDuration=l,d.transitionAllowInput=u,r(i,"moveAbove",!1)?this.manager.moveAbove(this.key,h):r(i,"moveBelow",!1)&&this.manager.moveBelow(this.key,h),s.sys.isSleeping()?s.sys.wake(r(i,"data")):this.manager.start(h,r(i,"data"));var p=r(i,"onStart",null),g=r(i,"onStartScope",this.scene);return p&&p.call(g,this.scene,s,l),this.systems.events.emit(a.TRANSITION_OUT,s,l),!0},checkValidTransition:function(i){return!(!i||i.sys.isActive()||i.sys.isTransitioning()||i===this.scene||this.systems.isTransitioning())},step:function(i,h){this._elapsed+=h,this.transitionProgress=o(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var i=this._target.sys,h=this._target.sys.settings;i.events.emit(a.TRANSITION_COMPLETE,this.scene),h.isTransition=!1,h.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(i,h,s,l){return this.manager.add(i,h,s,l)},launch:function(i,h){return i&&i!==this.key&&this.manager.queueOp("start",i,h),this},run:function(i,h){return i&&i!==this.key&&this.manager.queueOp("run",i,h),this},pause:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("pause",i,h),this},resume:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("resume",i,h),this},sleep:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("sleep",i,h),this},wake:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("wake",i,h),this},switch:function(i){return i!==this.key&&this.manager.queueOp("switch",this.key,i),this},stop:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("stop",i,h),this},setActive:function(i,h,s){h===void 0&&(h=this.key);var l=this.manager.getScene(h);return l&&l.sys.setActive(i,s),this},setVisible:function(i,h){h===void 0&&(h=this.key);var s=this.manager.getScene(h);return s&&s.sys.setVisible(i),this},isSleeping:function(i){return i===void 0&&(i=this.key),this.manager.isSleeping(i)},isActive:function(i){return i===void 0&&(i=this.key),this.manager.isActive(i)},isPaused:function(i){return i===void 0&&(i=this.key),this.manager.isPaused(i)},isVisible:function(i){return i===void 0&&(i=this.key),this.manager.isVisible(i)},swapPosition:function(i,h){return h===void 0&&(h=this.key),i!==h&&this.manager.swapPosition(i,h),this},moveAbove:function(i,h){return h===void 0&&(h=this.key),i!==h&&this.manager.moveAbove(i,h),this},moveBelow:function(i,h){return h===void 0&&(h=this.key),i!==h&&this.manager.moveBelow(i,h),this},remove:function(i){return i===void 0&&(i=this.key),this.manager.remove(i),this},moveUp:function(i){return i===void 0&&(i=this.key),this.manager.moveUp(i),this},moveDown:function(i){return i===void 0&&(i=this.key),this.manager.moveDown(i),this},bringToTop:function(i){return i===void 0&&(i=this.key),this.manager.bringToTop(i),this},sendToBack:function(i){return i===void 0&&(i=this.key),this.manager.sendToBack(i),this},get:function(i){return this.manager.getScene(i)},getStatus:function(i){var h=this.manager.getScene(i);if(h)return h.sys.getStatus()},getIndex:function(i){return i===void 0&&(i=this.key),this.manager.getIndex(i)},shutdown:function(){var i=this.systems.events;i.off(a.SHUTDOWN,this.shutdown,this),i.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});n.register("ScenePlugin",e,"scenePlugin"),c.exports=e},55681:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(89993),v=t(35154),o=t(46975),r=t(87033),n={create:function(e){return typeof e=="string"?e={key:e}:e===void 0&&(e={}),{status:a.PENDING,key:v(e,"key",""),active:v(e,"active",!1),visible:v(e,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:v(e,"pack",!1),cameras:v(e,"cameras",null),map:v(e,"map",o(r,v(e,"mapAdd",{}))),physics:v(e,"physics",{}),loader:v(e,"loader",{}),plugins:v(e,"plugins",!1),input:v(e,"input",{})}}};c.exports=n},2368:(c,m,t)=>{/** + */var o=t(89993),v=t(35154),a=t(46975),r=t(87033),n={create:function(e){return typeof e=="string"?e={key:e}:e===void 0&&(e={}),{status:o.PENDING,key:v(e,"key",""),active:v(e,"active",!1),visible:v(e,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:v(e,"pack",!1),cameras:v(e,"cameras",null),map:v(e,"map",a(r,v(e,"mapAdd",{}))),physics:v(e,"physics",{}),loader:v(e,"loader",{}),plugins:v(e,"plugins",!1),input:v(e,"input",{})}}};c.exports=n},2368:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(89993),o=t(42363),r=t(44594),n=t(27397),e=t(52106),i=t(29747),h=t(55681),s=new a({initialize:function(f,u){this.scene=f,this.game,this.renderer,this.config=u,this.settings=h.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=i},init:function(l){this.settings.status=v.INIT,this.sceneUpdate=i,this.game=l,this.renderer=l.renderer,this.canvas=l.canvas,this.context=l.context;var f=l.plugins;this.plugins=f,f.addToScene(this,o.Global,[o.CoreScene,e(this),n(this)]),this.events.emit(r.BOOT,this),this.settings.isBooted=!0},step:function(l,f){var u=this.events;u.emit(r.PRE_UPDATE,l,f),u.emit(r.UPDATE,l,f),this.sceneUpdate.call(this.scene,l,f),u.emit(r.POST_UPDATE,l,f)},render:function(l){var f=this.displayList;f.depthSort(),this.events.emit(r.PRE_RENDER,l),this.cameras.render(l,f),this.events.emit(r.RENDER,l)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(l){var f=this.settings,u=this.getStatus();return u!==v.CREATING&&u!==v.RUNNING?console.warn("Cannot pause non-running Scene",f.key):this.settings.active&&(f.status=v.PAUSED,f.active=!1,this.events.emit(r.PAUSE,this,l)),this},resume:function(l){var f=this.events,u=this.settings;return this.settings.active||(u.status=v.RUNNING,u.active=!0,f.emit(r.RESUME,this,l)),this},sleep:function(l){var f=this.settings,u=this.getStatus();return u!==v.CREATING&&u!==v.RUNNING?console.warn("Cannot sleep non-running Scene",f.key):(f.status=v.SLEEPING,f.active=!1,f.visible=!1,this.events.emit(r.SLEEP,this,l)),this},wake:function(l){var f=this.events,u=this.settings;return u.status=v.RUNNING,u.active=!0,u.visible=!0,f.emit(r.WAKE,this,l),u.isTransition&&f.emit(r.TRANSITION_WAKE,u.transitionFrom,u.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var l=this.settings.status;return l>v.PENDING&&l<=v.RUNNING},isSleeping:function(){return this.settings.status===v.SLEEPING},isActive:function(){return this.settings.status===v.RUNNING},isPaused:function(){return this.settings.status===v.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(l){return this.settings.visible=l,this},setActive:function(l,f){return l?this.resume(f):this.pause(f)},start:function(l){var f=this.events,u=this.settings;l&&(u.data=l),u.status=v.START,u.active=!0,u.visible=!0,f.emit(r.START,this),f.emit(r.READY,this,l)},shutdown:function(l){var f=this.events,u=this.settings;f.off(r.TRANSITION_INIT),f.off(r.TRANSITION_START),f.off(r.TRANSITION_COMPLETE),f.off(r.TRANSITION_OUT),u.status=v.SHUTDOWN,u.active=!1,u.visible=!1,f.emit(r.SHUTDOWN,this,l)},destroy:function(){var l=this.events,f=this.settings;f.status=v.DESTROYED,f.active=!1,f.visible=!1,l.emit(r.DESTROY,this),l.removeAllListeners();for(var u=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],d=0;d{/** + */var o=t(83419),v=t(89993),a=t(42363),r=t(44594),n=t(27397),e=t(52106),i=t(29747),h=t(55681),s=new o({initialize:function(f,u){this.scene=f,this.game,this.renderer,this.config=u,this.settings=h.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=i},init:function(l){this.settings.status=v.INIT,this.sceneUpdate=i,this.game=l,this.renderer=l.renderer,this.canvas=l.canvas,this.context=l.context;var f=l.plugins;this.plugins=f,f.addToScene(this,a.Global,[a.CoreScene,e(this),n(this)]),this.events.emit(r.BOOT,this),this.settings.isBooted=!0},step:function(l,f){var u=this.events;u.emit(r.PRE_UPDATE,l,f),u.emit(r.UPDATE,l,f),this.sceneUpdate.call(this.scene,l,f),u.emit(r.POST_UPDATE,l,f)},render:function(l){var f=this.displayList;f.depthSort(),this.events.emit(r.PRE_RENDER,l),this.cameras.render(l,f),this.events.emit(r.RENDER,l)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(l){var f=this.settings,u=this.getStatus();return u!==v.CREATING&&u!==v.RUNNING?console.warn("Cannot pause non-running Scene",f.key):this.settings.active&&(f.status=v.PAUSED,f.active=!1,this.events.emit(r.PAUSE,this,l)),this},resume:function(l){var f=this.events,u=this.settings;return this.settings.active||(u.status=v.RUNNING,u.active=!0,f.emit(r.RESUME,this,l)),this},sleep:function(l){var f=this.settings,u=this.getStatus();return u!==v.CREATING&&u!==v.RUNNING?console.warn("Cannot sleep non-running Scene",f.key):(f.status=v.SLEEPING,f.active=!1,f.visible=!1,this.events.emit(r.SLEEP,this,l)),this},wake:function(l){var f=this.events,u=this.settings;return u.status=v.RUNNING,u.active=!0,u.visible=!0,f.emit(r.WAKE,this,l),u.isTransition&&f.emit(r.TRANSITION_WAKE,u.transitionFrom,u.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var l=this.settings.status;return l>v.PENDING&&l<=v.RUNNING},isSleeping:function(){return this.settings.status===v.SLEEPING},isActive:function(){return this.settings.status===v.RUNNING},isPaused:function(){return this.settings.status===v.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(l){return this.settings.visible=l,this},setActive:function(l,f){return l?this.resume(f):this.pause(f)},start:function(l){var f=this.events,u=this.settings;l&&(u.data=l),u.status=v.START,u.active=!0,u.visible=!0,f.emit(r.START,this),f.emit(r.READY,this,l)},shutdown:function(l){var f=this.events,u=this.settings;f.off(r.TRANSITION_INIT),f.off(r.TRANSITION_START),f.off(r.TRANSITION_COMPLETE),f.off(r.TRANSITION_OUT),u.status=v.SHUTDOWN,u.active=!1,u.visible=!1,f.emit(r.SHUTDOWN,this,l)},destroy:function(){var l=this.events,f=this.settings;f.status=v.DESTROYED,f.active=!1,f.visible=!1,l.emit(r.DESTROY,this),l.removeAllListeners();for(var u=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5134,22 +5134,22 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(89993),v=t(79291),o={Events:t(44594),GetPhysicsPlugins:t(27397),GetScenePlugins:t(52106),SceneManager:t(60903),ScenePlugin:t(52209),Settings:t(55681),Systems:t(2368)};o=v(!1,o,a),c.exports=o},30341:(c,m,t)=>{/** + */var o=t(89993),v=t(79291),a={Events:t(44594),GetPhysicsPlugins:t(27397),GetScenePlugins:t(52106),SceneManager:t(60903),ScenePlugin:t(52209),Settings:t(55681),Systems:t(2368)};a=v(!1,a,o),c.exports=a},30341:(c,m,t)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(14463),r=t(79291),n=t(29747),e=new a({Extends:v,initialize:function(h,s,l){v.call(this),this.manager=h,this.key=s,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,l),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(i){return!i||!i.name||typeof i.name!="string"?!1:this.markers[i.name]?(console.error("addMarker "+i.name+" already exists in Sound"),!1):(i=r(!0,{name:"",start:0,duration:this.totalDuration-(i.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},i),this.markers[i.name]=i,!0)},updateMarker:function(i){return!i||!i.name||typeof i.name!="string"?!1:this.markers[i.name]?(this.markers[i.name]=r(!0,this.markers[i.name],i),!0):(console.warn("Audio Marker: "+i.name+" missing in Sound: "+this.key),!1)},removeMarker:function(i){var h=this.markers[i];return h?(this.markers[i]=null,h):null},play:function(i,h){if(i===void 0&&(i=""),typeof i=="object"&&(h=i,i=""),typeof i!="string")return!1;if(!i)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[i])return console.warn("Marker: "+i+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[i],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=r(this.currentConfig,h),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 i=1.0005777895065548,h=this.currentConfig.detune+this.manager.detune,s=Math.pow(i,h);this.totalRate=this.currentConfig.rate*this.manager.rate*s},destroy:function(){this.pendingRemove||(this.stop(),this.emit(o.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});c.exports=e},85034:(c,m,t)=>{/** + */var o=t(83419),v=t(50792),a=t(14463),r=t(79291),n=t(29747),e=new o({Extends:v,initialize:function(h,s,l){v.call(this),this.manager=h,this.key=s,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,l),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(i){return!i||!i.name||typeof i.name!="string"?!1:this.markers[i.name]?(console.error("addMarker "+i.name+" already exists in Sound"),!1):(i=r(!0,{name:"",start:0,duration:this.totalDuration-(i.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},i),this.markers[i.name]=i,!0)},updateMarker:function(i){return!i||!i.name||typeof i.name!="string"?!1:this.markers[i.name]?(this.markers[i.name]=r(!0,this.markers[i.name],i),!0):(console.warn("Audio Marker: "+i.name+" missing in Sound: "+this.key),!1)},removeMarker:function(i){var h=this.markers[i];return h?(this.markers[i]=null,h):null},play:function(i,h){if(i===void 0&&(i=""),typeof i=="object"&&(h=i,i=""),typeof i!="string")return!1;if(!i)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[i])return console.warn("Marker: "+i+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[i],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=r(this.currentConfig,h),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 i=1.0005777895065548,h=this.currentConfig.detune+this.manager.detune,s=Math.pow(i,h);this.totalRate=this.currentConfig.rate*this.manager.rate*s},destroy:function(){this.pendingRemove||(this.stop(),this.emit(a.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});c.exports=e},85034:(c,m,t)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(41786),o=t(50792),r=t(14463),n=t(8443),e=t(46710),i=t(58731),h=t(29747),s=t(26099),l=new a({Extends:o,initialize:function(u){o.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 s,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:h,addAudioSprite:function(f,u){u===void 0&&(u={});var d=this.add(f,u);d.spritemap=this.jsonCache.get(f).spritemap;for(var p in d.spritemap)if(d.spritemap.hasOwnProperty(p)){var g=v(u),y=d.spritemap[p];g.loop=y.hasOwnProperty("loop")?y.loop:!1,d.addMarker({name:p,start:y.start,duration:y.end-y.start,config:g})}return d},get:function(f){return i(this.sounds,"key",f)},getAll:function(f){return f?e(this.sounds,"key",f):e(this.sounds)},getAllPlaying:function(){return e(this.sounds,"isPlaying",!0)},play:function(f,u){var d=this.add(f);return d.once(r.COMPLETE,d.destroy,d),u?u.name?(d.addMarker(u),d.play(u.name)):d.play(u):d.play()},playAudioSprite:function(f,u,d){var p=this.addAudioSprite(f);return p.once(r.COMPLETE,p.destroy,p),p.play(u,d)},remove:function(f){var u=this.sounds.indexOf(f);return u!==-1?(f.destroy(),this.sounds.splice(u,1),!0):!1},removeAll:function(){this.sounds.forEach(function(f){f.destroy()}),this.sounds.length=0},removeByKey:function(f){for(var u=0,d=this.sounds.length-1;d>=0;d--){var p=this.sounds[d];p.key===f&&(p.destroy(),this.sounds.splice(d,1),u++)}return u},pauseAll:function(){this.forEachActiveSound(function(f){f.pause()}),this.emit(r.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(f){f.resume()}),this.emit(r.RESUME_ALL,this)},setListenerPosition:h,stopAll:function(){this.forEachActiveSound(function(f){f.stop()}),this.emit(r.STOP_ALL,this)},stopByKey:function(f){var u=0;return this.getAll(f).forEach(function(d){d.stop()&&u++}),u},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(f,u){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(r.UNLOCKED,this));for(var d=this.sounds.length-1;d>=0;d--)this.sounds[d].pendingRemove&&this.sounds.splice(d,1);this.sounds.forEach(function(p){p.update(f,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(f,u){var d=this;this.sounds.forEach(function(p,g){p&&!p.pendingRemove&&f.call(u||d,p,g,d.sounds)})},setRate:function(f){return this.rate=f,this},rate:{get:function(){return this._rate},set:function(f){this._rate=f,this.forEachActiveSound(function(u){u.calculateRate()}),this.emit(r.GLOBAL_RATE,this,f)}},setDetune:function(f){return this.detune=f,this},detune:{get:function(){return this._detune},set:function(f){this._detune=f,this.forEachActiveSound(function(u){u.calculateRate()}),this.emit(r.GLOBAL_DETUNE,this,f)}}});c.exports=l},14747:(c,m,t)=>{/** + */var o=t(83419),v=t(41786),a=t(50792),r=t(14463),n=t(8443),e=t(46710),i=t(58731),h=t(29747),s=t(26099),l=new o({Extends:a,initialize:function(u){a.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 s,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:h,addAudioSprite:function(f,u){u===void 0&&(u={});var d=this.add(f,u);d.spritemap=this.jsonCache.get(f).spritemap;for(var p in d.spritemap)if(d.spritemap.hasOwnProperty(p)){var g=v(u),y=d.spritemap[p];g.loop=y.hasOwnProperty("loop")?y.loop:!1,d.addMarker({name:p,start:y.start,duration:y.end-y.start,config:g})}return d},get:function(f){return i(this.sounds,"key",f)},getAll:function(f){return f?e(this.sounds,"key",f):e(this.sounds)},getAllPlaying:function(){return e(this.sounds,"isPlaying",!0)},play:function(f,u){var d=this.add(f);return d.once(r.COMPLETE,d.destroy,d),u?u.name?(d.addMarker(u),d.play(u.name)):d.play(u):d.play()},playAudioSprite:function(f,u,d){var p=this.addAudioSprite(f);return p.once(r.COMPLETE,p.destroy,p),p.play(u,d)},remove:function(f){var u=this.sounds.indexOf(f);return u!==-1?(f.destroy(),this.sounds.splice(u,1),!0):!1},removeAll:function(){this.sounds.forEach(function(f){f.destroy()}),this.sounds.length=0},removeByKey:function(f){for(var u=0,d=this.sounds.length-1;d>=0;d--){var p=this.sounds[d];p.key===f&&(p.destroy(),this.sounds.splice(d,1),u++)}return u},pauseAll:function(){this.forEachActiveSound(function(f){f.pause()}),this.emit(r.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(f){f.resume()}),this.emit(r.RESUME_ALL,this)},setListenerPosition:h,stopAll:function(){this.forEachActiveSound(function(f){f.stop()}),this.emit(r.STOP_ALL,this)},stopByKey:function(f){var u=0;return this.getAll(f).forEach(function(d){d.stop()&&u++}),u},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(f,u){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(r.UNLOCKED,this));for(var d=this.sounds.length-1;d>=0;d--)this.sounds[d].pendingRemove&&this.sounds.splice(d,1);this.sounds.forEach(function(p){p.update(f,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(f,u){var d=this;this.sounds.forEach(function(p,g){p&&!p.pendingRemove&&f.call(u||d,p,g,d.sounds)})},setRate:function(f){return this.rate=f,this},rate:{get:function(){return this._rate},set:function(f){this._rate=f,this.forEachActiveSound(function(u){u.calculateRate()}),this.emit(r.GLOBAL_RATE,this,f)}},setDetune:function(f){return this.detune=f,this},detune:{get:function(){return this._detune},set:function(f){this._detune=f,this.forEachActiveSound(function(u){u.calculateRate()}),this.emit(r.GLOBAL_DETUNE,this,f)}}});c.exports=l},14747:(c,m,t)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(33684),v=t(25960),o=t(57490),r={create:function(n){var e=n.config.audio,i=n.device.audio;return e.noAudio||!i.webAudio&&!i.audioData?new v(n):i.webAudio&&!e.disableWebAudio?new o(n):new a(n)}};c.exports=r},19723:c=>{/** + */var o=t(33684),v=t(25960),a=t(57490),r={create:function(n){var e=n.config.audio,i=n.device.audio;return e.noAudio||!i.webAudio&&!i.audioData?new v(n):i.webAudio&&!e.disableWebAudio?new a(n):new o(n)}};c.exports=r},19723:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5254,12 +5254,12 @@ return new `+this.key+`(); * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(30341),v=t(83419),o=t(14463),r=t(45319),n=new v({Extends:a,initialize:function(i,h,s){if(s===void 0&&(s={}),this.tags=i.game.cache.audio.get(h),!this.tags)throw new Error('No cached audio asset with key "'+h);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,a.call(this,i,h,s)},play:function(e,i){return this.manager.isLocked(this,"play",[e,i])||!a.prototype.play.call(this,e,i)||!this.pickAndPlayAudioTag()?!1:(this.emit(o.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!a.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(o.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!a.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(o.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!a.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(o.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var e=this.currentConfig.seek,i=this.currentConfig.delay,h=(this.currentMarker?this.currentMarker.start:0)+e;return this.previousTime=h,this.audio.currentTime=h,this.applyConfig(),i===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+i*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var e=0;e0){this.startTime=h-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-h),s=this.audio.currentTime):s=h){this.reset(),this.stopAndReleaseAudioTag(),this.emit(o.COMPLETE,this);return}this.previousTime=s}},destroy:function(){a.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(){a.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(o.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(o.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,o.RATE,e)&&(this.calculateRate(),this.emit(o.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,o.DETUNE,e)&&(this.calculateRate(),this.emit(o.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(o.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(o.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(o.PAN,this,e)}},setPan:function(e){return this.pan=e,this}});c.exports=n},33684:(c,m,t)=>{/** + */var o=t(30341),v=t(83419),a=t(14463),r=t(45319),n=new v({Extends:o,initialize:function(i,h,s){if(s===void 0&&(s={}),this.tags=i.game.cache.audio.get(h),!this.tags)throw new Error('No cached audio asset with key "'+h);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,o.call(this,i,h,s)},play:function(e,i){return this.manager.isLocked(this,"play",[e,i])||!o.prototype.play.call(this,e,i)||!this.pickAndPlayAudioTag()?!1:(this.emit(a.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!o.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(a.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!o.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(a.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!o.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(a.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var e=this.currentConfig.seek,i=this.currentConfig.delay,h=(this.currentMarker?this.currentMarker.start:0)+e;return this.previousTime=h,this.audio.currentTime=h,this.applyConfig(),i===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+i*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var e=0;e0){this.startTime=h-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-h),s=this.audio.currentTime):s=h){this.reset(),this.stopAndReleaseAudioTag(),this.emit(a.COMPLETE,this);return}this.previousTime=s}},destroy:function(){o.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(){o.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(a.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(a.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,a.RATE,e)&&(this.calculateRate(),this.emit(a.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,a.DETUNE,e)&&(this.calculateRate(),this.emit(a.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(a.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(a.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(a.PAN,this,e)}},setPan:function(e){return this.pan=e,this}});c.exports=n},33684:(c,m,t)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(85034),v=t(83419),o=t(14463),r=t(64895),n=new v({Extends:a,initialize:function(i){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,a.call(this,i)},add:function(e,i){var h=new r(this,e,i);return this.sounds.push(h),h},unlock:function(){this.locked=!1;var e=this;if(this.game.cache.audio.entries.each(function(l,f){for(var u=0;u{/** + */var o=t(85034),v=t(83419),a=t(14463),r=t(64895),n=new v({Extends:o,initialize:function(i){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,o.call(this,i)},add:function(e,i){var h=new r(this,e,i);return this.sounds.push(h),h},unlock:function(){this.locked=!1;var e=this;if(this.game.cache.audio.entries.each(function(l,f){for(var u=0;u{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. @@ -5269,47 +5269,47 @@ return new `+this.key+`(); * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(30341),v=t(83419),o=t(50792),r=t(79291),n=t(29747),e=function(){return!1},i=function(){return null},h=function(){return this},s=new v({Extends:o,initialize:function(f,u,d){d===void 0&&(d={}),o.call(this),this.manager=f,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},d),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:i,play:e,pause:e,resume:e,stop:e,setMute:h,setVolume:h,setRate:h,setDetune:h,setSeek:h,setLoop:h,setPan:h,applyConfig:i,resetConfig:i,update:n,calculateRate:i,destroy:function(){a.prototype.destroy.call(this)}});c.exports=s},25960:(c,m,t)=>{/** + */var o=t(30341),v=t(83419),a=t(50792),r=t(79291),n=t(29747),e=function(){return!1},i=function(){return null},h=function(){return this},s=new v({Extends:a,initialize:function(f,u,d){d===void 0&&(d={}),a.call(this),this.manager=f,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},d),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:i,play:e,pause:e,resume:e,stop:e,setMute:h,setVolume:h,setRate:h,setDetune:h,setSeek:h,setLoop:h,setPan:h,applyConfig:i,resetConfig:i,update:n,calculateRate:i,destroy:function(){o.prototype.destroy.call(this)}});c.exports=s},25960:(c,m,t)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(85034),v=t(83419),o=t(50792),r=t(4603),n=t(29747),e=new v({Extends:o,initialize:function(h){o.call(this),this.game=h,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(i,h){var s=new r(this,i,h);return this.sounds.push(s),s},addAudioSprite:function(i,h){var s=this.add(i,h);return s.spritemap={},s},get:function(i){return a.prototype.get.call(this,i)},getAll:function(i){return a.prototype.getAll.call(this,i)},play:function(i,h){return!1},playAudioSprite:function(i,h,s){return!1},remove:function(i){return a.prototype.remove.call(this,i)},removeAll:function(){return a.prototype.removeAll.call(this)},removeByKey:function(i){return a.prototype.removeByKey.call(this,i)},stopByKey:function(i){return a.prototype.stopByKey.call(this,i)},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(i,h){a.prototype.forEachActiveSound.call(this,i,h)},destroy:function(){a.prototype.destroy.call(this)}});c.exports=e},71741:(c,m,t)=>{/** + */var o=t(85034),v=t(83419),a=t(50792),r=t(4603),n=t(29747),e=new v({Extends:a,initialize:function(h){a.call(this),this.game=h,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(i,h){var s=new r(this,i,h);return this.sounds.push(s),s},addAudioSprite:function(i,h){var s=this.add(i,h);return s.spritemap={},s},get:function(i){return o.prototype.get.call(this,i)},getAll:function(i){return o.prototype.getAll.call(this,i)},play:function(i,h){return!1},playAudioSprite:function(i,h,s){return!1},remove:function(i){return o.prototype.remove.call(this,i)},removeAll:function(){return o.prototype.removeAll.call(this)},removeByKey:function(i){return o.prototype.removeByKey.call(this,i)},stopByKey:function(i){return o.prototype.stopByKey.call(this,i)},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(i,h){o.prototype.forEachActiveSound.call(this,i,h)},destroy:function(){o.prototype.destroy.call(this)}});c.exports=e},71741:(c,m,t)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(30341),v=t(83419),o=t(14463),r=t(95540),n=new v({Extends:a,initialize:function(i,h,s){if(s===void 0&&(s={}),this.audioBuffer=i.game.cache.audio.get(h),!this.audioBuffer)throw new Error('Audio key "'+h+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=i.context.createGain(),this.volumeNode=i.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),i.context.createPanner&&(this.spatialNode=i.context.createPanner(),this.volumeNode.connect(this.spatialNode)),i.context.createStereoPanner?(this.pannerNode=i.context.createStereoPanner(),i.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(i.destination)):i.context.createPanner?this.spatialNode.connect(i.destination):this.volumeNode.connect(i.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,a.call(this,i,h,s)},play:function(e,i){return a.prototype.play.call(this,e,i)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(o.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime{/** + */var o=t(30341),v=t(83419),a=t(14463),r=t(95540),n=new v({Extends:o,initialize:function(i,h,s){if(s===void 0&&(s={}),this.audioBuffer=i.game.cache.audio.get(h),!this.audioBuffer)throw new Error('Audio key "'+h+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=i.context.createGain(),this.volumeNode=i.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),i.context.createPanner&&(this.spatialNode=i.context.createPanner(),this.volumeNode.connect(this.spatialNode)),i.context.createStereoPanner?(this.pannerNode=i.context.createStereoPanner(),i.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(i.destination)):i.context.createPanner?this.spatialNode.connect(i.destination):this.volumeNode.connect(i.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,o.call(this,i,h,s)},play:function(e,i){return o.prototype.play.call(this,e,i)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(a.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(53134),v=t(85034),o=t(83419),r=t(14463),n=t(8443),e=t(71741),i=t(95540),h=new o({Extends:v,initialize:function(l){this.context=this.createAudioContext(l),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),v.call(this,l),this.locked&&l.isBooted?this.unlock():l.events.once(n.BOOT,this.unlock,this)},createAudioContext:function(s){var l=s.config.audio;if(l.context)return l.context.resume(),l.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(s){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=s,this.masterMuteNode=s.createGain(),this.masterVolumeNode=s.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(s.destination),this.destination=this.masterMuteNode,this},add:function(s,l){var f=new e(this,s,l);return this.sounds.push(f),f},decodeAudio:function(s,l){var f;Array.isArray(s)?f=s:f=[{key:s,data:l}];for(var u=this.game.cache.audio,d=f.length,p=0;p{/** + */var o=t(53134),v=t(85034),a=t(83419),r=t(14463),n=t(8443),e=t(71741),i=t(95540),h=new a({Extends:v,initialize:function(l){this.context=this.createAudioContext(l),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),v.call(this,l),this.locked&&l.isBooted?this.unlock():l.events.once(n.BOOT,this.unlock,this)},createAudioContext:function(s){var l=s.config.audio;if(l.context)return l.context.resume(),l.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(s){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=s,this.masterMuteNode=s.createGain(),this.masterVolumeNode=s.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(s.destination),this.destination=this.masterMuteNode,this},add:function(s,l){var f=new e(this,s,l);return this.sounds.push(f),f},decodeAudio:function(s,l){var f;Array.isArray(s)?f=s:f=[{key:s,data:l}];for(var u=this.game.cache.audio,d=f.length,p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37105),v=t(83419),o=t(29747),r=t(19186),n=new v({initialize:function(i){this.parent=i,this.list=[],this.position=0,this.addCallback=o,this.removeCallback=o,this._sortKey=""},add:function(e,i){return i?a.Add(this.list,e):a.Add(this.list,e,0,this.addCallback,this)},addAt:function(e,i,h){return h?a.AddAt(this.list,e,i):a.AddAt(this.list,e,i,0,this.addCallback,this)},getAt:function(e){return this.list[e]},getIndex:function(e){return this.list.indexOf(e)},sort:function(e,i){return e?(i===void 0&&(i=function(h,s){return h[e]-s[e]}),r(this.list,i),this):this},getByName:function(e){return a.GetFirst(this.list,"name",e)},getRandom:function(e,i){return a.GetRandom(this.list,e,i)},getFirst:function(e,i,h,s){return a.GetFirst(this.list,e,i,h,s)},getAll:function(e,i,h,s){return a.GetAll(this.list,e,i,h,s)},count:function(e,i){return a.CountAllMatching(this.list,e,i)},swap:function(e,i){a.Swap(this.list,e,i)},moveTo:function(e,i){return a.MoveTo(this.list,e,i)},moveAbove:function(e,i){return a.MoveAbove(this.list,e,i)},moveBelow:function(e,i){return a.MoveBelow(this.list,e,i)},remove:function(e,i){return i?a.Remove(this.list,e):a.Remove(this.list,e,this.removeCallback,this)},removeAt:function(e,i){return i?a.RemoveAt(this.list,e):a.RemoveAt(this.list,e,this.removeCallback,this)},removeBetween:function(e,i,h){return h?a.RemoveBetween(this.list,e,i):a.RemoveBetween(this.list,e,i,this.removeCallback,this)},removeAll:function(e){for(var i=this.list.length;i--;)this.remove(this.list[i],e);return this},bringToTop:function(e){return a.BringToTop(this.list,e)},sendToBack:function(e){return a.SendToBack(this.list,e)},moveUp:function(e){return a.MoveUp(this.list,e),e},moveDown:function(e){return a.MoveDown(this.list,e),e},reverse:function(){return this.list.reverse(),this},shuffle:function(){return a.Shuffle(this.list),this},replace:function(e,i){return a.Replace(this.list,e,i)},exists:function(e){return this.list.indexOf(e)>-1},setAll:function(e,i,h,s){return a.SetAll(this.list,e,i,h,s),this},each:function(e,i){for(var h=[null],s=2;s0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});c.exports=n},90330:(c,m,t)=>{/** + */var o=t(37105),v=t(83419),a=t(29747),r=t(19186),n=new v({initialize:function(i){this.parent=i,this.list=[],this.position=0,this.addCallback=a,this.removeCallback=a,this._sortKey=""},add:function(e,i){return i?o.Add(this.list,e):o.Add(this.list,e,0,this.addCallback,this)},addAt:function(e,i,h){return h?o.AddAt(this.list,e,i):o.AddAt(this.list,e,i,0,this.addCallback,this)},getAt:function(e){return this.list[e]},getIndex:function(e){return this.list.indexOf(e)},sort:function(e,i){return e?(i===void 0&&(i=function(h,s){return h[e]-s[e]}),r(this.list,i),this):this},getByName:function(e){return o.GetFirst(this.list,"name",e)},getRandom:function(e,i){return o.GetRandom(this.list,e,i)},getFirst:function(e,i,h,s){return o.GetFirst(this.list,e,i,h,s)},getAll:function(e,i,h,s){return o.GetAll(this.list,e,i,h,s)},count:function(e,i){return o.CountAllMatching(this.list,e,i)},swap:function(e,i){o.Swap(this.list,e,i)},moveTo:function(e,i){return o.MoveTo(this.list,e,i)},moveAbove:function(e,i){return o.MoveAbove(this.list,e,i)},moveBelow:function(e,i){return o.MoveBelow(this.list,e,i)},remove:function(e,i){return i?o.Remove(this.list,e):o.Remove(this.list,e,this.removeCallback,this)},removeAt:function(e,i){return i?o.RemoveAt(this.list,e):o.RemoveAt(this.list,e,this.removeCallback,this)},removeBetween:function(e,i,h){return h?o.RemoveBetween(this.list,e,i):o.RemoveBetween(this.list,e,i,this.removeCallback,this)},removeAll:function(e){for(var i=this.list.length;i--;)this.remove(this.list[i],e);return this},bringToTop:function(e){return o.BringToTop(this.list,e)},sendToBack:function(e){return o.SendToBack(this.list,e)},moveUp:function(e){return o.MoveUp(this.list,e),e},moveDown:function(e){return o.MoveDown(this.list,e),e},reverse:function(){return this.list.reverse(),this},shuffle:function(){return o.Shuffle(this.list),this},replace:function(e,i){return o.Replace(this.list,e,i)},exists:function(e){return this.list.indexOf(e)>-1},setAll:function(e,i,h,s){return o.SetAll(this.list,e,i,h,s),this},each:function(e,i){for(var h=[null],s=2;s0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});c.exports=n},90330:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r){this.entries={},this.size=0,this.setAll(r)},setAll:function(o){if(Array.isArray(o))for(var r=0;r{/** + */var o=t(83419),v=new o({initialize:function(r){this.entries={},this.size=0,this.setAll(r)},setAll:function(a){if(Array.isArray(a))for(var r=0;r{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(82348),r=new a({Extends:v,initialize:function(){v.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,i=e.indexOf(n);i!==-1&&e.splice(i,1)}else this.isActive(n)&&(this._destroy.push(n),this._toProcess++);return n},removeAll:function(){for(var n=this._active,e=this._destroy,i=n.length;i--;)e.push(n[i]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var n=this._destroy,e=this._active,i,h;for(i=0;i{/** + */var o=t(83419),v=t(50792),a=t(82348),r=new o({Extends:v,initialize:function(){v.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,i=e.indexOf(n);i!==-1&&e.splice(i,1)}else this.isActive(n)&&(this._destroy.push(n),this._toProcess++);return n},removeAll:function(){for(var n=this._active,e=this._destroy,i=n.length;i--;)e.push(n[i]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var n=this._destroy,e=this._active,i,h;for(i=0;i{/** * @author Vladimir Agafonkin * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43886);function v(x){if(!(this instanceof v))return new v(x);this._maxEntries=Math.max(4,x||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}v.prototype={all:function(){return this._all(this.data,[])},search:function(x){var T=this.data,C=[],M=this.toBBox;if(!p(x,T))return C;for(var w=[],L,F,O,N;T;){for(L=0,F=T.children.length;L=0&&L[T].children.length>this._maxEntries;)this._split(L,T),T--;this._adjustParentBBoxes(w,L,T)},_split:function(x,T){var C=x[T],M=C.children.length,w=this._minEntries;this._chooseSplitAxis(C,w,M);var L=this._chooseSplitIndex(C,w,M),F=g(C.children.splice(L,C.children.length-L));F.height=C.height,F.leaf=C.leaf,r(C,this.toBBox),r(F,this.toBBox),T?x[T-1].children.push(F):this._splitRoot(C,F)},_splitRoot:function(x,T){this.data=g([x,T]),this.data.height=x.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},_chooseSplitIndex:function(x,T,C){var M,w,L,F,O,N,G,V;for(N=G=1/0,M=T;M<=C-T;M++)w=n(x,0,M,this.toBBox),L=n(x,M,C,this.toBBox),F=u(w,L),O=s(w)+s(L),F=T;N--)G=x.children[N],e(F,x.leaf?w(G):G),O+=l(F);return O},_adjustParentBBoxes:function(x,T,C){for(var M=C;M>=0;M--)e(T[M],x)},_condense:function(x){for(var T=x.length-1,C;T>=0;T--)x[T].children.length===0?T>0?(C=x[T-1].children,C.splice(C.indexOf(x[T]),1)):this.clear():r(x[T],this.toBBox)},compareMinX:function(x,T){return x.left-T.left},compareMinY:function(x,T){return x.top-T.top},toBBox:function(x){return{minX:x.left,minY:x.top,maxX:x.right,maxY:x.bottom}}};function o(x,T,C){if(!C)return T.indexOf(x);for(var M=0;M=x.minX&&T.maxY>=x.minY}function g(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(x,T,C,M,w){for(var L=[T,C],F;L.length;)C=L.pop(),T=L.pop(),!(C-T<=M)&&(F=T+Math.ceil((C-T)/M/2)*M,a(x,F,T,C,w),L.push(T,F,F,C))}c.exports=v},35072:(c,m,t)=>{/** + */var o=t(43886);function v(x){if(!(this instanceof v))return new v(x);this._maxEntries=Math.max(4,x||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}v.prototype={all:function(){return this._all(this.data,[])},search:function(x){var C=this.data,P=[],M=this.toBBox;if(!p(x,C))return P;for(var w=[],I,L,B,N;C;){for(I=0,L=C.children.length;I=0&&I[C].children.length>this._maxEntries;)this._split(I,C),C--;this._adjustParentBBoxes(w,I,C)},_split:function(x,C){var P=x[C],M=P.children.length,w=this._minEntries;this._chooseSplitAxis(P,w,M);var I=this._chooseSplitIndex(P,w,M),L=g(P.children.splice(I,P.children.length-I));L.height=P.height,L.leaf=P.leaf,r(P,this.toBBox),r(L,this.toBBox),C?x[C-1].children.push(L):this._splitRoot(P,L)},_splitRoot:function(x,C){this.data=g([x,C]),this.data.height=x.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},_chooseSplitIndex:function(x,C,P){var M,w,I,L,B,N,G,V;for(N=G=1/0,M=C;M<=P-C;M++)w=n(x,0,M,this.toBBox),I=n(x,M,P,this.toBBox),L=u(w,I),B=s(w)+s(I),L=C;N--)G=x.children[N],e(L,x.leaf?w(G):G),B+=l(L);return B},_adjustParentBBoxes:function(x,C,P){for(var M=P;M>=0;M--)e(C[M],x)},_condense:function(x){for(var C=x.length-1,P;C>=0;C--)x[C].children.length===0?C>0?(P=x[C-1].children,P.splice(P.indexOf(x[C]),1)):this.clear():r(x[C],this.toBBox)},compareMinX:function(x,C){return x.left-C.left},compareMinY:function(x,C){return x.top-C.top},toBBox:function(x){return{minX:x.left,minY:x.top,maxX:x.right,maxY:x.bottom}}};function a(x,C,P){if(!P)return C.indexOf(x);for(var M=0;M=x.minX&&C.maxY>=x.minY}function g(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(x,C,P,M,w){for(var I=[C,P],L;I.length;)P=I.pop(),C=I.pop(),!(P-C<=M)&&(L=C+Math.ceil((P-C)/M/2)*M,o(x,L,C,P,w),I.push(C,L,L,P))}c.exports=v},35072:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r){if(this.entries=[],Array.isArray(r))for(var n=0;n-1&&this.entries.splice(r,1),this},dump:function(){console.group("Set");for(var o=0;o-1},union:function(o){var r=new v;return o.entries.forEach(function(n){r.set(n)}),this.entries.forEach(function(n){r.set(n)}),r},intersect:function(o){var r=new v;return this.entries.forEach(function(n){o.contains(n)&&r.set(n)}),r},difference:function(o){var r=new v;return this.entries.forEach(function(n){o.contains(n)||r.set(n)}),r},size:{get:function(){return this.entries.length},set:function(o){return o{/** + */var o=t(83419),v=new o({initialize:function(r){if(this.entries=[],Array.isArray(r))for(var n=0;n-1&&this.entries.splice(r,1),this},dump:function(){console.group("Set");for(var a=0;a-1},union:function(a){var r=new v;return a.entries.forEach(function(n){r.set(n)}),this.entries.forEach(function(n){r.set(n)}),r},intersect:function(a){var r=new v;return this.entries.forEach(function(n){a.contains(n)&&r.set(n)}),r},difference:function(a){var r=new v;return this.entries.forEach(function(n){a.contains(n)||r.set(n)}),r},size:{get:function(){return this.entries.length},set:function(a){return a{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(56583),r=t(26099),n=new v({initialize:function(i,h,s,l){i===void 0&&(i=0),h===void 0&&(h=i),s===void 0&&(s=0),l===void 0&&(l=null),this._width=i,this._height=h,this._parent=l,this.aspectMode=s,this.aspectRatio=h===0?1:i/h,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,i){return e===void 0&&(e=0),i===void 0&&(i=e),this.snapTo.set(e,i),this.setSize(this._width,this._height)},setParent:function(e){return this._parent=e,this.setSize(this._width,this._height)},setMin:function(e,i){return e===void 0&&(e=0),i===void 0&&(i=e),this.minWidth=a(e,0,this.maxWidth),this.minHeight=a(i,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(e,i){return e===void 0&&(e=Number.MAX_VALUE),i===void 0&&(i=e),this.maxWidth=a(e,this.minWidth,Number.MAX_VALUE),this.maxHeight=a(i,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(e,i){switch(e===void 0&&(e=0),i===void 0&&(i=e),this.aspectMode){case n.NONE:this._width=this.getNewWidth(o(e,this.snapTo.x)),this._height=this.getNewHeight(o(i,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case n.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(o(e,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case n.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(o(i,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case n.FIT:this.constrain(e,i,!0);break;case n.ENVELOP:this.constrain(e,i,!1);break}return this},setAspectRatio:function(e){return this.aspectRatio=e,this.setSize(this._width,this._height)},resize:function(e,i){return this._width=this.getNewWidth(o(e,this.snapTo.x)),this._height=this.getNewHeight(o(i,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(e,i){return i===void 0&&(i=!0),e=a(e,this.minWidth,this.maxWidth),i&&this._parent&&e>this._parent.width&&(e=Math.max(this.minWidth,this._parent.width)),e},getNewHeight:function(e,i){return i===void 0&&(i=!0),e=a(e,this.minHeight,this.maxHeight),i&&this._parent&&e>this._parent.height&&(e=Math.max(this.minHeight,this._parent.height)),e},constrain:function(e,i,h){e===void 0&&(e=0),i===void 0&&(i=e),h===void 0&&(h=!0),e=this.getNewWidth(e),i=this.getNewHeight(i);var s=this.snapTo,l=i===0?1:e/i;return h&&this.aspectRatio>l||!h&&this.aspectRatio0&&(i=o(i,s.y),e=i*this.aspectRatio)):(h&&this.aspectRatiol)&&(i=o(i,s.y),e=i*this.aspectRatio,s.x>0&&(e=o(e,s.x),i=e*(1/this.aspectRatio))),this._width=e,this._height=i,this},fitTo:function(e,i){return this.constrain(e,i,!0)},envelop:function(e,i){return this.constrain(e,i,!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,c.exports=n},15238:c=>{/** + */var o=t(45319),v=t(83419),a=t(56583),r=t(26099),n=new v({initialize:function(i,h,s,l){i===void 0&&(i=0),h===void 0&&(h=i),s===void 0&&(s=0),l===void 0&&(l=null),this._width=i,this._height=h,this._parent=l,this.aspectMode=s,this.aspectRatio=h===0?1:i/h,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,i){return e===void 0&&(e=0),i===void 0&&(i=e),this.snapTo.set(e,i),this.setSize(this._width,this._height)},setParent:function(e){return this._parent=e,this.setSize(this._width,this._height)},setMin:function(e,i){return e===void 0&&(e=0),i===void 0&&(i=e),this.minWidth=o(e,0,this.maxWidth),this.minHeight=o(i,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(e,i){return e===void 0&&(e=Number.MAX_VALUE),i===void 0&&(i=e),this.maxWidth=o(e,this.minWidth,Number.MAX_VALUE),this.maxHeight=o(i,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(e,i){switch(e===void 0&&(e=0),i===void 0&&(i=e),this.aspectMode){case n.NONE:this._width=this.getNewWidth(a(e,this.snapTo.x)),this._height=this.getNewHeight(a(i,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case n.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(a(e,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case n.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(a(i,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case n.FIT:this.constrain(e,i,!0);break;case n.ENVELOP:this.constrain(e,i,!1);break}return this},setAspectRatio:function(e){return this.aspectRatio=e,this.setSize(this._width,this._height)},resize:function(e,i){return this._width=this.getNewWidth(a(e,this.snapTo.x)),this._height=this.getNewHeight(a(i,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(e,i){return i===void 0&&(i=!0),e=o(e,this.minWidth,this.maxWidth),i&&this._parent&&e>this._parent.width&&(e=Math.max(this.minWidth,this._parent.width)),e},getNewHeight:function(e,i){return i===void 0&&(i=!0),e=o(e,this.minHeight,this.maxHeight),i&&this._parent&&e>this._parent.height&&(e=Math.max(this.minHeight,this._parent.height)),e},constrain:function(e,i,h){e===void 0&&(e=0),i===void 0&&(i=e),h===void 0&&(h=!0),e=this.getNewWidth(e),i=this.getNewHeight(i);var s=this.snapTo,l=i===0?1:e/i;return h&&this.aspectRatio>l||!h&&this.aspectRatio0&&(i=a(i,s.y),e=i*this.aspectRatio)):(h&&this.aspectRatiol)&&(i=a(i,s.y),e=i*this.aspectRatio,s.x>0&&(e=a(e,s.x),i=e*(1/this.aspectRatio))),this._width=e,this._height=i,this},fitTo:function(e,i){return this.constrain(e,i,!0)},envelop:function(e,i){return this.constrain(e,i,!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,c.exports=n},15238:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5329,27 +5329,27 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(45319),o=t(40987),r=t(8054),n=t(50030),e=t(79237),i=new a({Extends:e,initialize:function(s,l,f,u,d){e.call(this,s,l,f,u,d),this.add("__BASE",0,0,0,u,d),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=u,this.height=d,this.imageData=this.context.getImageData(0,0,u,d),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===r.WEBGL&&this.refresh(),this},draw:function(h,s,l,f){return f===void 0&&(f=!0),this.context.drawImage(l,h,s),f&&this.update(),this},drawFrame:function(h,s,l,f,u){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=!0);var d=this.manager.getFrame(h,s);if(d){var p=d.canvasData,g=d.cutWidth,y=d.cutHeight,x=d.source.resolution;this.context.drawImage(d.source.image,p.x,p.y,g,y,l,f,g/x,y/x),u&&this.update()}return this},setPixel:function(h,s,l,f,u,d){d===void 0&&(d=255),h=Math.abs(Math.floor(h)),s=Math.abs(Math.floor(s));var p=this.getIndex(h,s);if(p>-1){var g=this.context.getImageData(h,s,1,1);g.data[0]=l,g.data[1]=f,g.data[2]=u,g.data[3]=d,this.context.putImageData(g,h,s)}return this},putData:function(h,s,l,f,u,d,p){return f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=h.width),p===void 0&&(p=h.height),this.context.putImageData(h,s,l,f,u,d,p),this},getData:function(h,s,l,f){h=v(Math.floor(h),0,this.width-1),s=v(Math.floor(s),0,this.height-1),l=v(l,1,this.width-h),f=v(f,1,this.height-s);var u=this.context.getImageData(h,s,l,f);return u},getPixel:function(h,s,l){l||(l=new o);var f=this.getIndex(h,s);if(f>-1){var u=this.data,d=u[f+0],p=u[f+1],g=u[f+2],y=u[f+3];l.setTo(d,p,g,y)}return l},getPixels:function(h,s,l,f){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=this.width),f===void 0&&(f=l),h=Math.abs(Math.round(h)),s=Math.abs(Math.round(s));for(var u=v(h,0,this.width),d=v(h+l,0,this.width),p=v(s,0,this.height),g=v(s+f,0,this.height),y=new o,x=[],T=p;T{/** + */var o=t(83419),v=t(45319),a=t(40987),r=t(8054),n=t(50030),e=t(79237),i=new o({Extends:e,initialize:function(s,l,f,u,d){e.call(this,s,l,f,u,d),this.add("__BASE",0,0,0,u,d),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=u,this.height=d,this.imageData=this.context.getImageData(0,0,u,d),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===r.WEBGL&&this.refresh(),this},draw:function(h,s,l,f){return f===void 0&&(f=!0),this.context.drawImage(l,h,s),f&&this.update(),this},drawFrame:function(h,s,l,f,u){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=!0);var d=this.manager.getFrame(h,s);if(d){var p=d.canvasData,g=d.cutWidth,y=d.cutHeight,x=d.source.resolution;this.context.drawImage(d.source.image,p.x,p.y,g,y,l,f,g/x,y/x),u&&this.update()}return this},setPixel:function(h,s,l,f,u,d){d===void 0&&(d=255),h=Math.abs(Math.floor(h)),s=Math.abs(Math.floor(s));var p=this.getIndex(h,s);if(p>-1){var g=this.context.getImageData(h,s,1,1);g.data[0]=l,g.data[1]=f,g.data[2]=u,g.data[3]=d,this.context.putImageData(g,h,s)}return this},putData:function(h,s,l,f,u,d,p){return f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=h.width),p===void 0&&(p=h.height),this.context.putImageData(h,s,l,f,u,d,p),this},getData:function(h,s,l,f){h=v(Math.floor(h),0,this.width-1),s=v(Math.floor(s),0,this.height-1),l=v(l,1,this.width-h),f=v(f,1,this.height-s);var u=this.context.getImageData(h,s,l,f);return u},getPixel:function(h,s,l){l||(l=new a);var f=this.getIndex(h,s);if(f>-1){var u=this.data,d=u[f+0],p=u[f+1],g=u[f+2],y=u[f+3];l.setTo(d,p,g,y)}return l},getPixels:function(h,s,l,f){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=this.width),f===void 0&&(f=l),h=Math.abs(Math.round(h)),s=Math.abs(Math.round(s));for(var u=v(h,0,this.width),d=v(h+l,0,this.width),p=v(s,0,this.height),g=v(s+f,0,this.height),y=new a,x=[],C=p;C{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10312),v=t(71911),o=t(27919),r=t(83419),n=t(8054),e=t(4327),i=t(95540),h=t(36060),s=t(32302),l=t(79237),f=t(70554),u=new r({Extends:l,initialize:function(p,g,y,x){y===void 0&&(y=256),x===void 0&&(x=256),this.type="DynamicTexture";var T=p.game.renderer,C=T&&T.type===n.CANVAS,M=C?o.create2D(this,y,x):[this];l.call(this,p,g,M,y,x),this.add("__BASE",0,0,0,y,x),this.renderer=T,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=C?M:null,this.context=C?M.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new v(0,0,y,x).setScene(p.game.scene.systemScene,!1),this.renderTarget=C?null:new s(T,y,x,1,0,!1,!0,!0,!1),this.pipeline=C?null:T.pipelines.get(h.SINGLE_PIPELINE),this.setSize(y,x)},setSize:function(d,p){p===void 0&&(p=d);var g=this.get(),y=g.source;if(d!==this.width||p!==this.height){this.canvas&&(this.canvas.width=d,this.canvas.height=p);var x=this.renderTarget;x&&(x.willResize(d,p)&&x.resize(d,p),x.texture!==y.glTexture&&this.renderer.deleteTexture(y.glTexture),this.setFromRenderTarget()),this.camera.setSize(d,p),y.width=d,y.height=p,g.setSize(d,p),this.width=d,this.height=p}else{var T=this.getSourceImage();g.cutX+d>T.width&&(d=T.width-g.cutX),g.cutY+p>T.height&&(p=T.height-g.cutY),g.setSize(d,p,g.cutX,g.cutY)}return this},setFromRenderTarget:function(){var d=this.get(),p=d.source,g=this.renderTarget;return p.isRenderTexture=!0,p.isGLTexture=!0,p.glTexture=g.texture,this},setIsSpriteTexture:function(d){return this.isSpriteTexture=d,this},fill:function(d,p,g,y,x,T){var C=this.camera,M=this.renderer;p===void 0&&(p=1),g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=this.width),T===void 0&&(T=this.height);var w=d>>16&255,L=d>>8&255,F=d&255,O=this.renderTarget;if(C.preRender(),O){O.bind(!0);var N=this.pipeline.manager.set(this.pipeline),G=M.width/O.width,V=M.height/O.height,K=O.height-(y+T);N.drawFillRect(g*G,K*V,x*G,T*V,f.getTintFromFloats(F/255,L/255,w/255,1),p),O.unbind(!0)}else{var $=this.context;M.setContext($),$.globalCompositeOperation="source-over",$.fillStyle="rgba("+w+","+L+","+F+","+p+")",$.fillRect(g,y,x,T),M.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var d=this.context,p=this.renderTarget;p?p.clear():d&&(d.save(),d.setTransform(1,0,0,1,0,0),d.clearRect(0,0,this.width,this.height),d.restore()),this.dirty=!1}return this},stamp:function(d,p,g,y,x){g===void 0&&(g=0),y===void 0&&(y=0);var T=i(x,"alpha",1),C=i(x,"tint",16777215),M=i(x,"angle",0),w=i(x,"rotation",0),L=i(x,"scale",1),F=i(x,"scaleX",L),O=i(x,"scaleY",L),N=i(x,"originX",.5),G=i(x,"originY",.5),V=i(x,"blendMode",0),K=i(x,"erase",!1),$=i(x,"skipBatch",!1),J=this.manager.resetStamp(T,C);return J.setAngle(0),M!==0?J.setAngle(M):w!==0&&J.setRotation(w),J.setScale(F,O),J.setTexture(d,p),J.setOrigin(N,G),J.setBlendMode(V),K&&(this._eraseMode=!0),$?this.batchGameObject(J,g,y):this.draw(J,g,y),K&&(this._eraseMode=!1),this},erase:function(d,p,g){return this._eraseMode=!0,this.draw(d,p,g),this._eraseMode=!1,this},draw:function(d,p,g,y,x){return this.beginDraw(),this.batchDraw(d,p,g,y,x),this.endDraw(),this},drawFrame:function(d,p,g,y,x,T){return this.beginDraw(),this.batchDrawFrame(d,p,g,y,x,T),this.endDraw(),this},repeat:function(d,p,g,y,x,T,C,M,w){if(g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=this.width),T===void 0&&(T=this.height),C===void 0&&(C=1),M===void 0&&(M=16777215),w===void 0&&(w=!1),d instanceof e?p=d:p=this.manager.getFrame(d,p),!p)return this;var L=this.manager.resetStamp(C,M);L.setFrame(p),L.setOrigin(0);var F=p.width,O=p.height;x=Math.floor(x),T=Math.floor(T);var N=Math.ceil(x/F),G=Math.ceil(T/O),V=N*F-x,K=G*O-T;V>0&&(V=F-V),K>0&&(K=O-K),g<0&&(N+=Math.ceil(Math.abs(g)/F)),y<0&&(G+=Math.ceil(Math.abs(y)/O));var $=g,J=y,X=!1,Y=this.manager.stampCrop.setTo(0,0,F,O);w||this.beginDraw();for(var D=0;D0&&z===N-1&&(X=!0,Y.width=V),K>0&&D===G-1&&(X=!0,Y.height=K),X&&L.setCrop(Y),this.batchGameObject(L,$,J),L.isCropped=!1,Y.setTo(0,0,F,O),$+=F}$=g,J+=O}return w||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var d=this.camera,p=this.renderer,g=this.renderTarget;d.preRender(),g?p.beginCapture(g.width,g.height):p.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(d,p,g,y,x){return Array.isArray(d)||(d=[d]),this.batchList(d,p,g,y,x),this},batchDrawFrame:function(d,p,g,y,x,T){g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=1),T===void 0&&(T=16777215);var C=this.manager.getFrame(d,p);return C&&(this.renderTarget?this.pipeline.batchTextureFrame(C,g,y,T,x,this.camera.matrix,null):this.batchTextureFrame(C,g,y,x,T)),this},endDraw:function(d){if(d===void 0&&(d=this._eraseMode),this.isDrawing){var p=this.renderer,g=this.renderTarget;if(g){var y=p.endCapture(),x=p.pipelines.setUtility();x.blitFrame(y,g,1,!1,!1,d,this.isSpriteTexture),p.resetScissor(),p.resetViewport()}else p.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(d,p,g,y,x){var T=d.length;if(T!==0)for(var C=0;C0&&w.height>0&&M.drawImage(L,w.x,w.y,w.width,w.height,p,g,w.width,w.height),M.restore()}},snapshotArea:function(d,p,g,y,x,T,C){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,x,!1,d,p,g,y,T,C):this.renderer.snapshotCanvas(this.canvas,x,!1,d,p,g,y,T,C),this},snapshot:function(d,p,g){return this.snapshotArea(0,0,this.width,this.height,d,p,g)},snapshotPixel:function(d,p,g){return this.snapshotArea(d,p,1,1,g,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(d,p,g,y){var x=this.manager.resetStamp();x.setTexture(this),x.setOrigin(0),x.renderWebGL(d,x,g,y)},renderCanvas:function(){},destroy:function(){var d=this.manager.stamp;d&&d.texture===this&&this.manager.resetStamp(),l.prototype.destroy.call(this),o.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});c.exports=u},4327:(c,m,t)=>{/** + */var o=t(10312),v=t(71911),a=t(27919),r=t(83419),n=t(8054),e=t(4327),i=t(95540),h=t(36060),s=t(32302),l=t(79237),f=t(70554),u=new r({Extends:l,initialize:function(p,g,y,x){y===void 0&&(y=256),x===void 0&&(x=256),this.type="DynamicTexture";var C=p.game.renderer,P=C&&C.type===n.CANVAS,M=P?a.create2D(this,y,x):[this];l.call(this,p,g,M,y,x),this.add("__BASE",0,0,0,y,x),this.renderer=C,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=P?M:null,this.context=P?M.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new v(0,0,y,x).setScene(p.game.scene.systemScene,!1),this.renderTarget=P?null:new s(C,y,x,1,0,!1,!0,!0,!1),this.pipeline=P?null:C.pipelines.get(h.SINGLE_PIPELINE),this.setSize(y,x)},setSize:function(d,p){p===void 0&&(p=d);var g=this.get(),y=g.source;if(d!==this.width||p!==this.height){this.canvas&&(this.canvas.width=d,this.canvas.height=p);var x=this.renderTarget;x&&(x.willResize(d,p)&&x.resize(d,p),x.texture!==y.glTexture&&this.renderer.deleteTexture(y.glTexture),this.setFromRenderTarget()),this.camera.setSize(d,p),y.width=d,y.height=p,g.setSize(d,p),this.width=d,this.height=p}else{var C=this.getSourceImage();g.cutX+d>C.width&&(d=C.width-g.cutX),g.cutY+p>C.height&&(p=C.height-g.cutY),g.setSize(d,p,g.cutX,g.cutY)}return this},setFromRenderTarget:function(){var d=this.get(),p=d.source,g=this.renderTarget;return p.isRenderTexture=!0,p.isGLTexture=!0,p.glTexture=g.texture,this},setIsSpriteTexture:function(d){return this.isSpriteTexture=d,this},fill:function(d,p,g,y,x,C){var P=this.camera,M=this.renderer;p===void 0&&(p=1),g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=this.width),C===void 0&&(C=this.height);var w=d>>16&255,I=d>>8&255,L=d&255,B=this.renderTarget;if(P.preRender(),B){B.bind(!0);var N=this.pipeline.manager.set(this.pipeline),G=M.width/B.width,V=M.height/B.height,K=B.height-(y+C);N.drawFillRect(g*G,K*V,x*G,C*V,f.getTintFromFloats(L/255,I/255,w/255,1),p),B.unbind(!0)}else{var j=this.context;M.setContext(j),j.globalCompositeOperation="source-over",j.fillStyle="rgba("+w+","+I+","+L+","+p+")",j.fillRect(g,y,x,C),M.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var d=this.context,p=this.renderTarget;p?p.clear():d&&(d.save(),d.setTransform(1,0,0,1,0,0),d.clearRect(0,0,this.width,this.height),d.restore()),this.dirty=!1}return this},stamp:function(d,p,g,y,x){g===void 0&&(g=0),y===void 0&&(y=0);var C=i(x,"alpha",1),P=i(x,"tint",16777215),M=i(x,"angle",0),w=i(x,"rotation",0),I=i(x,"scale",1),L=i(x,"scaleX",I),B=i(x,"scaleY",I),N=i(x,"originX",.5),G=i(x,"originY",.5),V=i(x,"blendMode",0),K=i(x,"erase",!1),j=i(x,"skipBatch",!1),J=this.manager.resetStamp(C,P);return J.setAngle(0),M!==0?J.setAngle(M):w!==0&&J.setRotation(w),J.setScale(L,B),J.setTexture(d,p),J.setOrigin(N,G),J.setBlendMode(V),K&&(this._eraseMode=!0),j?this.batchGameObject(J,g,y):this.draw(J,g,y),K&&(this._eraseMode=!1),this},erase:function(d,p,g){return this._eraseMode=!0,this.draw(d,p,g),this._eraseMode=!1,this},draw:function(d,p,g,y,x){return this.beginDraw(),this.batchDraw(d,p,g,y,x),this.endDraw(),this},drawFrame:function(d,p,g,y,x,C){return this.beginDraw(),this.batchDrawFrame(d,p,g,y,x,C),this.endDraw(),this},repeat:function(d,p,g,y,x,C,P,M,w){if(g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=this.width),C===void 0&&(C=this.height),P===void 0&&(P=1),M===void 0&&(M=16777215),w===void 0&&(w=!1),d instanceof e?p=d:p=this.manager.getFrame(d,p),!p)return this;var I=this.manager.resetStamp(P,M);I.setFrame(p),I.setOrigin(0);var L=p.width,B=p.height;x=Math.floor(x),C=Math.floor(C);var N=Math.ceil(x/L),G=Math.ceil(C/B),V=N*L-x,K=G*B-C;V>0&&(V=L-V),K>0&&(K=B-K),g<0&&(N+=Math.ceil(Math.abs(g)/L)),y<0&&(G+=Math.ceil(Math.abs(y)/B));var j=g,J=y,X=!1,Y=this.manager.stampCrop.setTo(0,0,L,B);w||this.beginDraw();for(var b=0;b0&&z===N-1&&(X=!0,Y.width=V),K>0&&b===G-1&&(X=!0,Y.height=K),X&&I.setCrop(Y),this.batchGameObject(I,j,J),I.isCropped=!1,Y.setTo(0,0,L,B),j+=L}j=g,J+=B}return w||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var d=this.camera,p=this.renderer,g=this.renderTarget;d.preRender(),g?p.beginCapture(g.width,g.height):p.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(d,p,g,y,x){return Array.isArray(d)||(d=[d]),this.batchList(d,p,g,y,x),this},batchDrawFrame:function(d,p,g,y,x,C){g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=1),C===void 0&&(C=16777215);var P=this.manager.getFrame(d,p);return P&&(this.renderTarget?this.pipeline.batchTextureFrame(P,g,y,C,x,this.camera.matrix,null):this.batchTextureFrame(P,g,y,x,C)),this},endDraw:function(d){if(d===void 0&&(d=this._eraseMode),this.isDrawing){var p=this.renderer,g=this.renderTarget;if(g){var y=p.endCapture(),x=p.pipelines.setUtility();x.blitFrame(y,g,1,!1,!1,d,this.isSpriteTexture),p.resetScissor(),p.resetViewport()}else p.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(d,p,g,y,x){var C=d.length;if(C!==0)for(var P=0;P0&&w.height>0&&M.drawImage(I,w.x,w.y,w.width,w.height,p,g,w.width,w.height),M.restore()}},snapshotArea:function(d,p,g,y,x,C,P){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,x,!1,d,p,g,y,C,P):this.renderer.snapshotCanvas(this.canvas,x,!1,d,p,g,y,C,P),this},snapshot:function(d,p,g){return this.snapshotArea(0,0,this.width,this.height,d,p,g)},snapshotPixel:function(d,p,g){return this.snapshotArea(d,p,1,1,g,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(d,p,g,y){var x=this.manager.resetStamp();x.setTexture(this),x.setOrigin(0),x.renderWebGL(d,x,g,y)},renderCanvas:function(){},destroy:function(){var d=this.manager.stamp;d&&d.texture===this&&this.manager.resetStamp(),l.prototype.destroy.call(this),a.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});c.exports=u},4327:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(45319),o=t(79291),r=new a({initialize:function(e,i,h,s,l,f,u){this.texture=e,this.name=i,this.source=e.source[h],this.sourceIndex=h,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(f,u,s,l)},setSize:function(n,e,i,h){i===void 0&&(i=0),h===void 0&&(h=0),this.cutX=i,this.cutY=h,this.cutWidth=n,this.cutHeight=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 s=this.data,l=s.cut;l.x=i,l.y=h,l.w=n,l.h=e,l.r=i+n,l.b=h+e,s.sourceSize.w=n,s.sourceSize.h=e,s.spriteSourceSize.w=n,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(n*n+e*e);var f=s.drawImage;return f.x=i,f.y=h,f.width=n,f.height=e,this.updateUVs()},setTrim:function(n,e,i,h,s,l){var f=this.data,u=f.spriteSourceSize;return f.trim=!0,f.sourceSize.w=n,f.sourceSize.h=e,u.x=i,u.y=h,u.w=s,u.h=l,u.r=i+s,u.b=h+l,this.x=i,this.y=h,this.width=s,this.height=l,this.halfWidth=s*.5,this.halfHeight=l*.5,this.centerX=Math.floor(s/2),this.centerY=Math.floor(l/2),this.updateUVs()},setScale9:function(n,e,i,h){var s=this.data;return s.scale9=!0,s.is3Slice=e===0&&h===this.height,s.scale9Borders.x=n,s.scale9Borders.y=e,s.scale9Borders.w=i,s.scale9Borders.h=h,this},setCropUVs:function(n,e,i,h,s,l,f){var u=this.cutX,d=this.cutY,p=this.cutWidth,g=this.cutHeight,y=this.realWidth,x=this.realHeight;e=v(e,0,y),i=v(i,0,x),h=v(h,0,y-e),s=v(s,0,x-i);var T=u+e,C=d+i,M=h,w=s,L=this.data;if(L.trim){var F=L.spriteSourceSize;h=v(h,0,p-e),s=v(s,0,g-i);var O=e+h,N=i+s,G=!(F.rO||F.y>N);if(G){var V=Math.max(F.x,e),K=Math.max(F.y,i),$=Math.min(F.r,O)-V,J=Math.min(F.b,N)-K;M=$,w=J,l?T=u+(p-(V-F.x)-$):T=u+(V-F.x),f?C=d+(g-(K-F.y)-J):C=d+(K-F.y),e=V,i=K,h=$,s=J}else T=0,C=0,M=0,w=0}else l&&(T=u+(p-e-h)),f&&(C=d+(g-i-s));var X=this.source.width,Y=this.source.height;return n.u0=Math.max(0,T/X),n.v0=Math.max(0,C/Y),n.u1=Math.min(1,(T+M)/X),n.v1=Math.min(1,(C+w)/Y),n.x=e,n.y=i,n.cx=T,n.cy=C,n.cw=M,n.ch=w,n.width=h,n.height=s,n.flipX=l,n.flipY=f,n},updateCropUVs:function(n,e,i){return this.setCropUVs(n,n.x,n.y,n.width,n.height,e,i)},setUVs:function(n,e,i,h,s,l){var f=this.data.drawImage;return f.width=n,f.height=e,this.u0=i,this.v0=h,this.u1=s,this.v1=l,this},updateUVs:function(){var n=this.cutX,e=this.cutY,i=this.cutWidth,h=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=h;var l=this.source.width,f=this.source.height;return this.u0=n/l,this.v0=e/f,this.u1=(n+i)/l,this.v1=(e+h)/f,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=o(!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}}});c.exports=r},79237:(c,m,t)=>{/** + */var o=t(83419),v=t(45319),a=t(79291),r=new o({initialize:function(e,i,h,s,l,f,u){this.texture=e,this.name=i,this.source=e.source[h],this.sourceIndex=h,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(f,u,s,l)},setSize:function(n,e,i,h){i===void 0&&(i=0),h===void 0&&(h=0),this.cutX=i,this.cutY=h,this.cutWidth=n,this.cutHeight=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 s=this.data,l=s.cut;l.x=i,l.y=h,l.w=n,l.h=e,l.r=i+n,l.b=h+e,s.sourceSize.w=n,s.sourceSize.h=e,s.spriteSourceSize.w=n,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(n*n+e*e);var f=s.drawImage;return f.x=i,f.y=h,f.width=n,f.height=e,this.updateUVs()},setTrim:function(n,e,i,h,s,l){var f=this.data,u=f.spriteSourceSize;return f.trim=!0,f.sourceSize.w=n,f.sourceSize.h=e,u.x=i,u.y=h,u.w=s,u.h=l,u.r=i+s,u.b=h+l,this.x=i,this.y=h,this.width=s,this.height=l,this.halfWidth=s*.5,this.halfHeight=l*.5,this.centerX=Math.floor(s/2),this.centerY=Math.floor(l/2),this.updateUVs()},setScale9:function(n,e,i,h){var s=this.data;return s.scale9=!0,s.is3Slice=e===0&&h===this.height,s.scale9Borders.x=n,s.scale9Borders.y=e,s.scale9Borders.w=i,s.scale9Borders.h=h,this},setCropUVs:function(n,e,i,h,s,l,f){var u=this.cutX,d=this.cutY,p=this.cutWidth,g=this.cutHeight,y=this.realWidth,x=this.realHeight;e=v(e,0,y),i=v(i,0,x),h=v(h,0,y-e),s=v(s,0,x-i);var C=u+e,P=d+i,M=h,w=s,I=this.data;if(I.trim){var L=I.spriteSourceSize;h=v(h,0,p-e),s=v(s,0,g-i);var B=e+h,N=i+s,G=!(L.rB||L.y>N);if(G){var V=Math.max(L.x,e),K=Math.max(L.y,i),j=Math.min(L.r,B)-V,J=Math.min(L.b,N)-K;M=j,w=J,l?C=u+(p-(V-L.x)-j):C=u+(V-L.x),f?P=d+(g-(K-L.y)-J):P=d+(K-L.y),e=V,i=K,h=j,s=J}else C=0,P=0,M=0,w=0}else l&&(C=u+(p-e-h)),f&&(P=d+(g-i-s));var X=this.source.width,Y=this.source.height;return n.u0=Math.max(0,C/X),n.v0=Math.max(0,P/Y),n.u1=Math.min(1,(C+M)/X),n.v1=Math.min(1,(P+w)/Y),n.x=e,n.y=i,n.cx=C,n.cy=P,n.cw=M,n.ch=w,n.width=h,n.height=s,n.flipX=l,n.flipY=f,n},updateCropUVs:function(n,e,i){return this.setCropUVs(n,n.x,n.y,n.width,n.height,e,i)},setUVs:function(n,e,i,h,s,l){var f=this.data.drawImage;return f.width=n,f.height=e,this.u0=i,this.v0=h,this.u1=s,this.v1=l,this},updateUVs:function(){var n=this.cutX,e=this.cutY,i=this.cutWidth,h=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=h;var l=this.source.width,f=this.source.height;return this.u0=n/l,this.v0=e/f,this.u1=(n+i)/l,this.v1=(e+h)/f,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=a(!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}}});c.exports=r},79237:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(4327),o=t(11876),r='Texture "%s" has no frame "%s"',n=new a({initialize:function(i,h,s,l,f){Array.isArray(s)||(s=[s]),this.manager=i,this.key=h,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var u=0;ul&&(l=d.cutX+d.cutWidth),d.cutY+d.cutHeight>f&&(f=d.cutY+d.cutHeight)}return{x:h,y:s,width:l-h,height:f-s}},getFrameNames:function(e){e===void 0&&(e=!1);var i=Object.keys(this.frames);if(!e){var h=i.indexOf("__BASE");h!==-1&&i.splice(h,1)}return i},getSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var i=this.frames[e];return i?i.source.image:(console.warn(r,this.key,e),this.frames.__BASE.source.image)},getDataSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var i=this.frames[e],h;return i?h=i.sourceIndex:(console.warn(r,this.key,e),h=this.frames.__BASE.sourceIndex),this.dataSource[h].image},setDataSource:function(e){Array.isArray(e)||(e=[e]);for(var i=0;i{/** + */var o=t(83419),v=t(4327),a=t(11876),r='Texture "%s" has no frame "%s"',n=new o({initialize:function(i,h,s,l,f){Array.isArray(s)||(s=[s]),this.manager=i,this.key=h,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var u=0;ul&&(l=d.cutX+d.cutWidth),d.cutY+d.cutHeight>f&&(f=d.cutY+d.cutHeight)}return{x:h,y:s,width:l-h,height:f-s}},getFrameNames:function(e){e===void 0&&(e=!1);var i=Object.keys(this.frames);if(!e){var h=i.indexOf("__BASE");h!==-1&&i.splice(h,1)}return i},getSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var i=this.frames[e];return i?i.source.image:(console.warn(r,this.key,e),this.frames.__BASE.source.image)},getDataSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var i=this.frames[e],h;return i?h=i.sourceIndex:(console.warn(r,this.key,e),h=this.frames.__BASE.sourceIndex),this.dataSource[h].image},setDataSource:function(e){Array.isArray(e)||(e=[e]);for(var i=0;i{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(27919),v=t(57382),o=t(83419),r=t(40987),n=t(8054),e=t(81320),i=t(50792),h=t(69442),s=t(4327),l=t(8443),f=t(99584),u=t(35154),d=t(88571),p=t(41212),g=t(61309),y=t(87841),x=t(79237),T=new o({Extends:i,initialize:function(M){i.call(this),this.game=M,this.name="TextureManager",this.list={},this._tempCanvas=a.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new y,this.silentWarnings=!1,M.events.once(l.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(h.LOAD,this.updatePending,this),this.on(h.ERROR,this.updatePending,this);var C=this.game.config;this.addBase64("__DEFAULT",C.defaultImage),this.addBase64("__MISSING",C.missingImage),this.addBase64("__WHITE",C.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(l.DESTROY,this.destroy,this),this.game.events.once(l.SYSTEM_READY,function(M){this.stamp=new d(M).setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(h.LOAD),this.off(h.ERROR),this.emit(h.READY))},checkKey:function(C){return this.exists(C)?(this.silentWarnings||console.error("Texture key already in use: "+C),!1):!0},remove:function(C){if(typeof C=="string")if(this.exists(C))C=this.get(C);else return this.silentWarnings||console.warn("No texture found matching key: "+C),this;var M=C.key;return this.list.hasOwnProperty(M)&&(C.destroy(),this.emit(h.REMOVE,M),this.emit(h.REMOVE_KEY+M)),this},removeKey:function(C){return this.list.hasOwnProperty(C)&&delete this.list[C],this},addBase64:function(C,M){if(this.checkKey(C)){var w=this,L=new Image;L.onerror=function(){w.emit(h.ERROR,C)},L.onload=function(){var F=w.create(C,L);g.Image(F,0),w.emit(h.ADD,C,F),w.emit(h.ADD_KEY+C,F),w.emit(h.LOAD,C,F)},L.src=M}return this},getBase64:function(C,M,w,L){w===void 0&&(w="image/png"),L===void 0&&(L=.92);var F="",O=this.getFrame(C,M);if(O&&(O.source.isRenderTexture||O.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(O){var N=O.canvasData,G=a.create2D(this,N.width,N.height),V=G.getContext("2d",{willReadFrequently:!0});N.width>0&&N.height>0&&V.drawImage(O.source.image,N.x,N.y,N.width,N.height,0,0,N.width,N.height),F=G.toDataURL(w,L),a.remove(G)}return F},addImage:function(C,M,w){var L=null;return this.checkKey(C)&&(L=this.create(C,M),g.Image(L,0),w&&L.setDataSource(w),this.emit(h.ADD,C,L),this.emit(h.ADD_KEY+C,L)),L},addGLTexture:function(C,M){var w=null;if(this.checkKey(C)){var L=M.width,F=M.height;w=this.create(C,M,L,F),w.add("__BASE",0,0,0,L,F),this.emit(h.ADD,C,w),this.emit(h.ADD_KEY+C,w)}return w},addCompressedTexture:function(C,M,w){var L=null;if(this.checkKey(C)){if(L=this.create(C,M),L.add("__BASE",0,0,0,M.width,M.height),w){var F=function(N,G,V){Array.isArray(V.textures)||Array.isArray(V.frames)?g.JSONArray(N,G,V):g.JSONHash(N,G,V)};if(Array.isArray(w))for(var O=0;O=O.x&&C=O.y&&M=O.x&&C=O.y&&M{/** + */var o=t(27919),v=t(57382),a=t(83419),r=t(40987),n=t(8054),e=t(81320),i=t(50792),h=t(69442),s=t(4327),l=t(8443),f=t(99584),u=t(35154),d=t(88571),p=t(41212),g=t(61309),y=t(87841),x=t(79237),C=new a({Extends:i,initialize:function(M){i.call(this),this.game=M,this.name="TextureManager",this.list={},this._tempCanvas=o.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new y,this.silentWarnings=!1,M.events.once(l.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(h.LOAD,this.updatePending,this),this.on(h.ERROR,this.updatePending,this);var P=this.game.config;this.addBase64("__DEFAULT",P.defaultImage),this.addBase64("__MISSING",P.missingImage),this.addBase64("__WHITE",P.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(l.DESTROY,this.destroy,this),this.game.events.once(l.SYSTEM_READY,function(M){this.stamp=new d(M).setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(h.LOAD),this.off(h.ERROR),this.emit(h.READY))},checkKey:function(P){return this.exists(P)?(this.silentWarnings||console.error("Texture key already in use: "+P),!1):!0},remove:function(P){if(typeof P=="string")if(this.exists(P))P=this.get(P);else return this.silentWarnings||console.warn("No texture found matching key: "+P),this;var M=P.key;return this.list.hasOwnProperty(M)&&(P.destroy(),this.emit(h.REMOVE,M),this.emit(h.REMOVE_KEY+M)),this},removeKey:function(P){return this.list.hasOwnProperty(P)&&delete this.list[P],this},addBase64:function(P,M){if(this.checkKey(P)){var w=this,I=new Image;I.onerror=function(){w.emit(h.ERROR,P)},I.onload=function(){var L=w.create(P,I);g.Image(L,0),w.emit(h.ADD,P,L),w.emit(h.ADD_KEY+P,L),w.emit(h.LOAD,P,L)},I.src=M}return this},getBase64:function(P,M,w,I){w===void 0&&(w="image/png"),I===void 0&&(I=.92);var L="",B=this.getFrame(P,M);if(B&&(B.source.isRenderTexture||B.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(B){var N=B.canvasData,G=o.create2D(this,N.width,N.height),V=G.getContext("2d",{willReadFrequently:!0});N.width>0&&N.height>0&&V.drawImage(B.source.image,N.x,N.y,N.width,N.height,0,0,N.width,N.height),L=G.toDataURL(w,I),o.remove(G)}return L},addImage:function(P,M,w){var I=null;return this.checkKey(P)&&(I=this.create(P,M),g.Image(I,0),w&&I.setDataSource(w),this.emit(h.ADD,P,I),this.emit(h.ADD_KEY+P,I)),I},addGLTexture:function(P,M){var w=null;if(this.checkKey(P)){var I=M.width,L=M.height;w=this.create(P,M,I,L),w.add("__BASE",0,0,0,I,L),this.emit(h.ADD,P,w),this.emit(h.ADD_KEY+P,w)}return w},addCompressedTexture:function(P,M,w){var I=null;if(this.checkKey(P)){if(I=this.create(P,M),I.add("__BASE",0,0,0,M.width,M.height),w){var L=function(N,G,V){Array.isArray(V.textures)||Array.isArray(V.frames)?g.JSONArray(N,G,V):g.JSONHash(N,G,V)};if(Array.isArray(w))for(var B=0;B=B.x&&P=B.y&&M=B.x&&P=B.y&&M{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(27919),v=t(83419),o=t(50030),r=t(29795),n=t(82751),e=new v({initialize:function(h,s,l,f,u){u===void 0&&(u=!1);var d=h.manager.game;this.renderer=d.renderer,this.texture=h,this.source=s,this.image=s.compressed?null:s,this.compressionAlgorithm=s.compressed?s.format:null,this.resolution=1,this.width=l||s.naturalWidth||s.videoWidth||s.width||0,this.height=f||s.naturalHeight||s.videoHeight||s.height||0,this.scaleMode=r.DEFAULT,this.isCanvas=s instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&s instanceof HTMLVideoElement,this.isRenderTexture=s.type==="RenderTexture"||s.type==="DynamicTexture",this.isGLTexture=s instanceof n,this.isPowerOf2=o(this.width,this.height),this.glTexture=null,this.flipY=u,this.init(d)},init:function(i){var h=this.renderer;if(h){var s=this.source;if(h.gl){var l=this.image,f=this.flipY,u=this.width,d=this.height,p=this.scaleMode;this.isCanvas?this.glTexture=h.createCanvasTexture(l,!1,f):this.isVideo?this.glTexture=h.createVideoTexture(l,!1,f):this.isRenderTexture?this.glTexture=h.createTextureFromSource(null,u,d,p):this.isGLTexture?this.glTexture=s:this.compressionAlgorithm?this.glTexture=h.createTextureFromSource(s,void 0,void 0,p):s instanceof Uint8Array?this.glTexture=h.createUint8ArrayTexture(s,u,d,p):this.glTexture=h.createTextureFromSource(l,u,d,p)}else this.isRenderTexture&&(this.image=s.canvas)}i.config.antialias||this.setFilter(1)},setFilter:function(i){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,i),this.scaleMode=i},setFlipY:function(i){return i===void 0&&(i=!0),i===this.flipY?this:(this.flipY=i,this.update(),this)},update:function(){var i=this.renderer,h=this.image,s=this.flipY,l=i.gl;l&&this.isCanvas?i.updateCanvasTexture(h,this.glTexture,s):l&&this.isVideo&&i.updateVideoTexture(h,this.glTexture,s)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&a.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});c.exports=e},19673:c=>{/** + */var o=t(27919),v=t(83419),a=t(50030),r=t(29795),n=t(82751),e=new v({initialize:function(h,s,l,f,u){u===void 0&&(u=!1);var d=h.manager.game;this.renderer=d.renderer,this.texture=h,this.source=s,this.image=s.compressed?null:s,this.compressionAlgorithm=s.compressed?s.format:null,this.resolution=1,this.width=l||s.naturalWidth||s.videoWidth||s.width||0,this.height=f||s.naturalHeight||s.videoHeight||s.height||0,this.scaleMode=r.DEFAULT,this.isCanvas=s instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&s instanceof HTMLVideoElement,this.isRenderTexture=s.type==="RenderTexture"||s.type==="DynamicTexture",this.isGLTexture=s instanceof n,this.isPowerOf2=a(this.width,this.height),this.glTexture=null,this.flipY=u,this.init(d)},init:function(i){var h=this.renderer;if(h){var s=this.source;if(h.gl){var l=this.image,f=this.flipY,u=this.width,d=this.height,p=this.scaleMode;this.isCanvas?this.glTexture=h.createCanvasTexture(l,!1,f):this.isVideo?this.glTexture=h.createVideoTexture(l,!1,f):this.isRenderTexture?this.glTexture=h.createTextureFromSource(null,u,d,p):this.isGLTexture?this.glTexture=s:this.compressionAlgorithm?this.glTexture=h.createTextureFromSource(s,void 0,void 0,p):s instanceof Uint8Array?this.glTexture=h.createUint8ArrayTexture(s,u,d,p):this.glTexture=h.createTextureFromSource(l,u,d,p)}else this.isRenderTexture&&(this.image=s.canvas)}i.config.antialias||this.setFilter(1)},setFilter:function(i){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,i),this.scaleMode=i},setFlipY:function(i){return i===void 0&&(i=!0),i===this.flipY?this:(this.flipY=i,this.update(),this)},update:function(){var i=this.renderer,h=this.image,s=this.flipY,l=i.gl;l&&this.isCanvas?i.updateCanvasTexture(h,this.glTexture,s):l&&this.isVideo&&i.updateVideoTexture(h,this.glTexture,s)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&o.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});c.exports=e},19673:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5389,52 +5389,52 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79291),v=t(19673),o={CanvasTexture:t(57382),DynamicTexture:t(81320),Events:t(69442),FilterMode:v,Frame:t(4327),Parsers:t(61309),Texture:t(79237),TextureManager:t(17130),TextureSource:t(11876)};o=a(!1,o,v),c.exports=o},89905:c=>{/** + */var o=t(79291),v=t(19673),a={CanvasTexture:t(57382),DynamicTexture:t(81320),Events:t(69442),FilterMode:v,Frame:t(4327),Parsers:t(61309),Texture:t(79237),TextureManager:t(17130),TextureSource:t(11876)};a=o(!1,a,v),c.exports=a},89905:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(!v.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var o=t.source[a];t.add("__BASE",a,0,0,o.width,o.height);for(var r=v.getElementsByTagName("SubTexture"),n,e=0;e{/** + */var m=function(t,o,v){if(!v.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var a=t.source[o];t.add("__BASE",o,0,0,a.width,a.height);for(var r=v.getElementsByTagName("SubTexture"),n,e=0;e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.source[a];return t.add("__BASE",a,0,0,v.width,v.height),t};c.exports=m},4832:c=>{/** + */var m=function(t,o){var v=t.source[o];return t.add("__BASE",o,0,0,v.width,v.height),t};c.exports=m},4832:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.source[a];return t.add("__BASE",a,0,0,v.width,v.height),t};c.exports=m},78566:(c,m,t)=>{/** + */var m=function(t,o){var v=t.source[o];return t.add("__BASE",o,0,0,v.width,v.height),t};c.exports=m},78566:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41786),v=function(o,r,n){if(!n.frames&&!n.textures){console.warn("Invalid Texture Atlas JSON Array");return}var e=o.source[r];o.add("__BASE",r,0,0,e.width,e.height);for(var i=Array.isArray(n.textures)?n.textures[r].frames:n.frames,h,s=0;s{/** + */var o=t(41786),v=function(a,r,n){if(!n.frames&&!n.textures){console.warn("Invalid Texture Atlas JSON Array");return}var e=a.source[r];a.add("__BASE",r,0,0,e.width,e.height);for(var i=Array.isArray(n.textures)?n.textures[r].frames:n.frames,h,s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41786),v=function(o,r,n){if(!n.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var e=o.source[r];o.add("__BASE",r,0,0,e.width,e.height);var i=n.frames,h;for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];if(h=o.add(s,r,l.frame.x,l.frame.y,l.frame.w,l.frame.h),!h){console.warn("Invalid atlas json, frame already exists: "+s);continue}l.trimmed&&h.setTrim(l.sourceSize.w,l.sourceSize.h,l.spriteSourceSize.x,l.spriteSourceSize.y,l.spriteSourceSize.w,l.spriteSourceSize.h),l.rotated&&(h.rotated=!0,h.updateUVsInverted());var f=l.anchor||l.pivot;f&&(h.customPivot=!0,h.pivotX=f.x,h.pivotY=f.y),l.scale9Borders&&h.setScale9(l.scale9Borders.x,l.scale9Borders.y,l.scale9Borders.w,l.scale9Borders.h),h.customData=a(l)}for(var u in n)u!=="frames"&&(Array.isArray(n[u])?o.customData[u]=n[u].slice(0):o.customData[u]=n[u]);return o};c.exports=v},31403:c=>{/** + */var o=t(41786),v=function(a,r,n){if(!n.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var e=a.source[r];a.add("__BASE",r,0,0,e.width,e.height);var i=n.frames,h;for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];if(h=a.add(s,r,l.frame.x,l.frame.y,l.frame.w,l.frame.h),!h){console.warn("Invalid atlas json, frame already exists: "+s);continue}l.trimmed&&h.setTrim(l.sourceSize.w,l.sourceSize.h,l.spriteSourceSize.x,l.spriteSourceSize.y,l.spriteSourceSize.w,l.spriteSourceSize.h),l.rotated&&(h.rotated=!0,h.updateUVsInverted());var f=l.anchor||l.pivot;f&&(h.customPivot=!0,h.pivotX=f.x,h.pivotY=f.y),l.scale9Borders&&h.setScale9(l.scale9Borders.x,l.scale9Borders.y,l.scale9Borders.w,l.scale9Borders.h),h.customData=o(l)}for(var u in n)u!=="frames"&&(Array.isArray(n[u])?a.customData[u]=n[u].slice(0):a.customData[u]=n[u]);return a};c.exports=v},31403:c=>{/** * @author Richard Davey * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=[171,75,84,88,32,49,49,187,13,10,26,10],v,o=new Uint8Array(t,0,12);for(v=0;v>1),y=Math.max(1,y>>1),p+=x}return{mipmaps:d,width:s,height:l,internalFormat:h,compressed:!0,generateMipmap:!1}};c.exports=m},82038:c=>{/** + */var m=function(t){var o=[171,75,84,88,32,49,49,187,13,10,26,10],v,a=new Uint8Array(t,0,12);for(v=0;v>1),y=Math.max(1,y>>1),p+=x}return{mipmaps:d,width:s,height:l,internalFormat:h,compressed:!0,generateMipmap:!1}};c.exports=m},82038:c=>{/** * @author Richard Davey * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function m(M,w,L,F,O,N,G){return G===void 0&&(G=16),Math.floor((M+L)/O)*Math.floor((w+F)/N)*G}function t(M,w){return M=Math.max(M,16),w=Math.max(w,8),M*w/4}function a(M,w){return M=Math.max(M,8),w=Math.max(w,8),M*w/2}function v(M,w){return Math.ceil(M/4)*Math.ceil(w/4)*16}function o(M,w){return m(M,w,3,3,4,4,8)}function r(M,w){return m(M,w,3,3,4,4)}function n(M,w){return m(M,w,4,3,5,4)}function e(M,w){return m(M,w,4,4,5,5)}function i(M,w){return m(M,w,5,4,6,5)}function h(M,w){return m(M,w,5,5,6,6)}function s(M,w){return m(M,w,7,4,8,5)}function l(M,w){return m(M,w,7,5,8,6)}function f(M,w){return m(M,w,7,7,8,8)}function u(M,w){return m(M,w,9,4,10,5)}function d(M,w){return m(M,w,9,5,10,6)}function p(M,w){return m(M,w,9,7,10,8)}function g(M,w){return m(M,w,9,9,10,10)}function y(M,w){return m(M,w,11,9,12,10)}function x(M,w){return m(M,w,11,11,12,12)}var T={0:{sizeFunc:t,glFormat:[35841]},1:{sizeFunc:t,glFormat:[35843]},2:{sizeFunc:a,glFormat:[35840]},3:{sizeFunc:a,glFormat:[35842]},6:{sizeFunc:o,glFormat:[36196]},7:{sizeFunc:o,glFormat:[33776,35916]},8:{sizeFunc:r,glFormat:[33777,35917]},9:{sizeFunc:r,glFormat:[33778,35918]},11:{sizeFunc:r,glFormat:[33779,35919]},14:{sizeFunc:v,glFormat:[36494,36495]},15:{sizeFunc:v,glFormat:[36492,36493]},22:{sizeFunc:o,glFormat:[37492,37493]},23:{sizeFunc:r,glFormat:[37496,37497]},24:{sizeFunc:o,glFormat:[37494,37495]},25:{sizeFunc:o,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:i,glFormat:[37811,37843]},31:{sizeFunc:h,glFormat:[37812,37844]},32:{sizeFunc:s,glFormat:[37813,37845]},33:{sizeFunc:l,glFormat:[37814,37846]},34:{sizeFunc:f,glFormat:[37815,37847]},35:{sizeFunc:u,glFormat:[37816,37848]},36:{sizeFunc:d,glFormat:[37817,37849]},37:{sizeFunc:p,glFormat:[37818,37850]},38:{sizeFunc:g,glFormat:[37819,37851]},39:{sizeFunc:y,glFormat:[37820,37852]},40:{sizeFunc:x,glFormat:[37821,37853]}},C=function(M){for(var w=new Uint32Array(M,0,13),L=w[0],F=L===55727696,O=F?w[2]:w[3],N=w[4],G=T[O].glFormat[N],V=T[O].sizeFunc,K=w[11],$=w[7],J=w[6],X=52+w[12],Y=new Uint8Array(M,X),D=new Array(K),z=0,W=$,H=J,Z=0;Z>1),H=Math.max(1,H>>1),z+=Q}return{mipmaps:D,width:$,height:J,internalFormat:G,compressed:!0,generateMipmap:!1}};c.exports=C},75549:(c,m,t)=>{/** + */function m(M,w,I,L,B,N,G){return G===void 0&&(G=16),Math.floor((M+I)/B)*Math.floor((w+L)/N)*G}function t(M,w){return M=Math.max(M,16),w=Math.max(w,8),M*w/4}function o(M,w){return M=Math.max(M,8),w=Math.max(w,8),M*w/2}function v(M,w){return Math.ceil(M/4)*Math.ceil(w/4)*16}function a(M,w){return m(M,w,3,3,4,4,8)}function r(M,w){return m(M,w,3,3,4,4)}function n(M,w){return m(M,w,4,3,5,4)}function e(M,w){return m(M,w,4,4,5,5)}function i(M,w){return m(M,w,5,4,6,5)}function h(M,w){return m(M,w,5,5,6,6)}function s(M,w){return m(M,w,7,4,8,5)}function l(M,w){return m(M,w,7,5,8,6)}function f(M,w){return m(M,w,7,7,8,8)}function u(M,w){return m(M,w,9,4,10,5)}function d(M,w){return m(M,w,9,5,10,6)}function p(M,w){return m(M,w,9,7,10,8)}function g(M,w){return m(M,w,9,9,10,10)}function y(M,w){return m(M,w,11,9,12,10)}function x(M,w){return m(M,w,11,11,12,12)}var C={0:{sizeFunc:t,glFormat:[35841]},1:{sizeFunc:t,glFormat:[35843]},2:{sizeFunc:o,glFormat:[35840]},3:{sizeFunc:o,glFormat:[35842]},6:{sizeFunc:a,glFormat:[36196]},7:{sizeFunc:a,glFormat:[33776,35916]},8:{sizeFunc:r,glFormat:[33777,35917]},9:{sizeFunc:r,glFormat:[33778,35918]},11:{sizeFunc:r,glFormat:[33779,35919]},14:{sizeFunc:v,glFormat:[36494,36495]},15:{sizeFunc:v,glFormat:[36492,36493]},22:{sizeFunc:a,glFormat:[37492,37493]},23:{sizeFunc:r,glFormat:[37496,37497]},24:{sizeFunc:a,glFormat:[37494,37495]},25:{sizeFunc:a,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:i,glFormat:[37811,37843]},31:{sizeFunc:h,glFormat:[37812,37844]},32:{sizeFunc:s,glFormat:[37813,37845]},33:{sizeFunc:l,glFormat:[37814,37846]},34:{sizeFunc:f,glFormat:[37815,37847]},35:{sizeFunc:u,glFormat:[37816,37848]},36:{sizeFunc:d,glFormat:[37817,37849]},37:{sizeFunc:p,glFormat:[37818,37850]},38:{sizeFunc:g,glFormat:[37819,37851]},39:{sizeFunc:y,glFormat:[37820,37852]},40:{sizeFunc:x,glFormat:[37821,37853]}},P=function(M){for(var w=new Uint32Array(M,0,13),I=w[0],L=I===55727696,B=L?w[2]:w[3],N=w[4],G=C[B].glFormat[N],V=C[B].sizeFunc,K=w[11],j=w[7],J=w[6],X=52+w[12],Y=new Uint8Array(M,X),b=new Array(K),z=0,W=j,H=J,Z=0;Z>1),H=Math.max(1,H>>1),z+=Q}return{mipmaps:b,width:j,height:J,internalFormat:G,compressed:!0,generateMipmap:!1}};c.exports=P},75549:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=function(o,r,n,e,i,h,s){var l=a(s,"frameWidth",null),f=a(s,"frameHeight",l);if(l===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=o.source[r];o.add("__BASE",r,0,0,u.width,u.height);var d=a(s,"startFrame",0),p=a(s,"endFrame",-1),g=a(s,"margin",0),y=a(s,"spacing",0),x=Math.floor((i-g+y)/(l+y)),T=Math.floor((h-g+y)/(f+y)),C=x*T;C===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",o.key),(d>C||d<-C)&&(d=0),d<0&&(d=C+d),(p===-1||p>C||pi&&(L=G-i),V>h&&(F=V-h),N>=d&&N<=p&&(o.add(O,r,n+M,e+w,l-L,f-F),O++),M+=l+y,M+l>i&&(M=g,w+=f+y)}return o};c.exports=v},47534:(c,m,t)=>{/** + */var o=t(95540),v=function(a,r,n,e,i,h,s){var l=o(s,"frameWidth",null),f=o(s,"frameHeight",l);if(l===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=a.source[r];a.add("__BASE",r,0,0,u.width,u.height);var d=o(s,"startFrame",0),p=o(s,"endFrame",-1),g=o(s,"margin",0),y=o(s,"spacing",0),x=Math.floor((i-g+y)/(l+y)),C=Math.floor((h-g+y)/(f+y)),P=x*C;P===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",a.key),(d>P||d<-P)&&(d=0),d<0&&(d=P+d),(p===-1||p>P||pi&&(I=G-i),V>h&&(L=V-h),N>=d&&N<=p&&(a.add(B,r,n+M,e+w,l-I,f-L),B++),M+=l+y,M+l>i&&(M=g,w+=f+y)}return a};c.exports=v},47534:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=function(o,r,n){var e=a(n,"frameWidth",null),i=a(n,"frameHeight",e);if(!e)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var h=o.source[0];o.add("__BASE",0,0,0,h.width,h.height),a(n,"startFrame",0),a(n,"endFrame",-1);for(var s=a(n,"margin",0),l=a(n,"spacing",0),f=r.cutX,u=r.cutY,d=r.cutWidth,p=r.cutHeight,g=r.realWidth,y=r.realHeight,x=Math.floor((g-s+l)/(e+l)),T=Math.floor((y-s+l)/(i+l)),C=r.x,M=e-C,w=e-(g-d-C),L=r.y,F=i-L,O=i-(y-p-L),N,G=s,V=s,K=0,$=0,J=0;J{/** + */var o=t(95540),v=function(a,r,n){var e=o(n,"frameWidth",null),i=o(n,"frameHeight",e);if(!e)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var h=a.source[0];a.add("__BASE",0,0,0,h.width,h.height),o(n,"startFrame",0),o(n,"endFrame",-1);for(var s=o(n,"margin",0),l=o(n,"spacing",0),f=r.cutX,u=r.cutY,d=r.cutWidth,p=r.cutHeight,g=r.realWidth,y=r.realHeight,x=Math.floor((g-s+l)/(e+l)),C=Math.floor((y-s+l)/(i+l)),P=r.x,M=e-P,w=e-(g-d-P),I=r.y,L=i-I,B=i-(y-p-I),N,G=s,V=s,K=0,j=0,J=0;J{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=0,t=function(v,o,r,n){var e=m-n.y-n.height;v.add(r,o,n.x,e,n.width,n.height)},a=function(v,o,r){var n=v.source[o];v.add("__BASE",o,0,0,n.width,n.height),m=n.height;for(var e=r.split(` -`),i=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",s="",l={x:0,y:0,width:0,height:0},f=0;f{/** + */var m=0,t=function(v,a,r,n){var e=m-n.y-n.height;v.add(r,a,n.x,e,n.width,n.height)},o=function(v,a,r){var n=v.source[a];v.add("__BASE",a,0,0,n.width,n.height),m=n.height;for(var e=r.split(` +`),i=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",s="",l={x:0,y:0,width:0,height:0},f=0;f{/** * @author Ben Richards * @copyright 2024 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(50030),v=function(h){for(var s=h.mipmaps,l=1;l{/** + */var o=t(50030),v=function(h){for(var s=h.mipmaps,l=1;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5446,331 +5446,331 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e,i,h,s,l){(e===void 0||e<=0)&&(e=32),(i===void 0||i<=0)&&(i=32),h===void 0&&(h=0),s===void 0&&(s=0),this.name=r,this.firstgid=n|0,this.imageWidth=e|0,this.imageHeight=i|0,this.imageMargin=h|0,this.imageSpacing=s|0,this.properties=l||{},this.images=[],this.total=0},containsImageIndex:function(o){return o>=this.firstgid&&o{/** + */var o=t(83419),v=new o({initialize:function(r,n,e,i,h,s,l){(e===void 0||e<=0)&&(e=32),(i===void 0||i<=0)&&(i=32),h===void 0&&(h=0),s===void 0&&(s=0),this.name=r,this.firstgid=n|0,this.imageWidth=e|0,this.imageHeight=i|0,this.imageMargin=h|0,this.imageSpacing=s|0,this.properties=l||{},this.images=[],this.total=0},containsImageIndex:function(a){return a>=this.firstgid&&a{/** * @author Richard Davey * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r){if(this.gids=[],r!==void 0)for(var n=0;n{/** + */var o=t(83419),v=new o({initialize:function(r){if(this.gids=[],r!==void 0)for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(80341),v=t(87010),o=t(46177),r=t(49075),n=function(e,i,h,s,l,f,u,d){h===void 0&&(h=32),s===void 0&&(s=32),l===void 0&&(l=10),f===void 0&&(f=10),d===void 0&&(d=!1);var p=null;if(Array.isArray(u)){var g=i!==void 0?i:"map";p=o(g,a.ARRAY_2D,u,h,s,d)}else if(i!==void 0){var y=e.cache.tilemap.get(i);y?p=o(i,y.format,y.data,h,s,d):console.warn("No map data found for key "+i)}return p===null&&(p=new v({tileWidth:h,tileHeight:s,width:l,height:f})),new r(e,p)};c.exports=n},23029:(c,m,t)=>{/** + */var o=t(80341),v=t(87010),a=t(46177),r=t(49075),n=function(e,i,h,s,l,f,u,d){h===void 0&&(h=32),s===void 0&&(s=32),l===void 0&&(l=10),f===void 0&&(f=10),d===void 0&&(d=!1);var p=null;if(Array.isArray(u)){var g=i!==void 0?i:"map";p=a(g,o.ARRAY_2D,u,h,s,d)}else if(i!==void 0){var y=e.cache.tilemap.get(i);y?p=a(i,y.format,y.data,h,s,d):console.warn("No map data found for key "+i)}return p===null&&(p=new v({tileWidth:h,tileHeight:s,width:l,height:f})),new r(e,p)};c.exports=n},23029:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(91907),r=t(62644),n=t(93232),e=new a({Mixins:[v.AlphaSingle,v.Flip,v.Visible],initialize:function(h,s,l,f,u,d,p,g){this.layer=h,this.index=s,this.x=l,this.y=f,this.width=u,this.height=d,this.right,this.bottom,this.baseWidth=p!==void 0?p:u,this.baseHeight=g!==void 0?g:d,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(i,h){return!(ithis.right||h>this.bottom)},copy:function(i){return this.index=i.index,this.alpha=i.alpha,this.properties=r(i.properties),this.visible=i.visible,this.setFlip(i.flipX,i.flipY),this.tint=i.tint,this.rotation=i.rotation,this.collideUp=i.collideUp,this.collideDown=i.collideDown,this.collideLeft=i.collideLeft,this.collideRight=i.collideRight,this.collisionCallback=i.collisionCallback,this.collisionCallbackContext=i.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(i){var h=this.tilemapLayer;if(h){var s=h.tileToWorldXY(this.x,this.y,void 0,i);return s.x}return this.x*this.baseWidth},getRight:function(i){var h=this.tilemapLayer;return h?this.getLeft(i)+this.width*h.scaleX:this.getLeft(i)+this.width},getTop:function(i){var h=this.tilemapLayer;if(h){var s=h.tileToWorldXY(this.x,this.y,void 0,i);return s.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(i){var h=this.tilemapLayer;return h?this.getTop(i)+this.height*h.scaleY:this.getTop(i)+this.height},getBounds:function(i,h){return h===void 0&&(h=new n),h.x=this.getLeft(i),h.y=this.getTop(i),h.width=this.getRight(i)-h.x,h.height=this.getBottom(i)-h.y,h},getCenterX:function(i){return(this.getLeft(i)+this.getRight(i))/2},getCenterY:function(i){return(this.getTop(i)+this.getBottom(i))/2},intersects:function(i,h,s,l){return!(s<=this.pixelX||l<=this.pixelY||i>=this.right||h>=this.bottom)},isInteresting:function(i,h){return i&&h?this.canCollide||this.hasInterestingFace:i?this.collides:h?this.hasInterestingFace:!1},resetCollision:function(i){if(i===void 0&&(i=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,i){var h=this.tilemapLayer;h&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(i,h,s,l,f){if(h===void 0&&(h=i),s===void 0&&(s=i),l===void 0&&(l=i),f===void 0&&(f=!0),this.collideLeft=i,this.collideRight=h,this.collideUp=s,this.collideDown=l,this.faceLeft=i,this.faceRight=h,this.faceTop=s,this.faceBottom=l,f){var u=this.tilemapLayer;u&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(i,h){return i===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=i,this.collisionCallbackContext=h),this},setSize:function(i,h,s,l){return i!==void 0&&(this.width=i),h!==void 0&&(this.height=h),s!==void 0&&(this.baseWidth=s),l!==void 0&&(this.baseHeight=l),this.updatePixelXY(),this},updatePixelXY:function(){var i=this.layer.orientation;if(i===o.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(i===o.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(i===o.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(i===o.HEXAGONAL){var h=this.layer.staggerAxis,s=this.layer.staggerIndex,l=this.layer.hexSideLength,f,u;h==="y"?(u=(this.baseHeight-l)/2+l,s==="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):h==="x"&&(f=(this.baseWidth-l)/2+l,this.pixelX=this.x*f,s==="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 i=this.layer.tilemapLayer;if(i){var h=i.gidMap[this.index];if(h)return h}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var i=this.tilemapLayer;return i?i.tilemap:null}}});c.exports=e},49075:(c,m,t)=>{/** + */var o=t(83419),v=t(31401),a=t(91907),r=t(62644),n=t(93232),e=new o({Mixins:[v.AlphaSingle,v.Flip,v.Visible],initialize:function(h,s,l,f,u,d,p,g){this.layer=h,this.index=s,this.x=l,this.y=f,this.width=u,this.height=d,this.right,this.bottom,this.baseWidth=p!==void 0?p:u,this.baseHeight=g!==void 0?g:d,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(i,h){return!(ithis.right||h>this.bottom)},copy:function(i){return this.index=i.index,this.alpha=i.alpha,this.properties=r(i.properties),this.visible=i.visible,this.setFlip(i.flipX,i.flipY),this.tint=i.tint,this.rotation=i.rotation,this.collideUp=i.collideUp,this.collideDown=i.collideDown,this.collideLeft=i.collideLeft,this.collideRight=i.collideRight,this.collisionCallback=i.collisionCallback,this.collisionCallbackContext=i.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(i){var h=this.tilemapLayer;if(h){var s=h.tileToWorldXY(this.x,this.y,void 0,i);return s.x}return this.x*this.baseWidth},getRight:function(i){var h=this.tilemapLayer;return h?this.getLeft(i)+this.width*h.scaleX:this.getLeft(i)+this.width},getTop:function(i){var h=this.tilemapLayer;if(h){var s=h.tileToWorldXY(this.x,this.y,void 0,i);return s.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(i){var h=this.tilemapLayer;return h?this.getTop(i)+this.height*h.scaleY:this.getTop(i)+this.height},getBounds:function(i,h){return h===void 0&&(h=new n),h.x=this.getLeft(i),h.y=this.getTop(i),h.width=this.getRight(i)-h.x,h.height=this.getBottom(i)-h.y,h},getCenterX:function(i){return(this.getLeft(i)+this.getRight(i))/2},getCenterY:function(i){return(this.getTop(i)+this.getBottom(i))/2},intersects:function(i,h,s,l){return!(s<=this.pixelX||l<=this.pixelY||i>=this.right||h>=this.bottom)},isInteresting:function(i,h){return i&&h?this.canCollide||this.hasInterestingFace:i?this.collides:h?this.hasInterestingFace:!1},resetCollision:function(i){if(i===void 0&&(i=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,i){var h=this.tilemapLayer;h&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(i,h,s,l,f){if(h===void 0&&(h=i),s===void 0&&(s=i),l===void 0&&(l=i),f===void 0&&(f=!0),this.collideLeft=i,this.collideRight=h,this.collideUp=s,this.collideDown=l,this.faceLeft=i,this.faceRight=h,this.faceTop=s,this.faceBottom=l,f){var u=this.tilemapLayer;u&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(i,h){return i===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=i,this.collisionCallbackContext=h),this},setSize:function(i,h,s,l){return i!==void 0&&(this.width=i),h!==void 0&&(this.height=h),s!==void 0&&(this.baseWidth=s),l!==void 0&&(this.baseHeight=l),this.updatePixelXY(),this},updatePixelXY:function(){var i=this.layer.orientation;if(i===a.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(i===a.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(i===a.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(i===a.HEXAGONAL){var h=this.layer.staggerAxis,s=this.layer.staggerIndex,l=this.layer.hexSideLength,f,u;h==="y"?(u=(this.baseHeight-l)/2+l,s==="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):h==="x"&&(f=(this.baseWidth-l)/2+l,this.pixelX=this.x*f,s==="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 i=this.layer.tilemapLayer;if(i){var h=i.gidMap[this.index];if(h)return h}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var i=this.tilemapLayer;return i?i.tilemap:null}}});c.exports=e},49075:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(84101),v=t(83419),o=t(39506),r=t(80341),n=t(95540),e=t(14977),i=t(27462),h=t(91907),s=t(36305),l=t(19133),f=t(68287),u=t(23029),d=t(81086),p=t(20442),g=t(33629),y=new v({initialize:function(T,C){this.scene=T,this.tileWidth=C.tileWidth,this.tileHeight=C.tileHeight,this.width=C.width,this.height=C.height,this.orientation=C.orientation,this.renderOrder=C.renderOrder,this.format=C.format,this.version=C.version,this.properties=C.properties,this.widthInPixels=C.widthInPixels,this.heightInPixels=C.heightInPixels,this.imageCollections=C.imageCollections,this.images=C.images,this.layers=C.layers,this.tiles=C.tiles,this.tilesets=C.tilesets,this.objects=C.objects,this.currentLayerIndex=0,this.hexSideLength=C.hexSideLength;var M=this.orientation;this._convert={WorldToTileXY:d.GetWorldToTileXYFunction(M),WorldToTileX:d.GetWorldToTileXFunction(M),WorldToTileY:d.GetWorldToTileYFunction(M),TileToWorldXY:d.GetTileToWorldXYFunction(M),TileToWorldX:d.GetTileToWorldXFunction(M),TileToWorldY:d.GetTileToWorldYFunction(M),GetTileCorners:d.GetTileCornersFunction(M)}},setRenderOrder:function(x){var T=["right-down","left-down","right-up","left-up"];return typeof x=="number"&&(x=T[x]),T.indexOf(x)>-1&&(this.renderOrder=x),this},addTilesetImage:function(x,T,C,M,w,L,F,O){if(x===void 0)return null;T==null&&(T=x);var N=this.scene.sys.textures;if(!N.exists(T))return console.warn('Texture key "%s" not found',T),null;var G=N.get(T),V=this.getTilesetIndex(x);if(V===null&&this.format===r.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',x,this.tilesets),null;var K=this.tilesets[V];return K?(K.setTileSize(C,M),K.setSpacing(w,L),K.setImage(G),K):(C===void 0&&(C=this.tileWidth),M===void 0&&(M=this.tileHeight),w===void 0&&(w=0),L===void 0&&(L=0),F===void 0&&(F=0),O===void 0&&(O={x:0,y:0}),K=new g(x,F,C,M,w,L,void 0,void 0,O),K.setImage(G),this.tilesets.push(K),this.tiles=a(this),K)},copy:function(x,T,C,M,w,L,F,O){return O=this.getLayer(O),O!==null?(d.Copy(x,T,C,M,w,L,F,O),this):null},createBlankLayer:function(x,T,C,M,w,L,F,O){C===void 0&&(C=0),M===void 0&&(M=0),w===void 0&&(w=this.width),L===void 0&&(L=this.height),F===void 0&&(F=this.tileWidth),O===void 0&&(O=this.tileHeight);var N=this.getLayerIndex(x);if(N!==null)return console.warn("Invalid Tilemap Layer ID: "+x),null;for(var G=new e({name:x,tileWidth:F,tileHeight:O,width:w,height:L,orientation:this.orientation}),V,K=0;K-1&&this.putTileAt(T,L.x,L.y,C,L.tilemapLayer)}return M},removeTileAt:function(x,T,C,M,w){return C===void 0&&(C=!0),M===void 0&&(M=!0),w=this.getLayer(w),w===null?null:d.RemoveTileAt(x,T,C,M,w)},removeTileAtWorldXY:function(x,T,C,M,w,L){return C===void 0&&(C=!0),M===void 0&&(M=!0),L=this.getLayer(L),L===null?null:d.RemoveTileAtWorldXY(x,T,C,M,w,L)},renderDebug:function(x,T,C){return C=this.getLayer(C),C===null?null:(this.orientation===h.ORTHOGONAL&&d.RenderDebug(x,T,C),this)},renderDebugFull:function(x,T){for(var C=this.layers,M=0;M{/** + */var o=t(84101),v=t(83419),a=t(39506),r=t(80341),n=t(95540),e=t(14977),i=t(27462),h=t(91907),s=t(36305),l=t(19133),f=t(68287),u=t(23029),d=t(81086),p=t(20442),g=t(33629),y=new v({initialize:function(C,P){this.scene=C,this.tileWidth=P.tileWidth,this.tileHeight=P.tileHeight,this.width=P.width,this.height=P.height,this.orientation=P.orientation,this.renderOrder=P.renderOrder,this.format=P.format,this.version=P.version,this.properties=P.properties,this.widthInPixels=P.widthInPixels,this.heightInPixels=P.heightInPixels,this.imageCollections=P.imageCollections,this.images=P.images,this.layers=P.layers,this.tiles=P.tiles,this.tilesets=P.tilesets,this.objects=P.objects,this.currentLayerIndex=0,this.hexSideLength=P.hexSideLength;var M=this.orientation;this._convert={WorldToTileXY:d.GetWorldToTileXYFunction(M),WorldToTileX:d.GetWorldToTileXFunction(M),WorldToTileY:d.GetWorldToTileYFunction(M),TileToWorldXY:d.GetTileToWorldXYFunction(M),TileToWorldX:d.GetTileToWorldXFunction(M),TileToWorldY:d.GetTileToWorldYFunction(M),GetTileCorners:d.GetTileCornersFunction(M)}},setRenderOrder:function(x){var C=["right-down","left-down","right-up","left-up"];return typeof x=="number"&&(x=C[x]),C.indexOf(x)>-1&&(this.renderOrder=x),this},addTilesetImage:function(x,C,P,M,w,I,L,B){if(x===void 0)return null;C==null&&(C=x);var N=this.scene.sys.textures;if(!N.exists(C))return console.warn('Texture key "%s" not found',C),null;var G=N.get(C),V=this.getTilesetIndex(x);if(V===null&&this.format===r.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',x,this.tilesets),null;var K=this.tilesets[V];return K?(K.setTileSize(P,M),K.setSpacing(w,I),K.setImage(G),K):(P===void 0&&(P=this.tileWidth),M===void 0&&(M=this.tileHeight),w===void 0&&(w=0),I===void 0&&(I=0),L===void 0&&(L=0),B===void 0&&(B={x:0,y:0}),K=new g(x,L,P,M,w,I,void 0,void 0,B),K.setImage(G),this.tilesets.push(K),this.tiles=o(this),K)},copy:function(x,C,P,M,w,I,L,B){return B=this.getLayer(B),B!==null?(d.Copy(x,C,P,M,w,I,L,B),this):null},createBlankLayer:function(x,C,P,M,w,I,L,B){P===void 0&&(P=0),M===void 0&&(M=0),w===void 0&&(w=this.width),I===void 0&&(I=this.height),L===void 0&&(L=this.tileWidth),B===void 0&&(B=this.tileHeight);var N=this.getLayerIndex(x);if(N!==null)return console.warn("Invalid Tilemap Layer ID: "+x),null;for(var G=new e({name:x,tileWidth:L,tileHeight:B,width:w,height:I,orientation:this.orientation}),V,K=0;K-1&&this.putTileAt(C,I.x,I.y,P,I.tilemapLayer)}return M},removeTileAt:function(x,C,P,M,w){return P===void 0&&(P=!0),M===void 0&&(M=!0),w=this.getLayer(w),w===null?null:d.RemoveTileAt(x,C,P,M,w)},removeTileAtWorldXY:function(x,C,P,M,w,I){return P===void 0&&(P=!0),M===void 0&&(M=!0),I=this.getLayer(I),I===null?null:d.RemoveTileAtWorldXY(x,C,P,M,w,I)},renderDebug:function(x,C,P){return P=this.getLayer(P),P===null?null:(this.orientation===h.ORTHOGONAL&&d.RenderDebug(x,C,P),this)},renderDebugFull:function(x,C){for(var P=this.layers,M=0;M{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(44603),v=t(31989);a.register("tilemap",function(o){var r=o!==void 0?o:{};return v(this.scene,r.key,r.tileWidth,r.tileHeight,r.width,r.height,r.data,r.insertNull)})},46029:(c,m,t)=>{/** + */var o=t(44603),v=t(31989);o.register("tilemap",function(a){var r=a!==void 0?a:{};return v(this.scene,r.key,r.tileWidth,r.tileHeight,r.width,r.height,r.data,r.insertNull)})},46029:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(31989);a.register("tilemap",function(o,r,n,e,i,h,s){return o===null&&(o=void 0),r===null&&(r=void 0),n===null&&(n=void 0),e===null&&(e=void 0),i===null&&(i=void 0),v(this.scene,o,r,n,e,i,h,s)})},20442:(c,m,t)=>{/** + */var o=t(39429),v=t(31989);o.register("tilemap",function(a,r,n,e,i,h,s){return a===null&&(a=void 0),r===null&&(r=void 0),n===null&&(n=void 0),e===null&&(e=void 0),i===null&&(i=void 0),v(this.scene,a,r,n,e,i,h,s)})},20442:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(78389),o=t(31401),r=t(95643),n=t(81086),e=t(19218),i=t(26099),h=new a({Extends:r,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.Transform,o.Visible,o.ScrollFactor,v,e],initialize:function(l,f,u,d,p,g){r.call(this,l,"TilemapLayer"),this.isTilemap=!0,this.tilemap=f,this.layerIndex=u,this.layer=f.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 i,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(d),this.setAlpha(this.layer.alpha),this.setPosition(p,g),this.setOrigin(0,0),this.setSize(f.tileWidth*this.layer.width,f.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(s){var l=[],f=[],u=this.tilemap;Array.isArray(s)||(s=[s]);for(var d=0;d=0&&s<4&&(this._renderOrder=s),this},calculateFacesAt:function(s,l){return n.CalculateFacesAt(s,l,this.layer),this},calculateFacesWithin:function(s,l,f,u){return n.CalculateFacesWithin(s,l,f,u,this.layer),this},createFromTiles:function(s,l,f,u,d){return n.CreateFromTiles(s,l,f,u,d,this.layer)},cull:function(s){return this.cullCallback(this.layer,s,this.culledTiles,this._renderOrder)},copy:function(s,l,f,u,d,p,g){return n.Copy(s,l,f,u,d,p,g,this.layer),this},fill:function(s,l,f,u,d,p){return n.Fill(s,l,f,u,d,p,this.layer),this},filterTiles:function(s,l,f,u,d,p,g){return n.FilterTiles(s,l,f,u,d,p,g,this.layer)},findByIndex:function(s,l,f){return n.FindByIndex(s,l,f,this.layer)},findTile:function(s,l,f,u,d,p,g){return n.FindTile(s,l,f,u,d,p,g,this.layer)},forEachTile:function(s,l,f,u,d,p,g){return n.ForEachTile(s,l,f,u,d,p,g,this.layer),this},setTint:function(s,l,f,u,d,p){s===void 0&&(s=16777215);var g=function(y){y.tint=s,y.tintFill=!1};return this.forEachTile(g,this,l,f,u,d,p)},setTintFill:function(s,l,f,u,d,p){s===void 0&&(s=16777215);var g=function(y){y.tint=s,y.tintFill=!0};return this.forEachTile(g,this,l,f,u,d,p)},getTileAt:function(s,l,f){return n.GetTileAt(s,l,f,this.layer)},getTileAtWorldXY:function(s,l,f,u){return n.GetTileAtWorldXY(s,l,f,u,this.layer)},getIsoTileAtWorldXY:function(s,l,f,u,d){f===void 0&&(f=!0);var p=this.tempVec;return n.IsometricWorldToTileXY(s,l,!0,p,d,this.layer,f),this.getTileAt(p.x,p.y,u)},getTilesWithin:function(s,l,f,u,d){return n.GetTilesWithin(s,l,f,u,d,this.layer)},getTilesWithinShape:function(s,l,f){return n.GetTilesWithinShape(s,l,f,this.layer)},getTilesWithinWorldXY:function(s,l,f,u,d,p){return n.GetTilesWithinWorldXY(s,l,f,u,d,p,this.layer)},hasTileAt:function(s,l){return n.HasTileAt(s,l,this.layer)},hasTileAtWorldXY:function(s,l,f){return n.HasTileAtWorldXY(s,l,f,this.layer)},putTileAt:function(s,l,f,u){return n.PutTileAt(s,l,f,u,this.layer)},putTileAtWorldXY:function(s,l,f,u,d){return n.PutTileAtWorldXY(s,l,f,u,d,this.layer)},putTilesAt:function(s,l,f,u){return n.PutTilesAt(s,l,f,u,this.layer),this},randomize:function(s,l,f,u,d){return n.Randomize(s,l,f,u,d,this.layer),this},removeTileAt:function(s,l,f,u){return n.RemoveTileAt(s,l,f,u,this.layer)},removeTileAtWorldXY:function(s,l,f,u,d){return n.RemoveTileAtWorldXY(s,l,f,u,d,this.layer)},renderDebug:function(s,l){return n.RenderDebug(s,l,this.layer),this},replaceByIndex:function(s,l,f,u,d,p){return n.ReplaceByIndex(s,l,f,u,d,p,this.layer),this},setSkipCull:function(s){return s===void 0&&(s=!0),this.skipCull=s,this},setCullPadding:function(s,l){return s===void 0&&(s=1),l===void 0&&(l=1),this.cullPaddingX=s,this.cullPaddingY=l,this},setCollision:function(s,l,f,u){return n.SetCollision(s,l,f,this.layer,u),this},setCollisionBetween:function(s,l,f,u){return n.SetCollisionBetween(s,l,f,u,this.layer),this},setCollisionByProperty:function(s,l,f){return n.SetCollisionByProperty(s,l,f,this.layer),this},setCollisionByExclusion:function(s,l,f){return n.SetCollisionByExclusion(s,l,f,this.layer),this},setCollisionFromCollisionGroup:function(s,l){return n.SetCollisionFromCollisionGroup(s,l,this.layer),this},setTileIndexCallback:function(s,l,f){return n.SetTileIndexCallback(s,l,f,this.layer),this},setTileLocationCallback:function(s,l,f,u,d,p){return n.SetTileLocationCallback(s,l,f,u,d,p,this.layer),this},shuffle:function(s,l,f,u){return n.Shuffle(s,l,f,u,this.layer),this},swapByIndex:function(s,l,f,u,d,p){return n.SwapByIndex(s,l,f,u,d,p,this.layer),this},tileToWorldX:function(s,l){return this.tilemap.tileToWorldX(s,l,this)},tileToWorldY:function(s,l){return this.tilemap.tileToWorldY(s,l,this)},tileToWorldXY:function(s,l,f,u){return this.tilemap.tileToWorldXY(s,l,f,u,this)},getTileCorners:function(s,l,f){return this.tilemap.getTileCorners(s,l,f,this)},weightedRandomize:function(s,l,f,u,d){return n.WeightedRandomize(l,f,u,d,s,this.layer),this},worldToTileX:function(s,l,f){return this.tilemap.worldToTileX(s,l,f,this)},worldToTileY:function(s,l,f){return this.tilemap.worldToTileY(s,l,f,this)},worldToTileXY:function(s,l,f,u,d){return this.tilemap.worldToTileXY(s,l,f,u,d,this)},destroy:function(s){s===void 0&&(s=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),s&&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))}});c.exports=h},16153:(c,m,t)=>{/** + */var o=t(83419),v=t(78389),a=t(31401),r=t(95643),n=t(81086),e=t(19218),i=t(26099),h=new o({Extends:r,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.PostPipeline,a.Transform,a.Visible,a.ScrollFactor,v,e],initialize:function(l,f,u,d,p,g){r.call(this,l,"TilemapLayer"),this.isTilemap=!0,this.tilemap=f,this.layerIndex=u,this.layer=f.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 i,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(d),this.setAlpha(this.layer.alpha),this.setPosition(p,g),this.setOrigin(0,0),this.setSize(f.tileWidth*this.layer.width,f.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(s){var l=[],f=[],u=this.tilemap;Array.isArray(s)||(s=[s]);for(var d=0;d=0&&s<4&&(this._renderOrder=s),this},calculateFacesAt:function(s,l){return n.CalculateFacesAt(s,l,this.layer),this},calculateFacesWithin:function(s,l,f,u){return n.CalculateFacesWithin(s,l,f,u,this.layer),this},createFromTiles:function(s,l,f,u,d){return n.CreateFromTiles(s,l,f,u,d,this.layer)},cull:function(s){return this.cullCallback(this.layer,s,this.culledTiles,this._renderOrder)},copy:function(s,l,f,u,d,p,g){return n.Copy(s,l,f,u,d,p,g,this.layer),this},fill:function(s,l,f,u,d,p){return n.Fill(s,l,f,u,d,p,this.layer),this},filterTiles:function(s,l,f,u,d,p,g){return n.FilterTiles(s,l,f,u,d,p,g,this.layer)},findByIndex:function(s,l,f){return n.FindByIndex(s,l,f,this.layer)},findTile:function(s,l,f,u,d,p,g){return n.FindTile(s,l,f,u,d,p,g,this.layer)},forEachTile:function(s,l,f,u,d,p,g){return n.ForEachTile(s,l,f,u,d,p,g,this.layer),this},setTint:function(s,l,f,u,d,p){s===void 0&&(s=16777215);var g=function(y){y.tint=s,y.tintFill=!1};return this.forEachTile(g,this,l,f,u,d,p)},setTintFill:function(s,l,f,u,d,p){s===void 0&&(s=16777215);var g=function(y){y.tint=s,y.tintFill=!0};return this.forEachTile(g,this,l,f,u,d,p)},getTileAt:function(s,l,f){return n.GetTileAt(s,l,f,this.layer)},getTileAtWorldXY:function(s,l,f,u){return n.GetTileAtWorldXY(s,l,f,u,this.layer)},getIsoTileAtWorldXY:function(s,l,f,u,d){f===void 0&&(f=!0);var p=this.tempVec;return n.IsometricWorldToTileXY(s,l,!0,p,d,this.layer,f),this.getTileAt(p.x,p.y,u)},getTilesWithin:function(s,l,f,u,d){return n.GetTilesWithin(s,l,f,u,d,this.layer)},getTilesWithinShape:function(s,l,f){return n.GetTilesWithinShape(s,l,f,this.layer)},getTilesWithinWorldXY:function(s,l,f,u,d,p){return n.GetTilesWithinWorldXY(s,l,f,u,d,p,this.layer)},hasTileAt:function(s,l){return n.HasTileAt(s,l,this.layer)},hasTileAtWorldXY:function(s,l,f){return n.HasTileAtWorldXY(s,l,f,this.layer)},putTileAt:function(s,l,f,u){return n.PutTileAt(s,l,f,u,this.layer)},putTileAtWorldXY:function(s,l,f,u,d){return n.PutTileAtWorldXY(s,l,f,u,d,this.layer)},putTilesAt:function(s,l,f,u){return n.PutTilesAt(s,l,f,u,this.layer),this},randomize:function(s,l,f,u,d){return n.Randomize(s,l,f,u,d,this.layer),this},removeTileAt:function(s,l,f,u){return n.RemoveTileAt(s,l,f,u,this.layer)},removeTileAtWorldXY:function(s,l,f,u,d){return n.RemoveTileAtWorldXY(s,l,f,u,d,this.layer)},renderDebug:function(s,l){return n.RenderDebug(s,l,this.layer),this},replaceByIndex:function(s,l,f,u,d,p){return n.ReplaceByIndex(s,l,f,u,d,p,this.layer),this},setSkipCull:function(s){return s===void 0&&(s=!0),this.skipCull=s,this},setCullPadding:function(s,l){return s===void 0&&(s=1),l===void 0&&(l=1),this.cullPaddingX=s,this.cullPaddingY=l,this},setCollision:function(s,l,f,u){return n.SetCollision(s,l,f,this.layer,u),this},setCollisionBetween:function(s,l,f,u){return n.SetCollisionBetween(s,l,f,u,this.layer),this},setCollisionByProperty:function(s,l,f){return n.SetCollisionByProperty(s,l,f,this.layer),this},setCollisionByExclusion:function(s,l,f){return n.SetCollisionByExclusion(s,l,f,this.layer),this},setCollisionFromCollisionGroup:function(s,l){return n.SetCollisionFromCollisionGroup(s,l,this.layer),this},setTileIndexCallback:function(s,l,f){return n.SetTileIndexCallback(s,l,f,this.layer),this},setTileLocationCallback:function(s,l,f,u,d,p){return n.SetTileLocationCallback(s,l,f,u,d,p,this.layer),this},shuffle:function(s,l,f,u){return n.Shuffle(s,l,f,u,this.layer),this},swapByIndex:function(s,l,f,u,d,p){return n.SwapByIndex(s,l,f,u,d,p,this.layer),this},tileToWorldX:function(s,l){return this.tilemap.tileToWorldX(s,l,this)},tileToWorldY:function(s,l){return this.tilemap.tileToWorldY(s,l,this)},tileToWorldXY:function(s,l,f,u){return this.tilemap.tileToWorldXY(s,l,f,u,this)},getTileCorners:function(s,l,f){return this.tilemap.getTileCorners(s,l,f,this)},weightedRandomize:function(s,l,f,u,d){return n.WeightedRandomize(l,f,u,d,s,this.layer),this},worldToTileX:function(s,l,f){return this.tilemap.worldToTileX(s,l,f,this)},worldToTileY:function(s,l,f){return this.tilemap.worldToTileY(s,l,f,this)},worldToTileXY:function(s,l,f,u,d){return this.tilemap.worldToTileXY(s,l,f,u,d,this)},destroy:function(s){s===void 0&&(s=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),s&&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))}});c.exports=h},16153:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(61340),v=new a,o=new a,r=new a,n=function(e,i,h,s){var l=i.cull(h),f=l.length,u=h.alpha*i.alpha;if(!(f===0||u<=0)){var d=v,p=o,g=r;p.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),d.copyFrom(h.matrix);var y=e.currentContext,x=i.gidMap;y.save(),s?(d.multiplyWithOffset(s,-h.scrollX*i.scrollFactorX,-h.scrollY*i.scrollFactorY),p.e=i.x,p.f=i.y,d.multiply(p,g),g.copyToContext(y)):(p.e-=h.scrollX*i.scrollFactorX,p.f-=h.scrollY*i.scrollFactorY,p.copyToContext(y)),(!e.antialias||i.scaleX>1||i.scaleY>1)&&(y.imageSmoothingEnabled=!1);for(var T=0;T{/** + */var o=t(61340),v=new o,a=new o,r=new o,n=function(e,i,h,s){var l=i.cull(h),f=l.length,u=h.alpha*i.alpha;if(!(f===0||u<=0)){var d=v,p=a,g=r;p.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),d.copyFrom(h.matrix);var y=e.currentContext,x=i.gidMap;y.save(),s?(d.multiplyWithOffset(s,-h.scrollX*i.scrollFactorX,-h.scrollY*i.scrollFactorY),p.e=i.x,p.f=i.y,d.multiply(p,g),g.copyToContext(y)):(p.e-=h.scrollX*i.scrollFactorX,p.f-=h.scrollY*i.scrollFactorY,p.copyToContext(y)),(!e.antialias||i.scaleX>1||i.scaleY>1)&&(y.imageSmoothingEnabled=!1);for(var C=0;C{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(99558),o=t(16153),c.exports={renderWebGL:v,renderCanvas:o}},99558:(c,m,t)=>{/** + */var o=t(29747),v=o,a=o;v=t(99558),a=t(16153),c.exports={renderWebGL:v,renderCanvas:a}},99558:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70554),v=function(o,r,n){var e=r.cull(n),i=e.length,h=n.alpha*r.alpha;if(!(i===0||h<=0)){var s=r.gidMap,l=o.pipelines.set(r.pipeline,r),f=a.getTintAppendFloatAlpha,u=r.scrollFactorX,d=r.scrollFactorY,p=r.x,g=r.y,y=r.scaleX,x=r.scaleY;o.pipelines.preBatch(r);for(var T=0;T{/** + */var o=t(70554),v=function(a,r,n){var e=r.cull(n),i=e.length,h=n.alpha*r.alpha;if(!(i===0||h<=0)){var s=r.gidMap,l=a.pipelines.set(r.pipeline,r),f=o.getTintAppendFloatAlpha,u=r.scrollFactorX,d=r.scrollFactorY,p=r.x,g=r.y,y=r.scaleX,x=r.scaleY;a.pipelines.preBatch(r);for(var C=0;C{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(26099),o=new a({initialize:function(n,e,i,h,s,l,f,u,d){(i===void 0||i<=0)&&(i=32),(h===void 0||h<=0)&&(h=32),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f={}),u===void 0&&(u={}),this.name=n,this.firstgid=e,this.tileWidth=i,this.tileHeight=h,this.tileMargin=s,this.tileSpacing=l,this.tileProperties=f,this.tileData=u,this.tileOffset=new v,d!==void 0&&this.tileOffset.set(d.x,d.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&&re.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,i){e===void 0&&(e=0),i===void 0&&(i=0);var h=(n-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),s=(r-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(h%1!==0||s%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),h=Math.floor(h),s=Math.floor(s),this.rows=h,this.columns=s,this.total=h*s,this.texCoordinates.length=0;for(var l=this.tileMargin+e,f=this.tileMargin+i,u=0;u{/** + */var o=t(83419),v=t(26099),a=new o({initialize:function(n,e,i,h,s,l,f,u,d){(i===void 0||i<=0)&&(i=32),(h===void 0||h<=0)&&(h=32),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f={}),u===void 0&&(u={}),this.name=n,this.firstgid=e,this.tileWidth=i,this.tileHeight=h,this.tileMargin=s,this.tileSpacing=l,this.tileProperties=f,this.tileData=u,this.tileOffset=new v,d!==void 0&&this.tileOffset.set(d.x,d.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&&re.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,i){e===void 0&&(e=0),i===void 0&&(i=0);var h=(n-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),s=(r-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(h%1!==0||s%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),h=Math.floor(h),s=Math.floor(s),this.rows=h,this.columns=s,this.total=h*s,this.texCoordinates.length=0;for(var l=this.tileMargin+e,f=this.tileMargin+i,u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7423),v=function(o,r,n){var e=a(o,r,!0,n),i=a(o,r-1,!0,n),h=a(o,r+1,!0,n),s=a(o-1,r,!0,n),l=a(o+1,r,!0,n),f=e&&e.collides;return f&&(e.faceTop=!0,e.faceBottom=!0,e.faceLeft=!0,e.faceRight=!0),i&&i.collides&&(f&&(e.faceTop=!1),i.faceBottom=!f),h&&h.collides&&(f&&(e.faceBottom=!1),h.faceTop=!f),s&&s.collides&&(f&&(e.faceLeft=!1),s.faceRight=!f),l&&l.collides&&(f&&(e.faceRight=!1),l.faceLeft=!f),e&&!e.collides&&e.resetFaces(),e};c.exports=v},42573:(c,m,t)=>{/** + */var o=t(7423),v=function(a,r,n){var e=o(a,r,!0,n),i=o(a,r-1,!0,n),h=o(a,r+1,!0,n),s=o(a-1,r,!0,n),l=o(a+1,r,!0,n),f=e&&e.collides;return f&&(e.faceTop=!0,e.faceBottom=!0,e.faceLeft=!0,e.faceRight=!0),i&&i.collides&&(f&&(e.faceTop=!1),i.faceBottom=!f),h&&h.collides&&(f&&(e.faceBottom=!1),h.faceTop=!f),s&&s.collides&&(f&&(e.faceLeft=!1),s.faceRight=!f),l&&l.collides&&(f&&(e.faceRight=!1),l.faceLeft=!f),e&&!e.collides&&e.resetFaces(),e};c.exports=v},42573:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7423),v=t(7386),o=function(r,n,e,i,h){for(var s=null,l=null,f=null,u=null,d=v(r,n,e,i,null,h),p=0;p{/** + */var o=t(7423),v=t(7386),a=function(r,n,e,i,h){for(var s=null,l=null,f=null,u=null,d=v(r,n,e,i,null,h),p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=new a,o=function(r,n,e,i){var h=e.tilemapLayer,s=h.cullPaddingX,l=h.cullPaddingY,f=h.tilemap.tileToWorldXY(r,n,v,i,h);return f.x>i.worldView.x+h.scaleX*e.tileWidth*(-s-.5)&&f.xi.worldView.y+h.scaleY*e.tileHeight*(-l-1)&&f.y{/** + */var o=t(26099),v=new o,a=function(r,n,e,i){var h=e.tilemapLayer,s=h.cullPaddingX,l=h.cullPaddingY,f=h.tilemap.tileToWorldXY(r,n,v,i,h);return f.x>i.worldView.x+h.scaleX*e.tileWidth*(-s-.5)&&f.xi.worldView.y+h.scaleY*e.tileHeight*(-l-1)&&f.y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(42573),v=t(7386),o=t(62991),r=t(23029),n=function(e,i,h,s,l,f,u,d){u===void 0&&(u=!0);var p=v(e,i,h,s,null,d),g=[];p.forEach(function(L){var F=new r(L.layer,L.index,L.x,L.y,L.width,L.height,L.baseWidth,L.baseHeight);F.copy(L),g.push(F)});for(var y=l-e,x=f-i,T=0;T{/** + */var o=t(42573),v=t(7386),a=t(62991),r=t(23029),n=function(e,i,h,s,l,f,u,d){u===void 0&&(u=!0);var p=v(e,i,h,s,null,d),g=[];p.forEach(function(I){var L=new r(I.layer,I.index,I.x,I.y,I.width,I.height,I.baseWidth,I.baseHeight);L.copy(I),g.push(L)});for(var y=l-e,x=f-i,C=0;C{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62644),v=t(7386),o=t(27987),r=function(n,e,i,h,s,l){i||(i={}),Array.isArray(n)||(n=[n]);var f=l.tilemapLayer;h||(h=f.scene),s||(s=h.cameras.main);var u=l.width,d=l.height,p=v(0,0,u,d,null,l),g=[],y,x=function(w,L,F){for(var O=0;O{/** + */var o=t(62644),v=t(7386),a=t(27987),r=function(n,e,i,h,s,l){i||(i={}),Array.isArray(n)||(n=[n]);var f=l.tilemapLayer;h||(h=f.scene),s||(s=h.cameras.main);var u=l.width,d=l.height,p=v(0,0,u,d,null,l),g=[],y,x=function(w,I,L){for(var B=0;B{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=t(63448),o=t(56583),r=new a,n=function(e,i){var h=e.tilemapLayer.tilemap,s=e.tilemapLayer,l=Math.floor(h.tileWidth*s.scaleX),f=Math.floor(h.tileHeight*s.scaleY),u=o(i.worldView.x-s.x,l,0,!0)-s.cullPaddingX,d=v(i.worldView.right-s.x,l,0,!0)+s.cullPaddingX,p=o(i.worldView.y-s.y,f,0,!0)-s.cullPaddingY,g=v(i.worldView.bottom-s.y,f,0,!0)+s.cullPaddingY;return r.setTo(u,p,d-u,g-p)};c.exports=n},30003:(c,m,t)=>{/** + */var o=t(87841),v=t(63448),a=t(56583),r=new o,n=function(e,i){var h=e.tilemapLayer.tilemap,s=e.tilemapLayer,l=Math.floor(h.tileWidth*s.scaleX),f=Math.floor(h.tileHeight*s.scaleY),u=a(i.worldView.x-s.x,l,0,!0)-s.cullPaddingX,d=v(i.worldView.right-s.x,l,0,!0)+s.cullPaddingX,p=a(i.worldView.y-s.y,f,0,!0)-s.cullPaddingY,g=v(i.worldView.bottom-s.y,f,0,!0)+s.cullPaddingY;return r.setTo(u,p,d-u,g-p)};c.exports=n},30003:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(19545),v=t(32483),o=function(r,n,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var h=r.tilemapLayer,s=a(r,n);return(h.skipCull||h.scrollFactorX!==1||h.scrollFactorY!==1)&&(s.left=0,s.right=r.width,s.top=0,s.bottom=r.height),v(r,s,i,e),e};c.exports=o},35137:(c,m,t)=>{/** + */var o=t(19545),v=t(32483),a=function(r,n,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var h=r.tilemapLayer,s=o(r,n);return(h.skipCull||h.scrollFactorX!==1||h.scrollFactorY!==1)&&(s.left=0,s.right=r.width,s.top=0,s.bottom=r.height),v(r,s,i,e),e};c.exports=a},35137:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=t(42573),o=t(20576),r=function(n,e,i,h,s,l,f){for(var u=f.collideIndexes.indexOf(n)!==-1,d=a(e,i,h,s,null,f),p=0;p{/** + */var o=t(7386),v=t(42573),a=t(20576),r=function(n,e,i,h,s,l,f){for(var u=f.collideIndexes.indexOf(n)!==-1,d=o(e,i,h,s,null,f),p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=function(o,r,n,e,i,h,s,l){var f=a(n,e,i,h,s,l);return f.filter(o,r)};c.exports=v},52692:c=>{/** + */var o=t(7386),v=function(a,r,n,e,i,h,s,l){var f=o(n,e,i,h,s,l);return f.filter(a,r)};c.exports=v},52692:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){a===void 0&&(a=0),v===void 0&&(v=!1);var r=0,n,e,i;if(v){for(e=o.height-1;e>=0;e--)for(n=o.width-1;n>=0;n--)if(i=o.data[e][n],i&&i.index===t){if(r===a)return i;r+=1}}else for(e=0;e{/** + */var m=function(t,o,v,a){o===void 0&&(o=0),v===void 0&&(v=!1);var r=0,n,e,i;if(v){for(e=a.height-1;e>=0;e--)for(n=a.width-1;n>=0;n--)if(i=a.data[e][n],i&&i.index===t){if(r===o)return i;r+=1}}else for(e=0;e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=function(o,r,n,e,i,h,s,l){var f=a(n,e,i,h,s,l);return f.find(o,r)||null};c.exports=v},97560:(c,m,t)=>{/** + */var o=t(7386),v=function(a,r,n,e,i,h,s,l){var f=o(n,e,i,h,s,l);return f.find(a,r)||null};c.exports=v},97560:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=function(o,r,n,e,i,h,s,l){var f=a(n,e,i,h,s,l);f.forEach(o,r)};c.exports=v},43305:(c,m,t)=>{/** + */var o=t(7386),v=function(a,r,n,e,i,h,s,l){var f=o(n,e,i,h,s,l);f.forEach(a,r)};c.exports=v},43305:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(30003),o=t(9474),r=t(14018),n=t(29747),e=t(54503),i=function(h){return h===a.ORTHOGONAL?v:h===a.HEXAGONAL?o:h===a.STAGGERED?e:h===a.ISOMETRIC?r:n};c.exports=i},7423:(c,m,t)=>{/** + */var o=t(91907),v=t(30003),a=t(9474),r=t(14018),n=t(29747),e=t(54503),i=function(h){return h===o.ORTHOGONAL?v:h===o.HEXAGONAL?a:h===o.STAGGERED?e:h===o.ISOMETRIC?r:n};c.exports=i},7423:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62991),v=function(o,r,n,e){if(n===void 0&&(n=!1),a(o,r,e)){var i=e.data[r][o]||null;return i?i.index===-1?n?i:null:i:null}else return null};c.exports=v},60540:(c,m,t)=>{/** + */var o=t(62991),v=function(a,r,n,e){if(n===void 0&&(n=!1),o(a,r,e)){var i=e.data[r][a]||null;return i?i.index===-1?n?i:null:i:null}else return null};c.exports=v},60540:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7423),v=t(26099),o=new v,r=function(n,e,i,h,s){return s.tilemapLayer.worldToTileXY(n,e,!0,o,h),a(o.x,o.y,i,s)};c.exports=r},55826:(c,m,t)=>{/** + */var o=t(7423),v=t(26099),a=new v,r=function(n,e,i,h,s){return s.tilemapLayer.worldToTileXY(n,e,!0,a,h),o(a.x,a.y,i,s)};c.exports=r},55826:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e){var i=e.baseTileWidth,h=e.baseTileHeight,s=e.tilemapLayer,l=0,f=0;s&&(n||(n=s.scene.cameras.main),l=s.x+n.scrollX*(1-s.scrollFactorX),f=s.y+n.scrollY*(1-s.scrollFactorY),i*=s.scaleX,h*=s.scaleY);var u=l+o*i,d=f+r*h;return[new a(u,d),new a(u+i,d),new a(u+i,d+h),new a(u,d+h)]};c.exports=v},11758:(c,m,t)=>{/** + */var o=t(26099),v=function(a,r,n,e){var i=e.baseTileWidth,h=e.baseTileHeight,s=e.tilemapLayer,l=0,f=0;s&&(n||(n=s.scene.cameras.main),l=s.x+n.scrollX*(1-s.scrollFactorX),f=s.y+n.scrollY*(1-s.scrollFactorY),i*=s.scaleX,h*=s.scaleY);var u=l+a*i,d=f+r*h;return[new o(u,d),new o(u+i,d),new o(u+i,d+h),new o(u,d+h)]};c.exports=v},11758:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(27229),o=t(29747),r=t(55826),n=function(e){return e===a.ORTHOGONAL?r:e===a.ISOMETRIC?o:e===a.HEXAGONAL?v:(e===a.STAGGERED,o)};c.exports=n},39167:(c,m,t)=>{/** + */var o=t(91907),v=t(27229),a=t(29747),r=t(55826),n=function(e){return e===o.ORTHOGONAL?r:e===o.ISOMETRIC?a:e===o.HEXAGONAL?v:(e===o.STAGGERED,a)};c.exports=n},39167:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(29747),o=t(97281),r=function(n){return n===a.ORTHOGONAL?o:v};c.exports=r},62e3:(c,m,t)=>{/** + */var o=t(91907),v=t(29747),a=t(97281),r=function(n){return n===o.ORTHOGONAL?a:v};c.exports=r},62e3:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(19951),o=t(14127),r=t(29747),n=t(97202),e=t(70326),i=function(h){return h===a.ORTHOGONAL?e:h===a.ISOMETRIC?o:h===a.HEXAGONAL?v:h===a.STAGGERED?n:r};c.exports=i},5984:(c,m,t)=>{/** + */var o=t(91907),v=t(19951),a=t(14127),r=t(29747),n=t(97202),e=t(70326),i=function(h){return h===o.ORTHOGONAL?e:h===o.ISOMETRIC?a:h===o.HEXAGONAL?v:h===o.STAGGERED?n:r};c.exports=i},5984:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(29747),o=t(28054),r=t(29650),n=function(e){return e===a.ORTHOGONAL?r:e===a.STAGGERED?o:v};c.exports=n},7386:(c,m,t)=>{/** + */var o=t(91907),v=t(29747),a=t(28054),r=t(29650),n=function(e){return e===o.ORTHOGONAL?r:e===o.STAGGERED?a:v};c.exports=n},7386:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=function(o,r,n,e,i,h){o===void 0&&(o=0),r===void 0&&(r=0),n===void 0&&(n=h.width),e===void 0&&(e=h.height),i||(i={});var s=a(i,"isNotEmpty",!1),l=a(i,"isColliding",!1),f=a(i,"hasInterestingFace",!1);o<0&&(n+=o,o=0),r<0&&(e+=r,r=0),o+n>h.width&&(n=Math.max(h.width-o,0)),r+e>h.height&&(e=Math.max(h.height-r,0));for(var u=[],d=r;d{/** + */var o=t(95540),v=function(a,r,n,e,i,h){a===void 0&&(a=0),r===void 0&&(r=0),n===void 0&&(n=h.width),e===void 0&&(e=h.height),i||(i={});var s=o(i,"isNotEmpty",!1),l=o(i,"isColliding",!1),f=o(i,"hasInterestingFace",!1);a<0&&(n+=a,a=0),r<0&&(e+=r,r=0),a+n>h.width&&(n=Math.max(h.width-a,0)),r+e>h.height&&(e=Math.max(h.height-r,0));for(var u=[],d=r;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(55738),v=t(7386),o=t(91865),r=t(29747),n=t(26099),e=function(f,u){return o.RectangleToTriangle(u,f)},i=new n,h=new n,s=new n,l=function(f,u,d,p){if(f===void 0)return[];var g=r;f instanceof a.Circle?g=o.CircleToRectangle:f instanceof a.Rectangle?g=o.RectangleToRectangle:f instanceof a.Triangle?g=e:f instanceof a.Line&&(g=o.LineToRectangle),p.tilemapLayer.worldToTileXY(f.left,f.top,!0,h,d);var y=h.x,x=h.y;p.tilemapLayer.worldToTileXY(f.right,f.bottom,!1,s,d);var T=Math.ceil(s.x),C=Math.ceil(s.y),M=Math.max(T-y,1),w=Math.max(C-x,1),L=v(y,x,M,w,u,p),F=p.tileWidth,O=p.tileHeight;p.tilemapLayer&&(F*=p.tilemapLayer.scaleX,O*=p.tilemapLayer.scaleY);for(var N=[],G=new a.Rectangle(0,0,F,O),V=0;V{/** + */var o=t(55738),v=t(7386),a=t(91865),r=t(29747),n=t(26099),e=function(f,u){return a.RectangleToTriangle(u,f)},i=new n,h=new n,s=new n,l=function(f,u,d,p){if(f===void 0)return[];var g=r;f instanceof o.Circle?g=a.CircleToRectangle:f instanceof o.Rectangle?g=a.RectangleToRectangle:f instanceof o.Triangle?g=e:f instanceof o.Line&&(g=a.LineToRectangle),p.tilemapLayer.worldToTileXY(f.left,f.top,!0,h,d);var y=h.x,x=h.y;p.tilemapLayer.worldToTileXY(f.right,f.bottom,!1,s,d);var C=Math.ceil(s.x),P=Math.ceil(s.y),M=Math.max(C-y,1),w=Math.max(P-x,1),I=v(y,x,M,w,u,p),L=p.tileWidth,B=p.tileHeight;p.tilemapLayer&&(L*=p.tilemapLayer.scaleX,B*=p.tilemapLayer.scaleY);for(var N=[],G=new o.Rectangle(0,0,L,B),V=0;V{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=t(26099),o=new v,r=new v,n=function(e,i,h,s,l,f,u){var d=u.tilemapLayer.tilemap._convert.WorldToTileXY;d(e,i,!0,o,f,u);var p=o.x,g=o.y;d(e+h,i+s,!1,r,f,u);var y=Math.ceil(r.x),x=Math.ceil(r.y);return a(p,g,y-p,x-g,l,u)};c.exports=n},96113:(c,m,t)=>{/** + */var o=t(7386),v=t(26099),a=new v,r=new v,n=function(e,i,h,s,l,f,u){var d=u.tilemapLayer.tilemap._convert.WorldToTileXY;d(e,i,!0,a,f,u);var p=a.x,g=a.y;d(e+h,i+s,!1,r,f,u);var y=Math.ceil(r.x),x=Math.ceil(r.y);return o(p,g,y-p,x-g,l,u)};c.exports=n},96113:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(20242),o=t(10095),r=function(n){return n===a.ORTHOGONAL?o:v};c.exports=r},16926:(c,m,t)=>{/** + */var o=t(91907),v=t(20242),a=t(10095),r=function(n){return n===o.ORTHOGONAL?a:v};c.exports=r},16926:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(86625),o=t(96897),r=t(29747),n=t(15108),e=t(85896),i=function(h){return h===a.ORTHOGONAL?e:h===a.ISOMETRIC?o:h===a.HEXAGONAL?v:h===a.STAGGERED?n:r};c.exports=i},55762:(c,m,t)=>{/** + */var o=t(91907),v=t(86625),a=t(96897),r=t(29747),n=t(15108),e=t(85896),i=function(h){return h===o.ORTHOGONAL?e:h===o.ISOMETRIC?a:h===o.HEXAGONAL?v:h===o.STAGGERED?n:r};c.exports=i},55762:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(20242),o=t(51900),r=t(63288),n=function(e){return e===a.ORTHOGONAL?r:e===a.STAGGERED?o:v};c.exports=n},45091:(c,m,t)=>{/** + */var o=t(91907),v=t(20242),a=t(51900),r=t(63288),n=function(e){return e===o.ORTHOGONAL?r:e===o.STAGGERED?a:v};c.exports=n},45091:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62991),v=function(o,r,n){if(a(o,r,n)){var e=n.data[r][o];return e!==null&&e.index>-1}else return!1};c.exports=v},24152:(c,m,t)=>{/** + */var o=t(62991),v=function(a,r,n){if(o(a,r,n)){var e=n.data[r][a];return e!==null&&e.index>-1}else return!1};c.exports=v},24152:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45091),v=t(26099),o=new v,r=function(n,e,i,h){h.tilemapLayer.worldToTileXY(n,e,!0,o,i);var s=o.x,l=o.y;return a(s,l,h)};c.exports=r},90454:(c,m,t)=>{/** + */var o=t(45091),v=t(26099),a=new v,r=function(n,e,i,h){h.tilemapLayer.worldToTileXY(n,e,!0,a,i);var s=a.x,l=a.y;return o(s,l,h)};c.exports=r},90454:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(63448),v=t(56583),o=function(r,n){var e=r.tilemapLayer.tilemap,i=r.tilemapLayer,h=Math.floor(e.tileWidth*i.scaleX),s=Math.floor(e.tileHeight*i.scaleY),l=r.hexSideLength,f,u,d,p;if(r.staggerAxis==="y"){var g=(s-l)/2+l;f=v(n.worldView.x-i.x,h,0,!0)-i.cullPaddingX,u=a(n.worldView.right-i.x,h,0,!0)+i.cullPaddingX,d=v(n.worldView.y-i.y,g,0,!0)-i.cullPaddingY,p=a(n.worldView.bottom-i.y,g,0,!0)+i.cullPaddingY}else{var y=(h-l)/2+l;f=v(n.worldView.x-i.x,y,0,!0)-i.cullPaddingX,u=a(n.worldView.right-i.x,y,0,!0)+i.cullPaddingX,d=v(n.worldView.y-i.y,s,0,!0)-i.cullPaddingY,p=a(n.worldView.bottom-i.y,s,0,!0)+i.cullPaddingY}return{left:f,right:u,top:d,bottom:p}};c.exports=o},9474:(c,m,t)=>{/** + */var o=t(63448),v=t(56583),a=function(r,n){var e=r.tilemapLayer.tilemap,i=r.tilemapLayer,h=Math.floor(e.tileWidth*i.scaleX),s=Math.floor(e.tileHeight*i.scaleY),l=r.hexSideLength,f,u,d,p;if(r.staggerAxis==="y"){var g=(s-l)/2+l;f=v(n.worldView.x-i.x,h,0,!0)-i.cullPaddingX,u=o(n.worldView.right-i.x,h,0,!0)+i.cullPaddingX,d=v(n.worldView.y-i.y,g,0,!0)-i.cullPaddingY,p=o(n.worldView.bottom-i.y,g,0,!0)+i.cullPaddingY}else{var y=(h-l)/2+l;f=v(n.worldView.x-i.x,y,0,!0)-i.cullPaddingX,u=o(n.worldView.right-i.x,y,0,!0)+i.cullPaddingX,d=v(n.worldView.y-i.y,s,0,!0)-i.cullPaddingY,p=o(n.worldView.bottom-i.y,s,0,!0)+i.cullPaddingY}return{left:f,right:u,top:d,bottom:p}};c.exports=a},9474:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(90454),v=t(32483),o=function(r,n,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var h=r.tilemapLayer,s=a(r,n);return h.skipCull&&h.scrollFactorX===1&&h.scrollFactorY===1&&(s.left=0,s.right=r.width,s.top=0,s.bottom=r.height),v(r,s,i,e),e};c.exports=o},27229:(c,m,t)=>{/** + */var o=t(90454),v=t(32483),a=function(r,n,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var h=r.tilemapLayer,s=o(r,n);return h.skipCull&&h.scrollFactorX===1&&h.scrollFactorY===1&&(s.left=0,s.right=r.width,s.top=0,s.bottom=r.height),v(r,s,i,e),e};c.exports=a},27229:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(19951),v=t(26099),o=new v,r=function(n,e,i,h){var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(s*=f.scaleX,l*=f.scaleY);var u=a(n,e,o,i,h),d=[],p=.5773502691896257,g,y;h.staggerAxis==="y"?(g=p*s,y=l/2):(g=s/2,y=p*l);for(var x=0;x<6;x++){var T=2*Math.PI*(.5-x)/6;d.push(new v(u.x+g*Math.cos(T),u.y+y*Math.sin(T)))}return d};c.exports=r},19951:(c,m,t)=>{/** + */var o=t(19951),v=t(26099),a=new v,r=function(n,e,i,h){var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(s*=f.scaleX,l*=f.scaleY);var u=o(n,e,a,i,h),d=[],p=.5773502691896257,g,y;h.staggerAxis==="y"?(g=p*s,y=l/2):(g=s/2,y=p*l);for(var x=0;x<6;x++){var C=2*Math.PI*(.5-x)/6;d.push(new v(u.x+g*Math.cos(C),u.y+y*Math.sin(C)))}return d};c.exports=r},19951:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i){n||(n=new a);var h=i.baseTileWidth,s=i.baseTileHeight,l=i.tilemapLayer,f=0,u=0;l&&(e||(e=l.scene.cameras.main),f=l.x+e.scrollX*(1-l.scrollFactorX),u=l.y+e.scrollY*(1-l.scrollFactorY),h*=l.scaleX,s*=l.scaleY);var d=h/2,p=s/2,g,y;return i.staggerAxis==="y"?(g=f+h*o+h,y=u+1.5*r*p+p,r%2===0&&(this.staggerIndex==="odd"?g-=d:g+=d)):this.staggerAxis==="x"&&this.staggerIndex==="odd"&&(g=f+1.5*o*d+d,y=u+s*o+s,o%2===0&&(this.staggerIndex==="odd"?y-=p:y+=p)),n.set(g,y)};c.exports=v},86625:(c,m,t)=>{/** + */var o=t(26099),v=function(a,r,n,e,i){n||(n=new o);var h=i.baseTileWidth,s=i.baseTileHeight,l=i.tilemapLayer,f=0,u=0;l&&(e||(e=l.scene.cameras.main),f=l.x+e.scrollX*(1-l.scrollFactorX),u=l.y+e.scrollY*(1-l.scrollFactorY),h*=l.scaleX,s*=l.scaleY);var d=h/2,p=s/2,g,y;return i.staggerAxis==="y"?(g=f+h*a+h,y=u+1.5*r*p+p,r%2===0&&(this.staggerIndex==="odd"?g-=d:g+=d)):this.staggerAxis==="x"&&this.staggerIndex==="odd"&&(g=f+1.5*a*d+d,y=u+s*a+s,a%2===0&&(this.staggerIndex==="odd"?y-=p:y+=p)),n.set(g,y)};c.exports=v},86625:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i,h){e||(e=new a);var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(i||(i=f.scene.cameras.main),o=o-(f.x+i.scrollX*(1-f.scrollFactorX)),r=r-(f.y+i.scrollY*(1-f.scrollFactorY)),s*=f.scaleX,l*=f.scaleY);var u=.5773502691896257,d=-.3333333333333333,p=0,g=.6666666666666666,y=s/2,x=l/2,T,C,M,w,L;h.staggerAxis==="y"?(T=(o-y)/(u*s),C=(r-x)/x,M=u*T+d*C,w=p*T+g*C):(T=(o-y)/y,C=(r-x)/(u*l),M=d*T+u*C,w=g*T+p*C),L=-M-w;var F=Math.round(M),O=Math.round(w),N=Math.round(L),G=Math.abs(F-M),V=Math.abs(O-w),K=Math.abs(N-L);G>V&&G>K?F=-O-N:V>K&&(O=-F-N);var $,J=O;return h.staggerIndex==="odd"?$=J%2===0?O/2+F:O/2+F-.5:$=J%2===0?O/2+F:O/2+F+.5,e.set($,J)};c.exports=v},62991:c=>{/** + */var o=t(26099),v=function(a,r,n,e,i,h){e||(e=new o);var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(i||(i=f.scene.cameras.main),a=a-(f.x+i.scrollX*(1-f.scrollFactorX)),r=r-(f.y+i.scrollY*(1-f.scrollFactorY)),s*=f.scaleX,l*=f.scaleY);var u=.5773502691896257,d=-.3333333333333333,p=0,g=.6666666666666666,y=s/2,x=l/2,C,P,M,w,I;h.staggerAxis==="y"?(C=(a-y)/(u*s),P=(r-x)/x,M=u*C+d*P,w=p*C+g*P):(C=(a-y)/y,P=(r-x)/(u*l),M=d*C+u*P,w=g*C+p*P),I=-M-w;var L=Math.round(M),B=Math.round(w),N=Math.round(I),G=Math.abs(L-M),V=Math.abs(B-w),K=Math.abs(N-I);G>V&&G>K?L=-B-N:V>K&&(B=-L-N);var j,J=B;return h.staggerIndex==="odd"?j=J%2===0?B/2+L:B/2+L-.5:j=J%2===0?B/2+L:B/2+L+.5,e.set(j,J)};c.exports=v},62991:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t>=0&&t=0&&a{/** + */var m=function(t,o,v){return t>=0&&t=0&&o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(33528),v=function(o,r,n,e){n===void 0&&(n=[]),e===void 0&&(e=0),n.length=0;var i=o.tilemapLayer,h=o.data,s=o.width,l=o.height,f=i.skipCull,u=0,d=s,p=0,g=l,y,x,T;if(e===0)for(x=p;x=u;y--)T=h[x][y],!(!T||T.index===-1||!T.visible||T.alpha===0)&&(!f&&!a(y,x,o,r)||n.push(T));else if(e===2)for(x=g;x>=p;x--)for(y=u;y=p;x--)for(y=d;y>=u;y--)T=h[x][y],!(!T||T.index===-1||!T.visible||T.alpha===0)&&(!f&&!a(y,x,o,r)||n.push(T));return i.tilesDrawn=n.length,i.tilesTotal=s*l,n};c.exports=v},14127:(c,m,t)=>{/** + */var o=t(33528),v=function(a,r,n,e){n===void 0&&(n=[]),e===void 0&&(e=0),n.length=0;var i=a.tilemapLayer,h=a.data,s=a.width,l=a.height,f=i.skipCull,u=0,d=s,p=0,g=l,y,x,C;if(e===0)for(x=p;x=u;y--)C=h[x][y],!(!C||C.index===-1||!C.visible||C.alpha===0)&&(!f&&!o(y,x,a,r)||n.push(C));else if(e===2)for(x=g;x>=p;x--)for(y=u;y=p;x--)for(y=d;y>=u;y--)C=h[x][y],!(!C||C.index===-1||!C.visible||C.alpha===0)&&(!f&&!o(y,x,a,r)||n.push(C));return i.tilesDrawn=n.length,i.tilesTotal=s*l,n};c.exports=v},14127:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i){n||(n=new a);var h=i.baseTileWidth,s=i.baseTileHeight,l=i.tilemapLayer,f=0,u=0;l&&(e||(e=l.scene.cameras.main),f=l.x+e.scrollX*(1-l.scrollFactorX),h*=l.scaleX,u=l.y+e.scrollY*(1-l.scrollFactorY),s*=l.scaleY);var d=f+(o-r)*(h/2),p=u+(o+r)*(s/2);return n.set(d,p)};c.exports=v},96897:(c,m,t)=>{/** + */var o=t(26099),v=function(a,r,n,e,i){n||(n=new o);var h=i.baseTileWidth,s=i.baseTileHeight,l=i.tilemapLayer,f=0,u=0;l&&(e||(e=l.scene.cameras.main),f=l.x+e.scrollX*(1-l.scrollFactorX),h*=l.scaleX,u=l.y+e.scrollY*(1-l.scrollFactorY),s*=l.scaleY);var d=f+(a-r)*(h/2),p=u+(a+r)*(s/2);return n.set(d,p)};c.exports=v},96897:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i,h,s){e||(e=new a);var l=h.baseTileWidth,f=h.baseTileHeight,u=h.tilemapLayer;u&&(i||(i=u.scene.cameras.main),r=r-(u.y+i.scrollY*(1-u.scrollFactorY)),f*=u.scaleY,o=o-(u.x+i.scrollX*(1-u.scrollFactorX)),l*=u.scaleX);var d=l/2,p=f/2;o=o-d,s||(r=r-f);var g=.5*(o/d+r/p),y=.5*(-o/d+r/p);return n&&(g=Math.floor(g),y=Math.floor(y)),e.set(g,y)};c.exports=v},71558:(c,m,t)=>{/** + */var o=t(26099),v=function(a,r,n,e,i,h,s){e||(e=new o);var l=h.baseTileWidth,f=h.baseTileHeight,u=h.tilemapLayer;u&&(i||(i=u.scene.cameras.main),r=r-(u.y+i.scrollY*(1-u.scrollFactorY)),f*=u.scaleY,a=a-(u.x+i.scrollX*(1-u.scrollFactorX)),l*=u.scaleX);var d=l/2,p=f/2;a=a-d,s||(r=r-f);var g=.5*(a/d+r/p),y=.5*(-a/d+r/p);return n&&(g=Math.floor(g),y=Math.floor(y)),e.set(g,y)};c.exports=v},71558:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23029),v=t(62991),o=t(72023),r=t(20576),n=function(e,i,h,s,l){if(s===void 0&&(s=!0),!v(i,h,l))return null;var f,u=l.data[h][i],d=u&&u.collides;e instanceof a?(l.data[h][i]===null&&(l.data[h][i]=new a(l,e.index,i,h,l.tileWidth,l.tileHeight)),l.data[h][i].copy(e)):(f=e,l.data[h][i]===null?l.data[h][i]=new a(l,f,i,h,l.tileWidth,l.tileHeight):l.data[h][i].index=f);var p=l.data[h][i],g=l.collideIndexes.indexOf(p.index)!==-1;if(f=e instanceof a?e.index:e,f===-1)p.width=l.tileWidth,p.height=l.tileHeight;else{var y=l.tilemapLayer.tilemap,x=y.tiles,T=x[f][2],C=y.tilesets[T];p.width=C.tileWidth,p.height=C.tileHeight}return r(p,g),s&&d!==p.collides&&o(i,h,l),p};c.exports=n},26303:(c,m,t)=>{/** + */var o=t(23029),v=t(62991),a=t(72023),r=t(20576),n=function(e,i,h,s,l){if(s===void 0&&(s=!0),!v(i,h,l))return null;var f,u=l.data[h][i],d=u&&u.collides;e instanceof o?(l.data[h][i]===null&&(l.data[h][i]=new o(l,e.index,i,h,l.tileWidth,l.tileHeight)),l.data[h][i].copy(e)):(f=e,l.data[h][i]===null?l.data[h][i]=new o(l,f,i,h,l.tileWidth,l.tileHeight):l.data[h][i].index=f);var p=l.data[h][i],g=l.collideIndexes.indexOf(p.index)!==-1;if(f=e instanceof o?e.index:e,f===-1)p.width=l.tileWidth,p.height=l.tileHeight;else{var y=l.tilemapLayer.tilemap,x=y.tiles,C=x[f][2],P=y.tilesets[C];p.width=P.tileWidth,p.height=P.tileHeight}return r(p,g),s&&d!==p.collides&&a(i,h,l),p};c.exports=n},26303:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(71558),v=t(26099),o=new v,r=function(n,e,i,h,s,l){return l.tilemapLayer.worldToTileXY(e,i,!0,o,s,l),a(n,o.x,o.y,h,l)};c.exports=r},14051:(c,m,t)=>{/** + */var o=t(71558),v=t(26099),a=new v,r=function(n,e,i,h,s,l){return l.tilemapLayer.worldToTileXY(e,i,!0,a,s,l),o(n,a.x,a.y,h,l)};c.exports=r},14051:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(42573),v=t(71558),o=function(r,n,e,i,h){if(i===void 0&&(i=!0),!Array.isArray(r))return null;Array.isArray(r[0])||(r=[r]);for(var s=r.length,l=r[0].length,f=0;f{/** + */var o=t(42573),v=t(71558),a=function(r,n,e,i,h){if(i===void 0&&(i=!0),!Array.isArray(r))return null;Array.isArray(r[0])||(r=[r]);for(var s=r.length,l=r[0].length,f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=t(26546),o=function(r,n,e,i,h,s){var l,f=a(r,n,e,i,{},s);if(!h)for(h=[],l=0;l{/** + */var o=t(7386),v=t(26546),a=function(r,n,e,i,h,s){var l,f=o(r,n,e,i,{},s);if(!h)for(h=[],l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23029),v=t(62991),o=t(72023),r=function(n,e,i,h,s){if(i===void 0&&(i=!0),h===void 0&&(h=!0),!v(n,e,s))return null;var l=s.data[e][n];if(l)s.data[e][n]=i?null:new a(s,-1,n,e,s.tileWidth,s.tileHeight);else return null;return h&&l&&l.collides&&o(n,e,s),l};c.exports=r},94178:(c,m,t)=>{/** + */var o=t(23029),v=t(62991),a=t(72023),r=function(n,e,i,h,s){if(i===void 0&&(i=!0),h===void 0&&(h=!0),!v(n,e,s))return null;var l=s.data[e][n];if(l)s.data[e][n]=i?null:new o(s,-1,n,e,s.tileWidth,s.tileHeight);else return null;return h&&l&&l.collides&&a(n,e,s),l};c.exports=r},94178:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(63557),v=t(26099),o=new v,r=function(n,e,i,h,s,l){return l.tilemapLayer.worldToTileXY(n,e,!0,o,s,l),a(o.x,o.y,i,h,l)};c.exports=r},15533:(c,m,t)=>{/** + */var o=t(63557),v=t(26099),a=new v,r=function(n,e,i,h,s,l){return l.tilemapLayer.worldToTileXY(n,e,!0,a,s,l),o(a.x,a.y,i,h,l)};c.exports=r},15533:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=t(3956),o=new v(105,210,231,150),r=new v(243,134,48,200),n=new v(40,39,37,150),e=function(i,h,s){h===void 0&&(h={});var l=h.tileColor!==void 0?h.tileColor:o,f=h.collidingTileColor!==void 0?h.collidingTileColor:r,u=h.faceColor!==void 0?h.faceColor:n,d=a(0,0,s.width,s.height,null,s);i.translateCanvas(s.tilemapLayer.x,s.tilemapLayer.y),i.scaleCanvas(s.tilemapLayer.scaleX,s.tilemapLayer.scaleY);for(var p=0;p{/** + */var o=t(7386),v=t(3956),a=new v(105,210,231,150),r=new v(243,134,48,200),n=new v(40,39,37,150),e=function(i,h,s){h===void 0&&(h={});var l=h.tileColor!==void 0?h.tileColor:a,f=h.collidingTileColor!==void 0?h.collidingTileColor:r,u=h.faceColor!==void 0?h.faceColor:n,d=o(0,0,s.width,s.height,null,s);i.translateCanvas(s.tilemapLayer.x,s.tilemapLayer.y),i.scaleCanvas(s.tilemapLayer.scaleX,s.tilemapLayer.scaleY);for(var p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=function(o,r,n,e,i,h,s){for(var l=a(n,e,i,h,null,s),f=0;f{/** + */var o=t(7386),v=function(a,r,n,e,i,h,s){for(var l=o(n,e,i,h,null,s),f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=t.data,n=t.width,e=t.height,i=t.tilemapLayer,h=Math.max(0,a.left),s=Math.min(n,a.right),l=Math.max(0,a.top),f=Math.min(e,a.bottom),u,d,p;if(v===0)for(d=l;d=h;u--)p=r[d][u],!(!p||p.index===-1||!p.visible||p.alpha===0)&&o.push(p);else if(v===2)for(d=f;d>=l;d--)for(u=h;r[d]&&u=l;d--)for(u=s;r[d]&&u>=h;u--)p=r[d][u],!(!p||p.index===-1||!p.visible||p.alpha===0)&&o.push(p);return i.tilesDrawn=o.length,i.tilesTotal=n*e,o};c.exports=m},57068:(c,m,t)=>{/** + */var m=function(t,o,v,a){var r=t.data,n=t.width,e=t.height,i=t.tilemapLayer,h=Math.max(0,o.left),s=Math.min(n,o.right),l=Math.max(0,o.top),f=Math.min(e,o.bottom),u,d,p;if(v===0)for(d=l;d=h;u--)p=r[d][u],!(!p||p.index===-1||!p.visible||p.alpha===0)&&a.push(p);else if(v===2)for(d=f;d>=l;d--)for(u=h;r[d]&&u=l;d--)for(u=s;r[d]&&u>=h;u--)p=r[d][u],!(!p||p.index===-1||!p.visible||p.alpha===0)&&a.push(p);return i.tilesDrawn=a.length,i.tilesTotal=n*e,a};c.exports=m},57068:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20576),v=t(42573),o=t(9589),r=function(n,e,i,h,s){e===void 0&&(e=!0),i===void 0&&(i=!0),s===void 0&&(s=!0),Array.isArray(n)||(n=[n]);for(var l=0;l{/** + */var o=t(20576),v=t(42573),a=t(9589),r=function(n,e,i,h,s){e===void 0&&(e=!0),i===void 0&&(i=!0),s===void 0&&(s=!0),Array.isArray(n)||(n=[n]);for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20576),v=t(42573),o=t(9589),r=function(n,e,i,h,s,l){if(i===void 0&&(i=!0),h===void 0&&(h=!0),l===void 0&&(l=!0),!(n>e)){for(var f=n;f<=e;f++)o(f,i,s);if(l)for(var u=0;u=n&&p.index<=e&&a(p,i)}h&&v(0,0,s.width,s.height,s)}};c.exports=r},75661:(c,m,t)=>{/** + */var o=t(20576),v=t(42573),a=t(9589),r=function(n,e,i,h,s,l){if(i===void 0&&(i=!0),h===void 0&&(h=!0),l===void 0&&(l=!0),!(n>e)){for(var f=n;f<=e;f++)a(f,i,s);if(l)for(var u=0;u=n&&p.index<=e&&o(p,i)}h&&v(0,0,s.width,s.height,s)}};c.exports=r},75661:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20576),v=t(42573),o=t(9589),r=function(n,e,i,h){e===void 0&&(e=!0),i===void 0&&(i=!0),Array.isArray(n)||(n=[n]);for(var s=0;s{/** + */var o=t(20576),v=t(42573),a=t(9589),r=function(n,e,i,h){e===void 0&&(e=!0),i===void 0&&(i=!0),Array.isArray(n)||(n=[n]);for(var s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20576),v=t(42573),o=t(97022),r=function(n,e,i,h){e===void 0&&(e=!0),i===void 0&&(i=!0);for(var s=0;s{/** + */var o=t(20576),v=t(42573),a=t(97022),r=function(n,e,i,h){e===void 0&&(e=!0),i===void 0&&(i=!0);for(var s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20576),v=t(42573),o=function(r,n,e){r===void 0&&(r=!0),n===void 0&&(n=!0);for(var i=0;i0&&a(s,r)}}n&&v(0,0,e.width,e.height,e)};c.exports=o},9589:c=>{/** + */var o=t(20576),v=t(42573),a=function(r,n,e){r===void 0&&(r=!0),n===void 0&&(n=!0);for(var i=0;i0&&o(s,r)}}n&&v(0,0,e.width,e.height,e)};c.exports=a},9589:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=v.collideIndexes.indexOf(t);a&&o===-1?v.collideIndexes.push(t):!a&&o!==-1&&v.collideIndexes.splice(o,1)};c.exports=m},20576:c=>{/** + */var m=function(t,o,v){var a=v.collideIndexes.indexOf(t);o&&a===-1?v.collideIndexes.push(t):!o&&a!==-1&&v.collideIndexes.splice(a,1)};c.exports=m},20576:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)};c.exports=m},79583:c=>{/** + */var m=function(t,o){o?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)};c.exports=m},79583:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){if(typeof t=="number")o.callbacks[t]=a!==null?{callback:a,callbackContext:v}:void 0;else for(var r=0,n=t.length;r{/** + */var m=function(t,o,v,a){if(typeof t=="number")a.callbacks[t]=o!==null?{callback:o,callbackContext:v}:void 0;else for(var r=0,n=t.length;r{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=function(o,r,n,e,i,h,s){for(var l=a(o,r,n,e,null,s),f=0;f{/** + */var o=t(7386),v=function(a,r,n,e,i,h,s){for(var l=o(a,r,n,e,null,s),f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=t(33680),o=function(r,n,e,i,h){var s=a(r,n,e,i,null,h),l=s.map(function(u){return u.index});v(l);for(var f=0;f{/** + */var o=t(7386),v=t(33680),a=function(r,n,e,i,h){var s=o(r,n,e,i,null,h),l=s.map(function(u){return u.index});v(l);for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(63448),v=t(56583),o=function(r,n){var e=r.tilemapLayer.tilemap,i=r.tilemapLayer,h=Math.floor(e.tileWidth*i.scaleX),s=Math.floor(e.tileHeight*i.scaleY),l=v(n.worldView.x-i.x,h,0,!0)-i.cullPaddingX,f=a(n.worldView.right-i.x,h,0,!0)+i.cullPaddingX,u=v(n.worldView.y-i.y,s/2,0,!0)-i.cullPaddingY,d=a(n.worldView.bottom-i.y,s/2,0,!0)+i.cullPaddingY;return{left:l,right:f,top:u,bottom:d}};c.exports=o},54503:(c,m,t)=>{/** + */var o=t(63448),v=t(56583),a=function(r,n){var e=r.tilemapLayer.tilemap,i=r.tilemapLayer,h=Math.floor(e.tileWidth*i.scaleX),s=Math.floor(e.tileHeight*i.scaleY),l=v(n.worldView.x-i.x,h,0,!0)-i.cullPaddingX,f=o(n.worldView.right-i.x,h,0,!0)+i.cullPaddingX,u=v(n.worldView.y-i.y,s/2,0,!0)-i.cullPaddingY,d=o(n.worldView.bottom-i.y,s/2,0,!0)+i.cullPaddingY;return{left:l,right:f,top:u,bottom:d}};c.exports=a},54503:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(61325),v=t(32483),o=function(r,n,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var h=r.tilemapLayer,s=a(r,n);return h.skipCull&&h.scrollFactorX===1&&h.scrollFactorY===1&&(s.left=0,s.right=r.width,s.top=0,s.bottom=r.height),v(r,s,i,e),e};c.exports=o},97202:(c,m,t)=>{/** + */var o=t(61325),v=t(32483),a=function(r,n,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var h=r.tilemapLayer,s=o(r,n);return h.skipCull&&h.scrollFactorX===1&&h.scrollFactorY===1&&(s.left=0,s.right=r.width,s.top=0,s.bottom=r.height),v(r,s,i,e),e};c.exports=a},97202:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i){n||(n=new a);var h=i.baseTileWidth,s=i.baseTileHeight,l=i.tilemapLayer,f=0,u=0;l&&(e||(e=l.scene.cameras.main),f=l.x+e.scrollX*(1-l.scrollFactorX),h*=l.scaleX,u=l.y+e.scrollY*(1-l.scrollFactorY),s*=l.scaleY);var d=f+o*h+r%2*(h/2),p=u+r*(s/2);return n.set(d,p)};c.exports=v},28054:c=>{/** + */var o=t(26099),v=function(a,r,n,e,i){n||(n=new o);var h=i.baseTileWidth,s=i.baseTileHeight,l=i.tilemapLayer,f=0,u=0;l&&(e||(e=l.scene.cameras.main),f=l.x+e.scrollX*(1-l.scrollFactorX),h*=l.scaleX,u=l.y+e.scrollY*(1-l.scrollFactorY),s*=l.scaleY);var d=f+a*h+r%2*(h/2),p=u+r*(s/2);return n.set(d,p)};c.exports=v},28054:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=v.baseTileHeight,r=v.tilemapLayer,n=0;return r&&(a===void 0&&(a=r.scene.cameras.main),n=r.y+a.scrollY*(1-r.scrollFactorY),o*=r.scaleY),n+t*(o/2)+o};c.exports=m},15108:(c,m,t)=>{/** + */var m=function(t,o,v){var a=v.baseTileHeight,r=v.tilemapLayer,n=0;return r&&(o===void 0&&(o=r.scene.cameras.main),n=r.y+o.scrollY*(1-r.scrollFactorY),a*=r.scaleY),n+t*(a/2)+a};c.exports=m},15108:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i,h){e||(e=new a);var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(i||(i=f.scene.cameras.main),r=r-(f.y+i.scrollY*(1-f.scrollFactorY)),l*=f.scaleY,o=o-(f.x+i.scrollX*(1-f.scrollFactorX)),s*=f.scaleX);var u=n?Math.floor(r/(l/2)):r/(l/2),d=n?Math.floor((o+u%2*.5*s)/s):(o+u%2*.5*s)/s;return e.set(d,u)};c.exports=v},51900:c=>{/** + */var o=t(26099),v=function(a,r,n,e,i,h){e||(e=new o);var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(i||(i=f.scene.cameras.main),r=r-(f.y+i.scrollY*(1-f.scrollFactorY)),l*=f.scaleY,a=a-(f.x+i.scrollX*(1-f.scrollFactorX)),s*=f.scaleX);var u=n?Math.floor(r/(l/2)):r/(l/2),d=n?Math.floor((a+u%2*.5*s)/s):(a+u%2*.5*s)/s;return e.set(d,u)};c.exports=v},51900:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=o.baseTileHeight,n=o.tilemapLayer;return n&&(v||(v=n.scene.cameras.main),t=t-(n.y+v.scrollY*(1-n.scrollFactorY)),r*=n.scaleY),a?Math.floor(t/(r/2)):t/(r/2)};c.exports=m},86560:(c,m,t)=>{/** + */var m=function(t,o,v,a){var r=a.baseTileHeight,n=a.tilemapLayer;return n&&(v||(v=n.scene.cameras.main),t=t-(n.y+v.scrollY*(1-n.scrollFactorY)),r*=n.scaleY),o?Math.floor(t/(r/2)):t/(r/2)};c.exports=m},86560:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=function(o,r,n,e,i,h,s){for(var l=a(n,e,i,h,null,s),f=0;f{/** + */var o=t(7386),v=function(a,r,n,e,i,h,s){for(var l=o(n,e,i,h,null,s),f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=v.baseTileWidth,r=v.tilemapLayer,n=0;return r&&(a||(a=r.scene.cameras.main),n=r.x+a.scrollX*(1-r.scrollFactorX),o*=r.scaleX),n+t*o};c.exports=m},70326:(c,m,t)=>{/** + */var m=function(t,o,v){var a=v.baseTileWidth,r=v.tilemapLayer,n=0;return r&&(o||(o=r.scene.cameras.main),n=r.x+o.scrollX*(1-r.scrollFactorX),a*=r.scaleX),n+t*a};c.exports=m},70326:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(97281),v=t(29650),o=t(26099),r=function(n,e,i,h,s){return i||(i=new o(0,0)),i.x=a(n,h,s),i.y=v(e,h,s),i};c.exports=r},29650:c=>{/** + */var o=t(97281),v=t(29650),a=t(26099),r=function(n,e,i,h,s){return i||(i=new a(0,0)),i.x=o(n,h,s),i.y=v(e,h,s),i};c.exports=r},29650:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=v.baseTileHeight,r=v.tilemapLayer,n=0;return r&&(a||(a=r.scene.cameras.main),n=r.y+a.scrollY*(1-r.scrollFactorY),o*=r.scaleY),n+t*o};c.exports=m},77366:(c,m,t)=>{/** + */var m=function(t,o,v){var a=v.baseTileHeight,r=v.tilemapLayer,n=0;return r&&(o||(o=r.scene.cameras.main),n=r.y+o.scrollY*(1-r.scrollFactorY),a*=r.scaleY),n+t*a};c.exports=m},77366:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=t(75508),o=function(r,n,e,i,h,s){if(h){var l,f=a(r,n,e,i,null,s),u=0;for(l=0;l{/** + */var o=t(7386),v=t(75508),a=function(r,n,e,i,h,s){if(h){var l,f=o(r,n,e,i,null,s),u=0;for(l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(85896),v=t(26099),o=new v,r=function(n,e,i,h){return a(n,0,e,o,i,h),o.x};c.exports=r},85896:(c,m,t)=>{/** + */var o=t(85896),v=t(26099),a=new v,r=function(n,e,i,h){return o(n,0,e,a,i,h),a.x};c.exports=r},85896:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i,h){n===void 0&&(n=!0),e||(e=new a);var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(i||(i=f.scene.cameras.main),o=o-(f.x+i.scrollX*(1-f.scrollFactorX)),r=r-(f.y+i.scrollY*(1-f.scrollFactorY)),s*=f.scaleX,l*=f.scaleY);var u=o/s,d=r/l;return n&&(u=Math.floor(u),d=Math.floor(d)),e.set(u,d)};c.exports=v},63288:(c,m,t)=>{/** + */var o=t(26099),v=function(a,r,n,e,i,h){n===void 0&&(n=!0),e||(e=new o);var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(i||(i=f.scene.cameras.main),a=a-(f.x+i.scrollX*(1-f.scrollFactorX)),r=r-(f.y+i.scrollY*(1-f.scrollFactorY)),s*=f.scaleX,l*=f.scaleY);var u=a/s,d=r/l;return n&&(u=Math.floor(u),d=Math.floor(d)),e.set(u,d)};c.exports=v},63288:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(85896),v=t(26099),o=new v,r=function(n,e,i,h){return a(0,n,e,o,i,h),o.y};c.exports=r},81086:(c,m,t)=>{/** + */var o=t(85896),v=t(26099),a=new v,r=function(n,e,i,h){return o(0,n,e,a,i,h),a.y};c.exports=r},81086:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5782,52 +5782,52 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={ORIENTATION:t(91907)};c.exports=a},62501:(c,m,t)=>{/** + */var o={ORIENTATION:t(91907)};c.exports=o},62501:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79291),v=t(21829),o={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)};o=a(!1,o,v.ORIENTATION),c.exports=o},14977:(c,m,t)=>{/** + */var o=t(79291),v=t(21829),a={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)};a=o(!1,a,v.ORIENTATION),c.exports=a},14977:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(91907),o=t(95540),r=new a({initialize:function(e){e===void 0&&(e={}),this.name=o(e,"name","layer"),this.id=o(e,"id",0),this.x=o(e,"x",0),this.y=o(e,"y",0),this.width=o(e,"width",0),this.height=o(e,"height",0),this.tileWidth=o(e,"tileWidth",0),this.tileHeight=o(e,"tileHeight",0),this.baseTileWidth=o(e,"baseTileWidth",this.tileWidth),this.baseTileHeight=o(e,"baseTileHeight",this.tileHeight),this.orientation=o(e,"orientation",v.ORTHOGONAL),this.widthInPixels=o(e,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=o(e,"heightInPixels",this.height*this.baseTileHeight),this.alpha=o(e,"alpha",1),this.visible=o(e,"visible",!0),this.properties=o(e,"properties",[]),this.indexes=o(e,"indexes",[]),this.collideIndexes=o(e,"collideIndexes",[]),this.callbacks=o(e,"callbacks",[]),this.bodies=o(e,"bodies",[]),this.data=o(e,"data",[]),this.tilemapLayer=o(e,"tilemapLayer",null),this.hexSideLength=o(e,"hexSideLength",0),this.staggerAxis=o(e,"staggerAxis","y"),this.staggerIndex=o(e,"staggerIndex","odd")}});c.exports=r},87010:(c,m,t)=>{/** + */var o=t(83419),v=t(91907),a=t(95540),r=new o({initialize:function(e){e===void 0&&(e={}),this.name=a(e,"name","layer"),this.id=a(e,"id",0),this.x=a(e,"x",0),this.y=a(e,"y",0),this.width=a(e,"width",0),this.height=a(e,"height",0),this.tileWidth=a(e,"tileWidth",0),this.tileHeight=a(e,"tileHeight",0),this.baseTileWidth=a(e,"baseTileWidth",this.tileWidth),this.baseTileHeight=a(e,"baseTileHeight",this.tileHeight),this.orientation=a(e,"orientation",v.ORTHOGONAL),this.widthInPixels=a(e,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=a(e,"heightInPixels",this.height*this.baseTileHeight),this.alpha=a(e,"alpha",1),this.visible=a(e,"visible",!0),this.properties=a(e,"properties",[]),this.indexes=a(e,"indexes",[]),this.collideIndexes=a(e,"collideIndexes",[]),this.callbacks=a(e,"callbacks",[]),this.bodies=a(e,"bodies",[]),this.data=a(e,"data",[]),this.tilemapLayer=a(e,"tilemapLayer",null),this.hexSideLength=a(e,"hexSideLength",0),this.staggerAxis=a(e,"staggerAxis","y"),this.staggerIndex=a(e,"staggerIndex","odd")}});c.exports=r},87010:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(91907),o=t(95540),r=new a({initialize:function(e){e===void 0&&(e={}),this.name=o(e,"name","map"),this.width=o(e,"width",0),this.height=o(e,"height",0),this.infinite=o(e,"infinite",!1),this.tileWidth=o(e,"tileWidth",0),this.tileHeight=o(e,"tileHeight",0),this.widthInPixels=o(e,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=o(e,"heightInPixels",this.height*this.tileHeight),this.format=o(e,"format",null),this.orientation=o(e,"orientation",v.ORTHOGONAL),this.renderOrder=o(e,"renderOrder","right-down"),this.version=o(e,"version","1"),this.properties=o(e,"properties",{}),this.layers=o(e,"layers",[]),this.images=o(e,"images",[]),this.objects=o(e,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=o(e,"collision",{}),this.tilesets=o(e,"tilesets",[]),this.imageCollections=o(e,"imageCollections",[]),this.tiles=o(e,"tiles",[]),this.hexSideLength=o(e,"hexSideLength",0),this.staggerAxis=o(e,"staggerAxis","y"),this.staggerIndex=o(e,"staggerIndex","odd")}});c.exports=r},48700:(c,m,t)=>{/** + */var o=t(83419),v=t(91907),a=t(95540),r=new o({initialize:function(e){e===void 0&&(e={}),this.name=a(e,"name","map"),this.width=a(e,"width",0),this.height=a(e,"height",0),this.infinite=a(e,"infinite",!1),this.tileWidth=a(e,"tileWidth",0),this.tileHeight=a(e,"tileHeight",0),this.widthInPixels=a(e,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=a(e,"heightInPixels",this.height*this.tileHeight),this.format=a(e,"format",null),this.orientation=a(e,"orientation",v.ORTHOGONAL),this.renderOrder=a(e,"renderOrder","right-down"),this.version=a(e,"version","1"),this.properties=a(e,"properties",{}),this.layers=a(e,"layers",[]),this.images=a(e,"images",[]),this.objects=a(e,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=a(e,"collision",{}),this.tilesets=a(e,"tilesets",[]),this.imageCollections=a(e,"imageCollections",[]),this.tiles=a(e,"tiles",[]),this.hexSideLength=a(e,"hexSideLength",0),this.staggerAxis=a(e,"staggerAxis","y"),this.staggerIndex=a(e,"staggerIndex","odd")}});c.exports=r},48700:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=new a({initialize:function(n){n===void 0&&(n={}),this.name=v(n,"name","object layer"),this.id=v(n,"id",0),this.opacity=v(n,"opacity",1),this.properties=v(n,"properties",{}),this.propertyTypes=v(n,"propertytypes",{}),this.type=v(n,"type","objectgroup"),this.visible=v(n,"visible",!0),this.objects=v(n,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});c.exports=o},6641:(c,m,t)=>{/** + */var o=t(83419),v=t(95540),a=new o({initialize:function(n){n===void 0&&(n={}),this.name=v(n,"name","object layer"),this.id=v(n,"id",0),this.opacity=v(n,"opacity",1),this.properties=v(n,"properties",{}),this.propertyTypes=v(n,"propertytypes",{}),this.type=v(n,"type","objectgroup"),this.visible=v(n,"visible",!0),this.objects=v(n,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});c.exports=a},6641:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=function(o){return o=o.toLowerCase(),o==="isometric"?a.ISOMETRIC:o==="staggered"?a.STAGGERED:o==="hexagonal"?a.HEXAGONAL:a.ORTHOGONAL};c.exports=v},46177:(c,m,t)=>{/** + */var o=t(91907),v=function(a){return a=a.toLowerCase(),a==="isometric"?o.ISOMETRIC:a==="staggered"?o.STAGGERED:a==="hexagonal"?o.HEXAGONAL:o.ORTHOGONAL};c.exports=v},46177:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(80341),v=t(2342),o=t(82593),r=t(46594),n=t(87021),e=function(i,h,s,l,f,u){var d;switch(h){case a.ARRAY_2D:d=v(i,s,l,f,u);break;case a.CSV:d=o(i,s,l,f,u);break;case a.TILED_JSON:d=r(i,s,u);break;case a.WELTMEISTER:d=n(i,s,u);break;default:console.warn("Unrecognized tilemap data format: "+h),d=null}return d};c.exports=e},2342:(c,m,t)=>{/** + */var o=t(80341),v=t(2342),a=t(82593),r=t(46594),n=t(87021),e=function(i,h,s,l,f,u){var d;switch(h){case o.ARRAY_2D:d=v(i,s,l,f,u);break;case o.CSV:d=a(i,s,l,f,u);break;case o.TILED_JSON:d=r(i,s,u);break;case o.WELTMEISTER:d=n(i,s,u);break;default:console.warn("Unrecognized tilemap data format: "+h),d=null}return d};c.exports=e},2342:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(80341),v=t(14977),o=t(87010),r=t(23029),n=function(e,i,h,s,l){for(var f=new v({tileWidth:h,tileHeight:s}),u=new o({name:e,tileWidth:h,tileHeight:s,format:a.ARRAY_2D,layers:[f]}),d=[],p=i.length,g=0,y=0;y{/** + */var o=t(80341),v=t(14977),a=t(87010),r=t(23029),n=function(e,i,h,s,l){for(var f=new v({tileWidth:h,tileHeight:s}),u=new a({name:e,tileWidth:h,tileHeight:s,format:o.ARRAY_2D,layers:[f]}),d=[],p=i.length,g=0,y=0;y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(80341),v=t(2342),o=function(r,n,e,i,h){var s=n.trim().split(` -`).map(function(f){return f.split(",")}),l=v(r,s,e,i,h);return l.format=a.CSV,l};c.exports=o},6656:(c,m,t)=>{/** + */var o=t(80341),v=t(2342),a=function(r,n,e,i,h){var s=n.trim().split(` +`).map(function(f){return f.split(",")}),l=v(r,s,e,i,h);return l.format=o.CSV,l};c.exports=a},6656:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(14977),v=t(23029),o=function(r,n){for(var e=[],i=0;i-1?g=new v(s,p,d,u,h.tilesize,h.tilesize):g=n?null:new v(s,-1,d,u,h.tilesize,h.tilesize),l.push(g)}f.push(l),l=[]}s.data=f,e.push(s)}return e};c.exports=o},96483:(c,m,t)=>{/** + */var o=t(14977),v=t(23029),a=function(r,n){for(var e=[],i=0;i-1?g=new v(s,p,d,u,h.tilesize,h.tilesize):g=n?null:new v(s,-1,d,u,h.tilesize,h.tilesize),l.push(g)}f.push(l),l=[]}s.data=f,e.push(s)}return e};c.exports=a},96483:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(33629),v=function(o){for(var r=[],n=[],e=0;e{/** + */var o=t(33629),v=function(a){for(var r=[],n=[],e=0;e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(80341),v=t(87010),o=t(6656),r=t(96483),n=function(e,i,h){if(i.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+e),null;for(var s=0,l=0,f=0;fs&&(s=i.layer[f].width),i.layer[f].height>l&&(l=i.layer[f].height);var u=new v({width:s,height:l,name:e,tileWidth:i.layer[0].tilesize,tileHeight:i.layer[0].tilesize,format:a.WELTMEISTER});return u.layers=o(i,h),u.tilesets=r(i),u};c.exports=n},52833:(c,m,t)=>{/** + */var o=t(80341),v=t(87010),a=t(6656),r=t(96483),n=function(e,i,h){if(i.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+e),null;for(var s=0,l=0,f=0;fs&&(s=i.layer[f].width),i.layer[f].height>l&&(l=i.layer[f].height);var u=new v({width:s,height:l,name:e,tileWidth:i.layer[0].tilesize,tileHeight:i.layer[0].tilesize,format:o.WELTMEISTER});return u.layers=a(i,h),u.tilesets=r(i),u};c.exports=n},52833:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5839,51 +5839,51 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79291),v=function(o){for(var r,n,e,i,h,s=0;s{/** + */var o=t(79291),v=function(a){for(var r,n,e,i,h,s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){for(var a=window.atob(t),v=a.length,o=new Array(v/4),r=0;r>>0;return o};c.exports=m},84101:(c,m,t)=>{/** + */var m=function(t){for(var o=window.atob(t),v=o.length,a=new Array(v/4),r=0;r>>0;return a};c.exports=m},84101:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(33629),v=function(o){var r,n,e=[];for(r=0;r{/** + */var o=t(33629),v=function(a){var r,n,e=[];for(r=0;r{/** * @author Seth Berrier * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=function(o,r,n){if(!r)return{i:0,layers:o.layers,name:"",opacity:1,visible:!0,x:0,y:0};var e=r.x+a(r,"startx",0)*o.tilewidth+a(r,"offsetx",0),i=r.y+a(r,"starty",0)*o.tileheight+a(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+i}};c.exports=v},29920:c=>{/** + */var o=t(95540),v=function(a,r,n){if(!r)return{i:0,layers:a.layers,name:"",opacity:1,visible:!0,x:0,y:0};var e=r.x+o(r,"startx",0)*a.tilewidth+o(r,"offsetx",0),i=r.y+o(r,"starty",0)*a.tileheight+o(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+i}};c.exports=v},29920:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=2147483648,t=1073741824,a=536870912,v=function(o){var r=!!(o&m),n=!!(o&t),e=!!(o&a);o=o&~(m|t|a);var i=0,h=!1;return r&&n&&e?(i=Math.PI/2,h=!0):r&&n&&!e?(i=Math.PI,h=!1):r&&!n&&e?(i=Math.PI/2,h=!1):r&&!n&&!e?(i=0,h=!0):!r&&n&&e?(i=3*Math.PI/2,h=!1):!r&&n&&!e?(i=Math.PI,h=!0):!r&&!n&&e?(i=3*Math.PI/2,h=!0):!r&&!n&&!e&&(i=0,h=!1),{gid:o,flippedHorizontal:r,flippedVertical:n,flippedAntiDiagonal:e,rotation:i,flipped:h}};c.exports=v},12635:(c,m,t)=>{/** + */var m=2147483648,t=1073741824,o=536870912,v=function(a){var r=!!(a&m),n=!!(a&t),e=!!(a&o);a=a&~(m|t|o);var i=0,h=!1;return r&&n&&e?(i=Math.PI/2,h=!0):r&&n&&!e?(i=Math.PI,h=!1):r&&!n&&e?(i=Math.PI/2,h=!1):r&&!n&&!e?(i=0,h=!0):!r&&n&&e?(i=3*Math.PI/2,h=!1):!r&&n&&!e?(i=Math.PI,h=!0):!r&&!n&&e?(i=3*Math.PI/2,h=!0):!r&&!n&&!e&&(i=0,h=!1),{gid:a,flippedHorizontal:r,flippedVertical:n,flippedAntiDiagonal:e,rotation:i,flipped:h}};c.exports=v},12635:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=t(79677),o=function(r){for(var n=[],e=[],i=v(r);i.i0;){if(i.i>=i.layers.length){if(e.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}i=e.pop();continue}var h=i.layers[i.i];if(i.i++,h.type!=="imagelayer"){if(h.type==="group"){var s=v(r,h,i);e.push(i),i=s}continue}var l=a(h,"offsetx",0)+a(h,"startx",0),f=a(h,"offsety",0)+a(h,"starty",0);n.push({name:i.name+h.name,image:h.image,x:i.x+l+h.x,y:i.y+f+h.y,alpha:i.opacity*h.opacity,visible:i.visible&&h.visible,properties:a(h,"properties",{})})}return n};c.exports=o},46594:(c,m,t)=>{/** + */var o=t(95540),v=t(79677),a=function(r){for(var n=[],e=[],i=v(r);i.i0;){if(i.i>=i.layers.length){if(e.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}i=e.pop();continue}var h=i.layers[i.i];if(i.i++,h.type!=="imagelayer"){if(h.type==="group"){var s=v(r,h,i);e.push(i),i=s}continue}var l=o(h,"offsetx",0)+o(h,"startx",0),f=o(h,"offsety",0)+o(h,"starty",0);n.push({name:i.name+h.name,image:h.image,x:i.x+l+h.x,y:i.y+f+h.y,alpha:i.opacity*h.opacity,visible:i.visible&&h.visible,properties:o(h,"properties",{})})}return n};c.exports=a},46594:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(51233),v=t(84101),o=t(91907),r=t(62644),n=t(80341),e=t(6641),i=t(87010),h=t(12635),s=t(22611),l=t(28200),f=t(24619),u=function(d,p,g){var y=r(p),x=new i({width:y.width,height:y.height,name:d,tileWidth:y.tilewidth,tileHeight:y.tileheight,orientation:e(y.orientation),format:n.TILED_JSON,version:y.version,properties:y.properties,renderOrder:y.renderorder,infinite:y.infinite});x.orientation===o.HEXAGONAL&&(x.hexSideLength=y.hexsidelength,x.staggerAxis=y.staggeraxis,x.staggerIndex=y.staggerindex),x.layers=l(y,g),x.images=h(y);var T=f(y);return x.tilesets=T.tilesets,x.imageCollections=T.imageCollections,x.objects=s(y),x.tiles=v(x),a(x),x};c.exports=u},52205:(c,m,t)=>{/** + */var o=t(51233),v=t(84101),a=t(91907),r=t(62644),n=t(80341),e=t(6641),i=t(87010),h=t(12635),s=t(22611),l=t(28200),f=t(24619),u=function(d,p,g){var y=r(p),x=new i({width:y.width,height:y.height,name:d,tileWidth:y.tilewidth,tileHeight:y.tileheight,orientation:e(y.orientation),format:n.TILED_JSON,version:y.version,properties:y.properties,renderOrder:y.renderorder,infinite:y.infinite});x.orientation===a.HEXAGONAL&&(x.hexSideLength=y.hexsidelength,x.staggerAxis=y.staggeraxis,x.staggerIndex=y.staggerindex),x.layers=l(y,g),x.images=h(y);var C=f(y);return x.tilesets=C.tilesets,x.imageCollections=C.imageCollections,x.objects=s(y),x.tiles=v(x),o(x),x};c.exports=u},52205:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(18254),v=t(29920),o=function(e){return{x:e.x,y:e.y}},r=["id","name","type","rotation","properties","visible","x","y","width","height"],n=function(e,i,h){i===void 0&&(i=0),h===void 0&&(h=0);var s=a(e,r);if(s.x+=i,s.y+=h,e.gid){var l=v(e.gid);s.gid=l.gid,s.flippedHorizontal=l.flippedHorizontal,s.flippedVertical=l.flippedVertical,s.flippedAntiDiagonal=l.flippedAntiDiagonal}else e.polyline?s.polyline=e.polyline.map(o):e.polygon?s.polygon=e.polygon.map(o):e.ellipse?s.ellipse=e.ellipse:e.text?s.text=e.text:e.point?s.point=!0:s.rectangle=!0;return s};c.exports=n},22611:(c,m,t)=>{/** + */var o=t(18254),v=t(29920),a=function(e){return{x:e.x,y:e.y}},r=["id","name","type","rotation","properties","visible","x","y","width","height"],n=function(e,i,h){i===void 0&&(i=0),h===void 0&&(h=0);var s=o(e,r);if(s.x+=i,s.y+=h,e.gid){var l=v(e.gid);s.gid=l.gid,s.flippedHorizontal=l.flippedHorizontal,s.flippedVertical=l.flippedVertical,s.flippedAntiDiagonal=l.flippedAntiDiagonal}else e.polyline?s.polyline=e.polyline.map(a):e.polygon?s.polygon=e.polygon.map(a):e.ellipse?s.ellipse=e.ellipse:e.text?s.text=e.text:e.point?s.point=!0:s.rectangle=!0;return s};c.exports=n},22611:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=t(52205),o=t(48700),r=t(79677),n=function(e){for(var i=[],h=[],s=r(e);s.i0;){if(s.i>=s.layers.length){if(h.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=h.pop();continue}var l=s.layers[s.i];if(s.i++,l.opacity*=s.opacity,l.visible=s.visible&&l.visible,l.type!=="objectgroup"){if(l.type==="group"){var f=r(e,l,s);h.push(s),s=f}continue}l.name=s.name+l.name;for(var u=s.x+a(l,"startx",0)+a(l,"offsetx",0),d=s.y+a(l,"starty",0)+a(l,"offsety",0),p=[],g=0;g{/** + */var o=t(95540),v=t(52205),a=t(48700),r=t(79677),n=function(e){for(var i=[],h=[],s=r(e);s.i0;){if(s.i>=s.layers.length){if(h.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=h.pop();continue}var l=s.layers[s.i];if(s.i++,l.opacity*=s.opacity,l.visible=s.visible&&l.visible,l.type!=="objectgroup"){if(l.type==="group"){var f=r(e,l,s);h.push(s),s=f}continue}l.name=s.name+l.name;for(var u=s.x+o(l,"startx",0)+o(l,"offsetx",0),d=s.y+o(l,"starty",0)+o(l,"offsety",0),p=[],g=0;g{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41868),v=t(91907),o=t(79677),r=t(6641),n=t(95540),e=t(14977),i=t(29920),h=t(23029),s=function(l,f){for(var u=n(l,"infinite",!1),d=[],p=[],g=o(l);g.i0;){if(g.i>=g.layers.length){if(p.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}g=p.pop();continue}var y=g.layers[g.i];if(g.i++,y.type!=="tilelayer"){if(y.type==="group"){var x=o(l,y,g);p.push(g),g=x}continue}if(y.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+y.name+"'");continue}else if(y.encoding&&y.encoding==="base64"){if(y.chunks)for(var T=0;T0?(w=new h(C,M.gid,W,H,l.tilewidth,l.tileheight),w.rotation=M.rotation,w.flipX=M.flipped,F[H][W]=w):(L=f?null:new h(C,-1,W,H,l.tilewidth,l.tileheight),F[H][W]=L),O++,O===$.width&&(Y++,O=0)}}else{C=new e({name:g.name+y.name,id:y.id,x:g.x+n(y,"offsetx",0)+y.x,y:g.y+n(y,"offsety",0)+y.y,width:y.width,height:y.height,tileWidth:l.tilewidth,tileHeight:l.tileheight,alpha:g.opacity*y.opacity,visible:g.visible&&y.visible,properties:n(y,"properties",[]),orientation:r(l.orientation)}),C.orientation===v.HEXAGONAL&&(C.hexSideLength=l.hexsidelength,C.staggerAxis=l.staggeraxis,C.staggerIndex=l.staggerindex);for(var Z=[],Q=0,k=y.data.length;Q0?(w=new h(C,M.gid,O,F.length,l.tilewidth,l.tileheight),w.rotation=M.rotation,w.flipX=M.flipped,Z.push(w)):(L=f?null:new h(C,-1,O,F.length,l.tilewidth,l.tileheight),Z.push(L)),O++,O===y.width&&(F.push(Z),O=0,Z=[])}C.data=F,d.push(C)}return d};c.exports=s},24619:(c,m,t)=>{/** + */var o=t(41868),v=t(91907),a=t(79677),r=t(6641),n=t(95540),e=t(14977),i=t(29920),h=t(23029),s=function(l,f){for(var u=n(l,"infinite",!1),d=[],p=[],g=a(l);g.i0;){if(g.i>=g.layers.length){if(p.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}g=p.pop();continue}var y=g.layers[g.i];if(g.i++,y.type!=="tilelayer"){if(y.type==="group"){var x=a(l,y,g);p.push(g),g=x}continue}if(y.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+y.name+"'");continue}else if(y.encoding&&y.encoding==="base64"){if(y.chunks)for(var C=0;C0?(w=new h(P,M.gid,W,H,l.tilewidth,l.tileheight),w.rotation=M.rotation,w.flipX=M.flipped,L[H][W]=w):(I=f?null:new h(P,-1,W,H,l.tilewidth,l.tileheight),L[H][W]=I),B++,B===j.width&&(Y++,B=0)}}else{P=new e({name:g.name+y.name,id:y.id,x:g.x+n(y,"offsetx",0)+y.x,y:g.y+n(y,"offsety",0)+y.y,width:y.width,height:y.height,tileWidth:l.tilewidth,tileHeight:l.tileheight,alpha:g.opacity*y.opacity,visible:g.visible&&y.visible,properties:n(y,"properties",[]),orientation:r(l.orientation)}),P.orientation===v.HEXAGONAL&&(P.hexSideLength=l.hexsidelength,P.staggerAxis=l.staggeraxis,P.staggerIndex=l.staggerindex);for(var Z=[],Q=0,k=y.data.length;Q0?(w=new h(P,M.gid,B,L.length,l.tilewidth,l.tileheight),w.rotation=M.rotation,w.flipX=M.flipped,Z.push(w)):(I=f?null:new h(P,-1,B,L.length,l.tilewidth,l.tileheight),Z.push(I)),B++,B===y.width&&(L.push(Z),B=0,Z=[])}P.data=L,d.push(P)}return d};c.exports=s},24619:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(33629),v=t(16536),o=t(52205),r=t(57880),n=function(e){for(var i=[],h=[],s=null,l,f=0;f1){var p=void 0,g=void 0;if(Array.isArray(u.tiles)){p=p||{},g=g||{};for(var y=0;y{/** + */var o=t(33629),v=t(16536),a=t(52205),r=t(57880),n=function(e){for(var i=[],h=[],s=null,l,f=0;f1){var p=void 0,g=void 0;if(Array.isArray(u.tiles)){p=p||{},g=g||{};for(var y=0;y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){for(var v=0;v0){var n={},e={},i,h,s;if(Array.isArray(o.edgecolors))for(i=0;i{/** + */var m=function(t,o){for(var v=0;v0){var n={},e={},i,h,s;if(Array.isArray(a.edgecolors))for(i=0;i{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5891,15 +5891,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(37277),o=t(44594),r=t(94880),n=t(72905),e=new a({initialize:function(h){this.scene=h,this.systems=h.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],h.sys.events.once(o.BOOT,this.boot,this),h.sys.events.on(o.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var i=this.systems.events;i.on(o.PRE_UPDATE,this.preUpdate,this),i.on(o.UPDATE,this.update,this),i.once(o.SHUTDOWN,this.shutdown,this)},addEvent:function(i){var h;return i instanceof r?(h=i,this.removeEvent(h),h.elapsed=h.startAt,h.hasDispatched=!1,h.repeatCount=h.repeat===-1||h.loop?999999999999:h.repeat):h=new r(i),this._pendingInsertion.push(h),h},delayedCall:function(i,h,s,l){return this.addEvent({delay:i,callback:h,args:s,callbackScope:l})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(i){Array.isArray(i)||(i=[i]);for(var h=0;h-1&&this._active.splice(f,1),l.destroy()}for(s=0;s=l.delay)){var f=l.elapsed-l.delay;if(l.elapsed=l.delay,!l.hasDispatched&&l.callback&&(l.hasDispatched=!0,l.callback.apply(l.callbackScope,l.args)),l.repeatCount>0){if(l.repeatCount--,f>=l.delay)for(;f>=l.delay&&l.repeatCount>0;)l.callback&&l.callback.apply(l.callbackScope,l.args),f-=l.delay,l.repeatCount--;l.elapsed=f,l.hasDispatched=!1}else l.hasDispatched&&this._pendingRemoval.push(l)}}}},shutdown:function(){var i;for(i=0;i{/** + */var o=t(83419),v=t(37277),a=t(44594),r=t(94880),n=t(72905),e=new o({initialize:function(h){this.scene=h,this.systems=h.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],h.sys.events.once(a.BOOT,this.boot,this),h.sys.events.on(a.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var i=this.systems.events;i.on(a.PRE_UPDATE,this.preUpdate,this),i.on(a.UPDATE,this.update,this),i.once(a.SHUTDOWN,this.shutdown,this)},addEvent:function(i){var h;return i instanceof r?(h=i,this.removeEvent(h),h.elapsed=h.startAt,h.hasDispatched=!1,h.repeatCount=h.repeat===-1||h.loop?999999999999:h.repeat):h=new r(i),this._pendingInsertion.push(h),h},delayedCall:function(i,h,s,l){return this.addEvent({delay:i,callback:h,args:s,callbackScope:l})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(i){Array.isArray(i)||(i=[i]);for(var h=0;h-1&&this._active.splice(f,1),l.destroy()}for(s=0;s=l.delay)){var f=l.elapsed-l.delay;if(l.elapsed=l.delay,!l.hasDispatched&&l.callback&&(l.hasDispatched=!0,l.callback.apply(l.callbackScope,l.args)),l.repeatCount>0){if(l.repeatCount--,f>=l.delay)for(;f>=l.delay&&l.repeatCount>0;)l.callback&&l.callback.apply(l.callbackScope,l.args),f-=l.delay,l.repeatCount--;l.elapsed=f,l.hasDispatched=!1}else l.hasDispatched&&this._pendingRemoval.push(l)}}}},shutdown:function(){var i;for(i=0;i{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(39429),r=t(95540),n=t(44594),e=t(89809),i=new a({Extends:v,initialize:function(s,l){v.call(this),this.scene=s,this.systems=s.sys,this.elapsed=0,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var f=this.systems.events;f.on(n.PRE_UPDATE,this.preUpdate,this),f.on(n.UPDATE,this.update,this),f.once(n.SHUTDOWN,this.destroy,this),l&&this.add(l)},preUpdate:function(h,s){this.paused||(this.elapsed+=s)},update:function(){if(!(this.paused||this.complete)){var h,s=this.events,l=!1,f=this.systems,u;for(h=0;h=s.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(h){return h===void 0&&(h=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,h&&this.reset(),this},pause:function(){return this.paused=!0,this},repeat:function(h){return(h===void 0||h===!0)&&(h=-1),h===!1&&(h=0),this.loop=h,this},resume:function(){return this.paused=!1,this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(h){h===void 0&&(h=!1),this.elapsed=0,h||(this.iteration=0);for(var s=0;s0&&(l=s[s.length-1].time);for(var f=0;f{/** + */var o=t(83419),v=t(50792),a=t(39429),r=t(95540),n=t(44594),e=t(89809),i=new o({Extends:v,initialize:function(s,l){v.call(this),this.scene=s,this.systems=s.sys,this.elapsed=0,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var f=this.systems.events;f.on(n.PRE_UPDATE,this.preUpdate,this),f.on(n.UPDATE,this.update,this),f.once(n.SHUTDOWN,this.destroy,this),l&&this.add(l)},preUpdate:function(h,s){this.paused||(this.elapsed+=s)},update:function(){if(!(this.paused||this.complete)){var h,s=this.events,l=!1,f=this.systems,u;for(h=0;h=s.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(h){return h===void 0&&(h=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,h&&this.reset(),this},pause:function(){return this.paused=!0,this},repeat:function(h){return(h===void 0||h===!0)&&(h=-1),h===!1&&(h=0),this.loop=h,this},resume:function(){return this.paused=!1,this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(h){h===void 0&&(h=!1),this.elapsed=0,h||(this.iteration=0);for(var s=0;s0&&(l=s[s.length-1].time);for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=new a({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=v(r,"delay",0),this.repeat=v(r,"repeat",0),this.loop=v(r,"loop",!1),this.callback=v(r,"callback",void 0),this.callbackScope=v(r,"callbackScope",this),this.args=v(r,"args",[]),this.timeScale=v(r,"timeScale",1),this.startAt=v(r,"startAt",0),this.paused=v(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=[]}});c.exports=o},35945:c=>{/** + */var o=t(83419),v=t(95540),a=new o({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=v(r,"delay",0),this.repeat=v(r,"repeat",0),this.loop=v(r,"loop",!1),this.callback=v(r,"callback",void 0),this.callbackScope=v(r,"callbackScope",this),this.args=v(r,"args",[]),this.timeScale=v(r,"timeScale",1),this.startAt=v(r,"startAt",0),this.paused=v(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=[]}});c.exports=a},35945:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5915,51 +5915,51 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(72905),v=t(83419),o=t(43491),r=t(88032),n=t(37277),e=t(44594),i=t(93109),h=t(86081),s=t(8357),l=t(43960),f=t(26012),u=new v({initialize:function(p){this.scene=p,this.events=p.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(d){Array.isArray(d)||(d=[d]);for(var p=[],g=0;g-1},existing:function(d){return this.has(d)||this.tweens.push(d.reset()),this},addCounter:function(d){var p=r(this,d);return this.tweens.push(p.reset()),p},stagger:function(d,p){return i(d,p)},setLagSmooth:function(d,p){return d===void 0&&(d=1/1e-8),p===void 0&&(p=0),this.maxLag=d,this.lagSkip=Math.min(p,this.maxLag),this},setFps:function(d){return d===void 0&&(d=240),this.gap=1e3/d,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(d){var p=Date.now()-this.prevTime;p>this.maxLag&&(this.startTime+=p-this.lagSkip),this.prevTime+=p;var g=this.prevTime-this.startTime,y=g-this.nextTime,x=g-this.time*1e3;return y>0||d?(g/=1e3,this.time=g,this.nextTime+=y+(y>=this.gap?4:this.gap-y)):x=0,x},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(d){d===void 0&&(d=!1);var p=this.getDelta(d);if(!(p<=0)){this.processing=!0;var g,y,x=[],T=this.tweens;for(g=0;g0){for(g=0;g-1&&(y.isPendingRemove()||y.isDestroyed())&&(T.splice(M,1),y.destroy())}x.length=0}this.processing=!1}},remove:function(d){return this.processing?d.setPendingRemoveState():(a(this.tweens,d),d.setRemovedState()),this},reset:function(d){return this.existing(d),d.seek(),d.setActiveState(),this},makeActive:function(d){return this.existing(d),d.setActiveState(),this},each:function(d,p){var g,y=[null];for(g=1;g{/** + */var o=t(72905),v=t(83419),a=t(43491),r=t(88032),n=t(37277),e=t(44594),i=t(93109),h=t(86081),s=t(8357),l=t(43960),f=t(26012),u=new v({initialize:function(p){this.scene=p,this.events=p.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(d){Array.isArray(d)||(d=[d]);for(var p=[],g=0;g-1},existing:function(d){return this.has(d)||this.tweens.push(d.reset()),this},addCounter:function(d){var p=r(this,d);return this.tweens.push(p.reset()),p},stagger:function(d,p){return i(d,p)},setLagSmooth:function(d,p){return d===void 0&&(d=1/1e-8),p===void 0&&(p=0),this.maxLag=d,this.lagSkip=Math.min(p,this.maxLag),this},setFps:function(d){return d===void 0&&(d=240),this.gap=1e3/d,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(d){var p=Date.now()-this.prevTime;p>this.maxLag&&(this.startTime+=p-this.lagSkip),this.prevTime+=p;var g=this.prevTime-this.startTime,y=g-this.nextTime,x=g-this.time*1e3;return y>0||d?(g/=1e3,this.time=g,this.nextTime+=y+(y>=this.gap?4:this.gap-y)):x=0,x},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(d){d===void 0&&(d=!1);var p=this.getDelta(d);if(!(p<=0)){this.processing=!0;var g,y,x=[],C=this.tweens;for(g=0;g0){for(g=0;g-1&&(y.isPendingRemove()||y.isDestroyed())&&(C.splice(M,1),y.destroy())}x.length=0}this.processing=!1}},remove:function(d){return this.processing?d.setPendingRemoveState():(o(this.tweens,d),d.setRemovedState()),this},reset:function(d){return this.existing(d),d.seek(),d.setActiveState(),this},makeActive:function(d){return this.existing(d),d.setActiveState(),this},each:function(d,p){var g,y=[null];for(g=1;g{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t&&t.hasOwnProperty(a)?t[a]:v};c.exports=m},6113:(c,m,t)=>{/** + */var m=function(t,o,v){return t&&t.hasOwnProperty(o)?t[o]:v};c.exports=m},6113:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62640),v=t(35355),o=function(r,n){var e=a.Power0;if(typeof r=="string")if(a.hasOwnProperty(r))e=a[r];else{var i="";if(r.indexOf(".")){i=r.substring(r.indexOf(".")+1);var h=i.toLowerCase();h==="in"?i="easeIn":h==="out"?i="easeOut":h==="inout"&&(i="easeInOut")}r=v(r.substring(0,r.indexOf(".")+1)+i),a.hasOwnProperty(r)&&(e=a[r])}else typeof r=="function"&&(e=r);if(!n)return e;var s=n.slice(0);return s.unshift(0),function(l){return s[0]=l,e.apply(this,s)}};c.exports=o},91389:(c,m,t)=>{/** + */var o=t(62640),v=t(35355),a=function(r,n){var e=o.Power0;if(typeof r=="string")if(o.hasOwnProperty(r))e=o[r];else{var i="";if(r.indexOf(".")){i=r.substring(r.indexOf(".")+1);var h=i.toLowerCase();h==="in"?i="easeIn":h==="out"?i="easeOut":h==="inout"&&(i="easeInOut")}r=v(r.substring(0,r.indexOf(".")+1)+i),o.hasOwnProperty(r)&&(e=o[r])}else typeof r=="function"&&(e=r);if(!n)return e;var s=n.slice(0);return s.unshift(0),function(l){return s[0]=l,e.apply(this,s)}};c.exports=a},91389:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(89318),v=t(77259),o=t(28392),r={bezier:a,catmull:v,catmullrom:v,linear:o},n=function(e){if(e===null)return null;var i=r.linear;return typeof e=="string"?r.hasOwnProperty(e)&&(i=r[e]):typeof e=="function"&&(i=e),i};c.exports=n},55292:c=>{/** + */var o=t(89318),v=t(77259),a=t(28392),r={bezier:o,catmull:v,catmullrom:v,linear:a},n=function(e){if(e===null)return null;var i=r.linear;return typeof e=="string"?r.hasOwnProperty(e)&&(i=r[e]):typeof e=="function"&&(i=e),i};c.exports=n},55292:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o;if(t.hasOwnProperty(a)){var r=typeof t[a];r==="function"?o=function(n,e,i,h,s,l){return t[a](n,e,i,h,s,l)}:o=function(){return t[a]}}else typeof v=="function"?o=v:o=function(){return v};return o};c.exports=m},82985:(c,m,t)=>{/** + */var m=function(t,o,v){var a;if(t.hasOwnProperty(o)){var r=typeof t[o];r==="function"?a=function(n,e,i,h,s,l){return t[o](n,e,i,h,s,l)}:a=function(){return t[o]}}else typeof v=="function"?a=v:a=function(){return v};return a};c.exports=m},82985:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(81076),v=function(o){var r,n=[];if(o.hasOwnProperty("props"))for(r in o.props)r.substring(0,1)!=="_"&&n.push({key:r,value:o.props[r]});else for(r in o)a.indexOf(r)===-1&&r.substring(0,1)!=="_"&&n.push({key:r,value:o[r]});return n};c.exports=v},62329:(c,m,t)=>{/** + */var o=t(81076),v=function(a){var r,n=[];if(a.hasOwnProperty("props"))for(r in a.props)r.substring(0,1)!=="_"&&n.push({key:r,value:a.props[r]});else for(r in a)o.indexOf(r)===-1&&r.substring(0,1)!=="_"&&n.push({key:r,value:a[r]});return n};c.exports=v},62329:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35154),v=function(o){var r=a(o,"targets",null);return r===null||(typeof r=="function"&&(r=r.call()),Array.isArray(r)||(r=[r])),r};c.exports=v},17777:(c,m,t)=>{/** + */var o=t(35154),v=function(a){var r=o(a,"targets",null);return r===null||(typeof r=="function"&&(r=r.call()),Array.isArray(r)||(r=[r])),r};c.exports=v},17777:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(30976),v=t(99472);function o(h){return!!h.getActive&&typeof h.getActive=="function"}function r(h){return!!h.getStart&&typeof h.getStart=="function"}function n(h){return!!h.getEnd&&typeof h.getEnd=="function"}function e(h){return r(h)||n(h)||o(h)}var i=function(h,s){var l,f=function($,J,X){return X},u=function($,J,X){return X},d=null,p=typeof s;if(p==="number")f=function(){return s};else if(Array.isArray(s))u=function(){return s[0]},f=function(){return s[s.length-1]};else if(p==="string"){var g=s.toLowerCase(),y=g.substring(0,6)==="random",x=g.substring(0,3)==="int";if(y||x){var T=g.indexOf("("),C=g.indexOf(")"),M=g.indexOf(",");if(T&&C&&M){var w=parseFloat(g.substring(T+1,M)),L=parseFloat(g.substring(M+1,C));y?f=function(){return v(w,L)}:f=function(){return a(w,L)}}else throw new Error("invalid random() format")}else{g=g[0];var F=parseFloat(s.substr(2));switch(g){case"+":f=function($,J,X){return X+F};break;case"-":f=function($,J,X){return X-F};break;case"*":f=function($,J,X){return X*F};break;case"/":f=function($,J,X){return X/F};break;default:f=function(){return parseFloat(s)}}}}else if(p==="function")f=s;else if(p==="object")if(e(s))o(s)&&(d=s.getActive),n(s)&&(f=s.getEnd),r(s)&&(u=s.getStart);else if(s.hasOwnProperty("value"))l=i(h,s.value);else{var O=s.hasOwnProperty("to"),N=s.hasOwnProperty("from"),G=s.hasOwnProperty("start");if(O&&(N||G)){if(l=i(h,s.to),G){var V=i(h,s.start);l.getActive=V.getEnd}if(N){var K=i(h,s.from);l.getStart=K.getEnd}}}return l||(l={getActive:d,getEnd:f,getStart:u}),l};c.exports=i},88032:(c,m,t)=>{/** + */var o=t(30976),v=t(99472);function a(h){return!!h.getActive&&typeof h.getActive=="function"}function r(h){return!!h.getStart&&typeof h.getStart=="function"}function n(h){return!!h.getEnd&&typeof h.getEnd=="function"}function e(h){return r(h)||n(h)||a(h)}var i=function(h,s){var l,f=function(j,J,X){return X},u=function(j,J,X){return X},d=null,p=typeof s;if(p==="number")f=function(){return s};else if(Array.isArray(s))u=function(){return s[0]},f=function(){return s[s.length-1]};else if(p==="string"){var g=s.toLowerCase(),y=g.substring(0,6)==="random",x=g.substring(0,3)==="int";if(y||x){var C=g.indexOf("("),P=g.indexOf(")"),M=g.indexOf(",");if(C&&P&&M){var w=parseFloat(g.substring(C+1,M)),I=parseFloat(g.substring(M+1,P));y?f=function(){return v(w,I)}:f=function(){return o(w,I)}}else throw new Error("invalid random() format")}else{g=g[0];var L=parseFloat(s.substr(2));switch(g){case"+":f=function(j,J,X){return X+L};break;case"-":f=function(j,J,X){return X-L};break;case"*":f=function(j,J,X){return X*L};break;case"/":f=function(j,J,X){return X/L};break;default:f=function(){return parseFloat(s)}}}}else if(p==="function")f=s;else if(p==="object")if(e(s))a(s)&&(d=s.getActive),n(s)&&(f=s.getEnd),r(s)&&(u=s.getStart);else if(s.hasOwnProperty("value"))l=i(h,s.value);else{var B=s.hasOwnProperty("to"),N=s.hasOwnProperty("from"),G=s.hasOwnProperty("start");if(B&&(N||G)){if(l=i(h,s.to),G){var V=i(h,s.start);l.getActive=V.getEnd}if(N){var K=i(h,s.from);l.getStart=K.getEnd}}}return l||(l={getActive:d,getEnd:f,getStart:u}),l};c.exports=i},88032:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70402),v=t(69902),o=t(23568),r=t(57355),n=t(6113),e=t(55292),i=t(35154),h=t(17777),s=t(269),l=t(86081),f=function(u,d,p){if(d instanceof l)return d.parent=u,d;p===void 0?p=v:p=s(v,p);var g=i(d,"from",0),y=i(d,"to",1),x=[{value:g}],T=i(d,"delay",p.delay),C=i(d,"easeParams",p.easeParams),M=i(d,"ease",p.ease),w=h("value",y),L=new l(u,x),F=L.add(0,"value",w.getEnd,w.getStart,w.getActive,n(i(d,"ease",M),i(d,"easeParams",C)),e(d,"delay",T),i(d,"duration",p.duration),r(d,"yoyo",p.yoyo),i(d,"hold",p.hold),i(d,"repeat",p.repeat),i(d,"repeatDelay",p.repeatDelay),!1,!1);F.start=g,F.current=g,L.completeDelay=o(d,"completeDelay",0),L.loop=Math.round(o(d,"loop",0)),L.loopDelay=Math.round(o(d,"loopDelay",0)),L.paused=r(d,"paused",!1),L.persist=r(d,"persist",!1),L.callbackScope=i(d,"callbackScope",L);for(var O=a.TYPES,N=0;N{/** + */var o=t(70402),v=t(69902),a=t(23568),r=t(57355),n=t(6113),e=t(55292),i=t(35154),h=t(17777),s=t(269),l=t(86081),f=function(u,d,p){if(d instanceof l)return d.parent=u,d;p===void 0?p=v:p=s(v,p);var g=i(d,"from",0),y=i(d,"to",1),x=[{value:g}],C=i(d,"delay",p.delay),P=i(d,"easeParams",p.easeParams),M=i(d,"ease",p.ease),w=h("value",y),I=new l(u,x),L=I.add(0,"value",w.getEnd,w.getStart,w.getActive,n(i(d,"ease",M),i(d,"easeParams",P)),e(d,"delay",C),i(d,"duration",p.duration),r(d,"yoyo",p.yoyo),i(d,"hold",p.hold),i(d,"repeat",p.repeat),i(d,"repeatDelay",p.repeatDelay),!1,!1);L.start=g,L.current=g,I.completeDelay=a(d,"completeDelay",0),I.loop=Math.round(a(d,"loop",0)),I.loopDelay=Math.round(a(d,"loopDelay",0)),I.paused=r(d,"paused",!1),I.persist=r(d,"persist",!1),I.callbackScope=i(d,"callbackScope",I);for(var B=o.TYPES,N=0;N{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(6113),v=t(35154),o=t(36383),r=function(n,e){e===void 0&&(e={});var i,h=v(e,"start",0),s=v(e,"ease",null),l=v(e,"grid",null),f=v(e,"from",0),u=f==="first",d=f==="center",p=f==="last",g=typeof f=="number",y=Array.isArray(n),x=parseFloat(y?n[0]:n),T=y?parseFloat(n[1]):0,C=Math.max(x,T);if(y&&(h+=x),l){var M=l[0],w=l[1],L=0,F=0,O=0,N=0,G=[];p?(L=M-1,F=w-1):g?(L=f%M,F=Math.floor(f/M)):d&&(L=(M-1)/2,F=(w-1)/2);for(var V=o.MIN_SAFE_INTEGER,K=0;KV&&(V=J),G[K][$]=J}}}var X=s?a(s):null;return l?i=function(Y,D,z,W){var H=0,Z=W%M,Q=Math.floor(W/M);Z>=0&&Z=0&&Q{/** + */var o=t(6113),v=t(35154),a=t(36383),r=function(n,e){e===void 0&&(e={});var i,h=v(e,"start",0),s=v(e,"ease",null),l=v(e,"grid",null),f=v(e,"from",0),u=f==="first",d=f==="center",p=f==="last",g=typeof f=="number",y=Array.isArray(n),x=parseFloat(y?n[0]:n),C=y?parseFloat(n[1]):0,P=Math.max(x,C);if(y&&(h+=x),l){var M=l[0],w=l[1],I=0,L=0,B=0,N=0,G=[];p?(I=M-1,L=w-1):g?(I=f%M,L=Math.floor(f/M)):d&&(I=(M-1)/2,L=(w-1)/2);for(var V=a.MIN_SAFE_INTEGER,K=0;KV&&(V=J),G[K][j]=J}}}var X=s?o(s):null;return l?i=function(Y,b,z,W){var H=0,Z=W%M,Q=Math.floor(W/M);Z>=0&&Z=0&&Q{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70402),v=t(69902),o=t(23568),r=t(57355),n=t(6113),e=t(91389),i=t(55292),h=t(82985),s=t(62329),l=t(35154),f=t(17777),u=t(269),d=t(86081),p=function(g,y,x){if(y instanceof d)return y.parent=g,y;x===void 0?x=v:x=u(v,x);var T=s(y);!T&&x.targets&&(T=x.targets);for(var C=h(y),M=l(y,"delay",x.delay),w=l(y,"duration",x.duration),L=l(y,"easeParams",x.easeParams),F=l(y,"ease",x.ease),O=l(y,"hold",x.hold),N=l(y,"repeat",x.repeat),G=l(y,"repeatDelay",x.repeatDelay),V=r(y,"yoyo",x.yoyo),K=r(y,"flipX",x.flipX),$=r(y,"flipY",x.flipY),J=l(y,"interpolation",x.interpolation),X=function(rt,ot,ft,at){if(ft==="texture"){var vt=at,Pt=void 0;Array.isArray(at)?(vt=at[0],Pt=at[1]):at.hasOwnProperty("value")?(vt=at.value,Array.isArray(at.value)?(vt=at.value[0],Pt=at.value[1]):typeof at.value=="string"&&(vt=at.value)):typeof at=="string"&&(vt=at),rt.addFrame(ot,vt,Pt,i(at,"delay",M),l(at,"duration",w),l(at,"hold",O),l(at,"repeat",N),l(at,"repeatDelay",G),r(at,"flipX",K),r(at,"flipY",$))}else{var Ct=f(ft,at),Et=e(l(at,"interpolation",J));rt.add(ot,ft,Ct.getEnd,Ct.getStart,Ct.getActive,n(l(at,"ease",F),l(at,"easeParams",L)),i(at,"delay",M),l(at,"duration",w),r(at,"yoyo",V),l(at,"hold",O),l(at,"repeat",N),l(at,"repeatDelay",G),r(at,"flipX",K),r(at,"flipY",$),Et,Et?at:null)}},Y=new d(g,T),D=0;D{/** + */var o=t(70402),v=t(69902),a=t(23568),r=t(57355),n=t(6113),e=t(91389),i=t(55292),h=t(82985),s=t(62329),l=t(35154),f=t(17777),u=t(269),d=t(86081),p=function(g,y,x){if(y instanceof d)return y.parent=g,y;x===void 0?x=v:x=u(v,x);var C=s(y);!C&&x.targets&&(C=x.targets);for(var P=h(y),M=l(y,"delay",x.delay),w=l(y,"duration",x.duration),I=l(y,"easeParams",x.easeParams),L=l(y,"ease",x.ease),B=l(y,"hold",x.hold),N=l(y,"repeat",x.repeat),G=l(y,"repeatDelay",x.repeatDelay),V=r(y,"yoyo",x.yoyo),K=r(y,"flipX",x.flipX),j=r(y,"flipY",x.flipY),J=l(y,"interpolation",x.interpolation),X=function(rt,ot,ft,at){if(ft==="texture"){var vt=at,At=void 0;Array.isArray(at)?(vt=at[0],At=at[1]):at.hasOwnProperty("value")?(vt=at.value,Array.isArray(at.value)?(vt=at.value[0],At=at.value[1]):typeof at.value=="string"&&(vt=at.value)):typeof at=="string"&&(vt=at),rt.addFrame(ot,vt,At,i(at,"delay",M),l(at,"duration",w),l(at,"hold",B),l(at,"repeat",N),l(at,"repeatDelay",G),r(at,"flipX",K),r(at,"flipY",j))}else{var Et=f(ft,at),Pt=e(l(at,"interpolation",J));rt.add(ot,ft,Et.getEnd,Et.getStart,Et.getActive,n(l(at,"ease",L),l(at,"easeParams",I)),i(at,"delay",M),l(at,"duration",w),r(at,"yoyo",V),l(at,"hold",B),l(at,"repeat",N),l(at,"repeatDelay",G),r(at,"flipX",K),r(at,"flipY",j),Pt,Pt?at:null)}},Y=new d(g,C),b=0;b{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70402),v=t(23568),o=t(57355),r=t(62329),n=t(35154),e=t(8357),i=t(43960),h=function(s,l){if(l instanceof i)return l.parent=s,l;var f=new i(s);f.startDelay=n(l,"delay",0),f.completeDelay=v(l,"completeDelay",0),f.loop=Math.round(v(l,"loop",n(l,"repeat",0))),f.loopDelay=Math.round(v(l,"loopDelay",n(l,"repeatDelay",0))),f.paused=o(l,"paused",!1),f.persist=o(l,"persist",!1),f.callbackScope=n(l,"callbackScope",f);var u,d=a.TYPES;for(u=0;u{/** + */var o=t(70402),v=t(23568),a=t(57355),r=t(62329),n=t(35154),e=t(8357),i=t(43960),h=function(s,l){if(l instanceof i)return l.parent=s,l;var f=new i(s);f.startDelay=n(l,"delay",0),f.completeDelay=v(l,"completeDelay",0),f.loop=Math.round(v(l,"loop",n(l,"repeat",0))),f.loopDelay=Math.round(v(l,"loopDelay",n(l,"repeatDelay",0))),f.paused=a(l,"paused",!1),f.persist=a(l,"persist",!1),f.callbackScope=n(l,"callbackScope",f);var u,d=o.TYPES;for(u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6011,15 +6011,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={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)};c.exports=a},70402:(c,m,t)=>{/** + */var o={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)};c.exports=o},70402:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(842),r=t(86353),n=new a({Extends:v,initialize:function(i){v.call(this),this.parent=i,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(o.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(o.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(o.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(o.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(e){this.countdown-=e,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(o.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(e){return this.countdown-=e,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(o.TWEEN_START,"onStart"),e=0),e},updateCompleteDelay:function(e){this.countdown-=e,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(e,i,h){return h===void 0&&(h=[]),this.callbacks.hasOwnProperty(e)&&(this.callbacks[e]={func:i,params:h}),this},setPendingState:function(){this.state=r.PENDING},setActiveState:function(){this.state=r.ACTIVE},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"],c.exports=n},95042:(c,m,t)=>{/** + */var o=t(83419),v=t(50792),a=t(842),r=t(86353),n=new o({Extends:v,initialize:function(i){v.call(this),this.parent=i,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(a.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(a.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(a.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(a.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(a.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(e){this.countdown-=e,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(a.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(e){return this.countdown-=e,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(a.TWEEN_START,"onStart"),e=0),e},updateCompleteDelay:function(e){this.countdown-=e,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(e,i,h){return h===void 0&&(h=[]),this.callbacks.hasOwnProperty(e)&&(this.callbacks[e]={func:i,params:h}),this},setPendingState:function(){this.state=r.PENDING},setActiveState:function(){this.state=r.ACTIVE},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"],c.exports=n},95042:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(842),o=t(86353),r=new a({initialize:function(e,i,h,s,l,f,u,d,p,g){this.tween=e,this.targetIndex=i,this.duration=s,this.totalDuration=0,this.delay=0,this.getDelay=h,this.yoyo=l,this.hold=f,this.repeat=u,this.repeatDelay=d,this.repeatCounter=0,this.flipX=p,this.flipY=g,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=o.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=o.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=o.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=o.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=o.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=o.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=o.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=o.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===o.CREATED},isDelayed:function(){return this.state===o.DELAY},isPendingRender:function(){return this.state===o.PENDING_RENDER},isPlayingForward:function(){return this.state===o.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===o.PLAYING_BACKWARD},isHolding:function(){return this.state===o.HOLD_DELAY},isRepeating:function(){return this.state===o.REPEAT_DELAY},isComplete:function(){return this.state===o.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,i=this.targetIndex,h=n.targets[i],s=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(h,s,0,i,e,n),this.repeatCounter=this.repeat===-1?o.MAX:this.repeat,this.setPendingRenderState();var l=this.duration+this.hold;this.yoyo&&(l+=this.duration);var f=l+this.repeatDelay;this.totalDuration=this.delay+l,this.repeat===-1?(this.totalDuration+=f*o.MAX,n.isInfinite=!0):this.repeat>0&&(this.totalDuration+=f*this.repeat),this.totalDuration>n.duration&&(n.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(n,e,i){var h=this.tween,s=h.totalTargets,l=this.targetIndex,f=h.targets[l],u=this.key,d=u!=="texture";if(this.elapsed=n,this.progress=n/this.duration,this.flipX&&f.toggleFlipX(),this.flipY&&f.toggleFlipY(),d&&(e||i)&&(this.start=this.getStartValue(f,u,this.start,l,s,h)),i){this.setPlayingBackwardState(),this.dispatchEvent(v.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,d&&(this.end=this.getEndValue(f,u,this.start,l,s,h)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-n,d&&(this.current=this.start,f[u]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(v.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});c.exports=r},69902:c=>{/** + */var o=t(83419),v=t(842),a=t(86353),r=new o({initialize:function(e,i,h,s,l,f,u,d,p,g){this.tween=e,this.targetIndex=i,this.duration=s,this.totalDuration=0,this.delay=0,this.getDelay=h,this.yoyo=l,this.hold=f,this.repeat=u,this.repeatDelay=d,this.repeatCounter=0,this.flipX=p,this.flipY=g,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=a.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=a.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=a.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=a.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=a.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=a.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=a.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=a.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===a.CREATED},isDelayed:function(){return this.state===a.DELAY},isPendingRender:function(){return this.state===a.PENDING_RENDER},isPlayingForward:function(){return this.state===a.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===a.PLAYING_BACKWARD},isHolding:function(){return this.state===a.HOLD_DELAY},isRepeating:function(){return this.state===a.REPEAT_DELAY},isComplete:function(){return this.state===a.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,i=this.targetIndex,h=n.targets[i],s=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(h,s,0,i,e,n),this.repeatCounter=this.repeat===-1?a.MAX:this.repeat,this.setPendingRenderState();var l=this.duration+this.hold;this.yoyo&&(l+=this.duration);var f=l+this.repeatDelay;this.totalDuration=this.delay+l,this.repeat===-1?(this.totalDuration+=f*a.MAX,n.isInfinite=!0):this.repeat>0&&(this.totalDuration+=f*this.repeat),this.totalDuration>n.duration&&(n.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(n,e,i){var h=this.tween,s=h.totalTargets,l=this.targetIndex,f=h.targets[l],u=this.key,d=u!=="texture";if(this.elapsed=n,this.progress=n/this.duration,this.flipX&&f.toggleFlipX(),this.flipY&&f.toggleFlipY(),d&&(e||i)&&(this.start=this.getStartValue(f,u,this.start,l,s,h)),i){this.setPlayingBackwardState(),this.dispatchEvent(v.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,d&&(this.end=this.getEndValue(f,u,this.start,l,s,h)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-n,d&&(this.current=this.start,f[u]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(v.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});c.exports=r},69902:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6031,19 +6031,19 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70402),v=t(83419),o=t(842),r=t(44603),n=t(39429),e=t(36383),i=t(86353),h=t(48177),s=t(42220),l=new v({Extends:a,initialize:function(u,d){a.call(this,u),this.targets=d,this.totalTargets=d.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(f,u,d,p,g,y,x,T,C,M,w,L,F,O,N,G){var V=new h(this,f,u,d,p,g,y,x,T,C,M,w,L,F,O,N,G);return this.totalData=this.data.push(V),V},addFrame:function(f,u,d,p,g,y,x,T,C,M){var w=new s(this,f,u,d,p,g,y,x,T,C,M);return this.totalData=this.data.push(w),w},getValue:function(f){f===void 0&&(f=0);var u=null;return this.data&&(u=this.data[f].current),u},hasTarget:function(f){return this.targets&&this.targets.indexOf(f)!==-1},updateTo:function(f,u,d){if(d===void 0&&(d=!1),f!=="texture")for(var p=0;p0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(o.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,a.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(f,u,d){if(f===void 0&&(f=0),u===void 0&&(u=16.6),d===void 0&&(d=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;d||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive");var p=this.paused;if(this.paused=!1,f>0){for(var g=Math.floor(f/u),y=f-g*u,x=0;x0&&this.update(y)}return this.paused=p,this.isSeeking=!1,this},initTweenData:function(f){f===void 0&&(f=!1),this.duration=0,this.startDelay=e.MAX_SAFE_INTEGER;for(var u=this.data,d=0;d0?this.totalDuration=p+g+(p+x)*y:this.totalDuration=p+g},reset:function(f){return f===void 0&&(f=!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=i.MAX),f||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive")),this},update:function(f){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(f*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(f),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(f),!1;this.hasStarted||(this.startDelay-=f,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(o.TWEEN_START,"onStart"),f=0));var u=!1;if(this.isActive())for(var d=this.data,p=0;p{/** + */var o=t(70402),v=t(83419),a=t(842),r=t(44603),n=t(39429),e=t(36383),i=t(86353),h=t(48177),s=t(42220),l=new v({Extends:o,initialize:function(u,d){o.call(this,u),this.targets=d,this.totalTargets=d.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(f,u,d,p,g,y,x,C,P,M,w,I,L,B,N,G){var V=new h(this,f,u,d,p,g,y,x,C,P,M,w,I,L,B,N,G);return this.totalData=this.data.push(V),V},addFrame:function(f,u,d,p,g,y,x,C,P,M){var w=new s(this,f,u,d,p,g,y,x,C,P,M);return this.totalData=this.data.push(w),w},getValue:function(f){f===void 0&&(f=0);var u=null;return this.data&&(u=this.data[f].current),u},hasTarget:function(f){return this.targets&&this.targets.indexOf(f)!==-1},updateTo:function(f,u,d){if(d===void 0&&(d=!1),f!=="texture")for(var p=0;p0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(a.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,o.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(f,u,d){if(f===void 0&&(f=0),u===void 0&&(u=16.6),d===void 0&&(d=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;d||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(a.TWEEN_ACTIVE,"onActive");var p=this.paused;if(this.paused=!1,f>0){for(var g=Math.floor(f/u),y=f-g*u,x=0;x0&&this.update(y)}return this.paused=p,this.isSeeking=!1,this},initTweenData:function(f){f===void 0&&(f=!1),this.duration=0,this.startDelay=e.MAX_SAFE_INTEGER;for(var u=this.data,d=0;d0?this.totalDuration=p+g+(p+x)*y:this.totalDuration=p+g},reset:function(f){return f===void 0&&(f=!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=i.MAX),f||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(a.TWEEN_ACTIVE,"onActive")),this},update:function(f){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(f*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(f),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(f),!1;this.hasStarted||(this.startDelay-=f,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(a.TWEEN_START,"onStart"),f=0));var u=!1;if(this.isActive())for(var d=this.data,p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(72905),v=t(70402),o=t(83419),r=t(842),n=t(44603),e=t(39429),i=t(86353),h=new o({Extends:v,initialize:function(l){v.call(this,l),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?i.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive"),this},add:function(s){var l=this.parent.create(s);Array.isArray(l)||(l=[l]);for(var f=this.data,u=0;u0)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 s=this.data,l=this.totalData,f=0;f{/** + */var o=t(72905),v=t(70402),a=t(83419),r=t(842),n=t(44603),e=t(39429),i=t(86353),h=new a({Extends:v,initialize:function(l){v.call(this,l),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?i.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive"),this},add:function(s){var l=this.parent.create(s);Array.isArray(l)||(l=[l]);for(var f=this.data,u=0;u0)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 s=this.data,l=this.totalData,f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95042),v=t(45319),o=t(83419),r=t(842),n=new o({Extends:a,initialize:function(i,h,s,l,f,u,d,p,g,y,x,T,C,M,w,L,F){a.call(this,i,h,p,g,y,x,T,C,M,w),this.key=s,this.getActiveValue=u,this.getEndValue=l,this.getStartValue=f,this.ease=d,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=L,this.interpolationData=F},reset:function(e){a.prototype.reset.call(this);var i=this.tween.targets[this.targetIndex],h=this.key;e&&(i[h]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(i[h]=this.getActiveValue(i,h,0))},update:function(e){var i=this.tween,h=i.totalTargets,s=this.targetIndex,l=i.targets[s],f=this.key;if(!l)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(l,f,l[f],s,h,i),this.end=this.getEndValue(l,f,this.start,s,h,i),this.current=this.start,l[f]=this.start,this.setPlayingForwardState(),!0;var u=this.isPlayingForward(),d=this.isPlayingBackward();if(u||d){var p=this.elapsed,g=this.duration,y=0,x=!1;p+=e,p>=g?(y=p-g,p=g,x=!0):p<0&&(p=0);var T=v(p/g,0,1);if(this.elapsed=p,this.progress=T,this.previous=this.current,x)u?(this.current=this.end,l[f]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(y)):(this.current=this.start,l[f]=this.start,this.setStateFromStart(y));else{u||(T=1-T);var C=this.ease(T);this.interpolation?this.current=this.interpolation(this.interpolationData,C):this.current=this.start+(this.end-this.start)*C,l[f]=this.current}this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,i){var h=this.tween;if(!h.isSeeking){var s=h.targets[this.targetIndex],l=this.key,f=this.current,u=this.previous;h.emit(e,h,l,s,f,u);var d=h.callbacks[i];d&&d.func.apply(h.callbackScope,[h,s,l,f,u].concat(d.params))}},destroy:function(){a.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});c.exports=n},42220:(c,m,t)=>{/** + */var o=t(95042),v=t(45319),a=t(83419),r=t(842),n=new a({Extends:o,initialize:function(i,h,s,l,f,u,d,p,g,y,x,C,P,M,w,I,L){o.call(this,i,h,p,g,y,x,C,P,M,w),this.key=s,this.getActiveValue=u,this.getEndValue=l,this.getStartValue=f,this.ease=d,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=I,this.interpolationData=L},reset:function(e){o.prototype.reset.call(this);var i=this.tween.targets[this.targetIndex],h=this.key;e&&(i[h]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(i[h]=this.getActiveValue(i,h,0))},update:function(e){var i=this.tween,h=i.totalTargets,s=this.targetIndex,l=i.targets[s],f=this.key;if(!l)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(l,f,l[f],s,h,i),this.end=this.getEndValue(l,f,this.start,s,h,i),this.current=this.start,l[f]=this.start,this.setPlayingForwardState(),!0;var u=this.isPlayingForward(),d=this.isPlayingBackward();if(u||d){var p=this.elapsed,g=this.duration,y=0,x=!1;p+=e,p>=g?(y=p-g,p=g,x=!0):p<0&&(p=0);var C=v(p/g,0,1);if(this.elapsed=p,this.progress=C,this.previous=this.current,x)u?(this.current=this.end,l[f]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(y)):(this.current=this.start,l[f]=this.start,this.setStateFromStart(y));else{u||(C=1-C);var P=this.ease(C);this.interpolation?this.current=this.interpolation(this.interpolationData,P):this.current=this.start+(this.end-this.start)*P,l[f]=this.current}this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,i){var h=this.tween;if(!h.isSeeking){var s=h.targets[this.targetIndex],l=this.key,f=this.current,u=this.previous;h.emit(e,h,l,s,f,u);var d=h.callbacks[i];d&&d.func.apply(h.callbackScope,[h,s,l,f,u].concat(d.params))}},destroy:function(){o.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});c.exports=n},42220:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95042),v=t(45319),o=t(83419),r=t(842),n=new o({Extends:a,initialize:function(i,h,s,l,f,u,d,p,g,y,x){a.call(this,i,h,f,u,!1,d,p,g,y,x),this.key="texture",this.startTexture=null,this.endTexture=s,this.startFrame=null,this.endFrame=l,this.yoyo=p!==0},reset:function(e){a.prototype.reset.call(this);var i=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=i.texture.key,this.startFrame=i.frame.name),e&&i.setTexture(this.startTexture,this.startFrame)},update:function(e){var i=this.tween,h=this.targetIndex,s=i.targets[h];if(!s)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&&s.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var l=this.isPlayingForward(),f=this.isPlayingBackward();if(l||f){var u=this.elapsed,d=this.duration,p=0,g=!1;u+=e,u>=d?(p=u-d,u=d,g=!0):u<0&&(u=0);var y=v(u/d,0,1);this.elapsed=u,this.progress=y,g&&(l?(s.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(p)):(s.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(p))),this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,i){var h=this.tween;if(!h.isSeeking){var s=h.targets[this.targetIndex],l=this.key;h.emit(e,h,l,s);var f=h.callbacks[i];f&&f.func.apply(h.callbackScope,[h,s,l].concat(f.params))}},destroy:function(){a.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});c.exports=n},86353:c=>{/** + */var o=t(95042),v=t(45319),a=t(83419),r=t(842),n=new a({Extends:o,initialize:function(i,h,s,l,f,u,d,p,g,y,x){o.call(this,i,h,f,u,!1,d,p,g,y,x),this.key="texture",this.startTexture=null,this.endTexture=s,this.startFrame=null,this.endFrame=l,this.yoyo=p!==0},reset:function(e){o.prototype.reset.call(this);var i=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=i.texture.key,this.startFrame=i.frame.name),e&&i.setTexture(this.startTexture,this.startFrame)},update:function(e){var i=this.tween,h=this.targetIndex,s=i.targets[h];if(!s)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&&s.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var l=this.isPlayingForward(),f=this.isPlayingBackward();if(l||f){var u=this.elapsed,d=this.duration,p=0,g=!1;u+=e,u>=d?(p=u-d,u=d,g=!0):u<0&&(u=0);var y=v(u/d,0,1);this.elapsed=u,this.progress=y,g&&(l?(s.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(p)):(s.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(p))),this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,i){var h=this.tween;if(!h.isSeeking){var s=h.targets[this.targetIndex],l=this.key;h.emit(e,h,l,s);var f=h.callbacks[i];f&&f.func.apply(h.callbackScope,[h,s,l].concat(f.params))}},destroy:function(){o.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});c.exports=n},86353:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6051,7 +6051,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function m(n){return!!n.get&&typeof n.get=="function"||!!n.set&&typeof n.set=="function"}function t(n,e,i){var h=i?n[e]:Object.getOwnPropertyDescriptor(n,e);return!i&&h.value&&typeof h.value=="object"&&(h=h.value),h&&m(h)?(typeof h.enumerable>"u"&&(h.enumerable=!0),typeof h.configurable>"u"&&(h.configurable=!0),h):!1}function a(n,e){var i=Object.getOwnPropertyDescriptor(n,e);return i?(i.value&&typeof i.value=="object"&&(i=i.value),i.configurable===!1):!1}function v(n,e,i,h){for(var s in e)if(e.hasOwnProperty(s)){var l=t(e,s,i);if(l!==!1){var f=h||n;if(a(f.prototype,s)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+s+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(n.prototype,s,l)}else n.prototype[s]=e[s]}}function o(n,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{/** + */function m(n){return!!n.get&&typeof n.get=="function"||!!n.set&&typeof n.set=="function"}function t(n,e,i){var h=i?n[e]:Object.getOwnPropertyDescriptor(n,e);return!i&&h.value&&typeof h.value=="object"&&(h=h.value),h&&m(h)?(typeof h.enumerable>"u"&&(h.enumerable=!0),typeof h.configurable>"u"&&(h.configurable=!0),h):!1}function o(n,e){var i=Object.getOwnPropertyDescriptor(n,e);return i?(i.value&&typeof i.value=="object"&&(i=i.value),i.configurable===!1):!1}function v(n,e,i,h){for(var s in e)if(e.hasOwnProperty(s)){var l=t(e,s,i);if(l!==!1){var f=h||n;if(o(f.prototype,s)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+s+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(n.prototype,s,l)}else n.prototype[s]=e[s]}}function a(n,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6063,144 +6063,144 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){if(r===void 0&&(r=t),v>0){var n=v-t.length;if(n<=0)return null}if(!Array.isArray(a))return t.indexOf(a)===-1?(t.push(a),o&&o.call(r,a),a):null;for(var e=a.length-1;e>=0;)t.indexOf(a[e])!==-1&&a.splice(e,1),e--;if(e=a.length,e===0)return null;v>0&&e>n&&(a.splice(n),e=n);for(var i=0;i{/** + */var m=function(t,o,v,a,r){if(r===void 0&&(r=t),v>0){var n=v-t.length;if(n<=0)return null}if(!Array.isArray(o))return t.indexOf(o)===-1?(t.push(o),a&&a.call(r,o),o):null;for(var e=o.length-1;e>=0;)t.indexOf(o[e])!==-1&&o.splice(e,1),e--;if(e=o.length,e===0)return null;v>0&&e>n&&(o.splice(n),e=n);for(var i=0;i{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r,n){if(v===void 0&&(v=0),n===void 0&&(n=t),o>0){var e=o-t.length;if(e<=0)return null}if(!Array.isArray(a))return t.indexOf(a)===-1?(t.splice(v,0,a),r&&r.call(n,a),a):null;for(var i=a.length-1;i>=0;)t.indexOf(a[i])!==-1&&a.pop(),i--;if(i=a.length,i===0)return null;o>0&&i>e&&(a.splice(e),i=e);for(var h=i-1;h>=0;h--){var s=a[h];t.splice(v,0,s),r&&r.call(n,s)}return a};c.exports=m},66905:c=>{/** + */var m=function(t,o,v,a,r,n){if(v===void 0&&(v=0),n===void 0&&(n=t),a>0){var e=a-t.length;if(e<=0)return null}if(!Array.isArray(o))return t.indexOf(o)===-1?(t.splice(v,0,o),r&&r.call(n,o),o):null;for(var i=o.length-1;i>=0;)t.indexOf(o[i])!==-1&&o.pop(),i--;if(i=o.length,i===0)return null;a>0&&i>e&&(o.splice(e),i=e);for(var h=i-1;h>=0;h--){var s=o[h];t.splice(v,0,s),r&&r.call(n,s)}return o};c.exports=m},66905:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.indexOf(a);return v!==-1&&v{/** + */var m=function(t,o){var v=t.indexOf(o);return v!==-1&&v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82011),v=function(o,r,n,e,i){e===void 0&&(e=0),i===void 0&&(i=o.length);var h=0;if(a(o,e,i))for(var s=e;s{/** + */var o=t(82011),v=function(a,r,n,e,i){e===void 0&&(e=0),i===void 0&&(i=a.length);var h=0;if(o(a,e,i))for(var s=e;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o,r=[null];for(o=3;o{/** + */var m=function(t,o,v){var a,r=[null];for(a=3;a{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82011),v=function(o,r,n,e,i){if(e===void 0&&(e=0),i===void 0&&(i=o.length),a(o,e,i)){var h,s=[null];for(h=5;h{/** + */var o=t(82011),v=function(a,r,n,e,i){if(e===void 0&&(e=0),i===void 0&&(i=a.length),o(a,e,i)){var h,s=[null];for(h=5;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(a.length){if(a.length===1)return a[0]}else return NaN;var o=1,r,n;if(v){if(ta.length&&(o=a.length),v?(r=a[o-1][v],n=a[o][v],n-t<=t-r?a[o]:a[o-1]):(r=a[o-1],n=a[o],n-t<=t-r?n:r)};c.exports=m},43491:c=>{/** + */var m=function(t,o,v){if(o.length){if(o.length===1)return o[0]}else return NaN;var a=1,r,n;if(v){if(to.length&&(a=o.length),v?(r=o[a-1][v],n=o[a][v],n-t<=t-r?o[a]:o[a-1]):(r=o[a-1],n=o[a],n-t<=t-r?n:r)};c.exports=m},43491:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=[]);for(var v=0;v{/** + */var m=function(t,o){o===void 0&&(o=[]);for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82011),v=function(o,r,n,e,i){e===void 0&&(e=0),i===void 0&&(i=o.length);var h=[];if(a(o,e,i))for(var s=e;s{/** + */var o=t(82011),v=function(a,r,n,e,i){e===void 0&&(e=0),i===void 0&&(i=a.length);var h=[];if(o(a,e,i))for(var s=e;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82011),v=function(o,r,n,e,i){if(e===void 0&&(e=0),i===void 0&&(i=o.length),a(o,e,i))for(var h=e;h{/** + */var o=t(82011),v=function(a,r,n,e,i){if(e===void 0&&(e=0),i===void 0&&(i=a.length),o(a,e,i))for(var h=e;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){a===void 0&&(a=0),v===void 0&&(v=t.length);var o=a+Math.floor(Math.random()*v);return t[o]===void 0?null:t[o]};c.exports=m},85835:c=>{/** + */var m=function(t,o,v){o===void 0&&(o=0),v===void 0&&(v=t.length);var a=o+Math.floor(Math.random()*v);return t[a]===void 0?null:t[a]};c.exports=m},85835:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(a===v)return t;var o=t.indexOf(a),r=t.indexOf(v);if(o<0||r<0)throw new Error("Supplied items must be elements of the same array");return o>r||(t.splice(o,1),r===t.length-1?t.push(a):t.splice(r,0,a)),t};c.exports=m},83371:c=>{/** + */var m=function(t,o,v){if(o===v)return t;var a=t.indexOf(o),r=t.indexOf(v);if(a<0||r<0)throw new Error("Supplied items must be elements of the same array");return a>r||(t.splice(a,1),r===t.length-1?t.push(o):t.splice(r,0,o)),t};c.exports=m},83371:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(a===v)return t;var o=t.indexOf(a),r=t.indexOf(v);if(o<0||r<0)throw new Error("Supplied items must be elements of the same array");return o{/** + */var m=function(t,o,v){if(o===v)return t;var a=t.indexOf(o),r=t.indexOf(v);if(a<0||r<0)throw new Error("Supplied items must be elements of the same array");return a{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.indexOf(a);if(v>0){var o=t[v-1],r=t.indexOf(o);t[v]=o,t[r]=a}return t};c.exports=m},69693:c=>{/** + */var m=function(t,o){var v=t.indexOf(o);if(v>0){var a=t[v-1],r=t.indexOf(a);t[v]=a,t[r]=o}return t};c.exports=m},69693:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=t.indexOf(a);if(o===-1||v<0||v>=t.length)throw new Error("Supplied index out of bounds");return o!==v&&(t.splice(o,1),t.splice(v,0,a)),a};c.exports=m},40853:c=>{/** + */var m=function(t,o,v){var a=t.indexOf(o);if(a===-1||v<0||v>=t.length)throw new Error("Supplied index out of bounds");return a!==v&&(t.splice(a,1),t.splice(v,0,o)),o};c.exports=m},40853:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.indexOf(a);if(v!==-1&&v{/** + */var m=function(t,o){var v=t.indexOf(o);if(v!==-1&&v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=[],n,e=!1;if((v||o)&&(e=!0,v||(v=""),o||(o="")),a=a;n--)e?r.push(v+n.toString()+o):r.push(n);else for(n=t;n<=a;n++)e?r.push(v+n.toString()+o):r.push(n);return r};c.exports=m},593:(c,m,t)=>{/** + */var m=function(t,o,v,a){var r=[],n,e=!1;if((v||a)&&(e=!0,v||(v=""),a||(a="")),o=o;n--)e?r.push(v+n.toString()+a):r.push(n);else for(n=t;n<=o;n++)e?r.push(v+n.toString()+a):r.push(n);return r};c.exports=m},593:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2284),v=function(o,r,n){o===void 0&&(o=0),r===void 0&&(r=null),n===void 0&&(n=1),r===null&&(r=o,o=0);for(var e=[],i=Math.max(a((r-o)/(n||1)),0),h=0;h{/** + */var o=t(2284),v=function(a,r,n){a===void 0&&(a=0),r===void 0&&(r=null),n===void 0&&(n=1),r===null&&(r=a,a=0);for(var e=[],i=Math.max(o((r-a)/(n||1)),0),h=0;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function m(v,o,r){var n=v[o];v[o]=v[r],v[r]=n}function t(v,o){return vo?1:0}var a=function(v,o,r,n,e){for(r===void 0&&(r=0),n===void 0&&(n=v.length-1),e===void 0&&(e=t);n>r;){if(n-r>600){var i=n-r+1,h=o-r+1,s=Math.log(i),l=.5*Math.exp(2*s/3),f=.5*Math.sqrt(s*l*(i-l)/i)*(h-i/2<0?-1:1),u=Math.max(r,Math.floor(o-h*l/i+f)),d=Math.min(n,Math.floor(o+(i-h)*l/i+f));a(v,o,u,d,e)}var p=v[o],g=r,y=n;for(m(v,r,o),e(v[n],p)>0&&m(v,r,n);g0;)y--}e(v[r],p)===0?m(v,r,y):(y++,m(v,y,n)),y<=o&&(r=y+1),o<=y&&(n=y-1)}};c.exports=a},88492:(c,m,t)=>{/** + */function m(v,a,r){var n=v[a];v[a]=v[r],v[r]=n}function t(v,a){return va?1:0}var o=function(v,a,r,n,e){for(r===void 0&&(r=0),n===void 0&&(n=v.length-1),e===void 0&&(e=t);n>r;){if(n-r>600){var i=n-r+1,h=a-r+1,s=Math.log(i),l=.5*Math.exp(2*s/3),f=.5*Math.sqrt(s*l*(i-l)/i)*(h-i/2<0?-1:1),u=Math.max(r,Math.floor(a-h*l/i+f)),d=Math.min(n,Math.floor(a+(i-h)*l/i+f));o(v,a,u,d,e)}var p=v[a],g=r,y=n;for(m(v,r,a),e(v[n],p)>0&&m(v,r,n);g0;)y--}e(v[r],p)===0?m(v,r,y):(y++,m(v,y,n)),y<=a&&(r=y+1),a<=y&&(n=y-1)}};c.exports=o},88492:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35154),v=t(33680),o=function(n,e,i){for(var h=[],s=0;s{/** + */var o=t(35154),v=t(33680),a=function(n,e,i){for(var h=[],s=0;s{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(19133),v=function(o,r,n,e){e===void 0&&(e=o);var i;if(!Array.isArray(r))return i=o.indexOf(r),i!==-1?(a(o,i),n&&n.call(e,r),r):null;for(var h=r.length-1,s=[];h>=0;){var l=r[h];i=o.indexOf(l),i!==-1&&(a(o,i),s.push(l),n&&n.call(e,l)),h--}return s};c.exports=v},60248:(c,m,t)=>{/** + */var o=t(19133),v=function(a,r,n,e){e===void 0&&(e=a);var i;if(!Array.isArray(r))return i=a.indexOf(r),i!==-1?(o(a,i),n&&n.call(e,r),r):null;for(var h=r.length-1,s=[];h>=0;){var l=r[h];i=a.indexOf(l),i!==-1&&(o(a,i),s.push(l),n&&n.call(e,l)),h--}return s};c.exports=v},60248:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(19133),v=function(o,r,n,e){if(e===void 0&&(e=o),r<0||r>o.length-1)throw new Error("Index out of bounds");var i=a(o,r);return n&&n.call(e,i),i};c.exports=v},81409:(c,m,t)=>{/** + */var o=t(19133),v=function(a,r,n,e){if(e===void 0&&(e=a),r<0||r>a.length-1)throw new Error("Index out of bounds");var i=o(a,r);return n&&n.call(e,i),i};c.exports=v},81409:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82011),v=function(o,r,n,e,i){if(r===void 0&&(r=0),n===void 0&&(n=o.length),i===void 0&&(i=o),a(o,r,n)){var h=n-r,s=o.splice(r,h);if(e)for(var l=0;l{/** + */var o=t(82011),v=function(a,r,n,e,i){if(r===void 0&&(r=0),n===void 0&&(n=a.length),i===void 0&&(i=a),o(a,r,n)){var h=n-r,s=a.splice(r,h);if(e)for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(19133),v=function(o,r,n){r===void 0&&(r=0),n===void 0&&(n=o.length);var e=r+Math.floor(Math.random()*n);return a(o,e)};c.exports=v},42169:c=>{/** + */var o=t(19133),v=function(a,r,n){r===void 0&&(r=0),n===void 0&&(n=a.length);var e=r+Math.floor(Math.random()*n);return o(a,e)};c.exports=v},42169:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=t.indexOf(a),r=t.indexOf(v);return o!==-1&&r===-1?(t[o]=v,!0):!1};c.exports=m},86003:c=>{/** + */var m=function(t,o,v){var a=t.indexOf(o),r=t.indexOf(v);return a!==-1&&r===-1?(t[a]=v,!0):!1};c.exports=m},86003:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=1);for(var v=null,o=0;o{/** + */var m=function(t,o){o===void 0&&(o=1);for(var v=null,a=0;a{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=1);for(var v=null,o=0;o{/** + */var m=function(t,o){o===void 0&&(o=1);for(var v=null,a=0;a{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=t.length;if(a<0||a>r||a>=v||v>r){if(o)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};c.exports=m},89545:c=>{/** + */var m=function(t,o,v,a){var r=t.length;if(o<0||o>r||o>=v||v>r){if(a)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};c.exports=m},89545:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.indexOf(a);return v!==-1&&v>0&&(t.splice(v,1),t.unshift(a)),a};c.exports=m},17810:(c,m,t)=>{/** + */var m=function(t,o){var v=t.indexOf(o);return v!==-1&&v>0&&(t.splice(v,1),t.unshift(o)),o};c.exports=m},17810:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82011),v=function(o,r,n,e,i){if(e===void 0&&(e=0),i===void 0&&(i=o.length),a(o,e,i))for(var h=e;h{/** + */var o=t(82011),v=function(a,r,n,e,i){if(e===void 0&&(e=0),i===void 0&&(i=a.length),o(a,e,i))for(var h=e;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){for(var a=t.length-1;a>0;a--){var v=Math.floor(Math.random()*(a+1)),o=t[a];t[a]=t[v],t[v]=o}return t};c.exports=m},90126:c=>{/** + */var m=function(t){for(var o=t.length-1;o>0;o--){var v=Math.floor(Math.random()*(o+1)),a=t[o];t[o]=t[v],t[v]=a}return t};c.exports=m},90126:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=/\D/g;return t.sort(function(v,o){return parseInt(v.replace(a,""),10)-parseInt(o.replace(a,""),10)}),t};c.exports=m},19133:c=>{/** + */var m=function(t){var o=/\D/g;return t.sort(function(v,a){return parseInt(v.replace(o,""),10)-parseInt(a.replace(o,""),10)}),t};c.exports=m},19133:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){if(!(a>=t.length)){for(var v=t.length-1,o=t[a],r=a;r{/** + */var m=function(t,o){if(!(o>=t.length)){for(var v=t.length-1,a=t[o],r=o;r{/** * @author Richard Davey * @author Angry Bytes (and contributors) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82264);function v(e,i){return String(e).localeCompare(i)}function o(e,i){var h=e.length;if(h<=1)return e;for(var s=new Array(h),l=1;ll&&(p=l),g>l&&(g=l),y=d,x=p;;)if(y{/** + */var o=t(82264);function v(e,i){return String(e).localeCompare(i)}function a(e,i){var h=e.length;if(h<=1)return e;for(var s=new Array(h),l=1;ll&&(p=l),g>l&&(g=l),y=d,x=p;;)if(y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(a===v)return t;var o=t.indexOf(a),r=t.indexOf(v);if(o<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[o]=v,t[r]=a,t};c.exports=m},37105:(c,m,t)=>{/** + */var m=function(t,o,v){if(o===v)return t;var a=t.indexOf(o),r=t.indexOf(v);if(a<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[a]=v,t[r]=o,t};c.exports=m},37105:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6208,13 +6208,13 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var a=t[0].length,v=1;v{/** + */var m=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var o=t[0].length,v=1;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41836),v=t(86922),o=function(r){var n="";if(!v(r))return n;for(var e=0;e{/** +`}}return n};c.exports=a},92598:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6222,31 +6222,31 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){for(var a=0;a{/** + */var m=function(t){for(var o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37829),v=function(o){return a(o,180)};c.exports=v},44657:(c,m,t)=>{/** + */var o=t(37829),v=function(a){return o(a,180)};c.exports=v},44657:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37829),v=function(o,r){r===void 0&&(r=1);for(var n=0;n{/** + */var o=t(37829),v=function(a,r){r===void 0&&(r=1);for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(86922),v=t(2429),o=function(r,n){if(n===void 0&&(n=90),!a(r))return null;if(typeof n!="string"&&(n=(n%360+360)%360),n===90||n===-270||n==="rotateLeft")r=v(r),r.reverse();else if(n===-90||n===270||n==="rotateRight")r.reverse(),r=v(r);else if(Math.abs(n)===180||n==="rotate180"){for(var e=0;e{/** + */var o=t(86922),v=t(2429),a=function(r,n){if(n===void 0&&(n=90),!o(r))return null;if(typeof n!="string"&&(n=(n%360+360)%360),n===90||n===-270||n==="rotateLeft")r=v(r),r.reverse();else if(n===-90||n===270||n==="rotateRight")r.reverse(),r=v(r);else if(Math.abs(n)===180||n==="rotate180"){for(var e=0;e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37829),v=function(o,r){r===void 0&&(r=1);for(var n=0;n{/** + */var o=t(37829),v=function(a,r){r===void 0&&(r=1);for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(86003),v=t(49498),o=function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),e!==0&&(e<0?a(r,Math.abs(e)):v(r,e)),n!==0)for(var i=0;i{/** + */var o=t(86003),v=t(49498),a=function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),e!==0&&(e<0?o(r,Math.abs(e)):v(r,e)),n!==0)for(var i=0;i{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){for(var a=t.length,v=t[0].length,o=new Array(v),r=0;r-1;n--)o[r][n]=t[n][r]}return o};c.exports=m},54915:(c,m,t)=>{/** + */var m=function(t){for(var o=t.length,v=t[0].length,a=new Array(v),r=0;r-1;n--)a[r][n]=t[n][r]}return a};c.exports=m},54915:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6255,12 +6255,12 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=function(a,v){for(var o=new Uint8Array(a),r=o.length,n=v?"data:"+v+";base64,":"",e=0;e>2],n+=m[(o[e]&3)<<4|o[e+1]>>4],n+=m[(o[e+1]&15)<<2|o[e+2]>>6],n+=m[o[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};c.exports=t},53134:c=>{/** + */var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=function(o,v){for(var a=new Uint8Array(o),r=a.length,n=v?"data:"+v+";base64,":"",e=0;e>2],n+=m[(a[e]&3)<<4|a[e+1]>>4],n+=m[(a[e+1]&15)<<2|a[e+2]>>6],n+=m[a[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};c.exports=t},53134:c=>{/** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */for(var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),a=0;a>4,u[e++]=(h&15)<<4|s>>2,u[e++]=(s&3)<<6|l&63;return f};c.exports=v},65839:(c,m,t)=>{/** + */for(var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),o=0;o>4,u[e++]=(h&15)<<4|s>>2,u[e++]=(s&3)<<6|l&63;return f};c.exports=v},65839:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6272,43 +6272,43 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a={};for(var v in t)Array.isArray(t[v])?a[v]=t[v].slice(0):a[v]=t[v];return a};c.exports=m},62644:c=>{/** + */var m=function(t){var o={};for(var v in t)Array.isArray(t[v])?o[v]=t[v].slice(0):o[v]=t[v];return o};c.exports=m},62644:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a,v,o;if(typeof t!="object"||t===null)return t;a=Array.isArray(t)?[]:{};for(o in t)v=t[o],a[o]=m(v);return a};c.exports=m},79291:(c,m,t)=>{/** + */var m=function(t){var o,v,a;if(typeof t!="object"||t===null)return t;o=Array.isArray(t)?[]:{};for(a in t)v=t[a],o[a]=m(v);return o};c.exports=m},79291:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41212),v=function(){var o,r,n,e,i,h,s=arguments[0]||{},l=1,f=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),f===l&&(s=this,--l);l{/** + */var o=t(41212),v=function(){var a,r,n,e,i,h,s=arguments[0]||{},l=1,f=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),f===l&&(s=this,--l);l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(75508),v=t(35154),o=function(r,n,e){var i=v(r,n,null);if(i===null)return e;if(Array.isArray(i))return a.RND.pick(i);if(typeof i=="object"){if(i.hasOwnProperty("randInt"))return a.RND.integerInRange(i.randInt[0],i.randInt[1]);if(i.hasOwnProperty("randFloat"))return a.RND.realInRange(i.randFloat[0],i.randFloat[1])}else if(typeof i=="function")return i(n);return i};c.exports=o},95540:c=>{/** + */var o=t(75508),v=t(35154),a=function(r,n,e){var i=v(r,n,null);if(i===null)return e;if(Array.isArray(i))return o.RND.pick(i);if(typeof i=="object"){if(i.hasOwnProperty("randInt"))return o.RND.integerInRange(i.randInt[0],i.randInt[1]);if(i.hasOwnProperty("randFloat"))return o.RND.realInRange(i.randFloat[0],i.randFloat[1])}else if(typeof i=="function")return i(n);return i};c.exports=a},95540:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=typeof t;return!t||o==="number"||o==="string"?v:t.hasOwnProperty(a)&&t[a]!==void 0?t[a]:v};c.exports=m},82840:(c,m,t)=>{/** + */var m=function(t,o,v){var a=typeof t;return!t||a==="number"||a==="string"?v:t.hasOwnProperty(o)&&t[o]!==void 0?t[o]:v};c.exports=m},82840:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35154),v=t(45319),o=function(r,n,e,i,h){h===void 0&&(h=e);var s=a(r,n,h);return v(s,e,i)};c.exports=o},35154:c=>{/** + */var o=t(35154),v=t(45319),a=function(r,n,e,i,h){h===void 0&&(h=e);var s=o(r,n,h);return v(s,e,i)};c.exports=a},35154:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){if(!t&&!o||typeof t=="number")return v;if(t&&t.hasOwnProperty(a))return t[a];if(o&&o.hasOwnProperty(a))return o[a];if(a.indexOf(".")!==-1){for(var r=a.split("."),n=t,e=o,i=v,h=v,s=!0,l=!0,f=0;f{/** + */var m=function(t,o,v,a){if(!t&&!a||typeof t=="number")return v;if(t&&t.hasOwnProperty(o))return t[o];if(a&&a.hasOwnProperty(o))return a[o];if(o.indexOf(".")!==-1){for(var r=o.split("."),n=t,e=a,i=v,h=v,s=!0,l=!0,f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){for(var v=0;v{/** + */var m=function(t,o){for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){for(var v=0;v{/** + */var m=function(t,o){for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.hasOwnProperty(a)};c.exports=m},41212:c=>{/** + */var m=function(t,o){return t.hasOwnProperty(o)};c.exports=m},41212:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6316,19 +6316,19 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41786),v=function(o,r){var n=a(o);for(var e in r)n.hasOwnProperty(e)||(n[e]=r[e]);return n};c.exports=v},269:(c,m,t)=>{/** + */var o=t(41786),v=function(a,r){var n=o(a);for(var e in r)n.hasOwnProperty(e)||(n[e]=r[e]);return n};c.exports=v},269:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41786),v=function(o,r){var n=a(o);for(var e in r)n.hasOwnProperty(e)&&(n[e]=r[e]);return n};c.exports=v},18254:(c,m,t)=>{/** + */var o=t(41786),v=function(a,r){var n=o(a);for(var e in r)n.hasOwnProperty(e)&&(n[e]=r[e]);return n};c.exports=v},18254:(c,m,t)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(97022),v=function(o,r){for(var n={},e=0;e{/** + */var o=t(97022),v=function(a,r){for(var n={},e=0;e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(!t||typeof t=="number")return!1;if(t.hasOwnProperty(a))return t[a]=v,!0;if(a.indexOf(".")!==-1){for(var o=a.split("."),r=t,n=t,e=0;e{/** + */var m=function(t,o,v){if(!t||typeof t=="number")return!1;if(t.hasOwnProperty(o))return t[o]=v,!0;if(o.indexOf(".")!==-1){for(var a=o.split("."),r=t,n=t,e=0;e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6336,15 +6336,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.replace(/%([0-9]+)/g,function(v,o){return a[Number(o)-1]})};c.exports=m},41836:c=>{/** + */var m=function(t,o){return t.replace(/%([0-9]+)/g,function(v,a){return o[Number(a)-1]})};c.exports=m},41836:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){a===void 0&&(a=0),v===void 0&&(v=" "),o===void 0&&(o=3),t=t.toString();var r=0;if(a+1>=t.length)switch(o){case 1:t=new Array(a+1-t.length).join(v)+t;break;case 3:var n=Math.ceil((r=a-t.length)/2),e=r-n;t=new Array(e+1).join(v)+t+new Array(n+1).join(v);break;default:t=t+new Array(a+1-t.length).join(v);break}return t};c.exports=m},33628:c=>{/** + */var m=function(t,o,v,a){o===void 0&&(o=0),v===void 0&&(v=" "),a===void 0&&(a=3),t=t.toString();var r=0;if(o+1>=t.length)switch(a){case 1:t=new Array(o+1-t.length).join(v)+t;break;case 3:var n=Math.ceil((r=o-t.length)/2),e=r-n;t=new Array(e+1).join(v)+t+new Array(n+1).join(v);break;default:t=t+new Array(o+1-t.length).join(v);break}return t};c.exports=m},33628:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===0?t.slice(1):t.slice(0,a-1)+t.slice(a)};c.exports=m},27671:c=>{/** + */var m=function(t,o){return o===0?t.slice(1):t.slice(0,o-1)+t.slice(o)};c.exports=m},27671:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6352,7 +6352,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var a=Math.random()*16|0,v=t==="x"?a:a&3|8;return v.toString(16)})};c.exports=m},35355:c=>{/** + */var m=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var o=Math.random()*16|0,v=t==="x"?o:o&3|8;return v.toString(16)})};c.exports=m},35355:c=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6360,28 +6360,28 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Format:t(27902),Pad:t(41836),RemoveAt:t(33628),Reverse:t(27671),UppercaseFirst:t(35355),UUID:t(45650)}}},I={};function B(c){var m=I[c];if(m!==void 0)return m.exports;var t=I[c]={exports:{}};return A[c](t,t.exports,B),t.exports}B.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var b=B(85454);return b})())})(sf);var Fr=sf.exports;const js=Uu(Fr);var Zy=Object.create,Eo=Object.defineProperty,Jy=Object.defineProperties,Qy=Object.getOwnPropertyDescriptor,ky=Object.getOwnPropertyDescriptors,qy=Object.getOwnPropertyNames,Su=Object.getOwnPropertySymbols,_y=Object.getPrototypeOf,nf=Object.prototype.hasOwnProperty,t1=Object.prototype.propertyIsEnumerable,Cu=(E,S,A)=>S in E?Eo(E,S,{enumerable:!0,configurable:!0,writable:!0,value:A}):E[S]=A,re=(E,S)=>{for(var A in S||(S={}))nf.call(S,A)&&Cu(E,A,S[A]);if(Su)for(var A of Su(S))t1.call(S,A)&&Cu(E,A,S[A]);return E},zi=(E,S)=>Jy(E,ky(S)),Ft=(E,S)=>()=>(S||E((S={exports:{}}).exports,S),S.exports),e1=(E,S,A,I)=>{if(S&&typeof S=="object"||typeof S=="function")for(let B of qy(S))!nf.call(E,B)&&B!==A&&Eo(E,B,{get:()=>S[B],enumerable:!(I=Qy(S,B))||I.enumerable});return E},rf=(E,S,A)=>(A=E!=null?Zy(_y(E)):{},e1(S||!E||!E.__esModule?Eo(A,"default",{value:E,enumerable:!0}):A,E)),Lr=Ft(E=>{var S=function(b,c){return bc?1:0},A=function(b,c){return bc?-1:0};function I(b){return function(c,m){return b(m,c)}}function B(b){return b===2?function(c,m){return c[0]m[0]?1:c[1]m[1]?1:0}:function(c,m){for(var t=0;tm[t])return 1;t++}return 0}}E.DEFAULT_COMPARATOR=S,E.DEFAULT_REVERSE_COMPARATOR=A,E.reverseComparator=I,E.createTupleComparator=B}),i1=Ft(E=>{E.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",E.SYMBOL_SUPPORT=typeof Symbol<"u"}),he=Ft((E,S)=>{var A=i1(),I=A.ARRAY_BUFFER_SUPPORT,B=A.SYMBOL_SUPPORT;S.exports=function(b,c){var m,t,a,v,o;if(!b)throw new Error("obliterator/forEach: invalid iterable.");if(typeof c!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(b)||I&&ArrayBuffer.isView(b)||typeof b=="string"||b.toString()==="[object Arguments]"){for(a=0,v=b.length;a{var A=Lr(),I=he(),B=A.DEFAULT_COMPARATOR,b=A.reverseComparator;function c(i){if(this.clear(),this.comparator=i||B,typeof this.comparator!="function")throw new Error("mnemonist/FibonacciHeap.constructor: given comparator should be a function.")}c.prototype.clear=function(){this.root=null,this.min=null,this.size=0};function m(i){return{item:i,degree:0}}function t(i,h){i.root?(h.right=i.root.right,h.left=i.root,i.root.right.left=h,i.root.right=h):i.root=h}c.prototype.push=function(i){var h=m(i);return h.left=h,h.right=h,t(this,h),(!this.min||this.comparator(h.item,this.min.item)<=0)&&(this.min=h),++this.size},c.prototype.peek=function(){return this.min?this.min.item:void 0};function a(i){for(var h=[],s=i,l=!1;!(s===i&&l);)s===i&&(l=!0),h.push(s),s=s.right;return h}function v(i,h){i.root===h&&(i.root=h.right),h.left.right=h.right,h.right.left=h.left}function o(i,h){i.child?(h.right=i.child.right,h.left=i.child,i.child.right.left=h,i.child.right=h):i.child=h}function r(i,h,s){v(i,h),h.left=h,h.right=h,o(s,h),s.degree++,h.parent=s}function n(i){var h=new Array(i.size),s=a(i.root),l,f,u,d,p,g;for(l=0,f=s.length;l0&&(g=u,u=d,d=g),r(i,d,u),h[p]=null,p++;h[p]=u}for(l=0;l{var S=Math.pow(2,8)-1,A=Math.pow(2,16)-1,I=Math.pow(2,32)-1,B=Math.pow(2,7)-1,b=Math.pow(2,15)-1,c=Math.pow(2,31)-1;E.getPointerArray=function(t){var a=t-1;if(a<=S)return Uint8Array;if(a<=A)return Uint16Array;if(a<=I)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},E.getSignedPointerArray=function(t){var a=t-1;return a<=B?Int8Array:a<=b?Int16Array:a<=c?Int32Array:Float64Array},E.getNumberType=function(t){return t===(t|0)?Math.sign(t)===-1?t<=127&&t>=-128?Int8Array:t<=32767&&t>=-32768?Int16Array:Int32Array:t<=255?Uint8Array:t<=65535?Uint16Array:Uint32Array:Float64Array};var m={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};E.getMinimalRepresentation=function(t,a){var v=null,o=0,r,n,e,i,h;for(i=0,h=t.length;io&&(o=r,v=n);return v},E.isTypedArray=function(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(t)},E.concat=function(){var t=0,a,v,o;for(a=0,o=arguments.length;a{var S=he(),A=Be();function I(m){return Array.isArray(m)||A.isTypedArray(m)}function B(m){if(typeof m.length=="number")return m.length;if(typeof m.size=="number")return m.size}function b(m){var t=B(m),a=typeof t=="number"?new Array(t):[],v=0;return S(m,function(o){a[v++]=o}),a}function c(m){var t=B(m),a=typeof t=="number"?A.getPointerArray(t):Array,v=typeof t=="number"?new Array(t):[],o=typeof t=="number"?new a(t):[],r=0;return S(m,function(n){v[r]=n,o[r]=r++}),[v,o]}E.isArrayLike=I,E.guessLength=B,E.toArray=b,E.toArrayWithIndices=c}),Ao=Ft((E,S)=>{var A=he(),I=Lr(),B=We(),b=I.DEFAULT_COMPARATOR,c=I.reverseComparator;function m(f,u,d,p){for(var g=u[p],y,x;p>d;){if(y=p-1>>1,x=u[y],f(g,x)<0){u[p]=x,p=y;continue}break}u[p]=g}function t(f,u,d){for(var p=u.length,g=d,y=u[d],x=2*d+1,T;x=0&&(x=T),u[d]=u[x],d=x,x=2*d+1;u[d]=y,m(f,u,g,d)}function a(f,u,d){u.push(d),m(f,u,0,u.length-1)}function v(f,u){var d=u.pop();if(u.length!==0){var p=u[0];return u[0]=d,t(f,u,0),p}return d}function o(f,u,d){if(u.length===0)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var p=u[0];return u[0]=d,t(f,u,0),p}function r(f,u,d){var p;return u.length!==0&&f(u[0],d)<0&&(p=u[0],u[0]=d,d=p,t(f,u,0)),d}function n(f,u){for(var d=u.length,p=d>>1,g=p;--g>=0;)t(f,u,g)}function e(f,u){for(var d=u.length,p=0,g=new Array(d);p=d.length)return d.slice().sort(f);for(C=d.slice(0,u),n(p,C),g=u,y=d.length;g0&&o(p,C,d[g]);return C.sort(f)}var M=B.guessLength(d);return M!==null&&M0&&o(p,C,w)),g++}),C.length>g&&(C.length=g),C.sort(f)}function h(f,u,d){arguments.length===2&&(d=u,u=f,f=b);var p=c(f),g,y,x,T=-1/0,C;if(u===1){if(B.isArrayLike(d)){for(g=0,y=d.length;g0)&&(T=x);return C=new d.constructor(1),C[0]=T,C}return A(d,function(w){(T===-1/0||f(w,T)>0)&&(T=w)}),[T]}if(B.isArrayLike(d)){if(u>=d.length)return d.slice().sort(p);for(C=d.slice(0,u),n(f,C),g=u,y=d.length;g0&&o(f,C,d[g]);return C.sort(p)}var M=B.guessLength(d);return M!==null&&M0&&o(f,C,w)),g++}),C.length>g&&(C.length=g),C.sort(p)}function s(f){if(this.clear(),this.comparator=f||b,typeof this.comparator!="function")throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}s.prototype.clear=function(){this.items=[],this.size=0},s.prototype.push=function(f){return a(this.comparator,this.items,f),++this.size},s.prototype.peek=function(){return this.items[0]},s.prototype.pop=function(){return this.size!==0&&this.size--,v(this.comparator,this.items)},s.prototype.replace=function(f){return o(this.comparator,this.items,f)},s.prototype.pushpop=function(f){return r(this.comparator,this.items,f)},s.prototype.consume=function(){return this.size=0,e(this.comparator,this.items)},s.prototype.toArray=function(){return e(this.comparator,this.items.slice())},s.prototype.inspect=function(){var f=this.toArray();return Object.defineProperty(f,"constructor",{value:s,enumerable:!1}),f},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect);function l(f){if(this.clear(),this.comparator=f||b,typeof this.comparator!="function")throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=c(this.comparator)}l.prototype=s.prototype,s.from=function(f,u){var d=new s(u),p;return B.isArrayLike(f)?p=f.slice():p=B.toArray(f),n(d.comparator,p),d.items=p,d.size=p.length,d},l.from=function(f,u){var d=new l(u),p;return B.isArrayLike(f)?p=f.slice():p=B.toArray(f),n(d.comparator,p),d.items=p,d.size=p.length,d},s.siftUp=t,s.siftDown=m,s.push=a,s.pop=v,s.replace=o,s.pushpop=r,s.heapify=n,s.consume=e,s.nsmallest=i,s.nlargest=h,s.MinHeap=s,s.MaxHeap=l,S.exports=s}),s1=Ft((E,S)=>{var A="";function I(a,v,o){for(var r=v.length,n=[],e=r,i=-1,h,s=0,l;e--;)i=Math.max(a[v[e]+o],i);for(l=i>>24&&32||i>>16&&24||i>>8&&16||8;s>s&15].push(v[e]);for(h=0;h<16;h++)for(i=n[h].length;i--;)v[++e]=n[h][i]}}function B(a,v,o,r){return a[o]-a[r]||(o%3===2?a[o+1]-a[r+1]||v[o+2]-v[r+2]:v[o+1]-v[r+1])}function b(a,v){var o=[],r=[],n=2*v/3|0,e=v-n,i=n+1>>1,h=n,s=0,l,f=[],u=[];if(v===1)return[0];for(;h--;)o[h]=(h*3>>1)+1;for(h=3;h--;)I(a,o,h);for(s=r[(o[0]/3|0)+(o[0]%3===1?0:i)]=1,h=1;hthis.firstLength&&e>this.firstLength)){for(v=Math.min(this.length-n,this.length-e),r=0;ra.length&&(a=this.text.slice(n,n+v))}return a},t.prototype.toString=function(){return this.array.join(",")},t.prototype.toJSON=function(){return this.array},t.prototype.inspect=function(){for(var a=new Array(this.length),v=0;v{var A=he();function I(a){this.size=0,this.items=new Map,this.inverse=a}function B(){this.size=0,this.items=new Map,this.inverse=new I(this)}function b(){this.size=0,this.items.clear(),this.inverse.items.clear()}B.prototype.clear=b,I.prototype.clear=b;function c(a,v){if(this.items.has(a)){var o=this.items.get(a);if(o===v)return this;this.inverse.items.delete(o)}if(this.inverse.items.has(v)){var r=this.inverse.items.get(v);if(r===a)return this;this.items.delete(r)}return this.items.set(a,v),this.inverse.items.set(v,a),this.size=this.items.size,this.inverse.size=this.inverse.items.size,this}B.prototype.set=c,I.prototype.set=c;function m(a){if(this.items.has(a)){var v=this.items.get(a);return this.items.delete(a),this.inverse.items.delete(v),this.size=this.items.size,this.inverse.size=this.inverse.items.size,!0}return!1}B.prototype.delete=m,I.prototype.delete=m;var t=["has","get","forEach","keys","values","entries"];t.forEach(function(a){B.prototype[a]=I.prototype[a]=function(){return Map.prototype[a].apply(this.items,arguments)}}),typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.entries,I.prototype[Symbol.iterator]=I.prototype.entries),B.prototype.inspect=function(){var a={left:this.items,right:this.inverse.items};return Object.defineProperty(a,"constructor",{value:B,enumerable:!1}),a},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),I.prototype.inspect=function(){var a={left:this.inverse.items,right:this.items};return Object.defineProperty(a,"constructor",{value:I,enumerable:!1}),a},typeof Symbol<"u"&&(I.prototype[Symbol.for("nodejs.util.inspect.custom")]=I.prototype.inspect),B.from=function(a){var v=new B;return A(a,function(o,r){v.set(r,o)}),v},S.exports=B}),Ee=Ft((E,S)=>{function A(I){if(typeof I!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=I}typeof Symbol<"u"&&(A.prototype[Symbol.iterator]=function(){return this}),A.of=function(){var I=arguments,B=I.length,b=0;return new A(function(){return b>=B?{done:!0}:{done:!1,value:I[b++]}})},A.empty=function(){var I=new A(function(){return{done:!0}});return I},A.fromSequence=function(I){var B=0,b=I.length;return new A(function(){return B>=b?{done:!0}:{done:!1,value:I[B++]}})},A.is=function(I){return I instanceof A?!0:typeof I=="object"&&I!==null&&typeof I.next=="function"},S.exports=A}),af=Ft(E=>{function S(c){return c|=c>>1,c|=c>>2,c|=c>>4,c|=c>>8,c|=c>>16,c&~(c>>1)}E.msb32=S;function A(c){return c|=c>>1,c|=c>>2,c|=c>>4,c&~(c>>1)}E.msb8=A,E.test=function(c,m){return c>>m&1},E.criticalBit8=function(c,m){return A(c^m)},E.criticalBit8Mask=function(c,m){return~A(c^m)>>>0&255},E.testCriticalBit8=function(c,m){return 1+(c|m)>>8},E.criticalBit32Mask=function(c,m){return~S(c^m)>>>0&4294967295},E.popcount=function(c){return c-=c>>1&1431655765,c=(c&858993459)+(c>>2&858993459),c=c+(c>>4)&252645135,c+=c>>8,c+=c>>16,c&127};var I=new Uint8Array(Math.pow(2,8));for(B=0,b=I.length;B>8&255]+I[c>>16&255]+I[c>>24&255]}}),r1=Ft((E,S)=>{var A=Ee(),I=af();function B(b){this.length=b,this.clear()}B.prototype.clear=function(){this.size=0,this.array=new Uint32Array(Math.ceil(this.length/32))},B.prototype.set=function(b,c){var m=b>>5,t=b&31,a=this.array[m],v;return c===0||c===!1?v=this.array[m]&=~(1<>>0,v>a?this.size++:v>5,m=b&31,t=this.array[c],a;return a=this.array[c]&=~(1<>5,m=b&31,t=this.array[c],a=this.array[c]^=1<>>0,a>t?this.size++:a>5,m=b&31;return this.array[c]>>m&1},B.prototype.test=function(b){return!!this.get(b)},B.prototype.rank=function(b){if(this.size===0)return 0;for(var c=b>>5,m=b&31,t=0,a=0;a=this.length)return-1;for(var c,m=32,t=0,a=0,v=0,o=this.array.length;v>r&1,a===b)return t}},B.prototype.forEach=function(b,c){c=arguments.length>1?c:this;for(var m=this.length,t,a,v=32,o=0,r=this.array.length;o>n&1,b.call(c,a,o*32+n)}},B.prototype.values=function(){var b=this.length,c=!1,m,t,a=this.array,v=a.length,o=0,r=-1,n=32;return new A(function e(){if(!c){if(o>=v)return{done:!0};o===v-1&&(n=b%32||32),m=a[o++],c=!0,r=-1}return r++,r>=n?(c=!1,e()):(t=m>>r&1,{value:t})})},B.prototype.entries=function(){var b=this.length,c=!1,m,t,a=this.array,v,o=a.length,r=0,n=-1,e=32;return new A(function i(){if(!c){if(r>=o)return{done:!0};r===o-1&&(e=b%32||32),m=a[r++],c=!0,n=-1}return n++,v=~-r*32+n,n>=e?(c=!1,i()):(t=m>>n&1,{value:[v,t]})})},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.values),B.prototype.inspect=function(){var b=new Uint8Array(this.length);return this.forEach(function(c,m){b[m]=c}),Object.defineProperty(b,"constructor",{value:B,enumerable:!1}),b},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),B.prototype.toJSON=function(){return Array.from(this.array)},S.exports=B}),a1=Ft((E,S)=>{var A=Ee(),I=af(),B=function(m){return Math.max(1,Math.ceil(m*1.5))};function b(m){return new Uint32Array(Math.ceil(m/32))}function c(m){var t=m||0,a=B;typeof m=="object"&&(t=m.initialLength||m.initialCapacity||0,a=m.policy||a),this.size=0,this.length=t,this.capacity=Math.ceil(this.length/32)*32,this.policy=a,this.array=b(this.capacity)}c.prototype.set=function(m,t){if(this.length>5,v=m&31,o=this.array[a],r;return t===0||t===!1?r=this.array[a]&=~(1<>>0,r>o?this.size++:r>5,a=m&31,v=this.array[t],o;return o=this.array[t]&=~(1<>5,a=m&31,v=this.array[t],o=this.array[t]^=1<>>0,o>v?this.size++:othis.array.length?(this.array=new Uint32Array(v),this.array.set(a,0)):this.array=a.slice(0,v),this.capacity=m,this)},c.prototype.grow=function(m){var t;if(typeof m=="number"){if(this.capacity>=m)return this;for(t=this.capacity;t>5,v=t&31;return this.array[a]|=1<>5,a=m&31;return this.array[t]>>a&1}},c.prototype.get=function(m){if(!(this.length>5,a=m&31;return this.array[t]>>a&1}},c.prototype.test=function(m){return this.length>5,a=m&31,v=0,o=0;o=this.length)return-1;for(var t,a=32,v=0,o=0,r=0,n=this.array.length;r>e&1,o===m)return v}},c.prototype.forEach=function(m,t){t=arguments.length>1?t:this;for(var a=this.length,v,o,r=32,n=0,e=this.array.length;n>i&1,m.call(t,o,n*32+i)}},c.prototype.values=function(){var m=this.length,t=!1,a,v,o=this.array,r=o.length,n=0,e=-1,i=32;return new A(function h(){if(!t){if(n>=r)return{done:!0};n===r-1&&(i=m%32||32),a=o[n++],t=!0,e=-1}return e++,e>=i?(t=!1,h()):(v=a>>e&1,{value:v})})},c.prototype.entries=function(){var m=this.length,t=!1,a,v,o=this.array,r,n=o.length,e=0,i=-1,h=32;return new A(function s(){if(!t){if(e>=n)return{done:!0};e===n-1&&(h=m%32||32),a=o[e++],t=!0,i=-1}return i++,r=~-e*32+i,i>=h?(t=!1,s()):(v=a>>i&1,{value:[r,v]})})},typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=c.prototype.values),c.prototype.inspect=function(){var m=new Uint8Array(this.length);return this.forEach(function(t,a){m[a]=t}),Object.defineProperty(m,"constructor",{value:c,enumerable:!1}),m},typeof Symbol<"u"&&(c.prototype[Symbol.for("nodejs.util.inspect.custom")]=c.prototype.inspect),c.prototype.toJSON=function(){return Array.from(this.array.slice(0,(this.length>>5)+1))},S.exports=c}),o1=Ft((E,S)=>{function A(b,c){return(b&65535)*c+(((b>>>16)*c&65535)<<16)&4294967295}function I(b,c){return(b&65535)+(c>>>16)+(((b>>>16)+c&65535)<<16)&4294967295}function B(b,c){return b<>>32-c}S.exports=function(b,c){var m=3432918353,t=461845907,a=15,v=13,o=5,r=1801774676,n=b,e,i,h;for(i=0,h=c.length-4;i<=h;i+=4)e=c[i]|c[i+1]<<8|c[i+2]<<16|c[i+3]<<24,e=A(e,m),e=B(e,a),e=A(e,t),n^=e,n=B(n,v),n=A(n,o),n=I(n,r);switch(e=0,c.length&3){case 3:e^=c[i+2]<<16;case 2:e^=c[i+1]<<8;case 1:e^=c[i],e=A(e,m),e=B(e,a),e=A(e,t),n^=e}return n^=c.length,n^=n>>>16,n=A(n,2246822507),n^=n>>>13,n=A(n,3266489909),n^=n>>>16,n>>>0}}),h1=Ft((E,S)=>{var A=o1(),I=he(),B=Math.LN2*Math.LN2,b={errorRate:.005};function c(a){var v=new Uint16Array(a.length),o,r;for(o=0,r=a.length;o>3]|=e}return this},t.prototype.test=function(a){for(var v=c(a),o=0,r=this.hashFunctions;o>3]&1<<(7&n)))return!1}return!0},t.prototype.toJSON=function(){return this.data},t.from=function(a,v){if(!v&&(v=a.length||a.size,typeof v!="number"))throw new Error("BloomFilter.from: could not infer the filter's capacity. Try passing it as second argument.");var o=new t(v);return I(a,function(r){o.add(r)}),o},S.exports=t}),l1=Ft((E,S)=>{var A=he();function I(B){if(typeof B!="function")throw new Error("mnemonist/BKTree.constructor: given `distance` should be a function.");this.distance=B,this.clear()}I.prototype.add=function(B){if(!this.root)return this.root={item:B,children:{}},this.size++,this;for(var b=this.root,c;c=this.distance(B,b.item),!!b.children[c];)b=b.children[c];return b.children[c]={item:B,children:{}},this.size++,this},I.prototype.search=function(B,b){if(!this.root)return[];for(var c=[],m=[this.root],t,a,v,o,r;m.length;)for(t=m.pop(),v=this.distance(b,t.item),v<=B&&c.push({item:t.item,distance:v}),o=v-B,r=v+B+1;o{var A=We(),I=Ee();function B(b,c){if(arguments.length<2)throw new Error("mnemonist/fixed-deque: expecting an Array class and a capacity.");if(typeof c!="number"||c<=0)throw new Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=b,this.capacity=c,this.items=new b(this.capacity),this.clear()}B.prototype.clear=function(){this.start=0,this.size=0},B.prototype.push=function(b){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.push: deque capacity ("+this.capacity+") exceeded!");var c=this.start+this.size;return c>=this.capacity&&(c-=this.capacity),this.items[c]=b,++this.size},B.prototype.unshift=function(b){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.unshift: deque capacity ("+this.capacity+") exceeded!");var c=this.start-1;return this.start===0&&(c=this.capacity-1),this.items[c]=b,this.start=c,++this.size},B.prototype.pop=function(){if(this.size!==0){this.size--;var b=this.start+this.size;return b>=this.capacity&&(b-=this.capacity),this.items[b]}},B.prototype.shift=function(){if(this.size!==0){var b=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[b]}},B.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},B.prototype.peekLast=function(){if(this.size!==0){var b=this.start+this.size-1;return b>=this.capacity&&(b-=this.capacity),this.items[b]}},B.prototype.get=function(b){if(!(this.size===0||b>=this.capacity))return b=this.start+b,b>=this.capacity&&(b-=this.capacity),this.items[b]},B.prototype.forEach=function(b,c){c=arguments.length>1?c:this;for(var m=this.capacity,t=this.size,a=this.start,v=0;v=m)return{done:!0};var v=b[t];return t++,a++,t===c&&(t=0),{value:v,done:!1}})},B.prototype.entries=function(){var b=this.items,c=this.capacity,m=this.size,t=this.start,a=0;return new I(function(){if(a>=m)return{done:!0};var v=b[t];return t++,t===c&&(t=0),{value:[a++,v],done:!1}})},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.values),B.prototype.inspect=function(){var b=this.toArray();return b.type=this.ArrayClass.name,b.capacity=this.capacity,Object.defineProperty(b,"constructor",{value:B,enumerable:!1}),b},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),B.from=function(b,c,m){if(arguments.length<3&&(m=A.guessLength(b),typeof m!="number"))throw new Error("mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.");var t=new B(c,m);if(A.isArrayLike(b)){var a,v;for(a=0,v=b.length;a{var A=We(),I=of();function B(c,m){if(arguments.length<2)throw new Error("mnemonist/circular-buffer: expecting an Array class and a capacity.");if(typeof m!="number"||m<=0)throw new Error("mnemonist/circular-buffer: `capacity` should be a positive number.");this.ArrayClass=c,this.capacity=m,this.items=new c(this.capacity),this.clear()}function b(c){B.prototype[c]=I.prototype[c]}Object.keys(I.prototype).forEach(b),typeof Symbol<"u"&&Object.getOwnPropertySymbols(I.prototype).forEach(b),B.prototype.push=function(c){var m=this.start+this.size;return m>=this.capacity&&(m-=this.capacity),this.items[m]=c,this.size===this.capacity?(m++,m>=this.capacity?this.start=0:this.start=m,this.size):++this.size},B.prototype.unshift=function(c){var m=this.start-1;return this.start===0&&(m=this.capacity-1),this.items[m]=c,this.size===this.capacity?(this.start=m,this.size):(this.start=m,++this.size)},B.from=function(c,m,t){if(arguments.length<3&&(t=A.guessLength(c),typeof t!="number"))throw new Error("mnemonist/circular-buffer.from: could not guess iterable length. Please provide desired capacity as last argument.");var a=new B(m,t);if(A.isArrayLike(c)){var v,o;for(v=0,o=c.length;v{function A(I){if(typeof I!="function")throw new Error("mnemonist/DefaultMap.constructor: expecting a function.");this.items=new Map,this.factory=I,this.size=0}A.prototype.clear=function(){this.items.clear(),this.size=0},A.prototype.get=function(I){var B=this.items.get(I);return typeof B>"u"&&(B=this.factory(I,this.size),this.items.set(I,B),this.size++),B},A.prototype.peek=function(I){return this.items.get(I)},A.prototype.set=function(I,B){return this.items.set(I,B),this.size=this.items.size,this},A.prototype.has=function(I){return this.items.has(I)},A.prototype.delete=function(I){var B=this.items.delete(I);return this.size=this.items.size,B},A.prototype.forEach=function(I,B){B=arguments.length>1?B:this,this.items.forEach(I,B)},A.prototype.entries=function(){return this.items.entries()},A.prototype.keys=function(){return this.items.keys()},A.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(A.prototype[Symbol.iterator]=A.prototype.entries),A.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(A.prototype[Symbol.for("nodejs.util.inspect.custom")]=A.prototype.inspect),A.autoIncrement=function(){var I=0;return function(){return I++}},S.exports=A}),d1=Ft((E,S)=>{function A(I){if(typeof I!="function")throw new Error("mnemonist/DefaultWeakMap.constructor: expecting a function.");this.items=new WeakMap,this.factory=I}A.prototype.clear=function(){this.items=new WeakMap},A.prototype.get=function(I){var B=this.items.get(I);return typeof B>"u"&&(B=this.factory(I),this.items.set(I,B)),B},A.prototype.peek=function(I){return this.items.get(I)},A.prototype.set=function(I,B){return this.items.set(I,B),this},A.prototype.has=function(I){return this.items.has(I)},A.prototype.delete=function(I){return this.items.delete(I)},A.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(A.prototype[Symbol.for("nodejs.util.inspect.custom")]=A.prototype.inspect),S.exports=A}),c1=Ft((E,S)=>{var A=Be();function I(B){var b=A.getPointerArray(B),c=A.getPointerArray(Math.log2(B));this.size=B,this.dimension=B,this.parents=new b(B),this.ranks=new c(B);for(var m=0;ma?this.parents[m]=c:(this.parents[m]=c,this.ranks[c]++),this},I.prototype.connected=function(B,b){var c=this.find(B);return c===this.find(b)},I.prototype.mapping=function(){for(var B=A.getPointerArray(this.dimension),b={},c=new B(this.size),m=0,t,a=0,v=this.parents.length;a"u"?(c[a]=m,b[t]=m++):c[a]=b[t];return c},I.prototype.compile=function(){for(var B={},b=new Array(this.dimension),c=0,m,t=0,a=this.parents.length;t"u"?(b[c]=[t],B[m]=c++):b[B[m]].push(t);return b},I.prototype.inspect=function(){var B=this.compile();return Object.defineProperty(B,"constructor",{value:I,enumerable:!1}),B},typeof Symbol<"u"&&(I.prototype[Symbol.for("nodejs.util.inspect.custom")]=I.prototype.inspect),S.exports=I}),Mo=Ft((E,S)=>{var A=Lr(),I=Ao(),B=A.DEFAULT_COMPARATOR,b=A.reverseComparator;function c(a,v,o,r){for(var n=o,e=r,i=v[r],h=2*r+1,s;h=0&&(h=s),v[r]=v[h],r=h,h=2*r+1;v[r]=i,I.siftDown(a,v,e,r)}function m(a,v,o,r){for(var n=r,e=n,i=new a(r),h,s;e>0;)h=o[--e],e!==0&&(s=o[0],o[0]=h,c(v,o,--r,0),h=s),i[e]=h;return i}function t(a,v,o){if(arguments.length===2&&(o=v,v=null),this.ArrayClass=a,this.capacity=o,this.items=new a(o),this.clear(),this.comparator=v||B,typeof o!="number"&&o<=0)throw new Error("mnemonist/FixedReverseHeap.constructor: capacity should be a number > 0.");if(typeof this.comparator!="function")throw new Error("mnemonist/FixedReverseHeap.constructor: given comparator should be a function.");this.comparator=b(this.comparator)}t.prototype.clear=function(){this.size=0},t.prototype.push=function(a){return this.size0&&I.replace(this.comparator,this.items,a),this.size},t.prototype.peek=function(){return this.items[0]},t.prototype.consume=function(){var a=m(this.ArrayClass,this.comparator,this.items,this.size);return this.size=0,a},t.prototype.toArray=function(){return m(this.ArrayClass,this.comparator,this.items.slice(0,this.size),this.size)},t.prototype.inspect=function(){var a=this.toArray();return Object.defineProperty(a,"constructor",{value:t,enumerable:!1}),a},typeof Symbol<"u"&&(t.prototype[Symbol.for("nodejs.util.inspect.custom")]=t.prototype.inspect),S.exports=t}),v1=Ft((E,S)=>{var A=he(),I=function(b){return b};function B(b){if(this.items=new Map,this.clear(),Array.isArray(b)?(this.writeHashFunction=b[0],this.readHashFunction=b[1]):(this.writeHashFunction=b,this.readHashFunction=b),this.writeHashFunction||(this.writeHashFunction=I),this.readHashFunction||(this.readHashFunction=I),typeof this.writeHashFunction!="function")throw new Error("mnemonist/FuzzyMap.constructor: invalid hash function given.");if(typeof this.readHashFunction!="function")throw new Error("mnemonist/FuzzyMap.constructor: invalid hash function given.")}B.prototype.clear=function(){this.items.clear(),this.size=0},B.prototype.add=function(b){var c=this.writeHashFunction(b);return this.items.set(c,b),this.size=this.items.size,this},B.prototype.set=function(b,c){return b=this.writeHashFunction(b),this.items.set(b,c),this.size=this.items.size,this},B.prototype.get=function(b){return b=this.readHashFunction(b),this.items.get(b)},B.prototype.has=function(b){return b=this.readHashFunction(b),this.items.has(b)},B.prototype.forEach=function(b,c){c=arguments.length>1?c:this,this.items.forEach(function(m){b.call(c,m,m)})},B.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.values),B.prototype.inspect=function(){var b=Array.from(this.items.values());return Object.defineProperty(b,"constructor",{value:B,enumerable:!1}),b},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),B.from=function(b,c,m){var t=new B(c);return A(b,function(a,v){m?t.set(v,a):t.add(a)}),t},S.exports=B}),hf=Ft((E,S)=>{var A=Ee(),I=he();function B(b){this.Container=b||Array,this.items=new Map,this.clear(),Object.defineProperty(this.items,"constructor",{value:B,enumerable:!1})}B.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},B.prototype.set=function(b,c){var m=this.items.get(b),t;return m||(this.dimension++,m=new this.Container,this.items.set(b,m)),this.Container===Set?(t=m.size,m.add(c),t"u"?0:this.Container===Set?c.size:c.length},B.prototype.count=B.prototype.multiplicity,B.prototype.forEach=function(b,c){c=arguments.length>1?c:this;var m;function t(a){b.call(c,a,m)}this.items.forEach(function(a,v){m=v,a.forEach(t)})},B.prototype.forEachAssociation=function(b,c){c=arguments.length>1?c:this,this.items.forEach(b,c)},B.prototype.keys=function(){return this.items.keys()},B.prototype.values=function(){var b=this.items.values(),c=!1,m,t,a,v;return this.Container===Set?new A(function o(){if(!c){if(t=b.next(),t.done)return{done:!0};c=!0,m=t.value.values()}return t=m.next(),t.done?(c=!1,o()):{done:!1,value:t.value}}):new A(function o(){if(!c){if(t=b.next(),t.done)return{done:!0};c=!0,m=t.value,a=0,v=m.length}return a>=v?(c=!1,o()):{done:!1,value:m[a++]}})},B.prototype.entries=function(){var b=this.items.entries(),c=!1,m,t,a,v,o;return this.Container===Set?new A(function r(){if(!c){if(t=b.next(),t.done)return{done:!0};c=!0,a=t.value[0],m=t.value[1].values()}return t=m.next(),t.done?(c=!1,r()):{done:!1,value:[a,t.value]}}):new A(function r(){if(!c){if(t=b.next(),t.done)return{done:!0};c=!0,a=t.value[0],m=t.value[1],v=0,o=m.length}return v>=o?(c=!1,r()):{done:!1,value:[a,m[v++]]}})},B.prototype.containers=function(){return this.items.values()},B.prototype.associations=function(){return this.items.entries()},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.entries),B.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),B.prototype.toJSON=function(){return this.items},B.from=function(b,c){var m=new B(c);return I(b,function(t,a){m.set(a,t)}),m},S.exports=B}),p1=Ft((E,S)=>{var A=hf(),I=he(),B=function(c){return c};function b(c,m){if(this.items=new A(m),this.clear(),Array.isArray(c)?(this.writeHashFunction=c[0],this.readHashFunction=c[1]):(this.writeHashFunction=c,this.readHashFunction=c),this.writeHashFunction||(this.writeHashFunction=B),this.readHashFunction||(this.readHashFunction=B),typeof this.writeHashFunction!="function")throw new Error("mnemonist/FuzzyMultiMap.constructor: invalid hash function given.");if(typeof this.readHashFunction!="function")throw new Error("mnemonist/FuzzyMultiMap.constructor: invalid hash function given.")}b.prototype.clear=function(){this.items.clear(),this.size=0,this.dimension=0},b.prototype.add=function(c){var m=this.writeHashFunction(c);return this.items.set(m,c),this.size=this.items.size,this.dimension=this.items.dimension,this},b.prototype.set=function(c,m){return c=this.writeHashFunction(c),this.items.set(c,m),this.size=this.items.size,this.dimension=this.items.dimension,this},b.prototype.get=function(c){return c=this.readHashFunction(c),this.items.get(c)},b.prototype.has=function(c){return c=this.readHashFunction(c),this.items.has(c)},b.prototype.forEach=function(c,m){m=arguments.length>1?m:this,this.items.forEach(function(t){c.call(m,t,t)})},b.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(b.prototype[Symbol.iterator]=b.prototype.values),b.prototype.inspect=function(){var c=Array.from(this);return Object.defineProperty(c,"constructor",{value:b,enumerable:!1}),c},typeof Symbol<"u"&&(b.prototype[Symbol.for("nodejs.util.inspect.custom")]=b.prototype.inspect),b.from=function(c,m,t,a){arguments.length===3&&typeof t=="boolean"&&(a=t,t=Array);var v=new b(m,t);return I(c,function(o,r){a?v.set(r,o):v.add(o)}),v},S.exports=b}),g1=Ft((E,S)=>{var A=1024;function I(b){return(b&b-1)===0}function B(b,c){if(arguments.length<1)throw new Error("mnemonist/hashed-array-tree: expecting at least a byte array constructor.");var m=c||0,t=A,a=0;if(typeof c=="object"&&(m=c.initialCapacity||0,a=c.initialLength||0,t=c.blockSize||A),!t||!I(t))throw new Error("mnemonist/hashed-array-tree: block size should be a power of two.");var v=Math.max(a,m),o=Math.ceil(v/t);this.ArrayClass=b,this.length=a,this.capacity=o*t,this.blockSize=t,this.offsetMask=t-1,this.blockMask=Math.log2(t),this.blocks=new Array(o);for(var r=0;r>this.blockMask,t=b&this.offsetMask;return this.blocks[m][t]=c,this},B.prototype.get=function(b){if(!(this.length>this.blockMask,m=b&this.offsetMask;return this.blocks[c][m]}},B.prototype.grow=function(b){if(typeof b!="number"&&(b=this.capacity+this.blockSize),this.capacity>=b)return this;for(;this.capacity>this.blockMask,t=c&this.offsetMask;return this.blocks[m][t]=b,++this.length},B.prototype.pop=function(){if(this.length!==0){var b=this.blocks[this.blocks.length-1],c=--this.length&this.offsetMask;return b[c]}},B.prototype.inspect=function(){for(var b=new this.ArrayClass(this.length),c,m=0,t=this.length;m>this.blockMask,b[m]=this.blocks[c][m&this.offsetMask];return b.type=this.ArrayClass.name,b.items=this.length,b.capacity=this.capacity,b.blockSize=this.blockSize,Object.defineProperty(b,"constructor",{value:B,enumerable:!1}),b},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),S.exports=B}),lf=Ft((E,S)=>{var A=Ee(),I=We();function B(b,c){if(arguments.length<2)throw new Error("mnemonist/fixed-stack: expecting an Array class and a capacity.");if(typeof c!="number"||c<=0)throw new Error("mnemonist/fixed-stack: `capacity` should be a positive number.");this.capacity=c,this.ArrayClass=b,this.items=new this.ArrayClass(this.capacity),this.clear()}B.prototype.clear=function(){this.size=0},B.prototype.push=function(b){if(this.size===this.capacity)throw new Error("mnemonist/fixed-stack.push: stack capacity ("+this.capacity+") exceeded!");return this.items[this.size++]=b,this.size},B.prototype.pop=function(){if(this.size!==0)return this.items[--this.size]},B.prototype.peek=function(){return this.items[this.size-1]},B.prototype.forEach=function(b,c){c=arguments.length>1?c:this;for(var m=0,t=this.items.length;m=c)return{done:!0};var t=b[c-m-1];return m++,{value:t,done:!1}})},B.prototype.entries=function(){var b=this.items,c=this.size,m=0;return new A(function(){if(m>=c)return{done:!0};var t=b[c-m-1];return{value:[m++,t],done:!1}})},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.values),B.prototype.toString=function(){return this.toArray().join(",")},B.prototype.toJSON=function(){return this.toArray()},B.prototype.inspect=function(){var b=this.toArray();return b.type=this.ArrayClass.name,b.capacity=this.capacity,Object.defineProperty(b,"constructor",{value:B,enumerable:!1}),b},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),B.from=function(b,c,m){if(arguments.length<3&&(m=I.guessLength(b),typeof m!="number"))throw new Error("mnemonist/fixed-stack.from: could not guess iterable length. Please provide desired capacity as last argument.");var t=new B(c,m);if(I.isArrayLike(b)){var a,v;for(a=0,v=b.length;a{var A=We(),I=Be(),B=lf();function b(m,t,a,v,o,r,n,e){var i=n+(e-n)/2|0,h=~-i,s=-~i,l=a[i];v[r]=l+1;var f=t?t(m[l]):m[l][1],u=r*2+1,d=r*2+2,p=-1/0,g=-1/0;n<=h&&(p=b(m,t,a,v,o,u,n,h)),s<=e&&(g=b(m,t,a,v,o,d,s,e));var y=Math.max(f,p,g),x=l;return y===p?x=o[v[u]-1]:y===g&&(x=o[v[d]-1]),o[l]=x,y}function c(m,t){this.size=m.length,this.intervals=m;var a=null,v=null;Array.isArray(t)&&(a=t[0],v=t[1]);var o=m.length,r=I.getPointerArray(o+1),n=new r(o),e;for(e=1;eu?1:0});var i=Math.ceil(Math.log2(o+1)),h=Math.pow(2,i)-1,s=new r(h),l=new r(o);b(m,v,n,s,l,0,0,o-1),n=null,this.height=i,this.tree=s,this.augmentations=l,this.startGetter=a,this.endGetter=v,this.stack=new B(r,this.height)}c.prototype.intervalsContainingPoint=function(m){var t=[],a=this.stack;a.clear(),a.push(0);for(var v=this.tree.length,o,r,n,e,i,h,s,l,f;a.size;)o=a.pop(),r=this.tree[o]-1,n=this.intervals[r],e=this.intervals[this.augmentations[r]],s=this.endGetter?this.endGetter(e):e[1],!(m>s)&&(l=o*2+1,l=i&&m<=h&&t.push(n),!(mf)&&(u=n*2+1,u=s&&t<=l&&v.push(i),!(a{E.search=function(S,A,I,B){var b=0;I=typeof I<"u"?I:0,B=typeof B<"u"?B:S.length,B--;for(var c;I<=B;)if(b=I+B>>>1,c=S[b],c>A)B=~-b;else if(c>>1,m=S(A[B],I),m>0)c=~-B;else if(m<0)b=-~B;else return B;return-1},E.lowerBound=function(S,A,I,B){var b=0;for(I=typeof I<"u"?I:0,B=typeof B<"u"?B:S.length;I>>1,A<=S[b]?B=b:I=-~b;return I},E.lowerBoundWithComparator=function(S,A,I){for(var B=0,b=0,c=A.length;b>>1,S(I,A[B])<=0?c=B:b=-~B;return b},E.lowerBoundIndices=function(S,A,I,B,b){var c=0;for(B=typeof B<"u"?B:0,b=typeof b<"u"?b:S.length;B>>1,I<=S[A[c]]?b=c:B=-~c;return B},E.upperBound=function(S,A,I,B){var b=0;for(I=typeof I<"u"?I:0,B=typeof B<"u"?B:S.length;I>>1,A>=S[b]?I=-~b:B=b;return I},E.upperBoundWithComparator=function(S,A,I){for(var B=0,b=0,c=A.length;b>>1,S(I,A[B])>=0?b=-~B:c=B;return b}}),x1=Ft(E=>{var S=Be(),A=We().isArrayLike,I=uf(),B=Po();function b(a,v){if(a.length===0)return v.slice();if(v.length===0)return a.slice();var o;a[0]>v[0]&&(o=a,a=v,v=o);var r=a[a.length-1],n=v[0];if(r<=n)return S.isTypedArray(a)?S.concat(a,v):a.concat(v);var e=new a.constructor(a.length+v.length),i,h,s;for(i=0,h=a.length;iv[0]&&(o=a,a=v,v=o);var r=a[a.length-1],n=v[0];if(rv[0]&&(o=a,a=v,v=o);var r=a[a.length-1],n=v[0];if(ru?s=I.lowerBound(v,f,s+1):(e.push(f),i++,s++);return e};function m(a){var v=0,o=-1/0,r,n,e,i=[];for(n=0,e=a.length;no&&(o=r));if(i.length===0)return new a[0].constructor(0);if(i.length===1)return i[0].slice();if(i.length===2)return b(i[0],i[1]);a=i;var h=new a[0].constructor(v),s=S.getPointerArray(o),l=new s(a.length),f=new B(function(p,g){return p=a[p][l[p]],g=a[g][l[g]],pg?1:0});for(n=0;nv&&(v=o));if(e.length===0)return new a[0].constructor(0);if(e.length===1)return e[0].slice();if(e.length===2)return c(e[0],e[1]);a=e;var i=new a[0].constructor,h=S.getPointerArray(v),s=new h(a.length),l=new B(function(d,p){return d=a[d][s[d]],p=a[p][s[p]],dp?1:0});for(r=0;rv&&(v=r),no)return[];if(v===o)return[v];var s,l,f=a[0],u,d,p,g,y,x,T=v;for(i=1;ix?d=I.lowerBound(l,y,d+1):(f.push(y),u++,d++);if(f.length===0)return f;T=f[0]}return f},E.merge=function(){if(arguments.length===2){if(A(arguments[0]))return b(arguments[0],arguments[1])}else if(A(arguments[0]))return m(arguments);return null},E.unionUnique=function(){if(arguments.length===2){if(A(arguments[0]))return c(arguments[0],arguments[1])}else if(A(arguments[0]))return t(arguments);return null},E.intersectionUnique=function(){if(arguments.length===2){if(A(arguments[0]))return E.intersectionUniqueArrays(arguments[0],arguments[1])}else if(A(arguments[0]))return E.kWayIntersectionUniqueArrays(arguments);return null}}),y1=Ft((E,S)=>{var A=Ee(),I=he(),B=x1();function b(m){return m}function c(m){if(this.clear(),Array.isArray(m)?(this.documentTokenizer=m[0],this.queryTokenizer=m[1]):(this.documentTokenizer=m,this.queryTokenizer=m),this.documentTokenizer||(this.documentTokenizer=b),this.queryTokenizer||(this.queryTokenizer=b),typeof this.documentTokenizer!="function")throw new Error("mnemonist/InvertedIndex.constructor: document tokenizer is not a function.");if(typeof this.queryTokenizer!="function")throw new Error("mnemonist/InvertedIndex.constructor: query tokenizer is not a function.")}c.prototype.clear=function(){this.items=[],this.mapping=new Map,this.size=0,this.dimension=0},c.prototype.add=function(m){this.size++;var t=this.items.length;this.items.push(m);var a=this.documentTokenizer(m);if(!Array.isArray(a))throw new Error("mnemonist/InvertedIndex.add: tokenizer function should return an array of tokens.");for(var v=new Set,o,r,n=0,e=a.length;n"u"||a.length===0)return[];if(t.length>1)for(o=1,r=t.length;o"u"||v.length===0)return[];a=B.intersectionUniqueArrays(a,v)}var n=new Array(a.length);for(o=0,r=n.length;o1?t:this;for(var a=0,v=this.documents.length;a=t)return{done:!0};var v=m[a++];return{value:v,done:!1}})},c.prototype.tokens=function(){return this.mapping.keys()},typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=c.prototype.documents),c.prototype.inspect=function(){var m=this.items.slice();return Object.defineProperty(m,"constructor",{value:c,enumerable:!1}),m},typeof Symbol<"u"&&(c.prototype[Symbol.for("nodejs.util.inspect.custom")]=c.prototype.inspect),c.from=function(m,t){var a=new c(t);return I(m,function(v){a.add(v)}),a},S.exports=c}),ff=Ft(E=>{var S=new Float64Array(64),A=new Float64Array(64);function I(b,c,m){var t,a,v,o,r;for(S[0]=c,A[0]=m,a=0;a>=0;)if(v=S[a],o=A[a]-1,v=t&&vA[a-1]-S[a-1]&&(r=S[a],S[a]=S[a-1],S[a-1]=r,r=A[a],A[a]=A[a-1],A[a-1]=r)}else a--;return b}E.inplaceQuickSort=I;function B(b,c,m,t){var a,v,o,r,n,e;for(S[0]=m,A[0]=t,v=0;v>=0;)if(o=S[v],r=A[v]-1,o=a&&oA[v-1]-S[v-1]&&(e=S[v],S[v]=S[v-1],S[v-1]=e,e=A[v],A[v]=A[v-1],A[v-1]=e)}else v--;return c}E.inplaceQuickSortIndices=B}),T1=Ft((E,S)=>{var A=We(),I=Be(),B=Lr().createTupleComparator,b=Mo(),c=ff().inplaceQuickSortIndices;function m(n,e,i,h){var s,l=0,f;for(s=0;s>>1),C=i[T],f[F]=C,y>-1&&(x===0?u[y]=F+1:d[y]=F+1),L=(L+1)%n,T!==M&&T!==w-1&&p.push([L,T+1,w,F,1]),T!==M&&p.push([L,M,T,F,0]),F++;return{axes:e,labels:h,pivots:f,lefts:u,rights:d}}function v(n,e){this.dimensions=n,this.visited=0,this.axes=e.axes,this.labels=e.labels,this.pivots=e.pivots,this.lefts=e.lefts,this.rights=e.rights,this.size=this.labels.length}v.prototype.nearestNeighbor=function(n){var e=1/0,i=null,h=this.dimensions,s=this.axes,l=this.pivots,f=this.lefts,u=this.rights,d=0;function p(g,y){d++;var x=f[y],T=u[y],C=l[y],M=m(h,s,C,n);if(!(M0?x!==0&&p(g,x-1):T!==0&&p(g,T-1),w*w0?T!==0&&p(g,T-1):x!==0&&p(g,x-1))}}return p(0,0),this.visited=d,this.labels[i]};var o=B(3),r=B(2);v.prototype.kNearestNeighbors=function(n,e){if(n<=0)throw new Error("mnemonist/kd-tree.kNearestNeighbors: k should be a positive number.");if(n=Math.min(n,this.size),n===1)return[this.nearestNeighbor(e)];var i=new b(Array,o,n),h=this.dimensions,s=this.axes,l=this.pivots,f=this.lefts,u=this.rights,d=0;function p(x,T){var C=f[T],M=u[T],w=l[T],L=m(h,s,w,e);i.push([L,d++,w]);var F=e[x],O=s[x][w],N=F-O;x=(x+1)%h,F{var A=Ee(),I=he();function B(){this.clear()}B.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},B.prototype.first=function(){return this.head?this.head.item:void 0},B.prototype.peek=B.prototype.first,B.prototype.last=function(){return this.tail?this.tail.item:void 0},B.prototype.push=function(b){var c={item:b,next:null};return this.head?(this.tail.next=c,this.tail=c):(this.head=c,this.tail=c),this.size++,this.size},B.prototype.unshift=function(b){var c={item:b,next:null};return this.head?(this.head.next||(this.tail=this.head),c.next=this.head,this.head=c):(this.head=c,this.tail=c),this.size++,this.size},B.prototype.shift=function(){if(this.size){var b=this.head;return this.head=b.next,this.size--,b.item}},B.prototype.forEach=function(b,c){if(this.size){c=arguments.length>1?c:this;for(var m=this.head,t=0;m;)b.call(c,m.item,t,this),m=m.next,t++}},B.prototype.toArray=function(){if(!this.size)return[];for(var b=new Array(this.size),c=0,m=this.size,t=this.head;c{var A=Ee(),I=he(),B=Be(),b=We();function c(m,t,a){if(arguments.length<2&&(a=m,m=null,t=null),this.capacity=a,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-cache: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-cache: capacity should be a finite positive integer.");var v=B.getPointerArray(a);this.forward=new v(a),this.backward=new v(a),this.K=typeof m=="function"?new m(a):new Array(a),this.V=typeof t=="function"?new t(a):new Array(a),this.size=0,this.head=0,this.tail=0,this.items={}}c.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},c.prototype.splayOnTop=function(m){var t=this.head;if(this.head===m)return this;var a=this.backward[m],v=this.forward[m];return this.tail===m?this.tail=a:this.backward[v]=a,this.forward[a]=v,this.backward[t]=m,this.head=m,this.forward[m]=t,this},c.prototype.set=function(m,t){var a=this.items[m];if(typeof a<"u"){this.splayOnTop(a),this.V[a]=t;return}this.size1?t:this;for(var a=0,v=this.size,o=this.head,r=this.K,n=this.V,e=this.forward;a=t)return{done:!0};var r=v[a];return m++,m=t)return{done:!0};var r=v[a];return m++,m=t)return{done:!0};var n=v[a],e=o[a];return m++,m{var A=wo(),I=he(),B=Be(),b=We();function c(t,a,v){arguments.length<2?A.call(this,t):A.call(this,t,a,v);var o=B.getPointerArray(this.capacity);this.deleted=new o(this.capacity),this.deletedSize=0}for(m in A.prototype)c.prototype[m]=A.prototype[m];var m;typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=A.prototype[Symbol.iterator]),c.prototype.clear=function(){A.prototype.clear.call(this),this.deletedSize=0},c.prototype.set=function(t,a){var v=this.items[t];if(typeof v<"u"){this.splayOnTop(v),this.V[v]=a;return}this.size0?v=this.deleted[--this.deletedSize]:v=this.size,this.size++):(v=this.tail,this.tail=this.backward[v],delete this.items[this.K[v]]),this.items[t]=v,this.K[v]=t,this.V[v]=a,this.forward[v]=this.head,this.backward[this.head]=v,this.head=v},c.prototype.setpop=function(t,a){var v=null,o=null,r=this.items[t];return typeof r<"u"?(this.splayOnTop(r),v=this.V[r],this.V[r]=a,{evicted:!1,key:t,value:v}):(this.size0?r=this.deleted[--this.deletedSize]:r=this.size,this.size++):(r=this.tail,this.tail=this.backward[r],v=this.V[r],o=this.K[r],delete this.items[o]),this.items[t]=r,this.K[r]=t,this.V[r]=a,this.forward[r]=this.head,this.backward[this.head]=r,this.head=r,o?{evicted:!0,key:o,value:v}:null)},c.prototype.delete=function(t){var a=this.items[t];if(typeof a>"u")return!1;if(delete this.items[t],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var v=this.backward[a],o=this.forward[a];return this.head===a&&(this.head=o),this.tail===a&&(this.tail=v),this.forward[v]=o,this.backward[o]=v,this.size--,this.deleted[this.deletedSize++]=a,!0},c.prototype.remove=function(t,a=void 0){var v=this.items[t];if(typeof v>"u")return a;var o=this.V[v];if(delete this.items[t],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,o;var r=this.backward[v],n=this.forward[v];return this.head===v&&(this.head=n),this.tail===v&&(this.tail=r),this.forward[r]=n,this.backward[n]=r,this.size--,this.deleted[this.deletedSize++]=v,o},c.from=function(t,a,v,o){if(arguments.length<2){if(o=b.guessLength(t),typeof o!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(o=a,a=null,v=null);var r=new c(a,v,o);return I(t,function(n,e){r.set(e,n)}),r},S.exports=c}),df=Ft((E,S)=>{var A=wo(),I=he(),B=Be(),b=We();function c(m,t,a){if(arguments.length<2&&(a=m,m=null,t=null),this.capacity=a,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-map: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-map: capacity should be a finite positive integer.");var v=B.getPointerArray(a);this.forward=new v(a),this.backward=new v(a),this.K=typeof m=="function"?new m(a):new Array(a),this.V=typeof t=="function"?new t(a):new Array(a),this.size=0,this.head=0,this.tail=0,this.items=new Map}c.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},c.prototype.set=function(m,t){var a=this.items.get(m);if(typeof a<"u"){this.splayOnTop(a),this.V[a]=t;return}this.size{var A=df(),I=he(),B=Be(),b=We();function c(t,a,v){arguments.length<2?A.call(this,t):A.call(this,t,a,v);var o=B.getPointerArray(this.capacity);this.deleted=new o(this.capacity),this.deletedSize=0}for(m in A.prototype)c.prototype[m]=A.prototype[m];var m;typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=A.prototype[Symbol.iterator]),c.prototype.clear=function(){A.prototype.clear.call(this),this.deletedSize=0},c.prototype.set=function(t,a){var v=this.items.get(t);if(typeof v<"u"){this.splayOnTop(v),this.V[v]=a;return}this.size0?v=this.deleted[--this.deletedSize]:v=this.size,this.size++):(v=this.tail,this.tail=this.backward[v],this.items.delete(this.K[v])),this.items.set(t,v),this.K[v]=t,this.V[v]=a,this.forward[v]=this.head,this.backward[this.head]=v,this.head=v},c.prototype.setpop=function(t,a){var v=null,o=null,r=this.items.get(t);return typeof r<"u"?(this.splayOnTop(r),v=this.V[r],this.V[r]=a,{evicted:!1,key:t,value:v}):(this.size0?r=this.deleted[--this.deletedSize]:r=this.size,this.size++):(r=this.tail,this.tail=this.backward[r],v=this.V[r],o=this.K[r],this.items.delete(o)),this.items.set(t,r),this.K[r]=t,this.V[r]=a,this.forward[r]=this.head,this.backward[this.head]=r,this.head=r,o?{evicted:!0,key:o,value:v}:null)},c.prototype.delete=function(t){var a=this.items.get(t);if(typeof a>"u")return!1;if(this.items.delete(t),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var v=this.backward[a],o=this.forward[a];return this.head===a&&(this.head=o),this.tail===a&&(this.tail=v),this.forward[v]=o,this.backward[o]=v,this.size--,this.deleted[this.deletedSize++]=a,!0},c.prototype.remove=function(t,a=void 0){var v=this.items.get(t);if(typeof v>"u")return a;var o=this.V[v];if(this.items.delete(t),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,o;var r=this.backward[v],n=this.forward[v];return this.head===v&&(this.head=n),this.tail===v&&(this.tail=r),this.forward[r]=n,this.backward[n]=r,this.size--,this.deleted[this.deletedSize++]=v,o},c.from=function(t,a,v,o){if(arguments.length<2){if(o=b.guessLength(t),typeof o!="number")throw new Error("mnemonist/lru-map.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(o=a,a=null,v=null);var r=new c(a,v,o);return I(t,function(n,e){r.set(e,n)}),r},S.exports=c}),P1=Ft((E,S)=>{var A=Ee(),I=he(),B=Mo(),b=function(m,t){return m[1]>t[1]?-1:m[1]"u"?0:t},c.prototype.get=c.prototype.multiplicity,c.prototype.count=c.prototype.multiplicity,c.prototype.frequency=function(m){if(this.size===0)return 0;var t=this.multiplicity(m);return t/this.size},c.prototype.top=function(m){if(typeof m!="number"||m<=0)throw new Error("mnemonist/multi-set.top: n must be a number > 0.");for(var t=new B(Array,b,m),a=this.items.entries(),v;v=a.next(),!v.done;)t.push(v.value);return t.consume()},c.prototype.forEach=function(m,t){t=arguments.length>1?t:this;var a;this.items.forEach(function(v,o){for(a=0;a1?t:this,this.items.forEach(m,t)},c.prototype.keys=function(){return this.items.keys()},c.prototype.values=function(){var m=this.items.entries(),t=!1,a,v,o,r;return new A(function n(){if(!t){if(a=m.next(),a.done)return{done:!0};t=!0,v=a.value[0],o=a.value[1],r=0}return r>=o?(t=!1,n()):(r++,{done:!1,value:v})})},c.prototype.multiplicities=function(){return this.items.entries()},typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=c.prototype.values),c.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(c.prototype[Symbol.for("nodejs.util.inspect.custom")]=c.prototype.inspect),c.prototype.toJSON=function(){return this.items},c.from=function(m){var t=new c;return I(m,function(a){t.add(a)}),t},c.isSubset=function(m,t){var a=m.multiplicities(),v,o,r;if(m===t)return!0;if(m.dimension>t.dimension)return!1;for(;v=a.next(),!v.done;)if(o=v.value[0],r=v.value[1],t.multiplicity(o){var A=Ee(),I=he();function B(n,e,i){return((Math.pow(n,2)-Math.pow(Math.abs(e-i),2))/2|0)+n+1}function b(n,e){for(var i=0,h=0,s=e+1;he.length?-1:n.lengthe?1:0}function m(n,e){var i=n+1,h=e/i|0,s=h+1,l,f,u=e-h*i,d=i-u,p=new Array(n+1);for(l=0;l 0");this.levenshtein=n,this.k=e,this.clear()}r.prototype.clear=function(){this.size=0,this.strings=[],this.invertedIndices={}},r.prototype.add=function(n){var e=n.length,i=this.size;this.strings.push(n),this.size++;var h=t(this.k,n),s=this.invertedIndices[e];typeof s>"u"&&(s={},this.invertedIndices[e]=s);var l,f,u,d,p;for(d=0,p=h.length;d"u"?(f=[i],s[u]=f):f.push(i);return this},r.prototype.search=function(n){var e=n.length,i=this.k,h=new Set,s,l,f,u,d,p,g,y,x,T,C,M,w,L,F;for(y=Math.max(0,e-i),x=e+i+1;y1?e:this;for(var i=0,h=this.strings.length;i=e)return{done:!0};var h=n[i];return i++,{value:h,done:!1}})},typeof Symbol<"u"&&(r.prototype[Symbol.iterator]=r.prototype.values),r.prototype.inspect=function(){var n=this.strings.slice();return Object.defineProperty(n,"constructor",{value:r,enumerable:!1}),n},typeof Symbol<"u"&&(r.prototype[Symbol.for("nodejs.util.inspect.custom")]=r.prototype.inspect),r.from=function(n,e,i){var h=new r(e,i);return I(n,function(s){h.add(s)}),h},r.countKeys=b,r.comparator=c,r.partition=m,r.segments=t,r.segmentPos=a,r.multiMatchAwareInterval=v,r.multiMatchAwareSubstrings=o,S.exports=r}),M1=Ft((E,S)=>{var A=Ee(),I=he();function B(){this.clear()}B.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},B.prototype.enqueue=function(b){return this.items.push(b),++this.size},B.prototype.dequeue=function(){if(this.size){var b=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,b}},B.prototype.peek=function(){if(this.size)return this.items[this.offset]},B.prototype.forEach=function(b,c){c=arguments.length>1?c:this;for(var m=this.offset,t=0,a=this.items.length;m=b.length)return{done:!0};var m=b[c];return c++,{value:m,done:!1}})},B.prototype.entries=function(){var b=this.items,c=this.offset,m=0;return new A(function(){if(c>=b.length)return{done:!0};var t=b[c];return c++,{value:[m++,t],done:!1}})},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.values),B.prototype.toString=function(){return this.toArray().join(",")},B.prototype.toJSON=function(){return this.toArray()},B.prototype.inspect=function(){var b=this.toArray();return Object.defineProperty(b,"constructor",{value:B,enumerable:!1}),b},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),B.from=function(b){var c=new B;return I(b,function(m){c.enqueue(m)}),c},B.of=function(){return B.from(arguments)},S.exports=B}),w1=Ft((E,S)=>{var A=Ee(),I=he();function B(){this.clear()}B.prototype.clear=function(){this.items=[],this.size=0},B.prototype.push=function(b){return this.items.push(b),++this.size},B.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},B.prototype.peek=function(){return this.items[this.size-1]},B.prototype.forEach=function(b,c){c=arguments.length>1?c:this;for(var m=0,t=this.items.length;m=c)return{done:!0};var t=b[c-m-1];return m++,{value:t,done:!1}})},B.prototype.entries=function(){var b=this.items,c=b.length,m=0;return new A(function(){if(m>=c)return{done:!0};var t=b[c-m-1];return{value:[m++,t],done:!1}})},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.values),B.prototype.toString=function(){return this.toArray().join(",")},B.prototype.toJSON=function(){return this.toArray()},B.prototype.inspect=function(){var b=this.toArray();return Object.defineProperty(b,"constructor",{value:B,enumerable:!1}),b},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),B.from=function(b){var c=new B;return I(b,function(m){c.push(m)}),c},B.of=function(){return B.from(arguments)},S.exports=B}),R1=Ft(E=>{E.intersection=function(){if(arguments.length<2)throw new Error("mnemonist/Set.intersection: needs at least two arguments.");var S=new Set,A=1/0,I=null,B,b,c=arguments.length;for(b=0;bA.size)return!1;for(;B=I.next(),!B.done;)if(!A.has(B.value))return!1;return!0},E.isSuperset=function(S,A){return E.isSubset(A,S)},E.add=function(S,A){for(var I=A.values(),B;B=I.next(),!B.done;)S.add(B.value)},E.subtract=function(S,A){for(var I=A.values(),B;B=I.next(),!B.done;)S.delete(B.value)},E.intersect=function(S,A){for(var I=S.values(),B;B=I.next(),!B.done;)A.has(B.value)||S.delete(B.value)},E.disjunct=function(S,A){for(var I=S.values(),B,b=[];B=I.next(),!B.done;)A.has(B.value)&&b.push(B.value);for(I=A.values();B=I.next(),!B.done;)S.has(B.value)||S.add(B.value);for(var c=0,m=b.length;cA.size&&(I=S,S=A,A=I),S.size===0)return 0;if(S===A)return S.size;for(var B=S.values(),b,c=0;b=B.next(),!b.done;)A.has(b.value)&&c++;return c},E.unionSize=function(S,A){var I=E.intersectionSize(S,A);return S.size+A.size-I},E.jaccard=function(S,A){var I=E.intersectionSize(S,A);if(I===0)return 0;var B=S.size+A.size-I;return I/B},E.overlap=function(S,A){var I=E.intersectionSize(S,A);return I===0?0:I/Math.min(S.size,A.size)}}),F1=Ft((E,S)=>{var A=Ee(),I=Be().getPointerArray;function B(b){var c=I(b);this.start=0,this.size=0,this.capacity=b,this.dense=new c(b),this.sparse=new c(b)}B.prototype.clear=function(){this.start=0,this.size=0},B.prototype.has=function(b){if(this.size===0)return!1;var c=this.sparse[b],m=c=this.start&&c=this.start&&c1?c:this;for(var m=this.capacity,t=this.size,a=this.start,v=0;v=m)return{done:!0};var v=b[t];return t++,a++,t===c&&(t=0),{value:v,done:!1}})},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.values),B.prototype.inspect=function(){var b=[];return this.forEach(function(c){b.push(c)}),Object.defineProperty(b,"constructor",{value:B,enumerable:!1}),b.capacity=this.capacity,b},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),S.exports=B}),L1=Ft((E,S)=>{var A=Ee(),I=Be().getPointerArray;function B(b,c){arguments.length<2&&(c=b,b=Array);var m=I(c);this.size=0,this.length=c,this.dense=new m(c),this.sparse=new m(c),this.vals=new b(c)}B.prototype.clear=function(){this.size=0},B.prototype.has=function(b){var c=this.sparse[b];return c=this.size||this.dense[c]!==b?!1:(c=this.dense[this.size-1],this.dense[this.sparse[b]]=c,this.sparse[c]=this.sparse[b],this.size--,!0)},B.prototype.forEach=function(b,c){c=arguments.length>1?c:this;for(var m=0;m{var A=Ee(),I=Be().getPointerArray;function B(b){var c=I(b);this.size=0,this.length=b,this.dense=new c(b),this.sparse=new c(b)}B.prototype.clear=function(){this.size=0},B.prototype.has=function(b){var c=this.sparse[b];return c=this.size||this.dense[c]!==b?!1:(c=this.dense[this.size-1],this.dense[this.sparse[b]]=c,this.sparse[c]=this.sparse[b],this.size--,!0)},B.prototype.forEach=function(b,c){c=arguments.length>1?c:this;for(var m,t=0;t{var A=he(),I=2,B=2,b=new Set([0,1,2]),c={0:"Returns only the top suggestion",1:"Returns suggestions with the smallest edit distance",2:"Returns every suggestion (no early termination)"};function m(e){var i=new Set;return typeof e=="number"&&i.add(e),{suggestions:i,count:0}}function t(e,i,h){return{term:e||"",distance:i||0,count:h||0}}function a(e,i,h,s){s=s||new Set,i++;var l,f=e.length,u;if(f>1)for(u=0;u0&&e[u].length-f.length>s.length-f.length&&(h.suggestions=new Set,h.count=0),(i===2||!h.suggestions.size||e[u].length-f.length>=s.length-f.length)&&h.suggestions.add(l)}function o(e,i){var h=e.length,s=i.length,l=[[]],f=h+s,u=new Map,d,p,g;for(l[0][0]=f,d=0;d<=h;d++)l[d+1]||(l[d+1]=[]),l[d+1][1]=d,l[d+1][0]=f;for(g=0;g<=s;g++)l[1][g+1]=g,l[0][g+1]=f;var y=e+i,x;for(d=0,p=y.length;dl)return[];for(var d=[f],p=new Set,g=new Set,y=[],x,T;d.length>0&&(x=d.shift(),!(h<2&&y.length>0&&u-x.length>y[0].distance));){if(T=e[x],T!==void 0){if(typeof T=="number"&&(T=m(T)),T.count>0&&!g.has(x)){g.add(x);var C=t(x,u-x.length,T.count);if(y.push(C),h<2&&u-x.length===0)break}T.suggestions.forEach(F=>{var O=i[F];if(!g.has(O)){g.add(O);var N=0;if(f!==O)if(O.length===x.length)N=u-x.length;else if(u===x.length)N=O.length-x.length;else{for(var G=0,V=0,K=O.length;G0||V>0?N=o(O.substr(G,K-G-V),f.substr(G,u-G-V)):N=o(O,f)}if(h<2&&y.length>0&&y[0].distance>N&&(y=[]),!(h<2&&y.length>0&&N>y[0].distance)&&N<=s){var $=e[O];$!==void 0&&y.push(t(O,N,$.count))}}})}if(u-x.length0&&u-x.length>=y[0].distance)continue;for(var M=0,w=x.length;Mthis.maxLength&&(this.maxLength=e.length)),i.count===1){var h=this.words.length;this.words.push(e);var s=a(e,0,this.maxDistance);s.forEach(l=>{var f=this.dictionary[l];f!==void 0?(typeof f=="number"&&(f=m(f),this.dictionary[l]=f),f.suggestions.has(h)||v(this.words,this.verbosity,f,e,h,l)):this.dictionary[l]=h})}return this.size++,this},n.prototype.search=function(e){return r(this.dictionary,this.words,this.verbosity,this.maxDistance,this.maxLength,e)},n.prototype.inspect=function(){var e=[];e.size=this.size,e.maxDistance=this.maxDistance,e.verbosity=this.verbosity,e.behavior=c[this.verbosity];for(var i in this.dictionary)typeof this.dictionary[i]=="object"&&this.dictionary[i].count&&e.push([i,this.dictionary[i].count]);return Object.defineProperty(e,"constructor",{value:n,enumerable:!1}),e},typeof Symbol<"u"&&(n.prototype[Symbol.for("nodejs.util.inspect.custom")]=n.prototype.inspect),n.from=function(e,i){var h=new n(i);return A(e,function(s){h.add(s)}),h},S.exports=n}),cf=Ft((E,S)=>{var A=he(),I=Ee(),B="\0";function b(c){this.mode=c===Array?"array":"string",this.clear()}b.prototype.clear=function(){this.root={},this.size=0},b.prototype.set=function(c,m){for(var t=this.root,a,v=0,o=c.length;v"u")return;if(B in m)return m[B]},b.prototype.delete=function(c){var m=this.root,t=null,a=null,v,o,r,n;for(r=0,n=c.length;r"u")return!1;t!==null?Object.keys(m).length>1&&(t=null,a=null):Object.keys(m).length<2&&(t=v,a=o)}return B in m?(this.size--,t?delete t[a]:delete m[B],!0):!1},b.prototype.has=function(c){for(var m=this.root,t,a=0,v=c.length;a"u")return!1;return B in m},b.prototype.find=function(c){var m=typeof c=="string",t=this.root,a=[],v,o,r;for(o=0,r=c.length;o"u")return a;for(var n=[t],e=[c],i;n.length;){c=e.pop(),t=n.pop();for(i in t){if(i===B){a.push([c,t[B]]);continue}n.push(t[i]),e.push(m?c+i:c.concat(i))}}return a},b.prototype.values=function(c){var m=this.root,t=[],a,v,o;if(c){for(v=0,o=c.length;v"u")return I.empty()}return t.push(m),new I(function(){for(var r,n=!1,e;t.length;){r=t.pop();for(e in r){if(e===B){n=!0;continue}t.push(r[e])}if(n)return{done:!1,value:r[B]}}return{done:!0}})},b.prototype.prefixes=function(c){var m=this.root,t=[],a=[],v,o,r,n=this.mode==="string";if(c){for(o=0,r=c.length;o"u")return I.empty()}else c=n?"":[];return t.push(m),a.push(c),new I(function(){for(var e,i,h=!1,s;t.length;){e=t.pop(),i=a.pop();for(s in e){if(s===B){h=!0;continue}t.push(e[s]),a.push(n?i+s:i.concat(s))}if(h)return{done:!1,value:i}}return{done:!0}})},b.prototype.keys=b.prototype.prefixes,b.prototype.entries=function(c){var m=this.root,t=[],a=[],v,o,r,n=this.mode==="string";if(c){for(o=0,r=c.length;o"u")return I.empty()}else c=n?"":[];return t.push(m),a.push(c),new I(function(){for(var e,i,h=!1,s;t.length;){e=t.pop(),i=a.pop();for(s in e){if(s===B){h=!0;continue}t.push(e[s]),a.push(n?i+s:i.concat(s))}if(h)return{done:!1,value:[i,e[B]]}}return{done:!0}})},typeof Symbol<"u"&&(b.prototype[Symbol.iterator]=b.prototype.entries),b.prototype.inspect=function(){for(var c=new Array(this.size),m=this.entries(),t,a=0;t=m.next(),!t.done;)c[a++]=t.value;return Object.defineProperty(c,"constructor",{value:b,enumerable:!1}),c},typeof Symbol<"u"&&(b.prototype[Symbol.for("nodejs.util.inspect.custom")]=b.prototype.inspect),b.prototype.toJSON=function(){return this.root},b.from=function(c){var m=new b;return A(c,function(t,a){m.set(a,t)}),m},b.SENTINEL=B,S.exports=b}),I1=Ft((E,S)=>{var A=he(),I=cf(),B="\0";function b(m){this.mode=m===Array?"array":"string",this.clear()}for(c in I.prototype)b.prototype[c]=I.prototype[c];var c;delete b.prototype.set,delete b.prototype.get,delete b.prototype.values,delete b.prototype.entries,b.prototype.add=function(m){for(var t=this.root,a,v=0,o=m.length;v"u")return v;for(var e=[a],i=[m],h;e.length;){m=i.pop(),a=e.pop();for(h in a){if(h===B){v.push(m);continue}e.push(a[h]),i.push(t?m+h:m.concat(h))}}return v},typeof Symbol<"u"&&(b.prototype[Symbol.iterator]=b.prototype.keys),b.prototype.inspect=function(){for(var m=new Set,t=this.keys(),a;a=t.next(),!a.done;)m.add(a.value);return Object.defineProperty(m,"constructor",{value:b,enumerable:!1}),m},typeof Symbol<"u"&&(b.prototype[Symbol.for("nodejs.util.inspect.custom")]=b.prototype.inspect),b.prototype.toJSON=function(){return this.root},b.from=function(m){var t=new b;return A(m,function(a){t.add(a)}),t},b.SENTINEL=B,S.exports=b}),B1=Ft((E,S)=>{var A=Ee(),I=he(),B=We(),b=Be(),c=function(v){return Math.max(1,Math.ceil(v*1.5))},m=function(v){var o=b.getPointerArray(v);return new o(v)};function t(v,o){if(arguments.length<1)throw new Error("mnemonist/vector: expecting at least a byte array constructor.");var r=o||0,n=c,e=0,i=!1;typeof o=="object"&&(r=o.initialCapacity||0,e=o.initialLength||0,n=o.policy||n,i=o.factory===!0),this.factory=i?v:null,this.ArrayClass=v,this.length=e,this.capacity=Math.max(e,r),this.policy=n,this.array=new v(this.capacity)}t.prototype.set=function(v,o){if(this.lengththis.capacity)if(this.factory===null?this.array=new this.ArrayClass(v):this.array=this.factory(v),b.isTypedArray(this.array))this.array.set(o,0);else for(var r=0,n=this.length;r=v)return this;for(o=this.capacity;o=o)return{done:!0};var n=v[r];return r++,{value:n,done:!1}})},t.prototype.entries=function(){var v=this.array,o=this.length,r=0;return new A(function(){if(r>=o)return{done:!0};var n=v[r];return{value:[r++,n],done:!1}})},typeof Symbol<"u"&&(t.prototype[Symbol.iterator]=t.prototype.values),t.prototype.inspect=function(){var v=this.array.slice(0,this.length);return v.type=this.array.constructor.name,v.items=this.length,v.capacity=this.capacity,Object.defineProperty(v,"constructor",{value:t,enumerable:!1}),v},typeof Symbol<"u"&&(t.prototype[Symbol.for("nodejs.util.inspect.custom")]=t.prototype.inspect),t.from=function(v,o,r){if(arguments.length<3&&(r=B.guessLength(v),typeof r!="number"))throw new Error("mnemonist/vector.from: could not guess iterable length. Please provide desired capacity as last argument.");var n=new t(o,r);return I(v,function(e){n.push(e)}),n};function a(v){var o=function(n){t.call(this,v,n)};for(var r in t.prototype)t.prototype.hasOwnProperty(r)&&(o.prototype[r]=t.prototype[r]);return o.from=function(n,e){return t.from(n,v,e)},typeof Symbol<"u"&&(o.prototype[Symbol.iterator]=o.prototype.values),o}t.Int8Vector=a(Int8Array),t.Uint8Vector=a(Uint8Array),t.Uint8ClampedVector=a(Uint8ClampedArray),t.Int16Vector=a(Int16Array),t.Uint16Vector=a(Uint16Array),t.Int32Vector=a(Int32Array),t.Uint32Vector=a(Uint32Array),t.Float32Vector=a(Float32Array),t.Float64Vector=a(Float64Array),t.PointerVector=a(m),S.exports=t}),b1=Ft((E,S)=>{var A=We(),I=Be(),B=ff().inplaceQuickSortIndices,b=uf().lowerBoundIndices,c=Ao(),m=I.getPointerArray;function t(o,r){return o.distancer.distance?-1:0}function a(o,r,n){for(var e=n.length,i=m(e),h=0,s=new i(e),l=new i(e),f=new i(e),u=new Float64Array(e),d=[0,0,e],p=new Float64Array(e),g,y,x,T,C,M,w,L,F;d.length;)if(C=d.pop(),T=d.pop(),g=d.pop(),y=n[C-1],C--,F=C-T,s[g]=y,F!==0){if(F===1){w=o(r[y],r[n[T]]),u[g]=w,h++,f[g]=h,s[h]=n[T];continue}for(L=T;L0&&(h++,f[g]=h,d.push(h,M,C)),M-T>0&&(h++,l[g]=h,d.push(h,T,M))}return{nodes:s,lefts:l,rights:f,mus:u}}function v(o,r){if(typeof o!="function")throw new Error("mnemonist/VPTree.constructor: given `distance` must be a function.");if(!r)throw new Error("mnemonist/VPTree.constructor: you must provide items to the tree. A VPTree cannot be updated after its creation.");this.distance=o,this.heap=new c(t),this.D=0;var n=A.toArrayWithIndices(r);this.items=n[0];var e=n[1];this.size=e.length;var i=a(o,this.items,e);this.nodes=i.nodes,this.lefts=i.lefts,this.rights=i.rights,this.mus=i.mus}v.prototype.nearestNeighbors=function(o,r){var n=this.heap,e=[0],i=1/0,h,s,l,f,u,d,p;for(this.D=0;e.length;)h=e.pop(),s=this.nodes[h],l=this.items[s],p=this.distance(l,r),this.D++,po&&n.pop(),n.size>=o&&(i=n.peek().distance)),f=this.lefts[h],u=this.rights[h],!(!f&&!u)&&(d=this.mus[h],p=d-i&&e.push(u)):(u&&p>=d-i&&e.push(u),f&&p=0;y--)g[y]=n.pop();return g},v.prototype.neighbors=function(o,r){var n=[],e=[0],i,h,s,l,f,u,d;for(this.D=0;e.length;)i=e.pop(),h=this.nodes[i],s=this.items[h],d=this.distance(s,r),this.D++,d<=o&&n.push({distance:d,item:s}),l=this.lefts[i],f=this.rights[i],!(!l&&!f)&&(u=this.mus[i],d=u-o&&e.push(f)):(f&&d>=u-o&&e.push(f),l&&d{var A=Ao(),I=Po(),B=s1();S.exports={BiMap:n1(),BitSet:r1(),BitVector:a1(),BloomFilter:h1(),BKTree:l1(),CircularBuffer:u1(),DefaultMap:f1(),DefaultWeakMap:d1(),FixedDeque:of(),StaticDisjointSet:c1(),FibonacciHeap:I,MinFibonacciHeap:I.MinFibonacciHeap,MaxFibonacciHeap:I.MaxFibonacciHeap,FixedReverseHeap:Mo(),FuzzyMap:v1(),FuzzyMultiMap:p1(),HashedArrayTree:g1(),Heap:A,MinHeap:A.MinHeap,MaxHeap:A.MaxHeap,StaticIntervalTree:m1(),InvertedIndex:y1(),KDTree:T1(),LinkedList:S1(),LRUCache:wo(),LRUCacheWithDelete:C1(),LRUMap:df(),LRUMapWithDelete:E1(),MultiMap:hf(),MultiSet:P1(),PassjoinIndex:A1(),Queue:M1(),FixedStack:lf(),Stack:w1(),SuffixArray:B,GeneralizedSuffixArray:B.GeneralizedSuffixArray,Set:R1(),SparseQueueSet:F1(),SparseMap:L1(),SparseSet:O1(),SymSpell:D1(),Trie:I1(),TrieMap:cf(),Vector:B1(),VPTree:b1()}}),ut=class ve{static get ZERO(){return new ve(0,0)}static get ONE(){return new ve(1,1)}static get UP(){return new ve(0,-1)}static get DOWN(){return new ve(0,1)}static get LEFT(){return new ve(-1,0)}static get RIGHT(){return new ve(1,0)}static get UP_LEFT(){return new ve(-1,-1)}static get UP_RIGHT(){return new ve(1,-1)}static get DOWN_RIGHT(){return new ve(1,1)}static get DOWN_LEFT(){return new ve(-1,1)}constructor(S,A){typeof S=="number"?(this.x=S,this.y=A||0):(this.x=S.x,this.y=S.y)}clone(){return new ve(this.x,this.y)}add(S){return new ve(this.x+S.x,this.y+S.y)}multiply(S){return new ve(this.x*S.x,this.y*S.y)}divide(S){return new ve(this.x/S.x,this.y/S.y)}subtract(S){return new ve(this.x-S.x,this.y-S.y)}equals(S){return this.x===S.x&&this.y===S.y}abs(){return new ve(Math.abs(this.x),Math.abs(this.y))}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}modulo(S){return new ve(this.x%S.x,this.y%S.y)}scalarModulo(S){return new ve(this.x%S,this.y%S)}scalarMult(S){return new ve(this.x*S,this.y*S)}toPosition(){return{x:this.x,y:this.y}}toString(){return`${this.x}#${this.y}`}},zt=class{static equal(E,S){return E.position.x===S.position.x&&E.position.y===S.position.y&&E.layer===S.layer}static copyOver(E,S){S.position.x=E.position.x,S.position.y=E.position.y,S.layer=E.layer}static clone(E){return{position:E.position.clone(),layer:E.layer}}static toString(E){return`${E.position.toString()}#${E.layer}`}static toInternal(E){return{position:new ut(E.position.x,E.position.y),layer:E.charLayer}}static fromInternal(E){return{position:E.position.toPosition(),charLayer:E.layer}}},G1=(E=>(E.NONE="none",E.LEFT="left",E.UP_LEFT="up-left",E.UP="up",E.UP_RIGHT="up-right",E.RIGHT="right",E.DOWN_RIGHT="down-right",E.DOWN="down",E.DOWN_LEFT="down-left",E))(G1||{}),z1={up:"down",down:"up",left:"right",right:"left",none:"none","up-left":"down-right","up-right":"down-left","down-right":"up-left","down-left":"up-right"},U1={up:ut.UP,down:ut.DOWN,left:ut.LEFT,right:ut.RIGHT,none:ut.ZERO,"up-left":ut.UP_LEFT,"up-right":ut.UP_RIGHT,"down-right":ut.DOWN_RIGHT,"down-left":ut.DOWN_LEFT},nr={up:0,"up-right":1,right:2,"down-right":3,down:4,"down-left":5,left:6,"up-left":7,none:NaN},vf=["up","up-right","right","down-right","down","down-left","left","up-left"],X1=["down-left","down-right","up-right","up-left"];function Ro(){return["up","down","left","right","none","up-left","up-right","down-right","down-left"]}function Zs(E){return X1.includes(E)}function V1(E,S=1){return E==="none"?"none":vf[(nr[E]+8-Math.abs(S)%8)%8]}function pf(E,S=1){return E==="none"?"none":vf[(nr[E]+S)%8]}function is(E){return U1[E]}function W1(E){return z1[E]}function qe(E,S){if(E.x===S.x){if(E.y>S.y)return"up";if(E.yS.x)return"left";if(E.xS.x){if(E.yS.y)return"up-left"}else if(E.xS.y)return"up-right"}return"none"}var Y1=(E=>(E[E.FOUR=4]="FOUR",E[E.EIGHT=8]="EIGHT",E))(Y1||{});function ys(E){return typeof E=="string"&&Ro().includes(E)}var so=function(E,S){return so=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,I){A.__proto__=I}||function(A,I){for(var B in I)Object.prototype.hasOwnProperty.call(I,B)&&(A[B]=I[B])},so(E,S)};function nn(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");so(E,S);function A(){this.constructor=E}E.prototype=S===null?Object.create(S):(A.prototype=S.prototype,new A)}function H1(E,S,A,I){function B(b){return b instanceof A?b:new A(function(c){c(b)})}return new(A||(A=Promise))(function(b,c){function m(v){try{a(I.next(v))}catch(o){c(o)}}function t(v){try{a(I.throw(v))}catch(o){c(o)}}function a(v){v.done?b(v.value):B(v.value).then(m,t)}a((I=I.apply(E,S||[])).next())})}function gf(E,S){var A={label:0,sent:function(){if(b[0]&1)throw b[1];return b[1]},trys:[],ops:[]},I,B,b,c;return c={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function m(a){return function(v){return t([a,v])}}function t(a){if(I)throw new TypeError("Generator is already executing.");for(;c&&(c=0,a[0]&&(A=0)),A;)try{if(I=1,B&&(b=a[0]&2?B.return:a[0]?B.throw||((b=B.return)&&b.call(B),0):B.next)&&!(b=b.call(B,a[1])).done)return b;switch(B=0,b&&(a=[a[0]&2,b.value]),a[0]){case 0:case 1:b=a;break;case 4:return A.label++,{value:a[1],done:!1};case 5:A.label++,B=a[1],a=[0];continue;case 7:a=A.ops.pop(),A.trys.pop();continue;default:if(b=A.trys,!(b=b.length>0&&b[b.length-1])&&(a[0]===6||a[0]===2)){A=0;continue}if(a[0]===3&&(!b||a[1]>b[0]&&a[1]=E.length&&(E=void 0),{value:E&&E[I++],done:!E}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")}function _s(E,S){var A=typeof Symbol=="function"&&E[Symbol.iterator];if(!A)return E;var I=A.call(E),B,b=[],c;try{for(;(S===void 0||S-- >0)&&!(B=I.next()).done;)b.push(B.value)}catch(m){c={error:m}}finally{try{B&&!B.done&&(A=I.return)&&A.call(I)}finally{if(c)throw c.error}}return b}function tn(E,S,A){if(A||arguments.length===2)for(var I=0,B=S.length,b;I1||m(r,n)})})}function m(r,n){try{t(I[r](n))}catch(e){o(b[0][3],e)}}function t(r){r.value instanceof Ss?Promise.resolve(r.value.v).then(a,v):o(b[0][2],r)}function a(r){m("next",r)}function v(r){m("throw",r)}function o(r,n){r(n),b.shift(),b.length&&m(b[0][0],b[0][1])}}function $1(E){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var S=E[Symbol.asyncIterator],A;return S?S.call(E):(E=typeof Ps=="function"?Ps(E):E[Symbol.iterator](),A={},I("next"),I("throw"),I("return"),A[Symbol.asyncIterator]=function(){return this},A);function I(b){A[b]=E[b]&&function(c){return new Promise(function(m,t){c=E[b](c),B(m,t,c.done,c.value)})}}function B(b,c,m,t){Promise.resolve(t).then(function(a){b({value:a,done:m})},c)}}function me(E){return typeof E=="function"}function mf(E){var S=function(I){Error.call(I),I.stack=new Error().stack},A=E(S);return A.prototype=Object.create(Error.prototype),A.prototype.constructor=A,A}var Za=mf(function(E){return function(S){E(this),this.message=S?S.length+` errors occurred during unsubscription: -`+S.map(function(A,I){return I+1+") "+A.toString()}).join(` - `):"",this.name="UnsubscriptionError",this.errors=S}});function no(E,S){if(E){var A=E.indexOf(S);0<=A&&E.splice(A,1)}}var Or=function(){function E(S){this.initialTeardown=S,this.closed=!1,this._parentage=null,this._finalizers=null}return E.prototype.unsubscribe=function(){var S,A,I,B,b;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var m=Ps(c),t=m.next();!t.done;t=m.next()){var a=t.value;a.remove(this)}}catch(i){S={error:i}}finally{try{t&&!t.done&&(A=m.return)&&A.call(m)}finally{if(S)throw S.error}}else c.remove(this);var v=this.initialTeardown;if(me(v))try{v()}catch(i){b=i instanceof Za?i.errors:[i]}var o=this._finalizers;if(o){this._finalizers=null;try{for(var r=Ps(o),n=r.next();!n.done;n=r.next()){var e=n.value;try{Eu(e)}catch(i){b=b??[],i instanceof Za?b=tn(tn([],_s(b)),_s(i.errors)):b.push(i)}}}catch(i){I={error:i}}finally{try{n&&!n.done&&(B=r.return)&&B.call(r)}finally{if(I)throw I.error}}}if(b)throw new Za(b)}},E.prototype.add=function(S){var A;if(S&&S!==this)if(this.closed)Eu(S);else{if(S instanceof E){if(S.closed||S._hasParent(this))return;S._addParent(this)}(this._finalizers=(A=this._finalizers)!==null&&A!==void 0?A:[]).push(S)}},E.prototype._hasParent=function(S){var A=this._parentage;return A===S||Array.isArray(A)&&A.includes(S)},E.prototype._addParent=function(S){var A=this._parentage;this._parentage=Array.isArray(A)?(A.push(S),A):A?[A,S]:S},E.prototype._removeParent=function(S){var A=this._parentage;A===S?this._parentage=null:Array.isArray(A)&&no(A,S)},E.prototype.remove=function(S){var A=this._finalizers;A&&no(A,S),S instanceof E&&S._removeParent(this)},E.EMPTY=function(){var S=new E;return S.closed=!0,S}(),E}(),xf=Or.EMPTY;function yf(E){return E instanceof Or||E&&"closed"in E&&me(E.remove)&&me(E.add)&&me(E.unsubscribe)}function Eu(E){me(E)?E():E.unsubscribe()}var Tf={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},j1={setTimeout:function(E,S){for(var A=[],I=2;I0},enumerable:!1,configurable:!0}),S.prototype._trySubscribe=function(A){return this._throwIfClosed(),E.prototype._trySubscribe.call(this,A)},S.prototype._subscribe=function(A){return this._throwIfClosed(),this._checkFinalizedStatuses(A),this._innerSubscribe(A)},S.prototype._innerSubscribe=function(A){var I=this,B=this,b=B.hasError,c=B.isStopped,m=B.observers;return b||c?xf:(this.currentObservers=null,m.push(A),new Or(function(){I.currentObservers=null,no(m,A)}))},S.prototype._checkFinalizedStatuses=function(A){var I=this,B=I.hasError,b=I.thrownError,c=I.isStopped;B?A.error(b):c&&A.complete()},S.prototype.asObservable=function(){var A=new _e;return A.source=this,A},S.create=function(A,I){return new Au(A,I)},S}(_e),Au=function(E){nn(S,E);function S(A,I){var B=E.call(this)||this;return B.destination=A,B.source=I,B}return S.prototype.next=function(A){var I,B;(B=(I=this.destination)===null||I===void 0?void 0:I.next)===null||B===void 0||B.call(I,A)},S.prototype.error=function(A){var I,B;(B=(I=this.destination)===null||I===void 0?void 0:I.error)===null||B===void 0||B.call(I,A)},S.prototype.complete=function(){var A,I;(I=(A=this.destination)===null||A===void 0?void 0:A.complete)===null||I===void 0||I.call(A)},S.prototype._subscribe=function(A){var I,B;return(B=(I=this.source)===null||I===void 0?void 0:I.subscribe(A))!==null&&B!==void 0?B:xf},S}(oe),Pf=new _e(function(E){return E.complete()});function nT(E){return E&&me(E.schedule)}function Af(E){return E[E.length-1]}function Mf(E){return nT(Af(E))?E.pop():void 0}function wf(E,S){return typeof Af(E)=="number"?E.pop():S}var Rf=function(E){return E&&typeof E.length=="number"&&typeof E!="function"};function Ff(E){return me(E?.then)}function Lf(E){return me(E[Lo])}function Of(E){return Symbol.asyncIterator&&me(E?.[Symbol.asyncIterator])}function Df(E){return new TypeError("You provided "+(E!==null&&typeof E=="object"?"an invalid object":"'"+E+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function rT(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var If=rT();function Bf(E){return me(E?.[If])}function bf(E){return K1(this,arguments,function(){var S,A,I,B;return gf(this,function(b){switch(b.label){case 0:S=E.getReader(),b.label=1;case 1:b.trys.push([1,,9,10]),b.label=2;case 2:return[4,Ss(S.read())];case 3:return A=b.sent(),I=A.value,B=A.done,B?[4,Ss(void 0)]:[3,5];case 4:return[2,b.sent()];case 5:return[4,Ss(I)];case 6:return[4,b.sent()];case 7:return b.sent(),[3,2];case 8:return[3,10];case 9:return S.releaseLock(),[7];case 10:return[2]}})})}function Nf(E){return me(E?.getReader)}function ns(E){if(E instanceof _e)return E;if(E!=null){if(Lf(E))return aT(E);if(Rf(E))return oT(E);if(Ff(E))return hT(E);if(Of(E))return Gf(E);if(Bf(E))return lT(E);if(Nf(E))return uT(E)}throw Df(E)}function aT(E){return new _e(function(S){var A=E[Lo]();if(me(A.subscribe))return A.subscribe(S);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function oT(E){return new _e(function(S){for(var A=0;A{let B=this.tilePosInDirection(new ut(A,I),E);return this.tilemap.hasBlockingTile(B,S,W1(E),this.ignoreMissingTiles)})}isCharBlocking(E,S){return this.someCharTile((A,I)=>{let B=this.tilePosInDirection(new ut(A,I),E);return this.tilemap.hasBlockingChar(B,S,this.getCollisionGroups(),new Set([this.getId()]),this.ignoreCollisionGroups)})}isMoving(){return this.movementDirection!="none"}turnTowards(E){this.isMoving()||E!="none"&&this.changeFacingDirection(E)}changeFacingDirection(E){this.facingDirection!==E&&(this.facingDirection=E,this.directionChanged$.next(E))}getFacingDirection(){return this.facingDirection}getFacingPosition(){return this._tilePos.position.add(is(this.facingDirection))}addCollisionGroup(E){this.collisionGroups.add(E)}setCollisionGroups(E){this.collisionGroups=new Set(E)}setIgnoreCollisionGroups(E){this.ignoreCollisionGroups=new Set(E)}getCollisionGroups(){return Array.from(this.collisionGroups)}getIgnoreCollisionGroups(){return Array.from(this.ignoreCollisionGroups)}hasCollisionGroup(E){return this.collisionGroups.has(E)}removeCollisionGroup(E){this.collisionGroups.delete(E)}removeAllCollisionGroups(){this.collisionGroups.clear()}addLabels(E){for(let S of E)this.labels.add(S)}getLabels(){return[...this.labels.values()]}hasLabel(E){return this.labels.has(E)}clearLabels(){this.labels.clear()}removeLabels(E){for(let S of E)this.labels.delete(S)}getNumberOfDirections(){return this.numberOfDirections}movementStarted(){return this.movementStarted$}movementStopped(){return this.movementStopped$}directionChanged(){return this.directionChanged$}tilePositionSet(){return this.tilePositionSet$}positionChangeStarted(){return this.positionChangeStarted$}positionChangeFinished(){return this.positionChangeFinished$}autoMovementSet(){return this.autoMovementSet$}depthChanged(){return this.depthChanged$}getMovementProgress(){return this.movementProgress}setMovementProgress(E){let S=Math.max(0,Math.min(ki,E));this.movementProgress=S}hasWalkedHalfATile(){return this.movementProgress>ki/2}willCrossTileBorderThisUpdate(E){return this.movementProgress+this.maxProgressForDelta(E)>=ki}updateCharacterPosition(E){let S=this.willCrossTileBorderThisUpdate(E),A=1-(S?ki-this.movementProgress:this.maxProgressForDelta(E))/this.maxProgressForDelta(E);this.movementProgress=Math.min(this.movementProgress+this.maxProgressForDelta(E),ki),S&&(this.movementProgress=0,this.shouldContinueMoving()?(this.fire(this.positionChangeFinished$,this.tilePos,this.getNextTilePos()),this.tilePos=this.getNextTilePos(),this.startMoving(this.lastMovementImpulse),A>0&&this.updateCharacterPosition(E*A)):this.stopMoving())}maxProgressForDelta(E){let S=E/1e3;return Math.floor(S*this.speed*ki)}get tilePos(){return zt.clone(this._tilePos)}set tilePos(E){zt.copyOver(E,this._tilePos)}startMoving(E){E!=="none"&&(E!=this.movementDirection&&this.movementStarted$.next(E),this.movementDirection=E,this.facingDirection=E,this.fire(this.positionChangeStarted$,this.tilePos,this.getNextTilePos()))}tilePosInDirection(E,S){return E.add(is(this.tilemap.toMapDirection(S)))}shouldContinueMoving(){return this.lastMovementImpulse!=="none"&&!this.isBlockingDirection(this.lastMovementImpulse)}stopMoving(){if(this.movementDirection==="none")return;let E=this.tilePos,S=this.getNextTilePos(),A=this.movementDirection;this.tilePos=this.getNextTilePos(),this.movementDirection="none",this.movementStopped$.next(A),this.fire(this.positionChangeFinished$,E,S)}fire(E,{position:S,layer:A},{position:I,layer:B}){E.next({exitTile:S,enterTile:I,exitLayer:A,enterLayer:B})}someCharTile(E){let S=this.getNextTilePos().position;for(let A=S.x;Athis.isLayerAlwaysOnTop(B));this.tilemap.layers.filter(B=>!this.isLayerAlwaysOnTop(B)).forEach(B=>{this.hasLayerProp(B,qi.HEIGHT_SHIFT_PROP_NAME)?(this.createHeightShiftLayers(B,A),S.push(B.tilemapLayer)):this.setDepth(B,++A)}),this.charLayerDepths.set(void 0,A),I.forEach((B,b)=>{B.tilemapLayer.setDepth(b+1+A)}),S.forEach(B=>B.destroy())}setDepth(S,A){S.tilemapLayer.setDepth(A),this.isCharLayer(S)&&this.charLayerDepths.set(this.getLayerProp(S,qi.CHAR_LAYER_PROP_NAME),A)}createHeightShiftLayers(S,A){let I=this.getLayerProp(S,qi.HEIGHT_SHIFT_PROP_NAME);isNaN(I)&&(I=0);let B=1;for(let b=0;bB.name==A);return I?.value}hasLayerProp(S,A){return this.getLayerProp(S,A)!=null}copyLayer(S,A){let I=`${S.name}#${A}`,B=this.tilemap.createBlankLayer(I,S.tilemapLayer.tileset);if(B){if(B.name=I,this.isIsometric())for(let b=A;b>=0;b--){let c=A-b;B.putTileAt(S.data[b][c],c,b)}else for(let b=0;bm===this.charData.id)).subscribe(({direction:m})=>{var t;(t=this.animation)==null||t.setStandingFrame(m)}),this.sprite&&(this.sprite.setOrigin(0,0),this.resetAnimation(this.sprite),this.updateOverlaySprite(),this.updateGridChar())}destroy(){this.destroy$.next(),this.destroy$.complete(),this.newSpriteSet$.complete()}setSprite(E){E?(this.sprite&&(E.x=this.sprite.x,E.y=this.sprite.y),this.sprite=E,this.newSpriteSet$.next(),this.layerOverlaySprite=this.layerOverlaySprite?this.scene.add.sprite(0,0,this.sprite.texture):void 0,this.updateOverlaySprite(),this.resetAnimation(this.sprite),this.updateDepth()):(this.layerOverlaySprite=void 0,this.sprite=void 0)}getSprite(){return this.sprite}getLayerOverlaySprite(){return this.layerOverlaySprite}setContainer(E){var S;this.container=E,this.cachedContainerHeight=(S=E?.getBounds().height)!=null?S:0}getContainer(){return this.container}getOffsetX(){return this.customOffset.x}setOffsetX(E){this.customOffset.x=E}getOffsetY(){return this.customOffset.y}setOffsetY(E){this.customOffset.y=E}getWalkingAnimationMapping(){return this.walkingAnimationMapping}turnTowards(E){var S;this.geHeadless.isMoving(this.charData.id)||E!="none"&&(this.geHeadless.turnTowards(this.charData.id,E),(S=this.animation)==null||S.setStandingFrame(E))}getAnimation(){return this.animation}setAnimation(E){this.animation=E}update(E){this.updateGridChar()}getEngineOffset(){var E,S,A,I;if(!this.sprite)return ut.ZERO;let B=this.tilemap.getTileWidth()/2-Math.floor(((S=(E=this.sprite)==null?void 0:E.displayWidth)!=null?S:0)/2),b=-((I=(A=this.sprite)==null?void 0:A.displayHeight)!=null?I:0)+this.tilemap.getTileHeight();return new ut(B,b)}updatePixelPos(){let E=new ut(this.geHeadless.getPosition(this.charData.id)),S=this.geHeadless.getMovementProgress(this.charData.id)/1e3,A=this.tilemap.tilePosToPixelPos(E).add(this.getEngineOffset()).add(this.customOffset).add(is(this.geHeadless.getFacingDirection(this.charData.id)).multiply(this.tilemap.getTileDistance(this.geHeadless.getFacingDirection(this.charData.id)).scalarMult(S))),I=this.getGameObj();I&&(I.x=Math.floor(A.x),I.y=Math.floor(A.y))}getGameObj(){return this.container||this.sprite}updateGridChar(){var E;if(this.updatePixelPos(),this.sprite&&this.geHeadless.isMoving(this.charData.id)){let S=this.geHeadless.getMovementProgress(this.charData.id)>ki/2;(E=this.getAnimation())==null||E.updateCharacterFrame(this.geHeadless.getFacingDirection(this.charData.id),S,Number(this.sprite.frame.name))}this.updateDepth()}resetAnimation(E){let S=new Mu(this.walkingAnimationMapping,E.texture.source[0].width/E.width/Mu.FRAMES_CHAR_ROW);this.setAnimation(S),S.frameChange().pipe(ke(this.newSpriteSet$)).subscribe(A=>{E?.setFrame(A)}),S.setIsEnabled(this.walkingAnimationMapping!==void 0),S.setStandingFrame(this.geHeadless.getFacingDirection(this.charData.id))}updateOverlaySprite(){if(!this.layerOverlaySprite||!this.sprite)return;this.layerOverlaySprite.scale=this.sprite.scale;let E=this.tilemap.getTileHeight()/this.layerOverlaySprite.scale;this.layerOverlaySprite.setCrop(0,0,this.layerOverlaySprite.displayWidth,this.sprite.height-E),this.layerOverlaySprite.setOrigin(0,0)}updateDepth(){if(!this.getGameObj())return;let E=new ut(this.geHeadless.getPosition(this.charData.id)),S=this.geHeadless.getCharLayer(this.charData.id);this.container?this.setContainerDepth(this.container,{position:E,layer:S}):this.sprite&&this.setSpriteDepth(this.sprite,{position:E,layer:S});let A=this.getLayerOverlaySprite();if(A){let I=new ut(zi(re({},E),{y:E.y-1}));this.setSpriteDepth(A,{position:I,layer:S})}}setSpriteDepth(E,S){E.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(S))+this.getPaddedPixelDepthSprite(E))}setContainerDepth(E,S){E.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(S))+this.getPaddedPixelDepthContainer(E))}getPaddedPixelDepthContainer(E){return ho.shiftPad(E.y+this.cachedContainerHeight,uo.Z_INDEX_PADDING)}getPaddedPixelDepthSprite(E){return ho.shiftPad(E.y+E.displayHeight,uo.Z_INDEX_PADDING)}getTransitionLayer(E){if(E.layer)return this.geHeadless.getTransition(E.position,E.layer)||E.layer}},MT=(E=>(E.DONT_BLOCK="DONT_BLOCK",E.BLOCK_TWO_TILES="BLOCK_TWO_TILES",E.BLOCK_ONE_TILE_AHEAD="BLOCK_ONE_TILE_AHEAD",E.BLOCK_ONE_TILE_BEHIND="BLOCK_ONE_TILE_BEHIND",E))(MT||{}),Hf=(E=>(E.STOP="STOP",E.CLOSEST_REACHABLE="CLOSEST_REACHABLE",E.RETRY="RETRY",E.ALTERNATIVE_TARGETS="ALTERNATIVE_TARGETS",E))(Hf||{}),wT=class{distance(E,S){return oi.manhattanDistance(E,S)}direction(E,S){if(oi.equal(E,S))return"none";let A=E.clone().subtract(S);return Math.abs(A.x)>Math.abs(A.y)?A.x>0?"left":"right":A.y>0?"up":"down"}neighbors(E){return[new ut(E.x,E.y+1),new ut(E.x+1,E.y),new ut(E.x-1,E.y),new ut(E.x,E.y-1)]}getDirections(){return["up","right","down","left"]}},RT=class{distance(E,S){return oi.chebyshevDistance(E,S)}neighbors(E){let S=[new ut(E.x,E.y+1),new ut(E.x+1,E.y),new ut(E.x-1,E.y),new ut(E.x,E.y-1)],A=[new ut(E.x+1,E.y+1),new ut(E.x+1,E.y-1),new ut(E.x-1,E.y+1),new ut(E.x-1,E.y-1)];return[...S,...A]}direction(E,S){return S.x>E.x?S.y>E.y?"down-right":S.yE.y?"down-left":S.yE.y?"down":"none"}getDirections(){return["up","right","down","left","down-left","down-right","up-right","up-left"]}},en=class{static create(E){switch(E){case 4:return new wT;case 8:return new RT}}},wu=class{constructor(E,S,A){this.backoffMs=E,this.maxRetries=S,this.onFinished=A,this.retries=0,this.elapsed=0}retry(E,S){this.shouldRetry()?(this.elapsed+=E,this.elapsed>=this.backoffMs&&(this.elapsed=0,this.retries++,S())):this.onFinished()}reset(){this.retries=0,this.elapsed=0}getMaxRetries(){return this.maxRetries}getBackoffMs(){return this.backoffMs}shouldRetry(){return this.maxRetries===-1||this.retries(E.WAIT="WAIT",E.RETRY="RETRY",E.STOP="STOP",E))(Kf||{}),Dr=class{constructor(E,{shortestPathAlgorithm:S="BFS",pathWidth:A=1,pathHeight:I=1,numberOfDirections:B=4,isPositionAllowed:b=(i,h)=>!0,collisionGroups:c=[],ignoredChars:m=[],ignoreTiles:t=!1,ignoreMapBounds:a=!1,ignoreBlockedTarget:v=!1,maxPathLength:o=1/0,ignoreLayers:r=!1,considerCosts:n=!1,calculateClosestToTarget:e=!0}={}){this.gridTilemap=E,this.options={shortestPathAlgorithm:S,pathWidth:A,pathHeight:I,numberOfDirections:B,isPositionAllowed:b,collisionGroups:c,ignoredChars:m,ignoreTiles:t,ignoreMapBounds:a,ignoreBlockedTarget:v,maxPathLength:o,ignoreLayers:r,considerCosts:n,calculateClosestToTarget:e},this.ignoredCharsSet=new Set(m)}findShortestPath(E,S){this.options.ignoreLayers&&(this.gridTilemap.fixCacheLayer(E.layer),S.layer=E.layer);let A=this.findShortestPathImpl(E,S);return this.gridTilemap.unfixCacheLayers(),A}getNeighbors(E,S){var A;return en.create((A=this.options.numberOfDirections)!=null?A:4).neighbors(E.position).map(I=>{let B=E.layer;return this.options.ignoreLayers||(B=this.gridTilemap.getTransition(I,E.layer)),{position:I,layer:B||E.layer}}).filter(I=>!this.isBlocking(E,I)||this.options.ignoreBlockedTarget&&zt.equal(I,S))}getTransition(E,S){if(!this.options.ignoreLayers)return this.gridTilemap.getTransition(E,S)}getCosts(E,S){if(!this.options.considerCosts)return 1;let A=qe(S.position,E);return this.gridTilemap.getTileCosts(S,A)}isBlocking(E,S){return!(this.options.ignoreMapBounds||this.gridTilemap.isInRange(S.position))||!this.options.isPositionAllowed(S.position,S.layer)||!this.options.ignoreTiles&&this.hasBlockingTileFrom(E,S,this.options.pathWidth,this.options.pathHeight,this.options.ignoreMapBounds,this.gridTilemap)?!0:this.hasBlockingCharFrom(E,S,this.options.pathWidth,this.options.pathHeight,this.options.collisionGroups,this.ignoredCharsSet,this.gridTilemap)}distance(E,S){return(this.options.numberOfDirections===4?oi.manhattanDistance:oi.chebyshevDistance)(E,S)}getTilePosInDir(E,S){return this.options.ignoreLayers?{position:E.position.add(is(this.gridTilemap.toMapDirection(S))),layer:E.layer}:this.gridTilemap.getTilePosInDirection(E,S)}getReverseNeighbors(E,S){var A;let I=en.create((A=this.options.numberOfDirections)!=null?A:4).neighbors(E.position),B;if(!this.options.ignoreLayers){let b=this.gridTilemap.getReverseTransitions(E.position,E.layer);B=b?[...b]:void 0}return I.map(b=>B?B.map(c=>({position:b,layer:c||E.layer})):[{position:b,layer:E.layer}]).flat().filter(b=>!this.isBlocking(b,E)||this.options.ignoreBlockedTarget&&zt.equal(E,S))}hasBlockingCharFrom(E,S,A,I,B,b,c){if(A===1&&I===1)return c.hasBlockingChar(S.position,S.layer,B,b);let m=a=>c.hasBlockingChar(a,S.layer,B,b),t=qe(E.position,S.position);return this.isBlockingMultiTile(E,t,A,I,m)}hasBlockingTileFrom(E,S,A,I,B,b){if(A===1&&I===1)return b.hasBlockingTile(S.position,S.layer,qe(S.position,E.position),B);let c=qe(E.position,S.position),m=t=>b.hasBlockingTile(t,S.layer,c,B);return this.isBlockingMultiTile(E,c,A,I,m)}isBlockingMultiTile(E,S,A,I,B){let b={src:new ut(E.position.x+A,E.position.y),dest:new ut(E.position.x+A,E.position.y+I-1)},c={src:new ut(E.position.x-1,E.position.y),dest:new ut(E.position.x-1,E.position.y+I-1)},m={src:new ut(E.position.x,E.position.y-1),dest:new ut(E.position.x+A-1,E.position.y-1)},t={src:new ut(E.position.x,E.position.y+I),dest:new ut(E.position.x+A-1,E.position.y+I)};switch(S){case"right":return this.checkLine(b,B);case"left":return this.checkLine(c,B);case"up":return this.checkLine(m,B);case"down":return this.checkLine(t,B);case"up-left":return this.checkLine({src:m.src,dest:new ut(m.dest.x-1,m.dest.y)},B)||this.checkLine({src:new ut(c.src.x,c.src.y-1),dest:new ut(c.dest.x,c.dest.y-1)},B);case"up-right":return this.checkLine({src:new ut(m.src.x+1,m.src.y),dest:m.dest},B)||this.checkLine({src:new ut(b.src.x,b.src.y-1),dest:new ut(b.dest.x,b.dest.y-1)},B);case"down-left":return this.checkLine({src:new ut(c.src.x,c.src.y+1),dest:new ut(c.dest.x,c.dest.y+1)},B)||this.checkLine({src:t.src,dest:new ut(t.dest.x-1,t.dest.y)},B);case"down-right":return this.checkLine({src:new ut(t.src.x+1,t.src.y),dest:t.dest},B)||this.checkLine({src:new ut(b.src.x,b.src.y+1),dest:new ut(b.dest.x,b.dest.y+1)},B)}return!1}checkLine(E,S){for(let A=E.src.x;A<=E.dest.x;A++)for(let I=E.src.y;I<=E.dest.y;I++)if(S(new ut(A,I)))return!0;return!1}},FT=rf(Po(),1),LT=class extends Dr{findShortestPathImpl(E,S){let A=this.shortestPathBfs(E,S);return{path:this.returnPath(A.previous,E,S),closestToTarget:A.closestToTarget,steps:A.steps,maxPathLengthReached:A.maxPathLengthReached,algorithmUsed:"A_STAR"}}shortestPathBfs(E,S){let A=new Map,I=new Map,B=new Map,b=new FT.MinFibonacciHeap((a,v)=>Ws(B,a)-Ws(B,v)),c=E,m=this.distance(E.position,S.position),t=0;for(b.push(E),I.set(zt.toString(E),0),B.set(zt.toString(E),this.distance(E.position,S.position));b.size>0;){let a=b.pop();if(!a)break;t++;let v=this.distance(a.position,S.position);if(vthis.options.maxPathLength)return{previous:new Map,closestToTarget:c,steps:t,maxPathLengthReached:!0};for(let o of this.getNeighbors(a,S)){let r=Ws(I,a)+this.getCosts(a.position,o),n=zt.toString(o);(!I.has(n)||r0;){let t=B.dequeue();if(m++,!t)break;let{node:a,dist:v}=t;if(v>this.options.maxPathLength)return{previous:new Map,closestToTarget:b,steps:m,maxPathLengthReached:!0};let o=this.distance(a.position,S.position);if(othis.lastDist)}step(E,S,A){var I;this.lastDist=A;for(let B of E){let b=zt.toString(B);if(!this.visited.has(b)){this.previous.set(b,S),this.queue.enqueue({node:B,dist:A+1}),this.visited.set(b,A+1);let c=(I=this.otherBfs)==null?void 0:I.visited.get(b);c!==void 0&&c0,B.queue.size()>0);){let t=I.queue.dequeue();if(!t)break;let{node:a,dist:v}=t;if(v+1+(((A=B.queue.peek())==null?void 0:A.dist)||0)>this.options.maxPathLength)return{previous:I.previous,previous2:B.previous,closestToTarget:this.maybeClosestToTarget(c),steps:b,maxPathLengthReached:!0};let o=this.distance(a.position,S.position);if(oYs(this.f,B)-Ys(this.f,b)),this.openSet.push(E);let I=zt.toString(E);for(this.g.set(I,0),this.f.set(I,this.distance(E.position,S.position)),this.maxFrontierSize=Math.max(this.maxFrontierSize,this.openSet.size);this.openSet.size>0;){let B=this.openSet.pop();if(!B)break;if(this.steps++,zt.equal(B,S))return{previous:A,closestToTarget:S,steps:this.steps,maxPathLengthReached:!1};if(Ys(this.g,B)+1>this.options.maxPathLength)return{previous:new Map,closestToTarget:this.closestToTarget,steps:this.steps,maxPathLengthReached:!0};this.updateClosestToTarget(B,S);for(let b of this.getNeighborsInternal(B,A.get(zt.toString(B)),S)){let c=zt.toString(b.p),m=Ys(this.g,B)+b.dist;(!this.g.has(c)||m({p:b,dist:1}));let I=this.prune(S,E).filter(b=>!this.isBlockingIgnoreTarget(E,b,A)).map(b=>{let c=this.getTransition(b.position,E.layer);return{position:b.position,layer:c||E.layer}}),B=[];for(let b of I)if(this.isHorizontal(E.position,b.position))B.push({p:b,dist:1});else{let c=this.jump(E,b,A,1,qe(E.position,b.position));c&&B.push(c)}return B}isBlockingIgnoreTarget(E,S,A){return this.isBlocking(E,S)&&!(this.options.ignoreBlockedTarget&&zt.equal(S,A))}jump(E,S,A,I,B){if(!this.isBlockingIgnoreTarget(E,S,A))return zt.equal(S,A)?{p:S,dist:I}:I>=this.maxJumpSize?{p:S,dist:I}:this.getTransition(S.position,E.layer)!==void 0?{p:S,dist:I}:this.hasForced(E,S)?{p:S,dist:I}:(this.updateClosestToTarget(S,A),this.jump(S,this.getTilePosInDir(S,B),A,I+1,B))}isHorizontal(E,S){return E.y===S.y}getForced(E,S,A,I,B,b){let c=[],m=E;return(this.blockOrTrans(m,A)||this.blockOrTrans(A,I))&&this.addIfNotBlocked(c,S,I),(this.blockOrTrans(m,B)||this.blockOrTrans(B,b))&&this.addIfNotBlocked(c,S,b),c}hasForced(E,S){let{topLeft:A,downLeft:I,top:B,bottom:b}=this.normalizedPositions(E,S);return!!((this.blockOrTrans(E,I)||this.blockOrTrans(I,b))&&!this.blockOrTrans(S,b)||(this.blockOrTrans(E,A)||this.blockOrTrans(A,B))&&!this.blockOrTrans(S,B))}prune(E,S){let{right:A,top:I,bottom:B,downLeft:b,topLeft:c}=this.normalizedPositions(E,S);return this.isHorizontal(E.position,S.position)?[A,I,B]:[A,...this.getForced(E,S,b,B,c,I)]}normalizedPositions(E,S){return E.position.xS.position.x?{topLeft:{position:new ut(S.position.x+1,S.position.y+1),layer:S.layer},downLeft:{position:new ut(S.position.x+1,S.position.y-1),layer:S.layer},top:{position:new ut(S.position.x,S.position.y+1),layer:S.layer},bottom:{position:new ut(S.position.x,S.position.y-1),layer:S.layer},right:{position:new ut(S.position.x-1,S.position.y),layer:S.layer}}:E.position.y1?this.fillPath(B,b,I):I.push(b),B=b}return I.reverse()}fillPath(E,S,A){let I=E;do{let B=qe(I.position,S.position);I=this.getTilePosInDir(I,B),A.push(I)}while(!oi.equal(I.position,S.position))}};function Ys(E,S){var A;return(A=E.get(zt.toString(S)))!=null?A:Number.MAX_VALUE}var DT=class{constructor(E,S,A,I={}){this.character=E,this.gridTilemap=S,this.charToFollow=A;let B={distance:0,noPathFoundStrategy:"STOP",maxPathLength:1/0,shortestPathAlgorithm:"BIDIRECTIONAL_SEARCH",ignoreLayers:!1,considerCosts:I.considerCosts||!1,facingDirection:"none"};this.options=re(re({},B),I),this.options.considerCosts&&this.options.shortestPathAlgorithm!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${this.options.shortestPathAlgorithm}'. It can only be used with A* algorithm.`),this.options.shortestPathAlgorithm==="JPS"&&(this.character.getTileWidth()>1||this.character.getTileHeight()>1)&&console.warn("GridEngine: Pathfinding algorithm 'JPS' can only be used for characters with 'tileWidth' and 'tileHeight' of 1"),this.character=E,this.updateTarget(this.charToFollow.getTilePos().position,this.charToFollow.getTilePos().layer),this.charToFollow.positionChangeStarted().pipe(ke(this.character.autoMovementSet().pipe(Ui(b=>b!==this),Ms(1)))).subscribe(({enterTile:b,enterLayer:c})=>{this.updateTarget(b,c)})}update(E){var S;(S=this.targetMovement)==null||S.update(E)}getInfo(){return{type:"Follow",config:{charToFollow:this.charToFollow.getId(),distance:this.options.distance,noPathFoundStrategy:this.options.noPathFoundStrategy,maxPathLength:this.options.maxPathLength,ignoreLayers:this.options.ignoreLayers,facingDirection:this.options.facingDirection,shortestPathAlgorithm:this.options.shortestPathAlgorithm}}}getFacingPos(){let E=nr[this.options.facingDirection]+nr[this.charToFollow.getFacingDirection()],S=pf("up",E),A={x:this.charToFollow.getTilePos().position.x,y:this.charToFollow.getTilePos().position.y};return S==="right"?A.x+=this.charToFollow.getTileWidth()-1:S==="down"?A.y+=this.charToFollow.getTileWidth()-1:S==="down-left"?A.y+=this.charToFollow.getTileWidth()-1:S==="down-right"?(A.y+=this.charToFollow.getTileWidth()-1,A.x+=this.charToFollow.getTileWidth()-1):S==="up-right"&&(A.x+=this.charToFollow.getTileWidth()-1),this.gridTilemap.getTilePosInDirection({position:new ut(A),layer:this.charToFollow.getTilePos().layer},S).position}updateTarget(E,S){let A=this.options.facingDirection!=="none"&&this.options.distance===0;A&&(E=this.getFacingPos()),this.targetMovement=new qf(this.character,this.gridTilemap,{position:new ut(E),layer:S},{distance:A?0:this.options.distance+1,config:{algorithm:this.options.shortestPathAlgorithm,noPathFoundStrategy:this.options.noPathFoundStrategy,maxPathLength:this.options.maxPathLength,ignoreLayers:this.options.ignoreLayers,considerCosts:this.options.considerCosts,ignoredChars:[this.charToFollow.getId()]}})}},Du=class{static getRandomInt(E){return Math.floor(Math.random()*Math.floor(E))}},IT=class{constructor(E,S=0,A=-1){this.character=E,this.delay=S,this.radius=A,this.stepSize=0,this.delayLeft=this.delay,this.initialRow=E.getNextTilePos().position.y,this.initialCol=E.getNextTilePos().position.x,this.randomizeStepSize(),this.stepsWalked=0,this.currentMovementDirection="none",this.character.positionChangeStarted().pipe(ke(this.character.autoMovementSet().pipe(Ui(I=>I!==this),Ms(1)))).subscribe(()=>{this.stepsWalked++}),this.distanceUtils=en.create(E.getNumberOfDirections())}update(E){if(this.shouldContinueWalkingCurrentDirection())this.character.move(this.currentMovementDirection);else if(this.delayLeft-=E,this.delayLeft<=0){this.delayLeft=this.delay;let S=this.getFreeRandomDirection();this.stepsWalked=0,this.character.move(S),this.currentMovementDirection=S,this.randomizeStepSize()}}getInfo(){return{type:"Random",config:{delay:this.delay,radius:this.radius}}}shouldContinueWalkingCurrentDirection(){return this.stepsWalked!this.character.isBlockingDirection(E)).filter(E=>this.isWithinRadius(E))}isWithinRadius(E){return this.radius==-1?!0:this.getDist(E)<=this.radius}getDist(E){return this.distanceUtils.distance(this.character.getNextTilePos().position.add(is(E)),new ut(this.initialCol,this.initialRow))}getFreeRandomDirection(){let E=this.getFreeDirections();return E.length==0?"none":E[Du.getRandomInt(E.length)]}randomizeStepSize(){this.stepSize=Du.getRandomInt(this.radius)+1}};function BT(E,S){return E.filter(A=>{var I,B,b,c,m,t;return(I=S.labels)!=null&&I.withAllLabels?(B=S.labels)==null?void 0:B.withAllLabels.every(a=>A.hasLabel(a)):(b=S.labels)!=null&&b.withOneOfLabels?(c=S.labels)==null?void 0:c.withOneOfLabels.some(a=>A.hasLabel(a)):(m=S.labels)!=null&&m.withNoneLabels?!((t=S.labels)!=null&&t.withNoneLabels.some(a=>A.hasLabel(a))):!0})}var Zf="2.44.6",bT=class{constructor(E,S){this.collistionStrategy=E,this.collisionGroupRelation=S,this.tilePosToCharacters=new NT,this.charRemoved$=new oe}isCharBlockingAt(E,S,A,I=new Set,B=new Set){if(A.length===0)return!1;let b=this.tilePosToCharacters.get(E,S);return!!(b&&b.size>0&&[...b].filter(c=>!I.has(c.getId())).filter(c=>!this.doIntersect(c.getCollisionGroups(),B)).some(c=>A.some(m=>c.getCollisionGroups().some(t=>this.collidesWith(m,t)))))}doIntersect(E,S){for(let A of E)if(S.has(A))return!0;return!1}collidesWith(E,S){return this.collisionGroupRelation?(this.collisionGroupRelation.get(E)||new Set).has(S):E===S}getCharactersAt(E,S){return this.tilePosToCharacters.get(E,S)||new Set}addCharacter(E){this.addTilePositions(E.getTilePos(),E),this.addTilePositions(E.getNextTilePos(),E),this.addPositionChangeSub(E),this.addPositionChangeFinishedSub(E),this.addTilePosSetSub(E)}removeCharacter(E){let S=E.getId();this.charRemoved$.next(S),this.deleteTilePositions(E.getTilePos(),E),this.deleteTilePositions(E.getNextTilePos(),E)}add(E,S,A){let I=this.tilePosToCharacters.get(E,S);I||this.tilePosToCharacters.set(E,S,new Set([A])),I?.add(A)}addTilePosSetSub(E){E.tilePositionSet().pipe(ke(this.charRemoved(E.getId()))).subscribe(S=>{this.deleteTilePositions(E.getNextTilePos(),E),this.addTilePositions(S,E)})}charRemoved(E){var S;return(S=this.charRemoved$)==null?void 0:S.pipe(Ms(1),Ui(A=>A==E))}addPositionChangeSub(E){E.positionChangeStarted().pipe(ke(this.charRemoved(E.getId())),this.posChangeToLayerPos()).subscribe(S=>{this.collistionStrategy==="BLOCK_ONE_TILE_AHEAD"&&this.deleteTilePositions(S.exit,E),this.addTilePositions(S.enter,E)})}addPositionChangeFinishedSub(E){E.positionChangeFinished().pipe(ke(this.charRemoved(E.getId())),this.posChangeToLayerPos()).subscribe(S=>{this.deleteTilePositions(S.exit,E),this.addTilePositions(S.enter,E)})}addTilePositions(E,S){this.forEachCharTile(E,S,(A,I)=>{this.add(new ut(A,I),E.layer,S)})}deleteTilePositions(E,S){this.forEachCharTile(E,S,(A,I)=>{var B;(B=this.tilePosToCharacters.get(new ut(A,I),E.layer))==null||B.delete(S)})}forEachCharTile(E,S,A){let I=E.position;for(let B=I.x;B({enter:{position:new ut(E.enterTile),layer:E.enterLayer},exit:{position:new ut(E.exitTile),layer:E.exitLayer}})))}posToString(E,S){return`${E.x}#${E.y}#${S}`}},NT=class{constructor(){this.memo=new Map}set(E,S,A){let I=this.memo.get(E.x);I||(I=new Map,this.memo.set(E.x,I));let B=I.get(E.y);B||(B=new Map,I.set(E.y,B)),B.set(S,A)}get(E,S){let A=this.memo.get(E.x);if(!A)return;let I=A.get(E.y);if(I)return I.get(S)}},Oo=class{constructor(E,S,A,I){this.x=E,this.y=S,this.width=A,this.height=I}getX(){return this.x}getY(){return this.y}getWidth(){return this.width}getHeight(){return this.height}isInRange(E){return E.x>=this.x&&E.x=this.y&&E.yA.isCharLayer());for(let A of[...S,void 0]){let I=this.tileCollisionCache.get(A?.getName());if(I===void 0){I=new Array(this.tilemap.getWidth());for(let B=0;B>S&1)==1}var Bu="ge_cost",Jf=class Qf{constructor(S,A,I,B=void 0,b=!1){this.tilemap=S,this.collisionTilePropertyName=A,this.useTileCollisionCache=b,this.characters=new Map,this.transitions=new Map,this.reverseTransitions=new Map,this.collidesPropNames=new Map,this.tileCostPropNames=new Map,this.collisionRelevantLayersFrameCache=new Map,this.charBlockCache=new bT(I,B);for(let c of Ro())this.collidesPropNames.set(c,Qf.ONE_WAY_COLLIDE_PROP_PREFIX+c),this.tileCostPropNames.set(c,`${Bu}_${c}`);this.useTileCollisionCache&&(this.tileCollisionCache=new zT(S,this),this.tileCollisionCache.rebuild())}fixCacheLayer(S){var A;(A=this.tileCollisionCache)==null||A.fixLayer(S)}unfixCacheLayers(){var S;(S=this.tileCollisionCache)==null||S.unfixLayers()}addCharacter(S){this.characters.set(S.getId(),S);let A=S.getNextTilePos().layer;A===void 0?S.setTilePosition(zi(re({},S.getNextTilePos()),{layer:this.getLowestCharLayer()})):this.getCharLayerNames().includes(A)||console.warn(`Char layer '${A}' of character '${S.getId()}' is unknown.`),this.charBlockCache.addCharacter(S)}removeCharacter(S){let A=this.characters.get(S);A&&(this.charBlockCache.removeCharacter(A),this.characters.delete(S))}getCharacters(){return[...this.characters.values()]}getCharactersAt(S,A){return this.charBlockCache.getCharactersAt(S,A)}rebuildTileCollisionCache(S){var A;(A=this.tileCollisionCache)==null||A.rebuild(S)}hasBlockingTileUncached(S,A,I,B){if(!B&&this.hasNoTileUncached(S,A))return!0;let b=this.getCollisionRelevantLayers(A);for(let c of b)if(this.isLayerBlockingAt(c.getName(),S,I))return!0;return!1}hasBlockingTile(S,A,I,B){var b;let c=(b=this.tileCollisionCache)==null?void 0:b.isBlockingFrom(S.x,S.y,A,I,B);return c!==void 0?c:this.hasBlockingTileUncached(S,A,I,B)}getTransition(S,A){let I=this.transitions.get(S.toString());if(I)return I.get(A)}getReverseTransitions(S,A){let I=this.reverseTransitions.get(S.toString());if(I)return I.get(A)}setTransition(S,A,I){var B,b,c,m,t;this.transitions.has(S.toString())||this.transitions.set(S.toString(),new Map),this.reverseTransitions.has(S.toString())||this.reverseTransitions.set(S.toString(),new Map),(B=this.transitions.get(S.toString()))==null||B.set(A,I),(b=this.reverseTransitions.get(S.toString()))!=null&&b.has(I)||(c=this.reverseTransitions.get(S.toString()))==null||c.set(I,new Set),(t=(m=this.reverseTransitions.get(S.toString()))==null?void 0:m.get(I))==null||t.add(A)}getTransitions(){return new Map([...this.transitions].map(([S,A])=>[S,new Map(A)]))}getTileCosts(S,A){let I=this.getCollisionRelevantLayers(S.layer),B=1;for(let b of I)B=Math.max(B,this.getTileCostsForLayer(zi(re({},S),{layer:b.getName()}),A));return B}getTileCostsForLayer(S,A){let I=this.tilemap.getTileAt(S.position.x,S.position.y,S.layer);return A&&I?.getProperty(this.tileCostPropNames.get(A)||"")||I?.getProperty(Bu)||1}hasNoTileUncached(S,A){return!this.getCollisionRelevantLayers(A).some(I=>this.tilemap.hasTileAt(S.x,S.y,I.getName()))}hasNoTile(S,A){var I;let B=(I=this.tileCollisionCache)==null?void 0:I.hasTileAt(S.x,S.y,A);return B!==void 0?B:this.hasNoTileUncached(S,A)}hasBlockingChar(S,A,I,B=new Set,b=new Set){return this.charBlockCache.isCharBlockingAt(S,A,I,B,b)}isInRange(S){return new Oo(0,0,this.tilemap.getWidth(),this.tilemap.getHeight()).isInRange(S)}toMapDirection(S){return this.isIsometric()?V1(S):S}fromMapDirection(S){return this.isIsometric()?pf(S):S}isIsometric(){return this.tilemap.getOrientation()==="isometric"}getTilePosInDirection(S,A){let I=S.position.add(is(this.toMapDirection(A))),B=this.getTransition(I,S.layer)||S.layer;return{position:I,layer:B}}invalidateFrameCache(){this.collisionRelevantLayersFrameCache.clear()}isLayerBlockingAt(S,A,I){let B=this.tilemap.getTileAt(A.x,A.y,S);return B?!!(B.getProperty(this.collisionTilePropertyName)||I&&B.getProperty(this.collidesPropNames.get(I)||"")):!1}getCharLayerIndexes(){return this.tilemap.getLayers().map((S,A)=>({layer:S,index:A})).filter(({layer:S})=>S.isCharLayer()).map(({index:S})=>S)}findPrevAndCharLayer(S){let A=this.getCharLayerIndexes(),I=this.tilemap.getLayers(),B=A.findIndex(b=>I[b].getProperty(tr)==S);return B==0?{prevIndex:-1,charLayerIndex:A[B]}:{prevIndex:A[B-1],charLayerIndex:A[B]}}getCollisionRelevantLayers(S){if(!S)return this.tilemap.getLayers();let A=this.collisionRelevantLayersFrameCache.get(S);if(A)return A;let{prevIndex:I,charLayerIndex:B}=this.findPrevAndCharLayer(S),b=this.tilemap.getLayers().slice(I+1,B+1);return this.collisionRelevantLayersFrameCache.set(S,b),b}getLowestCharLayer(){for(let S of this.tilemap.getLayers())if(S.isCharLayer())return S.getProperty(tr)}getCharLayerNames(){return this.tilemap.getLayers().filter(S=>S.isCharLayer()).map(S=>S.getProperty(tr)).filter(XT)}};Jf.ONE_WAY_COLLIDE_PROP_PREFIX="ge_collide_";var UT=Jf;function XT(E){return E!=null}var VT=(E=>(E.REMOVED="REMOVED",E.ADDED="ADDED",E))(VT||{}),WT=(E=>(E.WAIT="WAIT",E.SKIP="SKIP",E.STOP="STOP",E))(WT||{}),YT=class{constructor(E,S){this.character=E,this.tilemap=S,this.queue=new rr,this.finished$=new oe,this.pathBlockedWaitElapsed=0,this.distanceUtils=en.create(E.getNumberOfDirections()),this.character.autoMovementSet().pipe(Ui(A=>A!==this),Ms(1)).subscribe(()=>{this.queue.size()>0&&this.finishMovementTerminated(),this.finished$.complete()})}update(E){(!this.character.isMoving()||this.character.willCrossTileBorderThisUpdate(E))&&this.queue.size()>0&&this.moveCharOnPath(E)}getInfo(){return{type:"Queue"}}enqueue(E,S={}){var A,I,B;let b={pathBlockedStrategy:(A=S.pathBlockedStrategy)!=null?A:"STOP",pathBlockedWaitTimeoutMs:S?.pathBlockedWaitTimeoutMs||-1,ignoreInvalidPositions:(I=S.ignoreInvalidPositions)!=null?I:!1,skipInvalidPositions:(B=S.skipInvalidPositions)!=null?B:!1};for(let c of E){let m={command:c,config:b};if(ys(c)){this.queue.enqueue(m);continue}let t=this.queue.peekEnd(),a=t?.command;if(a||(a=this.character.getNextTilePos()),ys(a)){this.queue.enqueue(m);continue}let v=this.distanceUtils.distance(a.position,c.position)===1;(!S.ignoreInvalidPositions||v)&&this.queue.enqueue(m)}}peekAll(){return this.queue.peekAll()}size(){return this.queue.size()}finished(){return this.finished$}clear(){this.queue.clear()}moveCharOnPath(E){let S=this.queue.peek();if(!S)return;let A=S.command,I=S.config;if(ys(A)&&(A=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),A)),I.skipInvalidPositions){if(A=this.getNextValidPosition(),!A){this.finishInvalidNextPos(A);return}}else if(!this.isNeighborPos(A)){this.finishInvalidNextPos(A);return}if(this.character.isBlockingDirection(qe(this.character.getNextTilePos().position,A.position))){if(I.pathBlockedStrategy==="STOP")this.finishPathBlocked(A);else if(I.pathBlockedStrategy==="SKIP"){this.queue.dequeue(),this.moveCharOnPath(E);return}else I.pathBlockedStrategy==="WAIT"&&I.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=E,this.pathBlockedWaitElapsed>=I.pathBlockedWaitTimeoutMs&&this.finishBlockedWaitTimeout(A,I.pathBlockedWaitTimeoutMs));return}this.pathBlockedWaitElapsed=0,this.queue.dequeue(),this.character.move(this.getDir(this.character.getNextTilePos().position,A.position)),this.isLastMovement()&&this.finish("SUCCESS","",A)}getNextValidPosition(){for(var E;this.queue.size()>0;){let S=(E=this.queue.peek())==null?void 0:E.command;if(ys(S)&&(S=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),S)),S&&this.isNeighborPos(S))return S;this.queue.dequeue()}}isLastMovement(){return this.queue.size()===0}isNeighborPos(E){let S=this.distanceUtils.distance(this.character.getNextTilePos().position,E.position)===1,A=this.tilemap.getTransition(E.position,this.character.getNextTilePos().layer);if(this.character.getNextTilePos().layer!==E.layer)return S&&A===E.layer;let I=A!==void 0&&A!==E.layer;return S&&!I}finishMovementTerminated(){this.finish("MOVEMENT_TERMINATED","New automatic movement has been set to character.")}finishInvalidNextPos(E){E?this.finish("INVALID_NEXT_POS",`Position ${this.posToStr(E)} is not reachable from ${this.posToStr(this.character.getNextTilePos())}.`):this.finish("INVALID_NEXT_POS",`No enqueued position is reachable from ${this.posToStr(this.character.getNextTilePos())}.`)}finishPathBlocked(E){this.finish("PATH_BLOCKED",`Position ${this.posToStr(E)} is blocked.`)}finishBlockedWaitTimeout(E,S){this.finish("PATH_BLOCKED_WAIT_TIMEOUT",`Position ${this.posToStr(E)} is blocked and the wait timeout of ${S} ms has been exceeded.`)}finish(E,S="",A=this.character.getNextTilePos()){this.queue=new rr,this.finished$.next({position:A.position,result:E,description:S,layer:A.layer})}getDir(E,S){return this.tilemap.fromMapDirection(qe(E,S))}posToStr(E){return`(${E.position.x}, ${E.position.y}, ${E.layer})`}},HT=class{constructor(E=!0){this.isCreatedInternal=!1,E&&console.log(`Using GridEngine v${Zf}`)}getCharLayer(E){var S;this.initGuard();let A=(S=this.gridCharacters)==null?void 0:S.get(E);if(!A)throw this.createCharUnknownErr(E);return A.getTilePos().layer}getTransition(E,S){var A;return this.initGuard(),(A=this.gridTilemap)==null?void 0:A.getTransition(new ut(E),S)}setTransition(E,S,A){var I;return this.initGuard(),(I=this.gridTilemap)==null?void 0:I.setTransition(new ut(E),S,A)}create(E,S){this.isCreatedInternal=!0,this.gridCharacters=new Map;let A=this.setConfigDefaults(S);this.config=A,this.movementStopped$=new oe,this.movementStarted$=new oe,this.directionChanged$=new oe,this.positionChangeStarted$=new oe,this.positionChangeFinished$=new oe,this.queueMovementFinished$=new oe,this.charRemoved$=new oe,this.charAdded$=new oe,this.gridTilemap=new UT(E,this.config.collisionTilePropertyName,this.config.characterCollisionStrategy,this.recordToMap(this.config.collisionGroupRelation),this.config.cacheTileCollisions),this.addCharacters()}recordToMap(E){return E?new Map(Object.entries(E).map(([S,A])=>[S,new Set(A)])):void 0}getPosition(E){var S;this.initGuard();let A=(S=this.gridCharacters)==null?void 0:S.get(E);if(!A)throw this.createCharUnknownErr(E);return A.getTilePos().position}move(E,S){this.moveChar(E,S)}moveRandomly(E,S=0,A=-1){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(E);if(!B)throw this.createCharUnknownErr(E);let b=new IT(B,S,A);B.setMovement(b)}getMovement(E){var S;this.initGuard();let A=(S=this.gridCharacters)==null?void 0:S.get(E);if(!A)throw this.createCharUnknownErr(E);let I=A.getMovement();return I?I.getInfo():{type:"None"}}moveTo(E,S,A){var I;let B=this.assembleMoveToConfig(A);this.initGuard();let b=(I=this.gridCharacters)==null?void 0:I.get(E);if(!b)throw this.createCharUnknownErr(E);if(!this.gridTilemap)throw this.createUninitializedErr();let c=new qf(b,this.gridTilemap,{position:new ut(S),layer:A?.targetLayer||b.getNextTilePos().layer},{distance:0,config:B});return b.setMovement(c),c.finishedObs().pipe(Js(m=>({charId:E,position:m.position,result:m.result,description:m.description,layer:m.layer})))}stopMovement(E){var S;this.initGuard();let A=(S=this.gridCharacters)==null?void 0:S.get(E);if(!A)throw this.createCharUnknownErr(E);A.setMovement(void 0)}setSpeed(E,S){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(E);if(!I)throw this.createCharUnknownErr(E);I.setSpeed(S)}getSpeed(E){var S;this.initGuard();let A=(S=this.gridCharacters)==null?void 0:S.get(E);if(!A)throw this.createCharUnknownErr(E);return A.getSpeed()}collidesWithTiles(E){var S;this.initGuard();let A=(S=this.gridCharacters)==null?void 0:S.get(E);if(!A)throw this.createCharUnknownErr(E);return A.collidesWithTiles()}update(E,S){var A;if(this.isCreatedInternal&&this.gridCharacters)for(let[I,B]of this.gridCharacters)B.update(S);(A=this.gridTilemap)==null||A.invalidateFrameCache()}addCharacter(E){var S,A,I,B,b;if(!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let c={speed:E.speed||4,tilemap:this.gridTilemap,collidesWithTiles:!0,collisionGroups:["geDefault"],ignoreCollisionGroups:[],charLayer:E.charLayer,facingDirection:E.facingDirection,labels:E.labels,numberOfDirections:(S=E.numberOfDirections)!=null?S:this.config.numberOfDirections,tileWidth:E.tileWidth,tileHeight:E.tileHeight};typeof E.collides=="boolean"?E.collides===!1&&(c.collidesWithTiles=!1,c.collisionGroups=[]):E.collides!==void 0&&(E.collides.collidesWithTiles===!1&&(c.collidesWithTiles=!1),E.collides.collisionGroups&&(c.collisionGroups=E.collides.collisionGroups),E.collides.ignoreCollisionGroups&&(c.ignoreCollisionGroups=E.collides.ignoreCollisionGroups),c.ignoreMissingTiles=(I=(A=E.collides)==null?void 0:A.ignoreMissingTiles)!=null?I:!1);let m=new PT(E.id,c);E.startPosition&&m.setTilePosition({position:new ut(E.startPosition),layer:m.getTilePos().layer}),(B=this.gridCharacters)==null||B.set(E.id,m),this.gridTilemap.addCharacter(m);let t=m.getId();m.movementStopped().pipe(ke(this.charRemoved(t))).subscribe(a=>{var v;(v=this.movementStopped$)==null||v.next({charId:t,direction:a})}),m.movementStarted().pipe(ke(this.charRemoved(t))).subscribe(a=>{var v;(v=this.movementStarted$)==null||v.next({charId:t,direction:a})}),m.directionChanged().pipe(ke(this.charRemoved(t))).subscribe(a=>{var v;(v=this.directionChanged$)==null||v.next({charId:t,direction:a})}),m.positionChangeStarted().pipe(ke(this.charRemoved(t))).subscribe(a=>{var v;(v=this.positionChangeStarted$)==null||v.next(re({charId:t},a))}),m.positionChangeFinished().pipe(ke(this.charRemoved(t))).subscribe(a=>{var v;(v=this.positionChangeFinished$)==null||v.next(re({charId:t},a))}),(b=this.charAdded$)==null||b.next(t)}hasCharacter(E){var S;return this.initGuard(),!!((S=this.gridCharacters)!=null&&S.has(E))}removeCharacter(E){var S,A,I,B;if(this.initGuard(),!((S=this.gridCharacters)!=null&&S.get(E)))throw this.createCharUnknownErr(E);(A=this.gridTilemap)==null||A.removeCharacter(E),(I=this.gridCharacters)==null||I.delete(E),(B=this.charRemoved$)==null||B.next(E)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters)for(let E of this.gridCharacters.keys())this.removeCharacter(E)}getAllCharacters(E){if(this.initGuard(),!this.gridCharacters)return[];let S=[...this.gridCharacters.values()];return(E?BT(S,E):S).map(A=>A.getId())}getLabels(E){var S;this.initGuard();let A=(S=this.gridCharacters)==null?void 0:S.get(E);if(!A)throw this.createCharUnknownErr(E);return A.getLabels()}addLabels(E,S){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(E);if(!I)throw this.createCharUnknownErr(E);I.addLabels(S)}removeLabels(E,S){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(E);if(!I)throw this.createCharUnknownErr(E);I.removeLabels(S)}clearLabels(E){var S;this.initGuard();let A=(S=this.gridCharacters)==null?void 0:S.get(E);if(!A)throw this.createCharUnknownErr(E);A.clearLabels()}follow(E,S,A,I){var B,b,c,m,t,a;let v;A===void 0?v={distance:0,closestPointIfBlocked:!1}:typeof A=="number"?(v={distance:A,closestPointIfBlocked:!1},I&&(v.closestPointIfBlocked=!0)):v=A,this.initGuard();let o=(B=this.gridCharacters)==null?void 0:B.get(E),r=(b=this.gridCharacters)==null?void 0:b.get(S);if(!o)throw this.createCharUnknownErr(E);if(!r)throw this.createCharUnknownErr(S);if(!this.gridTilemap)throw this.createUninitializedErr();let n=new DT(o,this.gridTilemap,r,{distance:(c=v.distance)!=null?c:0,noPathFoundStrategy:v.closestPointIfBlocked?"CLOSEST_REACHABLE":"STOP",maxPathLength:(m=v.maxPathLength)!=null?m:1/0,shortestPathAlgorithm:(t=v.algorithm)!=null?t:"BIDIRECTIONAL_SEARCH",ignoreLayers:!!v.ignoreLayers,facingDirection:(a=v.facingDirection)!=null?a:"none"});o.setMovement(n)}isMoving(E){var S;this.initGuard();let A=(S=this.gridCharacters)==null?void 0:S.get(E);if(!A)throw this.createCharUnknownErr(E);return A.isMoving()}getFacingDirection(E){var S;this.initGuard();let A=(S=this.gridCharacters)==null?void 0:S.get(E);if(!A)throw this.createCharUnknownErr(E);return A.getFacingDirection()}getFacingPosition(E){var S;this.initGuard();let A=(S=this.gridCharacters)==null?void 0:S.get(E);if(!A)throw this.createCharUnknownErr(E);let I=A.getFacingPosition();return{x:I.x,y:I.y}}turnTowards(E,S){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(E);if(!I)throw this.createCharUnknownErr(E);return I.turnTowards(S)}getCharactersAt(E,S){if(this.initGuard(),!this.gridTilemap)return[];let A=this.gridTilemap.getCharactersAt(new ut(E),S);return Array.from(A).map(I=>I.getId())}setPosition(E,S,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(E);if(!B)throw this.createCharUnknownErr(E);A||B.setTilePosition({position:new ut(S),layer:B.getTilePos().layer}),B.setTilePosition({position:new ut(S),layer:A})}isBlocked(E,S,A=["geDefault"]){var I,B;this.initGuard();let b=new ut(E);return!!((I=this.gridTilemap)!=null&&I.hasBlockingTile(b,S)||(B=this.gridTilemap)!=null&&B.hasBlockingChar(b,S,A))}isTileBlocked(E,S){var A;return this.initGuard(),!!((A=this.gridTilemap)!=null&&A.hasBlockingTile(new ut(E),S))}getCollisionGroups(E){var S;this.initGuard();let A=(S=this.gridCharacters)==null?void 0:S.get(E);if(!A)throw this.createCharUnknownErr(E);return A.getCollisionGroups()||[]}setCollisionGroups(E,S){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(E);if(!I)throw this.createCharUnknownErr(E);I.setCollisionGroups(S)}getIgnoreCollisionGroups(E){var S;this.initGuard();let A=(S=this.gridCharacters)==null?void 0:S.get(E);if(!A)throw this.createCharUnknownErr(E);return A.getIgnoreCollisionGroups()||[]}setIgnoreCollisionGroups(E,S){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(E);if(!I)throw this.createCharUnknownErr(E);I.setIgnoreCollisionGroups(S)}getTilePosInDirection(E,S,A){if(!this.gridTilemap)throw this.createUninitializedErr();let I=this.gridTilemap.getTilePosInDirection({position:new ut(E),layer:S},A);return{position:I.position.toPosition(),charLayer:I.layer}}findShortestPath(E,S,A={}){if(!this.gridTilemap)throw this.createUninitializedErr();let I=A.shortestPathAlgorithm||"BFS";A.considerCosts&&I!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${I}'. It can only be used with A* algorithm.`);let B=A.pathWidth!==void 0&&A.pathWidth!==1,b=A.pathHeight!==void 0&&A.pathHeight!==1;(B||b)&&I==="JPS"&&console.warn("GridEngine: Pathfinding options 'pathWidth' and 'pathHeight' > 1 cannot be used with algorithm 'JPS'.");let c=new kf(this.gridTilemap).findShortestPath(zt.toInternal(E),zt.toInternal(S),zi(re({},A),{shortestPathAlgorithm:I}));return{path:c.path.map(zt.fromInternal),closestToTarget:c.closestToTarget?zt.fromInternal(c.closestToTarget):void 0,reachedMaxPathLength:!1,steps:c.steps}}steppedOn(E,S,A){return this.positionChangeFinished().pipe(Ui(I=>E.includes(I.charId)&&S.some(B=>B.x===I.enterTile.x&&B.y===I.enterTile.y)&&(A===void 0||A.includes(I.enterLayer))))}characterShifted(){if(!this.charAdded$||!this.charRemoved$)throw this.createUninitializedErr();return this.charAdded$.pipe(Js(E=>({charId:E,action:"ADDED"})),ET(this.charRemoved$.pipe(Js(E=>({charId:E,action:"REMOVED"})))))}movementStarted(){if(!this.movementStarted$)throw this.createUninitializedErr();return this.movementStarted$}movementStopped(){if(!this.movementStopped$)throw this.createUninitializedErr();return this.movementStopped$}directionChanged(){if(!this.directionChanged$)throw this.createUninitializedErr();return this.directionChanged$}positionChangeStarted(){if(!this.positionChangeStarted$)throw this.createUninitializedErr();return this.positionChangeStarted$}positionChangeFinished(){if(!this.positionChangeFinished$)throw this.createUninitializedErr();return this.positionChangeFinished$}getMovementProgress(E){var S;this.initGuard();let A=(S=this.gridCharacters)==null?void 0:S.get(E);if(!A)throw this.createCharUnknownErr(E);return A.getMovementProgress()}rebuildTileCollisionCache(E,S,A,I){var B;(B=this.gridTilemap)==null||B.rebuildTileCollisionCache(new Oo(E,S,A,I))}addQueueMovements(E,S,A){var I,B;this.initGuard();let b=(I=this.gridCharacters)==null?void 0:I.get(E);if(!b)throw this.createCharUnknownErr(E);if(!this.gridTilemap)throw this.createUninitializedErr();let c;((B=b?.getMovement())==null?void 0:B.getInfo().type)==="Queue"?c=b.getMovement():(c=new YT(b,this.gridTilemap),b.setMovement(c),c.finished().pipe(ke(yT(this.charRemoved(E),b.autoMovementSet()))).subscribe(m=>{var t;(t=this.queueMovementFinished$)==null||t.next(re({charId:E},m))})),c.enqueue(S.map(m=>ys(m)?m:{position:new ut(m.position),layer:m.charLayer}),A)}queueMovementFinished(){if(!this.queueMovementFinished$)throw this.createUninitializedErr();return this.queueMovementFinished$}getEnqueuedMovements(E){var S,A;this.initGuard();let I=(S=this.gridCharacters)==null?void 0:S.get(E);if(!I)throw this.createCharUnknownErr(E);return((A=I.getMovement())==null?void 0:A.getInfo().type)==="Queue"?I.getMovement().peekAll().map(B=>({command:ys(B.command)?B.command:zt.fromInternal(B.command),config:B.config})):[]}clearEnqueuedMovements(E){var S,A;this.initGuard();let I=(S=this.gridCharacters)==null?void 0:S.get(E);if(!I)throw this.createCharUnknownErr(E);((A=I.getMovement())==null?void 0:A.getInfo().type)==="Queue"&&I.getMovement().clear()}getTileCost(E,S,A){var I,B;return this.initGuard(),(B=(I=this.gridTilemap)==null?void 0:I.getTileCosts({position:new ut(E),layer:S},A))!=null?B:1}getState(){let E=[];if(this.gridCharacters)for(let[S,A]of this.gridCharacters.entries())E.push({id:S,position:zt.fromInternal(A.getTilePos()),facingDirection:A.getFacingDirection(),speed:A.getSpeed(),labels:A.getLabels(),movementProgress:A.getMovementProgress(),collisionConfig:{collisionGroups:A.getCollisionGroups(),ignoreCollisionGroups:A.getIgnoreCollisionGroups(),collidesWithTiles:A.collidesWithTiles(),ignoreMissingTiles:A.getIgnoreMissingTiles()}});return{characters:E}}setState(E){if(this.gridCharacters)for(let S of E.characters){let A=this.gridCharacters.get(S.id);if(A){let I=A.getTilePos();zt.equal(I,zt.toInternal(S.position))||A.setTilePosition(zt.toInternal(S.position)),A.setSpeed(S.speed),A.turnTowards(S.facingDirection),S.collisionConfig.collisionGroups&&A.setCollisionGroups(S.collisionConfig.collisionGroups),S.collisionConfig.collidesWithTiles!==void 0&&A.setCollidesWithTiles(S.collisionConfig.collidesWithTiles),S.collisionConfig.ignoreMissingTiles!==void 0&&A.setIgnoreMissingTiles(S.collisionConfig.ignoreMissingTiles),A.setMovementProgress(S.movementProgress),A.clearLabels(),A.addLabels(S.labels)}}}charRemoved(E){var S;if(!this.charRemoved$)throw this.createUninitializedErr();return(S=this.charRemoved$)==null?void 0:S.pipe(Ms(1),Ui(A=>A==E))}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var E;(E=this.config)==null||E.characters.forEach(S=>this.addCharacter(S))}moveChar(E,S){var A,I,B;this.initGuard();let b=(A=this.gridCharacters)==null?void 0:A.get(E);if(!b)throw this.createCharUnknownErr(E);if(b.getNumberOfDirections()===4){if(!((I=this.gridTilemap)!=null&&I.isIsometric())&&Zs(S)){console.warn(`GridEngine: Character '${E}' can't be moved '${S}' in 4 direction mode.`);return}else if((B=this.gridTilemap)!=null&&B.isIsometric()&&!Zs(S)){console.warn(`GridEngine: Character '${E}' can't be moved '${S}' in 4 direction isometric mode.`);return}}b.move(S)}createCharUnknownErr(E){return new Error(`Character unknown: ${E}`)}assembleMoveToConfig(E={}){let S=zi(re({},E),{noPathFoundStrategy:"STOP",pathBlockedStrategy:"WAIT"});return E!=null&&E.noPathFoundStrategy&&(Object.values(Hf).includes(E.noPathFoundStrategy)?S.noPathFoundStrategy=E.noPathFoundStrategy:console.warn(`GridEngine: Unknown NoPathFoundStrategy '${E.noPathFoundStrategy}'. Falling back to 'STOP'`)),E!=null&&E.pathBlockedStrategy&&(Object.values(Kf).includes(E.pathBlockedStrategy)?S.pathBlockedStrategy=E.pathBlockedStrategy:console.warn(`GridEngine: Unknown PathBlockedStrategy '${E.pathBlockedStrategy}'. Falling back to 'WAIT'`)),S}setConfigDefaults(E){return re({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",cacheTileCollisions:!1},E)}},KT=class extends jf{constructor(E,S={}){super(E,S),this.jumpCache=new bu}findShortestPathImpl(E,S){return this.jumpCache=new bu,super.findShortestPathImpl(E,S)}getNeighborsInternal(E,S,A){if(!S||E.layer!==S.layer)return this.getNeighbors(E,A).map(b=>({p:b,dist:1}));let I=this.prune(S,E).map(b=>{let c=this.getTransition(b.position,E.layer);return{position:b.position,layer:c||E.layer}}),B=[];for(let b of I){let c=this.jump(E,b,A,1,qe(E.position,b.position));c&&(c.dist=this.distance(E.position,c.p.position),B.push(c))}return B}getForced(E,S){let A=[],{topLeft:I,downLeft:B,top:b,bottom:c,topRight:m,downRight:t}=this.normalizedPositions(E,S),a=qe(E.position,S.position);return Zs(a)?(this.blockOrTrans(E,I)&&(this.addIfNotBlocked(A,S,b),this.addIfNotBlocked(A,S,m),this.blockOrTrans(B,I)&&this.addIfNotBlocked(A,S,I)),this.blockOrTrans(E,B)&&(this.addIfNotBlocked(A,S,c),this.addIfNotBlocked(A,S,t),this.blockOrTrans(I,B)&&this.addIfNotBlocked(A,S,B)),this.blockOrTrans(I,b)&&this.addIfNotBlocked(A,S,b),this.blockOrTrans(B,c)&&this.addIfNotBlocked(A,S,c),this.blockOrTrans(I,m)&&this.addIfNotBlocked(A,S,m),this.blockOrTrans(B,t)&&this.addIfNotBlocked(A,S,t)):((this.blockOrTrans(E,b)||this.blockOrTrans(b,m))&&this.addIfNotBlocked(A,S,m),(this.blockOrTrans(E,c)||this.blockOrTrans(c,t))&&this.addIfNotBlocked(A,S,t),this.blockOrTrans(E,I)&&this.blockOrTrans(E,b)&&(this.addIfNotBlocked(A,S,b),this.addIfNotBlocked(A,S,I)),this.blockOrTrans(E,B)&&this.blockOrTrans(E,c)&&(this.addIfNotBlocked(A,S,c),this.addIfNotBlocked(A,S,B)),this.blockOrTrans(I,b)&&this.blockOrTrans(E,b)&&this.addIfNotBlocked(A,S,b),this.blockOrTrans(B,c)&&this.blockOrTrans(E,c)&&this.addIfNotBlocked(A,S,c)),A}hasForced(E,S){let{topLeft:A,downLeft:I,top:B,bottom:b,topRight:c,downRight:m}=this.normalizedPositions(E,S),t=qe(E.position,S.position);if(Zs(t)){if(this.blockOrTrans(E,A)&&(!this.blockOrTrans(S,B)||!this.blockOrTrans(S,c)||this.blockOrTrans(I,A)&&!this.blockOrTrans(S,A))||this.blockOrTrans(E,I)&&(!this.blockOrTrans(S,b)||!this.blockOrTrans(S,m)||this.blockOrTrans(A,I)&&!this.blockOrTrans(S,I))||this.blockOrTrans(A,B)&&!this.blockOrTrans(S,B)||this.blockOrTrans(I,b)&&!this.blockOrTrans(S,b)||this.blockOrTrans(A,c)&&!this.blockOrTrans(S,c)||this.blockOrTrans(I,m)&&!this.blockOrTrans(S,m))return!0}else if((this.blockOrTrans(E,B)||this.blockOrTrans(B,c))&&!this.blockOrTrans(S,c)||(this.blockOrTrans(E,b)||this.blockOrTrans(b,m))&&!this.blockOrTrans(S,m)||this.blockOrTrans(E,A)&&this.blockOrTrans(E,B)&&(!this.blockOrTrans(S,B)||!this.blockOrTrans(S,A))||this.blockOrTrans(E,I)&&this.blockOrTrans(E,b)&&(!this.blockOrTrans(S,b)||!this.blockOrTrans(S,I))||this.blockOrTrans(A,B)&&this.blockOrTrans(E,B)&&!this.blockOrTrans(S,B)||this.blockOrTrans(I,b)&&this.blockOrTrans(E,b)&&!this.blockOrTrans(S,b))return!0;return!1}prune(E,S){let{top:A,right:I,topRight:B,downRight:b,bottom:c}=this.normalizedPositions(E,S),m=this.getForced(E,S),t=qe(E.position,S.position);return Zs(t)?[A,I,B,b,c,...m]:[I,...m]}jump(E,S,A,I,B){let b=this.jumpCache.get(E,S);if(b!==null)return b;if(this.isBlocking(E,S)&&!(zt.equal(S,A)&&this.options.ignoreBlockedTarget)){this.jumpCache.set(E,S,void 0);return}if(zt.equal(S,A))return this.jumpCache.set(E,S,{p:S,dist:0}),{p:S,dist:0};if(I>=this.maxJumpSize)return this.jumpCache.set(E,S,{p:S,dist:0}),{p:S,dist:0};if(this.getTransition(S.position,E.layer)!==void 0)return this.jumpCache.set(E,S,{p:S,dist:0}),{p:S,dist:0};if(this.hasForced(E,S))return this.jumpCache.set(E,S,{p:S,dist:0}),{p:S,dist:0};if(this.updateClosestToTarget(S,A),B==="up-left"){if(this.jump(S,this.getTilePosInDir(S,"up"),A,I+1,"up")!==void 0)return this.jumpCache.set(E,S,{p:S,dist:0}),{p:S,dist:0};if(this.jump(S,this.getTilePosInDir(S,"left"),A,I+1,"left")!==void 0)return this.jumpCache.set(E,S,{p:S,dist:0}),{p:S,dist:0}}else if(B==="down-left"){if(this.jump(S,this.getTilePosInDir(S,"down"),A,I+1,"down")!==void 0)return this.jumpCache.set(E,S,{p:S,dist:0}),{p:S,dist:0};if(this.jump(S,this.getTilePosInDir(S,"left"),A,I+1,"left")!==void 0)return this.jumpCache.set(E,S,{p:S,dist:0}),{p:S,dist:0}}else if(B==="up-right"){if(this.jump(S,this.getTilePosInDir(S,"up"),A,I+1,"up")!==void 0)return this.jumpCache.set(E,S,{p:S,dist:0}),{p:S,dist:0};if(this.jump(S,this.getTilePosInDir(S,"right"),A,I+1,"right")!==void 0)return this.jumpCache.set(E,S,{p:S,dist:0}),{p:S,dist:0}}else if(B==="down-right"){if(this.jump(S,this.getTilePosInDir(S,"down"),A,I+1,"down")!==void 0)return this.jumpCache.set(E,S,{p:S,dist:0}),{p:S,dist:0};if(this.jump(S,this.getTilePosInDir(S,"right"),A,I+1,"right")!==void 0)return this.jumpCache.set(E,S,{p:S,dist:0}),{p:S,dist:0}}let c=this.jump(S,this.getTilePosInDir(S,B),A,I+1,B);return this.jumpCache.set(E,S,c),c}normalizedPositions(E,S){return E.position.xS.position.x&&E.position.y===S.position.y?{topLeft:{position:new ut(S.position.x+1,S.position.y+1),layer:S.layer},downLeft:{position:new ut(S.position.x+1,S.position.y-1),layer:S.layer},top:{position:new ut(S.position.x,S.position.y+1),layer:S.layer},bottom:{position:new ut(S.position.x,S.position.y-1),layer:S.layer},right:{position:new ut(S.position.x-1,S.position.y),layer:S.layer},topRight:{position:new ut(S.position.x-1,S.position.y+1),layer:S.layer},downRight:{position:new ut(S.position.x-1,S.position.y-1),layer:S.layer}}:E.position.yS.position.y&&E.position.x===S.position.x?{topLeft:{position:new ut(S.position.x-1,S.position.y+1),layer:S.layer},downLeft:{position:new ut(S.position.x+1,S.position.y+1),layer:S.layer},top:{position:new ut(S.position.x-1,S.position.y),layer:S.layer},bottom:{position:new ut(S.position.x+1,S.position.y),layer:S.layer},right:{position:new ut(S.position.x,S.position.y-1),layer:S.layer},topRight:{position:new ut(S.position.x-1,S.position.y-1),layer:S.layer},downRight:{position:new ut(S.position.x+1,S.position.y-1),layer:S.layer}}:E.position.yS.position.x?{topLeft:{position:new ut(S.position.x+1,S.position.y),layer:S.layer},downLeft:{position:new ut(S.position.x,S.position.y-1),layer:S.layer},top:{position:new ut(S.position.x+1,S.position.y+1),layer:S.layer},bottom:{position:new ut(S.position.x-1,S.position.y-1),layer:S.layer},right:{position:new ut(S.position.x-1,S.position.y+1),layer:S.layer},topRight:{position:new ut(S.position.x,S.position.y+1),layer:S.layer},downRight:{position:new ut(S.position.x-1,S.position.y),layer:S.layer}}:E.position.y>S.position.y&&E.position.x(E.SUCCESS="SUCCESS",E.NO_PATH_FOUND_MAX_RETRIES_EXCEEDED="NO_PATH_FOUND_MAX_RETRIES_EXCEEDED",E.PATH_BLOCKED_MAX_RETRIES_EXCEEDED="PATH_BLOCKED_MAX_RETRIES_EXCEEDED",E.PATH_BLOCKED="PATH_BLOCKED",E.NO_PATH_FOUND="NO_PATH_FOUND",E.PATH_BLOCKED_WAIT_TIMEOUT="PATH_BLOCKED_WAIT_TIMEOUT",E.MOVEMENT_TERMINATED="MOVEMENT_TERMINATED",E.MAX_PATH_LENGTH_REACHED="MAX_PATH_LENGTH_REACHED",E))(jT||{}),qf=class{constructor(E,S,A,{config:I,ignoreBlockedTarget:B=!1,distance:b=0}={}){this.character=E,this.tilemap=S,this.targetPos=A,this.shortestPath=[],this.distOffset=0,this.posOnPath=0,this.stopped=!1,this.pathBlockedWaitElapsed=0,this.isPositionAllowed=()=>!0,this.shortestPathAlgorithm="BIDIRECTIONAL_SEARCH",this.maxPathLength=1/0,this.considerCosts=!1,this.ignoredChars=[],this.isBlocking=(t,a)=>t?new $f(this.tilemap,this.getPathfindingOptions()).isBlocking(this.character.getTilePos(),{position:t,layer:a}):!0;var c,m;this.shortestPathAlgorithm=(c=I?.algorithm)!=null?c:this.shortestPathAlgorithm,this.ignoreBlockedTarget=B,this.distance=b,this.noPathFoundStrategy=I?.noPathFoundStrategy||"STOP",this.pathBlockedStrategy=I?.pathBlockedStrategy||"WAIT",this.noPathFoundRetryable=new wu(I?.noPathFoundRetryBackoffMs||200,I?.noPathFoundMaxRetries||-1,()=>{this.stop("NO_PATH_FOUND_MAX_RETRIES_EXCEEDED")}),this.pathBlockedRetryable=new wu(I?.pathBlockedRetryBackoffMs||200,I?.pathBlockedMaxRetries||-1,()=>{this.stop("PATH_BLOCKED_MAX_RETRIES_EXCEEDED")}),I!=null&&I.isPositionAllowedFn&&(this.isPositionAllowed=I.isPositionAllowedFn),I!=null&&I.maxPathLength&&(this.maxPathLength=I.maxPathLength),this.alternativeTargets=I?.alternativeTargets,this.noPathFoundAlternativeTargetsFallbackStrategy=I?.noPathFoundAlternativeTargetsFallbackStrategy,I!=null&&I.considerCosts&&this.shortestPathAlgorithm!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${this.shortestPathAlgorithm}'. It can only be used with A* algorithm.`),this.shortestPathAlgorithm==="JPS"&&(this.character.getTileWidth()>1||this.character.getTileHeight()>1)&&console.warn("GridEngine: Pathfinding algorithm 'JPS' can only be used for characters with 'tileWidth' and 'tileHeight' of 1"),this.considerCosts=I?.considerCosts||!1,this.ignoreLayers=!!(I!=null&&I.ignoreLayers),this.distanceUtils=en.create(E.getNumberOfDirections()),this.pathBlockedWaitTimeoutMs=I?.pathBlockedWaitTimeoutMs||-1,this.ignoredChars=(m=I?.ignoredChars)!=null?m:[],this.finished$=new oe,this.setCharacter(E)}setPathBlockedStrategy(E){this.pathBlockedStrategy=E}getPathBlockedStrategy(){return this.pathBlockedStrategy}setCharacter(E){this.character=E,this.noPathFoundRetryable.reset(),this.pathBlockedRetryable.reset(),this.pathBlockedWaitElapsed=0,this.calcShortestPath(),this.character.autoMovementSet().pipe(Ui(S=>S!==this),Ms(1)).subscribe(()=>{this.stop("MOVEMENT_TERMINATED")})}getPathfindingOptions(){return{shortestPathAlgorithm:this.shortestPathAlgorithm,pathWidth:this.character.getTileWidth(),pathHeight:this.character.getTileHeight(),numberOfDirections:this.character.getNumberOfDirections(),isPositionAllowed:this.isPositionAllowed,collisionGroups:this.character.getCollisionGroups(),ignoredChars:[this.character.getId(),...this.ignoredChars],ignoreTiles:!this.character.collidesWithTiles(),ignoreMapBounds:this.character.getIgnoreMissingTiles(),ignoreBlockedTarget:this.ignoreBlockedTarget,maxPathLength:this.maxPathLength,ignoreLayers:this.ignoreLayers,considerCosts:this.considerCosts,calculateClosestToTarget:!0}}update(E){var S,A,I,B;this.stopped||(this.noPathFound()&&(this.noPathFoundStrategy==="RETRY"?this.noPathFoundRetryable.retry(E,()=>this.calcShortestPath()):this.noPathFoundStrategy==="STOP"&&this.stop("NO_PATH_FOUND")),this.updatePosOnPath(),this.isBlocking((S=this.nextTileOnPath())==null?void 0:S.position,(A=this.character)==null?void 0:A.getNextTilePos().layer)?this.applyPathBlockedStrategy(E):this.pathBlockedWaitElapsed=0,this.hasArrived()?(this.stop("SUCCESS"),this.existsDistToTarget()&&this.turnTowardsTarget()):this.isBlocking((I=this.nextTileOnPath())==null?void 0:I.position,(B=this.character)==null?void 0:B.getNextTilePos().layer)||this.moveCharOnPath())}finishedObs(){return this.finished$}getInfo(){return{type:"Target",state:{pathAhead:this.shortestPath.slice(this.posOnPath).map(E=>zt.fromInternal(E))},config:{algorithm:this.shortestPathAlgorithm,ignoreBlockedTarget:this.ignoreBlockedTarget,distance:this.distance,targetPos:zt.fromInternal(this.targetPos),noPathFoundStrategy:this.noPathFoundStrategy,pathBlockedStrategy:this.pathBlockedStrategy,noPathFoundRetryBackoffMs:this.noPathFoundRetryable.getBackoffMs(),noPathFoundMaxRetries:this.noPathFoundRetryable.getMaxRetries()}}}resultToReason(E){switch(E){case"SUCCESS":return"Successfully arrived.";case"MOVEMENT_TERMINATED":return"Movement of character has been replaced before destination was reached.";case"PATH_BLOCKED":return"PathBlockedStrategy STOP: Path blocked.";case"NO_PATH_FOUND_MAX_RETRIES_EXCEEDED":return`NoPathFoundStrategy RETRY: Maximum retries of ${this.noPathFoundRetryable.getMaxRetries()} exceeded.`;case"NO_PATH_FOUND":return"NoPathFoundStrategy STOP: No path found.";case"PATH_BLOCKED_MAX_RETRIES_EXCEEDED":return`PathBlockedStrategy RETRY: Maximum retries of ${this.pathBlockedRetryable.getMaxRetries()} exceeded.`;case"PATH_BLOCKED_WAIT_TIMEOUT":return`PathBlockedStrategy WAIT: Wait timeout of ${this.pathBlockedWaitTimeoutMs}ms exceeded.`}}applyPathBlockedStrategy(E){this.pathBlockedStrategy==="RETRY"?this.pathBlockedRetryable.retry(E,()=>{let S=this.getShortestPath();S.path.length>0&&this.calcShortestPath(S)}):this.pathBlockedStrategy==="STOP"?this.stop("PATH_BLOCKED"):this.pathBlockedStrategy==="WAIT"&&this.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=E,this.pathBlockedWaitElapsed>=this.pathBlockedWaitTimeoutMs&&this.stop("PATH_BLOCKED_WAIT_TIMEOUT"))}moveCharOnPath(){let E=this.nextTileOnPath();if(!E)return;let S=this.getDir(this.character.getNextTilePos().position,E.position);this.character.move(S)}nextTileOnPath(){return this.shortestPath[this.posOnPath+1]}stop(E){this.finished$.next({position:this.character.getTilePos().position,result:E,description:this.resultToReason(E),layer:this.character.getTilePos().layer}),this.finished$.complete(),this.stopped=!0}turnTowardsTarget(){let E=this.shortestPath[this.posOnPath+1],S=this.getDir(this.character.getNextTilePos().position,E.position);this.character.turnTowards(S)}existsDistToTarget(){return this.posOnPath=this.shortestPath.length-1}updatePosOnPath(){let E=this.shortestPath[this.posOnPath];for(;this.posOnPath0)return{path:b,distOffset:c}}return this.noPathFoundStrategy=this.noPathFoundAlternativeTargetsFallbackStrategy||"STOP",this.getShortestPath()}}return{path:A,distOffset:0}}pathToAlternativeTarget(E,S){let A=S.findShortestPath(this.character.getNextTilePos(),E,this.getPathfindingOptions()).path,I=this.distanceUtils.distance(E.position,this.targetPos.position);return{path:A,distOffset:I}}getDir(E,S){return this.tilemap.fromMapDirection(this.distanceUtils.direction(E,S))}},ZT=Object.create,_f=Object.defineProperty,JT=Object.getOwnPropertyDescriptor,QT=Object.getOwnPropertyNames,kT=Object.getPrototypeOf,qT=Object.prototype.hasOwnProperty,_T=(E,S)=>()=>(S||E((S={exports:{}}).exports,S),S.exports),tS=(E,S,A,I)=>{if(S&&typeof S=="object"||typeof S=="function")for(let B of QT(S))!qT.call(E,B)&&B!==A&&_f(E,B,{get:()=>S[B],enumerable:!(I=JT(S,B))||I.enumerable});return E},Do=(E,S,A)=>(A=E!=null?ZT(kT(E)):{},tS(S||!E||!E.__esModule?_f(A,"default",{value:E,enumerable:!0}):A,E)),Io=_T((E,S)=>{(function(){var A,I="4.17.21",B=200,b="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",m="Invalid `variable` option passed into `_.template`",t="__lodash_hash_undefined__",a=500,v="__lodash_placeholder__",o=1,r=2,n=4,e=1,i=2,h=1,s=2,l=4,f=8,u=16,d=32,p=64,g=128,y=256,x=512,T=30,C="...",M=800,w=16,L=1,F=2,O=3,N=1/0,G=9007199254740991,V=17976931348623157e292,K=NaN,$=4294967295,J=$-1,X=$>>>1,Y=[["ary",g],["bind",h],["bindKey",s],["curry",f],["curryRight",u],["flip",x],["partial",d],["partialRight",p],["rearg",y]],D="[object Arguments]",z="[object Array]",W="[object AsyncFunction]",H="[object Boolean]",Z="[object Date]",Q="[object DOMException]",k="[object Error]",et="[object Function]",st="[object GeneratorFunction]",rt="[object Map]",ot="[object Number]",ft="[object Null]",at="[object Object]",vt="[object Promise]",Pt="[object Proxy]",Ct="[object RegExp]",Et="[object Set]",ct="[object String]",Tt="[object Symbol]",pt="[object Undefined]",Mt="[object WeakMap]",It="[object WeakSet]",Kt="[object ArrayBuffer]",Gt="[object DataView]",Wt="[object Float32Array]",Bt="[object Float64Array]",ie="[object Int8Array]",Zt="[object Int16Array]",le="[object Int32Array]",fe="[object Uint8Array]",Se="[object Uint8ClampedArray]",ei="[object Uint16Array]",ii="[object Uint32Array]",di=/\b__p \+= '';/g,ci=/\b(__p \+=) '' \+/g,vi=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bo=/&(?:amp|lt|gt|quot|#39);/g,No=/[&<>"']/g,vd=RegExp(bo.source),pd=RegExp(No.source),gd=/<%-([\s\S]+?)%>/g,md=/<%([\s\S]+?)%>/g,Go=/<%=([\s\S]+?)%>/g,xd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yd=/^\w*$/,Td=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Br=/[\\^$.*+?()[\]{}|]/g,Sd=RegExp(Br.source),br=/^\s+/,Cd=/\s/,Ed=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Pd=/\{\n\/\* \[wrapped with (.+)\] \*/,Ad=/,? & /,Md=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wd=/[()=,{}\[\]\/\s]/,Rd=/\\(\\)?/g,Fd=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zo=/\w*$/,Ld=/^[-+]0x[0-9a-f]+$/i,Od=/^0b[01]+$/i,Dd=/^\[object .+?Constructor\]$/,Id=/^0o[0-7]+$/i,Bd=/^(?:0|[1-9]\d*)$/,bd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rn=/($^)/,Nd=/['\n\r\u2028\u2029\\]/g,an="\\ud800-\\udfff",Gd="\\u0300-\\u036f",zd="\\ufe20-\\ufe2f",Ud="\\u20d0-\\u20ff",Uo=Gd+zd+Ud,Xo="\\u2700-\\u27bf",Vo="a-z\\xdf-\\xf6\\xf8-\\xff",Xd="\\xac\\xb1\\xd7\\xf7",Vd="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Wd="\\u2000-\\u206f",Yd=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Wo="A-Z\\xc0-\\xd6\\xd8-\\xde",Yo="\\ufe0e\\ufe0f",Ho=Xd+Vd+Wd+Yd,Nr="['’]",Hd="["+an+"]",Ko="["+Ho+"]",on="["+Uo+"]",$o="\\d+",Kd="["+Xo+"]",jo="["+Vo+"]",Zo="[^"+an+Ho+$o+Xo+Vo+Wo+"]",Gr="\\ud83c[\\udffb-\\udfff]",$d="(?:"+on+"|"+Gr+")",Jo="[^"+an+"]",zr="(?:\\ud83c[\\udde6-\\uddff]){2}",Ur="[\\ud800-\\udbff][\\udc00-\\udfff]",rs="["+Wo+"]",Qo="\\u200d",ko="(?:"+jo+"|"+Zo+")",jd="(?:"+rs+"|"+Zo+")",qo="(?:"+Nr+"(?:d|ll|m|re|s|t|ve))?",_o="(?:"+Nr+"(?:D|LL|M|RE|S|T|VE))?",th=$d+"?",eh="["+Yo+"]?",Zd="(?:"+Qo+"(?:"+[Jo,zr,Ur].join("|")+")"+eh+th+")*",Jd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Qd="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ih=eh+th+Zd,kd="(?:"+[Kd,zr,Ur].join("|")+")"+ih,qd="(?:"+[Jo+on+"?",on,zr,Ur,Hd].join("|")+")",_d=RegExp(Nr,"g"),tc=RegExp(on,"g"),Xr=RegExp(Gr+"(?="+Gr+")|"+qd+ih,"g"),ec=RegExp([rs+"?"+jo+"+"+qo+"(?="+[Ko,rs,"$"].join("|")+")",jd+"+"+_o+"(?="+[Ko,rs+ko,"$"].join("|")+")",rs+"?"+ko+"+"+qo,rs+"+"+_o,Qd,Jd,$o,kd].join("|"),"g"),ic=RegExp("["+Qo+an+Uo+Yo+"]"),sc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nc=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rc=-1,se={};se[Wt]=se[Bt]=se[ie]=se[Zt]=se[le]=se[fe]=se[Se]=se[ei]=se[ii]=!0,se[D]=se[z]=se[Kt]=se[H]=se[Gt]=se[Z]=se[k]=se[et]=se[rt]=se[ot]=se[at]=se[Ct]=se[Et]=se[ct]=se[Mt]=!1;var ee={};ee[D]=ee[z]=ee[Kt]=ee[Gt]=ee[H]=ee[Z]=ee[Wt]=ee[Bt]=ee[ie]=ee[Zt]=ee[le]=ee[rt]=ee[ot]=ee[at]=ee[Ct]=ee[Et]=ee[ct]=ee[Tt]=ee[fe]=ee[Se]=ee[ei]=ee[ii]=!0,ee[k]=ee[et]=ee[Mt]=!1;var ac={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},oc={"&":"&","<":"<",">":">",'"':""","'":"'"},hc={"&":"&","<":"<",">":">",""":'"',"'":"'"},lc={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},uc=parseFloat,fc=parseInt,sh=typeof global=="object"&&global&&global.Object===Object&&global,dc=typeof self=="object"&&self&&self.Object===Object&&self,xe=sh||dc||Function("return this")(),Vr=typeof E=="object"&&E&&!E.nodeType&&E,Vi=Vr&&typeof S=="object"&&S&&!S.nodeType&&S,nh=Vi&&Vi.exports===Vr,Wr=nh&&sh.process,Ye=function(){try{var ht=Vi&&Vi.require&&Vi.require("util").types;return ht||Wr&&Wr.binding&&Wr.binding("util")}catch{}}(),rh=Ye&&Ye.isArrayBuffer,ah=Ye&&Ye.isDate,oh=Ye&&Ye.isMap,hh=Ye&&Ye.isRegExp,lh=Ye&&Ye.isSet,uh=Ye&&Ye.isTypedArray;function be(ht,gt,dt){switch(dt.length){case 0:return ht.call(gt);case 1:return ht.call(gt,dt[0]);case 2:return ht.call(gt,dt[0],dt[1]);case 3:return ht.call(gt,dt[0],dt[1],dt[2])}return ht.apply(gt,dt)}function cc(ht,gt,dt,wt){for(var bt=-1,Jt=ht==null?0:ht.length;++bt-1}function Yr(ht,gt,dt){for(var wt=-1,bt=ht==null?0:ht.length;++wt-1;);return dt}function xh(ht,gt){for(var dt=ht.length;dt--&&as(gt,ht[dt],0)>-1;);return dt}function Cc(ht,gt){for(var dt=ht.length,wt=0;dt--;)ht[dt]===gt&&++wt;return wt}var Ec=jr(ac),Pc=jr(oc);function Ac(ht){return"\\"+lc[ht]}function Mc(ht,gt){return ht==null?A:ht[gt]}function os(ht){return ic.test(ht)}function wc(ht){return sc.test(ht)}function Rc(ht){for(var gt,dt=[];!(gt=ht.next()).done;)dt.push(gt.value);return dt}function kr(ht){var gt=-1,dt=Array(ht.size);return ht.forEach(function(wt,bt){dt[++gt]=[bt,wt]}),dt}function yh(ht,gt){return function(dt){return ht(gt(dt))}}function wi(ht,gt){for(var dt=-1,wt=ht.length,bt=0,Jt=[];++dt-1}function pv(P,R){var U=this.__data__,j=An(U,P);return j<0?(++this.size,U.push([P,R])):U[j][1]=R,this}pi.prototype.clear=fv,pi.prototype.delete=dv,pi.prototype.get=cv,pi.prototype.has=vv,pi.prototype.set=pv;function gi(P){var R=-1,U=P==null?0:P.length;for(this.clear();++R=R?P:R)),P}function je(P,R,U,j,q,tt){var it,nt=R&o,lt=R&r,mt=R&n;if(U&&(it=q?U(P,j,q,tt):U(P)),it!==A)return it;if(!ae(P))return P;var xt=Nt(P);if(xt){if(it=yp(P),!nt)return Fe(P,it)}else{var yt=Ae(P),At=yt==et||yt==st;if(Bi(P))return el(P,nt);if(yt==at||yt==D||At&&!q){if(it=lt||At?{}:Tl(P),!nt)return lt?hp(P,Ov(it,P)):op(P,Oh(it,P))}else{if(!ee[yt])return q?P:{};it=Tp(P,yt,nt)}}tt||(tt=new ni);var Rt=tt.get(P);if(Rt)return Rt;tt.set(P,it),Jl(P)?P.forEach(function(Dt){it.add(je(Dt,R,U,Dt,P,tt))}):jl(P)&&P.forEach(function(Dt,Yt){it.set(Yt,je(Dt,R,U,Yt,P,tt))});var Ot=mt?lt?Ea:Ca:lt?Oe:ye,Xt=xt?A:Ot(P);return He(Xt||P,function(Dt,Yt){Xt&&(Yt=Dt,Dt=P[Yt]),Is(it,Yt,je(Dt,R,U,Yt,P,tt))}),it}function Dv(P){var R=ye(P);return function(U){return Dh(U,P,R)}}function Dh(P,R,U){var j=U.length;if(P==null)return!j;for(P=te(P);j--;){var q=U[j],tt=R[q],it=P[q];if(it===A&&!(q in P)||!tt(it))return!1}return!0}function Ih(P,R,U){if(typeof P!="function")throw new Ke(c);return Xs(function(){P.apply(A,U)},R)}function Bs(P,R,U,j){var q=-1,tt=hn,it=!0,nt=P.length,lt=[],mt=R.length;if(!nt)return lt;U&&(R=ne(R,Ne(U))),j?(tt=Yr,it=!1):R.length>=B&&(tt=ws,it=!1,R=new Hi(R));t:for(;++qq?0:q+U),j=j===A||j>q?q:Ut(j),j<0&&(j+=q),j=U>j?0:kl(j);U0&&U(nt)?R>1?Ce(nt,R-1,U,j,q):Mi(q,nt):j||(q[q.length]=nt)}return q}var na=ol(),Nh=ol(!0);function hi(P,R){return P&&na(P,R,ye)}function ra(P,R){return P&&Nh(P,R,ye)}function wn(P,R){return Ai(R,function(U){return Si(P[U])})}function $i(P,R){R=Di(R,P);for(var U=0,j=R.length;P!=null&&UR}function bv(P,R){return P!=null&&kt.call(P,R)}function Nv(P,R){return P!=null&&R in te(P)}function Gv(P,R,U){return P>=Pe(R,U)&&P=120&&xt.length>=120)?new Hi(it&&xt):A}xt=P[0];var yt=-1,At=nt[0];t:for(;++yt-1;)nt!==P&&xn.call(nt,lt,1),xn.call(P,lt,1);return P}function jh(P,R){for(var U=P?R.length:0,j=U-1;U--;){var q=R[U];if(U==j||q!==tt){var tt=q;Ti(q)?xn.call(P,q,1):pa(P,q)}}return P}function da(P,R){return P+Sn(wh()*(R-P+1))}function Qv(P,R,U,j){for(var q=-1,tt=ge(Tn((R-P)/(U||1)),0),it=dt(tt);tt--;)it[j?tt:++q]=P,P+=U;return it}function ca(P,R){var U="";if(!P||R<1||R>G)return U;do R%2&&(U+=P),R=Sn(R/2),R&&(P+=P);while(R);return U}function Vt(P,R){return La(El(P,R,De),P+"")}function kv(P){return Lh(ms(P))}function qv(P,R){var U=ms(P);return zn(U,Ki(R,0,U.length))}function Gs(P,R,U,j){if(!ae(P))return P;R=Di(R,P);for(var q=-1,tt=R.length,it=tt-1,nt=P;nt!=null&&++qq?0:q+R),U=U>q?q:U,U<0&&(U+=q),q=R>U?0:U-R>>>0,R>>>=0;for(var tt=dt(q);++j>>1,it=P[tt];it!==null&&!ze(it)&&(U?it<=R:it=B){var mt=R?null:dp(P);if(mt)return un(mt);it=!1,q=ws,lt=new Hi}else lt=R?[]:nt;t:for(;++j=j?P:Ze(P,R,U)}var tl=Yc||function(P){return xe.clearTimeout(P)};function el(P,R){if(R)return P.slice();var U=P.length,j=Ch?Ch(U):new P.constructor(U);return P.copy(j),j}function ya(P){var R=new P.constructor(P.byteLength);return new gn(R).set(new gn(P)),R}function sp(P,R){var U=R?ya(P.buffer):P.buffer;return new P.constructor(U,P.byteOffset,P.byteLength)}function np(P){var R=new P.constructor(P.source,zo.exec(P));return R.lastIndex=P.lastIndex,R}function rp(P){return Ds?te(Ds.call(P)):{}}function il(P,R){var U=R?ya(P.buffer):P.buffer;return new P.constructor(U,P.byteOffset,P.length)}function sl(P,R){if(P!==R){var U=P!==A,j=P===null,q=P===P,tt=ze(P),it=R!==A,nt=R===null,lt=R===R,mt=ze(R);if(!nt&&!mt&&!tt&&P>R||tt&&it&<&&!nt&&!mt||j&&it&<||!U&<||!q)return 1;if(!j&&!tt&&!mt&&P=nt)return lt;var mt=U[j];return lt*(mt=="desc"?-1:1)}}return P.index-R.index}function nl(P,R,U,j){for(var q=-1,tt=P.length,it=U.length,nt=-1,lt=R.length,mt=ge(tt-it,0),xt=dt(lt+mt),yt=!j;++nt1?U[q-1]:A,it=q>2?U[2]:A;for(tt=P.length>3&&typeof tt=="function"?(q--,tt):A,it&&we(U[0],U[1],it)&&(tt=q<3?A:tt,q=1),R=te(R);++j-1?q[tt?R[it]:it]:A}}function ul(P){return yi(function(R){var U=R.length,j=U,q=$e.prototype.thru;for(P&&R.reverse();j--;){var tt=R[j];if(typeof tt!="function")throw new Ke(c);if(q&&!it&&Nn(tt)=="wrapper")var it=new $e([],!0)}for(j=it?j:U;++j1&&$t.reverse(),xt&<nt))return!1;var mt=tt.get(P),xt=tt.get(R);if(mt&&xt)return mt==R&&xt==P;var yt=-1,At=!0,Rt=U&i?new Hi:A;for(tt.set(P,R),tt.set(R,P);++yt1?"& ":"")+R[j],R=R.join(U>2?", ":" "),P.replace(Ed,`{ + */c.exports={Format:t(27902),Pad:t(41836),RemoveAt:t(33628),Reverse:t(27671),UppercaseFirst:t(35355),UUID:t(45650)}}},F={};function O(c){var m=F[c];if(m!==void 0)return m.exports;var t=F[c]={exports:{}};return E[c](t,t.exports,O),t.exports}O.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var D=O(85454);return D})())})(kf);var $r=kf.exports;const nn=Bf($r);var fT=Object.create,eh=Object.defineProperty,dT=Object.defineProperties,cT=Object.getOwnPropertyDescriptor,vT=Object.getOwnPropertyDescriptors,pT=Object.getOwnPropertyNames,rf=Object.getOwnPropertySymbols,gT=Object.getPrototypeOf,qf=Object.prototype.hasOwnProperty,mT=Object.prototype.propertyIsEnumerable,af=(S,T,E)=>T in S?eh(S,T,{enumerable:!0,configurable:!0,writable:!0,value:E}):S[T]=E,oe=(S,T)=>{for(var E in T||(T={}))qf.call(T,E)&&af(S,E,T[E]);if(rf)for(var E of rf(T))mT.call(T,E)&&af(S,E,T[E]);return S},Ki=(S,T)=>dT(S,vT(T)),Lt=(S,T)=>()=>(T||S((T={exports:{}}).exports,T),T.exports),xT=(S,T,E,F)=>{if(T&&typeof T=="object"||typeof T=="function")for(let O of pT(T))!qf.call(S,O)&&O!==E&&eh(S,O,{get:()=>T[O],enumerable:!(F=cT(T,O))||F.enumerable});return S},_f=(S,T,E)=>(E=S!=null?fT(gT(S)):{},xT(T||!S||!S.__esModule?eh(E,"default",{value:S,enumerable:!0}):E,S)),Zr=Lt(S=>{var T=function(D,c){return Dc?1:0},E=function(D,c){return Dc?-1:0};function F(D){return function(c,m){return D(m,c)}}function O(D){return D===2?function(c,m){return c[0]m[0]?1:c[1]m[1]?1:0}:function(c,m){for(var t=0;tm[t])return 1;t++}return 0}}S.DEFAULT_COMPARATOR=T,S.DEFAULT_REVERSE_COMPARATOR=E,S.reverseComparator=F,S.createTupleComparator=O}),yT=Lt(S=>{S.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",S.SYMBOL_SUPPORT=typeof Symbol<"u"}),ue=Lt((S,T)=>{var E=yT(),F=E.ARRAY_BUFFER_SUPPORT,O=E.SYMBOL_SUPPORT;T.exports=function(D,c){var m,t,o,v,a;if(!D)throw new Error("obliterator/forEach: invalid iterable.");if(typeof c!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(D)||F&&ArrayBuffer.isView(D)||typeof D=="string"||D.toString()==="[object Arguments]"){for(o=0,v=D.length;o{var E=Zr(),F=ue(),O=E.DEFAULT_COMPARATOR,D=E.reverseComparator;function c(i){if(this.clear(),this.comparator=i||O,typeof this.comparator!="function")throw new Error("mnemonist/FibonacciHeap.constructor: given comparator should be a function.")}c.prototype.clear=function(){this.root=null,this.min=null,this.size=0};function m(i){return{item:i,degree:0}}function t(i,h){i.root?(h.right=i.root.right,h.left=i.root,i.root.right.left=h,i.root.right=h):i.root=h}c.prototype.push=function(i){var h=m(i);return h.left=h,h.right=h,t(this,h),(!this.min||this.comparator(h.item,this.min.item)<=0)&&(this.min=h),++this.size},c.prototype.peek=function(){return this.min?this.min.item:void 0};function o(i){for(var h=[],s=i,l=!1;!(s===i&&l);)s===i&&(l=!0),h.push(s),s=s.right;return h}function v(i,h){i.root===h&&(i.root=h.right),h.left.right=h.right,h.right.left=h.left}function a(i,h){i.child?(h.right=i.child.right,h.left=i.child,i.child.right.left=h,i.child.right=h):i.child=h}function r(i,h,s){v(i,h),h.left=h,h.right=h,a(s,h),s.degree++,h.parent=s}function n(i){var h=new Array(i.size),s=o(i.root),l,f,u,d,p,g;for(l=0,f=s.length;l0&&(g=u,u=d,d=g),r(i,d,u),h[p]=null,p++;h[p]=u}for(l=0;l{var T=Math.pow(2,8)-1,E=Math.pow(2,16)-1,F=Math.pow(2,32)-1,O=Math.pow(2,7)-1,D=Math.pow(2,15)-1,c=Math.pow(2,31)-1;S.getPointerArray=function(t){var o=t-1;if(o<=T)return Uint8Array;if(o<=E)return Uint16Array;if(o<=F)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},S.getSignedPointerArray=function(t){var o=t-1;return o<=O?Int8Array:o<=D?Int16Array:o<=c?Int32Array:Float64Array},S.getNumberType=function(t){return t===(t|0)?Math.sign(t)===-1?t<=127&&t>=-128?Int8Array:t<=32767&&t>=-32768?Int16Array:Int32Array:t<=255?Uint8Array:t<=65535?Uint16Array:Uint32Array:Float64Array};var m={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};S.getMinimalRepresentation=function(t,o){var v=null,a=0,r,n,e,i,h;for(i=0,h=t.length;ia&&(a=r,v=n);return v},S.isTypedArray=function(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(t)},S.concat=function(){var t=0,o,v,a;for(o=0,a=arguments.length;o{var T=ue(),E=Ge();function F(m){return Array.isArray(m)||E.isTypedArray(m)}function O(m){if(typeof m.length=="number")return m.length;if(typeof m.size=="number")return m.size}function D(m){var t=O(m),o=typeof t=="number"?new Array(t):[],v=0;return T(m,function(a){o[v++]=a}),o}function c(m){var t=O(m),o=typeof t=="number"?E.getPointerArray(t):Array,v=typeof t=="number"?new Array(t):[],a=typeof t=="number"?new o(t):[],r=0;return T(m,function(n){v[r]=n,a[r]=r++}),[v,a]}S.isArrayLike=F,S.guessLength=O,S.toArray=D,S.toArrayWithIndices=c}),sh=Lt((S,T)=>{var E=ue(),F=Zr(),O=Ke(),D=F.DEFAULT_COMPARATOR,c=F.reverseComparator;function m(f,u,d,p){for(var g=u[p],y,x;p>d;){if(y=p-1>>1,x=u[y],f(g,x)<0){u[p]=x,p=y;continue}break}u[p]=g}function t(f,u,d){for(var p=u.length,g=d,y=u[d],x=2*d+1,C;x=0&&(x=C),u[d]=u[x],d=x,x=2*d+1;u[d]=y,m(f,u,g,d)}function o(f,u,d){u.push(d),m(f,u,0,u.length-1)}function v(f,u){var d=u.pop();if(u.length!==0){var p=u[0];return u[0]=d,t(f,u,0),p}return d}function a(f,u,d){if(u.length===0)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var p=u[0];return u[0]=d,t(f,u,0),p}function r(f,u,d){var p;return u.length!==0&&f(u[0],d)<0&&(p=u[0],u[0]=d,d=p,t(f,u,0)),d}function n(f,u){for(var d=u.length,p=d>>1,g=p;--g>=0;)t(f,u,g)}function e(f,u){for(var d=u.length,p=0,g=new Array(d);p=d.length)return d.slice().sort(f);for(P=d.slice(0,u),n(p,P),g=u,y=d.length;g0&&a(p,P,d[g]);return P.sort(f)}var M=O.guessLength(d);return M!==null&&M0&&a(p,P,w)),g++}),P.length>g&&(P.length=g),P.sort(f)}function h(f,u,d){arguments.length===2&&(d=u,u=f,f=D);var p=c(f),g,y,x,C=-1/0,P;if(u===1){if(O.isArrayLike(d)){for(g=0,y=d.length;g0)&&(C=x);return P=new d.constructor(1),P[0]=C,P}return E(d,function(w){(C===-1/0||f(w,C)>0)&&(C=w)}),[C]}if(O.isArrayLike(d)){if(u>=d.length)return d.slice().sort(p);for(P=d.slice(0,u),n(f,P),g=u,y=d.length;g0&&a(f,P,d[g]);return P.sort(p)}var M=O.guessLength(d);return M!==null&&M0&&a(f,P,w)),g++}),P.length>g&&(P.length=g),P.sort(p)}function s(f){if(this.clear(),this.comparator=f||D,typeof this.comparator!="function")throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}s.prototype.clear=function(){this.items=[],this.size=0},s.prototype.push=function(f){return o(this.comparator,this.items,f),++this.size},s.prototype.peek=function(){return this.items[0]},s.prototype.pop=function(){return this.size!==0&&this.size--,v(this.comparator,this.items)},s.prototype.replace=function(f){return a(this.comparator,this.items,f)},s.prototype.pushpop=function(f){return r(this.comparator,this.items,f)},s.prototype.consume=function(){return this.size=0,e(this.comparator,this.items)},s.prototype.toArray=function(){return e(this.comparator,this.items.slice())},s.prototype.inspect=function(){var f=this.toArray();return Object.defineProperty(f,"constructor",{value:s,enumerable:!1}),f},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect);function l(f){if(this.clear(),this.comparator=f||D,typeof this.comparator!="function")throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=c(this.comparator)}l.prototype=s.prototype,s.from=function(f,u){var d=new s(u),p;return O.isArrayLike(f)?p=f.slice():p=O.toArray(f),n(d.comparator,p),d.items=p,d.size=p.length,d},l.from=function(f,u){var d=new l(u),p;return O.isArrayLike(f)?p=f.slice():p=O.toArray(f),n(d.comparator,p),d.items=p,d.size=p.length,d},s.siftUp=t,s.siftDown=m,s.push=o,s.pop=v,s.replace=a,s.pushpop=r,s.heapify=n,s.consume=e,s.nsmallest=i,s.nlargest=h,s.MinHeap=s,s.MaxHeap=l,T.exports=s}),TT=Lt((S,T)=>{var E="";function F(o,v,a){for(var r=v.length,n=[],e=r,i=-1,h,s=0,l;e--;)i=Math.max(o[v[e]+a],i);for(l=i>>24&&32||i>>16&&24||i>>8&&16||8;s>s&15].push(v[e]);for(h=0;h<16;h++)for(i=n[h].length;i--;)v[++e]=n[h][i]}}function O(o,v,a,r){return o[a]-o[r]||(a%3===2?o[a+1]-o[r+1]||v[a+2]-v[r+2]:v[a+1]-v[r+1])}function D(o,v){var a=[],r=[],n=2*v/3|0,e=v-n,i=n+1>>1,h=n,s=0,l,f=[],u=[];if(v===1)return[0];for(;h--;)a[h]=(h*3>>1)+1;for(h=3;h--;)F(o,a,h);for(s=r[(a[0]/3|0)+(a[0]%3===1?0:i)]=1,h=1;hthis.firstLength&&e>this.firstLength)){for(v=Math.min(this.length-n,this.length-e),r=0;ro.length&&(o=this.text.slice(n,n+v))}return o},t.prototype.toString=function(){return this.array.join(",")},t.prototype.toJSON=function(){return this.array},t.prototype.inspect=function(){for(var o=new Array(this.length),v=0;v{var E=ue();function F(o){this.size=0,this.items=new Map,this.inverse=o}function O(){this.size=0,this.items=new Map,this.inverse=new F(this)}function D(){this.size=0,this.items.clear(),this.inverse.items.clear()}O.prototype.clear=D,F.prototype.clear=D;function c(o,v){if(this.items.has(o)){var a=this.items.get(o);if(a===v)return this;this.inverse.items.delete(a)}if(this.inverse.items.has(v)){var r=this.inverse.items.get(v);if(r===o)return this;this.items.delete(r)}return this.items.set(o,v),this.inverse.items.set(v,o),this.size=this.items.size,this.inverse.size=this.inverse.items.size,this}O.prototype.set=c,F.prototype.set=c;function m(o){if(this.items.has(o)){var v=this.items.get(o);return this.items.delete(o),this.inverse.items.delete(v),this.size=this.items.size,this.inverse.size=this.inverse.items.size,!0}return!1}O.prototype.delete=m,F.prototype.delete=m;var t=["has","get","forEach","keys","values","entries"];t.forEach(function(o){O.prototype[o]=F.prototype[o]=function(){return Map.prototype[o].apply(this.items,arguments)}}),typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.entries,F.prototype[Symbol.iterator]=F.prototype.entries),O.prototype.inspect=function(){var o={left:this.items,right:this.inverse.items};return Object.defineProperty(o,"constructor",{value:O,enumerable:!1}),o},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),F.prototype.inspect=function(){var o={left:this.inverse.items,right:this.items};return Object.defineProperty(o,"constructor",{value:F,enumerable:!1}),o},typeof Symbol<"u"&&(F.prototype[Symbol.for("nodejs.util.inspect.custom")]=F.prototype.inspect),O.from=function(o){var v=new O;return E(o,function(a,r){v.set(r,a)}),v},T.exports=O}),Me=Lt((S,T)=>{function E(F){if(typeof F!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=F}typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=function(){return this}),E.of=function(){var F=arguments,O=F.length,D=0;return new E(function(){return D>=O?{done:!0}:{done:!1,value:F[D++]}})},E.empty=function(){var F=new E(function(){return{done:!0}});return F},E.fromSequence=function(F){var O=0,D=F.length;return new E(function(){return O>=D?{done:!0}:{done:!1,value:F[O++]}})},E.is=function(F){return F instanceof E?!0:typeof F=="object"&&F!==null&&typeof F.next=="function"},T.exports=E}),td=Lt(S=>{function T(c){return c|=c>>1,c|=c>>2,c|=c>>4,c|=c>>8,c|=c>>16,c&~(c>>1)}S.msb32=T;function E(c){return c|=c>>1,c|=c>>2,c|=c>>4,c&~(c>>1)}S.msb8=E,S.test=function(c,m){return c>>m&1},S.criticalBit8=function(c,m){return E(c^m)},S.criticalBit8Mask=function(c,m){return~E(c^m)>>>0&255},S.testCriticalBit8=function(c,m){return 1+(c|m)>>8},S.criticalBit32Mask=function(c,m){return~T(c^m)>>>0&4294967295},S.popcount=function(c){return c-=c>>1&1431655765,c=(c&858993459)+(c>>2&858993459),c=c+(c>>4)&252645135,c+=c>>8,c+=c>>16,c&127};var F=new Uint8Array(Math.pow(2,8));for(O=0,D=F.length;O>8&255]+F[c>>16&255]+F[c>>24&255]}}),CT=Lt((S,T)=>{var E=Me(),F=td();function O(D){this.length=D,this.clear()}O.prototype.clear=function(){this.size=0,this.array=new Uint32Array(Math.ceil(this.length/32))},O.prototype.set=function(D,c){var m=D>>5,t=D&31,o=this.array[m],v;return c===0||c===!1?v=this.array[m]&=~(1<>>0,v>o?this.size++:v>5,m=D&31,t=this.array[c],o;return o=this.array[c]&=~(1<>5,m=D&31,t=this.array[c],o=this.array[c]^=1<>>0,o>t?this.size++:o>5,m=D&31;return this.array[c]>>m&1},O.prototype.test=function(D){return!!this.get(D)},O.prototype.rank=function(D){if(this.size===0)return 0;for(var c=D>>5,m=D&31,t=0,o=0;o=this.length)return-1;for(var c,m=32,t=0,o=0,v=0,a=this.array.length;v>r&1,o===D)return t}},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;for(var m=this.length,t,o,v=32,a=0,r=this.array.length;a>n&1,D.call(c,o,a*32+n)}},O.prototype.values=function(){var D=this.length,c=!1,m,t,o=this.array,v=o.length,a=0,r=-1,n=32;return new E(function e(){if(!c){if(a>=v)return{done:!0};a===v-1&&(n=D%32||32),m=o[a++],c=!0,r=-1}return r++,r>=n?(c=!1,e()):(t=m>>r&1,{value:t})})},O.prototype.entries=function(){var D=this.length,c=!1,m,t,o=this.array,v,a=o.length,r=0,n=-1,e=32;return new E(function i(){if(!c){if(r>=a)return{done:!0};r===a-1&&(e=D%32||32),m=o[r++],c=!0,n=-1}return n++,v=~-r*32+n,n>=e?(c=!1,i()):(t=m>>n&1,{value:[v,t]})})},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.values),O.prototype.inspect=function(){var D=new Uint8Array(this.length);return this.forEach(function(c,m){D[m]=c}),Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),O.prototype.toJSON=function(){return Array.from(this.array)},T.exports=O}),ET=Lt((S,T)=>{var E=Me(),F=td(),O=function(m){return Math.max(1,Math.ceil(m*1.5))};function D(m){return new Uint32Array(Math.ceil(m/32))}function c(m){var t=m||0,o=O;typeof m=="object"&&(t=m.initialLength||m.initialCapacity||0,o=m.policy||o),this.size=0,this.length=t,this.capacity=Math.ceil(this.length/32)*32,this.policy=o,this.array=D(this.capacity)}c.prototype.set=function(m,t){if(this.length>5,v=m&31,a=this.array[o],r;return t===0||t===!1?r=this.array[o]&=~(1<>>0,r>a?this.size++:r>5,o=m&31,v=this.array[t],a;return a=this.array[t]&=~(1<>5,o=m&31,v=this.array[t],a=this.array[t]^=1<>>0,a>v?this.size++:athis.array.length?(this.array=new Uint32Array(v),this.array.set(o,0)):this.array=o.slice(0,v),this.capacity=m,this)},c.prototype.grow=function(m){var t;if(typeof m=="number"){if(this.capacity>=m)return this;for(t=this.capacity;t>5,v=t&31;return this.array[o]|=1<>5,o=m&31;return this.array[t]>>o&1}},c.prototype.get=function(m){if(!(this.length>5,o=m&31;return this.array[t]>>o&1}},c.prototype.test=function(m){return this.length>5,o=m&31,v=0,a=0;a=this.length)return-1;for(var t,o=32,v=0,a=0,r=0,n=this.array.length;r>e&1,a===m)return v}},c.prototype.forEach=function(m,t){t=arguments.length>1?t:this;for(var o=this.length,v,a,r=32,n=0,e=this.array.length;n>i&1,m.call(t,a,n*32+i)}},c.prototype.values=function(){var m=this.length,t=!1,o,v,a=this.array,r=a.length,n=0,e=-1,i=32;return new E(function h(){if(!t){if(n>=r)return{done:!0};n===r-1&&(i=m%32||32),o=a[n++],t=!0,e=-1}return e++,e>=i?(t=!1,h()):(v=o>>e&1,{value:v})})},c.prototype.entries=function(){var m=this.length,t=!1,o,v,a=this.array,r,n=a.length,e=0,i=-1,h=32;return new E(function s(){if(!t){if(e>=n)return{done:!0};e===n-1&&(h=m%32||32),o=a[e++],t=!0,i=-1}return i++,r=~-e*32+i,i>=h?(t=!1,s()):(v=o>>i&1,{value:[r,v]})})},typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=c.prototype.values),c.prototype.inspect=function(){var m=new Uint8Array(this.length);return this.forEach(function(t,o){m[o]=t}),Object.defineProperty(m,"constructor",{value:c,enumerable:!1}),m},typeof Symbol<"u"&&(c.prototype[Symbol.for("nodejs.util.inspect.custom")]=c.prototype.inspect),c.prototype.toJSON=function(){return Array.from(this.array.slice(0,(this.length>>5)+1))},T.exports=c}),PT=Lt((S,T)=>{function E(D,c){return(D&65535)*c+(((D>>>16)*c&65535)<<16)&4294967295}function F(D,c){return(D&65535)+(c>>>16)+(((D>>>16)+c&65535)<<16)&4294967295}function O(D,c){return D<>>32-c}T.exports=function(D,c){var m=3432918353,t=461845907,o=15,v=13,a=5,r=1801774676,n=D,e,i,h;for(i=0,h=c.length-4;i<=h;i+=4)e=c[i]|c[i+1]<<8|c[i+2]<<16|c[i+3]<<24,e=E(e,m),e=O(e,o),e=E(e,t),n^=e,n=O(n,v),n=E(n,a),n=F(n,r);switch(e=0,c.length&3){case 3:e^=c[i+2]<<16;case 2:e^=c[i+1]<<8;case 1:e^=c[i],e=E(e,m),e=O(e,o),e=E(e,t),n^=e}return n^=c.length,n^=n>>>16,n=E(n,2246822507),n^=n>>>13,n=E(n,3266489909),n^=n>>>16,n>>>0}}),AT=Lt((S,T)=>{var E=PT(),F=ue(),O=Math.LN2*Math.LN2,D={errorRate:.005};function c(o){var v=new Uint16Array(o.length),a,r;for(a=0,r=o.length;a>3]|=e}return this},t.prototype.test=function(o){for(var v=c(o),a=0,r=this.hashFunctions;a>3]&1<<(7&n)))return!1}return!0},t.prototype.toJSON=function(){return this.data},t.from=function(o,v){if(!v&&(v=o.length||o.size,typeof v!="number"))throw new Error("BloomFilter.from: could not infer the filter's capacity. Try passing it as second argument.");var a=new t(v);return F(o,function(r){a.add(r)}),a},T.exports=t}),MT=Lt((S,T)=>{var E=ue();function F(O){if(typeof O!="function")throw new Error("mnemonist/BKTree.constructor: given `distance` should be a function.");this.distance=O,this.clear()}F.prototype.add=function(O){if(!this.root)return this.root={item:O,children:{}},this.size++,this;for(var D=this.root,c;c=this.distance(O,D.item),!!D.children[c];)D=D.children[c];return D.children[c]={item:O,children:{}},this.size++,this},F.prototype.search=function(O,D){if(!this.root)return[];for(var c=[],m=[this.root],t,o,v,a,r;m.length;)for(t=m.pop(),v=this.distance(D,t.item),v<=O&&c.push({item:t.item,distance:v}),a=v-O,r=v+O+1;a{var E=Ke(),F=Me();function O(D,c){if(arguments.length<2)throw new Error("mnemonist/fixed-deque: expecting an Array class and a capacity.");if(typeof c!="number"||c<=0)throw new Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=D,this.capacity=c,this.items=new D(this.capacity),this.clear()}O.prototype.clear=function(){this.start=0,this.size=0},O.prototype.push=function(D){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.push: deque capacity ("+this.capacity+") exceeded!");var c=this.start+this.size;return c>=this.capacity&&(c-=this.capacity),this.items[c]=D,++this.size},O.prototype.unshift=function(D){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.unshift: deque capacity ("+this.capacity+") exceeded!");var c=this.start-1;return this.start===0&&(c=this.capacity-1),this.items[c]=D,this.start=c,++this.size},O.prototype.pop=function(){if(this.size!==0){this.size--;var D=this.start+this.size;return D>=this.capacity&&(D-=this.capacity),this.items[D]}},O.prototype.shift=function(){if(this.size!==0){var D=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[D]}},O.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},O.prototype.peekLast=function(){if(this.size!==0){var D=this.start+this.size-1;return D>=this.capacity&&(D-=this.capacity),this.items[D]}},O.prototype.get=function(D){if(!(this.size===0||D>=this.capacity))return D=this.start+D,D>=this.capacity&&(D-=this.capacity),this.items[D]},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;for(var m=this.capacity,t=this.size,o=this.start,v=0;v=m)return{done:!0};var v=D[t];return t++,o++,t===c&&(t=0),{value:v,done:!1}})},O.prototype.entries=function(){var D=this.items,c=this.capacity,m=this.size,t=this.start,o=0;return new F(function(){if(o>=m)return{done:!0};var v=D[t];return t++,t===c&&(t=0),{value:[o++,v],done:!1}})},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.values),O.prototype.inspect=function(){var D=this.toArray();return D.type=this.ArrayClass.name,D.capacity=this.capacity,Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),O.from=function(D,c,m){if(arguments.length<3&&(m=E.guessLength(D),typeof m!="number"))throw new Error("mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.");var t=new O(c,m);if(E.isArrayLike(D)){var o,v;for(o=0,v=D.length;o{var E=Ke(),F=ed();function O(c,m){if(arguments.length<2)throw new Error("mnemonist/circular-buffer: expecting an Array class and a capacity.");if(typeof m!="number"||m<=0)throw new Error("mnemonist/circular-buffer: `capacity` should be a positive number.");this.ArrayClass=c,this.capacity=m,this.items=new c(this.capacity),this.clear()}function D(c){O.prototype[c]=F.prototype[c]}Object.keys(F.prototype).forEach(D),typeof Symbol<"u"&&Object.getOwnPropertySymbols(F.prototype).forEach(D),O.prototype.push=function(c){var m=this.start+this.size;return m>=this.capacity&&(m-=this.capacity),this.items[m]=c,this.size===this.capacity?(m++,m>=this.capacity?this.start=0:this.start=m,this.size):++this.size},O.prototype.unshift=function(c){var m=this.start-1;return this.start===0&&(m=this.capacity-1),this.items[m]=c,this.size===this.capacity?(this.start=m,this.size):(this.start=m,++this.size)},O.from=function(c,m,t){if(arguments.length<3&&(t=E.guessLength(c),typeof t!="number"))throw new Error("mnemonist/circular-buffer.from: could not guess iterable length. Please provide desired capacity as last argument.");var o=new O(m,t);if(E.isArrayLike(c)){var v,a;for(v=0,a=c.length;v{function E(F){if(typeof F!="function")throw new Error("mnemonist/DefaultMap.constructor: expecting a function.");this.items=new Map,this.factory=F,this.size=0}E.prototype.clear=function(){this.items.clear(),this.size=0},E.prototype.get=function(F){var O=this.items.get(F);return typeof O>"u"&&(O=this.factory(F,this.size),this.items.set(F,O),this.size++),O},E.prototype.peek=function(F){return this.items.get(F)},E.prototype.set=function(F,O){return this.items.set(F,O),this.size=this.items.size,this},E.prototype.has=function(F){return this.items.has(F)},E.prototype.delete=function(F){var O=this.items.delete(F);return this.size=this.items.size,O},E.prototype.forEach=function(F,O){O=arguments.length>1?O:this,this.items.forEach(F,O)},E.prototype.entries=function(){return this.items.entries()},E.prototype.keys=function(){return this.items.keys()},E.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.entries),E.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.autoIncrement=function(){var F=0;return function(){return F++}},T.exports=E}),FT=Lt((S,T)=>{function E(F){if(typeof F!="function")throw new Error("mnemonist/DefaultWeakMap.constructor: expecting a function.");this.items=new WeakMap,this.factory=F}E.prototype.clear=function(){this.items=new WeakMap},E.prototype.get=function(F){var O=this.items.get(F);return typeof O>"u"&&(O=this.factory(F),this.items.set(F,O)),O},E.prototype.peek=function(F){return this.items.get(F)},E.prototype.set=function(F,O){return this.items.set(F,O),this},E.prototype.has=function(F){return this.items.has(F)},E.prototype.delete=function(F){return this.items.delete(F)},E.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),T.exports=E}),LT=Lt((S,T)=>{var E=Ge();function F(O){var D=E.getPointerArray(O),c=E.getPointerArray(Math.log2(O));this.size=O,this.dimension=O,this.parents=new D(O),this.ranks=new c(O);for(var m=0;mo?this.parents[m]=c:(this.parents[m]=c,this.ranks[c]++),this},F.prototype.connected=function(O,D){var c=this.find(O);return c===this.find(D)},F.prototype.mapping=function(){for(var O=E.getPointerArray(this.dimension),D={},c=new O(this.size),m=0,t,o=0,v=this.parents.length;o"u"?(c[o]=m,D[t]=m++):c[o]=D[t];return c},F.prototype.compile=function(){for(var O={},D=new Array(this.dimension),c=0,m,t=0,o=this.parents.length;t"u"?(D[c]=[t],O[m]=c++):D[O[m]].push(t);return D},F.prototype.inspect=function(){var O=this.compile();return Object.defineProperty(O,"constructor",{value:F,enumerable:!1}),O},typeof Symbol<"u"&&(F.prototype[Symbol.for("nodejs.util.inspect.custom")]=F.prototype.inspect),T.exports=F}),nh=Lt((S,T)=>{var E=Zr(),F=sh(),O=E.DEFAULT_COMPARATOR,D=E.reverseComparator;function c(o,v,a,r){for(var n=a,e=r,i=v[r],h=2*r+1,s;h=0&&(h=s),v[r]=v[h],r=h,h=2*r+1;v[r]=i,F.siftDown(o,v,e,r)}function m(o,v,a,r){for(var n=r,e=n,i=new o(r),h,s;e>0;)h=a[--e],e!==0&&(s=a[0],a[0]=h,c(v,a,--r,0),h=s),i[e]=h;return i}function t(o,v,a){if(arguments.length===2&&(a=v,v=null),this.ArrayClass=o,this.capacity=a,this.items=new o(a),this.clear(),this.comparator=v||O,typeof a!="number"&&a<=0)throw new Error("mnemonist/FixedReverseHeap.constructor: capacity should be a number > 0.");if(typeof this.comparator!="function")throw new Error("mnemonist/FixedReverseHeap.constructor: given comparator should be a function.");this.comparator=D(this.comparator)}t.prototype.clear=function(){this.size=0},t.prototype.push=function(o){return this.size0&&F.replace(this.comparator,this.items,o),this.size},t.prototype.peek=function(){return this.items[0]},t.prototype.consume=function(){var o=m(this.ArrayClass,this.comparator,this.items,this.size);return this.size=0,o},t.prototype.toArray=function(){return m(this.ArrayClass,this.comparator,this.items.slice(0,this.size),this.size)},t.prototype.inspect=function(){var o=this.toArray();return Object.defineProperty(o,"constructor",{value:t,enumerable:!1}),o},typeof Symbol<"u"&&(t.prototype[Symbol.for("nodejs.util.inspect.custom")]=t.prototype.inspect),T.exports=t}),OT=Lt((S,T)=>{var E=ue(),F=function(D){return D};function O(D){if(this.items=new Map,this.clear(),Array.isArray(D)?(this.writeHashFunction=D[0],this.readHashFunction=D[1]):(this.writeHashFunction=D,this.readHashFunction=D),this.writeHashFunction||(this.writeHashFunction=F),this.readHashFunction||(this.readHashFunction=F),typeof this.writeHashFunction!="function")throw new Error("mnemonist/FuzzyMap.constructor: invalid hash function given.");if(typeof this.readHashFunction!="function")throw new Error("mnemonist/FuzzyMap.constructor: invalid hash function given.")}O.prototype.clear=function(){this.items.clear(),this.size=0},O.prototype.add=function(D){var c=this.writeHashFunction(D);return this.items.set(c,D),this.size=this.items.size,this},O.prototype.set=function(D,c){return D=this.writeHashFunction(D),this.items.set(D,c),this.size=this.items.size,this},O.prototype.get=function(D){return D=this.readHashFunction(D),this.items.get(D)},O.prototype.has=function(D){return D=this.readHashFunction(D),this.items.has(D)},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this,this.items.forEach(function(m){D.call(c,m,m)})},O.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.values),O.prototype.inspect=function(){var D=Array.from(this.items.values());return Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),O.from=function(D,c,m){var t=new O(c);return E(D,function(o,v){m?t.set(v,o):t.add(o)}),t},T.exports=O}),id=Lt((S,T)=>{var E=Me(),F=ue();function O(D){this.Container=D||Array,this.items=new Map,this.clear(),Object.defineProperty(this.items,"constructor",{value:O,enumerable:!1})}O.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},O.prototype.set=function(D,c){var m=this.items.get(D),t;return m||(this.dimension++,m=new this.Container,this.items.set(D,m)),this.Container===Set?(t=m.size,m.add(c),t"u"?0:this.Container===Set?c.size:c.length},O.prototype.count=O.prototype.multiplicity,O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;var m;function t(o){D.call(c,o,m)}this.items.forEach(function(o,v){m=v,o.forEach(t)})},O.prototype.forEachAssociation=function(D,c){c=arguments.length>1?c:this,this.items.forEach(D,c)},O.prototype.keys=function(){return this.items.keys()},O.prototype.values=function(){var D=this.items.values(),c=!1,m,t,o,v;return this.Container===Set?new E(function a(){if(!c){if(t=D.next(),t.done)return{done:!0};c=!0,m=t.value.values()}return t=m.next(),t.done?(c=!1,a()):{done:!1,value:t.value}}):new E(function a(){if(!c){if(t=D.next(),t.done)return{done:!0};c=!0,m=t.value,o=0,v=m.length}return o>=v?(c=!1,a()):{done:!1,value:m[o++]}})},O.prototype.entries=function(){var D=this.items.entries(),c=!1,m,t,o,v,a;return this.Container===Set?new E(function r(){if(!c){if(t=D.next(),t.done)return{done:!0};c=!0,o=t.value[0],m=t.value[1].values()}return t=m.next(),t.done?(c=!1,r()):{done:!1,value:[o,t.value]}}):new E(function r(){if(!c){if(t=D.next(),t.done)return{done:!0};c=!0,o=t.value[0],m=t.value[1],v=0,a=m.length}return v>=a?(c=!1,r()):{done:!1,value:[o,m[v++]]}})},O.prototype.containers=function(){return this.items.values()},O.prototype.associations=function(){return this.items.entries()},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.entries),O.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),O.prototype.toJSON=function(){return this.items},O.from=function(D,c){var m=new O(c);return F(D,function(t,o){m.set(o,t)}),m},T.exports=O}),DT=Lt((S,T)=>{var E=id(),F=ue(),O=function(c){return c};function D(c,m){if(this.items=new E(m),this.clear(),Array.isArray(c)?(this.writeHashFunction=c[0],this.readHashFunction=c[1]):(this.writeHashFunction=c,this.readHashFunction=c),this.writeHashFunction||(this.writeHashFunction=O),this.readHashFunction||(this.readHashFunction=O),typeof this.writeHashFunction!="function")throw new Error("mnemonist/FuzzyMultiMap.constructor: invalid hash function given.");if(typeof this.readHashFunction!="function")throw new Error("mnemonist/FuzzyMultiMap.constructor: invalid hash function given.")}D.prototype.clear=function(){this.items.clear(),this.size=0,this.dimension=0},D.prototype.add=function(c){var m=this.writeHashFunction(c);return this.items.set(m,c),this.size=this.items.size,this.dimension=this.items.dimension,this},D.prototype.set=function(c,m){return c=this.writeHashFunction(c),this.items.set(c,m),this.size=this.items.size,this.dimension=this.items.dimension,this},D.prototype.get=function(c){return c=this.readHashFunction(c),this.items.get(c)},D.prototype.has=function(c){return c=this.readHashFunction(c),this.items.has(c)},D.prototype.forEach=function(c,m){m=arguments.length>1?m:this,this.items.forEach(function(t){c.call(m,t,t)})},D.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(D.prototype[Symbol.iterator]=D.prototype.values),D.prototype.inspect=function(){var c=Array.from(this);return Object.defineProperty(c,"constructor",{value:D,enumerable:!1}),c},typeof Symbol<"u"&&(D.prototype[Symbol.for("nodejs.util.inspect.custom")]=D.prototype.inspect),D.from=function(c,m,t,o){arguments.length===3&&typeof t=="boolean"&&(o=t,t=Array);var v=new D(m,t);return F(c,function(a,r){o?v.set(r,a):v.add(a)}),v},T.exports=D}),IT=Lt((S,T)=>{var E=1024;function F(D){return(D&D-1)===0}function O(D,c){if(arguments.length<1)throw new Error("mnemonist/hashed-array-tree: expecting at least a byte array constructor.");var m=c||0,t=E,o=0;if(typeof c=="object"&&(m=c.initialCapacity||0,o=c.initialLength||0,t=c.blockSize||E),!t||!F(t))throw new Error("mnemonist/hashed-array-tree: block size should be a power of two.");var v=Math.max(o,m),a=Math.ceil(v/t);this.ArrayClass=D,this.length=o,this.capacity=a*t,this.blockSize=t,this.offsetMask=t-1,this.blockMask=Math.log2(t),this.blocks=new Array(a);for(var r=0;r>this.blockMask,t=D&this.offsetMask;return this.blocks[m][t]=c,this},O.prototype.get=function(D){if(!(this.length>this.blockMask,m=D&this.offsetMask;return this.blocks[c][m]}},O.prototype.grow=function(D){if(typeof D!="number"&&(D=this.capacity+this.blockSize),this.capacity>=D)return this;for(;this.capacity>this.blockMask,t=c&this.offsetMask;return this.blocks[m][t]=D,++this.length},O.prototype.pop=function(){if(this.length!==0){var D=this.blocks[this.blocks.length-1],c=--this.length&this.offsetMask;return D[c]}},O.prototype.inspect=function(){for(var D=new this.ArrayClass(this.length),c,m=0,t=this.length;m>this.blockMask,D[m]=this.blocks[c][m&this.offsetMask];return D.type=this.ArrayClass.name,D.items=this.length,D.capacity=this.capacity,D.blockSize=this.blockSize,Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),T.exports=O}),sd=Lt((S,T)=>{var E=Me(),F=Ke();function O(D,c){if(arguments.length<2)throw new Error("mnemonist/fixed-stack: expecting an Array class and a capacity.");if(typeof c!="number"||c<=0)throw new Error("mnemonist/fixed-stack: `capacity` should be a positive number.");this.capacity=c,this.ArrayClass=D,this.items=new this.ArrayClass(this.capacity),this.clear()}O.prototype.clear=function(){this.size=0},O.prototype.push=function(D){if(this.size===this.capacity)throw new Error("mnemonist/fixed-stack.push: stack capacity ("+this.capacity+") exceeded!");return this.items[this.size++]=D,this.size},O.prototype.pop=function(){if(this.size!==0)return this.items[--this.size]},O.prototype.peek=function(){return this.items[this.size-1]},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;for(var m=0,t=this.items.length;m=c)return{done:!0};var t=D[c-m-1];return m++,{value:t,done:!1}})},O.prototype.entries=function(){var D=this.items,c=this.size,m=0;return new E(function(){if(m>=c)return{done:!0};var t=D[c-m-1];return{value:[m++,t],done:!1}})},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.values),O.prototype.toString=function(){return this.toArray().join(",")},O.prototype.toJSON=function(){return this.toArray()},O.prototype.inspect=function(){var D=this.toArray();return D.type=this.ArrayClass.name,D.capacity=this.capacity,Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),O.from=function(D,c,m){if(arguments.length<3&&(m=F.guessLength(D),typeof m!="number"))throw new Error("mnemonist/fixed-stack.from: could not guess iterable length. Please provide desired capacity as last argument.");var t=new O(c,m);if(F.isArrayLike(D)){var o,v;for(o=0,v=D.length;o{var E=Ke(),F=Ge(),O=sd();function D(m,t,o,v,a,r,n,e){var i=n+(e-n)/2|0,h=~-i,s=-~i,l=o[i];v[r]=l+1;var f=t?t(m[l]):m[l][1],u=r*2+1,d=r*2+2,p=-1/0,g=-1/0;n<=h&&(p=D(m,t,o,v,a,u,n,h)),s<=e&&(g=D(m,t,o,v,a,d,s,e));var y=Math.max(f,p,g),x=l;return y===p?x=a[v[u]-1]:y===g&&(x=a[v[d]-1]),a[l]=x,y}function c(m,t){this.size=m.length,this.intervals=m;var o=null,v=null;Array.isArray(t)&&(o=t[0],v=t[1]);var a=m.length,r=F.getPointerArray(a+1),n=new r(a),e;for(e=1;eu?1:0});var i=Math.ceil(Math.log2(a+1)),h=Math.pow(2,i)-1,s=new r(h),l=new r(a);D(m,v,n,s,l,0,0,a-1),n=null,this.height=i,this.tree=s,this.augmentations=l,this.startGetter=o,this.endGetter=v,this.stack=new O(r,this.height)}c.prototype.intervalsContainingPoint=function(m){var t=[],o=this.stack;o.clear(),o.push(0);for(var v=this.tree.length,a,r,n,e,i,h,s,l,f;o.size;)a=o.pop(),r=this.tree[a]-1,n=this.intervals[r],e=this.intervals[this.augmentations[r]],s=this.endGetter?this.endGetter(e):e[1],!(m>s)&&(l=a*2+1,l=i&&m<=h&&t.push(n),!(mf)&&(u=n*2+1,u=s&&t<=l&&v.push(i),!(o{S.search=function(T,E,F,O){var D=0;F=typeof F<"u"?F:0,O=typeof O<"u"?O:T.length,O--;for(var c;F<=O;)if(D=F+O>>>1,c=T[D],c>E)O=~-D;else if(c>>1,m=T(E[O],F),m>0)c=~-O;else if(m<0)D=-~O;else return O;return-1},S.lowerBound=function(T,E,F,O){var D=0;for(F=typeof F<"u"?F:0,O=typeof O<"u"?O:T.length;F>>1,E<=T[D]?O=D:F=-~D;return F},S.lowerBoundWithComparator=function(T,E,F){for(var O=0,D=0,c=E.length;D>>1,T(F,E[O])<=0?c=O:D=-~O;return D},S.lowerBoundIndices=function(T,E,F,O,D){var c=0;for(O=typeof O<"u"?O:0,D=typeof D<"u"?D:T.length;O>>1,F<=T[E[c]]?D=c:O=-~c;return O},S.upperBound=function(T,E,F,O){var D=0;for(F=typeof F<"u"?F:0,O=typeof O<"u"?O:T.length;F>>1,E>=T[D]?F=-~D:O=D;return F},S.upperBoundWithComparator=function(T,E,F){for(var O=0,D=0,c=E.length;D>>1,T(F,E[O])>=0?D=-~O:c=O;return D}}),bT=Lt(S=>{var T=Ge(),E=Ke().isArrayLike,F=nd(),O=ih();function D(o,v){if(o.length===0)return v.slice();if(v.length===0)return o.slice();var a;o[0]>v[0]&&(a=o,o=v,v=a);var r=o[o.length-1],n=v[0];if(r<=n)return T.isTypedArray(o)?T.concat(o,v):o.concat(v);var e=new o.constructor(o.length+v.length),i,h,s;for(i=0,h=o.length;iv[0]&&(a=o,o=v,v=a);var r=o[o.length-1],n=v[0];if(rv[0]&&(a=o,o=v,v=a);var r=o[o.length-1],n=v[0];if(ru?s=F.lowerBound(v,f,s+1):(e.push(f),i++,s++);return e};function m(o){var v=0,a=-1/0,r,n,e,i=[];for(n=0,e=o.length;na&&(a=r));if(i.length===0)return new o[0].constructor(0);if(i.length===1)return i[0].slice();if(i.length===2)return D(i[0],i[1]);o=i;var h=new o[0].constructor(v),s=T.getPointerArray(a),l=new s(o.length),f=new O(function(p,g){return p=o[p][l[p]],g=o[g][l[g]],pg?1:0});for(n=0;nv&&(v=a));if(e.length===0)return new o[0].constructor(0);if(e.length===1)return e[0].slice();if(e.length===2)return c(e[0],e[1]);o=e;var i=new o[0].constructor,h=T.getPointerArray(v),s=new h(o.length),l=new O(function(d,p){return d=o[d][s[d]],p=o[p][s[p]],dp?1:0});for(r=0;rv&&(v=r),na)return[];if(v===a)return[v];var s,l,f=o[0],u,d,p,g,y,x,C=v;for(i=1;ix?d=F.lowerBound(l,y,d+1):(f.push(y),u++,d++);if(f.length===0)return f;C=f[0]}return f},S.merge=function(){if(arguments.length===2){if(E(arguments[0]))return D(arguments[0],arguments[1])}else if(E(arguments[0]))return m(arguments);return null},S.unionUnique=function(){if(arguments.length===2){if(E(arguments[0]))return c(arguments[0],arguments[1])}else if(E(arguments[0]))return t(arguments);return null},S.intersectionUnique=function(){if(arguments.length===2){if(E(arguments[0]))return S.intersectionUniqueArrays(arguments[0],arguments[1])}else if(E(arguments[0]))return S.kWayIntersectionUniqueArrays(arguments);return null}}),NT=Lt((S,T)=>{var E=Me(),F=ue(),O=bT();function D(m){return m}function c(m){if(this.clear(),Array.isArray(m)?(this.documentTokenizer=m[0],this.queryTokenizer=m[1]):(this.documentTokenizer=m,this.queryTokenizer=m),this.documentTokenizer||(this.documentTokenizer=D),this.queryTokenizer||(this.queryTokenizer=D),typeof this.documentTokenizer!="function")throw new Error("mnemonist/InvertedIndex.constructor: document tokenizer is not a function.");if(typeof this.queryTokenizer!="function")throw new Error("mnemonist/InvertedIndex.constructor: query tokenizer is not a function.")}c.prototype.clear=function(){this.items=[],this.mapping=new Map,this.size=0,this.dimension=0},c.prototype.add=function(m){this.size++;var t=this.items.length;this.items.push(m);var o=this.documentTokenizer(m);if(!Array.isArray(o))throw new Error("mnemonist/InvertedIndex.add: tokenizer function should return an array of tokens.");for(var v=new Set,a,r,n=0,e=o.length;n"u"||o.length===0)return[];if(t.length>1)for(a=1,r=t.length;a"u"||v.length===0)return[];o=O.intersectionUniqueArrays(o,v)}var n=new Array(o.length);for(a=0,r=n.length;a1?t:this;for(var o=0,v=this.documents.length;o=t)return{done:!0};var v=m[o++];return{value:v,done:!1}})},c.prototype.tokens=function(){return this.mapping.keys()},typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=c.prototype.documents),c.prototype.inspect=function(){var m=this.items.slice();return Object.defineProperty(m,"constructor",{value:c,enumerable:!1}),m},typeof Symbol<"u"&&(c.prototype[Symbol.for("nodejs.util.inspect.custom")]=c.prototype.inspect),c.from=function(m,t){var o=new c(t);return F(m,function(v){o.add(v)}),o},T.exports=c}),rd=Lt(S=>{var T=new Float64Array(64),E=new Float64Array(64);function F(D,c,m){var t,o,v,a,r;for(T[0]=c,E[0]=m,o=0;o>=0;)if(v=T[o],a=E[o]-1,v=t&&vE[o-1]-T[o-1]&&(r=T[o],T[o]=T[o-1],T[o-1]=r,r=E[o],E[o]=E[o-1],E[o-1]=r)}else o--;return D}S.inplaceQuickSort=F;function O(D,c,m,t){var o,v,a,r,n,e;for(T[0]=m,E[0]=t,v=0;v>=0;)if(a=T[v],r=E[v]-1,a=o&&aE[v-1]-T[v-1]&&(e=T[v],T[v]=T[v-1],T[v-1]=e,e=E[v],E[v]=E[v-1],E[v-1]=e)}else v--;return c}S.inplaceQuickSortIndices=O}),GT=Lt((S,T)=>{var E=Ke(),F=Ge(),O=Zr().createTupleComparator,D=nh(),c=rd().inplaceQuickSortIndices;function m(n,e,i,h){var s,l=0,f;for(s=0;s>>1),P=i[C],f[L]=P,y>-1&&(x===0?u[y]=L+1:d[y]=L+1),I=(I+1)%n,C!==M&&C!==w-1&&p.push([I,C+1,w,L,1]),C!==M&&p.push([I,M,C,L,0]),L++;return{axes:e,labels:h,pivots:f,lefts:u,rights:d}}function v(n,e){this.dimensions=n,this.visited=0,this.axes=e.axes,this.labels=e.labels,this.pivots=e.pivots,this.lefts=e.lefts,this.rights=e.rights,this.size=this.labels.length}v.prototype.nearestNeighbor=function(n){var e=1/0,i=null,h=this.dimensions,s=this.axes,l=this.pivots,f=this.lefts,u=this.rights,d=0;function p(g,y){d++;var x=f[y],C=u[y],P=l[y],M=m(h,s,P,n);if(!(M0?x!==0&&p(g,x-1):C!==0&&p(g,C-1),w*w0?C!==0&&p(g,C-1):x!==0&&p(g,x-1))}}return p(0,0),this.visited=d,this.labels[i]};var a=O(3),r=O(2);v.prototype.kNearestNeighbors=function(n,e){if(n<=0)throw new Error("mnemonist/kd-tree.kNearestNeighbors: k should be a positive number.");if(n=Math.min(n,this.size),n===1)return[this.nearestNeighbor(e)];var i=new D(Array,a,n),h=this.dimensions,s=this.axes,l=this.pivots,f=this.lefts,u=this.rights,d=0;function p(x,C){var P=f[C],M=u[C],w=l[C],I=m(h,s,w,e);i.push([I,d++,w]);var L=e[x],B=s[x][w],N=L-B;x=(x+1)%h,L{var E=Me(),F=ue();function O(){this.clear()}O.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},O.prototype.first=function(){return this.head?this.head.item:void 0},O.prototype.peek=O.prototype.first,O.prototype.last=function(){return this.tail?this.tail.item:void 0},O.prototype.push=function(D){var c={item:D,next:null};return this.head?(this.tail.next=c,this.tail=c):(this.head=c,this.tail=c),this.size++,this.size},O.prototype.unshift=function(D){var c={item:D,next:null};return this.head?(this.head.next||(this.tail=this.head),c.next=this.head,this.head=c):(this.head=c,this.tail=c),this.size++,this.size},O.prototype.shift=function(){if(this.size){var D=this.head;return this.head=D.next,this.size--,D.item}},O.prototype.forEach=function(D,c){if(this.size){c=arguments.length>1?c:this;for(var m=this.head,t=0;m;)D.call(c,m.item,t,this),m=m.next,t++}},O.prototype.toArray=function(){if(!this.size)return[];for(var D=new Array(this.size),c=0,m=this.size,t=this.head;c{var E=Me(),F=ue(),O=Ge(),D=Ke();function c(m,t,o){if(arguments.length<2&&(o=m,m=null,t=null),this.capacity=o,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-cache: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-cache: capacity should be a finite positive integer.");var v=O.getPointerArray(o);this.forward=new v(o),this.backward=new v(o),this.K=typeof m=="function"?new m(o):new Array(o),this.V=typeof t=="function"?new t(o):new Array(o),this.size=0,this.head=0,this.tail=0,this.items={}}c.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},c.prototype.splayOnTop=function(m){var t=this.head;if(this.head===m)return this;var o=this.backward[m],v=this.forward[m];return this.tail===m?this.tail=o:this.backward[v]=o,this.forward[o]=v,this.backward[t]=m,this.head=m,this.forward[m]=t,this},c.prototype.set=function(m,t){var o=this.items[m];if(typeof o<"u"){this.splayOnTop(o),this.V[o]=t;return}this.size1?t:this;for(var o=0,v=this.size,a=this.head,r=this.K,n=this.V,e=this.forward;o=t)return{done:!0};var r=v[o];return m++,m=t)return{done:!0};var r=v[o];return m++,m=t)return{done:!0};var n=v[o],e=a[o];return m++,m{var E=rh(),F=ue(),O=Ge(),D=Ke();function c(t,o,v){arguments.length<2?E.call(this,t):E.call(this,t,o,v);var a=O.getPointerArray(this.capacity);this.deleted=new a(this.capacity),this.deletedSize=0}for(m in E.prototype)c.prototype[m]=E.prototype[m];var m;typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=E.prototype[Symbol.iterator]),c.prototype.clear=function(){E.prototype.clear.call(this),this.deletedSize=0},c.prototype.set=function(t,o){var v=this.items[t];if(typeof v<"u"){this.splayOnTop(v),this.V[v]=o;return}this.size0?v=this.deleted[--this.deletedSize]:v=this.size,this.size++):(v=this.tail,this.tail=this.backward[v],delete this.items[this.K[v]]),this.items[t]=v,this.K[v]=t,this.V[v]=o,this.forward[v]=this.head,this.backward[this.head]=v,this.head=v},c.prototype.setpop=function(t,o){var v=null,a=null,r=this.items[t];return typeof r<"u"?(this.splayOnTop(r),v=this.V[r],this.V[r]=o,{evicted:!1,key:t,value:v}):(this.size0?r=this.deleted[--this.deletedSize]:r=this.size,this.size++):(r=this.tail,this.tail=this.backward[r],v=this.V[r],a=this.K[r],delete this.items[a]),this.items[t]=r,this.K[r]=t,this.V[r]=o,this.forward[r]=this.head,this.backward[this.head]=r,this.head=r,a?{evicted:!0,key:a,value:v}:null)},c.prototype.delete=function(t){var o=this.items[t];if(typeof o>"u")return!1;if(delete this.items[t],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var v=this.backward[o],a=this.forward[o];return this.head===o&&(this.head=a),this.tail===o&&(this.tail=v),this.forward[v]=a,this.backward[a]=v,this.size--,this.deleted[this.deletedSize++]=o,!0},c.prototype.remove=function(t,o=void 0){var v=this.items[t];if(typeof v>"u")return o;var a=this.V[v];if(delete this.items[t],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,a;var r=this.backward[v],n=this.forward[v];return this.head===v&&(this.head=n),this.tail===v&&(this.tail=r),this.forward[r]=n,this.backward[n]=r,this.size--,this.deleted[this.deletedSize++]=v,a},c.from=function(t,o,v,a){if(arguments.length<2){if(a=D.guessLength(t),typeof a!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(a=o,o=null,v=null);var r=new c(o,v,a);return F(t,function(n,e){r.set(e,n)}),r},T.exports=c}),ad=Lt((S,T)=>{var E=rh(),F=ue(),O=Ge(),D=Ke();function c(m,t,o){if(arguments.length<2&&(o=m,m=null,t=null),this.capacity=o,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-map: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-map: capacity should be a finite positive integer.");var v=O.getPointerArray(o);this.forward=new v(o),this.backward=new v(o),this.K=typeof m=="function"?new m(o):new Array(o),this.V=typeof t=="function"?new t(o):new Array(o),this.size=0,this.head=0,this.tail=0,this.items=new Map}c.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},c.prototype.set=function(m,t){var o=this.items.get(m);if(typeof o<"u"){this.splayOnTop(o),this.V[o]=t;return}this.size{var E=ad(),F=ue(),O=Ge(),D=Ke();function c(t,o,v){arguments.length<2?E.call(this,t):E.call(this,t,o,v);var a=O.getPointerArray(this.capacity);this.deleted=new a(this.capacity),this.deletedSize=0}for(m in E.prototype)c.prototype[m]=E.prototype[m];var m;typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=E.prototype[Symbol.iterator]),c.prototype.clear=function(){E.prototype.clear.call(this),this.deletedSize=0},c.prototype.set=function(t,o){var v=this.items.get(t);if(typeof v<"u"){this.splayOnTop(v),this.V[v]=o;return}this.size0?v=this.deleted[--this.deletedSize]:v=this.size,this.size++):(v=this.tail,this.tail=this.backward[v],this.items.delete(this.K[v])),this.items.set(t,v),this.K[v]=t,this.V[v]=o,this.forward[v]=this.head,this.backward[this.head]=v,this.head=v},c.prototype.setpop=function(t,o){var v=null,a=null,r=this.items.get(t);return typeof r<"u"?(this.splayOnTop(r),v=this.V[r],this.V[r]=o,{evicted:!1,key:t,value:v}):(this.size0?r=this.deleted[--this.deletedSize]:r=this.size,this.size++):(r=this.tail,this.tail=this.backward[r],v=this.V[r],a=this.K[r],this.items.delete(a)),this.items.set(t,r),this.K[r]=t,this.V[r]=o,this.forward[r]=this.head,this.backward[this.head]=r,this.head=r,a?{evicted:!0,key:a,value:v}:null)},c.prototype.delete=function(t){var o=this.items.get(t);if(typeof o>"u")return!1;if(this.items.delete(t),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var v=this.backward[o],a=this.forward[o];return this.head===o&&(this.head=a),this.tail===o&&(this.tail=v),this.forward[v]=a,this.backward[a]=v,this.size--,this.deleted[this.deletedSize++]=o,!0},c.prototype.remove=function(t,o=void 0){var v=this.items.get(t);if(typeof v>"u")return o;var a=this.V[v];if(this.items.delete(t),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,a;var r=this.backward[v],n=this.forward[v];return this.head===v&&(this.head=n),this.tail===v&&(this.tail=r),this.forward[r]=n,this.backward[n]=r,this.size--,this.deleted[this.deletedSize++]=v,a},c.from=function(t,o,v,a){if(arguments.length<2){if(a=D.guessLength(t),typeof a!="number")throw new Error("mnemonist/lru-map.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(a=o,o=null,v=null);var r=new c(o,v,a);return F(t,function(n,e){r.set(e,n)}),r},T.exports=c}),VT=Lt((S,T)=>{var E=Me(),F=ue(),O=nh(),D=function(m,t){return m[1]>t[1]?-1:m[1]"u"?0:t},c.prototype.get=c.prototype.multiplicity,c.prototype.count=c.prototype.multiplicity,c.prototype.frequency=function(m){if(this.size===0)return 0;var t=this.multiplicity(m);return t/this.size},c.prototype.top=function(m){if(typeof m!="number"||m<=0)throw new Error("mnemonist/multi-set.top: n must be a number > 0.");for(var t=new O(Array,D,m),o=this.items.entries(),v;v=o.next(),!v.done;)t.push(v.value);return t.consume()},c.prototype.forEach=function(m,t){t=arguments.length>1?t:this;var o;this.items.forEach(function(v,a){for(o=0;o1?t:this,this.items.forEach(m,t)},c.prototype.keys=function(){return this.items.keys()},c.prototype.values=function(){var m=this.items.entries(),t=!1,o,v,a,r;return new E(function n(){if(!t){if(o=m.next(),o.done)return{done:!0};t=!0,v=o.value[0],a=o.value[1],r=0}return r>=a?(t=!1,n()):(r++,{done:!1,value:v})})},c.prototype.multiplicities=function(){return this.items.entries()},typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=c.prototype.values),c.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(c.prototype[Symbol.for("nodejs.util.inspect.custom")]=c.prototype.inspect),c.prototype.toJSON=function(){return this.items},c.from=function(m){var t=new c;return F(m,function(o){t.add(o)}),t},c.isSubset=function(m,t){var o=m.multiplicities(),v,a,r;if(m===t)return!0;if(m.dimension>t.dimension)return!1;for(;v=o.next(),!v.done;)if(a=v.value[0],r=v.value[1],t.multiplicity(a){var E=Me(),F=ue();function O(n,e,i){return((Math.pow(n,2)-Math.pow(Math.abs(e-i),2))/2|0)+n+1}function D(n,e){for(var i=0,h=0,s=e+1;he.length?-1:n.lengthe?1:0}function m(n,e){var i=n+1,h=e/i|0,s=h+1,l,f,u=e-h*i,d=i-u,p=new Array(n+1);for(l=0;l 0");this.levenshtein=n,this.k=e,this.clear()}r.prototype.clear=function(){this.size=0,this.strings=[],this.invertedIndices={}},r.prototype.add=function(n){var e=n.length,i=this.size;this.strings.push(n),this.size++;var h=t(this.k,n),s=this.invertedIndices[e];typeof s>"u"&&(s={},this.invertedIndices[e]=s);var l,f,u,d,p;for(d=0,p=h.length;d"u"?(f=[i],s[u]=f):f.push(i);return this},r.prototype.search=function(n){var e=n.length,i=this.k,h=new Set,s,l,f,u,d,p,g,y,x,C,P,M,w,I,L;for(y=Math.max(0,e-i),x=e+i+1;y1?e:this;for(var i=0,h=this.strings.length;i=e)return{done:!0};var h=n[i];return i++,{value:h,done:!1}})},typeof Symbol<"u"&&(r.prototype[Symbol.iterator]=r.prototype.values),r.prototype.inspect=function(){var n=this.strings.slice();return Object.defineProperty(n,"constructor",{value:r,enumerable:!1}),n},typeof Symbol<"u"&&(r.prototype[Symbol.for("nodejs.util.inspect.custom")]=r.prototype.inspect),r.from=function(n,e,i){var h=new r(e,i);return F(n,function(s){h.add(s)}),h},r.countKeys=D,r.comparator=c,r.partition=m,r.segments=t,r.segmentPos=o,r.multiMatchAwareInterval=v,r.multiMatchAwareSubstrings=a,T.exports=r}),YT=Lt((S,T)=>{var E=Me(),F=ue();function O(){this.clear()}O.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},O.prototype.enqueue=function(D){return this.items.push(D),++this.size},O.prototype.dequeue=function(){if(this.size){var D=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,D}},O.prototype.peek=function(){if(this.size)return this.items[this.offset]},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;for(var m=this.offset,t=0,o=this.items.length;m=D.length)return{done:!0};var m=D[c];return c++,{value:m,done:!1}})},O.prototype.entries=function(){var D=this.items,c=this.offset,m=0;return new E(function(){if(c>=D.length)return{done:!0};var t=D[c];return c++,{value:[m++,t],done:!1}})},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.values),O.prototype.toString=function(){return this.toArray().join(",")},O.prototype.toJSON=function(){return this.toArray()},O.prototype.inspect=function(){var D=this.toArray();return Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),O.from=function(D){var c=new O;return F(D,function(m){c.enqueue(m)}),c},O.of=function(){return O.from(arguments)},T.exports=O}),HT=Lt((S,T)=>{var E=Me(),F=ue();function O(){this.clear()}O.prototype.clear=function(){this.items=[],this.size=0},O.prototype.push=function(D){return this.items.push(D),++this.size},O.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},O.prototype.peek=function(){return this.items[this.size-1]},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;for(var m=0,t=this.items.length;m=c)return{done:!0};var t=D[c-m-1];return m++,{value:t,done:!1}})},O.prototype.entries=function(){var D=this.items,c=D.length,m=0;return new E(function(){if(m>=c)return{done:!0};var t=D[c-m-1];return{value:[m++,t],done:!1}})},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.values),O.prototype.toString=function(){return this.toArray().join(",")},O.prototype.toJSON=function(){return this.toArray()},O.prototype.inspect=function(){var D=this.toArray();return Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),O.from=function(D){var c=new O;return F(D,function(m){c.push(m)}),c},O.of=function(){return O.from(arguments)},T.exports=O}),KT=Lt(S=>{S.intersection=function(){if(arguments.length<2)throw new Error("mnemonist/Set.intersection: needs at least two arguments.");var T=new Set,E=1/0,F=null,O,D,c=arguments.length;for(D=0;DE.size)return!1;for(;O=F.next(),!O.done;)if(!E.has(O.value))return!1;return!0},S.isSuperset=function(T,E){return S.isSubset(E,T)},S.add=function(T,E){for(var F=E.values(),O;O=F.next(),!O.done;)T.add(O.value)},S.subtract=function(T,E){for(var F=E.values(),O;O=F.next(),!O.done;)T.delete(O.value)},S.intersect=function(T,E){for(var F=T.values(),O;O=F.next(),!O.done;)E.has(O.value)||T.delete(O.value)},S.disjunct=function(T,E){for(var F=T.values(),O,D=[];O=F.next(),!O.done;)E.has(O.value)&&D.push(O.value);for(F=E.values();O=F.next(),!O.done;)T.has(O.value)||T.add(O.value);for(var c=0,m=D.length;cE.size&&(F=T,T=E,E=F),T.size===0)return 0;if(T===E)return T.size;for(var O=T.values(),D,c=0;D=O.next(),!D.done;)E.has(D.value)&&c++;return c},S.unionSize=function(T,E){var F=S.intersectionSize(T,E);return T.size+E.size-F},S.jaccard=function(T,E){var F=S.intersectionSize(T,E);if(F===0)return 0;var O=T.size+E.size-F;return F/O},S.overlap=function(T,E){var F=S.intersectionSize(T,E);return F===0?0:F/Math.min(T.size,E.size)}}),jT=Lt((S,T)=>{var E=Me(),F=Ge().getPointerArray;function O(D){var c=F(D);this.start=0,this.size=0,this.capacity=D,this.dense=new c(D),this.sparse=new c(D)}O.prototype.clear=function(){this.start=0,this.size=0},O.prototype.has=function(D){if(this.size===0)return!1;var c=this.sparse[D],m=c=this.start&&c=this.start&&c1?c:this;for(var m=this.capacity,t=this.size,o=this.start,v=0;v=m)return{done:!0};var v=D[t];return t++,o++,t===c&&(t=0),{value:v,done:!1}})},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.values),O.prototype.inspect=function(){var D=[];return this.forEach(function(c){D.push(c)}),Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D.capacity=this.capacity,D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),T.exports=O}),$T=Lt((S,T)=>{var E=Me(),F=Ge().getPointerArray;function O(D,c){arguments.length<2&&(c=D,D=Array);var m=F(c);this.size=0,this.length=c,this.dense=new m(c),this.sparse=new m(c),this.vals=new D(c)}O.prototype.clear=function(){this.size=0},O.prototype.has=function(D){var c=this.sparse[D];return c=this.size||this.dense[c]!==D?!1:(c=this.dense[this.size-1],this.dense[this.sparse[D]]=c,this.sparse[c]=this.sparse[D],this.size--,!0)},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;for(var m=0;m{var E=Me(),F=Ge().getPointerArray;function O(D){var c=F(D);this.size=0,this.length=D,this.dense=new c(D),this.sparse=new c(D)}O.prototype.clear=function(){this.size=0},O.prototype.has=function(D){var c=this.sparse[D];return c=this.size||this.dense[c]!==D?!1:(c=this.dense[this.size-1],this.dense[this.sparse[D]]=c,this.sparse[c]=this.sparse[D],this.size--,!0)},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;for(var m,t=0;t{var E=ue(),F=2,O=2,D=new Set([0,1,2]),c={0:"Returns only the top suggestion",1:"Returns suggestions with the smallest edit distance",2:"Returns every suggestion (no early termination)"};function m(e){var i=new Set;return typeof e=="number"&&i.add(e),{suggestions:i,count:0}}function t(e,i,h){return{term:e||"",distance:i||0,count:h||0}}function o(e,i,h,s){s=s||new Set,i++;var l,f=e.length,u;if(f>1)for(u=0;u0&&e[u].length-f.length>s.length-f.length&&(h.suggestions=new Set,h.count=0),(i===2||!h.suggestions.size||e[u].length-f.length>=s.length-f.length)&&h.suggestions.add(l)}function a(e,i){var h=e.length,s=i.length,l=[[]],f=h+s,u=new Map,d,p,g;for(l[0][0]=f,d=0;d<=h;d++)l[d+1]||(l[d+1]=[]),l[d+1][1]=d,l[d+1][0]=f;for(g=0;g<=s;g++)l[1][g+1]=g,l[0][g+1]=f;var y=e+i,x;for(d=0,p=y.length;dl)return[];for(var d=[f],p=new Set,g=new Set,y=[],x,C;d.length>0&&(x=d.shift(),!(h<2&&y.length>0&&u-x.length>y[0].distance));){if(C=e[x],C!==void 0){if(typeof C=="number"&&(C=m(C)),C.count>0&&!g.has(x)){g.add(x);var P=t(x,u-x.length,C.count);if(y.push(P),h<2&&u-x.length===0)break}C.suggestions.forEach(L=>{var B=i[L];if(!g.has(B)){g.add(B);var N=0;if(f!==B)if(B.length===x.length)N=u-x.length;else if(u===x.length)N=B.length-x.length;else{for(var G=0,V=0,K=B.length;G0||V>0?N=a(B.substr(G,K-G-V),f.substr(G,u-G-V)):N=a(B,f)}if(h<2&&y.length>0&&y[0].distance>N&&(y=[]),!(h<2&&y.length>0&&N>y[0].distance)&&N<=s){var j=e[B];j!==void 0&&y.push(t(B,N,j.count))}}})}if(u-x.length0&&u-x.length>=y[0].distance)continue;for(var M=0,w=x.length;Mthis.maxLength&&(this.maxLength=e.length)),i.count===1){var h=this.words.length;this.words.push(e);var s=o(e,0,this.maxDistance);s.forEach(l=>{var f=this.dictionary[l];f!==void 0?(typeof f=="number"&&(f=m(f),this.dictionary[l]=f),f.suggestions.has(h)||v(this.words,this.verbosity,f,e,h,l)):this.dictionary[l]=h})}return this.size++,this},n.prototype.search=function(e){return r(this.dictionary,this.words,this.verbosity,this.maxDistance,this.maxLength,e)},n.prototype.inspect=function(){var e=[];e.size=this.size,e.maxDistance=this.maxDistance,e.verbosity=this.verbosity,e.behavior=c[this.verbosity];for(var i in this.dictionary)typeof this.dictionary[i]=="object"&&this.dictionary[i].count&&e.push([i,this.dictionary[i].count]);return Object.defineProperty(e,"constructor",{value:n,enumerable:!1}),e},typeof Symbol<"u"&&(n.prototype[Symbol.for("nodejs.util.inspect.custom")]=n.prototype.inspect),n.from=function(e,i){var h=new n(i);return E(e,function(s){h.add(s)}),h},T.exports=n}),od=Lt((S,T)=>{var E=ue(),F=Me(),O="\0";function D(c){this.mode=c===Array?"array":"string",this.clear()}D.prototype.clear=function(){this.root={},this.size=0},D.prototype.set=function(c,m){for(var t=this.root,o,v=0,a=c.length;v"u")return;if(O in m)return m[O]},D.prototype.delete=function(c){var m=this.root,t=null,o=null,v,a,r,n;for(r=0,n=c.length;r"u")return!1;t!==null?Object.keys(m).length>1&&(t=null,o=null):Object.keys(m).length<2&&(t=v,o=a)}return O in m?(this.size--,t?delete t[o]:delete m[O],!0):!1},D.prototype.has=function(c){for(var m=this.root,t,o=0,v=c.length;o"u")return!1;return O in m},D.prototype.find=function(c){var m=typeof c=="string",t=this.root,o=[],v,a,r;for(a=0,r=c.length;a"u")return o;for(var n=[t],e=[c],i;n.length;){c=e.pop(),t=n.pop();for(i in t){if(i===O){o.push([c,t[O]]);continue}n.push(t[i]),e.push(m?c+i:c.concat(i))}}return o},D.prototype.values=function(c){var m=this.root,t=[],o,v,a;if(c){for(v=0,a=c.length;v"u")return F.empty()}return t.push(m),new F(function(){for(var r,n=!1,e;t.length;){r=t.pop();for(e in r){if(e===O){n=!0;continue}t.push(r[e])}if(n)return{done:!1,value:r[O]}}return{done:!0}})},D.prototype.prefixes=function(c){var m=this.root,t=[],o=[],v,a,r,n=this.mode==="string";if(c){for(a=0,r=c.length;a"u")return F.empty()}else c=n?"":[];return t.push(m),o.push(c),new F(function(){for(var e,i,h=!1,s;t.length;){e=t.pop(),i=o.pop();for(s in e){if(s===O){h=!0;continue}t.push(e[s]),o.push(n?i+s:i.concat(s))}if(h)return{done:!1,value:i}}return{done:!0}})},D.prototype.keys=D.prototype.prefixes,D.prototype.entries=function(c){var m=this.root,t=[],o=[],v,a,r,n=this.mode==="string";if(c){for(a=0,r=c.length;a"u")return F.empty()}else c=n?"":[];return t.push(m),o.push(c),new F(function(){for(var e,i,h=!1,s;t.length;){e=t.pop(),i=o.pop();for(s in e){if(s===O){h=!0;continue}t.push(e[s]),o.push(n?i+s:i.concat(s))}if(h)return{done:!1,value:[i,e[O]]}}return{done:!0}})},typeof Symbol<"u"&&(D.prototype[Symbol.iterator]=D.prototype.entries),D.prototype.inspect=function(){for(var c=new Array(this.size),m=this.entries(),t,o=0;t=m.next(),!t.done;)c[o++]=t.value;return Object.defineProperty(c,"constructor",{value:D,enumerable:!1}),c},typeof Symbol<"u"&&(D.prototype[Symbol.for("nodejs.util.inspect.custom")]=D.prototype.inspect),D.prototype.toJSON=function(){return this.root},D.from=function(c){var m=new D;return E(c,function(t,o){m.set(o,t)}),m},D.SENTINEL=O,T.exports=D}),QT=Lt((S,T)=>{var E=ue(),F=od(),O="\0";function D(m){this.mode=m===Array?"array":"string",this.clear()}for(c in F.prototype)D.prototype[c]=F.prototype[c];var c;delete D.prototype.set,delete D.prototype.get,delete D.prototype.values,delete D.prototype.entries,D.prototype.add=function(m){for(var t=this.root,o,v=0,a=m.length;v"u")return v;for(var e=[o],i=[m],h;e.length;){m=i.pop(),o=e.pop();for(h in o){if(h===O){v.push(m);continue}e.push(o[h]),i.push(t?m+h:m.concat(h))}}return v},typeof Symbol<"u"&&(D.prototype[Symbol.iterator]=D.prototype.keys),D.prototype.inspect=function(){for(var m=new Set,t=this.keys(),o;o=t.next(),!o.done;)m.add(o.value);return Object.defineProperty(m,"constructor",{value:D,enumerable:!1}),m},typeof Symbol<"u"&&(D.prototype[Symbol.for("nodejs.util.inspect.custom")]=D.prototype.inspect),D.prototype.toJSON=function(){return this.root},D.from=function(m){var t=new D;return E(m,function(o){t.add(o)}),t},D.SENTINEL=O,T.exports=D}),kT=Lt((S,T)=>{var E=Me(),F=ue(),O=Ke(),D=Ge(),c=function(v){return Math.max(1,Math.ceil(v*1.5))},m=function(v){var a=D.getPointerArray(v);return new a(v)};function t(v,a){if(arguments.length<1)throw new Error("mnemonist/vector: expecting at least a byte array constructor.");var r=a||0,n=c,e=0,i=!1;typeof a=="object"&&(r=a.initialCapacity||0,e=a.initialLength||0,n=a.policy||n,i=a.factory===!0),this.factory=i?v:null,this.ArrayClass=v,this.length=e,this.capacity=Math.max(e,r),this.policy=n,this.array=new v(this.capacity)}t.prototype.set=function(v,a){if(this.lengththis.capacity)if(this.factory===null?this.array=new this.ArrayClass(v):this.array=this.factory(v),D.isTypedArray(this.array))this.array.set(a,0);else for(var r=0,n=this.length;r=v)return this;for(a=this.capacity;a=a)return{done:!0};var n=v[r];return r++,{value:n,done:!1}})},t.prototype.entries=function(){var v=this.array,a=this.length,r=0;return new E(function(){if(r>=a)return{done:!0};var n=v[r];return{value:[r++,n],done:!1}})},typeof Symbol<"u"&&(t.prototype[Symbol.iterator]=t.prototype.values),t.prototype.inspect=function(){var v=this.array.slice(0,this.length);return v.type=this.array.constructor.name,v.items=this.length,v.capacity=this.capacity,Object.defineProperty(v,"constructor",{value:t,enumerable:!1}),v},typeof Symbol<"u"&&(t.prototype[Symbol.for("nodejs.util.inspect.custom")]=t.prototype.inspect),t.from=function(v,a,r){if(arguments.length<3&&(r=O.guessLength(v),typeof r!="number"))throw new Error("mnemonist/vector.from: could not guess iterable length. Please provide desired capacity as last argument.");var n=new t(a,r);return F(v,function(e){n.push(e)}),n};function o(v){var a=function(n){t.call(this,v,n)};for(var r in t.prototype)t.prototype.hasOwnProperty(r)&&(a.prototype[r]=t.prototype[r]);return a.from=function(n,e){return t.from(n,v,e)},typeof Symbol<"u"&&(a.prototype[Symbol.iterator]=a.prototype.values),a}t.Int8Vector=o(Int8Array),t.Uint8Vector=o(Uint8Array),t.Uint8ClampedVector=o(Uint8ClampedArray),t.Int16Vector=o(Int16Array),t.Uint16Vector=o(Uint16Array),t.Int32Vector=o(Int32Array),t.Uint32Vector=o(Uint32Array),t.Float32Vector=o(Float32Array),t.Float64Vector=o(Float64Array),t.PointerVector=o(m),T.exports=t}),qT=Lt((S,T)=>{var E=Ke(),F=Ge(),O=rd().inplaceQuickSortIndices,D=nd().lowerBoundIndices,c=sh(),m=F.getPointerArray;function t(a,r){return a.distancer.distance?-1:0}function o(a,r,n){for(var e=n.length,i=m(e),h=0,s=new i(e),l=new i(e),f=new i(e),u=new Float64Array(e),d=[0,0,e],p=new Float64Array(e),g,y,x,C,P,M,w,I,L;d.length;)if(P=d.pop(),C=d.pop(),g=d.pop(),y=n[P-1],P--,L=P-C,s[g]=y,L!==0){if(L===1){w=a(r[y],r[n[C]]),u[g]=w,h++,f[g]=h,s[h]=n[C];continue}for(I=C;I0&&(h++,f[g]=h,d.push(h,M,P)),M-C>0&&(h++,l[g]=h,d.push(h,C,M))}return{nodes:s,lefts:l,rights:f,mus:u}}function v(a,r){if(typeof a!="function")throw new Error("mnemonist/VPTree.constructor: given `distance` must be a function.");if(!r)throw new Error("mnemonist/VPTree.constructor: you must provide items to the tree. A VPTree cannot be updated after its creation.");this.distance=a,this.heap=new c(t),this.D=0;var n=E.toArrayWithIndices(r);this.items=n[0];var e=n[1];this.size=e.length;var i=o(a,this.items,e);this.nodes=i.nodes,this.lefts=i.lefts,this.rights=i.rights,this.mus=i.mus}v.prototype.nearestNeighbors=function(a,r){var n=this.heap,e=[0],i=1/0,h,s,l,f,u,d,p;for(this.D=0;e.length;)h=e.pop(),s=this.nodes[h],l=this.items[s],p=this.distance(l,r),this.D++,pa&&n.pop(),n.size>=a&&(i=n.peek().distance)),f=this.lefts[h],u=this.rights[h],!(!f&&!u)&&(d=this.mus[h],p=d-i&&e.push(u)):(u&&p>=d-i&&e.push(u),f&&p=0;y--)g[y]=n.pop();return g},v.prototype.neighbors=function(a,r){var n=[],e=[0],i,h,s,l,f,u,d;for(this.D=0;e.length;)i=e.pop(),h=this.nodes[i],s=this.items[h],d=this.distance(s,r),this.D++,d<=a&&n.push({distance:d,item:s}),l=this.lefts[i],f=this.rights[i],!(!l&&!f)&&(u=this.mus[i],d=u-a&&e.push(f)):(f&&d>=u-a&&e.push(f),l&&d{var E=sh(),F=ih(),O=TT();T.exports={BiMap:ST(),BitSet:CT(),BitVector:ET(),BloomFilter:AT(),BKTree:MT(),CircularBuffer:wT(),DefaultMap:RT(),DefaultWeakMap:FT(),FixedDeque:ed(),StaticDisjointSet:LT(),FibonacciHeap:F,MinFibonacciHeap:F.MinFibonacciHeap,MaxFibonacciHeap:F.MaxFibonacciHeap,FixedReverseHeap:nh(),FuzzyMap:OT(),FuzzyMultiMap:DT(),HashedArrayTree:IT(),Heap:E,MinHeap:E.MinHeap,MaxHeap:E.MaxHeap,StaticIntervalTree:BT(),InvertedIndex:NT(),KDTree:GT(),LinkedList:zT(),LRUCache:rh(),LRUCacheWithDelete:UT(),LRUMap:ad(),LRUMapWithDelete:XT(),MultiMap:id(),MultiSet:VT(),PassjoinIndex:WT(),Queue:YT(),FixedStack:sd(),Stack:HT(),SuffixArray:O,GeneralizedSuffixArray:O.GeneralizedSuffixArray,Set:KT(),SparseQueueSet:jT(),SparseMap:$T(),SparseSet:ZT(),SymSpell:JT(),Trie:QT(),TrieMap:od(),Vector:kT(),VPTree:qT()}}),ut=class ge{static get ZERO(){return new ge(0,0)}static get ONE(){return new ge(1,1)}static get UP(){return new ge(0,-1)}static get DOWN(){return new ge(0,1)}static get LEFT(){return new ge(-1,0)}static get RIGHT(){return new ge(1,0)}static get UP_LEFT(){return new ge(-1,-1)}static get UP_RIGHT(){return new ge(1,-1)}static get DOWN_RIGHT(){return new ge(1,1)}static get DOWN_LEFT(){return new ge(-1,1)}constructor(T,E){typeof T=="number"?(this.x=T,this.y=E||0):(this.x=T.x,this.y=T.y)}clone(){return new ge(this.x,this.y)}add(T){return new ge(this.x+T.x,this.y+T.y)}multiply(T){return new ge(this.x*T.x,this.y*T.y)}divide(T){return new ge(this.x/T.x,this.y/T.y)}subtract(T){return new ge(this.x-T.x,this.y-T.y)}equals(T){return this.x===T.x&&this.y===T.y}abs(){return new ge(Math.abs(this.x),Math.abs(this.y))}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}modulo(T){return new ge(this.x%T.x,this.y%T.y)}scalarModulo(T){return new ge(this.x%T,this.y%T)}scalarMult(T){return new ge(this.x*T,this.y*T)}toPosition(){return{x:this.x,y:this.y}}toString(){return`${this.x}#${this.y}`}},Ut=class{static equal(S,T){return S.position.x===T.position.x&&S.position.y===T.position.y&&S.layer===T.layer}static copyOver(S,T){T.position.x=S.position.x,T.position.y=S.position.y,T.layer=S.layer}static clone(S){return{position:S.position.clone(),layer:S.layer}}static toString(S){return`${S.position.toString()}#${S.layer}`}static toInternal(S){return{position:new ut(S.position.x,S.position.y),layer:S.charLayer}}static fromInternal(S){return{position:S.position.toPosition(),charLayer:S.layer}}},tS=(S=>(S.NONE="none",S.LEFT="left",S.UP_LEFT="up-left",S.UP="up",S.UP_RIGHT="up-right",S.RIGHT="right",S.DOWN_RIGHT="down-right",S.DOWN="down",S.DOWN_LEFT="down-left",S))(tS||{}),eS={up:"down",down:"up",left:"right",right:"left",none:"none","up-left":"down-right","up-right":"down-left","down-right":"up-left","down-left":"up-right"},iS={up:ut.UP,down:ut.DOWN,left:ut.LEFT,right:ut.RIGHT,none:ut.ZERO,"up-left":ut.UP_LEFT,"up-right":ut.UP_RIGHT,"down-right":ut.DOWN_RIGHT,"down-left":ut.DOWN_LEFT},Cr={up:0,"up-right":1,right:2,"down-right":3,down:4,"down-left":5,left:6,"up-left":7,none:NaN},hd=["up","up-right","right","down-right","down","down-left","left","up-left"],sS=["down-left","down-right","up-right","up-left"];function ah(){return["up","down","left","right","none","up-left","up-right","down-right","down-left"]}function rn(S){return sS.includes(S)}function nS(S,T=1){return S==="none"?"none":hd[(Cr[S]+8-Math.abs(T)%8)%8]}function ld(S,T=1){return S==="none"?"none":hd[(Cr[S]+T)%8]}function ls(S){return iS[S]}function rS(S){return eS[S]}function ei(S,T){if(S.x===T.x){if(S.y>T.y)return"up";if(S.yT.x)return"left";if(S.xT.x){if(S.yT.y)return"up-left"}else if(S.xT.y)return"up-right"}return"none"}var aS=(S=>(S[S.FOUR=4]="FOUR",S[S.EIGHT=8]="EIGHT",S))(aS||{});function Ms(S){return typeof S=="string"&&ah().includes(S)}var Oo=function(S,T){return Oo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,F){E.__proto__=F}||function(E,F){for(var O in F)Object.prototype.hasOwnProperty.call(F,O)&&(E[O]=F[O])},Oo(S,T)};function gn(S,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");Oo(S,T);function E(){this.constructor=S}S.prototype=T===null?Object.create(T):(E.prototype=T.prototype,new E)}function oS(S,T,E,F){function O(D){return D instanceof E?D:new E(function(c){c(D)})}return new(E||(E=Promise))(function(D,c){function m(v){try{o(F.next(v))}catch(a){c(a)}}function t(v){try{o(F.throw(v))}catch(a){c(a)}}function o(v){v.done?D(v.value):O(v.value).then(m,t)}o((F=F.apply(S,T||[])).next())})}function ud(S,T){var E={label:0,sent:function(){if(D[0]&1)throw D[1];return D[1]},trys:[],ops:[]},F,O,D,c;return c={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function m(o){return function(v){return t([o,v])}}function t(o){if(F)throw new TypeError("Generator is already executing.");for(;c&&(c=0,o[0]&&(E=0)),E;)try{if(F=1,O&&(D=o[0]&2?O.return:o[0]?O.throw||((D=O.return)&&D.call(O),0):O.next)&&!(D=D.call(O,o[1])).done)return D;switch(O=0,D&&(o=[o[0]&2,D.value]),o[0]){case 0:case 1:D=o;break;case 4:return E.label++,{value:o[1],done:!1};case 5:E.label++,O=o[1],o=[0];continue;case 7:o=E.ops.pop(),E.trys.pop();continue;default:if(D=E.trys,!(D=D.length>0&&D[D.length-1])&&(o[0]===6||o[0]===2)){E=0;continue}if(o[0]===3&&(!D||o[1]>D[0]&&o[1]=S.length&&(S=void 0),{value:S&&S[F++],done:!S}}};throw new TypeError(T?"Object is not iterable.":"Symbol.iterator is not defined.")}function un(S,T){var E=typeof Symbol=="function"&&S[Symbol.iterator];if(!E)return S;var F=E.call(S),O,D=[],c;try{for(;(T===void 0||T-- >0)&&!(O=F.next()).done;)D.push(O.value)}catch(m){c={error:m}}finally{try{O&&!O.done&&(E=F.return)&&E.call(F)}finally{if(c)throw c.error}}return D}function fn(S,T,E){if(E||arguments.length===2)for(var F=0,O=T.length,D;F1||m(r,n)})})}function m(r,n){try{t(F[r](n))}catch(e){a(D[0][3],e)}}function t(r){r.value instanceof Rs?Promise.resolve(r.value.v).then(o,v):a(D[0][2],r)}function o(r){m("next",r)}function v(r){m("throw",r)}function a(r,n){r(n),D.shift(),D.length&&m(D[0][0],D[0][1])}}function lS(S){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var T=S[Symbol.asyncIterator],E;return T?T.call(S):(S=typeof Os=="function"?Os(S):S[Symbol.iterator](),E={},F("next"),F("throw"),F("return"),E[Symbol.asyncIterator]=function(){return this},E);function F(D){E[D]=S[D]&&function(c){return new Promise(function(m,t){c=S[D](c),O(m,t,c.done,c.value)})}}function O(D,c,m,t){Promise.resolve(t).then(function(o){D({value:o,done:m})},c)}}function Te(S){return typeof S=="function"}function fd(S){var T=function(F){Error.call(F),F.stack=new Error().stack},E=S(T);return E.prototype=Object.create(Error.prototype),E.prototype.constructor=E,E}var xo=fd(function(S){return function(T){S(this),this.message=T?T.length+` errors occurred during unsubscription: +`+T.map(function(E,F){return F+1+") "+E.toString()}).join(` + `):"",this.name="UnsubscriptionError",this.errors=T}});function Do(S,T){if(S){var E=S.indexOf(T);0<=E&&S.splice(E,1)}}var Jr=function(){function S(T){this.initialTeardown=T,this.closed=!1,this._parentage=null,this._finalizers=null}return S.prototype.unsubscribe=function(){var T,E,F,O,D;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var m=Os(c),t=m.next();!t.done;t=m.next()){var o=t.value;o.remove(this)}}catch(i){T={error:i}}finally{try{t&&!t.done&&(E=m.return)&&E.call(m)}finally{if(T)throw T.error}}else c.remove(this);var v=this.initialTeardown;if(Te(v))try{v()}catch(i){D=i instanceof xo?i.errors:[i]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var r=Os(a),n=r.next();!n.done;n=r.next()){var e=n.value;try{of(e)}catch(i){D=D??[],i instanceof xo?D=fn(fn([],un(D)),un(i.errors)):D.push(i)}}}catch(i){F={error:i}}finally{try{n&&!n.done&&(O=r.return)&&O.call(r)}finally{if(F)throw F.error}}}if(D)throw new xo(D)}},S.prototype.add=function(T){var E;if(T&&T!==this)if(this.closed)of(T);else{if(T instanceof S){if(T.closed||T._hasParent(this))return;T._addParent(this)}(this._finalizers=(E=this._finalizers)!==null&&E!==void 0?E:[]).push(T)}},S.prototype._hasParent=function(T){var E=this._parentage;return E===T||Array.isArray(E)&&E.includes(T)},S.prototype._addParent=function(T){var E=this._parentage;this._parentage=Array.isArray(E)?(E.push(T),E):E?[E,T]:T},S.prototype._removeParent=function(T){var E=this._parentage;E===T?this._parentage=null:Array.isArray(E)&&Do(E,T)},S.prototype.remove=function(T){var E=this._finalizers;E&&Do(E,T),T instanceof S&&T._removeParent(this)},S.EMPTY=function(){var T=new S;return T.closed=!0,T}(),S}(),dd=Jr.EMPTY;function cd(S){return S instanceof Jr||S&&"closed"in S&&Te(S.remove)&&Te(S.add)&&Te(S.unsubscribe)}function of(S){Te(S)?S():S.unsubscribe()}var vd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},uS={setTimeout:function(S,T){for(var E=[],F=2;F0},enumerable:!1,configurable:!0}),T.prototype._trySubscribe=function(E){return this._throwIfClosed(),S.prototype._trySubscribe.call(this,E)},T.prototype._subscribe=function(E){return this._throwIfClosed(),this._checkFinalizedStatuses(E),this._innerSubscribe(E)},T.prototype._innerSubscribe=function(E){var F=this,O=this,D=O.hasError,c=O.isStopped,m=O.observers;return D||c?dd:(this.currentObservers=null,m.push(E),new Jr(function(){F.currentObservers=null,Do(m,E)}))},T.prototype._checkFinalizedStatuses=function(E){var F=this,O=F.hasError,D=F.thrownError,c=F.isStopped;O?E.error(D):c&&E.complete()},T.prototype.asObservable=function(){var E=new si;return E.source=this,E},T.create=function(E,F){return new lf(E,F)},T}(si),lf=function(S){gn(T,S);function T(E,F){var O=S.call(this)||this;return O.destination=E,O.source=F,O}return T.prototype.next=function(E){var F,O;(O=(F=this.destination)===null||F===void 0?void 0:F.next)===null||O===void 0||O.call(F,E)},T.prototype.error=function(E){var F,O;(O=(F=this.destination)===null||F===void 0?void 0:F.error)===null||O===void 0||O.call(F,E)},T.prototype.complete=function(){var E,F;(F=(E=this.destination)===null||E===void 0?void 0:E.complete)===null||F===void 0||F.call(E)},T.prototype._subscribe=function(E){var F,O;return(O=(F=this.source)===null||F===void 0?void 0:F.subscribe(E))!==null&&O!==void 0?O:dd},T}(le),xd=new si(function(S){return S.complete()});function SS(S){return S&&Te(S.schedule)}function yd(S){return S[S.length-1]}function Td(S){return SS(yd(S))?S.pop():void 0}function Sd(S,T){return typeof yd(S)=="number"?S.pop():T}var Cd=function(S){return S&&typeof S.length=="number"&&typeof S!="function"};function Ed(S){return Te(S?.then)}function Pd(S){return Te(S[hh])}function Ad(S){return Symbol.asyncIterator&&Te(S?.[Symbol.asyncIterator])}function Md(S){return new TypeError("You provided "+(S!==null&&typeof S=="object"?"an invalid object":"'"+S+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function CS(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var wd=CS();function Rd(S){return Te(S?.[wd])}function Fd(S){return hS(this,arguments,function(){var T,E,F,O;return ud(this,function(D){switch(D.label){case 0:T=S.getReader(),D.label=1;case 1:D.trys.push([1,,9,10]),D.label=2;case 2:return[4,Rs(T.read())];case 3:return E=D.sent(),F=E.value,O=E.done,O?[4,Rs(void 0)]:[3,5];case 4:return[2,D.sent()];case 5:return[4,Rs(F)];case 6:return[4,D.sent()];case 7:return D.sent(),[3,2];case 8:return[3,10];case 9:return T.releaseLock(),[7];case 10:return[2]}})})}function Ld(S){return Te(S?.getReader)}function fs(S){if(S instanceof si)return S;if(S!=null){if(Pd(S))return ES(S);if(Cd(S))return PS(S);if(Ed(S))return AS(S);if(Ad(S))return Od(S);if(Rd(S))return MS(S);if(Ld(S))return wS(S)}throw Md(S)}function ES(S){return new si(function(T){var E=S[hh]();if(Te(E.subscribe))return E.subscribe(T);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function PS(S){return new si(function(T){for(var E=0;E{let O=this.tilePosInDirection(new ut(E,F),S);return this.tilemap.hasBlockingTile(O,T,rS(S),this.ignoreMissingTiles)})}isCharBlocking(S,T){return this.someCharTile((E,F)=>{let O=this.tilePosInDirection(new ut(E,F),S);return this.tilemap.hasBlockingChar(O,T,this.getCollisionGroups(),new Set([this.getId()]),this.ignoreCollisionGroups)})}isMoving(){return this.movementDirection!="none"}turnTowards(S){this.isMoving()||S!="none"&&this.changeFacingDirection(S)}changeFacingDirection(S){this.facingDirection!==S&&(this.facingDirection=S,this.directionChanged$.next(S))}getFacingDirection(){return this.facingDirection}getFacingPosition(){return this._tilePos.position.add(ls(this.facingDirection))}addCollisionGroup(S){this.collisionGroups.add(S)}setCollisionGroups(S){this.collisionGroups=new Set(S)}setIgnoreCollisionGroups(S){this.ignoreCollisionGroups=new Set(S)}getCollisionGroups(){return Array.from(this.collisionGroups)}getIgnoreCollisionGroups(){return Array.from(this.ignoreCollisionGroups)}hasCollisionGroup(S){return this.collisionGroups.has(S)}removeCollisionGroup(S){this.collisionGroups.delete(S)}removeAllCollisionGroups(){this.collisionGroups.clear()}addLabels(S){for(let T of S)this.labels.add(T)}getLabels(){return[...this.labels.values()]}hasLabel(S){return this.labels.has(S)}clearLabels(){this.labels.clear()}removeLabels(S){for(let T of S)this.labels.delete(T)}getNumberOfDirections(){return this.numberOfDirections}movementStarted(){return this.movementStarted$}movementStopped(){return this.movementStopped$}directionChanged(){return this.directionChanged$}tilePositionSet(){return this.tilePositionSet$}positionChangeStarted(){return this.positionChangeStarted$}positionChangeFinished(){return this.positionChangeFinished$}autoMovementSet(){return this.autoMovementSet$}depthChanged(){return this.depthChanged$}getMovementProgress(){return this.movementProgress}setMovementProgress(S){let T=Math.max(0,Math.min(ns,S));this.movementProgress=T}hasWalkedHalfATile(){return this.movementProgress>ns/2}willCrossTileBorderThisUpdate(S){return this.movementProgress+this.maxProgressForDelta(S)>=ns}updateCharacterPosition(S){let T=this.willCrossTileBorderThisUpdate(S),E=1-(T?ns-this.movementProgress:this.maxProgressForDelta(S))/this.maxProgressForDelta(S);this.movementProgress=Math.min(this.movementProgress+this.maxProgressForDelta(S),ns),T&&(this.movementProgress=0,this.shouldContinueMoving()?(this.fire(this.positionChangeFinished$,this.tilePos,this.getNextTilePos()),this.tilePos=this.getNextTilePos(),this.startMoving(this.lastMovementImpulse),E>0&&this.updateCharacterPosition(S*E)):this.stopMoving())}maxProgressForDelta(S){let T=S/1e3;return Math.floor(T*this.speed*ns)}get tilePos(){return Ut.clone(this._tilePos)}set tilePos(S){Ut.copyOver(S,this._tilePos)}startMoving(S){S!=="none"&&(S!=this.movementDirection&&this.movementStarted$.next(S),this.movementDirection=S,this.facingDirection=S,this.fire(this.positionChangeStarted$,this.tilePos,this.getNextTilePos()))}tilePosInDirection(S,T){return S.add(ls(this.tilemap.toMapDirection(T)))}shouldContinueMoving(){return this.lastMovementImpulse!=="none"&&!this.isBlockingDirection(this.lastMovementImpulse)}stopMoving(){if(this.movementDirection==="none")return;let S=this.tilePos,T=this.getNextTilePos(),E=this.movementDirection;this.tilePos=this.getNextTilePos(),this.movementDirection="none",this.movementStopped$.next(E),this.fire(this.positionChangeFinished$,S,T)}fire(S,{position:T,layer:E},{position:F,layer:O}){S.next({exitTile:T,enterTile:F,exitLayer:E,enterLayer:O})}someCharTile(S){let T=this.getNextTilePos().position;for(let E=T.x;Ethis.isLayerAlwaysOnTop(O));this.tilemap.layers.filter(O=>!this.isLayerAlwaysOnTop(O)).forEach(O=>{this.hasLayerProp(O,rs.HEIGHT_SHIFT_PROP_NAME)?(this.createHeightShiftLayers(O,E),T.push(O.tilemapLayer)):this.setDepth(O,++E)}),this.charLayerDepths.set(void 0,E),F.forEach((O,D)=>{O.tilemapLayer.setDepth(D+1+E)}),T.forEach(O=>O.destroy())}setDepth(T,E){T.tilemapLayer.setDepth(E),this.isCharLayer(T)&&this.charLayerDepths.set(this.getLayerProp(T,rs.CHAR_LAYER_PROP_NAME),E)}createHeightShiftLayers(T,E){let F=this.getLayerProp(T,rs.HEIGHT_SHIFT_PROP_NAME);isNaN(F)&&(F=0);let O=1;for(let D=0;DO.name==E);return F?.value}hasLayerProp(T,E){return this.getLayerProp(T,E)!=null}copyLayer(T,E){let F=`${T.name}#${E}`,O=this.tilemap.createBlankLayer(F,T.tilemapLayer.tileset);if(O){if(O.name=F,this.isIsometric())for(let D=E;D>=0;D--){let c=E-D;O.putTileAt(T.data[D][c],c,D)}else for(let D=0;Dm===this.charData.id)).subscribe(({direction:m})=>{var t;(t=this.animation)==null||t.setStandingFrame(m)}),this.sprite&&(this.sprite.setOrigin(0,0),this.resetAnimation(this.sprite),this.updateOverlaySprite(),this.updateGridChar())}destroy(){this.destroy$.next(),this.destroy$.complete(),this.newSpriteSet$.complete()}setSprite(S){S?(this.sprite&&(S.x=this.sprite.x,S.y=this.sprite.y),this.sprite=S,this.newSpriteSet$.next(),this.layerOverlaySprite=this.layerOverlaySprite?this.scene.add.sprite(0,0,this.sprite.texture):void 0,this.updateOverlaySprite(),this.resetAnimation(this.sprite),this.updateDepth()):(this.layerOverlaySprite=void 0,this.sprite=void 0)}getSprite(){return this.sprite}getLayerOverlaySprite(){return this.layerOverlaySprite}setContainer(S){var T;this.container=S,this.cachedContainerHeight=(T=S?.getBounds().height)!=null?T:0}getContainer(){return this.container}getOffsetX(){return this.customOffset.x}setOffsetX(S){this.customOffset.x=S}getOffsetY(){return this.customOffset.y}setOffsetY(S){this.customOffset.y=S}getWalkingAnimationMapping(){return this.walkingAnimationMapping}turnTowards(S){var T;this.geHeadless.isMoving(this.charData.id)||S!="none"&&(this.geHeadless.turnTowards(this.charData.id,S),(T=this.animation)==null||T.setStandingFrame(S))}getAnimation(){return this.animation}setAnimation(S){this.animation=S}update(S){this.updateGridChar()}getEngineOffset(){var S,T,E,F;if(!this.sprite)return ut.ZERO;let O=this.tilemap.getTileWidth()/2-Math.floor(((T=(S=this.sprite)==null?void 0:S.displayWidth)!=null?T:0)/2),D=-((F=(E=this.sprite)==null?void 0:E.displayHeight)!=null?F:0)+this.tilemap.getTileHeight();return new ut(O,D)}updatePixelPos(){let S=new ut(this.geHeadless.getPosition(this.charData.id)),T=this.geHeadless.getMovementProgress(this.charData.id)/1e3,E=this.tilemap.tilePosToPixelPos(S).add(this.getEngineOffset()).add(this.customOffset).add(ls(this.geHeadless.getFacingDirection(this.charData.id)).multiply(this.tilemap.getTileDistance(this.geHeadless.getFacingDirection(this.charData.id)).scalarMult(T))),F=this.getGameObj();F&&(F.x=Math.floor(E.x),F.y=Math.floor(E.y))}getGameObj(){return this.container||this.sprite}updateGridChar(){var S;if(this.updatePixelPos(),this.sprite&&this.geHeadless.isMoving(this.charData.id)){let T=this.geHeadless.getMovementProgress(this.charData.id)>ns/2;(S=this.getAnimation())==null||S.updateCharacterFrame(this.geHeadless.getFacingDirection(this.charData.id),T,Number(this.sprite.frame.name))}this.updateDepth()}resetAnimation(S){let T=new uf(this.walkingAnimationMapping,S.texture.source[0].width/S.width/uf.FRAMES_CHAR_ROW);this.setAnimation(T),T.frameChange().pipe(ti(this.newSpriteSet$)).subscribe(E=>{S?.setFrame(E)}),T.setIsEnabled(this.walkingAnimationMapping!==void 0),T.setStandingFrame(this.geHeadless.getFacingDirection(this.charData.id))}updateOverlaySprite(){if(!this.layerOverlaySprite||!this.sprite)return;this.layerOverlaySprite.scale=this.sprite.scale;let S=this.tilemap.getTileHeight()/this.layerOverlaySprite.scale;this.layerOverlaySprite.setCrop(0,0,this.layerOverlaySprite.displayWidth,this.sprite.height-S),this.layerOverlaySprite.setOrigin(0,0)}updateDepth(){if(!this.getGameObj())return;let S=new ut(this.geHeadless.getPosition(this.charData.id)),T=this.geHeadless.getCharLayer(this.charData.id);this.container?this.setContainerDepth(this.container,{position:S,layer:T}):this.sprite&&this.setSpriteDepth(this.sprite,{position:S,layer:T});let E=this.getLayerOverlaySprite();if(E){let F=new ut(Ki(oe({},S),{y:S.y-1}));this.setSpriteDepth(E,{position:F,layer:T})}}setSpriteDepth(S,T){S.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(T))+this.getPaddedPixelDepthSprite(S))}setContainerDepth(S,T){S.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(T))+this.getPaddedPixelDepthContainer(S))}getPaddedPixelDepthContainer(S){return No.shiftPad(S.y+this.cachedContainerHeight,zo.Z_INDEX_PADDING)}getPaddedPixelDepthSprite(S){return No.shiftPad(S.y+S.displayHeight,zo.Z_INDEX_PADDING)}getTransitionLayer(S){if(S.layer)return this.geHeadless.getTransition(S.position,S.layer)||S.layer}},YS=(S=>(S.DONT_BLOCK="DONT_BLOCK",S.BLOCK_TWO_TILES="BLOCK_TWO_TILES",S.BLOCK_ONE_TILE_AHEAD="BLOCK_ONE_TILE_AHEAD",S.BLOCK_ONE_TILE_BEHIND="BLOCK_ONE_TILE_BEHIND",S))(YS||{}),zd=(S=>(S.STOP="STOP",S.CLOSEST_REACHABLE="CLOSEST_REACHABLE",S.RETRY="RETRY",S.ALTERNATIVE_TARGETS="ALTERNATIVE_TARGETS",S))(zd||{}),HS=class{distance(S,T){return fi.manhattanDistance(S,T)}direction(S,T){if(fi.equal(S,T))return"none";let E=S.clone().subtract(T);return Math.abs(E.x)>Math.abs(E.y)?E.x>0?"left":"right":E.y>0?"up":"down"}neighbors(S){return[new ut(S.x,S.y+1),new ut(S.x+1,S.y),new ut(S.x-1,S.y),new ut(S.x,S.y-1)]}getDirections(){return["up","right","down","left"]}},KS=class{distance(S,T){return fi.chebyshevDistance(S,T)}neighbors(S){let T=[new ut(S.x,S.y+1),new ut(S.x+1,S.y),new ut(S.x-1,S.y),new ut(S.x,S.y-1)],E=[new ut(S.x+1,S.y+1),new ut(S.x+1,S.y-1),new ut(S.x-1,S.y+1),new ut(S.x-1,S.y-1)];return[...T,...E]}direction(S,T){return T.x>S.x?T.y>S.y?"down-right":T.yS.y?"down-left":T.yS.y?"down":"none"}getDirections(){return["up","right","down","left","down-left","down-right","up-right","up-left"]}},dn=class{static create(S){switch(S){case 4:return new HS;case 8:return new KS}}},ff=class{constructor(S,T,E){this.backoffMs=S,this.maxRetries=T,this.onFinished=E,this.retries=0,this.elapsed=0}retry(S,T){this.shouldRetry()?(this.elapsed+=S,this.elapsed>=this.backoffMs&&(this.elapsed=0,this.retries++,T())):this.onFinished()}reset(){this.retries=0,this.elapsed=0}getMaxRetries(){return this.maxRetries}getBackoffMs(){return this.backoffMs}shouldRetry(){return this.maxRetries===-1||this.retries(S.WAIT="WAIT",S.RETRY="RETRY",S.STOP="STOP",S))(Ud||{}),Qr=class{constructor(S,{shortestPathAlgorithm:T="BFS",pathWidth:E=1,pathHeight:F=1,numberOfDirections:O=4,isPositionAllowed:D=(i,h)=>!0,collisionGroups:c=[],ignoredChars:m=[],ignoreTiles:t=!1,ignoreMapBounds:o=!1,ignoreBlockedTarget:v=!1,maxPathLength:a=1/0,ignoreLayers:r=!1,considerCosts:n=!1,calculateClosestToTarget:e=!0}={}){this.gridTilemap=S,this.options={shortestPathAlgorithm:T,pathWidth:E,pathHeight:F,numberOfDirections:O,isPositionAllowed:D,collisionGroups:c,ignoredChars:m,ignoreTiles:t,ignoreMapBounds:o,ignoreBlockedTarget:v,maxPathLength:a,ignoreLayers:r,considerCosts:n,calculateClosestToTarget:e},this.ignoredCharsSet=new Set(m)}findShortestPath(S,T){this.options.ignoreLayers&&(this.gridTilemap.fixCacheLayer(S.layer),T.layer=S.layer);let E=this.findShortestPathImpl(S,T);return this.gridTilemap.unfixCacheLayers(),E}getNeighbors(S,T){var E;return dn.create((E=this.options.numberOfDirections)!=null?E:4).neighbors(S.position).map(F=>{let O=S.layer;return this.options.ignoreLayers||(O=this.gridTilemap.getTransition(F,S.layer)),{position:F,layer:O||S.layer}}).filter(F=>!this.isBlocking(S,F)||this.options.ignoreBlockedTarget&&Ut.equal(F,T))}getTransition(S,T){if(!this.options.ignoreLayers)return this.gridTilemap.getTransition(S,T)}getCosts(S,T){if(!this.options.considerCosts)return 1;let E=ei(T.position,S);return this.gridTilemap.getTileCosts(T,E)}isBlocking(S,T){return!(this.options.ignoreMapBounds||this.gridTilemap.isInRange(T.position))||!this.options.isPositionAllowed(T.position,T.layer)||!this.options.ignoreTiles&&this.hasBlockingTileFrom(S,T,this.options.pathWidth,this.options.pathHeight,this.options.ignoreMapBounds,this.gridTilemap)?!0:this.hasBlockingCharFrom(S,T,this.options.pathWidth,this.options.pathHeight,this.options.collisionGroups,this.ignoredCharsSet,this.gridTilemap)}distance(S,T){return(this.options.numberOfDirections===4?fi.manhattanDistance:fi.chebyshevDistance)(S,T)}getTilePosInDir(S,T){return this.options.ignoreLayers?{position:S.position.add(ls(this.gridTilemap.toMapDirection(T))),layer:S.layer}:this.gridTilemap.getTilePosInDirection(S,T)}getReverseNeighbors(S,T){var E;let F=dn.create((E=this.options.numberOfDirections)!=null?E:4).neighbors(S.position),O;if(!this.options.ignoreLayers){let D=this.gridTilemap.getReverseTransitions(S.position,S.layer);O=D?[...D]:void 0}return F.map(D=>O?O.map(c=>({position:D,layer:c||S.layer})):[{position:D,layer:S.layer}]).flat().filter(D=>!this.isBlocking(D,S)||this.options.ignoreBlockedTarget&&Ut.equal(S,T))}hasBlockingCharFrom(S,T,E,F,O,D,c){if(E===1&&F===1)return c.hasBlockingChar(T.position,T.layer,O,D);let m=o=>c.hasBlockingChar(o,T.layer,O,D),t=ei(S.position,T.position);return this.isBlockingMultiTile(S,t,E,F,m)}hasBlockingTileFrom(S,T,E,F,O,D){if(E===1&&F===1)return D.hasBlockingTile(T.position,T.layer,ei(T.position,S.position),O);let c=ei(S.position,T.position),m=t=>D.hasBlockingTile(t,T.layer,c,O);return this.isBlockingMultiTile(S,c,E,F,m)}isBlockingMultiTile(S,T,E,F,O){let D={src:new ut(S.position.x+E,S.position.y),dest:new ut(S.position.x+E,S.position.y+F-1)},c={src:new ut(S.position.x-1,S.position.y),dest:new ut(S.position.x-1,S.position.y+F-1)},m={src:new ut(S.position.x,S.position.y-1),dest:new ut(S.position.x+E-1,S.position.y-1)},t={src:new ut(S.position.x,S.position.y+F),dest:new ut(S.position.x+E-1,S.position.y+F)};switch(T){case"right":return this.checkLine(D,O);case"left":return this.checkLine(c,O);case"up":return this.checkLine(m,O);case"down":return this.checkLine(t,O);case"up-left":return this.checkLine({src:m.src,dest:new ut(m.dest.x-1,m.dest.y)},O)||this.checkLine({src:new ut(c.src.x,c.src.y-1),dest:new ut(c.dest.x,c.dest.y-1)},O);case"up-right":return this.checkLine({src:new ut(m.src.x+1,m.src.y),dest:m.dest},O)||this.checkLine({src:new ut(D.src.x,D.src.y-1),dest:new ut(D.dest.x,D.dest.y-1)},O);case"down-left":return this.checkLine({src:new ut(c.src.x,c.src.y+1),dest:new ut(c.dest.x,c.dest.y+1)},O)||this.checkLine({src:t.src,dest:new ut(t.dest.x-1,t.dest.y)},O);case"down-right":return this.checkLine({src:new ut(t.src.x+1,t.src.y),dest:t.dest},O)||this.checkLine({src:new ut(D.src.x,D.src.y+1),dest:new ut(D.dest.x,D.dest.y+1)},O)}return!1}checkLine(S,T){for(let E=S.src.x;E<=S.dest.x;E++)for(let F=S.src.y;F<=S.dest.y;F++)if(T(new ut(E,F)))return!0;return!1}},jS=_f(ih(),1),$S=class extends Qr{findShortestPathImpl(S,T){let E=this.shortestPathBfs(S,T);return{path:this.returnPath(E.previous,S,T),closestToTarget:E.closestToTarget,steps:E.steps,maxPathLengthReached:E.maxPathLengthReached,algorithmUsed:"A_STAR"}}shortestPathBfs(S,T){let E=new Map,F=new Map,O=new Map,D=new jS.MinFibonacciHeap((o,v)=>ks(O,o)-ks(O,v)),c=S,m=this.distance(S.position,T.position),t=0;for(D.push(S),F.set(Ut.toString(S),0),O.set(Ut.toString(S),this.distance(S.position,T.position));D.size>0;){let o=D.pop();if(!o)break;t++;let v=this.distance(o.position,T.position);if(vthis.options.maxPathLength)return{previous:new Map,closestToTarget:c,steps:t,maxPathLengthReached:!0};for(let a of this.getNeighbors(o,T)){let r=ks(F,o)+this.getCosts(o.position,a),n=Ut.toString(a);(!F.has(n)||r0;){let t=O.dequeue();if(m++,!t)break;let{node:o,dist:v}=t;if(v>this.options.maxPathLength)return{previous:new Map,closestToTarget:D,steps:m,maxPathLengthReached:!0};let a=this.distance(o.position,T.position);if(athis.lastDist)}step(S,T,E){var F;this.lastDist=E;for(let O of S){let D=Ut.toString(O);if(!this.visited.has(D)){this.previous.set(D,T),this.queue.enqueue({node:O,dist:E+1}),this.visited.set(D,E+1);let c=(F=this.otherBfs)==null?void 0:F.visited.get(D);c!==void 0&&c0,O.queue.size()>0);){let t=F.queue.dequeue();if(!t)break;let{node:o,dist:v}=t;if(v+1+(((E=O.queue.peek())==null?void 0:E.dist)||0)>this.options.maxPathLength)return{previous:F.previous,previous2:O.previous,closestToTarget:this.maybeClosestToTarget(c),steps:D,maxPathLengthReached:!0};let a=this.distance(o.position,T.position);if(aqs(this.f,O)-qs(this.f,D)),this.openSet.push(S);let F=Ut.toString(S);for(this.g.set(F,0),this.f.set(F,this.distance(S.position,T.position)),this.maxFrontierSize=Math.max(this.maxFrontierSize,this.openSet.size);this.openSet.size>0;){let O=this.openSet.pop();if(!O)break;if(this.steps++,Ut.equal(O,T))return{previous:E,closestToTarget:T,steps:this.steps,maxPathLengthReached:!1};if(qs(this.g,O)+1>this.options.maxPathLength)return{previous:new Map,closestToTarget:this.closestToTarget,steps:this.steps,maxPathLengthReached:!0};this.updateClosestToTarget(O,T);for(let D of this.getNeighborsInternal(O,E.get(Ut.toString(O)),T)){let c=Ut.toString(D.p),m=qs(this.g,O)+D.dist;(!this.g.has(c)||m({p:D,dist:1}));let F=this.prune(T,S).filter(D=>!this.isBlockingIgnoreTarget(S,D,E)).map(D=>{let c=this.getTransition(D.position,S.layer);return{position:D.position,layer:c||S.layer}}),O=[];for(let D of F)if(this.isHorizontal(S.position,D.position))O.push({p:D,dist:1});else{let c=this.jump(S,D,E,1,ei(S.position,D.position));c&&O.push(c)}return O}isBlockingIgnoreTarget(S,T,E){return this.isBlocking(S,T)&&!(this.options.ignoreBlockedTarget&&Ut.equal(T,E))}jump(S,T,E,F,O){if(!this.isBlockingIgnoreTarget(S,T,E))return Ut.equal(T,E)?{p:T,dist:F}:F>=this.maxJumpSize?{p:T,dist:F}:this.getTransition(T.position,S.layer)!==void 0?{p:T,dist:F}:this.hasForced(S,T)?{p:T,dist:F}:(this.updateClosestToTarget(T,E),this.jump(T,this.getTilePosInDir(T,O),E,F+1,O))}isHorizontal(S,T){return S.y===T.y}getForced(S,T,E,F,O,D){let c=[],m=S;return(this.blockOrTrans(m,E)||this.blockOrTrans(E,F))&&this.addIfNotBlocked(c,T,F),(this.blockOrTrans(m,O)||this.blockOrTrans(O,D))&&this.addIfNotBlocked(c,T,D),c}hasForced(S,T){let{topLeft:E,downLeft:F,top:O,bottom:D}=this.normalizedPositions(S,T);return!!((this.blockOrTrans(S,F)||this.blockOrTrans(F,D))&&!this.blockOrTrans(T,D)||(this.blockOrTrans(S,E)||this.blockOrTrans(E,O))&&!this.blockOrTrans(T,O))}prune(S,T){let{right:E,top:F,bottom:O,downLeft:D,topLeft:c}=this.normalizedPositions(S,T);return this.isHorizontal(S.position,T.position)?[E,F,O]:[E,...this.getForced(S,T,D,O,c,F)]}normalizedPositions(S,T){return S.position.xT.position.x?{topLeft:{position:new ut(T.position.x+1,T.position.y+1),layer:T.layer},downLeft:{position:new ut(T.position.x+1,T.position.y-1),layer:T.layer},top:{position:new ut(T.position.x,T.position.y+1),layer:T.layer},bottom:{position:new ut(T.position.x,T.position.y-1),layer:T.layer},right:{position:new ut(T.position.x-1,T.position.y),layer:T.layer}}:S.position.y1?this.fillPath(O,D,F):F.push(D),O=D}return F.reverse()}fillPath(S,T,E){let F=S;do{let O=ei(F.position,T.position);F=this.getTilePosInDir(F,O),E.push(F)}while(!fi.equal(F.position,T.position))}};function qs(S,T){var E;return(E=S.get(Ut.toString(T)))!=null?E:Number.MAX_VALUE}var JS=class{constructor(S,T,E,F={}){this.character=S,this.gridTilemap=T,this.charToFollow=E;let O={distance:0,noPathFoundStrategy:"STOP",maxPathLength:1/0,shortestPathAlgorithm:"BIDIRECTIONAL_SEARCH",ignoreLayers:!1,considerCosts:F.considerCosts||!1,facingDirection:"none"};this.options=oe(oe({},O),F),this.options.considerCosts&&this.options.shortestPathAlgorithm!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${this.options.shortestPathAlgorithm}'. It can only be used with A* algorithm.`),this.options.shortestPathAlgorithm==="JPS"&&(this.character.getTileWidth()>1||this.character.getTileHeight()>1)&&console.warn("GridEngine: Pathfinding algorithm 'JPS' can only be used for characters with 'tileWidth' and 'tileHeight' of 1"),this.character=S,this.updateTarget(this.charToFollow.getTilePos().position,this.charToFollow.getTilePos().layer),this.charToFollow.positionChangeStarted().pipe(ti(this.character.autoMovementSet().pipe(ji(D=>D!==this),Bs(1)))).subscribe(({enterTile:D,enterLayer:c})=>{this.updateTarget(D,c)})}update(S){var T;(T=this.targetMovement)==null||T.update(S)}getInfo(){return{type:"Follow",config:{charToFollow:this.charToFollow.getId(),distance:this.options.distance,noPathFoundStrategy:this.options.noPathFoundStrategy,maxPathLength:this.options.maxPathLength,ignoreLayers:this.options.ignoreLayers,facingDirection:this.options.facingDirection,shortestPathAlgorithm:this.options.shortestPathAlgorithm}}}getFacingPos(){let S=Cr[this.options.facingDirection]+Cr[this.charToFollow.getFacingDirection()],T=ld("up",S),E={x:this.charToFollow.getTilePos().position.x,y:this.charToFollow.getTilePos().position.y};return T==="right"?E.x+=this.charToFollow.getTileWidth()-1:T==="down"?E.y+=this.charToFollow.getTileWidth()-1:T==="down-left"?E.y+=this.charToFollow.getTileWidth()-1:T==="down-right"?(E.y+=this.charToFollow.getTileWidth()-1,E.x+=this.charToFollow.getTileWidth()-1):T==="up-right"&&(E.x+=this.charToFollow.getTileWidth()-1),this.gridTilemap.getTilePosInDirection({position:new ut(E),layer:this.charToFollow.getTilePos().layer},T).position}updateTarget(S,T){let E=this.options.facingDirection!=="none"&&this.options.distance===0;E&&(S=this.getFacingPos()),this.targetMovement=new jd(this.character,this.gridTilemap,{position:new ut(S),layer:T},{distance:E?0:this.options.distance+1,config:{algorithm:this.options.shortestPathAlgorithm,noPathFoundStrategy:this.options.noPathFoundStrategy,maxPathLength:this.options.maxPathLength,ignoreLayers:this.options.ignoreLayers,considerCosts:this.options.considerCosts,ignoredChars:[this.charToFollow.getId()]}})}},gf=class{static getRandomInt(S){return Math.floor(Math.random()*Math.floor(S))}},QS=class{constructor(S,T=0,E=-1){this.character=S,this.delay=T,this.radius=E,this.stepSize=0,this.delayLeft=this.delay,this.initialRow=S.getNextTilePos().position.y,this.initialCol=S.getNextTilePos().position.x,this.randomizeStepSize(),this.stepsWalked=0,this.currentMovementDirection="none",this.character.positionChangeStarted().pipe(ti(this.character.autoMovementSet().pipe(ji(F=>F!==this),Bs(1)))).subscribe(()=>{this.stepsWalked++}),this.distanceUtils=dn.create(S.getNumberOfDirections())}update(S){if(this.shouldContinueWalkingCurrentDirection())this.character.move(this.currentMovementDirection);else if(this.delayLeft-=S,this.delayLeft<=0){this.delayLeft=this.delay;let T=this.getFreeRandomDirection();this.stepsWalked=0,this.character.move(T),this.currentMovementDirection=T,this.randomizeStepSize()}}getInfo(){return{type:"Random",config:{delay:this.delay,radius:this.radius}}}shouldContinueWalkingCurrentDirection(){return this.stepsWalked!this.character.isBlockingDirection(S)).filter(S=>this.isWithinRadius(S))}isWithinRadius(S){return this.radius==-1?!0:this.getDist(S)<=this.radius}getDist(S){return this.distanceUtils.distance(this.character.getNextTilePos().position.add(ls(S)),new ut(this.initialCol,this.initialRow))}getFreeRandomDirection(){let S=this.getFreeDirections();return S.length==0?"none":S[gf.getRandomInt(S.length)]}randomizeStepSize(){this.stepSize=gf.getRandomInt(this.radius)+1}};function kS(S,T){return S.filter(E=>{var F,O,D,c,m,t;return(F=T.labels)!=null&&F.withAllLabels?(O=T.labels)==null?void 0:O.withAllLabels.every(o=>E.hasLabel(o)):(D=T.labels)!=null&&D.withOneOfLabels?(c=T.labels)==null?void 0:c.withOneOfLabels.some(o=>E.hasLabel(o)):(m=T.labels)!=null&&m.withNoneLabels?!((t=T.labels)!=null&&t.withNoneLabels.some(o=>E.hasLabel(o))):!0})}var Wd="2.44.6",qS=class{constructor(S,T){this.collistionStrategy=S,this.collisionGroupRelation=T,this.tilePosToCharacters=new _S,this.charRemoved$=new le}isCharBlockingAt(S,T,E,F=new Set,O=new Set){if(E.length===0)return!1;let D=this.tilePosToCharacters.get(S,T);return!!(D&&D.size>0&&[...D].filter(c=>!F.has(c.getId())).filter(c=>!this.doIntersect(c.getCollisionGroups(),O)).some(c=>E.some(m=>c.getCollisionGroups().some(t=>this.collidesWith(m,t)))))}doIntersect(S,T){for(let E of S)if(T.has(E))return!0;return!1}collidesWith(S,T){return this.collisionGroupRelation?(this.collisionGroupRelation.get(S)||new Set).has(T):S===T}getCharactersAt(S,T){return this.tilePosToCharacters.get(S,T)||new Set}addCharacter(S){this.addTilePositions(S.getTilePos(),S),this.addTilePositions(S.getNextTilePos(),S),this.addPositionChangeSub(S),this.addPositionChangeFinishedSub(S),this.addTilePosSetSub(S)}removeCharacter(S){let T=S.getId();this.charRemoved$.next(T),this.deleteTilePositions(S.getTilePos(),S),this.deleteTilePositions(S.getNextTilePos(),S)}add(S,T,E){let F=this.tilePosToCharacters.get(S,T);F||this.tilePosToCharacters.set(S,T,new Set([E])),F?.add(E)}addTilePosSetSub(S){S.tilePositionSet().pipe(ti(this.charRemoved(S.getId()))).subscribe(T=>{this.deleteTilePositions(S.getNextTilePos(),S),this.addTilePositions(T,S)})}charRemoved(S){var T;return(T=this.charRemoved$)==null?void 0:T.pipe(Bs(1),ji(E=>E==S))}addPositionChangeSub(S){S.positionChangeStarted().pipe(ti(this.charRemoved(S.getId())),this.posChangeToLayerPos()).subscribe(T=>{this.collistionStrategy==="BLOCK_ONE_TILE_AHEAD"&&this.deleteTilePositions(T.exit,S),this.addTilePositions(T.enter,S)})}addPositionChangeFinishedSub(S){S.positionChangeFinished().pipe(ti(this.charRemoved(S.getId())),this.posChangeToLayerPos()).subscribe(T=>{this.deleteTilePositions(T.exit,S),this.addTilePositions(T.enter,S)})}addTilePositions(S,T){this.forEachCharTile(S,T,(E,F)=>{this.add(new ut(E,F),S.layer,T)})}deleteTilePositions(S,T){this.forEachCharTile(S,T,(E,F)=>{var O;(O=this.tilePosToCharacters.get(new ut(E,F),S.layer))==null||O.delete(T)})}forEachCharTile(S,T,E){let F=S.position;for(let O=F.x;O({enter:{position:new ut(S.enterTile),layer:S.enterLayer},exit:{position:new ut(S.exitTile),layer:S.exitLayer}})))}posToString(S,T){return`${S.x}#${S.y}#${T}`}},_S=class{constructor(){this.memo=new Map}set(S,T,E){let F=this.memo.get(S.x);F||(F=new Map,this.memo.set(S.x,F));let O=F.get(S.y);O||(O=new Map,F.set(S.y,O)),O.set(T,E)}get(S,T){let E=this.memo.get(S.x);if(!E)return;let F=E.get(S.y);if(F)return F.get(T)}},lh=class{constructor(S,T,E,F){this.x=S,this.y=T,this.width=E,this.height=F}getX(){return this.x}getY(){return this.y}getWidth(){return this.width}getHeight(){return this.height}isInRange(S){return S.x>=this.x&&S.x=this.y&&S.yE.isCharLayer());for(let E of[...T,void 0]){let F=this.tileCollisionCache.get(E?.getName());if(F===void 0){F=new Array(this.tilemap.getWidth());for(let O=0;O>T&1)==1}var xf="ge_cost",Yd=class Hd{constructor(T,E,F,O=void 0,D=!1){this.tilemap=T,this.collisionTilePropertyName=E,this.useTileCollisionCache=D,this.characters=new Map,this.transitions=new Map,this.reverseTransitions=new Map,this.collidesPropNames=new Map,this.tileCostPropNames=new Map,this.collisionRelevantLayersFrameCache=new Map,this.charBlockCache=new qS(F,O);for(let c of ah())this.collidesPropNames.set(c,Hd.ONE_WAY_COLLIDE_PROP_PREFIX+c),this.tileCostPropNames.set(c,`${xf}_${c}`);this.useTileCollisionCache&&(this.tileCollisionCache=new e2(T,this),this.tileCollisionCache.rebuild())}fixCacheLayer(T){var E;(E=this.tileCollisionCache)==null||E.fixLayer(T)}unfixCacheLayers(){var T;(T=this.tileCollisionCache)==null||T.unfixLayers()}addCharacter(T){this.characters.set(T.getId(),T);let E=T.getNextTilePos().layer;E===void 0?T.setTilePosition(Ki(oe({},T.getNextTilePos()),{layer:this.getLowestCharLayer()})):this.getCharLayerNames().includes(E)||console.warn(`Char layer '${E}' of character '${T.getId()}' is unknown.`),this.charBlockCache.addCharacter(T)}removeCharacter(T){let E=this.characters.get(T);E&&(this.charBlockCache.removeCharacter(E),this.characters.delete(T))}getCharacters(){return[...this.characters.values()]}getCharactersAt(T,E){return this.charBlockCache.getCharactersAt(T,E)}rebuildTileCollisionCache(T){var E;(E=this.tileCollisionCache)==null||E.rebuild(T)}hasBlockingTileUncached(T,E,F,O){if(!O&&this.hasNoTileUncached(T,E))return!0;let D=this.getCollisionRelevantLayers(E);for(let c of D)if(this.isLayerBlockingAt(c.getName(),T,F))return!0;return!1}hasBlockingTile(T,E,F,O){var D;let c=(D=this.tileCollisionCache)==null?void 0:D.isBlockingFrom(T.x,T.y,E,F,O);return c!==void 0?c:this.hasBlockingTileUncached(T,E,F,O)}getTransition(T,E){let F=this.transitions.get(T.toString());if(F)return F.get(E)}getReverseTransitions(T,E){let F=this.reverseTransitions.get(T.toString());if(F)return F.get(E)}setTransition(T,E,F){var O,D,c,m,t;this.transitions.has(T.toString())||this.transitions.set(T.toString(),new Map),this.reverseTransitions.has(T.toString())||this.reverseTransitions.set(T.toString(),new Map),(O=this.transitions.get(T.toString()))==null||O.set(E,F),(D=this.reverseTransitions.get(T.toString()))!=null&&D.has(F)||(c=this.reverseTransitions.get(T.toString()))==null||c.set(F,new Set),(t=(m=this.reverseTransitions.get(T.toString()))==null?void 0:m.get(F))==null||t.add(E)}getTransitions(){return new Map([...this.transitions].map(([T,E])=>[T,new Map(E)]))}getTileCosts(T,E){let F=this.getCollisionRelevantLayers(T.layer),O=1;for(let D of F)O=Math.max(O,this.getTileCostsForLayer(Ki(oe({},T),{layer:D.getName()}),E));return O}getTileCostsForLayer(T,E){let F=this.tilemap.getTileAt(T.position.x,T.position.y,T.layer);return E&&F?.getProperty(this.tileCostPropNames.get(E)||"")||F?.getProperty(xf)||1}hasNoTileUncached(T,E){return!this.getCollisionRelevantLayers(E).some(F=>this.tilemap.hasTileAt(T.x,T.y,F.getName()))}hasNoTile(T,E){var F;let O=(F=this.tileCollisionCache)==null?void 0:F.hasTileAt(T.x,T.y,E);return O!==void 0?O:this.hasNoTileUncached(T,E)}hasBlockingChar(T,E,F,O=new Set,D=new Set){return this.charBlockCache.isCharBlockingAt(T,E,F,O,D)}isInRange(T){return new lh(0,0,this.tilemap.getWidth(),this.tilemap.getHeight()).isInRange(T)}toMapDirection(T){return this.isIsometric()?nS(T):T}fromMapDirection(T){return this.isIsometric()?ld(T):T}isIsometric(){return this.tilemap.getOrientation()==="isometric"}getTilePosInDirection(T,E){let F=T.position.add(ls(this.toMapDirection(E))),O=this.getTransition(F,T.layer)||T.layer;return{position:F,layer:O}}invalidateFrameCache(){this.collisionRelevantLayersFrameCache.clear()}isLayerBlockingAt(T,E,F){let O=this.tilemap.getTileAt(E.x,E.y,T);return O?!!(O.getProperty(this.collisionTilePropertyName)||F&&O.getProperty(this.collidesPropNames.get(F)||"")):!1}getCharLayerIndexes(){return this.tilemap.getLayers().map((T,E)=>({layer:T,index:E})).filter(({layer:T})=>T.isCharLayer()).map(({index:T})=>T)}findPrevAndCharLayer(T){let E=this.getCharLayerIndexes(),F=this.tilemap.getLayers(),O=E.findIndex(D=>F[D].getProperty(pr)==T);return O==0?{prevIndex:-1,charLayerIndex:E[O]}:{prevIndex:E[O-1],charLayerIndex:E[O]}}getCollisionRelevantLayers(T){if(!T)return this.tilemap.getLayers();let E=this.collisionRelevantLayersFrameCache.get(T);if(E)return E;let{prevIndex:F,charLayerIndex:O}=this.findPrevAndCharLayer(T),D=this.tilemap.getLayers().slice(F+1,O+1);return this.collisionRelevantLayersFrameCache.set(T,D),D}getLowestCharLayer(){for(let T of this.tilemap.getLayers())if(T.isCharLayer())return T.getProperty(pr)}getCharLayerNames(){return this.tilemap.getLayers().filter(T=>T.isCharLayer()).map(T=>T.getProperty(pr)).filter(s2)}};Yd.ONE_WAY_COLLIDE_PROP_PREFIX="ge_collide_";var i2=Yd;function s2(S){return S!=null}var n2=(S=>(S.REMOVED="REMOVED",S.ADDED="ADDED",S))(n2||{}),r2=(S=>(S.WAIT="WAIT",S.SKIP="SKIP",S.STOP="STOP",S))(r2||{}),a2=class{constructor(S,T){this.character=S,this.tilemap=T,this.queue=new Er,this.finished$=new le,this.pathBlockedWaitElapsed=0,this.distanceUtils=dn.create(S.getNumberOfDirections()),this.character.autoMovementSet().pipe(ji(E=>E!==this),Bs(1)).subscribe(()=>{this.queue.size()>0&&this.finishMovementTerminated(),this.finished$.complete()})}update(S){(!this.character.isMoving()||this.character.willCrossTileBorderThisUpdate(S))&&this.queue.size()>0&&this.moveCharOnPath(S)}getInfo(){return{type:"Queue"}}enqueue(S,T={}){var E,F,O;let D={pathBlockedStrategy:(E=T.pathBlockedStrategy)!=null?E:"STOP",pathBlockedWaitTimeoutMs:T?.pathBlockedWaitTimeoutMs||-1,ignoreInvalidPositions:(F=T.ignoreInvalidPositions)!=null?F:!1,skipInvalidPositions:(O=T.skipInvalidPositions)!=null?O:!1};for(let c of S){let m={command:c,config:D};if(Ms(c)){this.queue.enqueue(m);continue}let t=this.queue.peekEnd(),o=t?.command;if(o||(o=this.character.getNextTilePos()),Ms(o)){this.queue.enqueue(m);continue}let v=this.distanceUtils.distance(o.position,c.position)===1;(!T.ignoreInvalidPositions||v)&&this.queue.enqueue(m)}}peekAll(){return this.queue.peekAll()}size(){return this.queue.size()}finished(){return this.finished$}clear(){this.queue.clear()}moveCharOnPath(S){let T=this.queue.peek();if(!T)return;let E=T.command,F=T.config;if(Ms(E)&&(E=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),E)),F.skipInvalidPositions){if(E=this.getNextValidPosition(),!E){this.finishInvalidNextPos(E);return}}else if(!this.isNeighborPos(E)){this.finishInvalidNextPos(E);return}if(this.character.isBlockingDirection(ei(this.character.getNextTilePos().position,E.position))){if(F.pathBlockedStrategy==="STOP")this.finishPathBlocked(E);else if(F.pathBlockedStrategy==="SKIP"){this.queue.dequeue(),this.moveCharOnPath(S);return}else F.pathBlockedStrategy==="WAIT"&&F.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=S,this.pathBlockedWaitElapsed>=F.pathBlockedWaitTimeoutMs&&this.finishBlockedWaitTimeout(E,F.pathBlockedWaitTimeoutMs));return}this.pathBlockedWaitElapsed=0,this.queue.dequeue(),this.character.move(this.getDir(this.character.getNextTilePos().position,E.position)),this.isLastMovement()&&this.finish("SUCCESS","",E)}getNextValidPosition(){for(var S;this.queue.size()>0;){let T=(S=this.queue.peek())==null?void 0:S.command;if(Ms(T)&&(T=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),T)),T&&this.isNeighborPos(T))return T;this.queue.dequeue()}}isLastMovement(){return this.queue.size()===0}isNeighborPos(S){let T=this.distanceUtils.distance(this.character.getNextTilePos().position,S.position)===1,E=this.tilemap.getTransition(S.position,this.character.getNextTilePos().layer);if(this.character.getNextTilePos().layer!==S.layer)return T&&E===S.layer;let F=E!==void 0&&E!==S.layer;return T&&!F}finishMovementTerminated(){this.finish("MOVEMENT_TERMINATED","New automatic movement has been set to character.")}finishInvalidNextPos(S){S?this.finish("INVALID_NEXT_POS",`Position ${this.posToStr(S)} is not reachable from ${this.posToStr(this.character.getNextTilePos())}.`):this.finish("INVALID_NEXT_POS",`No enqueued position is reachable from ${this.posToStr(this.character.getNextTilePos())}.`)}finishPathBlocked(S){this.finish("PATH_BLOCKED",`Position ${this.posToStr(S)} is blocked.`)}finishBlockedWaitTimeout(S,T){this.finish("PATH_BLOCKED_WAIT_TIMEOUT",`Position ${this.posToStr(S)} is blocked and the wait timeout of ${T} ms has been exceeded.`)}finish(S,T="",E=this.character.getNextTilePos()){this.queue=new Er,this.finished$.next({position:E.position,result:S,description:T,layer:E.layer})}getDir(S,T){return this.tilemap.fromMapDirection(ei(S,T))}posToStr(S){return`(${S.position.x}, ${S.position.y}, ${S.layer})`}},o2=class{constructor(S=!0){this.isCreatedInternal=!1,S&&console.log(`Using GridEngine v${Wd}`)}getCharLayer(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getTilePos().layer}getTransition(S,T){var E;return this.initGuard(),(E=this.gridTilemap)==null?void 0:E.getTransition(new ut(S),T)}setTransition(S,T,E){var F;return this.initGuard(),(F=this.gridTilemap)==null?void 0:F.setTransition(new ut(S),T,E)}create(S,T){this.isCreatedInternal=!0,this.gridCharacters=new Map;let E=this.setConfigDefaults(T);this.config=E,this.movementStopped$=new le,this.movementStarted$=new le,this.directionChanged$=new le,this.positionChangeStarted$=new le,this.positionChangeFinished$=new le,this.queueMovementFinished$=new le,this.charRemoved$=new le,this.charAdded$=new le,this.gridTilemap=new i2(S,this.config.collisionTilePropertyName,this.config.characterCollisionStrategy,this.recordToMap(this.config.collisionGroupRelation),this.config.cacheTileCollisions),this.addCharacters()}recordToMap(S){return S?new Map(Object.entries(S).map(([T,E])=>[T,new Set(E)])):void 0}getPosition(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getTilePos().position}move(S,T){this.moveChar(S,T)}moveRandomly(S,T=0,E=-1){var F;this.initGuard();let O=(F=this.gridCharacters)==null?void 0:F.get(S);if(!O)throw this.createCharUnknownErr(S);let D=new QS(O,T,E);O.setMovement(D)}getMovement(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);let F=E.getMovement();return F?F.getInfo():{type:"None"}}moveTo(S,T,E){var F;let O=this.assembleMoveToConfig(E);this.initGuard();let D=(F=this.gridCharacters)==null?void 0:F.get(S);if(!D)throw this.createCharUnknownErr(S);if(!this.gridTilemap)throw this.createUninitializedErr();let c=new jd(D,this.gridTilemap,{position:new ut(T),layer:E?.targetLayer||D.getNextTilePos().layer},{distance:0,config:O});return D.setMovement(c),c.finishedObs().pipe(an(m=>({charId:S,position:m.position,result:m.result,description:m.description,layer:m.layer})))}stopMovement(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);E.setMovement(void 0)}setSpeed(S,T){var E;this.initGuard();let F=(E=this.gridCharacters)==null?void 0:E.get(S);if(!F)throw this.createCharUnknownErr(S);F.setSpeed(T)}getSpeed(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getSpeed()}collidesWithTiles(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.collidesWithTiles()}update(S,T){var E;if(this.isCreatedInternal&&this.gridCharacters)for(let[F,O]of this.gridCharacters)O.update(T);(E=this.gridTilemap)==null||E.invalidateFrameCache()}addCharacter(S){var T,E,F,O,D;if(!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let c={speed:S.speed||4,tilemap:this.gridTilemap,collidesWithTiles:!0,collisionGroups:["geDefault"],ignoreCollisionGroups:[],charLayer:S.charLayer,facingDirection:S.facingDirection,labels:S.labels,numberOfDirections:(T=S.numberOfDirections)!=null?T:this.config.numberOfDirections,tileWidth:S.tileWidth,tileHeight:S.tileHeight};typeof S.collides=="boolean"?S.collides===!1&&(c.collidesWithTiles=!1,c.collisionGroups=[]):S.collides!==void 0&&(S.collides.collidesWithTiles===!1&&(c.collidesWithTiles=!1),S.collides.collisionGroups&&(c.collisionGroups=S.collides.collisionGroups),S.collides.ignoreCollisionGroups&&(c.ignoreCollisionGroups=S.collides.ignoreCollisionGroups),c.ignoreMissingTiles=(F=(E=S.collides)==null?void 0:E.ignoreMissingTiles)!=null?F:!1);let m=new VS(S.id,c);S.startPosition&&m.setTilePosition({position:new ut(S.startPosition),layer:m.getTilePos().layer}),(O=this.gridCharacters)==null||O.set(S.id,m),this.gridTilemap.addCharacter(m);let t=m.getId();m.movementStopped().pipe(ti(this.charRemoved(t))).subscribe(o=>{var v;(v=this.movementStopped$)==null||v.next({charId:t,direction:o})}),m.movementStarted().pipe(ti(this.charRemoved(t))).subscribe(o=>{var v;(v=this.movementStarted$)==null||v.next({charId:t,direction:o})}),m.directionChanged().pipe(ti(this.charRemoved(t))).subscribe(o=>{var v;(v=this.directionChanged$)==null||v.next({charId:t,direction:o})}),m.positionChangeStarted().pipe(ti(this.charRemoved(t))).subscribe(o=>{var v;(v=this.positionChangeStarted$)==null||v.next(oe({charId:t},o))}),m.positionChangeFinished().pipe(ti(this.charRemoved(t))).subscribe(o=>{var v;(v=this.positionChangeFinished$)==null||v.next(oe({charId:t},o))}),(D=this.charAdded$)==null||D.next(t)}hasCharacter(S){var T;return this.initGuard(),!!((T=this.gridCharacters)!=null&&T.has(S))}removeCharacter(S){var T,E,F,O;if(this.initGuard(),!((T=this.gridCharacters)!=null&&T.get(S)))throw this.createCharUnknownErr(S);(E=this.gridTilemap)==null||E.removeCharacter(S),(F=this.gridCharacters)==null||F.delete(S),(O=this.charRemoved$)==null||O.next(S)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters)for(let S of this.gridCharacters.keys())this.removeCharacter(S)}getAllCharacters(S){if(this.initGuard(),!this.gridCharacters)return[];let T=[...this.gridCharacters.values()];return(S?kS(T,S):T).map(E=>E.getId())}getLabels(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getLabels()}addLabels(S,T){var E;this.initGuard();let F=(E=this.gridCharacters)==null?void 0:E.get(S);if(!F)throw this.createCharUnknownErr(S);F.addLabels(T)}removeLabels(S,T){var E;this.initGuard();let F=(E=this.gridCharacters)==null?void 0:E.get(S);if(!F)throw this.createCharUnknownErr(S);F.removeLabels(T)}clearLabels(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);E.clearLabels()}follow(S,T,E,F){var O,D,c,m,t,o;let v;E===void 0?v={distance:0,closestPointIfBlocked:!1}:typeof E=="number"?(v={distance:E,closestPointIfBlocked:!1},F&&(v.closestPointIfBlocked=!0)):v=E,this.initGuard();let a=(O=this.gridCharacters)==null?void 0:O.get(S),r=(D=this.gridCharacters)==null?void 0:D.get(T);if(!a)throw this.createCharUnknownErr(S);if(!r)throw this.createCharUnknownErr(T);if(!this.gridTilemap)throw this.createUninitializedErr();let n=new JS(a,this.gridTilemap,r,{distance:(c=v.distance)!=null?c:0,noPathFoundStrategy:v.closestPointIfBlocked?"CLOSEST_REACHABLE":"STOP",maxPathLength:(m=v.maxPathLength)!=null?m:1/0,shortestPathAlgorithm:(t=v.algorithm)!=null?t:"BIDIRECTIONAL_SEARCH",ignoreLayers:!!v.ignoreLayers,facingDirection:(o=v.facingDirection)!=null?o:"none"});a.setMovement(n)}isMoving(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.isMoving()}getFacingDirection(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getFacingDirection()}getFacingPosition(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);let F=E.getFacingPosition();return{x:F.x,y:F.y}}turnTowards(S,T){var E;this.initGuard();let F=(E=this.gridCharacters)==null?void 0:E.get(S);if(!F)throw this.createCharUnknownErr(S);return F.turnTowards(T)}getCharactersAt(S,T){if(this.initGuard(),!this.gridTilemap)return[];let E=this.gridTilemap.getCharactersAt(new ut(S),T);return Array.from(E).map(F=>F.getId())}setPosition(S,T,E){var F;this.initGuard();let O=(F=this.gridCharacters)==null?void 0:F.get(S);if(!O)throw this.createCharUnknownErr(S);E||O.setTilePosition({position:new ut(T),layer:O.getTilePos().layer}),O.setTilePosition({position:new ut(T),layer:E})}isBlocked(S,T,E=["geDefault"]){var F,O;this.initGuard();let D=new ut(S);return!!((F=this.gridTilemap)!=null&&F.hasBlockingTile(D,T)||(O=this.gridTilemap)!=null&&O.hasBlockingChar(D,T,E))}isTileBlocked(S,T){var E;return this.initGuard(),!!((E=this.gridTilemap)!=null&&E.hasBlockingTile(new ut(S),T))}getCollisionGroups(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getCollisionGroups()||[]}setCollisionGroups(S,T){var E;this.initGuard();let F=(E=this.gridCharacters)==null?void 0:E.get(S);if(!F)throw this.createCharUnknownErr(S);F.setCollisionGroups(T)}getIgnoreCollisionGroups(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getIgnoreCollisionGroups()||[]}setIgnoreCollisionGroups(S,T){var E;this.initGuard();let F=(E=this.gridCharacters)==null?void 0:E.get(S);if(!F)throw this.createCharUnknownErr(S);F.setIgnoreCollisionGroups(T)}getTilePosInDirection(S,T,E){if(!this.gridTilemap)throw this.createUninitializedErr();let F=this.gridTilemap.getTilePosInDirection({position:new ut(S),layer:T},E);return{position:F.position.toPosition(),charLayer:F.layer}}findShortestPath(S,T,E={}){if(!this.gridTilemap)throw this.createUninitializedErr();let F=E.shortestPathAlgorithm||"BFS";E.considerCosts&&F!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${F}'. It can only be used with A* algorithm.`);let O=E.pathWidth!==void 0&&E.pathWidth!==1,D=E.pathHeight!==void 0&&E.pathHeight!==1;(O||D)&&F==="JPS"&&console.warn("GridEngine: Pathfinding options 'pathWidth' and 'pathHeight' > 1 cannot be used with algorithm 'JPS'.");let c=new Kd(this.gridTilemap).findShortestPath(Ut.toInternal(S),Ut.toInternal(T),Ki(oe({},E),{shortestPathAlgorithm:F}));return{path:c.path.map(Ut.fromInternal),closestToTarget:c.closestToTarget?Ut.fromInternal(c.closestToTarget):void 0,reachedMaxPathLength:!1,steps:c.steps}}steppedOn(S,T,E){return this.positionChangeFinished().pipe(ji(F=>S.includes(F.charId)&&T.some(O=>O.x===F.enterTile.x&&O.y===F.enterTile.y)&&(E===void 0||E.includes(F.enterLayer))))}characterShifted(){if(!this.charAdded$||!this.charRemoved$)throw this.createUninitializedErr();return this.charAdded$.pipe(an(S=>({charId:S,action:"ADDED"})),XS(this.charRemoved$.pipe(an(S=>({charId:S,action:"REMOVED"})))))}movementStarted(){if(!this.movementStarted$)throw this.createUninitializedErr();return this.movementStarted$}movementStopped(){if(!this.movementStopped$)throw this.createUninitializedErr();return this.movementStopped$}directionChanged(){if(!this.directionChanged$)throw this.createUninitializedErr();return this.directionChanged$}positionChangeStarted(){if(!this.positionChangeStarted$)throw this.createUninitializedErr();return this.positionChangeStarted$}positionChangeFinished(){if(!this.positionChangeFinished$)throw this.createUninitializedErr();return this.positionChangeFinished$}getMovementProgress(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getMovementProgress()}rebuildTileCollisionCache(S,T,E,F){var O;(O=this.gridTilemap)==null||O.rebuildTileCollisionCache(new lh(S,T,E,F))}addQueueMovements(S,T,E){var F,O;this.initGuard();let D=(F=this.gridCharacters)==null?void 0:F.get(S);if(!D)throw this.createCharUnknownErr(S);if(!this.gridTilemap)throw this.createUninitializedErr();let c;((O=D?.getMovement())==null?void 0:O.getInfo().type)==="Queue"?c=D.getMovement():(c=new a2(D,this.gridTilemap),D.setMovement(c),c.finished().pipe(ti(NS(this.charRemoved(S),D.autoMovementSet()))).subscribe(m=>{var t;(t=this.queueMovementFinished$)==null||t.next(oe({charId:S},m))})),c.enqueue(T.map(m=>Ms(m)?m:{position:new ut(m.position),layer:m.charLayer}),E)}queueMovementFinished(){if(!this.queueMovementFinished$)throw this.createUninitializedErr();return this.queueMovementFinished$}getEnqueuedMovements(S){var T,E;this.initGuard();let F=(T=this.gridCharacters)==null?void 0:T.get(S);if(!F)throw this.createCharUnknownErr(S);return((E=F.getMovement())==null?void 0:E.getInfo().type)==="Queue"?F.getMovement().peekAll().map(O=>({command:Ms(O.command)?O.command:Ut.fromInternal(O.command),config:O.config})):[]}clearEnqueuedMovements(S){var T,E;this.initGuard();let F=(T=this.gridCharacters)==null?void 0:T.get(S);if(!F)throw this.createCharUnknownErr(S);((E=F.getMovement())==null?void 0:E.getInfo().type)==="Queue"&&F.getMovement().clear()}getTileCost(S,T,E){var F,O;return this.initGuard(),(O=(F=this.gridTilemap)==null?void 0:F.getTileCosts({position:new ut(S),layer:T},E))!=null?O:1}getState(){let S=[];if(this.gridCharacters)for(let[T,E]of this.gridCharacters.entries())S.push({id:T,position:Ut.fromInternal(E.getTilePos()),facingDirection:E.getFacingDirection(),speed:E.getSpeed(),labels:E.getLabels(),movementProgress:E.getMovementProgress(),collisionConfig:{collisionGroups:E.getCollisionGroups(),ignoreCollisionGroups:E.getIgnoreCollisionGroups(),collidesWithTiles:E.collidesWithTiles(),ignoreMissingTiles:E.getIgnoreMissingTiles()}});return{characters:S}}setState(S){if(this.gridCharacters)for(let T of S.characters){let E=this.gridCharacters.get(T.id);if(E){let F=E.getTilePos();Ut.equal(F,Ut.toInternal(T.position))||E.setTilePosition(Ut.toInternal(T.position)),E.setSpeed(T.speed),E.turnTowards(T.facingDirection),T.collisionConfig.collisionGroups&&E.setCollisionGroups(T.collisionConfig.collisionGroups),T.collisionConfig.collidesWithTiles!==void 0&&E.setCollidesWithTiles(T.collisionConfig.collidesWithTiles),T.collisionConfig.ignoreMissingTiles!==void 0&&E.setIgnoreMissingTiles(T.collisionConfig.ignoreMissingTiles),E.setMovementProgress(T.movementProgress),E.clearLabels(),E.addLabels(T.labels)}}}charRemoved(S){var T;if(!this.charRemoved$)throw this.createUninitializedErr();return(T=this.charRemoved$)==null?void 0:T.pipe(Bs(1),ji(E=>E==S))}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var S;(S=this.config)==null||S.characters.forEach(T=>this.addCharacter(T))}moveChar(S,T){var E,F,O;this.initGuard();let D=(E=this.gridCharacters)==null?void 0:E.get(S);if(!D)throw this.createCharUnknownErr(S);if(D.getNumberOfDirections()===4){if(!((F=this.gridTilemap)!=null&&F.isIsometric())&&rn(T)){console.warn(`GridEngine: Character '${S}' can't be moved '${T}' in 4 direction mode.`);return}else if((O=this.gridTilemap)!=null&&O.isIsometric()&&!rn(T)){console.warn(`GridEngine: Character '${S}' can't be moved '${T}' in 4 direction isometric mode.`);return}}D.move(T)}createCharUnknownErr(S){return new Error(`Character unknown: ${S}`)}assembleMoveToConfig(S={}){let T=Ki(oe({},S),{noPathFoundStrategy:"STOP",pathBlockedStrategy:"WAIT"});return S!=null&&S.noPathFoundStrategy&&(Object.values(zd).includes(S.noPathFoundStrategy)?T.noPathFoundStrategy=S.noPathFoundStrategy:console.warn(`GridEngine: Unknown NoPathFoundStrategy '${S.noPathFoundStrategy}'. Falling back to 'STOP'`)),S!=null&&S.pathBlockedStrategy&&(Object.values(Ud).includes(S.pathBlockedStrategy)?T.pathBlockedStrategy=S.pathBlockedStrategy:console.warn(`GridEngine: Unknown PathBlockedStrategy '${S.pathBlockedStrategy}'. Falling back to 'WAIT'`)),T}setConfigDefaults(S){return oe({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",cacheTileCollisions:!1},S)}},h2=class extends Vd{constructor(S,T={}){super(S,T),this.jumpCache=new yf}findShortestPathImpl(S,T){return this.jumpCache=new yf,super.findShortestPathImpl(S,T)}getNeighborsInternal(S,T,E){if(!T||S.layer!==T.layer)return this.getNeighbors(S,E).map(D=>({p:D,dist:1}));let F=this.prune(T,S).map(D=>{let c=this.getTransition(D.position,S.layer);return{position:D.position,layer:c||S.layer}}),O=[];for(let D of F){let c=this.jump(S,D,E,1,ei(S.position,D.position));c&&(c.dist=this.distance(S.position,c.p.position),O.push(c))}return O}getForced(S,T){let E=[],{topLeft:F,downLeft:O,top:D,bottom:c,topRight:m,downRight:t}=this.normalizedPositions(S,T),o=ei(S.position,T.position);return rn(o)?(this.blockOrTrans(S,F)&&(this.addIfNotBlocked(E,T,D),this.addIfNotBlocked(E,T,m),this.blockOrTrans(O,F)&&this.addIfNotBlocked(E,T,F)),this.blockOrTrans(S,O)&&(this.addIfNotBlocked(E,T,c),this.addIfNotBlocked(E,T,t),this.blockOrTrans(F,O)&&this.addIfNotBlocked(E,T,O)),this.blockOrTrans(F,D)&&this.addIfNotBlocked(E,T,D),this.blockOrTrans(O,c)&&this.addIfNotBlocked(E,T,c),this.blockOrTrans(F,m)&&this.addIfNotBlocked(E,T,m),this.blockOrTrans(O,t)&&this.addIfNotBlocked(E,T,t)):((this.blockOrTrans(S,D)||this.blockOrTrans(D,m))&&this.addIfNotBlocked(E,T,m),(this.blockOrTrans(S,c)||this.blockOrTrans(c,t))&&this.addIfNotBlocked(E,T,t),this.blockOrTrans(S,F)&&this.blockOrTrans(S,D)&&(this.addIfNotBlocked(E,T,D),this.addIfNotBlocked(E,T,F)),this.blockOrTrans(S,O)&&this.blockOrTrans(S,c)&&(this.addIfNotBlocked(E,T,c),this.addIfNotBlocked(E,T,O)),this.blockOrTrans(F,D)&&this.blockOrTrans(S,D)&&this.addIfNotBlocked(E,T,D),this.blockOrTrans(O,c)&&this.blockOrTrans(S,c)&&this.addIfNotBlocked(E,T,c)),E}hasForced(S,T){let{topLeft:E,downLeft:F,top:O,bottom:D,topRight:c,downRight:m}=this.normalizedPositions(S,T),t=ei(S.position,T.position);if(rn(t)){if(this.blockOrTrans(S,E)&&(!this.blockOrTrans(T,O)||!this.blockOrTrans(T,c)||this.blockOrTrans(F,E)&&!this.blockOrTrans(T,E))||this.blockOrTrans(S,F)&&(!this.blockOrTrans(T,D)||!this.blockOrTrans(T,m)||this.blockOrTrans(E,F)&&!this.blockOrTrans(T,F))||this.blockOrTrans(E,O)&&!this.blockOrTrans(T,O)||this.blockOrTrans(F,D)&&!this.blockOrTrans(T,D)||this.blockOrTrans(E,c)&&!this.blockOrTrans(T,c)||this.blockOrTrans(F,m)&&!this.blockOrTrans(T,m))return!0}else if((this.blockOrTrans(S,O)||this.blockOrTrans(O,c))&&!this.blockOrTrans(T,c)||(this.blockOrTrans(S,D)||this.blockOrTrans(D,m))&&!this.blockOrTrans(T,m)||this.blockOrTrans(S,E)&&this.blockOrTrans(S,O)&&(!this.blockOrTrans(T,O)||!this.blockOrTrans(T,E))||this.blockOrTrans(S,F)&&this.blockOrTrans(S,D)&&(!this.blockOrTrans(T,D)||!this.blockOrTrans(T,F))||this.blockOrTrans(E,O)&&this.blockOrTrans(S,O)&&!this.blockOrTrans(T,O)||this.blockOrTrans(F,D)&&this.blockOrTrans(S,D)&&!this.blockOrTrans(T,D))return!0;return!1}prune(S,T){let{top:E,right:F,topRight:O,downRight:D,bottom:c}=this.normalizedPositions(S,T),m=this.getForced(S,T),t=ei(S.position,T.position);return rn(t)?[E,F,O,D,c,...m]:[F,...m]}jump(S,T,E,F,O){let D=this.jumpCache.get(S,T);if(D!==null)return D;if(this.isBlocking(S,T)&&!(Ut.equal(T,E)&&this.options.ignoreBlockedTarget)){this.jumpCache.set(S,T,void 0);return}if(Ut.equal(T,E))return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(F>=this.maxJumpSize)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(this.getTransition(T.position,S.layer)!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(this.hasForced(S,T))return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(this.updateClosestToTarget(T,E),O==="up-left"){if(this.jump(T,this.getTilePosInDir(T,"up"),E,F+1,"up")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(this.jump(T,this.getTilePosInDir(T,"left"),E,F+1,"left")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0}}else if(O==="down-left"){if(this.jump(T,this.getTilePosInDir(T,"down"),E,F+1,"down")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(this.jump(T,this.getTilePosInDir(T,"left"),E,F+1,"left")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0}}else if(O==="up-right"){if(this.jump(T,this.getTilePosInDir(T,"up"),E,F+1,"up")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(this.jump(T,this.getTilePosInDir(T,"right"),E,F+1,"right")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0}}else if(O==="down-right"){if(this.jump(T,this.getTilePosInDir(T,"down"),E,F+1,"down")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(this.jump(T,this.getTilePosInDir(T,"right"),E,F+1,"right")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0}}let c=this.jump(T,this.getTilePosInDir(T,O),E,F+1,O);return this.jumpCache.set(S,T,c),c}normalizedPositions(S,T){return S.position.xT.position.x&&S.position.y===T.position.y?{topLeft:{position:new ut(T.position.x+1,T.position.y+1),layer:T.layer},downLeft:{position:new ut(T.position.x+1,T.position.y-1),layer:T.layer},top:{position:new ut(T.position.x,T.position.y+1),layer:T.layer},bottom:{position:new ut(T.position.x,T.position.y-1),layer:T.layer},right:{position:new ut(T.position.x-1,T.position.y),layer:T.layer},topRight:{position:new ut(T.position.x-1,T.position.y+1),layer:T.layer},downRight:{position:new ut(T.position.x-1,T.position.y-1),layer:T.layer}}:S.position.yT.position.y&&S.position.x===T.position.x?{topLeft:{position:new ut(T.position.x-1,T.position.y+1),layer:T.layer},downLeft:{position:new ut(T.position.x+1,T.position.y+1),layer:T.layer},top:{position:new ut(T.position.x-1,T.position.y),layer:T.layer},bottom:{position:new ut(T.position.x+1,T.position.y),layer:T.layer},right:{position:new ut(T.position.x,T.position.y-1),layer:T.layer},topRight:{position:new ut(T.position.x-1,T.position.y-1),layer:T.layer},downRight:{position:new ut(T.position.x+1,T.position.y-1),layer:T.layer}}:S.position.yT.position.x?{topLeft:{position:new ut(T.position.x+1,T.position.y),layer:T.layer},downLeft:{position:new ut(T.position.x,T.position.y-1),layer:T.layer},top:{position:new ut(T.position.x+1,T.position.y+1),layer:T.layer},bottom:{position:new ut(T.position.x-1,T.position.y-1),layer:T.layer},right:{position:new ut(T.position.x-1,T.position.y+1),layer:T.layer},topRight:{position:new ut(T.position.x,T.position.y+1),layer:T.layer},downRight:{position:new ut(T.position.x-1,T.position.y),layer:T.layer}}:S.position.y>T.position.y&&S.position.x(S.SUCCESS="SUCCESS",S.NO_PATH_FOUND_MAX_RETRIES_EXCEEDED="NO_PATH_FOUND_MAX_RETRIES_EXCEEDED",S.PATH_BLOCKED_MAX_RETRIES_EXCEEDED="PATH_BLOCKED_MAX_RETRIES_EXCEEDED",S.PATH_BLOCKED="PATH_BLOCKED",S.NO_PATH_FOUND="NO_PATH_FOUND",S.PATH_BLOCKED_WAIT_TIMEOUT="PATH_BLOCKED_WAIT_TIMEOUT",S.MOVEMENT_TERMINATED="MOVEMENT_TERMINATED",S.MAX_PATH_LENGTH_REACHED="MAX_PATH_LENGTH_REACHED",S))(u2||{}),jd=class{constructor(S,T,E,{config:F,ignoreBlockedTarget:O=!1,distance:D=0}={}){this.character=S,this.tilemap=T,this.targetPos=E,this.shortestPath=[],this.distOffset=0,this.posOnPath=0,this.stopped=!1,this.pathBlockedWaitElapsed=0,this.isPositionAllowed=()=>!0,this.shortestPathAlgorithm="BIDIRECTIONAL_SEARCH",this.maxPathLength=1/0,this.considerCosts=!1,this.ignoredChars=[],this.isBlocking=(t,o)=>t?new Xd(this.tilemap,this.getPathfindingOptions()).isBlocking(this.character.getTilePos(),{position:t,layer:o}):!0;var c,m;this.shortestPathAlgorithm=(c=F?.algorithm)!=null?c:this.shortestPathAlgorithm,this.ignoreBlockedTarget=O,this.distance=D,this.noPathFoundStrategy=F?.noPathFoundStrategy||"STOP",this.pathBlockedStrategy=F?.pathBlockedStrategy||"WAIT",this.noPathFoundRetryable=new ff(F?.noPathFoundRetryBackoffMs||200,F?.noPathFoundMaxRetries||-1,()=>{this.stop("NO_PATH_FOUND_MAX_RETRIES_EXCEEDED")}),this.pathBlockedRetryable=new ff(F?.pathBlockedRetryBackoffMs||200,F?.pathBlockedMaxRetries||-1,()=>{this.stop("PATH_BLOCKED_MAX_RETRIES_EXCEEDED")}),F!=null&&F.isPositionAllowedFn&&(this.isPositionAllowed=F.isPositionAllowedFn),F!=null&&F.maxPathLength&&(this.maxPathLength=F.maxPathLength),this.alternativeTargets=F?.alternativeTargets,this.noPathFoundAlternativeTargetsFallbackStrategy=F?.noPathFoundAlternativeTargetsFallbackStrategy,F!=null&&F.considerCosts&&this.shortestPathAlgorithm!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${this.shortestPathAlgorithm}'. It can only be used with A* algorithm.`),this.shortestPathAlgorithm==="JPS"&&(this.character.getTileWidth()>1||this.character.getTileHeight()>1)&&console.warn("GridEngine: Pathfinding algorithm 'JPS' can only be used for characters with 'tileWidth' and 'tileHeight' of 1"),this.considerCosts=F?.considerCosts||!1,this.ignoreLayers=!!(F!=null&&F.ignoreLayers),this.distanceUtils=dn.create(S.getNumberOfDirections()),this.pathBlockedWaitTimeoutMs=F?.pathBlockedWaitTimeoutMs||-1,this.ignoredChars=(m=F?.ignoredChars)!=null?m:[],this.finished$=new le,this.setCharacter(S)}setPathBlockedStrategy(S){this.pathBlockedStrategy=S}getPathBlockedStrategy(){return this.pathBlockedStrategy}setCharacter(S){this.character=S,this.noPathFoundRetryable.reset(),this.pathBlockedRetryable.reset(),this.pathBlockedWaitElapsed=0,this.calcShortestPath(),this.character.autoMovementSet().pipe(ji(T=>T!==this),Bs(1)).subscribe(()=>{this.stop("MOVEMENT_TERMINATED")})}getPathfindingOptions(){return{shortestPathAlgorithm:this.shortestPathAlgorithm,pathWidth:this.character.getTileWidth(),pathHeight:this.character.getTileHeight(),numberOfDirections:this.character.getNumberOfDirections(),isPositionAllowed:this.isPositionAllowed,collisionGroups:this.character.getCollisionGroups(),ignoredChars:[this.character.getId(),...this.ignoredChars],ignoreTiles:!this.character.collidesWithTiles(),ignoreMapBounds:this.character.getIgnoreMissingTiles(),ignoreBlockedTarget:this.ignoreBlockedTarget,maxPathLength:this.maxPathLength,ignoreLayers:this.ignoreLayers,considerCosts:this.considerCosts,calculateClosestToTarget:!0}}update(S){var T,E,F,O;this.stopped||(this.noPathFound()&&(this.noPathFoundStrategy==="RETRY"?this.noPathFoundRetryable.retry(S,()=>this.calcShortestPath()):this.noPathFoundStrategy==="STOP"&&this.stop("NO_PATH_FOUND")),this.updatePosOnPath(),this.isBlocking((T=this.nextTileOnPath())==null?void 0:T.position,(E=this.character)==null?void 0:E.getNextTilePos().layer)?this.applyPathBlockedStrategy(S):this.pathBlockedWaitElapsed=0,this.hasArrived()?(this.stop("SUCCESS"),this.existsDistToTarget()&&this.turnTowardsTarget()):this.isBlocking((F=this.nextTileOnPath())==null?void 0:F.position,(O=this.character)==null?void 0:O.getNextTilePos().layer)||this.moveCharOnPath())}finishedObs(){return this.finished$}getInfo(){return{type:"Target",state:{pathAhead:this.shortestPath.slice(this.posOnPath).map(S=>Ut.fromInternal(S))},config:{algorithm:this.shortestPathAlgorithm,ignoreBlockedTarget:this.ignoreBlockedTarget,distance:this.distance,targetPos:Ut.fromInternal(this.targetPos),noPathFoundStrategy:this.noPathFoundStrategy,pathBlockedStrategy:this.pathBlockedStrategy,noPathFoundRetryBackoffMs:this.noPathFoundRetryable.getBackoffMs(),noPathFoundMaxRetries:this.noPathFoundRetryable.getMaxRetries()}}}resultToReason(S){switch(S){case"SUCCESS":return"Successfully arrived.";case"MOVEMENT_TERMINATED":return"Movement of character has been replaced before destination was reached.";case"PATH_BLOCKED":return"PathBlockedStrategy STOP: Path blocked.";case"NO_PATH_FOUND_MAX_RETRIES_EXCEEDED":return`NoPathFoundStrategy RETRY: Maximum retries of ${this.noPathFoundRetryable.getMaxRetries()} exceeded.`;case"NO_PATH_FOUND":return"NoPathFoundStrategy STOP: No path found.";case"PATH_BLOCKED_MAX_RETRIES_EXCEEDED":return`PathBlockedStrategy RETRY: Maximum retries of ${this.pathBlockedRetryable.getMaxRetries()} exceeded.`;case"PATH_BLOCKED_WAIT_TIMEOUT":return`PathBlockedStrategy WAIT: Wait timeout of ${this.pathBlockedWaitTimeoutMs}ms exceeded.`}}applyPathBlockedStrategy(S){this.pathBlockedStrategy==="RETRY"?this.pathBlockedRetryable.retry(S,()=>{let T=this.getShortestPath();T.path.length>0&&this.calcShortestPath(T)}):this.pathBlockedStrategy==="STOP"?this.stop("PATH_BLOCKED"):this.pathBlockedStrategy==="WAIT"&&this.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=S,this.pathBlockedWaitElapsed>=this.pathBlockedWaitTimeoutMs&&this.stop("PATH_BLOCKED_WAIT_TIMEOUT"))}moveCharOnPath(){let S=this.nextTileOnPath();if(!S)return;let T=this.getDir(this.character.getNextTilePos().position,S.position);this.character.move(T)}nextTileOnPath(){return this.shortestPath[this.posOnPath+1]}stop(S){this.finished$.next({position:this.character.getTilePos().position,result:S,description:this.resultToReason(S),layer:this.character.getTilePos().layer}),this.finished$.complete(),this.stopped=!0}turnTowardsTarget(){let S=this.shortestPath[this.posOnPath+1],T=this.getDir(this.character.getNextTilePos().position,S.position);this.character.turnTowards(T)}existsDistToTarget(){return this.posOnPath=this.shortestPath.length-1}updatePosOnPath(){let S=this.shortestPath[this.posOnPath];for(;this.posOnPath0)return{path:D,distOffset:c}}return this.noPathFoundStrategy=this.noPathFoundAlternativeTargetsFallbackStrategy||"STOP",this.getShortestPath()}}return{path:E,distOffset:0}}pathToAlternativeTarget(S,T){let E=T.findShortestPath(this.character.getNextTilePos(),S,this.getPathfindingOptions()).path,F=this.distanceUtils.distance(S.position,this.targetPos.position);return{path:E,distOffset:F}}getDir(S,T){return this.tilemap.fromMapDirection(this.distanceUtils.direction(S,T))}},f2=Object.create,$d=Object.defineProperty,d2=Object.getOwnPropertyDescriptor,c2=Object.getOwnPropertyNames,v2=Object.getPrototypeOf,p2=Object.prototype.hasOwnProperty,g2=(S,T)=>()=>(T||S((T={exports:{}}).exports,T),T.exports),m2=(S,T,E,F)=>{if(T&&typeof T=="object"||typeof T=="function")for(let O of c2(T))!p2.call(S,O)&&O!==E&&$d(S,O,{get:()=>T[O],enumerable:!(F=d2(T,O))||F.enumerable});return S},uh=(S,T,E)=>(E=S!=null?f2(v2(S)):{},m2(T||!S||!S.__esModule?$d(E,"default",{value:S,enumerable:!0}):E,S)),fh=g2((S,T)=>{(function(){var E,F="4.17.21",O=200,D="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",m="Invalid `variable` option passed into `_.template`",t="__lodash_hash_undefined__",o=500,v="__lodash_placeholder__",a=1,r=2,n=4,e=1,i=2,h=1,s=2,l=4,f=8,u=16,d=32,p=64,g=128,y=256,x=512,C=30,P="...",M=800,w=16,I=1,L=2,B=3,N=1/0,G=9007199254740991,V=17976931348623157e292,K=NaN,j=4294967295,J=j-1,X=j>>>1,Y=[["ary",g],["bind",h],["bindKey",s],["curry",f],["curryRight",u],["flip",x],["partial",d],["partialRight",p],["rearg",y]],b="[object Arguments]",z="[object Array]",W="[object AsyncFunction]",H="[object Boolean]",Z="[object Date]",Q="[object DOMException]",k="[object Error]",et="[object Function]",st="[object GeneratorFunction]",rt="[object Map]",ot="[object Number]",ft="[object Null]",at="[object Object]",vt="[object Promise]",At="[object Proxy]",Et="[object RegExp]",Pt="[object Set]",ct="[object String]",Ct="[object Symbol]",pt="[object Undefined]",wt="[object WeakMap]",Bt="[object WeakSet]",jt="[object ArrayBuffer]",zt="[object DataView]",Yt="[object Float32Array]",bt="[object Float64Array]",ne="[object Int8Array]",Qt="[object Int16Array]",fe="[object Int32Array]",ce="[object Uint8Array]",Pe="[object Uint8ClampedArray]",ri="[object Uint16Array]",ai="[object Uint32Array]",xi=/\b__p \+= '';/g,yi=/\b(__p \+=) '' \+/g,Ti=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xh=/&(?:amp|lt|gt|quot|#39);/g,yh=/[&<>"']/g,Oc=RegExp(xh.source),Dc=RegExp(yh.source),Ic=/<%-([\s\S]+?)%>/g,Bc=/<%([\s\S]+?)%>/g,Th=/<%=([\s\S]+?)%>/g,bc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Nc=/^\w*$/,Gc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sa=/[\\^$.*+?()[\]{}|]/g,zc=RegExp(sa.source),na=/^\s+/,Uc=/\s/,Xc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Vc=/\{\n\/\* \[wrapped with (.+)\] \*/,Wc=/,? & /,Yc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Hc=/[()=,{}\[\]\/\s]/,Kc=/\\(\\)?/g,jc=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Sh=/\w*$/,$c=/^[-+]0x[0-9a-f]+$/i,Zc=/^0b[01]+$/i,Jc=/^\[object .+?Constructor\]$/,Qc=/^0o[0-7]+$/i,kc=/^(?:0|[1-9]\d*)$/,qc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Tn=/($^)/,_c=/['\n\r\u2028\u2029\\]/g,Sn="\\ud800-\\udfff",tv="\\u0300-\\u036f",ev="\\ufe20-\\ufe2f",iv="\\u20d0-\\u20ff",Ch=tv+ev+iv,Eh="\\u2700-\\u27bf",Ph="a-z\\xdf-\\xf6\\xf8-\\xff",sv="\\xac\\xb1\\xd7\\xf7",nv="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rv="\\u2000-\\u206f",av=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ah="A-Z\\xc0-\\xd6\\xd8-\\xde",Mh="\\ufe0e\\ufe0f",wh=sv+nv+rv+av,ra="['’]",ov="["+Sn+"]",Rh="["+wh+"]",Cn="["+Ch+"]",Fh="\\d+",hv="["+Eh+"]",Lh="["+Ph+"]",Oh="[^"+Sn+wh+Fh+Eh+Ph+Ah+"]",aa="\\ud83c[\\udffb-\\udfff]",lv="(?:"+Cn+"|"+aa+")",Dh="[^"+Sn+"]",oa="(?:\\ud83c[\\udde6-\\uddff]){2}",ha="[\\ud800-\\udbff][\\udc00-\\udfff]",ds="["+Ah+"]",Ih="\\u200d",Bh="(?:"+Lh+"|"+Oh+")",uv="(?:"+ds+"|"+Oh+")",bh="(?:"+ra+"(?:d|ll|m|re|s|t|ve))?",Nh="(?:"+ra+"(?:D|LL|M|RE|S|T|VE))?",Gh=lv+"?",zh="["+Mh+"]?",fv="(?:"+Ih+"(?:"+[Dh,oa,ha].join("|")+")"+zh+Gh+")*",dv="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",cv="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Uh=zh+Gh+fv,vv="(?:"+[hv,oa,ha].join("|")+")"+Uh,pv="(?:"+[Dh+Cn+"?",Cn,oa,ha,ov].join("|")+")",gv=RegExp(ra,"g"),mv=RegExp(Cn,"g"),la=RegExp(aa+"(?="+aa+")|"+pv+Uh,"g"),xv=RegExp([ds+"?"+Lh+"+"+bh+"(?="+[Rh,ds,"$"].join("|")+")",uv+"+"+Nh+"(?="+[Rh,ds+Bh,"$"].join("|")+")",ds+"?"+Bh+"+"+bh,ds+"+"+Nh,cv,dv,Fh,vv].join("|"),"g"),yv=RegExp("["+Ih+Sn+Ch+Mh+"]"),Tv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Sv=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Cv=-1,re={};re[Yt]=re[bt]=re[ne]=re[Qt]=re[fe]=re[ce]=re[Pe]=re[ri]=re[ai]=!0,re[b]=re[z]=re[jt]=re[H]=re[zt]=re[Z]=re[k]=re[et]=re[rt]=re[ot]=re[at]=re[Et]=re[Pt]=re[ct]=re[wt]=!1;var se={};se[b]=se[z]=se[jt]=se[zt]=se[H]=se[Z]=se[Yt]=se[bt]=se[ne]=se[Qt]=se[fe]=se[rt]=se[ot]=se[at]=se[Et]=se[Pt]=se[ct]=se[Ct]=se[ce]=se[Pe]=se[ri]=se[ai]=!0,se[k]=se[et]=se[wt]=!1;var Ev={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Pv={"&":"&","<":"<",">":">",'"':""","'":"'"},Av={"&":"&","<":"<",">":">",""":'"',"'":"'"},Mv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wv=parseFloat,Rv=parseInt,Xh=typeof global=="object"&&global&&global.Object===Object&&global,Fv=typeof self=="object"&&self&&self.Object===Object&&self,Se=Xh||Fv||Function("return this")(),ua=typeof S=="object"&&S&&!S.nodeType&&S,Zi=ua&&typeof T=="object"&&T&&!T.nodeType&&T,Vh=Zi&&Zi.exports===ua,fa=Vh&&Xh.process,je=function(){try{var ht=Zi&&Zi.require&&Zi.require("util").types;return ht||fa&&fa.binding&&fa.binding("util")}catch{}}(),Wh=je&&je.isArrayBuffer,Yh=je&&je.isDate,Hh=je&&je.isMap,Kh=je&&je.isRegExp,jh=je&&je.isSet,$h=je&&je.isTypedArray;function ze(ht,gt,dt){switch(dt.length){case 0:return ht.call(gt);case 1:return ht.call(gt,dt[0]);case 2:return ht.call(gt,dt[0],dt[1]);case 3:return ht.call(gt,dt[0],dt[1],dt[2])}return ht.apply(gt,dt)}function Lv(ht,gt,dt,Rt){for(var Nt=-1,kt=ht==null?0:ht.length;++Nt-1}function da(ht,gt,dt){for(var Rt=-1,Nt=ht==null?0:ht.length;++Rt-1;);return dt}function el(ht,gt){for(var dt=ht.length;dt--&&cs(gt,ht[dt],0)>-1;);return dt}function Uv(ht,gt){for(var dt=ht.length,Rt=0;dt--;)ht[dt]===gt&&++Rt;return Rt}var Xv=ga(Ev),Vv=ga(Pv);function Wv(ht){return"\\"+Mv[ht]}function Yv(ht,gt){return ht==null?E:ht[gt]}function vs(ht){return yv.test(ht)}function Hv(ht){return Tv.test(ht)}function Kv(ht){for(var gt,dt=[];!(gt=ht.next()).done;)dt.push(gt.value);return dt}function Ta(ht){var gt=-1,dt=Array(ht.size);return ht.forEach(function(Rt,Nt){dt[++gt]=[Nt,Rt]}),dt}function il(ht,gt){return function(dt){return ht(gt(dt))}}function Bi(ht,gt){for(var dt=-1,Rt=ht.length,Nt=0,kt=[];++dt-1}function Dp(A,R){var U=this.__data__,$=Xn(U,A);return $<0?(++this.size,U.push([A,R])):U[$][1]=R,this}Si.prototype.clear=Rp,Si.prototype.delete=Fp,Si.prototype.get=Lp,Si.prototype.has=Op,Si.prototype.set=Dp;function Ci(A){var R=-1,U=A==null?0:A.length;for(this.clear();++R=R?A:R)),A}function Qe(A,R,U,$,q,tt){var it,nt=R&a,lt=R&r,mt=R&n;if(U&&(it=q?U(A,$,q,tt):U(A)),it!==E)return it;if(!he(A))return A;var xt=Gt(A);if(xt){if(it=N0(A),!nt)return Ie(A,it)}else{var Tt=Re(A),Mt=Tt==et||Tt==st;if(Vi(A))return zl(A,nt);if(Tt==at||Tt==b||Mt&&!q){if(it=lt||Mt?{}:su(A),!nt)return lt?A0(A,Zp(it,A)):P0(A,vl(it,A))}else{if(!se[Tt])return q?A:{};it=G0(A,Tt,nt)}}tt||(tt=new hi);var Ft=tt.get(A);if(Ft)return Ft;tt.set(A,it),Du(A)?A.forEach(function(It){it.add(Qe(It,R,U,It,A,tt))}):Lu(A)&&A.forEach(function(It,Ht){it.set(Ht,Qe(It,R,U,Ht,A,tt))});var Dt=mt?lt?ja:Ka:lt?be:Ce,Vt=xt?E:Dt(A);return $e(Vt||A,function(It,Ht){Vt&&(Ht=It,It=A[Ht]),Ws(it,Ht,Qe(It,R,U,Ht,A,tt))}),it}function Jp(A){var R=Ce(A);return function(U){return pl(U,A,R)}}function pl(A,R,U){var $=U.length;if(A==null)return!$;for(A=ie(A);$--;){var q=U[$],tt=R[q],it=A[q];if(it===E&&!(q in A)||!tt(it))return!1}return!0}function gl(A,R,U){if(typeof A!="function")throw new Ze(c);return Js(function(){A.apply(E,U)},R)}function Ys(A,R,U,$){var q=-1,tt=En,it=!0,nt=A.length,lt=[],mt=R.length;if(!nt)return lt;U&&(R=ae(R,Ue(U))),$?(tt=da,it=!1):R.length>=O&&(tt=Ns,it=!1,R=new ki(R));t:for(;++qq?0:q+U),$=$===E||$>q?q:Xt($),$<0&&($+=q),$=U>$?0:Bu($);U<$;)A[U++]=R;return A}function xl(A,R){var U=[];return Gi(A,function($,q,tt){R($,q,tt)&&U.push($)}),U}function Ae(A,R,U,$,q){var tt=-1,it=A.length;for(U||(U=U0),q||(q=[]);++tt0&&U(nt)?R>1?Ae(nt,R-1,U,$,q):Ii(q,nt):$||(q[q.length]=nt)}return q}var wa=Hl(),yl=Hl(!0);function di(A,R){return A&&wa(A,R,Ce)}function Ra(A,R){return A&&yl(A,R,Ce)}function Wn(A,R){return Di(R,function(U){return wi(A[U])})}function _i(A,R){R=Ui(R,A);for(var U=0,$=R.length;A!=null&&U<$;)A=A[vi(R[U++])];return U&&U==$?A:E}function Tl(A,R,U){var $=R(A);return Gt(A)?$:Ii($,U(A))}function Le(A){return A==null?A===E?pt:ft:Ji&&Ji in ie(A)?I0(A):j0(A)}function Fa(A,R){return A>R}function qp(A,R){return A!=null&&_t.call(A,R)}function _p(A,R){return A!=null&&R in ie(A)}function t0(A,R,U){return A>=we(R,U)&&A=120&&xt.length>=120)?new ki(it&&xt):E}xt=A[0];var Tt=-1,Mt=nt[0];t:for(;++Tt-1;)nt!==A&&In.call(nt,lt,1),In.call(A,lt,1);return A}function Ll(A,R){for(var U=A?R.length:0,$=U-1;U--;){var q=R[U];if(U==$||q!==tt){var tt=q;Mi(q)?In.call(A,q,1):za(A,q)}}return A}function ba(A,R){return A+Nn(ul()*(R-A+1))}function c0(A,R,U,$){for(var q=-1,tt=ye(bn((R-A)/(U||1)),0),it=dt(tt);tt--;)it[$?tt:++q]=A,A+=U;return it}function Na(A,R){var U="";if(!A||R<1||R>G)return U;do R%2&&(U+=A),R=Nn(R/2),R&&(A+=A);while(R);return U}function Wt(A,R){return _a(au(A,R,Ne),A+"")}function v0(A){return cl(Ps(A))}function p0(A,R){var U=Ps(A);return _n(U,qi(R,0,U.length))}function js(A,R,U,$){if(!he(A))return A;R=Ui(R,A);for(var q=-1,tt=R.length,it=tt-1,nt=A;nt!=null&&++qq?0:q+R),U=U>q?q:U,U<0&&(U+=q),q=R>U?0:U-R>>>0,R>>>=0;for(var tt=dt(q);++$>>1,it=A[tt];it!==null&&!Ve(it)&&(U?it<=R:it=O){var mt=R?null:F0(A);if(mt)return An(mt);it=!1,q=Ns,lt=new ki}else lt=R?[]:nt;t:for(;++$=$?A:ke(A,R,U)}var Gl=ap||function(A){return Se.clearTimeout(A)};function zl(A,R){if(R)return A.slice();var U=A.length,$=rl?rl(U):new A.constructor(U);return A.copy($),$}function Wa(A){var R=new A.constructor(A.byteLength);return new On(R).set(new On(A)),R}function T0(A,R){var U=R?Wa(A.buffer):A.buffer;return new A.constructor(U,A.byteOffset,A.byteLength)}function S0(A){var R=new A.constructor(A.source,Sh.exec(A));return R.lastIndex=A.lastIndex,R}function C0(A){return Vs?ie(Vs.call(A)):{}}function Ul(A,R){var U=R?Wa(A.buffer):A.buffer;return new A.constructor(U,A.byteOffset,A.length)}function Xl(A,R){if(A!==R){var U=A!==E,$=A===null,q=A===A,tt=Ve(A),it=R!==E,nt=R===null,lt=R===R,mt=Ve(R);if(!nt&&!mt&&!tt&&A>R||tt&&it&<&&!nt&&!mt||$&&it&<||!U&<||!q)return 1;if(!$&&!tt&&!mt&&A=nt)return lt;var mt=U[$];return lt*(mt=="desc"?-1:1)}}return A.index-R.index}function Vl(A,R,U,$){for(var q=-1,tt=A.length,it=U.length,nt=-1,lt=R.length,mt=ye(tt-it,0),xt=dt(lt+mt),Tt=!$;++nt1?U[q-1]:E,it=q>2?U[2]:E;for(tt=A.length>3&&typeof tt=="function"?(q--,tt):E,it&&Oe(U[0],U[1],it)&&(tt=q<3?E:tt,q=1),R=ie(R);++$-1?q[tt?R[it]:it]:E}}function $l(A){return Ai(function(R){var U=R.length,$=U,q=Je.prototype.thru;for(A&&R.reverse();$--;){var tt=R[$];if(typeof tt!="function")throw new Ze(c);if(q&&!it&&kn(tt)=="wrapper")var it=new Je([],!0)}for($=it?$:U;++$1&&$t.reverse(),xt&<nt))return!1;var mt=tt.get(A),xt=tt.get(R);if(mt&&xt)return mt==R&&xt==A;var Tt=-1,Mt=!0,Ft=U&i?new ki:E;for(tt.set(A,R),tt.set(R,A);++Tt1?"& ":"")+R[$],R=R.join(U>2?", ":" "),A.replace(Xc,`{ /* [wrapped with `+R+`] */ -`)}function Cp(P){return Nt(P)||Ji(P)||!!(Ah&&P&&P[Ah])}function Ti(P,R){var U=typeof P;return R=R??G,!!R&&(U=="number"||U!="symbol"&&Bd.test(P))&&P>-1&&P%1==0&&P0){if(++R>=M)return arguments[0]}else R=0;return P.apply(A,arguments)}}function zn(P,R){var U=-1,j=P.length,q=j-1;for(R=R===A?j:R;++U1?P[R-1]:A;return U=typeof U=="function"?(P.pop(),U):A,bl(P,U)});function Nl(P){var R=_(P);return R.__chain__=!0,R}function I0(P,R){return R(P),P}function Un(P,R){return R(P)}var B0=yi(function(P){var R=P.length,U=R?P[0]:0,j=this.__wrapped__,q=function(tt){return sa(tt,P)};return R>1||this.__actions__.length||!(j instanceof Ht)||!Ti(U)?this.thru(q):(j=j.slice(U,+U+(R?1:0)),j.__actions__.push({func:Un,args:[q],thisArg:A}),new $e(j,this.__chain__).thru(function(tt){return R&&!tt.length&&tt.push(A),tt}))});function b0(){return Nl(this)}function N0(){return new $e(this.value(),this.__chain__)}function G0(){this.__values__===A&&(this.__values__=Ql(this.value()));var P=this.__index__>=this.__values__.length,R=P?A:this.__values__[this.__index__++];return{done:P,value:R}}function z0(){return this}function U0(P){for(var R,U=this;U instanceof Pn;){var j=Fl(U);j.__index__=0,j.__values__=A,R?q.__wrapped__=j:R=j;var q=j;U=U.__wrapped__}return q.__wrapped__=P,R}function X0(){var P=this.__wrapped__;if(P instanceof Ht){var R=P;return this.__actions__.length&&(R=new Ht(this)),R=R.reverse(),R.__actions__.push({func:Un,args:[Oa],thisArg:A}),new $e(R,this.__chain__)}return this.thru(Oa)}function V0(){return qh(this.__wrapped__,this.__actions__)}var W0=On(function(P,R,U){kt.call(P,U)?++P[U]:mi(P,U,1)});function Y0(P,R,U){var j=Nt(P)?fh:Iv;return U&&we(P,R,U)&&(R=A),j(P,Lt(R,3))}function H0(P,R){var U=Nt(P)?Ai:bh;return U(P,Lt(R,3))}var K0=ll(Ll),$0=ll(Ol);function j0(P,R){return Ce(Xn(P,R),1)}function Z0(P,R){return Ce(Xn(P,R),N)}function J0(P,R,U){return U=U===A?1:Ut(U),Ce(Xn(P,R),U)}function Gl(P,R){var U=Nt(P)?He:Li;return U(P,Lt(R,3))}function zl(P,R){var U=Nt(P)?vc:Bh;return U(P,Lt(R,3))}var Q0=On(function(P,R,U){kt.call(P,U)?P[U].push(R):mi(P,U,[R])});function k0(P,R,U,j){P=Le(P)?P:ms(P),U=U&&!j?Ut(U):0;var q=P.length;return U<0&&(U=ge(q+U,0)),Kn(P)?U<=q&&P.indexOf(R,U)>-1:!!q&&as(P,R,U)>-1}var q0=Vt(function(P,R,U){var j=-1,q=typeof R=="function",tt=Le(P)?dt(P.length):[];return Li(P,function(it){tt[++j]=q?be(R,it,U):bs(it,R,U)}),tt}),_0=On(function(P,R,U){mi(P,U,R)});function Xn(P,R){var U=Nt(P)?ne:Vh;return U(P,Lt(R,3))}function tg(P,R,U,j){return P==null?[]:(Nt(R)||(R=R==null?[]:[R]),U=j?A:U,Nt(U)||(U=U==null?[]:[U]),Kh(P,R,U))}var eg=On(function(P,R,U){P[U?0:1].push(R)},function(){return[[],[]]});function ig(P,R,U){var j=Nt(P)?Hr:ph,q=arguments.length<3;return j(P,Lt(R,4),U,q,Li)}function sg(P,R,U){var j=Nt(P)?pc:ph,q=arguments.length<3;return j(P,Lt(R,4),U,q,Bh)}function ng(P,R){var U=Nt(P)?Ai:bh;return U(P,Yn(Lt(R,3)))}function rg(P){var R=Nt(P)?Lh:kv;return R(P)}function ag(P,R,U){(U?we(P,R,U):R===A)?R=1:R=Ut(R);var j=Nt(P)?Rv:qv;return j(P,R)}function og(P){var R=Nt(P)?Fv:tp;return R(P)}function hg(P){if(P==null)return 0;if(Le(P))return Kn(P)?hs(P):P.length;var R=Ae(P);return R==rt||R==Et?P.size:la(P).length}function lg(P,R,U){var j=Nt(P)?Kr:ep;return U&&we(P,R,U)&&(R=A),j(P,Lt(R,3))}var ug=Vt(function(P,R){if(P==null)return[];var U=R.length;return U>1&&we(P,R[0],R[1])?R=[]:U>2&&we(R[0],R[1],R[2])&&(R=[R[0]]),Kh(P,Ce(R,1),[])}),Vn=Hc||function(){return xe.Date.now()};function fg(P,R){if(typeof R!="function")throw new Ke(c);return P=Ut(P),function(){if(--P<1)return R.apply(this,arguments)}}function Ul(P,R,U){return R=U?A:R,R=P&&R==null?P.length:R,xi(P,g,A,A,A,A,R)}function Xl(P,R){var U;if(typeof R!="function")throw new Ke(c);return P=Ut(P),function(){return--P>0&&(U=R.apply(this,arguments)),P<=1&&(R=A),U}}var Ia=Vt(function(P,R,U){var j=h;if(U.length){var q=wi(U,ps(Ia));j|=d}return xi(P,j,R,U,q)}),Vl=Vt(function(P,R,U){var j=h|s;if(U.length){var q=wi(U,ps(Vl));j|=d}return xi(R,j,P,U,q)});function Wl(P,R,U){R=U?A:R;var j=xi(P,f,A,A,A,A,A,R);return j.placeholder=Wl.placeholder,j}function Yl(P,R,U){R=U?A:R;var j=xi(P,u,A,A,A,A,A,R);return j.placeholder=Yl.placeholder,j}function Hl(P,R,U){var j,q,tt,it,nt,lt,mt=0,xt=!1,yt=!1,At=!0;if(typeof P!="function")throw new Ke(c);R=Qe(R)||0,ae(U)&&(xt=!!U.leading,yt="maxWait"in U,tt=yt?ge(Qe(U.maxWait)||0,R):tt,At="trailing"in U?!!U.trailing:At);function Rt(ce){var ai=j,Ei=q;return j=q=A,mt=ce,it=P.apply(Ei,ai),it}function Ot(ce){return mt=ce,nt=Xs(Yt,R),xt?Rt(ce):it}function Xt(ce){var ai=ce-lt,Ei=ce-mt,lu=R-ai;return yt?Pe(lu,tt-Ei):lu}function Dt(ce){var ai=ce-lt,Ei=ce-mt;return lt===A||ai>=R||ai<0||yt&&Ei>=tt}function Yt(){var ce=Vn();if(Dt(ce))return $t(ce);nt=Xs(Yt,Xt(ce))}function $t(ce){return nt=A,At&&j?Rt(ce):(j=q=A,it)}function Ue(){nt!==A&&tl(nt),mt=0,j=lt=q=nt=A}function Re(){return nt===A?it:$t(Vn())}function Xe(){var ce=Vn(),ai=Dt(ce);if(j=arguments,q=this,lt=ce,ai){if(nt===A)return Ot(lt);if(yt)return tl(nt),nt=Xs(Yt,R),Rt(lt)}return nt===A&&(nt=Xs(Yt,R)),it}return Xe.cancel=Ue,Xe.flush=Re,Xe}var dg=Vt(function(P,R){return Ih(P,1,R)}),cg=Vt(function(P,R,U){return Ih(P,Qe(R)||0,U)});function vg(P){return xi(P,x)}function Wn(P,R){if(typeof P!="function"||R!=null&&typeof R!="function")throw new Ke(c);var U=function(){var j=arguments,q=R?R.apply(this,j):j[0],tt=U.cache;if(tt.has(q))return tt.get(q);var it=P.apply(this,j);return U.cache=tt.set(q,it)||tt,it};return U.cache=new(Wn.Cache||gi),U}Wn.Cache=gi;function Yn(P){if(typeof P!="function")throw new Ke(c);return function(){var R=arguments;switch(R.length){case 0:return!P.call(this);case 1:return!P.call(this,R[0]);case 2:return!P.call(this,R[0],R[1]);case 3:return!P.call(this,R[0],R[1],R[2])}return!P.apply(this,R)}}function pg(P){return Xl(2,P)}var gg=ip(function(P,R){R=R.length==1&&Nt(R[0])?ne(R[0],Ne(Lt())):ne(Ce(R,1),Ne(Lt()));var U=R.length;return Vt(function(j){for(var q=-1,tt=Pe(j.length,U);++q=R}),Ji=zh(function(){return arguments}())?zh:function(P){return ue(P)&&kt.call(P,"callee")&&!Ph.call(P,"callee")},Nt=dt.isArray,Og=rh?Ne(rh):Uv;function Le(P){return P!=null&&Hn(P.length)&&!Si(P)}function de(P){return ue(P)&&Le(P)}function Dg(P){return P===!0||P===!1||ue(P)&&Me(P)==H}var Bi=$c||Ka,Ig=ah?Ne(ah):Xv;function Bg(P){return ue(P)&&P.nodeType===1&&!Vs(P)}function bg(P){if(P==null)return!0;if(Le(P)&&(Nt(P)||typeof P=="string"||typeof P.splice=="function"||Bi(P)||gs(P)||Ji(P)))return!P.length;var R=Ae(P);if(R==rt||R==Et)return!P.size;if(Us(P))return!la(P).length;for(var U in P)if(kt.call(P,U))return!1;return!0}function Ng(P,R){return Ns(P,R)}function Gg(P,R,U){U=typeof U=="function"?U:A;var j=U?U(P,R):A;return j===A?Ns(P,R,A,U):!!j}function ba(P){if(!ue(P))return!1;var R=Me(P);return R==k||R==Q||typeof P.message=="string"&&typeof P.name=="string"&&!Vs(P)}function zg(P){return typeof P=="number"&&Mh(P)}function Si(P){if(!ae(P))return!1;var R=Me(P);return R==et||R==st||R==W||R==Pt}function $l(P){return typeof P=="number"&&P==Ut(P)}function Hn(P){return typeof P=="number"&&P>-1&&P%1==0&&P<=G}function ae(P){var R=typeof P;return P!=null&&(R=="object"||R=="function")}function ue(P){return P!=null&&typeof P=="object"}var jl=oh?Ne(oh):Wv;function Ug(P,R){return P===R||ha(P,R,Aa(R))}function Xg(P,R,U){return U=typeof U=="function"?U:A,ha(P,R,Aa(R),U)}function Vg(P){return Zl(P)&&P!=+P}function Wg(P){if(Ap(P))throw new bt(b);return Uh(P)}function Yg(P){return P===null}function Hg(P){return P==null}function Zl(P){return typeof P=="number"||ue(P)&&Me(P)==ot}function Vs(P){if(!ue(P)||Me(P)!=at)return!1;var R=mn(P);if(R===null)return!0;var U=kt.call(R,"constructor")&&R.constructor;return typeof U=="function"&&U instanceof U&&cn.call(U)==Xc}var Na=hh?Ne(hh):Yv;function Kg(P){return $l(P)&&P>=-G&&P<=G}var Jl=lh?Ne(lh):Hv;function Kn(P){return typeof P=="string"||!Nt(P)&&ue(P)&&Me(P)==ct}function ze(P){return typeof P=="symbol"||ue(P)&&Me(P)==Tt}var gs=uh?Ne(uh):Kv;function $g(P){return P===A}function jg(P){return ue(P)&&Ae(P)==Mt}function Zg(P){return ue(P)&&Me(P)==It}var Jg=bn(ua),Qg=bn(function(P,R){return P<=R});function Ql(P){if(!P)return[];if(Le(P))return Kn(P)?si(P):Fe(P);if(Rs&&P[Rs])return Rc(P[Rs]());var R=Ae(P),U=R==rt?kr:R==Et?un:ms;return U(P)}function Ci(P){if(!P)return P===0?P:0;if(P=Qe(P),P===N||P===-N){var R=P<0?-1:1;return R*V}return P===P?P:0}function Ut(P){var R=Ci(P),U=R%1;return R===R?U?R-U:R:0}function kl(P){return P?Ki(Ut(P),0,$):0}function Qe(P){if(typeof P=="number")return P;if(ze(P))return K;if(ae(P)){var R=typeof P.valueOf=="function"?P.valueOf():P;P=ae(R)?R+"":R}if(typeof P!="string")return P===0?P:+P;P=gh(P);var U=Od.test(P);return U||Id.test(P)?fc(P.slice(2),U?2:8):Ld.test(P)?K:+P}function ql(P){return li(P,Oe(P))}function kg(P){return P?Ki(Ut(P),-G,G):P===0?P:0}function Qt(P){return P==null?"":Ge(P)}var qg=cs(function(P,R){if(Us(R)||Le(R)){li(R,ye(R),P);return}for(var U in R)kt.call(R,U)&&Is(P,U,R[U])}),_l=cs(function(P,R){li(R,Oe(R),P)}),$n=cs(function(P,R,U,j){li(R,Oe(R),P,j)}),_g=cs(function(P,R,U,j){li(R,ye(R),P,j)}),tm=yi(sa);function em(P,R){var U=ds(P);return R==null?U:Oh(U,R)}var im=Vt(function(P,R){P=te(P);var U=-1,j=R.length,q=j>2?R[2]:A;for(q&&we(R[0],R[1],q)&&(j=1);++U1),tt}),li(P,Ea(P),U),j&&(U=je(U,o|r|n,cp));for(var q=R.length;q--;)pa(U,R[q]);return U});function Tm(P,R){return eu(P,Yn(Lt(R)))}var Sm=yi(function(P,R){return P==null?{}:Zv(P,R)});function eu(P,R){if(P==null)return{};var U=ne(Ea(P),function(j){return[j]});return R=Lt(R),$h(P,U,function(j,q){return R(j,q[0])})}function Cm(P,R,U){R=Di(R,P);var j=-1,q=R.length;for(q||(q=1,P=A);++jR){var j=P;P=R,R=j}if(U||P%1||R%1){var q=wh();return Pe(P+q*(R-P+uc("1e-"+((q+"").length-1))),R)}return da(P,R)}var Im=vs(function(P,R,U){return R=R.toLowerCase(),P+(U?nu(R):R)});function nu(P){return Ua(Qt(P).toLowerCase())}function ru(P){return P=Qt(P),P&&P.replace(bd,Ec).replace(tc,"")}function Bm(P,R,U){P=Qt(P),R=Ge(R);var j=P.length;U=U===A?j:Ki(Ut(U),0,j);var q=U;return U-=R.length,U>=0&&P.slice(U,q)==R}function bm(P){return P=Qt(P),P&&pd.test(P)?P.replace(No,Pc):P}function Nm(P){return P=Qt(P),P&&Sd.test(P)?P.replace(Br,"\\$&"):P}var Gm=vs(function(P,R,U){return P+(U?"-":"")+R.toLowerCase()}),zm=vs(function(P,R,U){return P+(U?" ":"")+R.toLowerCase()}),Um=hl("toLowerCase");function Xm(P,R,U){P=Qt(P),R=Ut(R);var j=R?hs(P):0;if(!R||j>=R)return P;var q=(R-j)/2;return Bn(Sn(q),U)+P+Bn(Tn(q),U)}function Vm(P,R,U){P=Qt(P),R=Ut(R);var j=R?hs(P):0;return R&&j>>0,U?(P=Qt(P),P&&(typeof R=="string"||R!=null&&!Na(R))&&(R=Ge(R),!R&&os(P))?Ii(si(P),0,U):P.split(R,U)):[]}var Zm=vs(function(P,R,U){return P+(U?" ":"")+Ua(R)});function Jm(P,R,U){return P=Qt(P),U=U==null?0:Ki(Ut(U),0,P.length),R=Ge(R),P.slice(U,U+R.length)==R}function Qm(P,R,U){var j=_.templateSettings;U&&we(P,R,U)&&(R=A),P=Qt(P),R=$n({},R,j,pl);var q=$n({},R.imports,j.imports,pl),tt=ye(q),it=Qr(q,tt),nt,lt,mt=0,xt=R.interpolate||rn,yt="__p += '",At=qr((R.escape||rn).source+"|"+xt.source+"|"+(xt===Go?Fd:rn).source+"|"+(R.evaluate||rn).source+"|$","g"),Rt="//# sourceURL="+(kt.call(R,"sourceURL")?(R.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rc+"]")+` -`;P.replace(At,function(Dt,Yt,$t,Ue,Re,Xe){return $t||($t=Ue),yt+=P.slice(mt,Xe).replace(Nd,Ac),Yt&&(nt=!0,yt+=`' + -__e(`+Yt+`) + -'`),Re&&(lt=!0,yt+=`'; -`+Re+`; -__p += '`),$t&&(yt+=`' + +`)}function U0(A){return Gt(A)||is(A)||!!(hl&&A&&A[hl])}function Mi(A,R){var U=typeof A;return R=R??G,!!R&&(U=="number"||U!="symbol"&&kc.test(A))&&A>-1&&A%1==0&&A0){if(++R>=M)return arguments[0]}else R=0;return A.apply(E,arguments)}}function _n(A,R){var U=-1,$=A.length,q=$-1;for(R=R===E?$:R;++U1?A[R-1]:E;return U=typeof U=="function"?(A.pop(),U):E,xu(A,U)});function yu(A){var R=_(A);return R.__chain__=!0,R}function Qg(A,R){return R(A),A}function tr(A,R){return R(A)}var kg=Ai(function(A){var R=A.length,U=R?A[0]:0,$=this.__wrapped__,q=function(tt){return Ma(tt,A)};return R>1||this.__actions__.length||!($ instanceof Kt)||!Mi(U)?this.thru(q):($=$.slice(U,+U+(R?1:0)),$.__actions__.push({func:tr,args:[q],thisArg:E}),new Je($,this.__chain__).thru(function(tt){return R&&!tt.length&&tt.push(E),tt}))});function qg(){return yu(this)}function _g(){return new Je(this.value(),this.__chain__)}function tm(){this.__values__===E&&(this.__values__=Iu(this.value()));var A=this.__index__>=this.__values__.length,R=A?E:this.__values__[this.__index__++];return{done:A,value:R}}function em(){return this}function im(A){for(var R,U=this;U instanceof Un;){var $=du(U);$.__index__=0,$.__values__=E,R?q.__wrapped__=$:R=$;var q=$;U=U.__wrapped__}return q.__wrapped__=A,R}function sm(){var A=this.__wrapped__;if(A instanceof Kt){var R=A;return this.__actions__.length&&(R=new Kt(this)),R=R.reverse(),R.__actions__.push({func:tr,args:[to],thisArg:E}),new Je(R,this.__chain__)}return this.thru(to)}function nm(){return bl(this.__wrapped__,this.__actions__)}var rm=jn(function(A,R,U){_t.call(A,U)?++A[U]:Ei(A,U,1)});function am(A,R,U){var $=Gt(A)?Zh:Qp;return U&&Oe(A,R,U)&&(R=E),$(A,Ot(R,3))}function om(A,R){var U=Gt(A)?Di:xl;return U(A,Ot(R,3))}var hm=jl(cu),lm=jl(vu);function um(A,R){return Ae(er(A,R),1)}function fm(A,R){return Ae(er(A,R),N)}function dm(A,R,U){return U=U===E?1:Xt(U),Ae(er(A,R),U)}function Tu(A,R){var U=Gt(A)?$e:Gi;return U(A,Ot(R,3))}function Su(A,R){var U=Gt(A)?Ov:ml;return U(A,Ot(R,3))}var cm=jn(function(A,R,U){_t.call(A,U)?A[U].push(R):Ei(A,U,[R])});function vm(A,R,U,$){A=Be(A)?A:Ps(A),U=U&&!$?Xt(U):0;var q=A.length;return U<0&&(U=ye(q+U,0)),ar(A)?U<=q&&A.indexOf(R,U)>-1:!!q&&cs(A,R,U)>-1}var pm=Wt(function(A,R,U){var $=-1,q=typeof R=="function",tt=Be(A)?dt(A.length):[];return Gi(A,function(it){tt[++$]=q?ze(R,it,U):Hs(it,R,U)}),tt}),gm=jn(function(A,R,U){Ei(A,U,R)});function er(A,R){var U=Gt(A)?ae:Pl;return U(A,Ot(R,3))}function mm(A,R,U,$){return A==null?[]:(Gt(R)||(R=R==null?[]:[R]),U=$?E:U,Gt(U)||(U=U==null?[]:[U]),Rl(A,R,U))}var xm=jn(function(A,R,U){A[U?0:1].push(R)},function(){return[[],[]]});function ym(A,R,U){var $=Gt(A)?ca:qh,q=arguments.length<3;return $(A,Ot(R,4),U,q,Gi)}function Tm(A,R,U){var $=Gt(A)?Dv:qh,q=arguments.length<3;return $(A,Ot(R,4),U,q,ml)}function Sm(A,R){var U=Gt(A)?Di:xl;return U(A,nr(Ot(R,3)))}function Cm(A){var R=Gt(A)?cl:v0;return R(A)}function Em(A,R,U){(U?Oe(A,R,U):R===E)?R=1:R=Xt(R);var $=Gt(A)?Kp:p0;return $(A,R)}function Pm(A){var R=Gt(A)?jp:m0;return R(A)}function Am(A){if(A==null)return 0;if(Be(A))return ar(A)?ps(A):A.length;var R=Re(A);return R==rt||R==Pt?A.size:Da(A).length}function Mm(A,R,U){var $=Gt(A)?va:x0;return U&&Oe(A,R,U)&&(R=E),$(A,Ot(R,3))}var wm=Wt(function(A,R){if(A==null)return[];var U=R.length;return U>1&&Oe(A,R[0],R[1])?R=[]:U>2&&Oe(R[0],R[1],R[2])&&(R=[R[0]]),Rl(A,Ae(R,1),[])}),ir=op||function(){return Se.Date.now()};function Rm(A,R){if(typeof R!="function")throw new Ze(c);return A=Xt(A),function(){if(--A<1)return R.apply(this,arguments)}}function Cu(A,R,U){return R=U?E:R,R=A&&R==null?A.length:R,Pi(A,g,E,E,E,E,R)}function Eu(A,R){var U;if(typeof R!="function")throw new Ze(c);return A=Xt(A),function(){return--A>0&&(U=R.apply(this,arguments)),A<=1&&(R=E),U}}var io=Wt(function(A,R,U){var $=h;if(U.length){var q=Bi(U,Cs(io));$|=d}return Pi(A,$,R,U,q)}),Pu=Wt(function(A,R,U){var $=h|s;if(U.length){var q=Bi(U,Cs(Pu));$|=d}return Pi(R,$,A,U,q)});function Au(A,R,U){R=U?E:R;var $=Pi(A,f,E,E,E,E,E,R);return $.placeholder=Au.placeholder,$}function Mu(A,R,U){R=U?E:R;var $=Pi(A,u,E,E,E,E,E,R);return $.placeholder=Mu.placeholder,$}function wu(A,R,U){var $,q,tt,it,nt,lt,mt=0,xt=!1,Tt=!1,Mt=!0;if(typeof A!="function")throw new Ze(c);R=_e(R)||0,he(U)&&(xt=!!U.leading,Tt="maxWait"in U,tt=Tt?ye(_e(U.maxWait)||0,R):tt,Mt="trailing"in U?!!U.trailing:Mt);function Ft(pe){var ui=$,Fi=q;return $=q=E,mt=pe,it=A.apply(Fi,ui),it}function Dt(pe){return mt=pe,nt=Js(Ht,R),xt?Ft(pe):it}function Vt(pe){var ui=pe-lt,Fi=pe-mt,ju=R-ui;return Tt?we(ju,tt-Fi):ju}function It(pe){var ui=pe-lt,Fi=pe-mt;return lt===E||ui>=R||ui<0||Tt&&Fi>=tt}function Ht(){var pe=ir();if(It(pe))return $t(pe);nt=Js(Ht,Vt(pe))}function $t(pe){return nt=E,Mt&&$?Ft(pe):($=q=E,it)}function We(){nt!==E&&Gl(nt),mt=0,$=lt=q=nt=E}function De(){return nt===E?it:$t(ir())}function Ye(){var pe=ir(),ui=It(pe);if($=arguments,q=this,lt=pe,ui){if(nt===E)return Dt(lt);if(Tt)return Gl(nt),nt=Js(Ht,R),Ft(lt)}return nt===E&&(nt=Js(Ht,R)),it}return Ye.cancel=We,Ye.flush=De,Ye}var Fm=Wt(function(A,R){return gl(A,1,R)}),Lm=Wt(function(A,R,U){return gl(A,_e(R)||0,U)});function Om(A){return Pi(A,x)}function sr(A,R){if(typeof A!="function"||R!=null&&typeof R!="function")throw new Ze(c);var U=function(){var $=arguments,q=R?R.apply(this,$):$[0],tt=U.cache;if(tt.has(q))return tt.get(q);var it=A.apply(this,$);return U.cache=tt.set(q,it)||tt,it};return U.cache=new(sr.Cache||Ci),U}sr.Cache=Ci;function nr(A){if(typeof A!="function")throw new Ze(c);return function(){var R=arguments;switch(R.length){case 0:return!A.call(this);case 1:return!A.call(this,R[0]);case 2:return!A.call(this,R[0],R[1]);case 3:return!A.call(this,R[0],R[1],R[2])}return!A.apply(this,R)}}function Dm(A){return Eu(2,A)}var Im=y0(function(A,R){R=R.length==1&&Gt(R[0])?ae(R[0],Ue(Ot())):ae(Ae(R,1),Ue(Ot()));var U=R.length;return Wt(function($){for(var q=-1,tt=we($.length,U);++q=R}),is=Sl(function(){return arguments}())?Sl:function(A){return de(A)&&_t.call(A,"callee")&&!ol.call(A,"callee")},Gt=dt.isArray,Zm=Wh?Ue(Wh):i0;function Be(A){return A!=null&&rr(A.length)&&!wi(A)}function ve(A){return de(A)&&Be(A)}function Jm(A){return A===!0||A===!1||de(A)&&Le(A)==H}var Vi=lp||po,Qm=Yh?Ue(Yh):s0;function km(A){return de(A)&&A.nodeType===1&&!Qs(A)}function qm(A){if(A==null)return!0;if(Be(A)&&(Gt(A)||typeof A=="string"||typeof A.splice=="function"||Vi(A)||Es(A)||is(A)))return!A.length;var R=Re(A);if(R==rt||R==Pt)return!A.size;if(Zs(A))return!Da(A).length;for(var U in A)if(_t.call(A,U))return!1;return!0}function _m(A,R){return Ks(A,R)}function tx(A,R,U){U=typeof U=="function"?U:E;var $=U?U(A,R):E;return $===E?Ks(A,R,E,U):!!$}function no(A){if(!de(A))return!1;var R=Le(A);return R==k||R==Q||typeof A.message=="string"&&typeof A.name=="string"&&!Qs(A)}function ex(A){return typeof A=="number"&&ll(A)}function wi(A){if(!he(A))return!1;var R=Le(A);return R==et||R==st||R==W||R==At}function Fu(A){return typeof A=="number"&&A==Xt(A)}function rr(A){return typeof A=="number"&&A>-1&&A%1==0&&A<=G}function he(A){var R=typeof A;return A!=null&&(R=="object"||R=="function")}function de(A){return A!=null&&typeof A=="object"}var Lu=Hh?Ue(Hh):r0;function ix(A,R){return A===R||Oa(A,R,Za(R))}function sx(A,R,U){return U=typeof U=="function"?U:E,Oa(A,R,Za(R),U)}function nx(A){return Ou(A)&&A!=+A}function rx(A){if(W0(A))throw new Nt(D);return Cl(A)}function ax(A){return A===null}function ox(A){return A==null}function Ou(A){return typeof A=="number"||de(A)&&Le(A)==ot}function Qs(A){if(!de(A)||Le(A)!=at)return!1;var R=Dn(A);if(R===null)return!0;var U=_t.call(R,"constructor")&&R.constructor;return typeof U=="function"&&U instanceof U&&Rn.call(U)==sp}var ro=Kh?Ue(Kh):a0;function hx(A){return Fu(A)&&A>=-G&&A<=G}var Du=jh?Ue(jh):o0;function ar(A){return typeof A=="string"||!Gt(A)&&de(A)&&Le(A)==ct}function Ve(A){return typeof A=="symbol"||de(A)&&Le(A)==Ct}var Es=$h?Ue($h):h0;function lx(A){return A===E}function ux(A){return de(A)&&Re(A)==wt}function fx(A){return de(A)&&Le(A)==Bt}var dx=Qn(Ia),cx=Qn(function(A,R){return A<=R});function Iu(A){if(!A)return[];if(Be(A))return ar(A)?oi(A):Ie(A);if(Gs&&A[Gs])return Kv(A[Gs]());var R=Re(A),U=R==rt?Ta:R==Pt?An:Ps;return U(A)}function Ri(A){if(!A)return A===0?A:0;if(A=_e(A),A===N||A===-N){var R=A<0?-1:1;return R*V}return A===A?A:0}function Xt(A){var R=Ri(A),U=R%1;return R===R?U?R-U:R:0}function Bu(A){return A?qi(Xt(A),0,j):0}function _e(A){if(typeof A=="number")return A;if(Ve(A))return K;if(he(A)){var R=typeof A.valueOf=="function"?A.valueOf():A;A=he(R)?R+"":R}if(typeof A!="string")return A===0?A:+A;A=_h(A);var U=Zc.test(A);return U||Qc.test(A)?Rv(A.slice(2),U?2:8):$c.test(A)?K:+A}function bu(A){return ci(A,be(A))}function vx(A){return A?qi(Xt(A),-G,G):A===0?A:0}function qt(A){return A==null?"":Xe(A)}var px=Ts(function(A,R){if(Zs(R)||Be(R)){ci(R,Ce(R),A);return}for(var U in R)_t.call(R,U)&&Ws(A,U,R[U])}),Nu=Ts(function(A,R){ci(R,be(R),A)}),or=Ts(function(A,R,U,$){ci(R,be(R),A,$)}),gx=Ts(function(A,R,U,$){ci(R,Ce(R),A,$)}),mx=Ai(Ma);function xx(A,R){var U=ys(A);return R==null?U:vl(U,R)}var yx=Wt(function(A,R){A=ie(A);var U=-1,$=R.length,q=$>2?R[2]:E;for(q&&Oe(R[0],R[1],q)&&($=1);++U<$;)for(var tt=R[U],it=be(tt),nt=-1,lt=it.length;++nt1),tt}),ci(A,ja(A),U),$&&(U=Qe(U,a|r|n,L0));for(var q=R.length;q--;)za(U,R[q]);return U});function Gx(A,R){return zu(A,nr(Ot(R)))}var zx=Ai(function(A,R){return A==null?{}:f0(A,R)});function zu(A,R){if(A==null)return{};var U=ae(ja(A),function($){return[$]});return R=Ot(R),Fl(A,U,function($,q){return R($,q[0])})}function Ux(A,R,U){R=Ui(R,A);var $=-1,q=R.length;for(q||(q=1,A=E);++$R){var $=A;A=R,R=$}if(U||A%1||R%1){var q=ul();return we(A+q*(R-A+wv("1e-"+((q+"").length-1))),R)}return ba(A,R)}var Qx=Ss(function(A,R,U){return R=R.toLowerCase(),A+(U?Vu(R):R)});function Vu(A){return ho(qt(A).toLowerCase())}function Wu(A){return A=qt(A),A&&A.replace(qc,Xv).replace(mv,"")}function kx(A,R,U){A=qt(A),R=Xe(R);var $=A.length;U=U===E?$:qi(Xt(U),0,$);var q=U;return U-=R.length,U>=0&&A.slice(U,q)==R}function qx(A){return A=qt(A),A&&Dc.test(A)?A.replace(yh,Vv):A}function _x(A){return A=qt(A),A&&zc.test(A)?A.replace(sa,"\\$&"):A}var ty=Ss(function(A,R,U){return A+(U?"-":"")+R.toLowerCase()}),ey=Ss(function(A,R,U){return A+(U?" ":"")+R.toLowerCase()}),iy=Kl("toLowerCase");function sy(A,R,U){A=qt(A),R=Xt(R);var $=R?ps(A):0;if(!R||$>=R)return A;var q=(R-$)/2;return Jn(Nn(q),U)+A+Jn(bn(q),U)}function ny(A,R,U){A=qt(A),R=Xt(R);var $=R?ps(A):0;return R&&$>>0,U?(A=qt(A),A&&(typeof R=="string"||R!=null&&!ro(R))&&(R=Xe(R),!R&&vs(A))?Xi(oi(A),0,U):A.split(R,U)):[]}var fy=Ss(function(A,R,U){return A+(U?" ":"")+ho(R)});function dy(A,R,U){return A=qt(A),U=U==null?0:qi(Xt(U),0,A.length),R=Xe(R),A.slice(U,U+R.length)==R}function cy(A,R,U){var $=_.templateSettings;U&&Oe(A,R,U)&&(R=E),A=qt(A),R=or({},R,$,ql);var q=or({},R.imports,$.imports,ql),tt=Ce(q),it=ya(q,tt),nt,lt,mt=0,xt=R.interpolate||Tn,Tt="__p += '",Mt=Sa((R.escape||Tn).source+"|"+xt.source+"|"+(xt===Th?jc:Tn).source+"|"+(R.evaluate||Tn).source+"|$","g"),Ft="//# sourceURL="+(_t.call(R,"sourceURL")?(R.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Cv+"]")+` +`;A.replace(Mt,function(It,Ht,$t,We,De,Ye){return $t||($t=We),Tt+=A.slice(mt,Ye).replace(_c,Wv),Ht&&(nt=!0,Tt+=`' + +__e(`+Ht+`) + +'`),De&&(lt=!0,Tt+=`'; +`+De+`; +__p += '`),$t&&(Tt+=`' + ((__t = (`+$t+`)) == null ? '' : __t) + -'`),mt=Xe+Dt.length,Dt}),yt+=`'; -`;var Ot=kt.call(R,"variable")&&R.variable;if(!Ot)yt=`with (obj) { -`+yt+` +'`),mt=Ye+It.length,It}),Tt+=`'; +`;var Dt=_t.call(R,"variable")&&R.variable;if(!Dt)Tt=`with (obj) { +`+Tt+` } -`;else if(wd.test(Ot))throw new bt(m);yt=(lt?yt.replace(di,""):yt).replace(ci,"$1").replace(vi,"$1;"),yt="function("+(Ot||"obj")+`) { -`+(Ot?"":`obj || (obj = {}); +`;else if(Hc.test(Dt))throw new Nt(m);Tt=(lt?Tt.replace(xi,""):Tt).replace(yi,"$1").replace(Ti,"$1;"),Tt="function("+(Dt||"obj")+`) { +`+(Dt?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(nt?", __e = _.escape":"")+(lt?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; -`)+yt+`return __p -}`;var Xt=ou(function(){return Jt(tt,Rt+"return "+yt).apply(A,it)});if(Xt.source=yt,ba(Xt))throw Xt;return Xt}function km(P){return Qt(P).toLowerCase()}function qm(P){return Qt(P).toUpperCase()}function _m(P,R,U){if(P=Qt(P),P&&(U||R===A))return gh(P);if(!P||!(R=Ge(R)))return P;var j=si(P),q=si(R),tt=mh(j,q),it=xh(j,q)+1;return Ii(j,tt,it).join("")}function tx(P,R,U){if(P=Qt(P),P&&(U||R===A))return P.slice(0,Th(P)+1);if(!P||!(R=Ge(R)))return P;var j=si(P),q=xh(j,si(R))+1;return Ii(j,0,q).join("")}function ex(P,R,U){if(P=Qt(P),P&&(U||R===A))return P.replace(br,"");if(!P||!(R=Ge(R)))return P;var j=si(P),q=mh(j,si(R));return Ii(j,q).join("")}function ix(P,R){var U=T,j=C;if(ae(R)){var q="separator"in R?R.separator:q;U="length"in R?Ut(R.length):U,j="omission"in R?Ge(R.omission):j}P=Qt(P);var tt=P.length;if(os(P)){var it=si(P);tt=it.length}if(U>=tt)return P;var nt=U-hs(j);if(nt<1)return j;var lt=it?Ii(it,0,nt).join(""):P.slice(0,nt);if(q===A)return lt+j;if(it&&(nt+=lt.length-nt),Na(q)){if(P.slice(nt).search(q)){var mt,xt=lt;for(q.global||(q=qr(q.source,Qt(zo.exec(q))+"g")),q.lastIndex=0;mt=q.exec(xt);)var yt=mt.index;lt=lt.slice(0,yt===A?nt:yt)}}else if(P.indexOf(Ge(q),nt)!=nt){var At=lt.lastIndexOf(q);At>-1&&(lt=lt.slice(0,At))}return lt+j}function sx(P){return P=Qt(P),P&&vd.test(P)?P.replace(bo,Dc):P}var nx=vs(function(P,R,U){return P+(U?" ":"")+R.toUpperCase()}),Ua=hl("toUpperCase");function au(P,R,U){return P=Qt(P),R=U?A:R,R===A?wc(P)?bc(P):xc(P):P.match(R)||[]}var ou=Vt(function(P,R){try{return be(P,A,R)}catch(U){return ba(U)?U:new bt(U)}}),rx=yi(function(P,R){return He(R,function(U){U=ui(U),mi(P,U,Ia(P[U],P))}),P});function ax(P){var R=P==null?0:P.length,U=Lt();return P=R?ne(P,function(j){if(typeof j[1]!="function")throw new Ke(c);return[U(j[0]),j[1]]}):[],Vt(function(j){for(var q=-1;++qG)return[];var U=$,j=Pe(P,$);R=Lt(R),P-=$;for(var q=Jr(j,R);++U0||R<0)?new Ht(U):(P<0?U=U.takeRight(-P):P&&(U=U.drop(P)),R!==A&&(R=Ut(R),U=R<0?U.dropRight(-R):U.take(R-P)),U)},Ht.prototype.takeRightWhile=function(P){return this.reverse().takeWhile(P).reverse()},Ht.prototype.toArray=function(){return this.take($)},hi(Ht.prototype,function(P,R){var U=/^(?:filter|find|map|reject)|While$/.test(R),j=/^(?:head|last)$/.test(R),q=_[j?"take"+(R=="last"?"Right":""):R],tt=j||/^find/.test(R);q&&(_.prototype[R]=function(){var it=this.__wrapped__,nt=j?[1]:arguments,lt=it instanceof Ht,mt=nt[0],xt=lt||Nt(it),yt=function(Yt){var $t=q.apply(_,Mi([Yt],nt));return j&&At?$t[0]:$t};xt&&U&&typeof mt=="function"&&mt.length!=1&&(lt=xt=!1);var At=this.__chain__,Rt=!!this.__actions__.length,Ot=tt&&!At,Xt=lt&&!Rt;if(!tt&&xt){it=Xt?it:new Ht(this);var Dt=P.apply(it,nt);return Dt.__actions__.push({func:Un,args:[yt],thisArg:A}),new $e(Dt,At)}return Ot&&Xt?P.apply(this,nt):(Dt=this.thru(yt),Ot?j?Dt.value()[0]:Dt.value():Dt)})}),He(["pop","push","shift","sort","splice","unshift"],function(P){var R=fn[P],U=/^(?:push|sort|unshift)$/.test(P)?"tap":"thru",j=/^(?:pop|shift)$/.test(P);_.prototype[P]=function(){var q=arguments;if(j&&!this.__chain__){var tt=this.value();return R.apply(Nt(tt)?tt:[],q)}return this[U](function(it){return R.apply(Nt(it)?it:[],q)})}}),hi(Ht.prototype,function(P,R){var U=_[R];if(U){var j=U.name+"";kt.call(fs,j)||(fs[j]=[]),fs[j].push({name:R,func:U})}}),fs[Dn(A,s).name]=[{name:"wrapper",func:A}],Ht.prototype.clone=sv,Ht.prototype.reverse=nv,Ht.prototype.value=rv,_.prototype.at=B0,_.prototype.chain=b0,_.prototype.commit=N0,_.prototype.next=G0,_.prototype.plant=U0,_.prototype.reverse=X0,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=V0,_.prototype.first=_.prototype.head,Rs&&(_.prototype[Rs]=z0),_},Ri=Nc();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(xe._=Ri,define(function(){return Ri})):Vi?((Vi.exports=Ri)._=Ri,Vr._=Ri):xe._=Ri}).call(E)}),td=class extends Set{constructor(E,S=!1){super(E),this.valuesAsFlags=S}};function Qs(E){if(E instanceof Map)return Object.fromEntries([...E.entries()].map(([S,A])=>[S,Qs(A)]));if(E instanceof Set)return Array.from(E.values()).map(Qs);if(E instanceof td)return{values:[...E.values()],valuesAsFlags:E.valuesAsFlags};if(typeof E=="object"){let S={};return Object.entries(E).forEach(([A,I])=>{S[A]=Qs(I)}),S}else return E}Do(Io(),1);var eS=Do(Io(),1);function _i(E,S){if(typeof E!="object")throw new Error(`Cannot merge into non-object objectToMergeWith. Received: ${JSON.stringify(E)}`);if(typeof S!="object")throw new Error(`Cannot merge using non-object objectToMergeWith. Received: ${JSON.stringify(S)}`);let A=(0,eS.cloneDeep)(E);for(let[I,B]of Object.entries(S))typeof B!="object"||B instanceof Set||A[I]===void 0?A[I]=B:A[I]=_i(A[I],B);return A}function ed(E,S){if(!(E===void 0||typeof E!="object"))for(let A of Object.keys(E)){if(A===S)return E[A];let I=E[A];if(typeof I=="object"){let B=ed(I,S);if(B!==void 0)return B}}}var qa="@composite:",iS="@inherit:",sS=class{constructor(E,S,A){this.tiledClassToMembersMap=E,this.enumNameToValuesMap=S,this.parserOptions=A,this.memoiser=new Map}flattenMembers(E,S){return this.memoiser.has(E)?{[E]:this.memoiser.get(E)}:(this.memoiser.set(E,S.reduce((A,I)=>re(re({},A),this.flattenMemberProperty(I)),{})),{[E]:this.memoiser.get(E)})}flattenMemberProperty(E){var S;let A=(S=E.propertyType)!=null?S:E.propertytype;if(E.type==="class"){if(!this.memoiser.has(A)){let b=this.tiledClassToMembersMap.get(A).reduce((c,m)=>_i(this.flattenMemberProperty(m),c),{});this.memoiser.set(A,b)}let I=this.memoiser.get(A),B=_i(I,this.flattenValue(E.value,I));return this.checkIfShouldFlatten(E.name)?B:{[E.name.replace(qa,"")]:B}}else return this.enumNameToValuesMap.has(A)?this.enumNameToValuesMap.get(A).valuesAsFlags?{[E.name]:new Set(E.value.split(",").filter(I=>I!==""))}:{[E.name]:E.value}:{[E.name]:E.value}}get memoisedFlattenedProperties(){return this.memoiser}flattenValue(E,S){return Object.entries(E).reduce((A,[I,B])=>{if(typeof B!="object")return ed(S,I)instanceof Set?_i({[I]:new Set(B.split(",").filter(b=>b!==""))},A):_i({[I]:B},A);if(this.checkIfShouldFlatten(I))return _i(this.flattenValue(B,S),A);{let b=I.replace(qa,"");return _i({[b]:this.flattenValue(B,S)},A)}},{})}checkIfShouldFlatten(E){var S;return((S=this.parserOptions)==null?void 0:S.defaultComposite)===!0?E.startsWith(iS):!E.startsWith(qa)}},Nu=Do(Io(),1),nS=class{constructor(E){this.flattener=E}flattenPropertiesOnObject(E){var S,A,I,B;return zi(re(re({},this.flattener.memoisedFlattenedProperties.get((S=E.class)!=null?S:E.type)),(A=E.properties)==null?void 0:A.reduce((b,c)=>re(re({},b),this.flattener.flattenMemberProperty(c)),{})),{name:E.name,id:E.id,class:(B=(I=E.class)!=null?I:E.type)!=null?B:null,x:E.x,y:E.y})}flattenPropertiesOnTile(E){var S,A,I,B;return zi(re(re({},this.flattener.memoisedFlattenedProperties.get((S=E.class)!=null?S:E.type)),(A=E.properties)==null?void 0:A.reduce((b,c)=>re(re({},b),this.flattener.flattenMemberProperty(c)),{})),{id:E.id,class:(B=(I=E.class)!=null?I:E.type)!=null?B:null})}getCustomTypesMap(){return new Map([...this.flattener.memoisedFlattenedProperties.entries()].map(([E,S])=>[E,(0,Nu.cloneDeep)(S)]))}getEnumsMap(){return new Map([...this.flattener.enumNameToValuesMap.entries()].map(([E,S])=>[E,(0,Nu.cloneDeep)(S)]))}toJSON(){return JSON.stringify({customTypes:Qs(this.getCustomTypesMap()),enums:Qs(this.getEnumsMap())},null,4)}};function rS(E,S){let A=new Map(E.propertyTypes.filter(b=>b.type==="enum").map(b=>[b.name,new td(b.values,b.valuesAsFlags)])),I=new Map(E.propertyTypes.filter(b=>b.type==="class").map(b=>[b.name,b.members])),B=new sS(I,A,S);return I.forEach((b,c)=>{B.flattenMembers(c,b)}),new nS(B)}var aS={parse:rS},id=class{constructor(E,S){this.phaserTile=E,this.tiledProject=S}getProperty(E){var S,A;let I={};if(this.tiledProject){let B=aS.parse(this.tiledProject),b=this.getType();if(b){let c=(S=B.getCustomTypesMap())==null?void 0:S.get(b);if(c)for(let[m,t]of Object.entries(c))I[m]=t}}return(A=this.phaserTile.properties[E])!=null?A:I[E]}hasProperty(E){return this.getProperty(E)!=null}getType(){var E,S;return(S=(E=this.phaserTile.tileset)==null?void 0:E.tileData[this.phaserTile.index-1])==null?void 0:S.type}},oS=class{constructor(E,S){this.phaserTilemapLayer=E,this.tiledProject=S}getName(){return this.phaserTilemapLayer.layer.name}getProperty(E){let S=this.phaserTilemapLayer.layer.properties,A=S?.find(I=>I.name==E);return A?.value}hasProperty(E){return this.getProperty(E)!=null}isCharLayer(){return this.hasProperty(tr)}getData(){return this.phaserTilemapLayer.layer.data.map(E=>E.map(S=>new id(S,this.tiledProject)))}},hS=class{constructor(E,S){this.phaserTilemap=E,this.tiledProject=S;for(let A of this.phaserTilemap.layers)if(A.tilemapLayer==null)throw new Error(`Error initializing tilemap. Layer '${A.name}' has no 'tilemapLayer'. This can happen if you call 'createLayer' with the wrong layer ID.`)}getTileWidth(){return this.phaserTilemap.tileWidth}getTileHeight(){return this.phaserTilemap.tileHeight}getWidth(){return this.phaserTilemap.width}getHeight(){return this.phaserTilemap.height}getOrientation(){return this.phaserTilemap.orientation==Phaser.Tilemaps.Orientation.ISOMETRIC.toString()?"isometric":"orthogonal"}getLayers(){return this.phaserTilemap.layers.map(E=>new oS(E.tilemapLayer,this.tiledProject))}hasTileAt(E,S,A){return!!this.phaserTilemap.hasTileAt(E,S,A)}getTileAt(E,S,A){let I=this.phaserTilemap.getTileAt(E,S,!1,A);if(I)return new id(I,this.tiledProject)}},sd=class fo{constructor(S){this.scene=S,this.geHeadless=new HT(!1),this.isCreatedInternal=!1,fo.welcomeMessagePrinted||(console.log(`Using GridEngine Phaser Plugin v${Zf}`),fo.welcomeMessagePrinted=!0),this.scene.sys.events.once("boot",this.boot,this)}boot(){this.scene.sys.events.on("update",this.update,this)}getCharLayer(S){return this.geHeadless.getCharLayer(S)}getTransition(S,A){return this.geHeadless.getTransition(S,A)}setTransition(S,A,I){this.geHeadless.setTransition(S,A,I)}create(S,A){this.geHeadless.create(new hS(S,A.tiledProject),A),this.isCreatedInternal=!0,this.gridCharacters=new Map;let I=this.setConfigDefaults(A);this.config=I,this.gridTilemap=new uo(S),this.addCharacters()}getPosition(S){return this.geHeadless.getPosition(S)}move(S,A){this.geHeadless.move(S,A)}moveRandomly(S,A=0,I=-1){this.geHeadless.moveRandomly(S,A,I)}getMovement(S){return this.geHeadless.getMovement(S)}moveTo(S,A,I){return this.geHeadless.moveTo(S,A,I)}stopMovement(S){this.geHeadless.stopMovement(S)}setSpeed(S,A){this.geHeadless.setSpeed(S,A)}getSpeed(S){return this.geHeadless.getSpeed(S)}setContainer(S,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(S);if(!B)throw this.createCharUnknownErr(S);B.setContainer(A)}getContainer(S){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(S);if(!I)throw this.createCharUnknownErr(S);return I.getContainer()}getOffsetX(S){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(S);if(!I)throw this.createCharUnknownErr(S);return I.getOffsetX()}setOffsetX(S,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(S);if(!B)throw this.createCharUnknownErr(S);B.setOffsetX(A)}getOffsetY(S){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(S);if(!I)throw this.createCharUnknownErr(S);return I.getOffsetY()}setOffsetY(S,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(S);if(!B)throw this.createCharUnknownErr(S);B.setOffsetY(A)}collidesWithTiles(S){return this.geHeadless.collidesWithTiles(S)}getWalkingAnimationMapping(S){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(S);if(!I)throw this.createCharUnknownErr(S);let B=I.getAnimation();return B?.getWalkingAnimationMapping()}hasLayerOverlay(){var S;return this.initGuard(),!!((S=this.config)!=null&&S.layerOverlay)}setWalkingAnimationMapping(S,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(S);if(!B)throw this.createCharUnknownErr(S);let b=B.getAnimation();b?.setWalkingAnimationMapping(A)}update(S,A){if(this.isCreatedInternal&&this.gridCharacters)for(let[I,B]of this.gridCharacters)B.update(A);this.geHeadless.update(S,A)}addCharacter(S){this.geHeadless.addCharacter(S),this.addCharacterInternal(S)}hasCharacter(S){return this.geHeadless.hasCharacter(S)}removeCharacter(S){var A,I;this.initGuard();let B=(A=this.gridCharacters)==null?void 0:A.get(S);if(!B)throw this.createCharUnknownErr(S);B.destroy(),(I=this.gridCharacters)==null||I.delete(S),this.geHeadless.removeCharacter(S)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters){for(let S of this.gridCharacters.keys())this.removeCharacter(S);this.geHeadless.removeAllCharacters()}}getAllCharacters(S){return this.geHeadless.getAllCharacters(S)}getLabels(S){return this.geHeadless.getLabels(S)}addLabels(S,A){this.geHeadless.addLabels(S,A)}removeLabels(S,A){this.geHeadless.removeLabels(S,A)}clearLabels(S){this.geHeadless.clearLabels(S)}follow(S,A,I,B){let b;I===void 0?b={distance:0,closestPointIfBlocked:!1}:typeof I=="number"?(b={distance:I,closestPointIfBlocked:!1},B&&(b.closestPointIfBlocked=!0)):b=I,this.geHeadless.follow(S,A,b)}isMoving(S){return this.geHeadless.isMoving(S)}getFacingDirection(S){return this.geHeadless.getFacingDirection(S)}getFacingPosition(S){return this.geHeadless.getFacingPosition(S)}turnTowards(S,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(S);if(!B)throw this.createCharUnknownErr(S);B.turnTowards(A),this.geHeadless.turnTowards(S,A)}getCharactersAt(S,A){return this.geHeadless.getCharactersAt(S,A)}setPosition(S,A,I){this.geHeadless.setPosition(S,A,I)}getSprite(S){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(S);if(!I)throw this.createCharUnknownErr(S);return I.getSprite()}setSprite(S,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(S);if(!B)throw this.createCharUnknownErr(S);A.setOrigin(0,0),B.setSprite(A)}isBlocked(S,A,I=["geDefault"]){return this.geHeadless.isBlocked(S,A,I)}isTileBlocked(S,A){return this.geHeadless.isTileBlocked(S,A)}getCollisionGroups(S){return this.geHeadless.getCollisionGroups(S)}setCollisionGroups(S,A){this.geHeadless.setCollisionGroups(S,A)}getIgnoreCollisionGroups(S){return this.geHeadless.getIgnoreCollisionGroups(S)}setIgnoreCollisionGroups(S,A){this.geHeadless.setIgnoreCollisionGroups(S,A)}getTilePosInDirection(S,A,I){return this.geHeadless.getTilePosInDirection(S,A,I)}findShortestPath(S,A,I={}){return this.geHeadless.findShortestPath(S,A,I)}steppedOn(S,A,I){return this.geHeadless.steppedOn(S,A,I)}characterShifted(){return this.geHeadless.characterShifted()}movementStarted(){return this.geHeadless.movementStarted()}movementStopped(){return this.geHeadless.movementStopped()}directionChanged(){return this.geHeadless.directionChanged()}positionChangeStarted(){return this.geHeadless.positionChangeStarted()}positionChangeFinished(){return this.geHeadless.positionChangeFinished()}getMovementProgress(S){return this.geHeadless.getMovementProgress(S)}rebuildTileCollisionCache(S,A,I,B){this.geHeadless.rebuildTileCollisionCache(S,A,I,B)}addQueueMovements(S,A,I){this.geHeadless.addQueueMovements(S,A,I)}getEnqueuedMovements(S){return this.geHeadless.getEnqueuedMovements(S)}queueMovementFinished(){return this.geHeadless.queueMovementFinished()}clearEnqueuedMovements(S){return this.geHeadless.clearEnqueuedMovements(S)}getState(){return{characters:this.geHeadless.getState().characters.map(S=>zi(re({},S),{offsetX:this.getOffsetX(S.id),offsetY:this.getOffsetY(S.id)}))}}setState(S){if(this.geHeadless.setState(S),this.gridCharacters)for(let A of S.characters){let I=this.gridCharacters.get(A.id);I&&(I.setOffsetX(A.offsetX),I.setOffsetY(A.offsetY))}}getTileCost(S,A,I){return this.initGuard(),this.geHeadless.getTileCost(S,A,I)}setConfigDefaults(S){return re({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",layerOverlay:!1,cacheTileCollisions:!1},S)}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var S;(S=this.config)==null||S.characters.forEach(A=>this.addCharacterInternal(A))}createCharUnknownErr(S){return new Error(`Character unknown: ${S}`)}addCharacterInternal(S){var A;if(this.initGuard(),!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let I=new AT(S,this.scene,this.gridTilemap,this.config.layerOverlay,this.geHeadless);(A=this.gridCharacters)==null||A.set(S.id,I)}};sd.welcomeMessagePrinted=!1;var lS=sd,uS=lS;/*! Bundled license information: +`)+Tt+`return __p +}`;var Vt=Hu(function(){return kt(tt,Ft+"return "+Tt).apply(E,it)});if(Vt.source=Tt,no(Vt))throw Vt;return Vt}function vy(A){return qt(A).toLowerCase()}function py(A){return qt(A).toUpperCase()}function gy(A,R,U){if(A=qt(A),A&&(U||R===E))return _h(A);if(!A||!(R=Xe(R)))return A;var $=oi(A),q=oi(R),tt=tl($,q),it=el($,q)+1;return Xi($,tt,it).join("")}function my(A,R,U){if(A=qt(A),A&&(U||R===E))return A.slice(0,sl(A)+1);if(!A||!(R=Xe(R)))return A;var $=oi(A),q=el($,oi(R))+1;return Xi($,0,q).join("")}function xy(A,R,U){if(A=qt(A),A&&(U||R===E))return A.replace(na,"");if(!A||!(R=Xe(R)))return A;var $=oi(A),q=tl($,oi(R));return Xi($,q).join("")}function yy(A,R){var U=C,$=P;if(he(R)){var q="separator"in R?R.separator:q;U="length"in R?Xt(R.length):U,$="omission"in R?Xe(R.omission):$}A=qt(A);var tt=A.length;if(vs(A)){var it=oi(A);tt=it.length}if(U>=tt)return A;var nt=U-ps($);if(nt<1)return $;var lt=it?Xi(it,0,nt).join(""):A.slice(0,nt);if(q===E)return lt+$;if(it&&(nt+=lt.length-nt),ro(q)){if(A.slice(nt).search(q)){var mt,xt=lt;for(q.global||(q=Sa(q.source,qt(Sh.exec(q))+"g")),q.lastIndex=0;mt=q.exec(xt);)var Tt=mt.index;lt=lt.slice(0,Tt===E?nt:Tt)}}else if(A.indexOf(Xe(q),nt)!=nt){var Mt=lt.lastIndexOf(q);Mt>-1&&(lt=lt.slice(0,Mt))}return lt+$}function Ty(A){return A=qt(A),A&&Oc.test(A)?A.replace(xh,Jv):A}var Sy=Ss(function(A,R,U){return A+(U?" ":"")+R.toUpperCase()}),ho=Kl("toUpperCase");function Yu(A,R,U){return A=qt(A),R=U?E:R,R===E?Hv(A)?qv(A):bv(A):A.match(R)||[]}var Hu=Wt(function(A,R){try{return ze(A,E,R)}catch(U){return no(U)?U:new Nt(U)}}),Cy=Ai(function(A,R){return $e(R,function(U){U=vi(U),Ei(A,U,io(A[U],A))}),A});function Ey(A){var R=A==null?0:A.length,U=Ot();return A=R?ae(A,function($){if(typeof $[1]!="function")throw new Ze(c);return[U($[0]),$[1]]}):[],Wt(function($){for(var q=-1;++qG)return[];var U=j,$=we(A,j);R=Ot(R),A-=j;for(var q=xa($,R);++U0||R<0)?new Kt(U):(A<0?U=U.takeRight(-A):A&&(U=U.drop(A)),R!==E&&(R=Xt(R),U=R<0?U.dropRight(-R):U.take(R-A)),U)},Kt.prototype.takeRightWhile=function(A){return this.reverse().takeWhile(A).reverse()},Kt.prototype.toArray=function(){return this.take(j)},di(Kt.prototype,function(A,R){var U=/^(?:filter|find|map|reject)|While$/.test(R),$=/^(?:head|last)$/.test(R),q=_[$?"take"+(R=="last"?"Right":""):R],tt=$||/^find/.test(R);q&&(_.prototype[R]=function(){var it=this.__wrapped__,nt=$?[1]:arguments,lt=it instanceof Kt,mt=nt[0],xt=lt||Gt(it),Tt=function(Ht){var $t=q.apply(_,Ii([Ht],nt));return $&&Mt?$t[0]:$t};xt&&U&&typeof mt=="function"&&mt.length!=1&&(lt=xt=!1);var Mt=this.__chain__,Ft=!!this.__actions__.length,Dt=tt&&!Mt,Vt=lt&&!Ft;if(!tt&&xt){it=Vt?it:new Kt(this);var It=A.apply(it,nt);return It.__actions__.push({func:tr,args:[Tt],thisArg:E}),new Je(It,Mt)}return Dt&&Vt?A.apply(this,nt):(It=this.thru(Tt),Dt?$?It.value()[0]:It.value():It)})}),$e(["pop","push","shift","sort","splice","unshift"],function(A){var R=Mn[A],U=/^(?:push|sort|unshift)$/.test(A)?"tap":"thru",$=/^(?:pop|shift)$/.test(A);_.prototype[A]=function(){var q=arguments;if($&&!this.__chain__){var tt=this.value();return R.apply(Gt(tt)?tt:[],q)}return this[U](function(it){return R.apply(Gt(it)?it:[],q)})}}),di(Kt.prototype,function(A,R){var U=_[R];if(U){var $=U.name+"";_t.call(xs,$)||(xs[$]=[]),xs[$].push({name:R,func:U})}}),xs[$n(E,s).name]=[{name:"wrapper",func:E}],Kt.prototype.clone=Tp,Kt.prototype.reverse=Sp,Kt.prototype.value=Cp,_.prototype.at=kg,_.prototype.chain=qg,_.prototype.commit=_g,_.prototype.next=tm,_.prototype.plant=im,_.prototype.reverse=sm,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=nm,_.prototype.first=_.prototype.head,Gs&&(_.prototype[Gs]=em),_},bi=_v();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Se._=bi,define(function(){return bi})):Zi?((Zi.exports=bi)._=bi,ua._=bi):Se._=bi}).call(S)}),Zd=class extends Set{constructor(S,T=!1){super(S),this.valuesAsFlags=T}};function on(S){if(S instanceof Map)return Object.fromEntries([...S.entries()].map(([T,E])=>[T,on(E)]));if(S instanceof Set)return Array.from(S.values()).map(on);if(S instanceof Zd)return{values:[...S.values()],valuesAsFlags:S.valuesAsFlags};if(typeof S=="object"){let T={};return Object.entries(S).forEach(([E,F])=>{T[E]=on(F)}),T}else return S}uh(fh(),1);var x2=uh(fh(),1);function as(S,T){if(typeof S!="object")throw new Error(`Cannot merge into non-object objectToMergeWith. Received: ${JSON.stringify(S)}`);if(typeof T!="object")throw new Error(`Cannot merge using non-object objectToMergeWith. Received: ${JSON.stringify(T)}`);let E=(0,x2.cloneDeep)(S);for(let[F,O]of Object.entries(T))typeof O!="object"||O instanceof Set||E[F]===void 0?E[F]=O:E[F]=as(E[F],O);return E}function Jd(S,T){if(!(S===void 0||typeof S!="object"))for(let E of Object.keys(S)){if(E===T)return S[E];let F=S[E];if(typeof F=="object"){let O=Jd(F,T);if(O!==void 0)return O}}}var Co="@composite:",y2="@inherit:",T2=class{constructor(S,T,E){this.tiledClassToMembersMap=S,this.enumNameToValuesMap=T,this.parserOptions=E,this.memoiser=new Map}flattenMembers(S,T){return this.memoiser.has(S)?{[S]:this.memoiser.get(S)}:(this.memoiser.set(S,T.reduce((E,F)=>oe(oe({},E),this.flattenMemberProperty(F)),{})),{[S]:this.memoiser.get(S)})}flattenMemberProperty(S){var T;let E=(T=S.propertyType)!=null?T:S.propertytype;if(S.type==="class"){if(!this.memoiser.has(E)){let D=this.tiledClassToMembersMap.get(E).reduce((c,m)=>as(this.flattenMemberProperty(m),c),{});this.memoiser.set(E,D)}let F=this.memoiser.get(E),O=as(F,this.flattenValue(S.value,F));return this.checkIfShouldFlatten(S.name)?O:{[S.name.replace(Co,"")]:O}}else return this.enumNameToValuesMap.has(E)?this.enumNameToValuesMap.get(E).valuesAsFlags?{[S.name]:new Set(S.value.split(",").filter(F=>F!==""))}:{[S.name]:S.value}:{[S.name]:S.value}}get memoisedFlattenedProperties(){return this.memoiser}flattenValue(S,T){return Object.entries(S).reduce((E,[F,O])=>{if(typeof O!="object")return Jd(T,F)instanceof Set?as({[F]:new Set(O.split(",").filter(D=>D!==""))},E):as({[F]:O},E);if(this.checkIfShouldFlatten(F))return as(this.flattenValue(O,T),E);{let D=F.replace(Co,"");return as({[D]:this.flattenValue(O,T)},E)}},{})}checkIfShouldFlatten(S){var T;return((T=this.parserOptions)==null?void 0:T.defaultComposite)===!0?S.startsWith(y2):!S.startsWith(Co)}},Tf=uh(fh(),1),S2=class{constructor(S){this.flattener=S}flattenPropertiesOnObject(S){var T,E,F,O;return Ki(oe(oe({},this.flattener.memoisedFlattenedProperties.get((T=S.class)!=null?T:S.type)),(E=S.properties)==null?void 0:E.reduce((D,c)=>oe(oe({},D),this.flattener.flattenMemberProperty(c)),{})),{name:S.name,id:S.id,class:(O=(F=S.class)!=null?F:S.type)!=null?O:null,x:S.x,y:S.y})}flattenPropertiesOnTile(S){var T,E,F,O;return Ki(oe(oe({},this.flattener.memoisedFlattenedProperties.get((T=S.class)!=null?T:S.type)),(E=S.properties)==null?void 0:E.reduce((D,c)=>oe(oe({},D),this.flattener.flattenMemberProperty(c)),{})),{id:S.id,class:(O=(F=S.class)!=null?F:S.type)!=null?O:null})}getCustomTypesMap(){return new Map([...this.flattener.memoisedFlattenedProperties.entries()].map(([S,T])=>[S,(0,Tf.cloneDeep)(T)]))}getEnumsMap(){return new Map([...this.flattener.enumNameToValuesMap.entries()].map(([S,T])=>[S,(0,Tf.cloneDeep)(T)]))}toJSON(){return JSON.stringify({customTypes:on(this.getCustomTypesMap()),enums:on(this.getEnumsMap())},null,4)}};function C2(S,T){let E=new Map(S.propertyTypes.filter(D=>D.type==="enum").map(D=>[D.name,new Zd(D.values,D.valuesAsFlags)])),F=new Map(S.propertyTypes.filter(D=>D.type==="class").map(D=>[D.name,D.members])),O=new T2(F,E,T);return F.forEach((D,c)=>{O.flattenMembers(c,D)}),new S2(O)}var E2={parse:C2},Qd=class{constructor(S,T){this.phaserTile=S,this.tiledProject=T}getProperty(S){var T,E;let F={};if(this.tiledProject){let O=E2.parse(this.tiledProject),D=this.getType();if(D){let c=(T=O.getCustomTypesMap())==null?void 0:T.get(D);if(c)for(let[m,t]of Object.entries(c))F[m]=t}}return(E=this.phaserTile.properties[S])!=null?E:F[S]}hasProperty(S){return this.getProperty(S)!=null}getType(){var S,T;return(T=(S=this.phaserTile.tileset)==null?void 0:S.tileData[this.phaserTile.index-1])==null?void 0:T.type}},P2=class{constructor(S,T){this.phaserTilemapLayer=S,this.tiledProject=T}getName(){return this.phaserTilemapLayer.layer.name}getProperty(S){let T=this.phaserTilemapLayer.layer.properties,E=T?.find(F=>F.name==S);return E?.value}hasProperty(S){return this.getProperty(S)!=null}isCharLayer(){return this.hasProperty(pr)}getData(){return this.phaserTilemapLayer.layer.data.map(S=>S.map(T=>new Qd(T,this.tiledProject)))}},A2=class{constructor(S,T){this.phaserTilemap=S,this.tiledProject=T;for(let E of this.phaserTilemap.layers)if(E.tilemapLayer==null)throw new Error(`Error initializing tilemap. Layer '${E.name}' has no 'tilemapLayer'. This can happen if you call 'createLayer' with the wrong layer ID.`)}getTileWidth(){return this.phaserTilemap.tileWidth}getTileHeight(){return this.phaserTilemap.tileHeight}getWidth(){return this.phaserTilemap.width}getHeight(){return this.phaserTilemap.height}getOrientation(){return this.phaserTilemap.orientation==Phaser.Tilemaps.Orientation.ISOMETRIC.toString()?"isometric":"orthogonal"}getLayers(){return this.phaserTilemap.layers.map(S=>new P2(S.tilemapLayer,this.tiledProject))}hasTileAt(S,T,E){return!!this.phaserTilemap.hasTileAt(S,T,E)}getTileAt(S,T,E){let F=this.phaserTilemap.getTileAt(S,T,!1,E);if(F)return new Qd(F,this.tiledProject)}},kd=class Uo{constructor(T){this.scene=T,this.geHeadless=new o2(!1),this.isCreatedInternal=!1,Uo.welcomeMessagePrinted||(console.log(`Using GridEngine Phaser Plugin v${Wd}`),Uo.welcomeMessagePrinted=!0),this.scene.sys.events.once("boot",this.boot,this)}boot(){this.scene.sys.events.on("update",this.update,this)}getCharLayer(T){return this.geHeadless.getCharLayer(T)}getTransition(T,E){return this.geHeadless.getTransition(T,E)}setTransition(T,E,F){this.geHeadless.setTransition(T,E,F)}create(T,E){this.geHeadless.create(new A2(T,E.tiledProject),E),this.isCreatedInternal=!0,this.gridCharacters=new Map;let F=this.setConfigDefaults(E);this.config=F,this.gridTilemap=new zo(T),this.addCharacters()}getPosition(T){return this.geHeadless.getPosition(T)}move(T,E){this.geHeadless.move(T,E)}moveRandomly(T,E=0,F=-1){this.geHeadless.moveRandomly(T,E,F)}getMovement(T){return this.geHeadless.getMovement(T)}moveTo(T,E,F){return this.geHeadless.moveTo(T,E,F)}stopMovement(T){this.geHeadless.stopMovement(T)}setSpeed(T,E){this.geHeadless.setSpeed(T,E)}getSpeed(T){return this.geHeadless.getSpeed(T)}setContainer(T,E){var F;this.initGuard();let O=(F=this.gridCharacters)==null?void 0:F.get(T);if(!O)throw this.createCharUnknownErr(T);O.setContainer(E)}getContainer(T){var E;this.initGuard();let F=(E=this.gridCharacters)==null?void 0:E.get(T);if(!F)throw this.createCharUnknownErr(T);return F.getContainer()}getOffsetX(T){var E;this.initGuard();let F=(E=this.gridCharacters)==null?void 0:E.get(T);if(!F)throw this.createCharUnknownErr(T);return F.getOffsetX()}setOffsetX(T,E){var F;this.initGuard();let O=(F=this.gridCharacters)==null?void 0:F.get(T);if(!O)throw this.createCharUnknownErr(T);O.setOffsetX(E)}getOffsetY(T){var E;this.initGuard();let F=(E=this.gridCharacters)==null?void 0:E.get(T);if(!F)throw this.createCharUnknownErr(T);return F.getOffsetY()}setOffsetY(T,E){var F;this.initGuard();let O=(F=this.gridCharacters)==null?void 0:F.get(T);if(!O)throw this.createCharUnknownErr(T);O.setOffsetY(E)}collidesWithTiles(T){return this.geHeadless.collidesWithTiles(T)}getWalkingAnimationMapping(T){var E;this.initGuard();let F=(E=this.gridCharacters)==null?void 0:E.get(T);if(!F)throw this.createCharUnknownErr(T);let O=F.getAnimation();return O?.getWalkingAnimationMapping()}hasLayerOverlay(){var T;return this.initGuard(),!!((T=this.config)!=null&&T.layerOverlay)}setWalkingAnimationMapping(T,E){var F;this.initGuard();let O=(F=this.gridCharacters)==null?void 0:F.get(T);if(!O)throw this.createCharUnknownErr(T);let D=O.getAnimation();D?.setWalkingAnimationMapping(E)}update(T,E){if(this.isCreatedInternal&&this.gridCharacters)for(let[F,O]of this.gridCharacters)O.update(E);this.geHeadless.update(T,E)}addCharacter(T){this.geHeadless.addCharacter(T),this.addCharacterInternal(T)}hasCharacter(T){return this.geHeadless.hasCharacter(T)}removeCharacter(T){var E,F;this.initGuard();let O=(E=this.gridCharacters)==null?void 0:E.get(T);if(!O)throw this.createCharUnknownErr(T);O.destroy(),(F=this.gridCharacters)==null||F.delete(T),this.geHeadless.removeCharacter(T)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters){for(let T of this.gridCharacters.keys())this.removeCharacter(T);this.geHeadless.removeAllCharacters()}}getAllCharacters(T){return this.geHeadless.getAllCharacters(T)}getLabels(T){return this.geHeadless.getLabels(T)}addLabels(T,E){this.geHeadless.addLabels(T,E)}removeLabels(T,E){this.geHeadless.removeLabels(T,E)}clearLabels(T){this.geHeadless.clearLabels(T)}follow(T,E,F,O){let D;F===void 0?D={distance:0,closestPointIfBlocked:!1}:typeof F=="number"?(D={distance:F,closestPointIfBlocked:!1},O&&(D.closestPointIfBlocked=!0)):D=F,this.geHeadless.follow(T,E,D)}isMoving(T){return this.geHeadless.isMoving(T)}getFacingDirection(T){return this.geHeadless.getFacingDirection(T)}getFacingPosition(T){return this.geHeadless.getFacingPosition(T)}turnTowards(T,E){var F;this.initGuard();let O=(F=this.gridCharacters)==null?void 0:F.get(T);if(!O)throw this.createCharUnknownErr(T);O.turnTowards(E),this.geHeadless.turnTowards(T,E)}getCharactersAt(T,E){return this.geHeadless.getCharactersAt(T,E)}setPosition(T,E,F){this.geHeadless.setPosition(T,E,F)}getSprite(T){var E;this.initGuard();let F=(E=this.gridCharacters)==null?void 0:E.get(T);if(!F)throw this.createCharUnknownErr(T);return F.getSprite()}setSprite(T,E){var F;this.initGuard();let O=(F=this.gridCharacters)==null?void 0:F.get(T);if(!O)throw this.createCharUnknownErr(T);E.setOrigin(0,0),O.setSprite(E)}isBlocked(T,E,F=["geDefault"]){return this.geHeadless.isBlocked(T,E,F)}isTileBlocked(T,E){return this.geHeadless.isTileBlocked(T,E)}getCollisionGroups(T){return this.geHeadless.getCollisionGroups(T)}setCollisionGroups(T,E){this.geHeadless.setCollisionGroups(T,E)}getIgnoreCollisionGroups(T){return this.geHeadless.getIgnoreCollisionGroups(T)}setIgnoreCollisionGroups(T,E){this.geHeadless.setIgnoreCollisionGroups(T,E)}getTilePosInDirection(T,E,F){return this.geHeadless.getTilePosInDirection(T,E,F)}findShortestPath(T,E,F={}){return this.geHeadless.findShortestPath(T,E,F)}steppedOn(T,E,F){return this.geHeadless.steppedOn(T,E,F)}characterShifted(){return this.geHeadless.characterShifted()}movementStarted(){return this.geHeadless.movementStarted()}movementStopped(){return this.geHeadless.movementStopped()}directionChanged(){return this.geHeadless.directionChanged()}positionChangeStarted(){return this.geHeadless.positionChangeStarted()}positionChangeFinished(){return this.geHeadless.positionChangeFinished()}getMovementProgress(T){return this.geHeadless.getMovementProgress(T)}rebuildTileCollisionCache(T,E,F,O){this.geHeadless.rebuildTileCollisionCache(T,E,F,O)}addQueueMovements(T,E,F){this.geHeadless.addQueueMovements(T,E,F)}getEnqueuedMovements(T){return this.geHeadless.getEnqueuedMovements(T)}queueMovementFinished(){return this.geHeadless.queueMovementFinished()}clearEnqueuedMovements(T){return this.geHeadless.clearEnqueuedMovements(T)}getState(){return{characters:this.geHeadless.getState().characters.map(T=>Ki(oe({},T),{offsetX:this.getOffsetX(T.id),offsetY:this.getOffsetY(T.id)}))}}setState(T){if(this.geHeadless.setState(T),this.gridCharacters)for(let E of T.characters){let F=this.gridCharacters.get(E.id);F&&(F.setOffsetX(E.offsetX),F.setOffsetY(E.offsetY))}}getTileCost(T,E,F){return this.initGuard(),this.geHeadless.getTileCost(T,E,F)}setConfigDefaults(T){return oe({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",layerOverlay:!1,cacheTileCollisions:!1},T)}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var T;(T=this.config)==null||T.characters.forEach(E=>this.addCharacterInternal(E))}createCharUnknownErr(T){return new Error(`Character unknown: ${T}`)}addCharacterInternal(T){var E;if(this.initGuard(),!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let F=new WS(T,this.scene,this.gridTilemap,this.config.layerOverlay,this.geHeadless);(E=this.gridCharacters)==null||E.set(T.id,F)}};kd.welcomeMessagePrinted=!1;var M2=kd,w2=M2;/*! Bundled license information: tiled-property-flattener/dist/tiled_property_flattener.min.js: (*! Bundled license information: @@ -6396,9 +6396,14 @@ tiled-property-flattener/dist/tiled_property_flattener.min.js: * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) *) -*/class fS extends Fr.Scene{mainMenuButtonImage;mainMenuButtonText;constructor(){super("Preloader")}preload(){this.load.image("mainBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),this.load.image("scroll","https://kbve.com/assets/img/fishchip/scroll.webp"),this.load.audio("music","https://kbve.com/assets/img/fishchip/bg.ogg"),this.load.image("creditsBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),this.load.audio("type","https://kbve.com/assets/img/fishchip/type.mp3"),this.load.spritesheet("fishing","https://kbve.com/assets/img/fishchip/animate.png",{frameWidth:800,frameHeight:600}),this.load.image("fish","https://kbve.com/assets/img/letter_logo.png"),this.load.image("background","https://kbve.com/assets/img/fishchip/scaled_fish_menu_minigame.webp"),this.load.image("tiles","https://kbve.com/assets/img/fishchip/desert_tileset_1.png"),this.load.image("cloud-city-tiles","/assets/map/cloud_tileset.png"),this.load.tilemapTiledJSON("cloud-city-map-large","/assets/map/cloud_city_large.json"),this.load.tilemapTiledJSON("cloud-city-map","https://kbve.com/assets/img/fishchip/cloud_city.json"),this.load.spritesheet("player","https://kbve.com/assets/img/fishchip/chip_charactersheet_warmer.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("knights","/assets/entity/knights.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("jacko","/assets/entity/jacko.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("monks","/assets/entity/monks.png",{frameWidth:52,frameHeight:72})}create(){this.sound.get("music")?.isPlaying||this.sound.add("music",{loop:!0,volume:.1}).play(),this.add.image(480,480,"mainBg").setScale(.1),this.mainMenuButtonImage=this.add.image(480,480,"scroll").setAlpha(.9).setScale(.7,.2).setInteractive({useHandCursor:!0}),this.mainMenuButtonText=this.add.text(480,480,"Start Game",{fontFamily:"Arial Black",fontSize:50,color:"#ffffff",stroke:"#000000",strokeThickness:6}).setOrigin(.5).setInteractive({useHandCursor:!0}),this.mainMenuButtonText.on("pointerdown",()=>{this.scene.start("SandCity")},this)}}class ts{constructor(S,A=4){this.bounds=S,this.capacity=A,this.points=[],this.divided=!1,this.cache=new Map}subdivide(){const{xMin:S,yMin:A,xMax:I,yMax:B}=this.bounds,b=(I-S)/2,c=(B-A)/2,m=S,t=A;this.northeast=new ts({xMin:m+b,xMax:m+2*b,yMin:A,yMax:t+c},this.capacity),this.northwest=new ts({xMin:S,xMax:m+b,yMin:A,yMax:t+c},this.capacity),this.southeast=new ts({xMin:m+b,xMax:m+2*b,yMin:t+c,yMax:t+2*c},this.capacity),this.southwest=new ts({xMin:S,xMax:m+b,yMin:t+c,yMax:t+2*c},this.capacity),this.divided=!0}insert(S){return this.contains(S.bounds)?this.points.length=A&&S.xMax<=B&&S.yMin>=I&&S.yMax<=b}generateCacheKey(S){const{xMin:A,xMax:I,yMin:B,yMax:b}=S;return`${A},${I},${B},${b}`}queryRange(S,A=[]){if(!this.intersects(S))return A;for(const I of this.points)this.isWithinBounds(I.bounds,S)&&A.push(I);return this.divided&&(this.northwest?.queryRange(S,A),this.northeast?.queryRange(S,A),this.southwest?.queryRange(S,A),this.southeast?.queryRange(S,A)),A}query(S,A=[]){const I=`${S.x},${S.y}`,B=this.cache.get(I);if(B)return B;if(!this.intersects({xMin:S.x,xMax:S.x,yMin:S.y,yMax:S.y}))return A;for(const b of this.points)this.isWithinRange(S,b.bounds)&&A.push(b);return this.divided&&(this.northwest?.query(S,A),this.northeast?.query(S,A),this.southwest?.query(S,A),this.southeast?.query(S,A)),this.cache.set(I,A),A}intersects(S){const{xMin:A,yMin:I,xMax:B,yMax:b}=this.bounds;return!(S.xMin>B||S.xMaxb||S.yMax=A.xMin&&S.xMin<=A.xMax&&S.yMax>=A.yMin&&S.yMin<=A.yMax}isWithinRange(S,A){return S.x>=A.xMin&&S.x<=A.xMax&&S.y>=A.yMin&&S.y<=A.yMax}}class dS{constructor(){this.events={}}on(S,A){this.events[S]||(this.events[S]=[]),this.events[S]?.push(A)}off(S,A){this.events[S]&&(this.events[S]=this.events[S]?.filter(I=>I!==A))}emit(S,A){this.events[S]&&this.events[S]?.forEach(I=>I(A))}}const jt=new dS;function cS(E,S,A){let I=new Set([...S,void 0]);return E.listen((B,b)=>{I.has(b)&&A(B,b)})}const vS={username:"Guest",health:"100",mana:"100",energy:"100",maxHealth:"100",maxMana:"100",maxEnergy:"100",armour:"0",agility:"0",strength:"0",intelligence:"0",experience:"0",reputation:"0",faith:"0"},pS={inCombat:!1,isDead:!1,isResting:!1,activeBoosts:{}},gS={id:"",title:"",description:"",journals:[],isComplete:!1,reward:""},mS={backpack:[],equipment:{head:null,body:null,legs:null,feet:null,hands:null,weapon:null,shield:null,accessory:null}},xS={},yS={stats:vS,inventory:mS,state:pS},TS=E=>{hr(async()=>{ar.set({...ar.get(),[E.id]:E})})};function Ir(E,S){return Kx(E,S,{encode(A){return JSON.stringify(A)},decode(A){try{return JSON.parse(A)}catch{return S}}})}const As=Ir("playerData",yS),SS=Ir("quest",gS),ar=Ir("items",xS),Qi=Ir("notifications",[]),CS=E=>{hr(async()=>{const S=As.get();S.inventory.backpack.push(E),As.set({...S})})},Bo=E=>{const A=ar.get()[E];if(A)return A;console.warn(`Item with ID ${E} not found.`)},ES=E=>{hr(async()=>{const S=nd(),A={...E,id:S};TS(A),CS(A.id),jt.emit("notification",{title:"Success",message:`You got a ${A.name}, verified by E Corp ID ${A.id}`,notificationType:ks.success})})},PS=E=>{hr(async()=>{const S=As.get(),A=parseInt(S.stats.health,10),I=Math.max(A-E,0);S.stats={...S.stats,health:I.toString()},As.set({...S})})},ks={caution:{type:"caution",color:"bg-yellow-200 border-yellow-300 text-yellow-700",imgUrl:"/assets/icons/notification.svg"},warning:{type:"warning",color:"bg-orange-200 border-orange-300 text-orange-700",imgUrl:"/assets/icons/notification.svg"},danger:{type:"danger",color:"bg-red-200 border-red-300 text-red-700",imgUrl:"/assets/icons/notification.svg"},success:{type:"success",color:"bg-green-200 border-green-300 text-green-700",imgUrl:"/assets/icons/notification.svg"},info:{type:"info",color:"bg-blue-200 border-blue-300 text-blue-700",imgUrl:"/assets/icons/notification.svg"}},Ts="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function AS(E,S,A){for(;E.length=0;I--){const B=E%Ts.length;A=Ts.charAt(B)+A,E=Math.floor(E/Ts.length)}return AS(A,S,Ts[0])}function nd(){const E=Date.now(),S=RS(E,10),A=wS(16);return S+A}class rd{constructor(S,A,I){this.scene=S,this.gridEngine=A,this.quadtree=I,this.cursor=this.scene.input.keyboard?.createCursorKeys(),this.initializeWASDKeys(),this.registerEventHandlers()}initializeWASDKeys(){const S=this.scene.input.keyboard;S&&(this.wasdKeys={W:S.addKey(Phaser.Input.Keyboard.KeyCodes.W),A:S.addKey(Phaser.Input.Keyboard.KeyCodes.A),S:S.addKey(Phaser.Input.Keyboard.KeyCodes.S),D:S.addKey(Phaser.Input.Keyboard.KeyCodes.D)})}registerEventHandlers(){//! Broken -jt.on("playerMove",this.handlePlayerMove.bind(this)),jt.on("playerSteal",this.handlePlayerSteal.bind(this)),jt.on("playerReward",this.handlePlayerReward.bind(this)),jt.on("playerDamage",this.handlePlayerCombatDamage.bind(this))}handlePlayerReward(S){console.log("Rewarding the player"),S&&(jt.emit("notification",{title:"Success",message:S.message,notificationType:ks.success}),ES(S.item))}handlePlayerCombatDamage(S){S&&(PS(parseInt(S.damage)),jt.emit("notification",{title:"Danger",message:`You taken ${S.damage} points of damage!`,notificationType:ks.danger}))}handlePlayerSteal(S){S&&(Math.random()>.5?jt.emit("playerReward",{message:"You stole a fish!",item:{name:"Fish",type:"food",description:"A yummy fish",durability:100,bonuses:{health:10},weight:5,consumable:!0,id:""}}):(jt.emit("notification",{title:"Danger",message:`You failed to steal from ${S.npcName}!`,notificationType:ks.danger}),jt.emit("playerDamage",{damage:"1"})))}handlePlayerMove(S){S&&this.gridEngine.moveTo("player",{x:S.x,y:S.y})}handleMovement(){if(!this.cursor)return;const S=this.cursor,A=this.wasdKeys;if(this.scene.input.keyboard?.addKey("F").isDown){const I=this.gridEngine.getPosition("player"),B=this.quadtree.query(I);for(const b of B)b.action()}(S.left.isDown||A.A.isDown)&&(S.up.isDown||A.W.isDown)?this.gridEngine.move("player","up-left"):(S.left.isDown||A.A.isDown)&&(S.down.isDown||A.S.isDown)?this.gridEngine.move("player","down-left"):(S.right.isDown||A.D.isDown)&&(S.up.isDown||A.W.isDown)?this.gridEngine.move("player","up-right"):(S.right.isDown||A.D.isDown)&&(S.down.isDown||A.S.isDown)?this.gridEngine.move("player","down-right"):S.left.isDown||A.A.isDown?this.gridEngine.move("player","left"):S.right.isDown||A.D.isDown?this.gridEngine.move("player","right"):S.up.isDown||A.W.isDown?this.gridEngine.move("player","up"):(S.down.isDown||A.S.isDown)&&this.gridEngine.move("player","down")}}class ad extends Phaser.GameObjects.Container{constructor(S,A,I,B){const b=A.x,c=A.y-A.height+10;super(S,b,c),this.sprite=A;const m=150,t=40+B.length*20;this.background=S.add.rectangle(0,0,m,t,0,.7),this.text=S.add.text(0,-t/2+10,I,{fontSize:"12px",color:"#ffffff"}).setOrigin(.5),this.buttons=B.map((a,v)=>{const o=S.add.text(0,-t/2+30+v*20,a.label,{fontSize:"12px",color:"#00ff00"}).setOrigin(.5);return o.setInteractive({useHandCursor:!0}),o.on("pointerdown",a.callback),o}),this.add(this.background),this.add(this.text),this.buttons.forEach(a=>this.add(a)),this.scene.add.existing(this)}updatePosition(){this.setPosition(this.sprite.x-30,this.sprite.y-this.sprite.height-this.background.height/2+100)}static attachToSprite(S,A,I,B){A.setInteractive(),A.on("pointerover",()=>{const b={npcId:A.name,npcName:I,actions:B.map(m=>m.label)};if(jt.emit("npcInteraction",b),!A.getData("tooltipMenu")){const m=new ad(S,A,I,B);A.setData("tooltipMenu",m)}const c=A.getData("tooltipMenu");c.setVisible(!0),c.updatePosition()}),A.on("pointerout",()=>{const b=A.getData("tooltipMenu");b&&b.setVisible(!1)})}static updateAllTooltipPositions(S){S.children.list.forEach(A=>{if(A instanceof Phaser.GameObjects.Sprite){const I=A.getData("tooltipMenu");I&&I.updatePosition()}})}}let jS=class extends Phaser.GameObjects.Sprite{};function FS(E,S,A,I){const m=E.add.graphics();m.fillStyle(16777215,1),m.fillRoundedRect(0,0,200,60,16),m.setDepth(99);const t=E.add.text(100,30,A,{fontFamily:"Arial",fontSize:16,color:"#000000"});t.setOrigin(.5),t.setWordWrapWidth(200-10*2),t.setDepth(100);const a=E.add.container(0,0,[m,t]);return a.setDepth(100),S.messageBubble=a,OS(S),E.time.addEvent({delay:I,callback:()=>{a.destroy(),S.messageBubble===a&&(S.messageBubble=void 0)},callbackScope:E}),a}function LS(E,S,A){const c=E.add.graphics();c.fillStyle(16777215,1),c.fillRoundedRect(0,0,200,60,16),c.setDepth(99);const m=E.add.text(100,30,A,{fontFamily:"Arial",fontSize:16,color:"#000000"});m.setOrigin(.5),m.setWordWrapWidth(200-10*2),m.setDepth(100);const t=E.add.container(0,0,[c,m]);return t.setDepth(100),S.textBubble=t,co(S),t}function co(E){const S=E.textBubble;S&&(S.x=E.x,S.y=E.y-E.height-S.height/2)}function OS(E){const S=E.messageBubble;S&&(S.x=E.x,S.y=E.y-E.height-S.height/2)}class DS{constructor(){this.actionHandlers={Talk:this.talkToNPC.bind(this),Trade:this.tradeWithNPC.bind(this),"Move to":this.moveToNPC.bind(this),Steal:this.stealFromNPC.bind(this),Combat:this.startCombat.bind(this),"Check Fish":this.checkFish.bind(this)}}getActionHandler(S){return this.actionHandlers[S]}talkToNPC(S){console.log(`Talking to NPC with ID: ${S.npcId}`)}tradeWithNPC(S){console.log(`Trading with NPC with ID: ${S.npcId}`)}moveToNPC(S){const I=S.data?.coords||{x:10,y:15};jt.emit("playerMove",I)}stealFromNPC(S){console.log(`Attempting to steal from NPC with ID: ${S.npcId}`);const A={npcId:S.npcId,npcName:S.npcName,data:S.data};jt.emit("playerSteal",A)}startCombat(S){console.log(`Starting combat with NPC with ID: ${S.npcId}`)}checkFish(S){console.log(`Checking fish for NPC with ID: ${S.npcId}`)}attachNPCEvent(S,A,I,B){S.setInteractive(),S.on("pointerover",()=>{const b={npcId:S.name||"",npcName:A,actions:I.map(c=>c.label),data:B||{}};jt.emit("npcInteraction",b)}),S.on("pointerout",()=>{})}}const od=new DS;function hd(E){return+E[E.length-1]}function ld(E){return E.startsWith("monster_bird_")&&!E.startsWith("monster_bird_shadow")}function ud(E,S,A,I,B){const b=[];for(let c=0;c<10;c++){const m=E.add.sprite(0,0,"monster_bird");m.setCrop(S,A,I,B),m.scale=3,b.push(m)}return b}function fd(E){return ud(E,0,0,61,47)}function dd(E){return ud(E,22,47,16,10)}function cd(E){E.anims.create({key:"bird",frames:E.anims.generateFrameNumbers("monster_bird",{start:0,end:2}),frameRate:10,repeat:-1,yoyo:!0})}let JS=class extends js.GameObjects.Sprite{textBubble;tooltip};class IS extends Fr.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"SandCity"});const S={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new ts(S)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57}),jt.emit("notification",{title:"Success",message:`You arrived safely to SandCity Passport: ${nd()}`,notificationType:ks.success})}create(){const S=this.make.tilemap({key:"cloud-city-map"});S.addTilesetImage("Cloud City","tiles");for(let b=0;b({id:"monster_bird_"+c,sprite:b,startPosition:{x:7,y:7+c},speed:5,collides:!1})),...this.monsterBirdShadows.map((b,c)=>({id:"monster_bird_shadow_"+c,sprite:b,startPosition:{x:7,y:7+c},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(S,I),this.loadRanges(),this.playerController=new rd(this,this.gridEngine,this.quadtree),FS(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!",3e3),this.gridEngine.moveRandomly("npc",1500,3),this.gridEngine.moveRandomly("fishNpc",1500,3);for(let b=0;b<10;b++)this.gridEngine.moveRandomly("monster_bird_"+b,1e3,10);this.gridEngine.positionChangeStarted().subscribe(({charId:b,exitTile:c,enterTile:m})=>{ld(b)&&this.gridEngine.moveTo("monster_bird_shadow_"+hd(b),{x:m.x,y:m.y})});const B=(b,c,m)=>{const t=this.gridEngine.getPosition(b.name);od.attachNPCEvent(b,c,m,{coords:t})};B(this.npcSprite,"FisherMan",[{label:"Talk"},{label:"Trade"},{label:"Move to"},{label:"Steal"},{label:"Combat"}]),B(this.fishNpcSprite,"Fish NPC Actions",[{label:"Check Fish"},{label:"Move to"}]),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const S=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>{const A={message:"Seems like there are no fish in the sand pits. You know null, this area could be fixed up a bit too."};jt.emit("charEvent",A)}},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:()=>{const A={message:"Sign does not have much to say.",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/woodensign.webp"};jt.emit("charEvent",A)}},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>{const A={message:"Sorry, we are closed!",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/animebar.webp"};jt.emit("charEvent",A)}},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>{const A={message:"Samson the Great was an amazing sailer, died drinking dat drank.",character_name:"Samson Statue",character_image:"/assets/npc/samson.png",background_image:"/assets/background/animetombstone.webp"};jt.emit("charEvent",A)}}];for(const A of S)this.quadtree.insert(A)}update(){this.playerController?.handleMovement()}}class kS extends js.GameObjects.Sprite{textBubble}class BS extends Fr.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"CloudCity"});const S={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new ts(S)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57})}create(){const S=this.make.tilemap({key:"cloud-city-map-large"});S.addTilesetImage("cloud_tileset","cloud-city-tiles");for(let B=0;B({id:"monster_bird_"+b,sprite:B,startPosition:{x:7,y:7+b},speed:5,collides:!1})),...this.monsterBirdShadows.map((B,b)=>({id:"monster_bird_shadow_"+b,sprite:B,startPosition:{x:7,y:7+b},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(S,I),this.loadRanges(),this.playerController=new rd(this,this.gridEngine,this.quadtree),LS(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!"),this.gridEngine.moveRandomly("npc",1500,3);for(let B=0;B<10;B++)this.gridEngine.moveRandomly("monster_bird_"+B,1e3,20);this.gridEngine.positionChangeStarted().subscribe(({charId:B,exitTile:b,enterTile:c})=>{ld(B)&&this.gridEngine.moveTo("monster_bird_shadow_"+hd(B),{x:c.x,y:c.y})}),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const S=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>{const A={message:"Seems like there are no fish in the sand pits. You know null, this area could be fixed up a bit too."};jt.emit("charEvent",A)}},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:async()=>{try{const B={message:`The Database Response time: ${(await(await fetch("https://api.cryptothrone.com/api/v1/speed")).json()).message.time_ms} ms`,character_name:"Planets Be Scalin",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/woodensign.webp"};jt.emit("charEvent",B)}catch(A){console.error("Error fetching data:",A);const I={message:"Sign does not have much to say. Failed to fetch response time.",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/woodensign.webp"};jt.emit("charEvent",I)}}},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>{const A={message:"Sorry, we are closed!",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/animebar.webp"};jt.emit("charEvent",A)}},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>{const A={message:"Samson the Great was an amazing sailer, died drinking dat drank.",character_name:"Samson Statue",character_image:"/assets/npc/samson.png",background_image:"/assets/background/animetombstone.webp"};jt.emit("charEvent",A)}}];for(const A of S)this.quadtree.insert(A)}update(){this.playerController?.handleMovement(),this.npcSprite&&this.npcSprite.textBubble&&co(this.npcSprite),this.fishNpcSprite&&this.fishNpcSprite.textBubble&&co(this.fishNpcSprite)}}const bS=sr.div` +*/class os{constructor(T,E=4){this.bounds=T,this.capacity=E,this.points=[],this.divided=!1,this.cache=new Map}subdivide(){const{xMin:T,yMin:E,xMax:F,yMax:O}=this.bounds,D=(F-T)/2,c=(O-E)/2,m=T,t=E;this.northeast=new os({xMin:m+D,xMax:m+2*D,yMin:E,yMax:t+c},this.capacity),this.northwest=new os({xMin:T,xMax:m+D,yMin:E,yMax:t+c},this.capacity),this.southeast=new os({xMin:m+D,xMax:m+2*D,yMin:t+c,yMax:t+2*c},this.capacity),this.southwest=new os({xMin:T,xMax:m+D,yMin:t+c,yMax:t+2*c},this.capacity),this.divided=!0}insert(T){return this.contains(T.bounds)?this.points.length=E&&T.xMax<=O&&T.yMin>=F&&T.yMax<=D}generateCacheKey(T){const{xMin:E,xMax:F,yMin:O,yMax:D}=T;return`${E},${F},${O},${D}`}queryRange(T,E=[]){if(!this.intersects(T))return E;for(const F of this.points)this.isWithinBounds(F.bounds,T)&&E.push(F);return this.divided&&(this.northwest?.queryRange(T,E),this.northeast?.queryRange(T,E),this.southwest?.queryRange(T,E),this.southeast?.queryRange(T,E)),E}query(T,E=[]){const F=`${T.x},${T.y}`,O=this.cache.get(F);if(O)return O;if(!this.intersects({xMin:T.x,xMax:T.x,yMin:T.y,yMax:T.y}))return E;for(const D of this.points)this.isWithinRange(T,D.bounds)&&E.push(D);return this.divided&&(this.northwest?.query(T,E),this.northeast?.query(T,E),this.southwest?.query(T,E),this.southeast?.query(T,E)),this.cache.set(F,E),E}intersects(T){const{xMin:E,yMin:F,xMax:O,yMax:D}=this.bounds;return!(T.xMin>O||T.xMaxD||T.yMax=E.xMin&&T.xMin<=E.xMax&&T.yMax>=E.yMin&&T.yMin<=E.yMax}isWithinRange(T,E){return T.x>=E.xMin&&T.x<=E.xMax&&T.y>=E.yMin&&T.y<=E.yMax}}class R2{constructor(){this.events={}}on(T,E){this.events[T]||(this.events[T]=[]),this.events[T]?.push(E)}off(T,E){this.events[T]&&(this.events[T]=this.events[T]?.filter(F=>F!==E))}emit(T,E){this.events[T]&&this.events[T]?.forEach(F=>F(E))}}const Jt=new R2;function F2(S,T,E){let F=new Set([...T,void 0]);return S.listen((O,D)=>{F.has(D)&&E(O,D)})}function qd(S,T){return function(){return S.apply(T,arguments)}}const{toString:L2}=Object.prototype,{getPrototypeOf:dh}=Object,kr=(S=>T=>{const E=L2.call(T);return S[E]||(S[E]=E.slice(8,-1).toLowerCase())})(Object.create(null)),mi=S=>(S=S.toLowerCase(),T=>kr(T)===S),qr=S=>T=>typeof T===S,{isArray:bs}=Array,cn=qr("undefined");function O2(S){return S!==null&&!cn(S)&&S.constructor!==null&&!cn(S.constructor)&&ii(S.constructor.isBuffer)&&S.constructor.isBuffer(S)}const _d=mi("ArrayBuffer");function D2(S){let T;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?T=ArrayBuffer.isView(S):T=S&&S.buffer&&_d(S.buffer),T}const I2=qr("string"),ii=qr("function"),tc=qr("number"),_r=S=>S!==null&&typeof S=="object",B2=S=>S===!0||S===!1,gr=S=>{if(kr(S)!=="object")return!1;const T=dh(S);return(T===null||T===Object.prototype||Object.getPrototypeOf(T)===null)&&!(Symbol.toStringTag in S)&&!(Symbol.iterator in S)},b2=mi("Date"),N2=mi("File"),G2=mi("Blob"),z2=mi("FileList"),U2=S=>_r(S)&&ii(S.pipe),X2=S=>{let T;return S&&(typeof FormData=="function"&&S instanceof FormData||ii(S.append)&&((T=kr(S))==="formdata"||T==="object"&&ii(S.toString)&&S.toString()==="[object FormData]"))},V2=mi("URLSearchParams"),W2=S=>S.trim?S.trim():S.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function mn(S,T,{allOwnKeys:E=!1}={}){if(S===null||typeof S>"u")return;let F,O;if(typeof S!="object"&&(S=[S]),bs(S))for(F=0,O=S.length;F0;)if(O=E[F],T===O.toLowerCase())return O;return null}const ic=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,sc=S=>!cn(S)&&S!==ic;function Xo(){const{caseless:S}=sc(this)&&this||{},T={},E=(F,O)=>{const D=S&&ec(T,O)||O;gr(T[D])&&gr(F)?T[D]=Xo(T[D],F):gr(F)?T[D]=Xo({},F):bs(F)?T[D]=F.slice():T[D]=F};for(let F=0,O=arguments.length;F(mn(T,(O,D)=>{E&&ii(O)?S[D]=qd(O,E):S[D]=O},{allOwnKeys:F}),S),H2=S=>(S.charCodeAt(0)===65279&&(S=S.slice(1)),S),K2=(S,T,E,F)=>{S.prototype=Object.create(T.prototype,F),S.prototype.constructor=S,Object.defineProperty(S,"super",{value:T.prototype}),E&&Object.assign(S.prototype,E)},j2=(S,T,E,F)=>{let O,D,c;const m={};if(T=T||{},S==null)return T;do{for(O=Object.getOwnPropertyNames(S),D=O.length;D-- >0;)c=O[D],(!F||F(c,S,T))&&!m[c]&&(T[c]=S[c],m[c]=!0);S=E!==!1&&dh(S)}while(S&&(!E||E(S,T))&&S!==Object.prototype);return T},$2=(S,T,E)=>{S=String(S),(E===void 0||E>S.length)&&(E=S.length),E-=T.length;const F=S.indexOf(T,E);return F!==-1&&F===E},Z2=S=>{if(!S)return null;if(bs(S))return S;let T=S.length;if(!tc(T))return null;const E=new Array(T);for(;T-- >0;)E[T]=S[T];return E},J2=(S=>T=>S&&T instanceof S)(typeof Uint8Array<"u"&&dh(Uint8Array)),Q2=(S,T)=>{const F=(S&&S[Symbol.iterator]).call(S);let O;for(;(O=F.next())&&!O.done;){const D=O.value;T.call(S,D[0],D[1])}},k2=(S,T)=>{let E;const F=[];for(;(E=S.exec(T))!==null;)F.push(E);return F},q2=mi("HTMLFormElement"),_2=S=>S.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(E,F,O){return F.toUpperCase()+O}),Sf=(({hasOwnProperty:S})=>(T,E)=>S.call(T,E))(Object.prototype),tC=mi("RegExp"),nc=(S,T)=>{const E=Object.getOwnPropertyDescriptors(S),F={};mn(E,(O,D)=>{let c;(c=T(O,D,S))!==!1&&(F[D]=c||O)}),Object.defineProperties(S,F)},eC=S=>{nc(S,(T,E)=>{if(ii(S)&&["arguments","caller","callee"].indexOf(E)!==-1)return!1;const F=S[E];if(ii(F)){if(T.enumerable=!1,"writable"in T){T.writable=!1;return}T.set||(T.set=()=>{throw Error("Can not rewrite read-only method '"+E+"'")})}})},iC=(S,T)=>{const E={},F=O=>{O.forEach(D=>{E[D]=!0})};return bs(S)?F(S):F(String(S).split(T)),E},sC=()=>{},nC=(S,T)=>(S=+S,Number.isFinite(S)?S:T),Eo="abcdefghijklmnopqrstuvwxyz",Cf="0123456789",rc={DIGIT:Cf,ALPHA:Eo,ALPHA_DIGIT:Eo+Eo.toUpperCase()+Cf},rC=(S=16,T=rc.ALPHA_DIGIT)=>{let E="";const{length:F}=T;for(;S--;)E+=T[Math.random()*F|0];return E};function aC(S){return!!(S&&ii(S.append)&&S[Symbol.toStringTag]==="FormData"&&S[Symbol.iterator])}const oC=S=>{const T=new Array(10),E=(F,O)=>{if(_r(F)){if(T.indexOf(F)>=0)return;if(!("toJSON"in F)){T[O]=F;const D=bs(F)?[]:{};return mn(F,(c,m)=>{const t=E(c,O+1);!cn(t)&&(D[m]=t)}),T[O]=void 0,D}}return F};return E(S,0)},hC=mi("AsyncFunction"),lC=S=>S&&(_r(S)||ii(S))&&ii(S.then)&&ii(S.catch),yt={isArray:bs,isArrayBuffer:_d,isBuffer:O2,isFormData:X2,isArrayBufferView:D2,isString:I2,isNumber:tc,isBoolean:B2,isObject:_r,isPlainObject:gr,isUndefined:cn,isDate:b2,isFile:N2,isBlob:G2,isRegExp:tC,isFunction:ii,isStream:U2,isURLSearchParams:V2,isTypedArray:J2,isFileList:z2,forEach:mn,merge:Xo,extend:Y2,trim:W2,stripBOM:H2,inherits:K2,toFlatObject:j2,kindOf:kr,kindOfTest:mi,endsWith:$2,toArray:Z2,forEachEntry:Q2,matchAll:k2,isHTMLForm:q2,hasOwnProperty:Sf,hasOwnProp:Sf,reduceDescriptors:nc,freezeMethods:eC,toObjectSet:iC,toCamelCase:_2,noop:sC,toFiniteNumber:nC,findKey:ec,global:ic,isContextDefined:sc,ALPHABET:rc,generateString:rC,isSpecCompliantForm:aC,toJSONObject:oC,isAsyncFn:hC,isThenable:lC};function Zt(S,T,E,F,O){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=S,this.name="AxiosError",T&&(this.code=T),E&&(this.config=E),F&&(this.request=F),O&&(this.response=O)}yt.inherits(Zt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:yt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ac=Zt.prototype,oc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(S=>{oc[S]={value:S}});Object.defineProperties(Zt,oc);Object.defineProperty(ac,"isAxiosError",{value:!0});Zt.from=(S,T,E,F,O,D)=>{const c=Object.create(ac);return yt.toFlatObject(S,c,function(t){return t!==Error.prototype},m=>m!=="isAxiosError"),Zt.call(c,S.message,T,E,F,O),c.cause=S,c.name=S.name,D&&Object.assign(c,D),c};const uC=null;function Vo(S){return yt.isPlainObject(S)||yt.isArray(S)}function hc(S){return yt.endsWith(S,"[]")?S.slice(0,-2):S}function Ef(S,T,E){return S?S.concat(T).map(function(O,D){return O=hc(O),!E&&D?"["+O+"]":O}).join(E?".":""):T}function fC(S){return yt.isArray(S)&&!S.some(Vo)}const dC=yt.toFlatObject(yt,{},null,function(T){return/^is[A-Z]/.test(T)});function ta(S,T,E){if(!yt.isObject(S))throw new TypeError("target must be an object");T=T||new FormData,E=yt.toFlatObject(E,{metaTokens:!0,dots:!1,indexes:!1},!1,function(i,h){return!yt.isUndefined(h[i])});const F=E.metaTokens,O=E.visitor||v,D=E.dots,c=E.indexes,t=(E.Blob||typeof Blob<"u"&&Blob)&&yt.isSpecCompliantForm(T);if(!yt.isFunction(O))throw new TypeError("visitor must be a function");function o(e){if(e===null)return"";if(yt.isDate(e))return e.toISOString();if(!t&&yt.isBlob(e))throw new Zt("Blob is not supported. Use a Buffer instead.");return yt.isArrayBuffer(e)||yt.isTypedArray(e)?t&&typeof Blob=="function"?new Blob([e]):Buffer.from(e):e}function v(e,i,h){let s=e;if(e&&!h&&typeof e=="object"){if(yt.endsWith(i,"{}"))i=F?i:i.slice(0,-2),e=JSON.stringify(e);else if(yt.isArray(e)&&fC(e)||(yt.isFileList(e)||yt.endsWith(i,"[]"))&&(s=yt.toArray(e)))return i=hc(i),s.forEach(function(f,u){!(yt.isUndefined(f)||f===null)&&T.append(c===!0?Ef([i],u,D):c===null?i:i+"[]",o(f))}),!1}return Vo(e)?!0:(T.append(Ef(h,i,D),o(e)),!1)}const a=[],r=Object.assign(dC,{defaultVisitor:v,convertValue:o,isVisitable:Vo});function n(e,i){if(!yt.isUndefined(e)){if(a.indexOf(e)!==-1)throw Error("Circular reference detected in "+i.join("."));a.push(e),yt.forEach(e,function(s,l){(!(yt.isUndefined(s)||s===null)&&O.call(T,s,yt.isString(l)?l.trim():l,i,r))===!0&&n(s,i?i.concat(l):[l])}),a.pop()}}if(!yt.isObject(S))throw new TypeError("data must be an object");return n(S),T}function Pf(S){const T={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(S).replace(/[!'()~]|%20|%00/g,function(F){return T[F]})}function ch(S,T){this._pairs=[],S&&ta(S,this,T)}const lc=ch.prototype;lc.append=function(T,E){this._pairs.push([T,E])};lc.toString=function(T){const E=T?function(F){return T.call(this,F,Pf)}:Pf;return this._pairs.map(function(O){return E(O[0])+"="+E(O[1])},"").join("&")};function cC(S){return encodeURIComponent(S).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function uc(S,T,E){if(!T)return S;const F=E&&E.encode||cC,O=E&&E.serialize;let D;if(O?D=O(T,E):D=yt.isURLSearchParams(T)?T.toString():new ch(T,E).toString(F),D){const c=S.indexOf("#");c!==-1&&(S=S.slice(0,c)),S+=(S.indexOf("?")===-1?"?":"&")+D}return S}class Af{constructor(){this.handlers=[]}use(T,E,F){return this.handlers.push({fulfilled:T,rejected:E,synchronous:F?F.synchronous:!1,runWhen:F?F.runWhen:null}),this.handlers.length-1}eject(T){this.handlers[T]&&(this.handlers[T]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(T){yt.forEach(this.handlers,function(F){F!==null&&T(F)})}}const fc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vC=typeof URLSearchParams<"u"?URLSearchParams:ch,pC=typeof FormData<"u"?FormData:null,gC=typeof Blob<"u"?Blob:null,mC={isBrowser:!0,classes:{URLSearchParams:vC,FormData:pC,Blob:gC},protocols:["http","https","file","blob","url","data"]},dc=typeof window<"u"&&typeof document<"u",xC=(S=>dc&&["ReactNative","NativeScript","NS"].indexOf(S)<0)(typeof navigator<"u"&&navigator.product),yC=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",TC=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:dc,hasStandardBrowserEnv:xC,hasStandardBrowserWebWorkerEnv:yC},Symbol.toStringTag,{value:"Module"})),gi={...TC,...mC};function SC(S,T){return ta(S,new gi.classes.URLSearchParams,Object.assign({visitor:function(E,F,O,D){return gi.isNode&&yt.isBuffer(E)?(this.append(F,E.toString("base64")),!1):D.defaultVisitor.apply(this,arguments)}},T))}function CC(S){return yt.matchAll(/\w+|\[(\w*)]/g,S).map(T=>T[0]==="[]"?"":T[1]||T[0])}function EC(S){const T={},E=Object.keys(S);let F;const O=E.length;let D;for(F=0;F=E.length;return c=!c&&yt.isArray(O)?O.length:c,t?(yt.hasOwnProp(O,c)?O[c]=[O[c],F]:O[c]=F,!m):((!O[c]||!yt.isObject(O[c]))&&(O[c]=[]),T(E,F,O[c],D)&&yt.isArray(O[c])&&(O[c]=EC(O[c])),!m)}if(yt.isFormData(S)&&yt.isFunction(S.entries)){const E={};return yt.forEachEntry(S,(F,O)=>{T(CC(F),O,E,0)}),E}return null}function PC(S,T,E){if(yt.isString(S))try{return(T||JSON.parse)(S),yt.trim(S)}catch(F){if(F.name!=="SyntaxError")throw F}return(E||JSON.stringify)(S)}const vh={transitional:fc,adapter:["xhr","http"],transformRequest:[function(T,E){const F=E.getContentType()||"",O=F.indexOf("application/json")>-1,D=yt.isObject(T);if(D&&yt.isHTMLForm(T)&&(T=new FormData(T)),yt.isFormData(T))return O?JSON.stringify(cc(T)):T;if(yt.isArrayBuffer(T)||yt.isBuffer(T)||yt.isStream(T)||yt.isFile(T)||yt.isBlob(T))return T;if(yt.isArrayBufferView(T))return T.buffer;if(yt.isURLSearchParams(T))return E.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),T.toString();let m;if(D){if(F.indexOf("application/x-www-form-urlencoded")>-1)return SC(T,this.formSerializer).toString();if((m=yt.isFileList(T))||F.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ta(m?{"files[]":T}:T,t&&new t,this.formSerializer)}}return D||O?(E.setContentType("application/json",!1),PC(T)):T}],transformResponse:[function(T){const E=this.transitional||vh.transitional,F=E&&E.forcedJSONParsing,O=this.responseType==="json";if(T&&yt.isString(T)&&(F&&!this.responseType||O)){const c=!(E&&E.silentJSONParsing)&&O;try{return JSON.parse(T)}catch(m){if(c)throw m.name==="SyntaxError"?Zt.from(m,Zt.ERR_BAD_RESPONSE,this,null,this.response):m}}return T}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gi.classes.FormData,Blob:gi.classes.Blob},validateStatus:function(T){return T>=200&&T<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};yt.forEach(["delete","get","head","post","put","patch"],S=>{vh.headers[S]={}});const ph=vh,AC=yt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),MC=S=>{const T={};let E,F,O;return S&&S.split(` +`).forEach(function(c){O=c.indexOf(":"),E=c.substring(0,O).trim().toLowerCase(),F=c.substring(O+1).trim(),!(!E||T[E]&&AC[E])&&(E==="set-cookie"?T[E]?T[E].push(F):T[E]=[F]:T[E]=T[E]?T[E]+", "+F:F)}),T},Mf=Symbol("internals");function _s(S){return S&&String(S).trim().toLowerCase()}function mr(S){return S===!1||S==null?S:yt.isArray(S)?S.map(mr):String(S)}function wC(S){const T=Object.create(null),E=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let F;for(;F=E.exec(S);)T[F[1]]=F[2];return T}const RC=S=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(S.trim());function Po(S,T,E,F,O){if(yt.isFunction(F))return F.call(this,T,E);if(O&&(T=E),!!yt.isString(T)){if(yt.isString(F))return T.indexOf(F)!==-1;if(yt.isRegExp(F))return F.test(T)}}function FC(S){return S.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(T,E,F)=>E.toUpperCase()+F)}function LC(S,T){const E=yt.toCamelCase(" "+T);["get","set","has"].forEach(F=>{Object.defineProperty(S,F+E,{value:function(O,D,c){return this[F].call(this,T,O,D,c)},configurable:!0})})}class ea{constructor(T){T&&this.set(T)}set(T,E,F){const O=this;function D(m,t,o){const v=_s(t);if(!v)throw new Error("header name must be a non-empty string");const a=yt.findKey(O,v);(!a||O[a]===void 0||o===!0||o===void 0&&O[a]!==!1)&&(O[a||t]=mr(m))}const c=(m,t)=>yt.forEach(m,(o,v)=>D(o,v,t));return yt.isPlainObject(T)||T instanceof this.constructor?c(T,E):yt.isString(T)&&(T=T.trim())&&!RC(T)?c(MC(T),E):T!=null&&D(E,T,F),this}get(T,E){if(T=_s(T),T){const F=yt.findKey(this,T);if(F){const O=this[F];if(!E)return O;if(E===!0)return wC(O);if(yt.isFunction(E))return E.call(this,O,F);if(yt.isRegExp(E))return E.exec(O);throw new TypeError("parser must be boolean|regexp|function")}}}has(T,E){if(T=_s(T),T){const F=yt.findKey(this,T);return!!(F&&this[F]!==void 0&&(!E||Po(this,this[F],F,E)))}return!1}delete(T,E){const F=this;let O=!1;function D(c){if(c=_s(c),c){const m=yt.findKey(F,c);m&&(!E||Po(F,F[m],m,E))&&(delete F[m],O=!0)}}return yt.isArray(T)?T.forEach(D):D(T),O}clear(T){const E=Object.keys(this);let F=E.length,O=!1;for(;F--;){const D=E[F];(!T||Po(this,this[D],D,T,!0))&&(delete this[D],O=!0)}return O}normalize(T){const E=this,F={};return yt.forEach(this,(O,D)=>{const c=yt.findKey(F,D);if(c){E[c]=mr(O),delete E[D];return}const m=T?FC(D):String(D).trim();m!==D&&delete E[D],E[m]=mr(O),F[m]=!0}),this}concat(...T){return this.constructor.concat(this,...T)}toJSON(T){const E=Object.create(null);return yt.forEach(this,(F,O)=>{F!=null&&F!==!1&&(E[O]=T&&yt.isArray(F)?F.join(", "):F)}),E}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([T,E])=>T+": "+E).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(T){return T instanceof this?T:new this(T)}static concat(T,...E){const F=new this(T);return E.forEach(O=>F.set(O)),F}static accessor(T){const F=(this[Mf]=this[Mf]={accessors:{}}).accessors,O=this.prototype;function D(c){const m=_s(c);F[m]||(LC(O,c),F[m]=!0)}return yt.isArray(T)?T.forEach(D):D(T),this}}ea.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);yt.reduceDescriptors(ea.prototype,({value:S},T)=>{let E=T[0].toUpperCase()+T.slice(1);return{get:()=>S,set(F){this[E]=F}}});yt.freezeMethods(ea);const Oi=ea;function Ao(S,T){const E=this||ph,F=T||E,O=Oi.from(F.headers);let D=F.data;return yt.forEach(S,function(m){D=m.call(E,D,O.normalize(),T?T.status:void 0)}),O.normalize(),D}function vc(S){return!!(S&&S.__CANCEL__)}function xn(S,T,E){Zt.call(this,S??"canceled",Zt.ERR_CANCELED,T,E),this.name="CanceledError"}yt.inherits(xn,Zt,{__CANCEL__:!0});function OC(S,T,E){const F=E.config.validateStatus;!E.status||!F||F(E.status)?S(E):T(new Zt("Request failed with status code "+E.status,[Zt.ERR_BAD_REQUEST,Zt.ERR_BAD_RESPONSE][Math.floor(E.status/100)-4],E.config,E.request,E))}const DC=gi.hasStandardBrowserEnv?{write(S,T,E,F,O,D){const c=[S+"="+encodeURIComponent(T)];yt.isNumber(E)&&c.push("expires="+new Date(E).toGMTString()),yt.isString(F)&&c.push("path="+F),yt.isString(O)&&c.push("domain="+O),D===!0&&c.push("secure"),document.cookie=c.join("; ")},read(S){const T=document.cookie.match(new RegExp("(^|;\\s*)("+S+")=([^;]*)"));return T?decodeURIComponent(T[3]):null},remove(S){this.write(S,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function IC(S){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(S)}function BC(S,T){return T?S.replace(/\/?\/$/,"")+"/"+T.replace(/^\/+/,""):S}function pc(S,T){return S&&!IC(T)?BC(S,T):T}const bC=gi.hasStandardBrowserEnv?function(){const T=/(msie|trident)/i.test(navigator.userAgent),E=document.createElement("a");let F;function O(D){let c=D;return T&&(E.setAttribute("href",c),c=E.href),E.setAttribute("href",c),{href:E.href,protocol:E.protocol?E.protocol.replace(/:$/,""):"",host:E.host,search:E.search?E.search.replace(/^\?/,""):"",hash:E.hash?E.hash.replace(/^#/,""):"",hostname:E.hostname,port:E.port,pathname:E.pathname.charAt(0)==="/"?E.pathname:"/"+E.pathname}}return F=O(window.location.href),function(c){const m=yt.isString(c)?O(c):c;return m.protocol===F.protocol&&m.host===F.host}}():function(){return function(){return!0}}();function NC(S){const T=/^([-+\w]{1,25})(:?\/\/|:)/.exec(S);return T&&T[1]||""}function GC(S,T){S=S||10;const E=new Array(S),F=new Array(S);let O=0,D=0,c;return T=T!==void 0?T:1e3,function(t){const o=Date.now(),v=F[D];c||(c=o),E[O]=t,F[O]=o;let a=D,r=0;for(;a!==O;)r+=E[a++],a=a%S;if(O=(O+1)%S,O===D&&(D=(D+1)%S),o-c{const D=O.loaded,c=O.lengthComputable?O.total:void 0,m=D-E,t=F(m),o=D<=c;E=D;const v={loaded:D,total:c,progress:c?D/c:void 0,bytes:m,rate:t||void 0,estimated:t&&c&&o?(c-D)/t:void 0,event:O};v[T?"download":"upload"]=!0,S(v)}}const zC=typeof XMLHttpRequest<"u",UC=zC&&function(S){return new Promise(function(E,F){let O=S.data;const D=Oi.from(S.headers).normalize();let{responseType:c,withXSRFToken:m}=S,t;function o(){S.cancelToken&&S.cancelToken.unsubscribe(t),S.signal&&S.signal.removeEventListener("abort",t)}let v;if(yt.isFormData(O)){if(gi.hasStandardBrowserEnv||gi.hasStandardBrowserWebWorkerEnv)D.setContentType(!1);else if((v=D.getContentType())!==!1){const[i,...h]=v?v.split(";").map(s=>s.trim()).filter(Boolean):[];D.setContentType([i||"multipart/form-data",...h].join("; "))}}let a=new XMLHttpRequest;if(S.auth){const i=S.auth.username||"",h=S.auth.password?unescape(encodeURIComponent(S.auth.password)):"";D.set("Authorization","Basic "+btoa(i+":"+h))}const r=pc(S.baseURL,S.url);a.open(S.method.toUpperCase(),uc(r,S.params,S.paramsSerializer),!0),a.timeout=S.timeout;function n(){if(!a)return;const i=Oi.from("getAllResponseHeaders"in a&&a.getAllResponseHeaders()),s={data:!c||c==="text"||c==="json"?a.responseText:a.response,status:a.status,statusText:a.statusText,headers:i,config:S,request:a};OC(function(f){E(f),o()},function(f){F(f),o()},s),a=null}if("onloadend"in a?a.onloadend=n:a.onreadystatechange=function(){!a||a.readyState!==4||a.status===0&&!(a.responseURL&&a.responseURL.indexOf("file:")===0)||setTimeout(n)},a.onabort=function(){a&&(F(new Zt("Request aborted",Zt.ECONNABORTED,S,a)),a=null)},a.onerror=function(){F(new Zt("Network Error",Zt.ERR_NETWORK,S,a)),a=null},a.ontimeout=function(){let h=S.timeout?"timeout of "+S.timeout+"ms exceeded":"timeout exceeded";const s=S.transitional||fc;S.timeoutErrorMessage&&(h=S.timeoutErrorMessage),F(new Zt(h,s.clarifyTimeoutError?Zt.ETIMEDOUT:Zt.ECONNABORTED,S,a)),a=null},gi.hasStandardBrowserEnv&&(m&&yt.isFunction(m)&&(m=m(S)),m||m!==!1&&bC(r))){const i=S.xsrfHeaderName&&S.xsrfCookieName&&DC.read(S.xsrfCookieName);i&&D.set(S.xsrfHeaderName,i)}O===void 0&&D.setContentType(null),"setRequestHeader"in a&&yt.forEach(D.toJSON(),function(h,s){a.setRequestHeader(s,h)}),yt.isUndefined(S.withCredentials)||(a.withCredentials=!!S.withCredentials),c&&c!=="json"&&(a.responseType=S.responseType),typeof S.onDownloadProgress=="function"&&a.addEventListener("progress",wf(S.onDownloadProgress,!0)),typeof S.onUploadProgress=="function"&&a.upload&&a.upload.addEventListener("progress",wf(S.onUploadProgress)),(S.cancelToken||S.signal)&&(t=i=>{a&&(F(!i||i.type?new xn(null,S,a):i),a.abort(),a=null)},S.cancelToken&&S.cancelToken.subscribe(t),S.signal&&(S.signal.aborted?t():S.signal.addEventListener("abort",t)));const e=NC(r);if(e&&gi.protocols.indexOf(e)===-1){F(new Zt("Unsupported protocol "+e+":",Zt.ERR_BAD_REQUEST,S));return}a.send(O||null)})},Wo={http:uC,xhr:UC};yt.forEach(Wo,(S,T)=>{if(S){try{Object.defineProperty(S,"name",{value:T})}catch{}Object.defineProperty(S,"adapterName",{value:T})}});const Rf=S=>`- ${S}`,XC=S=>yt.isFunction(S)||S===null||S===!1,gc={getAdapter:S=>{S=yt.isArray(S)?S:[S];const{length:T}=S;let E,F;const O={};for(let D=0;D`adapter ${m} `+(t===!1?"is not supported by the environment":"is not available in the build"));let c=T?D.length>1?`since : +`+D.map(Rf).join(` +`):" "+Rf(D[0]):"as no adapter specified";throw new Zt("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return F},adapters:Wo};function Mo(S){if(S.cancelToken&&S.cancelToken.throwIfRequested(),S.signal&&S.signal.aborted)throw new xn(null,S)}function Ff(S){return Mo(S),S.headers=Oi.from(S.headers),S.data=Ao.call(S,S.transformRequest),["post","put","patch"].indexOf(S.method)!==-1&&S.headers.setContentType("application/x-www-form-urlencoded",!1),gc.getAdapter(S.adapter||ph.adapter)(S).then(function(F){return Mo(S),F.data=Ao.call(S,S.transformResponse,F),F.headers=Oi.from(F.headers),F},function(F){return vc(F)||(Mo(S),F&&F.response&&(F.response.data=Ao.call(S,S.transformResponse,F.response),F.response.headers=Oi.from(F.response.headers))),Promise.reject(F)})}const Lf=S=>S instanceof Oi?S.toJSON():S;function Ds(S,T){T=T||{};const E={};function F(o,v,a){return yt.isPlainObject(o)&&yt.isPlainObject(v)?yt.merge.call({caseless:a},o,v):yt.isPlainObject(v)?yt.merge({},v):yt.isArray(v)?v.slice():v}function O(o,v,a){if(yt.isUndefined(v)){if(!yt.isUndefined(o))return F(void 0,o,a)}else return F(o,v,a)}function D(o,v){if(!yt.isUndefined(v))return F(void 0,v)}function c(o,v){if(yt.isUndefined(v)){if(!yt.isUndefined(o))return F(void 0,o)}else return F(void 0,v)}function m(o,v,a){if(a in T)return F(o,v);if(a in S)return F(void 0,o)}const t={url:D,method:D,data:D,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:m,headers:(o,v)=>O(Lf(o),Lf(v),!0)};return yt.forEach(Object.keys(Object.assign({},S,T)),function(v){const a=t[v]||O,r=a(S[v],T[v],v);yt.isUndefined(r)&&a!==m||(E[v]=r)}),E}const mc="1.6.7",gh={};["object","boolean","number","function","string","symbol"].forEach((S,T)=>{gh[S]=function(F){return typeof F===S||"a"+(T<1?"n ":" ")+S}});const Of={};gh.transitional=function(T,E,F){function O(D,c){return"[Axios v"+mc+"] Transitional option '"+D+"'"+c+(F?". "+F:"")}return(D,c,m)=>{if(T===!1)throw new Zt(O(c," has been removed"+(E?" in "+E:"")),Zt.ERR_DEPRECATED);return E&&!Of[c]&&(Of[c]=!0,console.warn(O(c," has been deprecated since v"+E+" and will be removed in the near future"))),T?T(D,c,m):!0}};function VC(S,T,E){if(typeof S!="object")throw new Zt("options must be an object",Zt.ERR_BAD_OPTION_VALUE);const F=Object.keys(S);let O=F.length;for(;O-- >0;){const D=F[O],c=T[D];if(c){const m=S[D],t=m===void 0||c(m,D,S);if(t!==!0)throw new Zt("option "+D+" must be "+t,Zt.ERR_BAD_OPTION_VALUE);continue}if(E!==!0)throw new Zt("Unknown option "+D,Zt.ERR_BAD_OPTION)}}const Yo={assertOptions:VC,validators:gh},Wi=Yo.validators;class Pr{constructor(T){this.defaults=T,this.interceptors={request:new Af,response:new Af}}async request(T,E){try{return await this._request(T,E)}catch(F){if(F instanceof Error){let O;Error.captureStackTrace?Error.captureStackTrace(O={}):O=new Error;const D=O.stack?O.stack.replace(/^.+\n/,""):"";F.stack?D&&!String(F.stack).endsWith(D.replace(/^.+\n.+\n/,""))&&(F.stack+=` +`+D):F.stack=D}throw F}}_request(T,E){typeof T=="string"?(E=E||{},E.url=T):E=T||{},E=Ds(this.defaults,E);const{transitional:F,paramsSerializer:O,headers:D}=E;F!==void 0&&Yo.assertOptions(F,{silentJSONParsing:Wi.transitional(Wi.boolean),forcedJSONParsing:Wi.transitional(Wi.boolean),clarifyTimeoutError:Wi.transitional(Wi.boolean)},!1),O!=null&&(yt.isFunction(O)?E.paramsSerializer={serialize:O}:Yo.assertOptions(O,{encode:Wi.function,serialize:Wi.function},!0)),E.method=(E.method||this.defaults.method||"get").toLowerCase();let c=D&&yt.merge(D.common,D[E.method]);D&&yt.forEach(["delete","get","head","post","put","patch","common"],e=>{delete D[e]}),E.headers=Oi.concat(c,D);const m=[];let t=!0;this.interceptors.request.forEach(function(i){typeof i.runWhen=="function"&&i.runWhen(E)===!1||(t=t&&i.synchronous,m.unshift(i.fulfilled,i.rejected))});const o=[];this.interceptors.response.forEach(function(i){o.push(i.fulfilled,i.rejected)});let v,a=0,r;if(!t){const e=[Ff.bind(this),void 0];for(e.unshift.apply(e,m),e.push.apply(e,o),r=e.length,v=Promise.resolve(E);a{if(!F._listeners)return;let D=F._listeners.length;for(;D-- >0;)F._listeners[D](O);F._listeners=null}),this.promise.then=O=>{let D;const c=new Promise(m=>{F.subscribe(m),D=m}).then(O);return c.cancel=function(){F.unsubscribe(D)},c},T(function(D,c,m){F.reason||(F.reason=new xn(D,c,m),E(F.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(T){if(this.reason){T(this.reason);return}this._listeners?this._listeners.push(T):this._listeners=[T]}unsubscribe(T){if(!this._listeners)return;const E=this._listeners.indexOf(T);E!==-1&&this._listeners.splice(E,1)}static source(){let T;return{token:new mh(function(O){T=O}),cancel:T}}}const WC=mh;function YC(S){return function(E){return S.apply(null,E)}}function HC(S){return yt.isObject(S)&&S.isAxiosError===!0}const Ho={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ho).forEach(([S,T])=>{Ho[T]=S});const KC=Ho;function xc(S){const T=new xr(S),E=qd(xr.prototype.request,T);return yt.extend(E,xr.prototype,T,{allOwnKeys:!0}),yt.extend(E,T,null,{allOwnKeys:!0}),E.create=function(O){return xc(Ds(S,O))},E}const me=xc(ph);me.Axios=xr;me.CanceledError=xn;me.CancelToken=WC;me.isCancel=vc;me.VERSION=mc;me.toFormData=ta;me.AxiosError=Zt;me.Cancel=me.CanceledError;me.all=function(T){return Promise.all(T)};me.spread=YC;me.isAxiosError=HC;me.mergeConfig=Ds;me.AxiosHeaders=Oi;me.formToJSON=S=>cc(yt.isHTMLForm(S)?new FormData(S):S);me.getAdapter=gc.getAdapter;me.HttpStatusCode=KC;me.default=me;const jC={username:"Guest",health:"100",mana:"100",energy:"100",maxHealth:"100",maxMana:"100",maxEnergy:"100",armour:"0",agility:"0",strength:"0",intelligence:"0",experience:"0",reputation:"0",faith:"0"},$C={inCombat:!1,isDead:!1,isResting:!1,activeBoosts:{}},ZC={id:"",title:"",description:"",journals:[],isComplete:!1,reward:""},JC={backpack:[],equipment:{head:null,body:null,legs:null,feet:null,hands:null,weapon:null,shield:null,accessory:null}},yc={},QC={stats:jC,inventory:JC,state:$C},kC=S=>{vn(async()=>{Ar.set({...Ar.get(),[S.id]:S})})};function yn(S,T){return h1(S,T,{encode(E){return JSON.stringify(E)},decode(E){try{return JSON.parse(E)}catch{return T}}})}const Is=yn("playerData",QC),qC=yn("quest",ZC),Ar=yn("items",yc),ss=yn("notifications",[]),Tc=yn("itemDB",yc),_C=()=>{vn(async()=>{try{const T=(await me.get("https://kbve.com/api/itemdb.json")).data,E={};Object.keys(T.key).forEach(F=>{const O=T.key[F];E[O.id]=O,E[O.name]=O}),Tc.set(E)}catch(S){console.error("Failed to reload item database:",S)}})},tE=S=>Tc.get()[S],eE=S=>{vn(async()=>{const T=Is.get();T.inventory.backpack.push(S),Is.set({...T})})},ia=S=>{const E=Ar.get()[S];if(E)return E;console.warn(`Item with ID ${S} not found.`)},iE=S=>{vn(async()=>{const T=Sc(),E={...S,id:T};kC(E),eE(E.id),Jt.emit("notification",{title:"Success",message:`You got a ${E.name}, verified by E Corp ID ${E.id}`,notificationType:hn.success})})},sE=S=>{vn(async()=>{const T=Is.get(),E=parseInt(T.stats.health,10),F=Math.max(E-S,0);T.stats={...T.stats,health:F.toString()},Is.set({...T})})},hn={caution:{type:"caution",color:"bg-yellow-200 border-yellow-300 text-yellow-700",imgUrl:"/assets/icons/notification.svg"},warning:{type:"warning",color:"bg-orange-200 border-orange-300 text-orange-700",imgUrl:"/assets/icons/notification.svg"},danger:{type:"danger",color:"bg-red-200 border-red-300 text-red-700",imgUrl:"/assets/icons/notification.svg"},success:{type:"success",color:"bg-green-200 border-green-300 text-green-700",imgUrl:"/assets/icons/notification.svg"},info:{type:"info",color:"bg-blue-200 border-blue-300 text-blue-700",imgUrl:"/assets/icons/notification.svg"}},ws="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function nE(S,T,E){for(;S.length=0;F--){const O=S%ws.length;E=ws.charAt(O)+E,S=Math.floor(S/ws.length)}return nE(E,T,ws[0])}function Sc(){const S=Date.now(),T=oE(S,10),E=aE(16);return T+E}class Cc{constructor(T,E,F){this.scene=T,this.gridEngine=E,this.quadtree=F,this.cursor=this.scene.input.keyboard?.createCursorKeys(),this.initializeWASDKeys(),this.registerEventHandlers()}initializeWASDKeys(){const T=this.scene.input.keyboard;T&&(this.wasdKeys={W:T.addKey(Phaser.Input.Keyboard.KeyCodes.W),A:T.addKey(Phaser.Input.Keyboard.KeyCodes.A),S:T.addKey(Phaser.Input.Keyboard.KeyCodes.S),D:T.addKey(Phaser.Input.Keyboard.KeyCodes.D)})}registerEventHandlers(){//! Broken +Jt.on("playerMove",this.handlePlayerMove.bind(this)),Jt.on("playerSteal",this.handlePlayerSteal.bind(this)),Jt.on("playerReward",this.handlePlayerReward.bind(this)),Jt.on("playerDamage",this.handlePlayerCombatDamage.bind(this))}handlePlayerReward(T){console.log("Rewarding the player"),T&&(Jt.emit("notification",{title:"Success",message:T.message,notificationType:hn.success}),iE(T.item))}handlePlayerCombatDamage(T){T&&(sE(parseInt(T.damage)),Jt.emit("notification",{title:"Danger",message:`You taken ${T.damage} points of damage!`,notificationType:hn.danger}))}handlePlayerSteal(T){if(T)if(Math.random()>.5){const E=tE("Salmon");E?Jt.emit("playerReward",{message:`You stole a ${E.name}!`,item:E}):console.warn("Item not found in ItemDB")}else Jt.emit("notification",{title:"Danger",message:`You failed to steal from ${T.npcName}!`,notificationType:hn.danger}),Jt.emit("playerDamage",{damage:"1"})}handlePlayerMove(T){T&&this.gridEngine.moveTo("player",{x:T.x,y:T.y})}handleMovement(){if(!this.cursor)return;const T=this.cursor,E=this.wasdKeys;if(this.scene.input.keyboard?.addKey("F").isDown){const F=this.gridEngine.getPosition("player"),O=this.quadtree.query(F);for(const D of O)D.action()}(T.left.isDown||E.A.isDown)&&(T.up.isDown||E.W.isDown)?this.gridEngine.move("player","up-left"):(T.left.isDown||E.A.isDown)&&(T.down.isDown||E.S.isDown)?this.gridEngine.move("player","down-left"):(T.right.isDown||E.D.isDown)&&(T.up.isDown||E.W.isDown)?this.gridEngine.move("player","up-right"):(T.right.isDown||E.D.isDown)&&(T.down.isDown||E.S.isDown)?this.gridEngine.move("player","down-right"):T.left.isDown||E.A.isDown?this.gridEngine.move("player","left"):T.right.isDown||E.D.isDown?this.gridEngine.move("player","right"):T.up.isDown||E.W.isDown?this.gridEngine.move("player","up"):(T.down.isDown||E.S.isDown)&&this.gridEngine.move("player","down")}}class Ec extends Phaser.GameObjects.Container{constructor(T,E,F,O){const D=E.x,c=E.y-E.height+10;super(T,D,c),this.sprite=E;const m=150,t=40+O.length*20;this.background=T.add.rectangle(0,0,m,t,0,.7),this.text=T.add.text(0,-t/2+10,F,{fontSize:"12px",color:"#ffffff"}).setOrigin(.5),this.buttons=O.map((o,v)=>{const a=T.add.text(0,-t/2+30+v*20,o.label,{fontSize:"12px",color:"#00ff00"}).setOrigin(.5);return a.setInteractive({useHandCursor:!0}),a.on("pointerdown",o.callback),a}),this.add(this.background),this.add(this.text),this.buttons.forEach(o=>this.add(o)),this.scene.add.existing(this)}updatePosition(){this.setPosition(this.sprite.x-30,this.sprite.y-this.sprite.height-this.background.height/2+100)}static attachToSprite(T,E,F,O){E.setInteractive(),E.on("pointerover",()=>{const D={npcId:E.name,npcName:F,actions:O.map(m=>m.label)};if(Jt.emit("npcInteraction",D),!E.getData("tooltipMenu")){const m=new Ec(T,E,F,O);E.setData("tooltipMenu",m)}const c=E.getData("tooltipMenu");c.setVisible(!0),c.updatePosition()}),E.on("pointerout",()=>{const D=E.getData("tooltipMenu");D&&D.setVisible(!1)})}static updateAllTooltipPositions(T){T.children.list.forEach(E=>{if(E instanceof Phaser.GameObjects.Sprite){const F=E.getData("tooltipMenu");F&&F.updatePosition()}})}}let LE=class extends Phaser.GameObjects.Sprite{};function hE(S,T,E,F){const m=S.add.graphics();m.fillStyle(16777215,1),m.fillRoundedRect(0,0,200,60,16),m.setDepth(99);const t=S.add.text(100,30,E,{fontFamily:"Arial",fontSize:16,color:"#000000"});t.setOrigin(.5),t.setWordWrapWidth(200-10*2),t.setDepth(100);const o=S.add.container(0,0,[m,t]);return o.setDepth(100),T.messageBubble=o,uE(T),S.time.addEvent({delay:F,callback:()=>{o.destroy(),T.messageBubble===o&&(T.messageBubble=void 0)},callbackScope:S}),o}function lE(S,T,E){const c=S.add.graphics();c.fillStyle(16777215,1),c.fillRoundedRect(0,0,200,60,16),c.setDepth(99);const m=S.add.text(100,30,E,{fontFamily:"Arial",fontSize:16,color:"#000000"});m.setOrigin(.5),m.setWordWrapWidth(200-10*2),m.setDepth(100);const t=S.add.container(0,0,[c,m]);return t.setDepth(100),T.textBubble=t,Ko(T),t}function Ko(S){const T=S.textBubble;T&&(T.x=S.x,T.y=S.y-S.height-T.height/2)}function uE(S){const T=S.messageBubble;T&&(T.x=S.x,T.y=S.y-S.height-T.height/2)}class fE{constructor(){this.actionHandlers={Talk:this.talkToNPC.bind(this),Trade:this.tradeWithNPC.bind(this),"Move to":this.moveToNPC.bind(this),Steal:this.stealFromNPC.bind(this),Combat:this.startCombat.bind(this),"Check Fish":this.checkFish.bind(this)}}getActionHandler(T){return this.actionHandlers[T]}talkToNPC(T){console.log(`Talking to NPC with ID: ${T.npcId}`)}tradeWithNPC(T){console.log(`Trading with NPC with ID: ${T.npcId}`)}moveToNPC(T){const F=T.data?.coords||{x:10,y:15};Jt.emit("playerMove",F)}stealFromNPC(T){console.log(`Attempting to steal from NPC with ID: ${T.npcId}`);const E={npcId:T.npcId,npcName:T.npcName,data:T.data};Jt.emit("playerSteal",E)}startCombat(T){console.log(`Starting combat with NPC with ID: ${T.npcId}`)}checkFish(T){console.log(`Checking fish for NPC with ID: ${T.npcId}`)}attachNPCEvent(T,E,F,O){T.setInteractive(),T.on("pointerover",()=>{const D={npcId:T.name||"",npcName:E,actions:F.map(c=>c.label),data:O||{}};Jt.emit("npcInteraction",D)}),T.on("pointerout",()=>{})}}const Pc=new fE;function Ac(S){return+S[S.length-1]}function Mc(S){return S.startsWith("monster_bird_")&&!S.startsWith("monster_bird_shadow")}function wc(S,T,E,F,O){const D=[];for(let c=0;c<10;c++){const m=S.add.sprite(0,0,"monster_bird");m.setCrop(T,E,F,O),m.scale=3,D.push(m)}return D}function Rc(S){return wc(S,0,0,61,47)}function Fc(S){return wc(S,22,47,16,10)}function Lc(S){S.anims.create({key:"bird",frames:S.anims.generateFrameNumbers("monster_bird",{start:0,end:2}),frameRate:10,repeat:-1,yoyo:!0})}class dE extends $r.Scene{mainMenuButtonImage;mainMenuButtonText;constructor(){super("Preloader")}preload(){this.load.image("mainBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),this.load.image("scroll","https://kbve.com/assets/img/fishchip/scroll.webp"),this.load.audio("music","https://kbve.com/assets/img/fishchip/bg.ogg"),this.load.image("creditsBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),this.load.audio("type","https://kbve.com/assets/img/fishchip/type.mp3"),this.load.spritesheet("fishing","https://kbve.com/assets/img/fishchip/animate.png",{frameWidth:800,frameHeight:600}),this.load.image("fish","https://kbve.com/assets/img/letter_logo.png"),this.load.image("background","https://kbve.com/assets/img/fishchip/scaled_fish_menu_minigame.webp"),this.load.image("tiles","https://kbve.com/assets/img/fishchip/desert_tileset_1.png"),this.load.image("cloud-city-tiles","/assets/map/cloud_tileset.png"),this.load.tilemapTiledJSON("cloud-city-map-large","/assets/map/cloud_city_large.json"),this.load.tilemapTiledJSON("cloud-city-map","https://kbve.com/assets/img/fishchip/cloud_city.json"),this.load.spritesheet("player","https://kbve.com/assets/img/fishchip/chip_charactersheet_warmer.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("knights","/assets/entity/knights.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("jacko","/assets/entity/jacko.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("monks","/assets/entity/monks.png",{frameWidth:52,frameHeight:72}),_C()}create(){this.sound.get("music")?.isPlaying||this.sound.add("music",{loop:!0,volume:.1}).play(),this.add.image(480,480,"mainBg").setScale(.1),this.mainMenuButtonImage=this.add.image(480,480,"scroll").setAlpha(.9).setScale(.7,.2).setInteractive({useHandCursor:!0}),this.mainMenuButtonText=this.add.text(480,480,"Start Game",{fontFamily:"Arial Black",fontSize:50,color:"#ffffff",stroke:"#000000",strokeThickness:6}).setOrigin(.5).setInteractive({useHandCursor:!0}),this.mainMenuButtonText.on("pointerdown",()=>{this.scene.start("SandCity")},this)}}let DE=class extends nn.GameObjects.Sprite{textBubble;tooltip};class cE extends $r.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"SandCity"});const T={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new os(T)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57}),Jt.emit("notification",{title:"Success",message:`You arrived safely to SandCity Passport: ${Sc()}`,notificationType:hn.success})}create(){const T=this.make.tilemap({key:"cloud-city-map"});T.addTilesetImage("Cloud City","tiles");for(let D=0;D({id:"monster_bird_"+c,sprite:D,startPosition:{x:7,y:7+c},speed:5,collides:!1})),...this.monsterBirdShadows.map((D,c)=>({id:"monster_bird_shadow_"+c,sprite:D,startPosition:{x:7,y:7+c},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(T,F),this.loadRanges(),this.playerController=new Cc(this,this.gridEngine,this.quadtree),hE(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!",3e3),this.gridEngine.moveRandomly("npc",1500,3),this.gridEngine.moveRandomly("fishNpc",1500,3);for(let D=0;D<10;D++)this.gridEngine.moveRandomly("monster_bird_"+D,1e3,10);this.gridEngine.positionChangeStarted().subscribe(({charId:D,exitTile:c,enterTile:m})=>{Mc(D)&&this.gridEngine.moveTo("monster_bird_shadow_"+Ac(D),{x:m.x,y:m.y})});const O=(D,c,m)=>{const t=this.gridEngine.getPosition(D.name);Pc.attachNPCEvent(D,c,m,{coords:t})};O(this.npcSprite,"FisherMan",[{label:"Talk"},{label:"Trade"},{label:"Move to"},{label:"Steal"},{label:"Combat"}]),O(this.fishNpcSprite,"Fish NPC Actions",[{label:"Check Fish"},{label:"Move to"}]),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const T=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>{const E={message:"Seems like there are no fish in the sand pits. You know null, this area could be fixed up a bit too."};Jt.emit("charEvent",E)}},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:()=>{const E={message:"Sign does not have much to say.",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/woodensign.webp"};Jt.emit("charEvent",E)}},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>{const E={message:"Sorry, we are closed!",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/animebar.webp"};Jt.emit("charEvent",E)}},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>{const E={message:"Samson the Great was an amazing sailer, died drinking dat drank.",character_name:"Samson Statue",character_image:"/assets/npc/samson.png",background_image:"/assets/background/animetombstone.webp"};Jt.emit("charEvent",E)}}];for(const E of T)this.quadtree.insert(E)}update(){this.playerController?.handleMovement()}}class BE extends nn.GameObjects.Sprite{textBubble}class vE extends $r.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"CloudCity"});const T={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new os(T)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57})}create(){const T=this.make.tilemap({key:"cloud-city-map-large"});T.addTilesetImage("cloud_tileset","cloud-city-tiles");for(let O=0;O({id:"monster_bird_"+D,sprite:O,startPosition:{x:7,y:7+D},speed:5,collides:!1})),...this.monsterBirdShadows.map((O,D)=>({id:"monster_bird_shadow_"+D,sprite:O,startPosition:{x:7,y:7+D},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(T,F),this.loadRanges(),this.playerController=new Cc(this,this.gridEngine,this.quadtree),lE(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!"),this.gridEngine.moveRandomly("npc",1500,3);for(let O=0;O<10;O++)this.gridEngine.moveRandomly("monster_bird_"+O,1e3,20);this.gridEngine.positionChangeStarted().subscribe(({charId:O,exitTile:D,enterTile:c})=>{Mc(O)&&this.gridEngine.moveTo("monster_bird_shadow_"+Ac(O),{x:c.x,y:c.y})}),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const T=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>{const E={message:"Seems like there are no fish in the sand pits. You know null, this area could be fixed up a bit too."};Jt.emit("charEvent",E)}},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:async()=>{try{const O={message:`The Database Response time: ${(await(await fetch("https://api.cryptothrone.com/api/v1/speed")).json()).message.time_ms} ms`,character_name:"Planets Be Scalin",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/woodensign.webp"};Jt.emit("charEvent",O)}catch(E){console.error("Error fetching data:",E);const F={message:"Sign does not have much to say. Failed to fetch response time.",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/woodensign.webp"};Jt.emit("charEvent",F)}}},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>{const E={message:"Sorry, we are closed!",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/animebar.webp"};Jt.emit("charEvent",E)}},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>{const E={message:"Samson the Great was an amazing sailer, died drinking dat drank.",character_name:"Samson Statue",character_image:"/assets/npc/samson.png",background_image:"/assets/background/animetombstone.webp"};Jt.emit("charEvent",E)}}];for(const E of T)this.quadtree.insert(E)}update(){this.playerController?.handleMovement(),this.npcSprite&&this.npcSprite.textBubble&&Ko(this.npcSprite),this.fishNpcSprite&&this.fishNpcSprite.textBubble&&Ko(this.fishNpcSprite)}}const pE=Sr.div` // Your style here -`;function NS(){const E=Ie.useRef(null);return Ie.useEffect(()=>{if(E.current){const S=E.current,I={...{title:"CryptoThrone",render:{antialias:!1},scale:{mode:js.Scale.RESIZE,min:{width:1024,height:768},max:{width:1600,height:1200},zoom:1},type:js.AUTO,transparent:!0,width:800,height:600,physics:{default:"arcade",arcade:{gravity:{x:0,y:0},debug:!1}},plugins:{scene:[{key:"gridEngine",plugin:uS,mapping:"gridEngine"}]},scene:[fS,IS,BS],input:{mouse:{preventDefaultWheel:!1},touch:{capture:!1}}},parent:S},B=new js.Game(I);return()=>{B.destroy(!0)}}},[]),St.jsx(bS,{children:St.jsx("div",{ref:E})})}function es(E,S={}){let A=Ie.useCallback(B=>S.keys?cS(E,S.keys,B):E.listen(B),[S.keys,E]),I=E.get.bind(E);return Ie.useSyncExternalStore(A,I,I)}const Gu=Xu({message:""}),GS=()=>{const E=es(Gu);Ie.useEffect(()=>{const A=I=>{if(I){Gu.set(I);const B=document.querySelector("#hs-stacked-overlays");B&&(B.classList.remove("hidden"),B.classList.add("open"))}};return jt.on("charEvent",A),()=>{jt.off("charEvent",A)}},[]);const S=()=>{const A=document.querySelector("#hs-stacked-overlays");A&&(A.classList.add("hidden"),A.classList.remove("open"))};return St.jsx(St.Fragment,{children:St.jsx("div",{id:"hs-stacked-overlays",className:"hs-overlay hs-overlay-backdrop-open:bg-gray-900/50 hidden size-full fixed top-0 start-0 z-[60] overflow-x-hidden overflow-y-auto pointer-events-none [--overlay-backdrop:static]","data-hs-overlay-keyboard":"false",children:St.jsx("div",{className:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto",children:St.jsxs("div",{className:"flex flex-col lg:flex-row bg-zinc-950 border border-yellow-500 shadow-sm rounded-xl pointer-events-auto bg-cover",style:{backgroundImage:`url(${E.background_image||"https://kbve.com/assets/img/curved-images/wave.jpg"})`},children:[St.jsxs("div",{className:"w-full lg:w-1/3 p-4 rounded-l-xl flex flex-col items-center justify-center",children:[St.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4",children:`${E.character_name||"NPC"}`}),St.jsx("img",{src:E.character_image||"/assets/npc/barkeep.webp",alt:"Character",className:"w-full h-auto rounded-md"})]}),St.jsxs("div",{className:"w-full lg:w-2/3 p-4 bg-cover bg-center rounded-r-xl",children:[St.jsxs("div",{className:"flex justify-between items-center pb-3 border-b",children:[St.jsx("h3",{className:"font-bold text-yellow-400",children:""}),St.jsxs("button",{type:"button",className:"flex justify-center items-center size-7 text-sm font-semibold rounded-full border border-transparent text-yellow-400 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays",onClick:S,children:[St.jsx("span",{className:"sr-only",children:"Close"}),St.jsxs("svg",{className:"flex-shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[St.jsx("path",{d:"M18 6 6 18"}),St.jsx("path",{d:"m6 6 12 12"})]})]})]}),St.jsx("div",{className:"p-4 overflow-y-auto",children:St.jsx("p",{className:"mt-1 mb-2 text-yellow-400 bg-zinc-950/80 rounded-xl p-4",children:E.message||"No Message"})}),St.jsx("div",{className:"flex justify-end items-center gap-x-2 py-3 px-4 border-t",children:St.jsxs("button",{className:"relative rounded px-5 py-2.5 overflow-hidden group bg-yellow-500 relative hover:bg-gradient-to-r hover:from-yellow-500 hover:to-yellow-400 text-white hover:ring-2 hover:ring-offset-2 hover:ring-yellow-400 transition-all ease-out duration-300 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays",onClick:S,children:[St.jsx("span",{className:"absolute right-0 w-8 h-32 -mt-12 transition-all duration-1000 transform translate-x-12 bg-white opacity-10 rotate-12 group-hover:-translate-x-40 ease"}),St.jsx("span",{className:"relative",children:"Okay."})]})})]})]})})})})},zS=(E,S)=>St.jsxs("div",{style:{top:S.y,left:S.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[St.jsx("p",{className:"text-sm",children:"Actions:"}),St.jsxs("ul",{className:"text-xs",children:[St.jsx("li",{onClick:()=>Hs(E,"consume"),className:"cursor-pointer hover:bg-gray-600",children:"Consume"}),St.jsx("li",{onClick:()=>Hs(E,"equip"),className:"cursor-pointer hover:bg-gray-600",children:"Equip"}),St.jsx("li",{onClick:()=>Hs(E,"unequip"),className:"cursor-pointer hover:bg-gray-600",children:"Unequip"}),St.jsx("li",{onClick:()=>Hs(E,"discard"),className:"cursor-pointer hover:bg-gray-600",children:"Discard"}),St.jsx("li",{onClick:()=>Hs(E,"view"),className:"cursor-pointer hover:bg-gray-600",children:"View"})]})]}),bi=(E,S,A)=>{if(!E)return null;const I=Bo(E);return I?St.jsxs("li",{className:"text-sm relative",onMouseEnter:B=>S(I.id,B),onMouseLeave:A,children:[I.name," (",I.type,") - Bonuses: ",JSON.stringify(I.bonuses)," - Durability: ",I.durability," - Weight: ",I.weight]},I.id):null},Hs=(E,S)=>{const A=Bo(E);A&&jt.emit("itemAction",{itemId:A.id,action:S})},US=()=>{const E=es(As);es(SS),es(ar);const[S,A]=Ie.useState(null),[I,B]=Ie.useState({x:0,y:0});Ie.useEffect(()=>{const m=t=>{};return jt.on("playerEvent",m),()=>{jt.off("playerEvent",m)}},[]);const b=(m,t)=>{A(m),B({x:t.clientX+10,y:t.clientY+10})},c=()=>{A(null)};return!E||!E.stats?null:St.jsxs("div",{className:"transition ease-in-out duration-500 opacity-50 hover:opacity-100 fixed top-12 left-0 transform translate-y-12 translate-x-10 w-[350px] p-4 bg-zinc-800 text-yellow-400 border border-yellow-300 rounded-lg z-20",children:[St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Stats"}),St.jsx("p",{className:"text-sm text-green-400",children:`HP: ${E.stats.health||"0"} / ${E.stats.maxHealth}`}),St.jsx("p",{className:"text-sm text-blue-400",children:`MP: ${E.stats.mana||"0"} / ${E.stats.maxMana}`}),St.jsx("p",{className:"text-sm text-yellow-400",children:`EP: ${E.stats.energy||"0"} / ${E.stats.maxEnergy}`})]}),St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"User Information"}),St.jsx("p",{className:"text-sm",children:E.stats.username||"Guest"})]}),St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"General Information"}),St.jsx("p",{className:"text-sm",children:""})]}),St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Inventory"}),St.jsx("ul",{children:E.inventory.backpack.map((m,t)=>{const a=Bo(m);return a?St.jsxs("li",{className:"text-sm relative",onMouseEnter:v=>b(a.id,v),onMouseLeave:c,children:[a.name," (",a.type,") - Durability: ",a.durability," - Weight: ",a.weight]},t):null})})]}),St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Equipment"}),St.jsxs("ul",{children:[bi(E.inventory.equipment.head,b,c),bi(E.inventory.equipment.body,b,c),bi(E.inventory.equipment.legs,b,c),bi(E.inventory.equipment.feet,b,c),bi(E.inventory.equipment.hands,b,c),bi(E.inventory.equipment.weapon,b,c),bi(E.inventory.equipment.shield,b,c),bi(E.inventory.equipment.accessory,b,c)]})]}),S&&zS(S,I)]})},zu=Xu(null),XS=()=>{const E=es(zu);es(As),Ie.useEffect(()=>{const A=I=>{I&&zu.set(I)};return jt.on("npcInteraction",A),()=>{jt.off("npcInteraction",A)}},[]);const S=A=>{if(E){const I=od.getActionHandler(A);I&&I(E)}};return St.jsx("div",{className:"transition ease-in-out duration-500 opacity-50 hover:opacity-100 fixed top-12 right-0 transform translate-y-12 -translate-x-10 w-[350px] p-4 bg-zinc-800 text-yellow-400 border border-yellow-300 rounded-lg z-50",children:St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Actions"}),E&&E.npcName?St.jsxs("div",{className:"mb-4",children:[St.jsx("h3",{className:"text-md font-semibold",children:`Actions for ${E.npcName}`}),E.actions.map((A,I)=>St.jsxs("button",{className:"relative w-full m-1 p-2 px-5 py-3 overflow-hidden font-medium text-yellow-600 bg-yellow-100 border border-yellow-100 rounded-lg shadow-inner group",onClick:()=>S(A),children:[St.jsx("span",{className:"absolute top-0 left-0 w-0 h-0 transition-all duration-200 border-t-2 border-yellow-600 group-hover:w-full ease"}),St.jsx("span",{className:"absolute bottom-0 right-0 w-0 h-0 transition-all duration-200 border-b-2 border-yellow-600 group-hover:w-full ease"}),St.jsx("span",{className:"absolute top-0 left-0 w-full h-0 transition-all duration-300 delay-200 bg-yellow-600 group-hover:h-full ease"}),St.jsx("span",{className:"absolute bottom-0 left-0 w-full h-0 transition-all duration-300 delay-200 bg-yellow-600 group-hover:h-full ease"}),St.jsx("span",{className:"absolute inset-0 w-full h-full duration-300 delay-300 bg-yellow-900 opacity-0 group-hover:opacity-100"}),St.jsx("span",{className:"relative transition-colors duration-300 delay-200 group-hover:text-white ease",children:A})]},I))]}):St.jsx("div",{children:St.jsx("p",{children:"No actions available"})})]})})},VS=()=>{const E=es(Qi);Ie.useEffect(()=>{const A=I=>{if(I){const B=Date.now()+Math.random();Qi.set([...Qi.get(),{id:B,...I}]),setTimeout(()=>{Qi.set(Qi.get().filter(b=>b.id!==B))},5e3)}};return jt.on("notification",A),()=>{jt.off("notification",A)}},[]);const S=A=>{Qi.set(Qi.get().filter(I=>I.id!==A))};return St.jsx("div",{className:"fixed inset-x-0 bottom-0 z-50 m-4 space-y-2",children:Array.isArray(E)&&E.map(A=>St.jsx("div",{className:`hs-removing:translate-x-5 hs-removing:opacity-0 transition duration-300 max-w-xs border rounded-xl shadow-lg ${A.notificationType.color}`,role:"alert",children:St.jsxs("div",{className:"flex p-4",children:[St.jsx("img",{src:A.notificationType.imgUrl,alt:A.notificationType.type,className:"flex-shrink-0 size-4"}),St.jsxs("div",{className:"ms-2",children:[St.jsx("h3",{className:"text-sm font-bold",children:A.title}),St.jsx("p",{className:"text-sm",children:A.message})]}),St.jsx("div",{className:"ms-auto",children:St.jsxs("button",{type:"button",className:"inline-flex flex-shrink-0 justify-center items-center size-5 rounded-lg text-gray-800 opacity-50 hover:opacity-100 focus:outline-none focus:opacity-100 dark:text-white",onClick:()=>S(A.id),children:[St.jsx("span",{className:"sr-only",children:"Close"}),St.jsxs("svg",{className:"flex-shrink-0 size-4 bg-zinc-900",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[St.jsx("path",{d:"M18 6 6 18"}),St.jsx("path",{d:"m6 6 12 12"})]})]})})]})},A.id))})},WS=sr.div` +`;function gE(){const S=Fe.useRef(null);return Fe.useEffect(()=>{if(S.current){const T=S.current,F={...{title:"CryptoThrone",render:{antialias:!1},scale:{mode:nn.Scale.RESIZE,min:{width:1024,height:768},max:{width:1600,height:1200},zoom:1},type:nn.AUTO,transparent:!0,width:800,height:600,physics:{default:"arcade",arcade:{gravity:{x:0,y:0},debug:!1}},plugins:{scene:[{key:"gridEngine",plugin:w2,mapping:"gridEngine"}]},scene:[dE,cE,vE],input:{mouse:{preventDefaultWheel:!1},touch:{capture:!1}}},parent:T},O=new nn.Game(F);return()=>{O.destroy(!0)}}},[]),St.jsx(pE,{children:St.jsx("div",{ref:S})})}function hs(S,T={}){let E=Fe.useCallback(O=>T.keys?F2(S,T.keys,O):S.listen(O),[T.keys,S]),F=S.get.bind(S);return Fe.useSyncExternalStore(E,F,F)}const Df=bf({message:""}),mE=()=>{const S=hs(Df);Fe.useEffect(()=>{const E=F=>{if(F){Df.set(F);const O=document.querySelector("#hs-stacked-overlays");O&&(O.classList.remove("hidden"),O.classList.add("open"))}};return Jt.on("charEvent",E),()=>{Jt.off("charEvent",E)}},[]);const T=()=>{const E=document.querySelector("#hs-stacked-overlays");E&&(E.classList.add("hidden"),E.classList.remove("open"))};return St.jsx(St.Fragment,{children:St.jsx("div",{id:"hs-stacked-overlays",className:"hs-overlay hs-overlay-backdrop-open:bg-gray-900/50 hidden size-full fixed top-0 start-0 z-[60] overflow-x-hidden overflow-y-auto pointer-events-none [--overlay-backdrop:static]","data-hs-overlay-keyboard":"false",children:St.jsx("div",{className:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto",children:St.jsxs("div",{className:"flex flex-col lg:flex-row bg-zinc-950 border border-yellow-500 shadow-sm rounded-xl pointer-events-auto bg-cover",style:{backgroundImage:`url(${S.background_image||"https://kbve.com/assets/img/curved-images/wave.jpg"})`},children:[St.jsxs("div",{className:"w-full lg:w-1/3 p-4 rounded-l-xl flex flex-col items-center justify-center",children:[St.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4",children:`${S.character_name||"NPC"}`}),St.jsx("img",{src:S.character_image||"/assets/npc/barkeep.webp",alt:"Character",className:"w-full h-auto rounded-md"})]}),St.jsxs("div",{className:"w-full lg:w-2/3 p-4 bg-cover bg-center rounded-r-xl",children:[St.jsxs("div",{className:"flex justify-between items-center pb-3 border-b",children:[St.jsx("h3",{className:"font-bold text-yellow-400",children:""}),St.jsxs("button",{type:"button",className:"flex justify-center items-center size-7 text-sm font-semibold rounded-full border border-transparent text-yellow-400 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays",onClick:T,children:[St.jsx("span",{className:"sr-only",children:"Close"}),St.jsxs("svg",{className:"flex-shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[St.jsx("path",{d:"M18 6 6 18"}),St.jsx("path",{d:"m6 6 12 12"})]})]})]}),St.jsx("div",{className:"p-4 overflow-y-auto",children:St.jsx("p",{className:"mt-1 mb-2 text-yellow-400 bg-zinc-950/80 rounded-xl p-4",children:S.message||"No Message"})}),St.jsx("div",{className:"flex justify-end items-center gap-x-2 py-3 px-4 border-t",children:St.jsxs("button",{className:"relative rounded px-5 py-2.5 overflow-hidden group bg-yellow-500 relative hover:bg-gradient-to-r hover:from-yellow-500 hover:to-yellow-400 text-white hover:ring-2 hover:ring-offset-2 hover:ring-yellow-400 transition-all ease-out duration-300 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays",onClick:T,children:[St.jsx("span",{className:"absolute right-0 w-8 h-32 -mt-12 transition-all duration-1000 transform translate-x-12 bg-white opacity-10 rotate-12 group-hover:-translate-x-40 ease"}),St.jsx("span",{className:"relative",children:"Okay."})]})})]})]})})})})},xE=(S,T)=>{const E=ia(S);return E?St.jsxs("div",{style:{top:T.y,left:T.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[St.jsx("p",{className:"text-sm font-semibold",children:E.name}),St.jsxs("p",{className:"text-xs",children:["Type: ",E.type]}),St.jsxs("p",{className:"text-xs",children:["Bonuses: ",JSON.stringify(E.bonuses)]}),St.jsxs("p",{className:"text-xs",children:["Durability: ",E.durability]}),St.jsxs("p",{className:"text-xs",children:["Weight: ",E.weight]})]}):null},yE=(S,T,E,F)=>St.jsx("ul",{className:"grid grid-cols-8 gap-2",children:Object.keys(S).map(O=>{const D=S[O];return TE(D,T,E,F)})}),TE=(S,T,E,F)=>{if(!S)return St.jsx("li",{className:"text-sm relative flex items-center justify-center border border-gray-500 bg-gray-200",style:{width:"32px",height:"32px"}},`empty-${Math.random()}`);const O=ia(S);return O?St.jsxs("li",{className:"text-sm relative",onMouseEnter:D=>T(O.id,D),onMouseLeave:E,onClick:D=>F(O.id,D),children:[O.name," (",O.type,") - Bonuses: ",JSON.stringify(O.bonuses)," - Durability: ",O.durability," - Weight: ",O.weight]},O.id):null},SE=(S,T,E,F)=>St.jsx("ul",{className:"grid grid-cols-8 gap-1",children:S.map((O,D)=>{const c=ia(O);return c?St.jsx("li",{className:"text-sm relative",onMouseEnter:m=>T(c.id,m),onMouseLeave:E,onClick:m=>F(c.id,m),children:St.jsx("img",{src:c.img,alt:c.name,style:{width:"32px",height:"32px"},className:"inline-block border border-yellow-400/50"})},D):null})}),tn=(S,T)=>{const E=ia(S);E&&Jt.emit("itemAction",{itemId:E.id,action:T})},CE=()=>{const S=hs(Is);hs(qC),hs(Ar);const[T,E]=Fe.useState(null),[F,O]=Fe.useState({x:0,y:0}),[D,c]=Fe.useState(null),[m,t]=Fe.useState({x:0,y:0});Fe.useEffect(()=>{const n=e=>{};return Jt.on("playerEvent",n),()=>{Jt.off("playerEvent",n)}},[]);const o=(n,e)=>{E(n),O({x:e.clientX+10,y:e.clientY-100})},v=()=>{E(null)},a=(n,e)=>{c(n),t({x:e.clientX,y:e.clientY-100})},r=()=>{c(null)};return!S||!S.stats?null:St.jsxs("div",{className:"transition transform ease-in-out duration-500 opacity-50 hover:opacity-100 fixed top-24 left-3 w-[350px] p-4 bg-zinc-800 text-yellow-400 border border-yellow-300 rounded-lg z-20",children:[St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Stats"}),St.jsx("p",{className:"text-sm text-green-400",children:`HP: ${S.stats.health||"0"} / ${S.stats.maxHealth}`}),St.jsx("p",{className:"text-sm text-blue-400",children:`MP: ${S.stats.mana||"0"} / ${S.stats.maxMana}`}),St.jsx("p",{className:"text-sm text-yellow-400",children:`EP: ${S.stats.energy||"0"} / ${S.stats.maxEnergy}`})]}),St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"User Information"}),St.jsx("p",{className:"text-sm",children:S.stats.username||"Guest"})]}),St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"General Information"}),St.jsx("p",{className:"text-sm",children:""})]}),St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Inventory"}),SE(S.inventory.backpack,o,v,a)]}),St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Equipment"}),yE(S.inventory.equipment,o,v,a)]}),T&&xE(T,F),D&&St.jsxs("div",{style:{top:m.y,left:m.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[St.jsx("button",{onClick:r,className:"absolute top-1 right-1 translate-x-6 bg-yellow-400 p-1 text-white hover:text-gray-400",children:"X"}),St.jsx("p",{className:"text-sm strong",children:"Actions:"}),St.jsxs("ul",{className:"text-xs",children:[St.jsx("li",{onClick:()=>tn(D,"consume"),className:"cursor-pointer hover:bg-gray-600",children:"Consume"}),St.jsx("li",{onClick:()=>tn(D,"equip"),className:"cursor-pointer hover:bg-gray-600",children:"Equip"}),St.jsx("li",{onClick:()=>tn(D,"unequip"),className:"cursor-pointer hover:bg-gray-600",children:"Unequip"}),St.jsx("li",{onClick:()=>tn(D,"discard"),className:"cursor-pointer hover:bg-gray-600",children:"Discard"}),St.jsx("li",{onClick:()=>tn(D,"view"),className:"cursor-pointer hover:bg-gray-600",children:"View"}),St.jsx("li",{onClick:r,className:"cursor-pointer hover:bg-gray-600",children:"Close"})]})]})]})},If=bf(null),EE=()=>{const S=hs(If);hs(Is),Fe.useEffect(()=>{const E=F=>{F&&If.set(F)};return Jt.on("npcInteraction",E),()=>{Jt.off("npcInteraction",E)}},[]);const T=E=>{if(S){const F=Pc.getActionHandler(E);F&&F(S)}};return St.jsx("div",{className:"transition ease-in-out duration-500 opacity-50 hover:opacity-100 fixed top-12 right-0 transform translate-y-12 -translate-x-10 w-[350px] p-4 bg-zinc-800 text-yellow-400 border border-yellow-300 rounded-lg z-50",children:St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Actions"}),S&&S.npcName?St.jsxs("div",{className:"mb-4",children:[St.jsx("h3",{className:"text-md font-semibold",children:`Actions for ${S.npcName}`}),S.actions.map((E,F)=>St.jsxs("button",{className:"relative w-full m-1 p-2 px-5 py-3 overflow-hidden font-medium text-yellow-600 bg-yellow-100 border border-yellow-100 rounded-lg shadow-inner group",onClick:()=>T(E),children:[St.jsx("span",{className:"absolute top-0 left-0 w-0 h-0 transition-all duration-200 border-t-2 border-yellow-600 group-hover:w-full ease"}),St.jsx("span",{className:"absolute bottom-0 right-0 w-0 h-0 transition-all duration-200 border-b-2 border-yellow-600 group-hover:w-full ease"}),St.jsx("span",{className:"absolute top-0 left-0 w-full h-0 transition-all duration-300 delay-200 bg-yellow-600 group-hover:h-full ease"}),St.jsx("span",{className:"absolute bottom-0 left-0 w-full h-0 transition-all duration-300 delay-200 bg-yellow-600 group-hover:h-full ease"}),St.jsx("span",{className:"absolute inset-0 w-full h-full duration-300 delay-300 bg-yellow-900 opacity-0 group-hover:opacity-100"}),St.jsx("span",{className:"relative transition-colors duration-300 delay-200 group-hover:text-white ease",children:E})]},F))]}):St.jsx("div",{children:St.jsx("p",{children:"No actions available"})})]})})},PE=()=>{const S=hs(ss);Fe.useEffect(()=>{const E=F=>{if(F){const O=Date.now()+Math.random();ss.set([...ss.get(),{id:O,...F}]),setTimeout(()=>{ss.set(ss.get().filter(D=>D.id!==O))},5e3)}};return Jt.on("notification",E),()=>{Jt.off("notification",E)}},[]);const T=E=>{ss.set(ss.get().filter(F=>F.id!==E))};return St.jsx("div",{className:"fixed inset-x-0 bottom-0 z-50 m-4 space-y-2",children:Array.isArray(S)&&S.map(E=>St.jsx("div",{className:`hs-removing:translate-x-5 hs-removing:opacity-0 transition duration-300 max-w-xs border rounded-xl shadow-lg ${E.notificationType.color}`,role:"alert",children:St.jsxs("div",{className:"flex p-4",children:[St.jsx("img",{src:E.notificationType.imgUrl,alt:E.notificationType.type,className:"flex-shrink-0 size-4"}),St.jsxs("div",{className:"ms-2",children:[St.jsx("h3",{className:"text-sm font-bold",children:E.title}),St.jsx("p",{className:"text-sm",children:E.message})]}),St.jsx("div",{className:"ms-auto",children:St.jsxs("button",{type:"button",className:"inline-flex flex-shrink-0 justify-center items-center size-5 rounded-lg text-gray-800 opacity-50 hover:opacity-100 focus:outline-none focus:opacity-100 dark:text-white",onClick:()=>T(E.id),children:[St.jsx("span",{className:"sr-only",children:"Close"}),St.jsxs("svg",{className:"flex-shrink-0 size-4 bg-zinc-900",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[St.jsx("path",{d:"M18 6 6 18"}),St.jsx("path",{d:"m6 6 12 12"})]})]})})]})},E.id))})},AE=Sr.div` // Your style here -`;function qS(){return St.jsxs(WS,{children:[St.jsx(US,{}),St.jsx("div",{className:"flex justify-center items-center h-screen",children:St.jsxs("div",{className:"border-4 border-yellow-500 rounded-xl",children:[St.jsx(NS,{}),St.jsx(VS,{})]})}),St.jsx(XS,{}),St.jsx(GS,{})]})}export{qS as default}; +`;function bE(){return St.jsxs(AE,{children:[St.jsx(CE,{}),St.jsx("div",{className:"flex justify-center items-center h-screen",children:St.jsxs("div",{className:"border-4 border-yellow-500 rounded-xl",children:[St.jsx(gE,{}),St.jsx(PE,{})]})}),St.jsx(EE,{}),St.jsx(mE,{})]})}export{bE as default}; diff --git a/docs/_astro/index.BywlD4gS.css b/docs/_astro/index.BywlD4gS.css deleted file mode 100644 index 4907e27..0000000 --- a/docs/_astro/index.BywlD4gS.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-6{inset:1.5rem}.inset-x-0{left:0;right:0}.-bottom-20{bottom:-5rem}.bottom-0{bottom:0}.bottom-full{bottom:100%}.end-full{inset-inline-end:100%}.left-0{left:0}.left-1\/2{left:50%}.right-0{right:0}.start-0{inset-inline-start:0px}.start-1\/2{inset-inline-start:50%}.top-0{top:0}.top-1\/2{top:50%}.top-12{top:3rem}.top-4{top:1rem}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[60\]{z-index:60}.row-span-1{grid-row:span 1 / span 1}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-3{margin:.75rem}.m-4{margin:1rem}.\!mx-\[10px\]{margin-left:10px!important;margin-right:10px!important}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mt-12{margin-top:-3rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-auto{margin-left:auto}.ms-2{margin-inline-start:.5rem}.ms-5{margin-inline-start:1.25rem}.ms-auto{margin-inline-start:auto}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-video{aspect-ratio:16 / 9}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-7{width:1.75rem;height:1.75rem}.size-8{width:2rem;height:2rem}.size-full{width:100%;height:100%}.h-0{height:0px}.h-10{height:2.5rem}.h-12{height:3rem}.h-20{height:5rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\[32px\]{height:32px}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[500px\]{max-height:500px}.min-h-\[6rem\]{min-height:6rem}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-24{width:6rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\[1900px\]{width:1900px}.w-\[350px\]{width:350px}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-full{width:100%}.max-w-3xl{max-width:48rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[85rem\]{max-width:85rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-10{--tw-translate-x: -2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-8{--tw-translate-x: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-10{--tw-translate-x: 2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-12{--tw-translate-x: 3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-10{--tw-translate-y: 2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-12{--tw-translate-y: 3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-8{--tw-translate-y: 2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-12{--tw-rotate: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-12{--tw-rotate: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-4{gap:1rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-3\.5{-moz-column-gap:.875rem;column-gap:.875rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-12>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[36px\]{border-radius:36px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.border{border-width:1px}.border-4{border-width:4px}.border-\[3px\]{border-width:3px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-current{border-color:currentColor}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(134 239 172 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity))}.border-neutral-100{--tw-border-opacity: 1;border-color:rgb(245 245 245 / var(--tw-border-opacity))}.border-neutral-200{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity))}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-100{--tw-border-opacity: 1;border-color:rgb(254 249 195 / var(--tw-border-opacity))}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.border-yellow-600{--tw-border-opacity: 1;border-color:rgb(202 138 4 / var(--tw-border-opacity))}.border-yellow-700{--tw-border-opacity: 1;border-color:rgb(161 98 7 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.bg-\[var\(--sl-color-black\)\]{background-color:var(--sl-color-black)}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-cyan-400\/10{background-color:#22d3ee1a}.bg-cyan-400\/60{background-color:#22d3ee99}.bg-cyan-400\/90{background-color:#22d3eee6}.bg-cyan-500{--tw-bg-opacity: 1;background-color:rgb(6 182 212 / var(--tw-bg-opacity))}.bg-cyan-600{--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.bg-cyan-700{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity))}.bg-neutral-100{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.bg-neutral-200{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity))}.bg-orange-200{--tw-bg-opacity: 1;background-color:rgb(254 215 170 / var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity))}.bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.bg-yellow-900{--tw-bg-opacity: 1;background-color:rgb(113 63 18 / var(--tw-bg-opacity))}.bg-zinc-100{--tw-bg-opacity: 1;background-color:rgb(244 244 245 / var(--tw-bg-opacity))}.bg-zinc-800{--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity))}.bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.bg-zinc-950{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity))}.bg-zinc-950\/80{background-color:#09090bcc}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-neutral-200{--tw-gradient-from: #e5e5e5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 229 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-neutral-400{--tw-gradient-from: #a3a3a3 var(--tw-gradient-from-position);--tw-gradient-to: rgb(163 163 163 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #ec4899 var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-neutral-100{--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.to-neutral-200{--tw-gradient-to: #e5e5e5 var(--tw-gradient-to-position)}.to-violet-500{--tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position)}.bg-cover{background-size:cover}.bg-center{background-position:center}.stroke-yellow-700\/50{stroke:#a1620780}.object-contain{-o-object-fit:contain;object-fit:contain}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-3{padding-bottom:.75rem}.pl-5{padding-left:1.25rem}.ps-5{padding-inline-start:1.25rem}.ps-px{padding-inline-start:1px}.text-left{text-align:left}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-cyan-600{--tw-text-opacity: 1;color:rgb(8 145 178 / var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\/10{--tw-shadow-color: rgb(0 0 0 / .1);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\,margin\]{transition-property:opacity,margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-200{transition-delay:.2s}.delay-300{transition-delay:.3s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-\[0\.1ms\]{transition-duration:.1ms}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[--adaptive\:none\]{--adaptive: none}.\[--overlay-backdrop\:static\]{--overlay-backdrop: static}.\[--strategy\:static\]{--strategy: static}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:-end-5:before{content:var(--tw-content);inset-inline-end:-1.25rem}.before\:-top-5:before{content:var(--tw-content);top:-1.25rem}.before\:start-0:before{content:var(--tw-content);inset-inline-start:0px}.before\:top-0:before{content:var(--tw-content);top:0}.before\:h-5:before{content:var(--tw-content);height:1.25rem}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:w-5:before{content:var(--tw-content);width:1.25rem}.before\:w-full:before{content:var(--tw-content);width:100%}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-0:after{content:var(--tw-content);inset:0}.after\:inset-2:after{content:var(--tw-content);inset:.5rem}.after\:inset-2\.5:after{content:var(--tw-content);inset:.625rem}.after\:transform-gpu:after{content:var(--tw-content);transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:rounded-xl:after{content:var(--tw-content);border-radius:.75rem}.after\:bg-cyan-600:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.after\:bg-gradient-to-b:after{content:var(--tw-content);background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.after\:from-neutral-100:after{content:var(--tw-content);--tw-gradient-from: #f5f5f5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 245 245 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.after\:to-neutral-50:after{content:var(--tw-content);--tw-gradient-to: #fafafa var(--tw-gradient-to-position)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:mix-blend-color:after{content:var(--tw-content);mix-blend-mode:color}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\:bg-cyan-700:hover{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-yellow-300:hover{--tw-bg-opacity: 1;background-color:rgb(253 224 71 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-r:hover{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.hover\:from-cyan-500:hover{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-yellow-500:hover{--tw-gradient-from: #eab308 var(--tw-gradient-from-position);--tw-gradient-to: rgb(234 179 8 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-cyan-400:hover{--tw-gradient-to: #22d3ee var(--tw-gradient-to-position)}.hover\:to-yellow-400:hover{--tw-gradient-to: #facc15 var(--tw-gradient-to-position)}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-yellow-500:hover{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.hover\:text-zinc-950:hover{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity))}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:ring-2:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:ring-cyan-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(34 211 238 / var(--tw-ring-opacity))}.hover\:ring-yellow-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 204 21 / var(--tw-ring-opacity))}.hover\:ring-offset-2:hover{--tw-ring-offset-width: 2px}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-yellow-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 179 8 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:h-full{height:100%}.group:hover .group-hover\:w-full{width:100%}.group\/bento:hover .group-hover\/bento\:translate-x-2{--tw-translate-x: .5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-40{--tw-translate-x: -10rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-96{--tw-translate-x: -24rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.group:hover .group-hover\:bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.peer:checked~.peer-checked\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:to-cyan-100{--tw-gradient-to: #cffafe var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.peer:checked~.peer-checked\:after\:inset-1:after{content:var(--tw-content);inset:.25rem}.peer:checked~.peer-checked\:after\:from-neutral-200:after{content:var(--tw-content);--tw-gradient-from: #e5e5e5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 229 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:after\:to-neutral-100:after{content:var(--tw-content);--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:after\:opacity-100:after{content:var(--tw-content);opacity:1}.hs-dropdown.open>.hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open .hs-dropdown-toggle .hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open>.hs-dropdown-menu>.hs-dropdown-open\:opacity-100{opacity:1}.hs-removing.hs-removing\:translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hs-removing.hs-removing\:opacity-0{opacity:0}.hs-collapse.open .hs-collapse-open\:block{display:block}.hs-collapse.open .hs-collapse-open\:hidden{display:none}.hs-collapse.open.hs-collapse-open\:block{display:block}.hs-collapse.open.hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open .hs-collapse-open\:block{display:block}.hs-collapse-toggle.open .hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open.hs-collapse-open\:block{display:block}.hs-collapse-toggle.open.hs-collapse-open\:hidden{display:none}.open.hs-overlay-open\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\:opacity-100{opacity:1}.open.hs-overlay-open\:duration-500{transition-duration:.5s}.open .hs-overlay-open\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\:opacity-100{opacity:1}.open .hs-overlay-open\:duration-500{transition-duration:.5s}.hs-overlay-backdrop.hs-overlay-backdrop-open\:bg-gray-900\/50,.hs-overlay-backdrop .hs-overlay-backdrop-open\:bg-gray-900\/50{background-color:#11182780}.selected .hs-combo-box-selected\:block,.selected.hs-combo-box-selected\:block{display:block}@media (min-width: 640px){.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:my-6{margin-top:1.5rem;margin-bottom:1.5rem}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:w-1\/2{width:50%}.md\:w-48{width:12rem}.md\:w-96{width:24rem}.md\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\:auto-rows-\[18rem\]{grid-auto-rows:18rem}.md\:auto-rows-\[20rem\]{grid-auto-rows:20rem}.md\:flex-row{flex-direction:row}.md\:flex-nowrap{flex-wrap:nowrap}.md\:items-center{align-items:center}.md\:justify-start{justify-content:flex-start}.md\:justify-end{justify-content:flex-end}.md\:justify-between{justify-content:space-between}.md\:border{border-width:1px}.md\:border-s{border-inline-start-width:1px}.md\:border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.md\:p-4{padding:1rem}.md\:p-6{padding:1.5rem}.md\:px-3{padding-left:.75rem;padding-right:.75rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-0{padding-top:0;padding-bottom:0}.md\:ps-6{padding-inline-start:1.5rem}.md\:ps-7{padding-inline-start:1.75rem}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}.md\:shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.md\:duration-\[150ms\]{transition-duration:.15s}.md\:\[--strategy\:absolute\]{--strategy: absolute}.md\:\[--strategy\:fixed\]{--strategy: fixed}.md\:\[--trigger\:hover\]{--trigger: hover}}@media (min-width: 1024px){.lg\:w-1\/3{width:33.333333%}.lg\:w-2\/3{width:66.666667%}.lg\:w-96{width:24rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:p-8{padding:2rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pt-16{padding-top:4rem}.lg\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width: 1280px){.xl\:mx-auto{margin-left:auto;margin-right:auto}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:px-0{padding-left:0;padding-right:0}}@media (prefers-color-scheme: dark){.dark\:border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\:border-white\/\[0\.1\]{border-color:#ffffff1a}.dark\:border-white\/\[0\.2\]{border-color:#fff3}.dark\:bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.dark\:bg-green-900\/20{background-color:#14532d33}.dark\:bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\:bg-orange-900\/20{background-color:#7c2d1233}.dark\:bg-red-900\/20{background-color:#7f1d1d33}.dark\:bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.dark\:bg-opacity-80{--tw-bg-opacity: .8}.dark\:from-neutral-900{--tw-gradient-from: #171717 var(--tw-gradient-from-position);--tw-gradient-to: rgb(23 23 23 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-neutral-800{--tw-gradient-to: #262626 var(--tw-gradient-to-position)}.dark\:text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\:text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\:text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.dark\:text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:hover\:bg-neutral-800:hover{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\:focus\:bg-neutral-800:focus{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}}:root{--accent: 136, 58, 234;--accent-light: 224, 204, 250;--accent-dark: 49, 10, 101;--accent-gradient: linear-gradient( 45deg, rgb(var(--accent)), rgb(var(--accent-light)) 30%, white 60% )}code{font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace}.hexgrid-background{background-image:url('data:image/svg+xml,');background-repeat:repeat;background-position:0 0;animation:scrollLeft 2s linear infinite}@keyframes scrollLeft{0%{background-position:0 0}to{background-position:-100px 0}}main[data-astro-cid-j7pv25f6]{margin:auto;padding:1rem;width:800px;max-width:calc(100% - 2rem);color:#fff;font-size:20px;line-height:1.6}.astro-a[data-astro-cid-j7pv25f6]{position:absolute;top:-32px;left:50%;transform:translate(-50%);width:220px;height:auto;z-index:-1}h1[data-astro-cid-j7pv25f6]{font-size:4rem;font-weight:700;line-height:1;text-align:center;margin-bottom:1em}.text-gradient[data-astro-cid-j7pv25f6]{background-image:var(--accent-gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-size:400%;background-position:0%}.instructions[data-astro-cid-j7pv25f6]{margin-bottom:2rem;border:1px solid rgba(var(--accent-light),25%);background:linear-gradient(rgba(var(--accent-dark),66%),rgba(var(--accent-dark),33%));padding:1.5rem;border-radius:8px}.instructions[data-astro-cid-j7pv25f6] code[data-astro-cid-j7pv25f6]{font-size:.8em;font-weight:700;background:rgba(var(--accent-light),12%);color:rgb(var(--accent-light));border-radius:4px;padding:.3em .4em}.instructions[data-astro-cid-j7pv25f6] strong[data-astro-cid-j7pv25f6]{color:rgb(var(--accent-light))}.link-card-grid[data-astro-cid-j7pv25f6]{display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:2rem;padding:0} diff --git a/docs/_astro/index.D1DtUZ7u.css b/docs/_astro/index.D1DtUZ7u.css new file mode 100644 index 0000000..a57f26e --- /dev/null +++ b/docs/_astro/index.D1DtUZ7u.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-6{inset:1.5rem}.inset-x-0{left:0;right:0}.-bottom-20{bottom:-5rem}.bottom-0{bottom:0}.bottom-full{bottom:100%}.end-full{inset-inline-end:100%}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:.75rem}.right-0{right:0}.right-1{right:.25rem}.start-0{inset-inline-start:0px}.start-1\/2{inset-inline-start:50%}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-12{top:3rem}.top-24{top:6rem}.top-4{top:1rem}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[60\]{z-index:60}.row-span-1{grid-row:span 1 / span 1}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-3{margin:.75rem}.m-4{margin:1rem}.\!mx-\[10px\]{margin-left:10px!important;margin-right:10px!important}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mt-12{margin-top:-3rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-auto{margin-left:auto}.ms-2{margin-inline-start:.5rem}.ms-5{margin-inline-start:1.25rem}.ms-auto{margin-inline-start:auto}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-video{aspect-ratio:16 / 9}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-7{width:1.75rem;height:1.75rem}.size-8{width:2rem;height:2rem}.size-full{width:100%;height:100%}.h-0{height:0px}.h-10{height:2.5rem}.h-12{height:3rem}.h-20{height:5rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\[32px\]{height:32px}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[500px\]{max-height:500px}.min-h-\[6rem\]{min-height:6rem}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-24{width:6rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\[1900px\]{width:1900px}.w-\[350px\]{width:350px}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-full{width:100%}.max-w-3xl{max-width:48rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[85rem\]{max-width:85rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-10{--tw-translate-x: -2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-8{--tw-translate-x: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-10{--tw-translate-x: 2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-12{--tw-translate-x: 3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-10{--tw-translate-y: 2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-12{--tw-translate-y: 3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-8{--tw-translate-y: 2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-12{--tw-rotate: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-12{--tw-rotate: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-3\.5{-moz-column-gap:.875rem;column-gap:.875rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-12>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[36px\]{border-radius:36px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.border{border-width:1px}.border-4{border-width:4px}.border-\[3px\]{border-width:3px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-current{border-color:currentColor}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(134 239 172 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity))}.border-neutral-100{--tw-border-opacity: 1;border-color:rgb(245 245 245 / var(--tw-border-opacity))}.border-neutral-200{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity))}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-100{--tw-border-opacity: 1;border-color:rgb(254 249 195 / var(--tw-border-opacity))}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity))}.border-yellow-400\/50{border-color:#facc1580}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.border-yellow-600{--tw-border-opacity: 1;border-color:rgb(202 138 4 / var(--tw-border-opacity))}.border-yellow-700{--tw-border-opacity: 1;border-color:rgb(161 98 7 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.bg-\[var\(--sl-color-black\)\]{background-color:var(--sl-color-black)}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-cyan-400\/10{background-color:#22d3ee1a}.bg-cyan-400\/60{background-color:#22d3ee99}.bg-cyan-400\/90{background-color:#22d3eee6}.bg-cyan-500{--tw-bg-opacity: 1;background-color:rgb(6 182 212 / var(--tw-bg-opacity))}.bg-cyan-600{--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.bg-cyan-700{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity))}.bg-neutral-100{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.bg-neutral-200{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity))}.bg-orange-200{--tw-bg-opacity: 1;background-color:rgb(254 215 170 / var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity))}.bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.bg-yellow-900{--tw-bg-opacity: 1;background-color:rgb(113 63 18 / var(--tw-bg-opacity))}.bg-zinc-100{--tw-bg-opacity: 1;background-color:rgb(244 244 245 / var(--tw-bg-opacity))}.bg-zinc-800{--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity))}.bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.bg-zinc-950{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity))}.bg-zinc-950\/80{background-color:#09090bcc}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-neutral-200{--tw-gradient-from: #e5e5e5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 229 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-neutral-400{--tw-gradient-from: #a3a3a3 var(--tw-gradient-from-position);--tw-gradient-to: rgb(163 163 163 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #ec4899 var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-neutral-100{--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.to-neutral-200{--tw-gradient-to: #e5e5e5 var(--tw-gradient-to-position)}.to-violet-500{--tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position)}.bg-cover{background-size:cover}.bg-center{background-position:center}.stroke-yellow-700\/50{stroke:#a1620780}.object-contain{-o-object-fit:contain;object-fit:contain}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-3{padding-bottom:.75rem}.pl-5{padding-left:1.25rem}.ps-5{padding-inline-start:1.25rem}.ps-px{padding-inline-start:1px}.text-left{text-align:left}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-cyan-600{--tw-text-opacity: 1;color:rgb(8 145 178 / var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\/10{--tw-shadow-color: rgb(0 0 0 / .1);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\,margin\]{transition-property:opacity,margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-200{transition-delay:.2s}.delay-300{transition-delay:.3s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-\[0\.1ms\]{transition-duration:.1ms}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[--adaptive\:none\]{--adaptive: none}.\[--overlay-backdrop\:static\]{--overlay-backdrop: static}.\[--strategy\:static\]{--strategy: static}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:-end-5:before{content:var(--tw-content);inset-inline-end:-1.25rem}.before\:-top-5:before{content:var(--tw-content);top:-1.25rem}.before\:start-0:before{content:var(--tw-content);inset-inline-start:0px}.before\:top-0:before{content:var(--tw-content);top:0}.before\:h-5:before{content:var(--tw-content);height:1.25rem}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:w-5:before{content:var(--tw-content);width:1.25rem}.before\:w-full:before{content:var(--tw-content);width:100%}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-0:after{content:var(--tw-content);inset:0}.after\:inset-2:after{content:var(--tw-content);inset:.5rem}.after\:inset-2\.5:after{content:var(--tw-content);inset:.625rem}.after\:transform-gpu:after{content:var(--tw-content);transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:rounded-xl:after{content:var(--tw-content);border-radius:.75rem}.after\:bg-cyan-600:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.after\:bg-gradient-to-b:after{content:var(--tw-content);background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.after\:from-neutral-100:after{content:var(--tw-content);--tw-gradient-from: #f5f5f5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 245 245 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.after\:to-neutral-50:after{content:var(--tw-content);--tw-gradient-to: #fafafa var(--tw-gradient-to-position)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:mix-blend-color:after{content:var(--tw-content);mix-blend-mode:color}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\:bg-cyan-700:hover{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-yellow-300:hover{--tw-bg-opacity: 1;background-color:rgb(253 224 71 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-r:hover{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.hover\:from-cyan-500:hover{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-yellow-500:hover{--tw-gradient-from: #eab308 var(--tw-gradient-from-position);--tw-gradient-to: rgb(234 179 8 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-cyan-400:hover{--tw-gradient-to: #22d3ee var(--tw-gradient-to-position)}.hover\:to-yellow-400:hover{--tw-gradient-to: #facc15 var(--tw-gradient-to-position)}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-gray-400:hover{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\:text-yellow-500:hover{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.hover\:text-zinc-950:hover{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity))}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:ring-2:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:ring-cyan-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(34 211 238 / var(--tw-ring-opacity))}.hover\:ring-yellow-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 204 21 / var(--tw-ring-opacity))}.hover\:ring-offset-2:hover{--tw-ring-offset-width: 2px}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-yellow-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 179 8 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:h-full{height:100%}.group:hover .group-hover\:w-full{width:100%}.group\/bento:hover .group-hover\/bento\:translate-x-2{--tw-translate-x: .5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-40{--tw-translate-x: -10rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-96{--tw-translate-x: -24rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.group:hover .group-hover\:bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.peer:checked~.peer-checked\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:to-cyan-100{--tw-gradient-to: #cffafe var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.peer:checked~.peer-checked\:after\:inset-1:after{content:var(--tw-content);inset:.25rem}.peer:checked~.peer-checked\:after\:from-neutral-200:after{content:var(--tw-content);--tw-gradient-from: #e5e5e5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 229 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:after\:to-neutral-100:after{content:var(--tw-content);--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:after\:opacity-100:after{content:var(--tw-content);opacity:1}.hs-dropdown.open>.hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open .hs-dropdown-toggle .hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open>.hs-dropdown-menu>.hs-dropdown-open\:opacity-100{opacity:1}.hs-removing.hs-removing\:translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hs-removing.hs-removing\:opacity-0{opacity:0}.hs-collapse.open .hs-collapse-open\:block{display:block}.hs-collapse.open .hs-collapse-open\:hidden{display:none}.hs-collapse.open.hs-collapse-open\:block{display:block}.hs-collapse.open.hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open .hs-collapse-open\:block{display:block}.hs-collapse-toggle.open .hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open.hs-collapse-open\:block{display:block}.hs-collapse-toggle.open.hs-collapse-open\:hidden{display:none}.open.hs-overlay-open\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\:opacity-100{opacity:1}.open.hs-overlay-open\:duration-500{transition-duration:.5s}.open .hs-overlay-open\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\:opacity-100{opacity:1}.open .hs-overlay-open\:duration-500{transition-duration:.5s}.hs-overlay-backdrop.hs-overlay-backdrop-open\:bg-gray-900\/50,.hs-overlay-backdrop .hs-overlay-backdrop-open\:bg-gray-900\/50{background-color:#11182780}.selected .hs-combo-box-selected\:block,.selected.hs-combo-box-selected\:block{display:block}@media (min-width: 640px){.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:my-6{margin-top:1.5rem;margin-bottom:1.5rem}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:w-1\/2{width:50%}.md\:w-48{width:12rem}.md\:w-96{width:24rem}.md\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\:auto-rows-\[18rem\]{grid-auto-rows:18rem}.md\:auto-rows-\[20rem\]{grid-auto-rows:20rem}.md\:flex-row{flex-direction:row}.md\:flex-nowrap{flex-wrap:nowrap}.md\:items-center{align-items:center}.md\:justify-start{justify-content:flex-start}.md\:justify-end{justify-content:flex-end}.md\:justify-between{justify-content:space-between}.md\:border{border-width:1px}.md\:border-s{border-inline-start-width:1px}.md\:border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.md\:p-4{padding:1rem}.md\:p-6{padding:1.5rem}.md\:px-3{padding-left:.75rem;padding-right:.75rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-0{padding-top:0;padding-bottom:0}.md\:ps-6{padding-inline-start:1.5rem}.md\:ps-7{padding-inline-start:1.75rem}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}.md\:shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.md\:duration-\[150ms\]{transition-duration:.15s}.md\:\[--strategy\:absolute\]{--strategy: absolute}.md\:\[--strategy\:fixed\]{--strategy: fixed}.md\:\[--trigger\:hover\]{--trigger: hover}}@media (min-width: 1024px){.lg\:w-1\/3{width:33.333333%}.lg\:w-2\/3{width:66.666667%}.lg\:w-96{width:24rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:p-8{padding:2rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pt-16{padding-top:4rem}.lg\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width: 1280px){.xl\:mx-auto{margin-left:auto;margin-right:auto}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:px-0{padding-left:0;padding-right:0}}@media (prefers-color-scheme: dark){.dark\:border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\:border-white\/\[0\.1\]{border-color:#ffffff1a}.dark\:border-white\/\[0\.2\]{border-color:#fff3}.dark\:bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.dark\:bg-green-900\/20{background-color:#14532d33}.dark\:bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\:bg-orange-900\/20{background-color:#7c2d1233}.dark\:bg-red-900\/20{background-color:#7f1d1d33}.dark\:bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.dark\:bg-opacity-80{--tw-bg-opacity: .8}.dark\:from-neutral-900{--tw-gradient-from: #171717 var(--tw-gradient-from-position);--tw-gradient-to: rgb(23 23 23 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-neutral-800{--tw-gradient-to: #262626 var(--tw-gradient-to-position)}.dark\:text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\:text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\:text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.dark\:text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:hover\:bg-neutral-800:hover{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\:focus\:bg-neutral-800:focus{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}}:root{--accent: 136, 58, 234;--accent-light: 224, 204, 250;--accent-dark: 49, 10, 101;--accent-gradient: linear-gradient( 45deg, rgb(var(--accent)), rgb(var(--accent-light)) 30%, white 60% )}code{font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace}.hexgrid-background{background-image:url('data:image/svg+xml,');background-repeat:repeat;background-position:0 0;animation:scrollLeft 2s linear infinite}@keyframes scrollLeft{0%{background-position:0 0}to{background-position:-100px 0}}main[data-astro-cid-j7pv25f6]{margin:auto;padding:1rem;width:800px;max-width:calc(100% - 2rem);color:#fff;font-size:20px;line-height:1.6}.astro-a[data-astro-cid-j7pv25f6]{position:absolute;top:-32px;left:50%;transform:translate(-50%);width:220px;height:auto;z-index:-1}h1[data-astro-cid-j7pv25f6]{font-size:4rem;font-weight:700;line-height:1;text-align:center;margin-bottom:1em}.text-gradient[data-astro-cid-j7pv25f6]{background-image:var(--accent-gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-size:400%;background-position:0%}.instructions[data-astro-cid-j7pv25f6]{margin-bottom:2rem;border:1px solid rgba(var(--accent-light),25%);background:linear-gradient(rgba(var(--accent-dark),66%),rgba(var(--accent-dark),33%));padding:1.5rem;border-radius:8px}.instructions[data-astro-cid-j7pv25f6] code[data-astro-cid-j7pv25f6]{font-size:.8em;font-weight:700;background:rgba(var(--accent-light),12%);color:rgb(var(--accent-light));border-radius:4px;padding:.3em .4em}.instructions[data-astro-cid-j7pv25f6] strong[data-astro-cid-j7pv25f6]{color:rgb(var(--accent-light))}.link-card-grid[data-astro-cid-j7pv25f6]{display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:2rem;padding:0} diff --git a/docs/index.html b/docs/index.html index 6d8ad81..772b2e1 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ - Welcome to CryptoThrone. + Welcome to CryptoThrone.