diff --git a/docs/_astro/App.BcqvUtZK.js b/docs/_astro/App.D01BUYML.js similarity index 82% rename from docs/_astro/App.BcqvUtZK.js rename to docs/_astro/App.D01BUYML.js index 9837e0a..f3db6a6 100644 --- a/docs/_astro/App.BcqvUtZK.js +++ b/docs/_astro/App.D01BUYML.js @@ -1,4 +1,4 @@ -import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c as Ax}from"./index.DIpCM_17.js";import{a as Fu}from"./index.CEvxOxeV.js";var Lu={exports:{}},kt={};/** +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={};/** * @license React * react-is.production.min.js * @@ -6,17 +6,17 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var io=Symbol.for("react.element"),so=Symbol.for("react.portal"),tr=Symbol.for("react.fragment"),er=Symbol.for("react.strict_mode"),ir=Symbol.for("react.profiler"),sr=Symbol.for("react.provider"),nr=Symbol.for("react.context"),Mx=Symbol.for("react.server_context"),rr=Symbol.for("react.forward_ref"),ar=Symbol.for("react.suspense"),or=Symbol.for("react.suspense_list"),hr=Symbol.for("react.memo"),lr=Symbol.for("react.lazy"),wx=Symbol.for("react.offscreen"),Ou;Ou=Symbol.for("react.module.reference");function qe(P){if(typeof P=="object"&&P!==null){var C=P.$$typeof;switch(C){case io:switch(P=P.type,P){case tr:case ir:case er:case ar:case or:return P;default:switch(P=P&&P.$$typeof,P){case Mx:case nr:case rr:case lr:case hr:case sr:return P;default:return C}}case so:return C}}}kt.ContextConsumer=nr;kt.ContextProvider=sr;kt.Element=io;kt.ForwardRef=rr;kt.Fragment=tr;kt.Lazy=lr;kt.Memo=hr;kt.Portal=so;kt.Profiler=ir;kt.StrictMode=er;kt.Suspense=ar;kt.SuspenseList=or;kt.isAsyncMode=function(){return!1};kt.isConcurrentMode=function(){return!1};kt.isContextConsumer=function(P){return qe(P)===nr};kt.isContextProvider=function(P){return qe(P)===sr};kt.isElement=function(P){return typeof P=="object"&&P!==null&&P.$$typeof===io};kt.isForwardRef=function(P){return qe(P)===rr};kt.isFragment=function(P){return qe(P)===tr};kt.isLazy=function(P){return qe(P)===lr};kt.isMemo=function(P){return qe(P)===hr};kt.isPortal=function(P){return qe(P)===so};kt.isProfiler=function(P){return qe(P)===ir};kt.isStrictMode=function(P){return qe(P)===er};kt.isSuspense=function(P){return qe(P)===ar};kt.isSuspenseList=function(P){return qe(P)===or};kt.isValidElementType=function(P){return typeof P=="string"||typeof P=="function"||P===tr||P===ir||P===er||P===ar||P===or||P===wx||typeof P=="object"&&P!==null&&(P.$$typeof===lr||P.$$typeof===hr||P.$$typeof===sr||P.$$typeof===nr||P.$$typeof===rr||P.$$typeof===Ou||P.getModuleId!==void 0)};kt.typeOf=qe;Lu.exports=kt;var Du=Lu.exports;function Rx(P){function C(J,X,Y,D,z){for(var W=0,H=0,j=0,Q=0,k,et,st=0,rt=0,ot,ft=ot=k=0,at=0,vt=0,Et=0,St=0,Ct=Y.length,ct=Ct-1,Tt,pt="",At="",Dt="",Kt="",Nt;atk)&&(St=(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)&&(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=[$],01?C-1:0),I=1;I0?" Args: "+A.join(", "):""))}var jx=function(){function P(A){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=A}var C=P.prototype;return C.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&&js(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=Xs&&(Xs=C+1),Yn.set(P,C),Jn.set(C,P)},kx="style["+xs+'][data-styled-version="5.3.6"]',qx=new RegExp("^"+xs+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),_x=function(P,C,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(xs))return v}}(A),b=B!==void 0?B.nextSibling:null;I.setAttribute(xs,"active"),I.setAttribute("data-styled-version","5.3.6");var c=ey();return c&&I.setAttribute("nonce",c),A.insertBefore(I,b),I},iy=function(){function P(A){var I=this.element=Gu(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},C.deleteRule=function(A){this.element.removeChild(this.nodes[A]),this.length--},C.getRule=function(A){return A0&&(o+=r+",")}),b+=""+a+v+'{content:"'+o+`"}/*!sc*/ -`}}}return b}(this)},P}(),ay=/(a)(d)/gi,au=function(P){return String.fromCharCode(P+(P>25?39:97))};function Ya(P){var C,A="";for(C=Math.abs(P);C>52;C=C/52|0)A=au(C%52)+A;return(au(C%52)+A).replace(ay,"$1-$2")}var vs=function(P,C){for(var A=C.length;A;)P=33*P^C.charCodeAt(--A);return P},Uu=function(P){return vs(5381,P)};function oy(P){for(var C=0;C>>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=vs(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(" ")},P}(),uy=/^\s*\/\/.*$/gm,fy=[":","[",".","#"];function dy(P){var C,A,I,B,b=P===void 0?bi:P,c=b.options,m=c===void 0?bi:c,t=b.plugins,a=t===void 0?jn:t,v=new Rx(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&&fy.indexOf(s[A.length])!==-1||s.match(B)?i:"."+C};function e(i,h,s,l){l===void 0&&(l="&");var f=i.replace(uy,""),u=h&&s?s+" "+h+" { "+f+" }":f;return C=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||js(15),vs(i,h.name)},5381).toString():"",e}var Xu=_n.createContext();Xu.Consumer;var Vu=_n.createContext(),cy=(Vu.Consumer,new zu),Ha=dy();function vy(){return ui.useContext(Xu)||cy}function py(){return ui.useContext(Vu)||Ha}var gy=function(){function P(C,A){var I=this;this.inject=function(B,b){b===void 0&&(b=Ha);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 js(12,String(I.name))},this.name=C,this.id="sc-keyframes-"+C,this.rules=A}return P.prototype.getName=function(C){return C===void 0&&(C=Ha),this.name+C.hash},P}(),my=/([A-Z])/,xy=/([A-Z])/g,yy=/^ms-/,Ty=function(P){return"-"+P.toLowerCase()};function ou(P){return my.test(P)?P.replace(xy,Ty).replace(yy,"-ms-"):P}var hu=function(P){return P==null||P===!1||P===""};function ys(P,C,A,I){if(Array.isArray(P)){for(var B,b=[],c=0,m=P.length;c1?C-1:0),I=1;I?@[\\\]^`{|}~-]+/g,Py=/(^-|-$)/g;function ba(P){return P.replace(Ey,"-").replace(Py,"")}var Ay=function(P){return Ya(Uu(P)>>>0)};function Xn(P){return typeof P=="string"&&!0}var Ka=function(P){return typeof P=="function"||typeof P=="object"&&P!==null&&!Array.isArray(P)},My=function(P){return P!=="__proto__"&&P!=="constructor"&&P!=="prototype"};function wy(P,C,A){var I=P[A];Ka(C)&&Ka(I)?Wu(I,C):P[A]=C}function Wu(P){for(var C=arguments.length,A=new Array(C>1?C-1:0),I=1;I=0||(T[y]=p[y]);return T}(C,["componentId"]),d=f&&f+"-"+(Xn(l)?l:ba(nu(l)));return Hu(l,Pi({},u,{attrs:r,componentId:d}),A)},Object.defineProperty(e,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(l){this._foldedDefaultProps=I?Wu({},P.defaultProps,l):l}}),e.toString=function(){return"."+e.styledComponentId},B&&$x(e,P,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),e}var Qn=function(P){return function C(A,I,B){if(B===void 0&&(B=bi),!Du.isValidElementType(I))return js(1,String(I));var b=function(){return A(I,B,Sy.apply(void 0,arguments))};return b.withConfig=function(c){return C(A,I,Pi({},B,{},c))},b.attrs=function(c){return C(A,I,Pi({},B,{attrs:Array.prototype.concat(B.attrs,c).filter(Boolean)}))},b}(Hu,P)};["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(P){Qn[P]=Qn(P)});var Ku={exports:{}};(function(P,C){(function(I,B){P.exports=B()})(Ax,()=>(()=>{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 Te=typeof Symbol=="function"&&Symbol.for,go=Te?Symbol.for("react.element"):60103,mo=Te?Symbol.for("react.portal"):60106,yr=Te?Symbol.for("react.fragment"):60107,Tr=Te?Symbol.for("react.strict_mode"):60108,Sr=Te?Symbol.for("react.profiler"):60114,Cr=Te?Symbol.for("react.provider"):60109,Er=Te?Symbol.for("react.context"):60110,xo=Te?Symbol.for("react.async_mode"):60111,Pr=Te?Symbol.for("react.concurrent_mode"):60111,Ar=Te?Symbol.for("react.forward_ref"):60112,Mr=Te?Symbol.for("react.suspense"):60113,qx=Te?Symbol.for("react.suspense_list"):60120,wr=Te?Symbol.for("react.memo"):60115,Rr=Te?Symbol.for("react.lazy"):60116,_x=Te?Symbol.for("react.block"):60121,ty=Te?Symbol.for("react.fundamental"):60117,ey=Te?Symbol.for("react.responder"):60118,iy=Te?Symbol.for("react.scope"):60119;function Ve(E){if(typeof E=="object"&&E!==null){var S=E.$$typeof;switch(S){case go:switch(E=E.type,E){case xo:case Pr:case yr:case Sr:case Tr:case Mr:return E;default:switch(E=E&&E.$$typeof,E){case Er:case Ar:case Rr:case wr:case Cr:return E;default:return S}}case mo:return S}}}function Ku(E){return Ve(E)===Pr}_t.AsyncMode=xo;_t.ConcurrentMode=Pr;_t.ContextConsumer=Er;_t.ContextProvider=Cr;_t.Element=go;_t.ForwardRef=Ar;_t.Fragment=yr;_t.Lazy=Rr;_t.Memo=wr;_t.Portal=mo;_t.Profiler=Sr;_t.StrictMode=Tr;_t.Suspense=Mr;_t.isAsyncMode=function(E){return Ku(E)||Ve(E)===xo};_t.isConcurrentMode=Ku;_t.isContextConsumer=function(E){return Ve(E)===Er};_t.isContextProvider=function(E){return Ve(E)===Cr};_t.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===go};_t.isForwardRef=function(E){return Ve(E)===Ar};_t.isFragment=function(E){return Ve(E)===yr};_t.isLazy=function(E){return Ve(E)===Rr};_t.isMemo=function(E){return Ve(E)===wr};_t.isPortal=function(E){return Ve(E)===mo};_t.isProfiler=function(E){return Ve(E)===Sr};_t.isStrictMode=function(E){return Ve(E)===Tr};_t.isSuspense=function(E){return Ve(E)===Mr};_t.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===yr||E===Pr||E===Sr||E===Tr||E===Mr||E===qx||typeof E=="object"&&E!==null&&(E.$$typeof===Rr||E.$$typeof===wr||E.$$typeof===Cr||E.$$typeof===Er||E.$$typeof===Ar||E.$$typeof===ty||E.$$typeof===ey||E.$$typeof===iy||E.$$typeof===_x)};_t.typeOf=Ve;Hu.exports=_t;var sy=Hu.exports,yo=sy,ny={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ry={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ay={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},$u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},To={};To[yo.ForwardRef]=ay;To[yo.Memo]=$u;function fu(E){return yo.isMemo(E)?$u:To[E.$$typeof]||ny}var oy=Object.defineProperty,hy=Object.getOwnPropertyNames,du=Object.getOwnPropertySymbols,ly=Object.getOwnPropertyDescriptor,uy=Object.getPrototypeOf,cu=Object.prototype;function ju(E,S,A){if(typeof S!="string"){if(cu){var I=uy(S);I&&I!==cu&&ju(E,I,A)}var B=hy(S);du&&(B=B.concat(du(S)));for(var b=fu(E),c=fu(S),m=0;m1?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{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -40,7 +40,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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),S=0,M=0,w=u*p,L=d*g;e.setPosition(x,T),e.setSize(p,g);for(var F=0;F{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -237,7 +237,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -245,7 +245,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S=typeof p=="string"?p:p.key;if(y.has(T)&&y.has(S)){var M=x.get(T);M||(M={}),M[S]=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,S=h(x,"meta",null),M=h(x,"frames",null);if(S&&M){var w=h(S,"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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -329,15 +329,15 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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],S=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,j=z*p+W*y+S,Q=(z+Y)*d+(W+D)*g+T,k=(z+Y)*p+(W+D)*y+S;Q>G&&HO&&jg&&(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 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)=>{/** * @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,S=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-S,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+S),this.rotation,y,y),x.translate(-T,-S),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,S=this.height/2,M=u.x-y,w=u.y-x;return this.midPoint.set(M,w),this.scrollX=M-T,this.scrollY=w-S,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 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)=>{/** * @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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -469,7 +469,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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 S=e(p,"backgroundColor",0);this.backgroundColor=f(S),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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -481,7 +481,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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),S=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 S(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 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)=>{/** * @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 Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -601,11 +601,11 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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,S=(u-y)/T;return(l+S)/(f-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});c.exports=n},73825:(c,m,t)=>{/** + */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)=>{/** * @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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -629,7 +629,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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 S=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(S,M,w,L))},quadraticBezierTo:function(d,p,g,y){var x=this.getEndPoint(),T,S;return d instanceof l?(T=d,S=p):(T=new l(g,y),S=new l(d,p)),this.add(new i(x,T,S))},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,S=this.curves[x],M=S.getLength(),w=M===0?0:1-T/M;return S.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,S=this.curves[x],M=S.getLength(),w=M===0?0:1-T/M;return S.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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -893,7 +893,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S){y===void 0&&(y=1),x===void 0&&(x=1),T===void 0&&(T=a.CANVAS),S===void 0&&(S=!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),S&&(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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1167,12 +1167,12 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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,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,S=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,S,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,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=>{/** * @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,S=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 Et=function(Zt,he,ue){return Zt.substr(0,he)+ue+Zt.substr(he+1)};for(D=et.length-1;D>=0;D--)r=Et(r,et[D],` -`);o.wrappedText=r,n=r.length,z=[],H=null}var St=0;for(D=0;DJ&&(J=Y),Y<$&&($=Y),X++,Y=0;continue}if(S=u[T],!!S){if(w=y,L=x,G!==null){var Ct=S.kerning[V];w+=Ct!==void 0?Ct:0}h>w&&(h=w),s>L&&(s=L);var ct=w+S.xAdvance,Tt=L+d;lJ&&(J=Y),Y<$&&($=Y),M>0)for(var At=0;At{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1180,11 +1180,11 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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),S=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 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{/** * @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(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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1200,7 +1200,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S=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 j=r._bounds.lines;z===1?H=(j.longest-j.lengths[0])/2:z===2&&(H=j.longest-j.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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1216,16 +1216,16 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S=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,j=i.fontData,Q=j.chars,k=j.lineHeight,et=i.fontSize/j.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 Et=h.roundPixels,St=i.displayCallback,Ct=i.callbackData,ct=0;ct{/** + */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{/** * @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 S=this.scene.sys.cache.bitmapFont.get(g);S||console.warn("Invalid BitmapText key: "+g),this.fontData=S.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=S.fromAtlas,this.setTexture(S.texture,S.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 S=v(f+u,f,T),M=this.charColors,w=f;w{/** + */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{/** * @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,S=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,j=0;j{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1241,7 +1241,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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),S=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),j=x(Y,p*D*e._alphaBR);for(N=0;N{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1249,7 +1249,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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,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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1265,7 +1265,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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 S=0;S{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1357,7 +1357,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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],S=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]=S*s+M*f+d,w[5]=S*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],S=s[1],M=s[2],w=s[3],L=s[4],F=s[5];return h[0]=T*l+S*u,h[1]=T*f+S*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 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=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1370,7 +1370,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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 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=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. @@ -1395,7 +1395,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1407,7 +1407,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S=0,M=0,w="0%",L="0%";f?(S=s.width*s.scaleX*s.originX,M=s.height*s.scaleY*s.originY,x.applyITRS(s.x-S,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-S,x.f=s.y-M,y.multiply(x,T)):(S=s.width*s.originX,M=s.height*s.originY,x.applyITRS(s.x-S,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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1515,11 +1515,11 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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,S){return y===void 0&&(y=1),x===void 0&&(x=y),T===void 0&&(T=y),S===void 0&&(S=y),this.commandBuffer.push(o.GRADIENT_FILL_STYLE,y,x,T,S,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,S=y,M=y;typeof y!="number"&&(x=i(y,"tl",20),T=i(y,"tr",20),S=i(y,"bl",20),M=i(y,"br",20));var w=x>=0,L=T>=0,F=S>=0,O=M>=0;return x=Math.abs(x),T=Math.abs(T),S=Math.abs(S),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+S,d+g),F?this.arc(u+S,d+g-S,S,s.TAU,Math.PI):this.arc(u,d+g,S,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,S=y,M=y,w=Math.min(p,g)/2;typeof y!="number"&&(x=i(y,"tl",20),T=i(y,"tr",20),S=i(y,"bl",20),M=i(y,"br",20));var L=x>=0,F=T>=0,O=S>=0,N=M>=0;return x=Math.min(Math.abs(x),w),T=Math.min(Math.abs(T),w),S=Math.min(Math.abs(S),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+S,d+g),this.moveTo(u+S,d+g),O?this.arc(u+S,d+g-S,S,s.TAU,Math.PI):this.arc(u,d+g,S,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,S={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",S))}else x=g.textures.createCanvas(u,d,p),T=x.getSourceImage().getContext("2d",S);else u instanceof HTMLCanvasElement&&(T=u.getContext("2d",S));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 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)=>{/** * @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,S=0,M=0;u.beginPath();for(var w=0;w>>16,S=(g&65280)>>>8,M=g&255,u.strokeStyle="rgba("+T+","+S+","+M+","+d+")",u.lineWidth=x,w+=3;break;case a.FILL_STYLE:y=l[w+1],p=l[w+2],T=(y&16711680)>>>16,S=(y&65280)>>>8,M=y&255,u.fillStyle="rgba("+T+","+S+","+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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1535,11 +1535,11 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S=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(Ct)*St,Et+Math.sin(Ct)*St,S),K.push(X),at+=N);at<1+pt;)O=ct*at+Ct,L=vt+Math.cos(O)*St,F=Et+Math.sin(O)*St,X.points.push(new n(L,F,S)),at+=N;O=ct+Ct,L=vt+Math.cos(O)*St,F=Et+Math.sin(O)*St,X.points.push(new n(L,F,S));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],S,y,g);break}case a.LINE_TO:{X!==null?X.points.push(new n(x[++D],x[++D],S)):(X=new e(x[++D],x[++D],S),K.push(X));break}case a.MOVE_TO:{X=new e(x[++D],x[++D],S),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],Et=x[++D],y.translate(vt,Et);break}case a.SCALE:{vt=x[++D],Et=x[++D],y.scale(vt,Et);break}case a.ROTATE:{y.rotate(x[++D]);break}}l.pipelines.postBatch(f)}};c.exports=s},26479:(c,m,t)=>{/** + */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)=>{/** * @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,S){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),S===void 0&&(S=!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(S),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 S=="number"&&(F.y=S),F):x?this.create(T,S,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,S){return this.getFirst(!0,p,g,y,x,T,S)},getFirstDead:function(p,g,y,x,T,S){return this.getFirst(!1,p,g,y,x,T,S)},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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1615,7 +1615,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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,S,M,w,L,F,O,N,G,V,K){T===void 0&&(T=0),S===void 0&&(S=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,S),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,S,M){return T===void 0&&(T=45),S===void 0&&(S=.01),M===void 0&&(M=1e3),this.fov=T,this.projectionMatrix.perspective(o(T),y/x,S,M),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(y,x,T,S){return y===void 0&&(y=this.scene.sys.renderer.getAspectRatio()),x===void 0&&(x=1),T===void 0&&(T=-1e3),S===void 0&&(S=1e3),this.fov=0,this.projectionMatrix.ortho(-y,y,-x,x,T,S),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,S,M,w,L,F,O){var N=this.scene.sys.cache.obj.get(y),G;return N&&(G=e(N,this,x,T,S,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,S,M,w,L){var F=new p(y,x,T,S,M,w,L);return this.vertices.push(F),F},addFace:function(y,x,T){var S=new r(y,x,T);return this.faces.push(S),this.dirtyCache[9]=-1,S},addVertices:function(y,x,T,S,M,w,L){var F=i(y,x,T,S,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 S=h(this,T).calc,M=this.faces,w=0;w{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1635,11 +1635,11 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S=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 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;${/** * @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 S=h.textures.getFrame(f,u);this.is3Slice=!x&&!T,S.scale9&&(this.is3Slice=S.is3Slice);for(var M=this.is3Slice?18:54,w=0;w{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1655,7 +1655,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S=v.getTintAppendFloatAlpha(n.tint,T),M=l.vertexAvailable(),w=-1;M{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1671,7 +1671,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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"),S=this.life/1e3;this.velocityX=(x-this.x)/S,this.velocityY=(T-this.y)/S}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),S=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,-S,S),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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1679,11 +1679,11 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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),S=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,j,Q){l.call(this,z,"ParticleEmitter"),this.particleClass=S,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(j),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 j=D;D=f(j,"anims",null),D&&(this.anims=this.anims.concat(D));var Q=f(j,"cycle",!1);this.randomAnim=!Q,this.animQuantity=f(j,"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,j,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,j,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,j=0;j0&&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,j=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>=j)||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];j.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&&j.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,j=[],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 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{/** * @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,S=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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1699,7 +1699,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S=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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1759,11 +1759,11 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S=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 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)=>{/** * @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),S=n(g,"alpha2",255),M=n(g,"height",128);p.createCheckerboard(y,x,T,S,M)}return a(this.scene,p,i),v(p,i),p})},30985:(c,m,t)=>{/** + */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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1787,7 +1787,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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),S=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,S,M,w,L,F,O,g,y),o.pipelines.postBatch(r)};c.exports=v},591:(c,m,t)=>{/** + */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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1803,7 +1803,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1823,11 +1823,11 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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 S=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 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{/** * @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,S,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,S,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 S=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:[S.getFullYear(),S.getMonth(),S.getDate(),S.getHours()*60*60+S.getMinutes()*60+S.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),S=1/(p-g),M=1/(y-x),w=this.projectionMatrix;w[0]=-2*T,w[5]=-2*S,w[10]=2*M,w[12]=(u+d)*T,w[13]=(g+p)*S,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],S=x.source;T.textureKey=d,T.source=S.image,T.value=x.glTexture,S.isGLTexture&&(g||(g={}),g.width=S.width,g.height=S.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()],S=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,S=p.REPEAT),d.width&&(O=null),g.update(O,L,F,w,T,S,x,y,M)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var u=this.gl,d=this.uniforms,p,g,y,x,T,S=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+S),u.bindTexture(u.TEXTURE_2D,T.webGLTexture),u.uniform1i(x.webGLUniformLocation,S),S++))},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 S=-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]*S+T[4]*M,T[13]=T[1]*S+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 S=g.getAttribLocation(p.webGLProgram,"inPosition");S!==-1&&(g.enableVertexAttribArray(S),g.vertexAttribPointer(S,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 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=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1851,7 +1851,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1871,7 +1871,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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 S=this.geom.radius*2;this.setSize(S,S),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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1935,7 +1935,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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),S=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&&(S--,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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1947,7 +1947,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S=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--,S--,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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1967,7 +1967,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S,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),S=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,S,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),S=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,S,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),S=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,S,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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1987,7 +1987,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S,M,w,L,F;if(n.showTop&&g){x=v.getTintAppendFloatAlpha(n.fillTop,y),T=l.getX(-d,-u),S=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,S,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),S=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),S=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,S,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),S=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),S=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,S,M,w,L,F,0,0,1,1,x,x,x,2)),r.pipelines.postBatch(n)}};c.exports=o},57847:(c,m,t)=>{/** + */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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2071,7 +2071,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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,S=this.geom.bottom-this.geom.top;this.setPosition(h,s),this.setSize(T,S),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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2087,7 +2087,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S=e.geom.y2-u,M=e.geom.x3-f,w=e.geom.y3-u;s.batchFillTriangle(y,x,T,S,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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2119,19 +2119,19 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S=0,M=!1;for(x=0;xl;x--){for(T=0;T{/** + */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{/** * @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,S=0;SF){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(S+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,S=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+=` +`)),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,O0&&(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=S[V].trim(),Y=X.split(" ");$+=(S[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;S[V]=Y.join(" ")}}if(this.autoRound&&(N=Math.round(N),G=Math.round(G)),g.strokeThickness&&(g.syncShadow(p,g.shadowStroke),p.strokeText(S[V],N,G)),g.color){g.syncShadow(p,g.shadowFill);var W=this.letterSpacing;if(W!==0)for(var H=0,j=S[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,T){return this.style.setShadow(d,p,g,y,x,T)},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,T=i(x,"x",null);T!==null?(d=T,g=T):(d=i(x,"left",0),g=i(x,"right",d));var C=i(x,"y",null);C!==null?(p=C,y=C):(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",a(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 T=this._text;(g.wordWrapWidth||g.wordWrapCallback)&&(T=this.runWordWrap(this._text));var C=T.split(this.splitRegExp),M=e(this,x,C),w=this.padding,L;g.fixedWidth===0?(this.width=M.width+w.left+w.right,L=M.width):(this.width=g.fixedWidth,L=this.width-w.left-w.right,L0&&(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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2159,7 +2159,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S){var M=d.sys.renderer;r.call(this,d,"TileSprite");var w=d.sys.textures.get(T),L=w.get(S);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(S),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 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=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2183,7 +2183,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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,S=!x||T.source!==p;S?(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;S&&(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,S=this.snapshotTexture;return S?(S.setSize(y,x),T&&S.context.drawImage(T,u,d,p,g,0,0,y,x)):(S=this.scene.sys.textures.createCanvas(s(),y,x),this.snapshotTexture=S,T&&S.context.drawImage(T,u,d,p,g,0,0,y,x)),S.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 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=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2372,7 +2372,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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),S=(u*u-s*s-l*l+i*i-f*f+h*h)/(2*(h-f));d=T*T+1,p=2*h*T-2*S*T-2*i,g=i*i+h*h+S*S-s*s-2*h*S,y=p*p-4*d*g,y===0?(x=-p/(2*d),e.push(new a(x,S-x*T))):y>0&&(x=(-p+Math.sqrt(y))/(2*d),e.push(new a(x,S-x*T)),x=(-p-Math.sqrt(y))/(2*d),e.push(new a(x,S-x*T)))}}return e};c.exports=o},97439:(c,m,t)=>{/** + */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)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. @@ -2382,11 +2382,11 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S=2*(p*y+g*x),M=y*y+x*x-d*d,w=S*S-4*T*M,L,F;if(w===0){var O=-S/(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=(-S-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=(-S+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 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)=>{/** * @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,S=g*T-y*x;if(S===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)/S,w=((h-u)*g-(i-f)*y)/S,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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2513,7 +2513,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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 S=l[0],M=[S];for(y=1;y=h&&(M.push(w),S=w)}var L=l[l.length-1];return a(S,L){/** + */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){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2611,24 +2611,24 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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),S=y+x+T;return this._inCenter.set((l*y+u*x+p*T)/S,(f*y+d*x+g*T)/S)},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,S=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*S+s.vy*w+F,p=l.vx*T+l.vy*M+L,g=l.vx*S+l.vy*w+F,y=f.vx*T+f.vy*M+L,x=f.vx*S+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,j=(D*Y-X*z)*H,Q=(J*z-X*Y)*H;return j>=0&&Q>=0&&j+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,S=this.vertex3;if(x.ta<=0&&T.ta<=0&&S.ta<=0||i&&!this.isCounterClockwise(h))return!1;var M=this.bounds;M.x=Math.min(x.tx,T.tx,S.tx),M.y=Math.min(x.ty,T.ty,S.ty),M.width=Math.max(x.tx,T.tx,S.tx)-M.x,M.height=Math.max(x.ty,T.ty,S.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 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)=>{/** * @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),S=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,S,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),j=W+1,Q=H+1,k=p/W,et=g/H,st=[],rt=[],ot,ft,at=0,vt=1,Et=0,St=1;Y&&(at=Y.u0,vt=Y.u1,$?(Et=Y.v1,St=Y.v0):(Et=Y.v0,St=Y.v1));var Ct=vt-at,ct=St-Et;for(ft=0;ft{/** + */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{/** * @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 S={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 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{/** * @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,S,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 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{/** * @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,S=y>=4?parseFloat(p[3]):0;r(g).vertices.push({x,y:T,z:S})}function h(p,g){var y=p.length,x=y>=2?parseFloat(p[1]):0,T=y>=3?parseFloat(p[2]):0,S=y>=4?parseFloat(p[3]):0;isNaN(x)&&(x=0),isNaN(T)&&(T=0),isNaN(S)&&(S=0),m&&(T=1-T),r(g).textureCoords.push({u:x,v:T,w:S})}function s(p,g){var y=p.length,x=y>=2?parseFloat(p[1]):0,T=y>=3?parseFloat(p[2]):0,S=y>=4?parseFloat(p[3]):0;r(g).vertexNormals.push({x,y:T,z:S})}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",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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2729,7 +2729,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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),j=[];if(!H||H.next===H.prev)return j;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,j,D,Q,k,ft,0),j}function t(X,Y,D,z,W){var H,j;if(W===J(X,Y,D,z)>0)for(H=Y;H=Y;H-=z)j=V(H,X[H],X[H+1],j);return j&&S(j,j.next)&&(K(j),j=j.next),j}function a(X,Y){if(!X)return X;Y||(Y=X);var D=X,z;do if(z=!1,!D.steiner&&(S(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,j){if(X){!j&&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){j?j===1?(X=n(a(X),Y,D),v(X,Y,D,z,W,H,2)):j===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,j=z.x,Q=Y.y,k=D.y,et=z.y,st=WH?W>j?W:j:H>j?H:j,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,j,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,j=X.next;if(T(W,H,j)>=0)return!1;for(var Q=W.x,k=H.x,et=j.x,st=W.y,rt=H.y,ot=j.y,ft=Qk?Q>et?Q:et:k>et?k:et,Et=st>rt?st>ot?st:ot:rt>ot?rt:ot,St=p(ft,at,Y,D,z),Ct=p(vt,Et,Y,D,z),ct=X.prevZ,Tt=X.nextZ;ct&&ct.z>=St&&Tt&&Tt.z<=Ct;){if(ct.x>=ft&&ct.x<=vt&&ct.y>=at&&ct.y<=Et&&ct!==W&&ct!==j&&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<=Et&&Tt!==W&&Tt!==j&&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>=St;){if(ct.x>=ft&&ct.x<=vt&&ct.y>=at&&ct.y<=Et&&ct!==W&&ct!==j&&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<=Ct;){if(Tt.x>=ft&&Tt.x<=vt&&Tt.y>=at&&Tt.y<=Et&&Tt!==W&&Tt!==j&&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;!S(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 j=X;do{for(var Q=j.next.next;Q!==j.prev;){if(j.i!==Q.i&&x(j,Q)){var k=G(j,Q);j=a(j,j.next),k=a(k,k.next),v(j,Y,D,z,W,H,0),v(k,Y,D,z,W,H,0);return}Q=Q.next}j=j.next}while(j!==X)}function i(X,Y,D,z){var W=[],H,j,Q,k,et;for(H=0,j=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,j=D.x=D.x&&D.x>=et&&z!==D.x&&y(Wj.x||D.x===j.x&&f(j,D)))&&(j=D,rt=ot)),D=D.next;while(D!==k);return j}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,j,Q,k,et=1;do{for(D=X,X=null,H=null,j=0;D;){for(j++,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(j>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-j)*(H-Q)&&(X-j)*(z-Q)>=(D-j)*(Y-Q)&&(D-j)*(H-Q)>=(W-j)*(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))||S(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 S(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)),j=L(T(D,z,X)),Q=L(T(D,z,Y));return!!(W!==H&&j!==Q||W===0&&w(X,D,Y)||H===0&&w(X,z,Y)||j===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,j=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,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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2741,7 +2741,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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 S=x.getPoint((u-d)/T);h.push(S);break}return h};c.exports=r},30052:(c,m,t)=>{/** + */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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2938,7 +2938,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S=0;S{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2958,7 +2958,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S;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,S=(Math.max(e,h,l)-w)*.5,r.x=M+T,r.y=w+S,r.radius=Math.sqrt(T*T+S*S)}else r.x=(p*g-u*y)/x,r.y=(f*y-d*g)/x,T=r.x-n,S=r.y-e,r.radius=Math.sqrt(T*T+S*S);return r};c.exports=v},74422:(c,m,t)=>{/** + */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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2970,7 +2970,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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,S=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,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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3042,11 +3042,11 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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 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{/** * @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),S=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(S.BOOT,this.boot,this),O.sys.events.on(S.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(S.DESTROY,this.destroy,this),this.pluginEvents.emit(l.BOOT)},start:function(){var F=this.systems.events;F.on(S.TRANSITION_START,this.transitionIn,this),F.on(S.TRANSITION_OUT,this.transitionOut,this),F.on(S.TRANSITION_COMPLETE,this.transitionComplete,this),F.on(S.PRE_UPDATE,this.preUpdate,this),F.once(S.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),j=z*Math.cos(W)-D*Math.sin(W);H*=1/V.parentContainer.scaleX,j*=1/V.parentContainer.scaleY,X=H+K.dragStartX,Y=j+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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3322,7 +3322,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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=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 S=0;S-1?T[S]=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,S;if(g instanceof h){var M=T.indexOf(g);M>-1&&(S=this.keys[M],this.keys[M]=void 0)}else typeof g=="string"&&(g=s[g.toUpperCase()]);return T[g]&&(S=T[g],T[g]=void 0),S&&(S.plugin=null,x&&this.removeCapture(S.keyCode),y&&S.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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3434,7 +3434,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3522,7 +3522,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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 S=a.create(l,f,d,p,g);S&&(T=new e(l,f,u,y),i.call(this,l,"audiosprite",f,[S,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 S=0;S{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3530,7 +3530,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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 S=u;u=o(S,"key"),x=new r(f,{key:u,url:o(S,"textureURL"),extension:o(S,"textureExtension","png"),normalMap:o(S,"normalMap"),xhrSettings:o(S,"textureXhrSettings")}),T=new h(f,{key:u,url:o(S,"fontDataURL"),extension:o(S,"fontDataExtension","xml"),xhrSettings:o(S,"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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3538,12 +3538,12 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,c * @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,S,M){if(S.multiAtlasURL){var w=new h(x,{key:T,url:S.multiAtlasURL,xhrSettings:M,config:S});u.call(this,x,"texture",T,[w])}else{var L=S.textureURL.substr(S.textureURL.length-3);S.type||(S.type=L.toLowerCase()==="ktx"?"KTX":"PVR");var F=new v(x,{key:T,url:S.textureURL,extension:L,xhrSettings:M,config:S});if(S.atlasURL){var O=new h(x,{key:T,url:S.atlasURL,xhrSettings:M,config:S});u.call(this,x,"texture",T,[F,O])}else u.call(this,x,"texture",T,[F])}this.config=S},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,S=this.config,M=this.loader,w=M.baseURL,L=M.path,F=M.prefix,O=n(S,"multiBaseURL",this.baseURL),N=n(S,"multiPath",this.path),G=n(S,"prefix",this.prefix),V=n(S,"textureXhrSettings");O&&M.setBaseURL(O),N&&M.setPath(N),G&&M.setPrefix(G);for(var K=0;K{/** + */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{/** * @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. @@ -3561,7 +3561,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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 S=new s(l,this.key,y,d,p);S.type="normalMap",this.setLink(S),l.addFile(S)}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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3569,7 +3569,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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),S=o(u,"prefix",this.prefix),M=o(u,"textureXhrSettings");d.setBaseURL(x),d.setPath(T),d.setPrefix(S);for(var w=0;w{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3577,7 +3577,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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,S=f.cacheManager.obj;if(r(u)){var M=u;u=o(M,"key"),x=new h(f,{key:u,type:"obj",cache:S,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:S,url:p,extension:o(M,"matExtension","mat"),xhrSettings:o(M,"xhrSettings")}))}else x=new h(f,{key:u,url:d,type:"obj",cache:S,extension:"obj",xhrSettings:y,config:{flipUV:g}}),p&&(T=new h(f,{key:u,url:p,type:"mat",cache:S,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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3589,7 +3589,7 @@ import{j as Vt}from"./jsx-runtime.BFYNFNPI.js";import{g as Ru,r as _n,a as ui,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(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 S=g.getAttribute("viewBox").split(/\s+|,/);x=S[2],T=S[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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3679,7 +3679,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(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],S=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 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){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3719,11 +3719,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(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],S=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+S*h+M*f,r[4]=T*e+S*s+M*u,r[5]=T*i+S*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,S=i*l,M=this.val;return M[0]=1-(p+y),M[3]=u+S,M[6]=d-T,M[1]=u-S,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],S=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*S-g*T,$=p*M-y*T,J=p*w-x*T,X=g*M-y*S,Y=g*w-x*S,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]=(S*V-M*G+w*N)*z,n[7]=(M*O-T*V-w*F)*z,n[8]=(T*G-S*O+w*L)*z,this):null}});c.exports=v},37867:(c,m,t)=>{/** + */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)=>{/** * @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,S,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]=S,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],S=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=S*O-M*F,z=S*N-w*F,W=S*G-L*F,H=M*N-w*O,j=M*G-L*O,Q=w*G-L*N,k=V*Q-K*j+$*H+J*W-X*z+Y*D;return k?(k=1/k,this.setValues((y*Q-x*j+T*H)*k,(d*j-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,(S*Y-w*$+L*K)*k,(g*j-y*W+T*D)*k,(u*W-f*j-p*D)*k,(F*X-O*$+G*V)*k,(M*$-S*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,(S*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],S=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)-S*(x*G-T*N)+F*(x*L-T*w)),f*(w*G-L*N)-S*(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)+S*(d*T-p*x),g*(M*G-L*O)-S*(y*G-T*O)+F*(y*L-T*M),-(f*(M*G-L*O)-S*(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)+S*(u*T-p*y)),-(g*(M*N-w*O)-S*(y*N-x*O)+F*(y*w-x*M)),f*(M*N-w*O)-S*(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)+S*(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],S=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=S*O-M*F,z=S*N-w*F,W=S*G-L*F,H=M*N-w*O,j=M*G-L*O,Q=w*G-L*N;return V*Q-K*j+$*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],S=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*S+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*S+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*S+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*S+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],S=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],j=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+S*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+S*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+S*H+M*et+w*ft,L*Y+F*H+O*et+N*ft,G*Y+V*H+K*et+$*ft,p*D+g*j+y*st+x*at,T*D+S*j+M*st+w*at,L*D+F*j+O*st+N*at,G*D+V*j+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,S=p*y;return this.setValues(T*g+u,T*y-d*x,T*x+d*y,0,T*y+d*x,S*y+u,S*x-d*g,0,T*x-d*y,S*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 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){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3743,7 +3743,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(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,S=d.y,M=d.z,w=d.w;return this.set(p*w+x*T+g*M-y*S,g*w+x*S+y*T-p*M,y*w+x*M+p*S-g*T,x*w-p*T-g*S-y*M)},slerp:function(d,p){var g=this.x,y=this.y,x=this.z,T=this.w,S=d.x,M=d.y,w=d.z,L=d.w,F=g*S+y*M+x*w+T*L;F<0&&(F=-F,S=-S,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*S,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),S=Math.cos(d);return this.set(p*S+x*T,g*S+y*T,y*S-g*T,x*S-p*T)},rotateY:function(d){d*=.5;var p=this.x,g=this.y,y=this.z,x=this.w,T=Math.sin(d),S=Math.cos(d);return this.set(p*S-y*T,g*S+x*T,y*S+p*T,x*S-g*T)},rotateZ:function(d){d*=.5;var p=this.x,g=this.y,y=this.z,x=this.w,T=Math.sin(d),S=Math.cos(d);return this.set(p*S+g*T,g*S-p*T,y*S+x*T,x*S-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),S=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*S*M+T*L*F,T*L*M-w*S*F,T*S*F+w*L*M,T*S*M-w*L*F,p);break}case"YXZ":{this.set(w*S*M+T*L*F,T*L*M-w*S*F,T*S*F-w*L*M,T*S*M+w*L*F,p);break}case"ZXY":{this.set(w*S*M-T*L*F,T*L*M+w*S*F,T*S*F+w*L*M,T*S*M-w*L*F,p);break}case"ZYX":{this.set(w*S*M-T*L*F,T*L*M+w*S*F,T*S*F-w*L*M,T*S*M+w*L*F,p);break}case"YZX":{this.set(w*S*M+T*L*F,T*L*M+w*S*F,T*S*F-w*L*M,T*S*M-w*L*F,p);break}case"XZY":{this.set(w*S*M-T*L*F,T*L*M-w*S*F,T*S*F+w*L*M,T*S*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],S=p[5],M=p[9],w=p[2],L=p[6],F=p[10],O=g+S+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>S&&g>F?(N=2*Math.sqrt(1+g-S-F),this.set(.25*N,(y+T)/N,(x+w)/N,(L-M)/N)):S>F?(N=2*Math.sqrt(1+S-g-F),this.set((y+T)/N,.25*N,(M+L)/N,(x-w)/N)):(N=2*Math.sqrt(1+F-g-S),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],S=e[T];y=Math.sqrt(p[x*3+x]-p[T*3+T]-p[S*3+S]+1),i[x]=.5*y,y=.5/y,i[T]=(p[T*3+x]+p[x*3+T])*y,i[S]=(p[S*3+x]+p[x*3+S])*y,this._x=i[0],this._y=i[1],this._z=i[2],this._w=(p[S*3+T]-p[T*3+S])*y}return this.onChangeCallback(this),this}});c.exports=u},43396:(c,m,t)=>{/** + */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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3815,7 +3815,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(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],S=i[11],M=i[12],w=i[13],L=i[14],F=i[15],O=1/(r*f+n*g+e*S+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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4213,7 +4213,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(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,S){return x===void 0&&(x=null),T===void 0&&(T=null),S===void 0&&(S=x),this.world.collideObjects(g,y,x,T,S,!0)},collide:function(g,y,x,T,S){return x===void 0&&(x=null),T===void 0&&(T=null),S===void 0&&(S=x),this.world.collideObjects(g,y,x,T,S,!1)},collideTiles:function(g,y,x,T,S){return this.world.collideTiles(g,y,x,T,S)},overlapTiles:function(g,y,x,T,S){return this.world.overlapTiles(g,y,x,T,S)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(g,y,x,T,S,M){T===void 0&&(T=60);var w=Math.atan2(x-g.y,y-g.x);return g.body.acceleration.setToPolar(w,T),S!==void 0&&M!==void 0&&g.body.maxVelocity.set(S,M),w},accelerateToObject:function(g,y,x,T,S){return this.accelerateTo(g,y.x,y.y,x,T,S)},closest:function(g,y){y||(y=this.world.bodies.entries);for(var x=Number.MAX_VALUE,T=null,S=g.x,M=g.y,w=y.length,L=0;Lx&&(T=F,x=N)}}return T},moveTo:function(g,y,x,T,S){T===void 0&&(T=60),S===void 0&&(S=0);var M=Math.atan2(x-g.y,y-g.x);return S>0&&(T=o(g.x,g.y,y,x)/(S/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,S,M){return s(this.world,g,y,x,T,S,M)},overlapCirc:function(g,y,x,T,S){return h(this.world,g,y,x,T,S)},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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4249,11 +4249,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,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?S(0):l&&d?S(1):h&&d?S(2):f&&p?S(3):!1},S=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:S,RunImmovableBody1:M,RunImmovableBody2:w}},47962:c=>{/** + */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=>{/** * @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?S(0):l&&d?S(1):h&&d?S(2):f&&p?S(3):!1},S=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:S,RunImmovableBody1:M,RunImmovableBody2:w}},14087:(c,m,t)=>{/** + */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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4277,7 +4277,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(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),S=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 S,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=j;for(this.fixedStep||(H=z*.001,et=!0,this._elapsed=0),W=0;W=j;)this._elapsed-=j,this.step(H)}},step:function(D){var z,W,H=this.bodies.entries,j=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,j){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,j);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;j?(ot=O(D,z,j,at,Q),ft=N(D,z,j,at,k)):this.forceX||Math.abs(this.gravity.y+D.gravity.y)Tt&&(ft=i(vt,Et,Tt,ct)-St):Et>pt&&(vtTt&&(ft=i(vt,Et,Tt,pt)-St)),ft*=-1}else ft=D.halfWidth+z.halfWidth-h(Q,k);D.overlapR=ft,z.overlapR=ft;var At=a(Q,k),Dt=(ft+T.EPSILON)*Math.cos(At),Kt=(ft+T.EPSILON)*Math.sin(At),Nt={overlap:ft,result:!1,x:Dt,y:Kt};if(W&&(!at||at&&ft!==0))return Nt.result=!0,Nt;if(!at&&ft===0||et&&st||D.customSeparateX||z.customSeparateX)return Nt.x=void 0,Nt.y=void 0,Nt;var Wt=!D.pushable&&!z.pushable;if(at){var It=Q.x-k.x,ee=Q.y-k.y,Zt=Math.sqrt(Math.pow(It,2)+Math.pow(ee,2)),he=(k.x-Q.x)/Zt||0,ue=(k.y-Q.y)/Zt||0,Te=2*(rt.x*he+rt.y*ue-ot.x*he-ot.y*ue)/(D.mass+z.mass);(et||st)&&(Te*=2),et||(rt.x=rt.x-Te/D.mass*he,rt.y=rt.y-Te/D.mass*ue,rt.multiply(D.bounce)),st||(ot.x=ot.x+Te/z.mass*he,ot.y=ot.y+Te/z.mass*ue,ot.multiply(z.bounce)),!et&&!st&&(Dt*=.5,Kt*=.5),et||(D.x-=Dt,D.y-=Kt,D.updateCenter()),st||(z.x+=Dt,z.y+=Kt,z.updateCenter()),Nt.result=!0}else!et||D.pushable||Wt?(D.x-=Dt,D.y-=Kt,D.updateCenter()):(!st||z.pushable||Wt)&&(z.x+=Dt,z.y+=Kt,z.updateCenter()),Nt.x=void 0,Nt.y=void 0;return Nt},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),j=(D.center.x-W)*(D.center.x-W),Q=(D.center.y-H)*(D.center.y-H);return j+Q<=D.halfWidth*D.halfWidth},overlap:function(D,z,W,H,j){return W===void 0&&(W=null),H===void 0&&(H=null),j===void 0&&(j=W),this.collideObjects(D,z,W,H,j,!0)},collide:function(D,z,W,H,j){return W===void 0&&(W=null),H===void 0&&(H=null),j===void 0&&(j=W),this.collideObjects(D,z,W,H,j,!1)},collideObjects:function(D,z,W,H,j,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,j,Q);else if(!st&&rt)for(k=0;k0},collideHandler:function(D,z,W,H,j,Q){if(z===void 0&&D.isParent)return this.collideGroupVsGroup(D,D,W,H,j,Q);if(!D||!z)return!1;if(D.body||D.isBody){if(z.body||z.isBody)return this.collideSpriteVsSprite(D,z,W,H,j,Q);if(z.isParent)return this.collideSpriteVsGroup(D,z,W,H,j,Q);if(z.isTilemap)return this.collideSpriteVsTilemapLayer(D,z,W,H,j,Q)}else if(D.isParent){if(z.body||z.isBody)return this.collideSpriteVsGroup(z,D,W,H,j,Q);if(z.isParent)return this.collideGroupVsGroup(D,z,W,H,j,Q);if(z.isTilemap)return this.collideGroupVsTilemapLayer(D,z,W,H,j,Q)}else if(D.isTilemap){if(z.body||z.isBody)return this.collideSpriteVsTilemapLayer(z,D,W,H,j,Q);if(z.isParent)return this.collideGroupVsTilemapLayer(z,D,W,H,j,Q)}},canCollide:function(D,z){return D&&z&&(D.collisionMask&z.collisionCategory)!==0&&(z.collisionMask&D.collisionCategory)!==0},collideSpriteVsSprite:function(D,z,W,H,j,Q){var k=D.isBody?D:D.body,et=z.isBody?z:z.body;return this.canCollide(k,et)?(this.separate(k,et,H,j,Q)&&(W&&W.call(j,D,z),this._total++),!0):!1},collideSpriteVsGroup:function(D,z,W,H,j,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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4397,7 +4397,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(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,S=0,M=0,w=1;if(e.deltaAbsX()>e.deltaAbsY()?M=-1:e.deltaAbsX(){/** + */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(){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4429,7 +4429,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(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,S){var M=a.rectangle(g,y,x,T,S);return this.world.add(M),M},trapezoid:function(g,y,x,T,S,M){var w=a.trapezoid(g,y,x,T,S,M);return this.world.add(w),w},circle:function(g,y,x,T,S){var M=a.circle(g,y,x,T,S);return this.world.add(M),M},polygon:function(g,y,x,T,S){var M=a.polygon(g,y,x,T,S);return this.world.add(M),M},fromVertices:function(g,y,x,T,S,M,w){typeof x=="string"&&(x=d.fromPath(x));var L=a.fromVertices(g,y,x,T,S,M,w);return this.world.add(L),L},fromPhysicsEditor:function(g,y,x,T,S){S===void 0&&(S=!0);var M=l.parseBody(g,y,x,T);return S&&!this.world.has(M)&&this.world.add(M),M},fromSVG:function(g,y,x,T,S,M){T===void 0&&(T=1),S===void 0&&(S={}),M===void 0&&(M=!0);for(var w=x.getElementsByTagName("path"),L=[],F=0;F{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4441,7 +4441,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(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),S=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,j=L(y(H,"matter",{}),y(W,"matter",{}));return j},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(S),N.use(M,S),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,j){W=this.getMatterBodies(W);var Q=X.create(H,j),k=V.point(W,Q);return k.length>0},intersectPoint:function(W,H,j){j=this.getMatterBodies(j);var Q=X.create(W,H),k=[],et=V.point(j,Q);return et.forEach(function(st){k.indexOf(st)===-1&&k.push(st)}),k},intersectRect:function(W,H,j,Q,k,et){k===void 0&&(k=!1),et=this.getMatterBodies(et);var st={min:{x:W,y:H},max:{x:W+j,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,j,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(j,Q),k),ot=0;ot{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4449,7 +4449,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(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 S={x:d.getCenterX(),y:d.getCenterY()},M=d.flipX?-1:1,w=d.flipY?-1:1;v.scale(g,M,w,S)}},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=[],S=0;S1){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 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)=>{/** * @author Joachim Grill * @author Richard Davey * @copyright 2018 CodeAndWeb GmbH @@ -4463,11 +4463,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(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 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{/** * @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,S){i.call(this),this.scene=T,this.engine=e.create(S),this.localWorld=this.engine.world;var M=l(S,"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(S,"enabled",!0),this.getDelta=l(S,"getDelta",this.update60Hz);var w=s(S,"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(S,"autoUpdate",!0);var V=l(S,"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(S,"setBounds",!1)){var K=S.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),j=s(K,"bottom",!0);this.setBounds($,J,X,Y,D,z,W,H,j)}}},setCompositeRenderStyle:function(x){var T=x.bodies,S=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,S,M,w,L,F,O,N){return x===void 0&&(x=0),T===void 0&&(T=0),S===void 0&&(S=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+S,T-w,w,M+w*2),this.updateWall(O,"top",x,T-w,S,w),this.updateWall(N,"bottom",x,T+M,S,w),this},updateWall:function(x,T,S,M,w,L){var F=this.walls[T];x?(F&&p.remove(this.localWorld,F),S+=w/2,M+=L/2,this.walls[T]=this.create(S,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,S){return x===void 0&&(x=0),T===void 0&&(T=1),S===void 0&&(S=.001),this.localWorld.gravity.x=x,this.localWorld.gravity.y=T,this.localWorld.gravity.scale=S,this},create:function(x,T,S,M,w){var L=a.rectangle(x,T,S,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 S=0;SM.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(S,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,S=this.debugGraphic,M=n.allBodies(this.localWorld);this.debugGraphic.clear(),x.showBroadphase&&T.broadphase.controller&&this.renderGrid(T.broadphase,S,x.broadphaseColor,.5),x.showBounds&&this.renderBodyBounds(M,S,x.boundsColor,.5),(x.showBody||x.showStaticBody)&&this.renderBodies(M),x.showJoint&&this.renderJoints(),(x.showAxes||x.showAngleIndicator)&&this.renderBodyAxes(M,S,x.showAxes,x.angleColor,.5),x.showVelocity&&this.renderBodyVelocity(M,S,x.velocityColor,1,2),x.showSeparations&&this.renderSeparations(T.pairs.list,S,x.separationColor),x.showCollisions&&this.renderCollisions(T.pairs.list,S,x.collisionColor)}},renderGrid:function(x,T,S,M){T.lineStyle(1,S,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,S,M){T.lineStyle(1,S,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,S,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 j=1;j1){var F=x.vertices;T.lineStyle(M,S),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 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=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4499,7 +4499,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(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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4591,14 +4591,14 @@ 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=S>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=Et>0?Et:-Et,g=S.friction*(Et>0?1:-1)*s,g<-y?g=-y:g>y&&(g=y)):(g=Et,y=d);var Tt=H*G-j*N,pt=Q*G-k*N,At=X/(Y+w.inverseInertia*Tt*Tt+L.inverseInertia*pt*pt),Dt=(1+S.restitution)*vt*At;if(g*=At,vt0&&(z.normalImpulse=0),Dt=z.normalImpulse-Kt}if(Et<-f||Et>f)z.tangentImpulse=0;else{var Nt=z.tangentImpulse;z.tangentImpulse+=g,z.tangentImpulse<-y&&(z.tangentImpulse=-y),z.tangentImpulse>y&&(z.tangentImpulse=y),g=z.tangentImpulse-Nt}var Wt=N*Dt+V*g,It=G*Dt+K*g;w.isStatic||w.isSleeping||(w.positionPrev.x+=Wt*w.inverseMass,w.positionPrev.y+=It*w.inverseMass,w.anglePrev+=(H*It-j*Wt)*w.inverseInertia),L.isStatic||L.isSleeping||(L.positionPrev.x-=Wt*L.inverseMass,L.positionPrev.y-=It*L.inverseMass,L.anglePrev-=(Q*It-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=S?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,S;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),S=0;S0&&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),S=0;S0&&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 S=u.chamfer;T.vertices=v.chamfer(T.vertices,S.radius,S.quality,S.qualityMin,S.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,S=0;SM&&(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)){S===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,S)}}})},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,S=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),S=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":S=F.x,M=F.y;break;case"H":S=F.x;break;case"V":M=F.y;break}w(S,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 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{/** * @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{/** * @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,j,Q,k,et,st;return W=X[1][1]-X[0][1],H=X[0][0]-X[1][0],j=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*j-H*et)/st,z[1]=(W*et-Q*j)/st),z}function t(X,Y,D,z){var W=Y[0]-X[0],H=Y[1]-X[1],j=z[0]-D[0],Q=z[1]-D[1];if(j*H-Q*W===0)return!1;var k=(W*(D[1]-X[1])+H*(X[0]-D[0]))/(j*H-Q*W),et=(j*(X[1]-D[1])+Q*(D[0]-X[0]))/(Q*W-j*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 j=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(j/(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,j=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),j[0]=l(X,Q),j[1]=l(X,Q+1),z=m(H,j),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: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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} @@ -4614,7 +4614,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(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,S=T.installGlobalPlugins;for(S=S.concat(this._pendingGlobal),f=0;f{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|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,S=p.height,M=p.renderToTexture?p.context:u.sys.context;M.save(),this.game.scene.customViewports&&(M.beginPath(),M.rect(y,x,T,S),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,S)),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;S.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),S.e=z,S.f=W):(S.e-=p.scrollX*u.scrollFactorX,S.f-=p.scrollY*u.scrollFactorY),T.multiply(S),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 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)=>{/** * @author Richard Davey * @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),S=T.getContext("2d",{willReadFrequently:!0});u>0&&d>0&&S.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 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)=>{/** * @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 S=Math.floor(o(e,"width",g)),M=Math.floor(o(e,"height",y)),w=S*M*4,L=new Uint8Array(w);i.readPixels(f,y-u-M,S,M,i.RGBA,i.UNSIGNED_BYTE,L);for(var F=a.createWebGL(this,S,M),O=F.getContext("2d",{willReadFrequently:!0}),N=O.getImageData(0,0,S,M),G=N.data,V=0;V{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4695,7 +4695,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(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),S=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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4713,17 +4713,17 @@ 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(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,S=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,S,M=this.batch,w=this.activeTextures;if(this.forceZero)for(w[0]||d.activeTexture(d.TEXTURE0),x=0;x{/** + */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{/** * @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),S=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 S(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 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;${/** * @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,S,s,y),d.enabled=!0,d.location=M):M.webGLAttribLocation!==-1&&i.disableVertexAttribArray(M.webGLAttribLocation)}else x?i.vertexAttribPointer(T.webGLAttribLocation,p,g,S,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 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=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4745,7 +4745,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(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,S,M,w,L,F,O,N,G,V,K,$,J,X,Y,D,z,W,H,j,Q,k,et){this.lightsActive&&r.prototype.batchTexture.call(this,s,l,f,u,d,p,g,y,x,T,S,M,w,L,F,O,N,G,V,K,$,J,X,Y,D,z,W,H,j,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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4754,11 +4754,11 @@ 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(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,S=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),S=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 j=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,j[0],j[1],j[2],j[3],j[4],j[5],j[6],j[7],S,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,S,M,w,L,F,O,N,G,V,K,$,J,X,Y,D,z,W,H,j,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,Et=K/d+j,St=$/p+Q,Ct=(K+J)/d+j,ct=($+X)/p+Q,Tt=x,pt=T,At=-G,Dt=-V;if(f.isCropped){var Kt=f._crop,Nt=Kt.width,Wt=Kt.height;Tt=Nt,pt=Wt,x=Nt,T=Wt,K=Kt.x,$=Kt.y;var It=K,ee=$;L&&(It=J-Kt.x-Nt),F&&(ee=X-Kt.y-Wt),Et=It/d+j,St=ee/p+Q,Ct=(It+Nt)/d+j,ct=(ee+Wt)/p+Q,At=-G+K,Dt=-V+$}F=F^(!st&&u.isRenderTexture?1:0),L&&(Tt*=-1,At+=x),F&&(pt*=-1,Dt+=T),at.applyITRS(g,y,w,S,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(At,Dt,At+Tt,Dt+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],Et,St,Ct,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),S=this._tempMatrix2;x?T.multiply(x,S):S=T;var M=S.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),S=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,S.TL,S.TR,S.BL,S.BR,2)},batchFillTriangle:function(f,u,d,p,g,y,x,T){this.renderer.pipelines.set(this);var S=this.calcMatrix;T&&T.multiply(x,S);var M=S.getX(f,u),w=S.getY(f,u),L=S.getX(d,p),F=S.getY(d,p),O=S.getX(g,y),N=S.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,S){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,S)},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,S=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,Et,St,Ct,ct,2):(pt[0]=ft,pt[1]=at,pt[2]=et,pt[3]=st,pt[4]=1),S&&pt[4]?this.batchQuad(null,Q,k,rt,ot,pt[0],pt[1],pt[2],pt[3],0,0,1,1,Et,St,Ct,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 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)=>{/** * @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 S=i.color,M=i.intensity,w=i.radius,L=i.attenuation,F=S.r*M,O=S.g*M,N=S.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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4766,7 +4766,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(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),S=[{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=S.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,S,M,w,L,F,O,N,G,V,K,$,J,X,Y){var D=Math.min(g,x,S,w),z=Math.min(y,T,M,L),W=Math.max(g,x,S,w),H=Math.max(y,T,M,L),j=W-D,Q=H-z,k=this.spriteBounds.setTo(D,z,j,Q),et=p?p.preFX.padding:0,st=j+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,Et=this.renderer;Et.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",Et.width,Et.height),this.set1i("uRoundPixels",Et.config.roundPixels),this.flipProjectionMatrix(!0),p&&(this.onDrawSprite(p,ft),p.preFX.onFX(this));var St=this.fsTarget;return this.flush(),vt.viewport(0,0,Et.width,Et.height),vt.bindFramebuffer(vt.FRAMEBUFFER,St.framebuffer.webGLFramebuffer),vt.framebufferTexture2D(vt.FRAMEBUFFER,vt.COLOR_ATTACHMENT0,vt.TEXTURE_2D,St.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(S,M,N,G,0,X,J),this.batchVert(g,y,F,O,0,X,V),this.batchVert(S,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,S,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;S&&(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),S&&(this.set1fv("uColorMatrix",S.getData()),this.set1f("uAlpha",S.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,S=this.targetBounds.y,M=T+p.width,w=S+p.height,L=x.getX(T,S),F=x.getX(T,w),O=x.getX(M,w),N=x.getX(M,S),G=x.getY(T,S),V=x.getY(T,w),K=x.getY(M,w),$=x.getY(M,S),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,S,M,w){var L=this.quadVertexViewF32;L[2]=p,L[3]=g,L[9]=y,L[10]=x,L[16]=T,L[17]=S,L[23]=p,L[24]=g,L[30]=T,L[31]=S,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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4778,7 +4778,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(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 S=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",p),S.activeTexture(S.TEXTURE0),S.bindTexture(S.TEXTURE_2D,u.texture.webGLTexture),u.height>d.height)S.viewport(0,0,u.width,u.height),this.setTargetUVs(u,d);else{var M=d.height-u.height;S.viewport(0,M,u.width,u.height)}if(S.bindFramebuffer(S.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),S.framebufferTexture2D(S.FRAMEBUFFER,S.COLOR_ATTACHMENT0,S.TEXTURE_2D,d.texture.webGLTexture,0),g&&(y?S.clearColor(0,0,0,0):S.clearColor(0,0,0,1),S.clear(S.COLOR_BUFFER_BIT)),x){var w=this.renderer.currentBlendMode;this.renderer.setBlendMode(v.ERASE)}T&&this.flipY(),S.bufferData(S.ARRAY_BUFFER,this.vertexData,S.STATIC_DRAW),S.drawArrays(S.TRIANGLES,0,6),x&&this.renderer.setBlendMode(w),S.bindFramebuffer(S.FRAMEBUFFER,null),S.bindTexture(S.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(u,d,p,g,y,x,T,S){T===void 0&&(T=!0),S===void 0&&(S=!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&&(S?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,S){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]=S},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 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=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4949,7 +4949,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(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,S=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=S,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,S=x.height;if(y.width!==T||y.height!==S)return y.setSize(T,S),!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 S=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(S,M)},resize:function(y,x){var T=this.zoom,S=this.autoRound;S&&(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),S&&(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 S&&(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 S=this.canvas.style,M=T.style;M.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",M.marginLeft=S.marginLeft,M.marginTop=S.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,S,M,w=this.zoom,L=this.autoRound;if(this.scaleMode===a.SCALE_MODE.NONE)this.displaySize.setSize(x*w,T*w),S=this.displaySize.width,M=this.displaySize.height,L&&(S=Math.floor(S),M=Math.floor(M)),this._resetZoom&&(y.width=S+"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),S=this.displaySize.width,M=this.displaySize.height,L&&(S=Math.floor(S),M=Math.floor(M)),this.canvas.width=S,this.canvas.height=M;else if(this.scaleMode===a.SCALE_MODE.EXPAND){this.displaySize.setSize(this.parentSize.width,this.parentSize.height),S=this.displaySize.width,M=this.displaySize.height,L&&(S=Math.floor(S),M=Math.floor(M)),y.width=S+"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;S.width>=M.width?O=T.width:O=T.width-(M.width-S.width)*w.x;var N;return S.height>=M.height?N=T.height:N=T.height-(M.height-S.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 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=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5021,7 +5021,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(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(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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. @@ -5284,7 +5284,7 @@ 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(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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5301,7 +5301,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(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,S=[],M=this.toBBox;if(!p(x,T))return S;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 S=x[T],M=S.children.length,w=this._minEntries;this._chooseSplitAxis(S,w,M);var L=this._chooseSplitIndex(S,w,M),F=g(S.children.splice(L,S.children.length-L));F.height=S.height,F.leaf=S.leaf,r(S,this.toBBox),r(F,this.toBBox),T?x[T-1].children.push(F):this._splitRoot(S,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,S){var M,w,L,F,O,N,G,V;for(N=G=1/0,M=T;M<=S-T;M++)w=n(x,0,M,this.toBBox),L=n(x,M,S,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,S){for(var M=S;M>=0;M--)e(T[M],x)},_condense:function(x){for(var T=x.length-1,S;T>=0;T--)x[T].children.length===0?T>0?(S=x[T-1].children,S.splice(S.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,S){if(!S)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,S,M,w){for(var L=[T,S],F;L.length;)S=L.pop(),T=L.pop(),!(S-T<=M)&&(F=T+Math.ceil((S-T)/M/2)*M,a(x,F,T,S,w),L.push(T,F,F,S))}c.exports=v},35072:(c,m,t)=>{/** + */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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5329,15 +5329,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(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 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{/** * @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,S=T&&T.type===n.CANVAS,M=S?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=S?M:null,this.context=S?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=S?null:new s(T,y,x,1,0,!1,!0,!0,!1),this.pipeline=S?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 S=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(S.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),S=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,S);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,S,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),S===void 0&&(S=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(S,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 S=this.manager.getFrame(d,p);return S&&(this.renderTarget?this.pipeline.batchTextureFrame(S,g,y,T,x,this.camera.matrix,null):this.batchTextureFrame(S,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 S=0;S0&&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,S){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,x,!1,d,p,g,y,T,S):this.renderer.snapshotCanvas(this.canvas,x,!1,d,p,g,y,T,S),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 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)=>{/** * @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,S=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?S=d+(g-(K-F.y)-J):S=d+(K-F.y),e=V,i=K,h=$,s=J}else T=0,S=0,M=0,w=0}else l&&(T=u+(p-e-h)),f&&(S=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,S/Y),n.u1=Math.min(1,(T+M)/X),n.v1=Math.min(1,(S+w)/Y),n.x=e,n.y=i,n.cx=T,n.cy=S,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 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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5345,7 +5345,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(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 S=this.game.config;this.addBase64("__DEFAULT",S.defaultImage),this.addBase64("__MISSING",S.missingImage),this.addBase64("__WHITE",S.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(S){return this.exists(S)?(this.silentWarnings||console.error("Texture key already in use: "+S),!1):!0},remove:function(S){if(typeof S=="string")if(this.exists(S))S=this.get(S);else return this.silentWarnings||console.warn("No texture found matching key: "+S),this;var M=S.key;return this.list.hasOwnProperty(M)&&(S.destroy(),this.emit(h.REMOVE,M),this.emit(h.REMOVE_KEY+M)),this},removeKey:function(S){return this.list.hasOwnProperty(S)&&delete this.list[S],this},addBase64:function(S,M){if(this.checkKey(S)){var w=this,L=new Image;L.onerror=function(){w.emit(h.ERROR,S)},L.onload=function(){var F=w.create(S,L);g.Image(F,0),w.emit(h.ADD,S,F),w.emit(h.ADD_KEY+S,F),w.emit(h.LOAD,S,F)},L.src=M}return this},getBase64:function(S,M,w,L){w===void 0&&(w="image/png"),L===void 0&&(L=.92);var F="",O=this.getFrame(S,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(S,M,w){var L=null;return this.checkKey(S)&&(L=this.create(S,M),g.Image(L,0),w&&L.setDataSource(w),this.emit(h.ADD,S,L),this.emit(h.ADD_KEY+S,L)),L},addGLTexture:function(S,M){var w=null;if(this.checkKey(S)){var L=M.width,F=M.height;w=this.create(S,M,L,F),w.add("__BASE",0,0,0,L,F),this.emit(h.ADD,S,w),this.emit(h.ADD_KEY+S,w)}return w},addCompressedTexture:function(S,M,w){var L=null;if(this.checkKey(S)){if(L=this.create(S,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&&S=O.y&&M=O.x&&S=O.y&&M{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5417,15 +5417,15 @@ return new `+this.key+`(); * @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]}},S=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,j=0;j>1),H=Math.max(1,H>>1),z+=Q}return{mipmaps:D,width:$,height:J,internalFormat:G,compressed:!0,generateMipmap:!1}};c.exports=S},75549:(c,m,t)=>{/** + */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)=>{/** * @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)),S=x*T;S===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",o.key),(d>S||d<-S)&&(d=0),d<0&&(d=S+d),(p===-1||p>S||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 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)=>{/** * @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)),S=r.x,M=e-S,w=e-(g-d-S),L=r.y,F=i-L,O=i-(y-p-L),N,G=s,V=s,K=0,$=0,J=0;J{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5462,7 +5462,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(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,S){this.scene=T,this.tileWidth=S.tileWidth,this.tileHeight=S.tileHeight,this.width=S.width,this.height=S.height,this.orientation=S.orientation,this.renderOrder=S.renderOrder,this.format=S.format,this.version=S.version,this.properties=S.properties,this.widthInPixels=S.widthInPixels,this.heightInPixels=S.heightInPixels,this.imageCollections=S.imageCollections,this.images=S.images,this.layers=S.layers,this.tiles=S.tiles,this.tilesets=S.tilesets,this.objects=S.objects,this.currentLayerIndex=0,this.hexSideLength=S.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,S,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(S,M),K.setSpacing(w,L),K.setImage(G),K):(S===void 0&&(S=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,S,M,w,L,void 0,void 0,O),K.setImage(G),this.tilesets.push(K),this.tiles=a(this),K)},copy:function(x,T,S,M,w,L,F,O){return O=this.getLayer(O),O!==null?(d.Copy(x,T,S,M,w,L,F,O),this):null},createBlankLayer:function(x,T,S,M,w,L,F,O){S===void 0&&(S=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,S,L.tilemapLayer)}return M},removeTileAt:function(x,T,S,M,w){return S===void 0&&(S=!0),M===void 0&&(M=!0),w=this.getLayer(w),w===null?null:d.RemoveTileAt(x,T,S,M,w)},removeTileAtWorldXY:function(x,T,S,M,w,L){return S===void 0&&(S=!0),M===void 0&&(M=!0),L=this.getLayer(L),L===null?null:d.RemoveTileAtWorldXY(x,T,S,M,w,L)},renderDebug:function(x,T,S){return S=this.getLayer(S),S===null?null:(this.orientation===h.ORTHOGONAL&&d.RenderDebug(x,T,S),this)},renderDebugFull:function(x,T){for(var S=this.layers,M=0;M{/** + */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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5478,7 +5478,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(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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5486,7 +5486,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(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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5506,11 +5506,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(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 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{/** * @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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5578,7 +5578,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(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),S=Math.ceil(s.y),M=Math.max(T-y,1),w=Math.max(S-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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5622,7 +5622,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(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,S,M,w,L;h.staggerAxis==="y"?(T=(o-y)/(u*s),S=(r-x)/x,M=u*T+d*S,w=p*T+g*S):(T=(o-y)/y,S=(r-x)/(u*l),M=d*T+u*S,w=g*T+p*S),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 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=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5642,7 +5642,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(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],S=y.tilesets[T];p.width=S.tileWidth,p.height=S.tileHeight}return r(p,g),s&&d!==p.collides&&o(i,h,l),p};c.exports=n},26303:(c,m,t)=>{/** + */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)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5666,7 +5666,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(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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5810,7 +5810,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(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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5875,11 +5875,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(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(S,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(S,-1,W,H,l.tilewidth,l.tileheight),F[H][W]=L),O++,O===$.width&&(Y++,O=0)}}else{S=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)}),S.orientation===v.HEXAGONAL&&(S.hexSideLength=l.hexsidelength,S.staggerAxis=l.staggeraxis,S.staggerIndex=l.staggerindex);for(var j=[],Q=0,k=y.data.length;Q0?(w=new h(S,M.gid,O,F.length,l.tilewidth,l.tileheight),w.rotation=M.rotation,w.flipX=M.flipped,j.push(w)):(L=f?null:new h(S,-1,O,F.length,l.tilewidth,l.tileheight),j.push(L)),O++,O===y.width&&(F.push(j),O=0,j=[])}S.data=F,d.push(S)}return d};c.exports=s},24619:(c,m,t)=>{/** + */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)=>{/** * @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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5915,7 +5915,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(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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5943,23 +5943,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(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("("),S=g.indexOf(")"),M=g.indexOf(",");if(T&&S&&M){var w=parseFloat(g.substring(T+1,M)),L=parseFloat(g.substring(M+1,S));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 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)=>{/** * @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),S=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",S)),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 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{/** * @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,S=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,j=W%M,Q=Math.floor(W/M);j>=0&&j=0&&Q{/** + */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{/** * @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 S=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,Et=void 0;Array.isArray(at)?(vt=at[0],Et=at[1]):at.hasOwnProperty("value")?(vt=at.value,Array.isArray(at.value)?(vt=at.value[0],Et=at.value[1]):typeof at.value=="string"&&(vt=at.value)):typeof at=="string"&&(vt=at),rt.addFrame(ot,vt,Et,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 St=f(ft,at),Ct=e(l(at,"interpolation",J));rt.add(ot,ft,St.getEnd,St.getStart,St.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",$),Ct,Ct?at:null)}},Y=new d(g,T),D=0;D{/** + */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{/** * @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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6031,7 +6031,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(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,S,M,w,L,F,O,N,G){var V=new h(this,f,u,d,p,g,y,x,T,S,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,S,M){var w=new s(this,f,u,d,p,g,y,x,T,S,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 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{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6039,7 +6039,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(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,S,M,w,L,F){a.call(this,i,h,p,g,y,x,T,S,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 S=this.ease(T);this.interpolation?this.current=this.interpolation(this.interpolationData,S):this.current=this.start+(this.end-this.start)*S,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 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)=>{/** * @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})())})(Ku);var fo=Ku.exports;const Hn=Ru(fo);var Ry=Object.create,co=Object.defineProperty,Fy=Object.defineProperties,Ly=Object.getOwnPropertyDescriptor,Oy=Object.getOwnPropertyDescriptors,Dy=Object.getOwnPropertyNames,uu=Object.getOwnPropertySymbols,Iy=Object.getPrototypeOf,$u=Object.prototype.hasOwnProperty,By=Object.prototype.propertyIsEnumerable,fu=(P,C,A)=>C in P?co(P,C,{enumerable:!0,configurable:!0,writable:!0,value:A}):P[C]=A,ne=(P,C)=>{for(var A in C||(C={}))$u.call(C,A)&&fu(P,A,C[A]);if(uu)for(var A of uu(C))By.call(C,A)&&fu(P,A,C[A]);return P},Gi=(P,C)=>Fy(P,Oy(C)),Rt=(P,C)=>()=>(C||P((C={exports:{}}).exports,C),C.exports),by=(P,C,A,I)=>{if(C&&typeof C=="object"||typeof C=="function")for(let B of Dy(C))!$u.call(P,B)&&B!==A&&co(P,B,{get:()=>C[B],enumerable:!(I=Ly(C,B))||I.enumerable});return P},Zu=(P,C,A)=>(A=P!=null?Ry(Iy(P)):{},by(C||!P||!P.__esModule?co(A,"default",{value:P,enumerable:!0}):A,P)),Tr=Rt(P=>{var C=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}}P.DEFAULT_COMPARATOR=C,P.DEFAULT_REVERSE_COMPARATOR=A,P.reverseComparator=I,P.createTupleComparator=B}),Ny=Rt(P=>{P.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",P.SYMBOL_SUPPORT=typeof Symbol<"u"}),oe=Rt((P,C)=>{var A=Ny(),I=A.ARRAY_BUFFER_SUPPORT,B=A.SYMBOL_SUPPORT;C.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=Tr(),I=oe(),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 C=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;P.getPointerArray=function(t){var a=t-1;if(a<=C)return Uint8Array;if(a<=A)return Uint16Array;if(a<=I)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},P.getSignedPointerArray=function(t){var a=t-1;return a<=B?Int8Array:a<=b?Int16Array:a<=c?Int32Array:Float64Array},P.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};P.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},P.isTypedArray=function(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(t)},P.concat=function(){var t=0,a,v,o;for(a=0,o=arguments.length;a{var C=oe(),A=De();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 C(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 C(m,function(n){v[r]=n,o[r]=r++}),[v,o]}P.isArrayLike=I,P.guessLength=B,P.toArray=b,P.toArrayWithIndices=c}),po=Rt((P,C)=>{var A=oe(),I=Tr(),B=Xe(),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(S=d.slice(0,u),n(p,S),g=u,y=d.length;g0&&o(p,S,d[g]);return S.sort(f)}var M=B.guessLength(d);return M!==null&&M0&&o(p,S,w)),g++}),S.length>g&&(S.length=g),S.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,S;if(u===1){if(B.isArrayLike(d)){for(g=0,y=d.length;g0)&&(T=x);return S=new d.constructor(1),S[0]=T,S}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(S=d.slice(0,u),n(f,S),g=u,y=d.length;g0&&o(f,S,d[g]);return S.sort(p)}var M=B.guessLength(d);return M!==null&&M0&&o(f,S,w)),g++}),S.length>g&&(S.length=g),S.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,C.exports=s}),Gy=Rt((P,C)=>{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=oe();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},C.exports=B}),Ce=Rt((P,C)=>{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"},C.exports=A}),ju=Rt(P=>{function C(c){return c|=c>>1,c|=c>>2,c|=c>>4,c|=c>>8,c|=c>>16,c&~(c>>1)}P.msb32=C;function A(c){return c|=c>>1,c|=c>>2,c|=c>>4,c&~(c>>1)}P.msb8=A,P.test=function(c,m){return c>>m&1},P.criticalBit8=function(c,m){return A(c^m)},P.criticalBit8Mask=function(c,m){return~A(c^m)>>>0&255},P.testCriticalBit8=function(c,m){return 1+(c|m)>>8},P.criticalBit32Mask=function(c,m){return~C(c^m)>>>0&4294967295},P.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]}}),Uy=Rt((P,C)=>{var A=Ce(),I=ju();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)},C.exports=B}),Xy=Rt((P,C)=>{var A=Ce(),I=ju(),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))},C.exports=c}),Vy=Rt((P,C)=>{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}C.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}}),Wy=Rt((P,C)=>{var A=Vy(),I=oe(),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},C.exports=t}),Yy=Rt((P,C)=>{var A=oe();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=Xe(),I=Ce();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=Xe(),I=Ju();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++}},C.exports=A}),$y=Rt((P,C)=>{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),C.exports=A}),Zy=Rt((P,C)=>{var A=De();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),C.exports=I}),go=Rt((P,C)=>{var A=Tr(),I=po(),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),C.exports=t}),jy=Rt((P,C)=>{var A=oe(),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},C.exports=B}),Qu=Rt((P,C)=>{var A=Ce(),I=oe();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},C.exports=B}),Jy=Rt((P,C)=>{var A=Qu(),I=oe(),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},C.exports=b}),Qy=Rt((P,C)=>{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),C.exports=B}),ku=Rt((P,C)=>{var A=Ce(),I=Xe();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=Xe(),I=De(),B=ku();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{P.search=function(C,A,I,B){var b=0;I=typeof I<"u"?I:0,B=typeof B<"u"?B:C.length,B--;for(var c;I<=B;)if(b=I+B>>>1,c=C[b],c>A)B=~-b;else if(c>>1,m=C(A[B],I),m>0)c=~-B;else if(m<0)b=-~B;else return B;return-1},P.lowerBound=function(C,A,I,B){var b=0;for(I=typeof I<"u"?I:0,B=typeof B<"u"?B:C.length;I>>1,A<=C[b]?B=b:I=-~b;return I},P.lowerBoundWithComparator=function(C,A,I){for(var B=0,b=0,c=A.length;b>>1,C(I,A[B])<=0?c=B:b=-~B;return b},P.lowerBoundIndices=function(C,A,I,B,b){var c=0;for(B=typeof B<"u"?B:0,b=typeof b<"u"?b:C.length;B>>1,I<=C[A[c]]?b=c:B=-~c;return B},P.upperBound=function(C,A,I,B){var b=0;for(I=typeof I<"u"?I:0,B=typeof B<"u"?B:C.length;I>>1,A>=C[b]?I=-~b:B=b;return I},P.upperBoundWithComparator=function(C,A,I){for(var B=0,b=0,c=A.length;b>>1,C(I,A[B])>=0?b=-~B:c=B;return b}}),qy=Rt(P=>{var C=De(),A=Xe().isArrayLike,I=qu(),B=vo();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 C.isTypedArray(a)?C.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=C.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=C.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},P.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},P.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},P.intersectionUnique=function(){if(arguments.length===2){if(A(arguments[0]))return P.intersectionUniqueArrays(arguments[0],arguments[1])}else if(A(arguments[0]))return P.kWayIntersectionUniqueArrays(arguments);return null}}),_y=Rt((P,C)=>{var A=Ce(),I=oe(),B=qy();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},C.exports=c}),_u=Rt(P=>{var C=new Float64Array(64),A=new Float64Array(64);function I(b,c,m){var t,a,v,o,r;for(C[0]=c,A[0]=m,a=0;a>=0;)if(v=C[a],o=A[a]-1,v=t&&vA[a-1]-C[a-1]&&(r=C[a],C[a]=C[a-1],C[a-1]=r,r=A[a],A[a]=A[a-1],A[a-1]=r)}else a--;return b}P.inplaceQuickSort=I;function B(b,c,m,t){var a,v,o,r,n,e;for(C[0]=m,A[0]=t,v=0;v>=0;)if(o=C[v],r=A[v]-1,o=a&&oA[v-1]-C[v-1]&&(e=C[v],C[v]=C[v-1],C[v-1]=e,e=A[v],A[v]=A[v-1],A[v-1]=e)}else v--;return c}P.inplaceQuickSortIndices=B}),t1=Rt((P,C)=>{var A=Xe(),I=De(),B=Tr().createTupleComparator,b=go(),c=_u().inplaceQuickSortIndices;function m(n,e,i,h){var s,l=0,f;for(s=0;s>>1),S=i[T],f[F]=S,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],S=l[y],M=m(h,s,S,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 S=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=Ce(),I=oe();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=Ce(),I=oe(),B=De(),b=Xe();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=mo(),I=oe(),B=De(),b=Xe();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},C.exports=c}),tf=Rt((P,C)=>{var A=mo(),I=oe(),B=De(),b=Xe();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=tf(),I=oe(),B=De(),b=Xe();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},C.exports=c}),n1=Rt((P,C)=>{var A=Ce(),I=oe(),B=go(),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=Ce(),I=oe();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,S,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,C.exports=r}),a1=Rt((P,C)=>{var A=Ce(),I=oe();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)},C.exports=B}),o1=Rt((P,C)=>{var A=Ce(),I=oe();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)},C.exports=B}),h1=Rt(P=>{P.intersection=function(){if(arguments.length<2)throw new Error("mnemonist/Set.intersection: needs at least two arguments.");var C=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},P.isSuperset=function(C,A){return P.isSubset(A,C)},P.add=function(C,A){for(var I=A.values(),B;B=I.next(),!B.done;)C.add(B.value)},P.subtract=function(C,A){for(var I=A.values(),B;B=I.next(),!B.done;)C.delete(B.value)},P.intersect=function(C,A){for(var I=C.values(),B;B=I.next(),!B.done;)A.has(B.value)||C.delete(B.value)},P.disjunct=function(C,A){for(var I=C.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;)C.has(B.value)||C.add(B.value);for(var c=0,m=b.length;cA.size&&(I=C,C=A,A=I),C.size===0)return 0;if(C===A)return C.size;for(var B=C.values(),b,c=0;b=B.next(),!b.done;)A.has(b.value)&&c++;return c},P.unionSize=function(C,A){var I=P.intersectionSize(C,A);return C.size+A.size-I},P.jaccard=function(C,A){var I=P.intersectionSize(C,A);if(I===0)return 0;var B=C.size+A.size-I;return I/B},P.overlap=function(C,A){var I=P.intersectionSize(C,A);return I===0?0:I/Math.min(C.size,A.size)}}),l1=Rt((P,C)=>{var A=Ce(),I=De().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),C.exports=B}),u1=Rt((P,C)=>{var A=Ce(),I=De().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=Ce(),I=De().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=oe(),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 S=t(x,u-x.length,T.count);if(y.push(S),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},C.exports=n}),ef=Rt((P,C)=>{var A=oe(),I=Ce(),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,C.exports=b}),c1=Rt((P,C)=>{var A=oe(),I=ef(),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,C.exports=b}),v1=Rt((P,C)=>{var A=Ce(),I=oe(),B=Xe(),b=De(),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),C.exports=t}),p1=Rt((P,C)=>{var A=Xe(),I=De(),B=_u().inplaceQuickSortIndices,b=qu().lowerBoundIndices,c=po(),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,S,M,w,L,F;d.length;)if(S=d.pop(),T=d.pop(),g=d.pop(),y=n[S-1],S--,F=S-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,S)),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=po(),I=vo(),B=Gy();C.exports={BiMap:zy(),BitSet:Uy(),BitVector:Xy(),BloomFilter:Wy(),BKTree:Yy(),CircularBuffer:Hy(),DefaultMap:Ky(),DefaultWeakMap:$y(),FixedDeque:Ju(),StaticDisjointSet:Zy(),FibonacciHeap:I,MinFibonacciHeap:I.MinFibonacciHeap,MaxFibonacciHeap:I.MaxFibonacciHeap,FixedReverseHeap:go(),FuzzyMap:jy(),FuzzyMultiMap:Jy(),HashedArrayTree:Qy(),Heap:A,MinHeap:A.MinHeap,MaxHeap:A.MaxHeap,StaticIntervalTree:ky(),InvertedIndex:_y(),KDTree:t1(),LinkedList:e1(),LRUCache:mo(),LRUCacheWithDelete:i1(),LRUMap:tf(),LRUMapWithDelete:s1(),MultiMap:Qu(),MultiSet:n1(),PassjoinIndex:r1(),Queue:a1(),FixedStack:ku(),Stack:o1(),SuffixArray:B,GeneralizedSuffixArray:B.GeneralizedSuffixArray,Set:h1(),SparseQueueSet:l1(),SparseMap:u1(),SparseSet:f1(),SymSpell:d1(),Trie:c1(),TrieMap:ef(),Vector:v1(),VPTree:p1()}}),ut=class ce{static get ZERO(){return new ce(0,0)}static get ONE(){return new ce(1,1)}static get UP(){return new ce(0,-1)}static get DOWN(){return new ce(0,1)}static get LEFT(){return new ce(-1,0)}static get RIGHT(){return new ce(1,0)}static get UP_LEFT(){return new ce(-1,-1)}static get UP_RIGHT(){return new ce(1,-1)}static get DOWN_RIGHT(){return new ce(1,1)}static get DOWN_LEFT(){return new ce(-1,1)}constructor(C,A){typeof C=="number"?(this.x=C,this.y=A||0):(this.x=C.x,this.y=C.y)}clone(){return new ce(this.x,this.y)}add(C){return new ce(this.x+C.x,this.y+C.y)}multiply(C){return new ce(this.x*C.x,this.y*C.y)}divide(C){return new ce(this.x/C.x,this.y/C.y)}subtract(C){return new ce(this.x-C.x,this.y-C.y)}equals(C){return this.x===C.x&&this.y===C.y}abs(){return new ce(Math.abs(this.x),Math.abs(this.y))}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}modulo(C){return new ce(this.x%C.x,this.y%C.y)}scalarModulo(C){return new ce(this.x%C,this.y%C)}scalarMult(C){return new ce(this.x*C,this.y*C)}toPosition(){return{x:this.x,y:this.y}}toString(){return`${this.x}#${this.y}`}},Gt=class{static equal(P,C){return P.position.x===C.position.x&&P.position.y===C.position.y&&P.layer===C.layer}static copyOver(P,C){C.position.x=P.position.x,C.position.y=P.position.y,C.layer=P.layer}static clone(P){return{position:P.position.clone(),layer:P.layer}}static toString(P){return`${P.position.toString()}#${P.layer}`}static toInternal(P){return{position:new ut(P.position.x,P.position.y),layer:P.charLayer}}static fromInternal(P){return{position:P.position.toPosition(),charLayer:P.layer}}},m1=(P=>(P.NONE="none",P.LEFT="left",P.UP_LEFT="up-left",P.UP="up",P.UP_RIGHT="up-right",P.RIGHT="right",P.DOWN_RIGHT="down-right",P.DOWN="down",P.DOWN_LEFT="down-left",P))(m1||{}),x1={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"},y1={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},kn={up:0,"up-right":1,right:2,"down-right":3,down:4,"down-left":5,left:6,"up-left":7,none:NaN},sf=["up","up-right","right","down-right","down","down-left","left","up-left"],T1=["down-left","down-right","up-right","up-left"];function xo(){return["up","down","left","right","none","up-left","up-right","down-right","down-left"]}function Vs(P){return T1.includes(P)}function S1(P,C=1){return P==="none"?"none":sf[(kn[P]+8-Math.abs(C)%8)%8]}function nf(P,C=1){return P==="none"?"none":sf[(kn[P]+C)%8]}function qi(P){return y1[P]}function C1(P){return x1[P]}function Qe(P,C){if(P.x===C.x){if(P.y>C.y)return"up";if(P.yC.x)return"left";if(P.xC.x){if(P.yC.y)return"up-left"}else if(P.xC.y)return"up-right"}return"none"}var E1=(P=>(P[P.FOUR=4]="FOUR",P[P.EIGHT=8]="EIGHT",P))(E1||{});function ps(P){return typeof P=="string"&&xo().includes(P)}var $a=function(P,C){return $a=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])},$a(P,C)};function Js(P,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");$a(P,C);function A(){this.constructor=P}P.prototype=C===null?Object.create(C):(A.prototype=C.prototype,new A)}function P1(P,C,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(P,C||[])).next())})}function rf(P,C){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]=P.length&&(P=void 0),{value:P&&P[I++],done:!P}}};throw new TypeError(C?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ks(P,C){var A=typeof Symbol=="function"&&P[Symbol.iterator];if(!A)return P;var I=A.call(P),B,b=[],c;try{for(;(C===void 0||C-- >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 $s(P,C,A){if(A||arguments.length===2)for(var I=0,B=C.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 ms?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 M1(P){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var C=P[Symbol.asyncIterator],A;return C?C.call(P):(P=typeof Ts=="function"?Ts(P):P[Symbol.iterator](),A={},I("next"),I("throw"),I("return"),A[Symbol.asyncIterator]=function(){return this},A);function I(b){A[b]=P[b]&&function(c){return new Promise(function(m,t){c=P[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 ge(P){return typeof P=="function"}function af(P){var C=function(I){Error.call(I),I.stack=new Error().stack},A=P(C);return A.prototype=Object.create(Error.prototype),A.prototype.constructor=A,A}var Ga=af(function(P){return function(C){P(this),this.message=C?C.length+` errors occurred during unsubscription: -`+C.map(function(A,I){return I+1+") "+A.toString()}).join(` - `):"",this.name="UnsubscriptionError",this.errors=C}});function Za(P,C){if(P){var A=P.indexOf(C);0<=A&&P.splice(A,1)}}var Sr=function(){function P(C){this.initialTeardown=C,this.closed=!1,this._parentage=null,this._finalizers=null}return P.prototype.unsubscribe=function(){var C,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=Ts(c),t=m.next();!t.done;t=m.next()){var a=t.value;a.remove(this)}}catch(i){C={error:i}}finally{try{t&&!t.done&&(A=m.return)&&A.call(m)}finally{if(C)throw C.error}}else c.remove(this);var v=this.initialTeardown;if(ge(v))try{v()}catch(i){b=i instanceof Ga?i.errors:[i]}var o=this._finalizers;if(o){this._finalizers=null;try{for(var r=Ts(o),n=r.next();!n.done;n=r.next()){var e=n.value;try{du(e)}catch(i){b=b??[],i instanceof Ga?b=$s($s([],Ks(b)),Ks(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 Ga(b)}},P.prototype.add=function(C){var A;if(C&&C!==this)if(this.closed)du(C);else{if(C instanceof P){if(C.closed||C._hasParent(this))return;C._addParent(this)}(this._finalizers=(A=this._finalizers)!==null&&A!==void 0?A:[]).push(C)}},P.prototype._hasParent=function(C){var A=this._parentage;return A===C||Array.isArray(A)&&A.includes(C)},P.prototype._addParent=function(C){var A=this._parentage;this._parentage=Array.isArray(A)?(A.push(C),A):A?[A,C]:C},P.prototype._removeParent=function(C){var A=this._parentage;A===C?this._parentage=null:Array.isArray(A)&&Za(A,C)},P.prototype.remove=function(C){var A=this._finalizers;A&&Za(A,C),C instanceof P&&C._removeParent(this)},P.EMPTY=function(){var C=new P;return C.closed=!0,C}(),P}(),of=Sr.EMPTY;function hf(P){return P instanceof Sr||P&&"closed"in P&&ge(P.remove)&&ge(P.add)&&ge(P.unsubscribe)}function du(P){ge(P)?P():P.unsubscribe()}var lf={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},w1={setTimeout:function(P,C){for(var A=[],I=2;I0},enumerable:!1,configurable:!0}),C.prototype._trySubscribe=function(A){return this._throwIfClosed(),P.prototype._trySubscribe.call(this,A)},C.prototype._subscribe=function(A){return this._throwIfClosed(),this._checkFinalizedStatuses(A),this._innerSubscribe(A)},C.prototype._innerSubscribe=function(A){var I=this,B=this,b=B.hasError,c=B.isStopped,m=B.observers;return b||c?of:(this.currentObservers=null,m.push(A),new Sr(function(){I.currentObservers=null,Za(m,A)}))},C.prototype._checkFinalizedStatuses=function(A){var I=this,B=I.hasError,b=I.thrownError,c=I.isStopped;B?A.error(b):c&&A.complete()},C.prototype.asObservable=function(){var A=new ke;return A.source=this,A},C.create=function(A,I){return new vu(A,I)},C}(ke),vu=function(P){Js(C,P);function C(A,I){var B=P.call(this)||this;return B.destination=A,B.source=I,B}return C.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)},C.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)},C.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)},C.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:of},C}(ae),cf=new ke(function(P){return P.complete()});function z1(P){return P&&ge(P.schedule)}function vf(P){return P[P.length-1]}function pf(P){return z1(vf(P))?P.pop():void 0}function gf(P,C){return typeof vf(P)=="number"?P.pop():C}var mf=function(P){return P&&typeof P.length=="number"&&typeof P!="function"};function xf(P){return ge(P?.then)}function yf(P){return ge(P[To])}function Tf(P){return Symbol.asyncIterator&&ge(P?.[Symbol.asyncIterator])}function Sf(P){return new TypeError("You provided "+(P!==null&&typeof P=="object"?"an invalid object":"'"+P+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function U1(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Cf=U1();function Ef(P){return ge(P?.[Cf])}function Pf(P){return A1(this,arguments,function(){var C,A,I,B;return rf(this,function(b){switch(b.label){case 0:C=P.getReader(),b.label=1;case 1:b.trys.push([1,,9,10]),b.label=2;case 2:return[4,ms(C.read())];case 3:return A=b.sent(),I=A.value,B=A.done,B?[4,ms(void 0)]:[3,5];case 4:return[2,b.sent()];case 5:return[4,ms(I)];case 6:return[4,b.sent()];case 7:return b.sent(),[3,2];case 8:return[3,10];case 9:return C.releaseLock(),[7];case 10:return[2]}})})}function Af(P){return ge(P?.getReader)}function ts(P){if(P instanceof ke)return P;if(P!=null){if(yf(P))return X1(P);if(mf(P))return V1(P);if(xf(P))return W1(P);if(Tf(P))return Mf(P);if(Ef(P))return Y1(P);if(Af(P))return H1(P)}throw Sf(P)}function X1(P){return new ke(function(C){var A=P[To]();if(ge(A.subscribe))return A.subscribe(C);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function V1(P){return new ke(function(C){for(var A=0;A{let B=this.tilePosInDirection(new ut(A,I),P);return this.tilemap.hasBlockingTile(B,C,C1(P),this.ignoreMissingTiles)})}isCharBlocking(P,C){return this.someCharTile((A,I)=>{let B=this.tilePosInDirection(new ut(A,I),P);return this.tilemap.hasBlockingChar(B,C,this.getCollisionGroups(),new Set([this.getId()]),this.ignoreCollisionGroups)})}isMoving(){return this.movementDirection!="none"}turnTowards(P){this.isMoving()||P!="none"&&this.changeFacingDirection(P)}changeFacingDirection(P){this.facingDirection!==P&&(this.facingDirection=P,this.directionChanged$.next(P))}getFacingDirection(){return this.facingDirection}getFacingPosition(){return this._tilePos.position.add(qi(this.facingDirection))}addCollisionGroup(P){this.collisionGroups.add(P)}setCollisionGroups(P){this.collisionGroups=new Set(P)}setIgnoreCollisionGroups(P){this.ignoreCollisionGroups=new Set(P)}getCollisionGroups(){return Array.from(this.collisionGroups)}getIgnoreCollisionGroups(){return Array.from(this.ignoreCollisionGroups)}hasCollisionGroup(P){return this.collisionGroups.has(P)}removeCollisionGroup(P){this.collisionGroups.delete(P)}removeAllCollisionGroups(){this.collisionGroups.clear()}addLabels(P){for(let C of P)this.labels.add(C)}getLabels(){return[...this.labels.values()]}hasLabel(P){return this.labels.has(P)}clearLabels(){this.labels.clear()}removeLabels(P){for(let C of P)this.labels.delete(C)}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(P){let C=Math.max(0,Math.min(Ji,P));this.movementProgress=C}hasWalkedHalfATile(){return this.movementProgress>Ji/2}willCrossTileBorderThisUpdate(P){return this.movementProgress+this.maxProgressForDelta(P)>=Ji}updateCharacterPosition(P){let C=this.willCrossTileBorderThisUpdate(P),A=1-(C?Ji-this.movementProgress:this.maxProgressForDelta(P))/this.maxProgressForDelta(P);this.movementProgress=Math.min(this.movementProgress+this.maxProgressForDelta(P),Ji),C&&(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(P*A)):this.stopMoving())}maxProgressForDelta(P){let C=P/1e3;return Math.floor(C*this.speed*Ji)}get tilePos(){return Gt.clone(this._tilePos)}set tilePos(P){Gt.copyOver(P,this._tilePos)}startMoving(P){P!=="none"&&(P!=this.movementDirection&&this.movementStarted$.next(P),this.movementDirection=P,this.facingDirection=P,this.fire(this.positionChangeStarted$,this.tilePos,this.getNextTilePos()))}tilePosInDirection(P,C){return P.add(qi(this.tilemap.toMapDirection(C)))}shouldContinueMoving(){return this.lastMovementImpulse!=="none"&&!this.isBlockingDirection(this.lastMovementImpulse)}stopMoving(){if(this.movementDirection==="none")return;let P=this.tilePos,C=this.getNextTilePos(),A=this.movementDirection;this.tilePos=this.getNextTilePos(),this.movementDirection="none",this.movementStopped$.next(A),this.fire(this.positionChangeFinished$,P,C)}fire(P,{position:C,layer:A},{position:I,layer:B}){P.next({exitTile:C,enterTile:I,exitLayer:A,enterLayer:B})}someCharTile(P){let C=this.getNextTilePos().position;for(let A=C.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),C.push(B.tilemapLayer)):this.setDepth(B,++A)}),this.charLayerDepths.set(void 0,A),I.forEach((B,b)=>{B.tilemapLayer.setDepth(b+1+A)}),C.forEach(B=>B.destroy())}setDepth(C,A){C.tilemapLayer.setDepth(A),this.isCharLayer(C)&&this.charLayerDepths.set(this.getLayerProp(C,Qi.CHAR_LAYER_PROP_NAME),A)}createHeightShiftLayers(C,A){let I=this.getLayerProp(C,Qi.HEIGHT_SHIFT_PROP_NAME);isNaN(I)&&(I=0);let B=1;for(let b=0;bB.name==A);return I?.value}hasLayerProp(C,A){return this.getLayerProp(C,A)!=null}copyLayer(C,A){let I=`${C.name}#${A}`,B=this.tilemap.createBlankLayer(I,C.tilemapLayer.tileset);if(B){if(B.name=I,this.isIsometric())for(let b=A;b>=0;b--){let c=A-b;B.putTileAt(C.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(P){P?(this.sprite&&(P.x=this.sprite.x,P.y=this.sprite.y),this.sprite=P,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(P){var C;this.container=P,this.cachedContainerHeight=(C=P?.getBounds().height)!=null?C:0}getContainer(){return this.container}getOffsetX(){return this.customOffset.x}setOffsetX(P){this.customOffset.x=P}getOffsetY(){return this.customOffset.y}setOffsetY(P){this.customOffset.y=P}getWalkingAnimationMapping(){return this.walkingAnimationMapping}turnTowards(P){var C;this.geHeadless.isMoving(this.charData.id)||P!="none"&&(this.geHeadless.turnTowards(this.charData.id,P),(C=this.animation)==null||C.setStandingFrame(P))}getAnimation(){return this.animation}setAnimation(P){this.animation=P}update(P){this.updateGridChar()}getEngineOffset(){var P,C,A,I;if(!this.sprite)return ut.ZERO;let B=this.tilemap.getTileWidth()/2-Math.floor(((C=(P=this.sprite)==null?void 0:P.displayWidth)!=null?C: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 P=new ut(this.geHeadless.getPosition(this.charData.id)),C=this.geHeadless.getMovementProgress(this.charData.id)/1e3,A=this.tilemap.tilePosToPixelPos(P).add(this.getEngineOffset()).add(this.customOffset).add(qi(this.geHeadless.getFacingDirection(this.charData.id)).multiply(this.tilemap.getTileDistance(this.geHeadless.getFacingDirection(this.charData.id)).scalarMult(C))),I=this.getGameObj();I&&(I.x=Math.floor(A.x),I.y=Math.floor(A.y))}getGameObj(){return this.container||this.sprite}updateGridChar(){var P;if(this.updatePixelPos(),this.sprite&&this.geHeadless.isMoving(this.charData.id)){let C=this.geHeadless.getMovementProgress(this.charData.id)>Ji/2;(P=this.getAnimation())==null||P.updateCharacterFrame(this.geHeadless.getFacingDirection(this.charData.id),C,Number(this.sprite.frame.name))}this.updateDepth()}resetAnimation(P){let C=new pu(this.walkingAnimationMapping,P.texture.source[0].width/P.width/pu.FRAMES_CHAR_ROW);this.setAnimation(C),C.frameChange().pipe(Je(this.newSpriteSet$)).subscribe(A=>{P?.setFrame(A)}),C.setIsEnabled(this.walkingAnimationMapping!==void 0),C.setStandingFrame(this.geHeadless.getFacingDirection(this.charData.id))}updateOverlaySprite(){if(!this.layerOverlaySprite||!this.sprite)return;this.layerOverlaySprite.scale=this.sprite.scale;let P=this.tilemap.getTileHeight()/this.layerOverlaySprite.scale;this.layerOverlaySprite.setCrop(0,0,this.layerOverlaySprite.displayWidth,this.sprite.height-P),this.layerOverlaySprite.setOrigin(0,0)}updateDepth(){if(!this.getGameObj())return;let P=new ut(this.geHeadless.getPosition(this.charData.id)),C=this.geHeadless.getCharLayer(this.charData.id);this.container?this.setContainerDepth(this.container,{position:P,layer:C}):this.sprite&&this.setSpriteDepth(this.sprite,{position:P,layer:C});let A=this.getLayerOverlaySprite();if(A){let I=new ut(Gi(ne({},P),{y:P.y-1}));this.setSpriteDepth(A,{position:I,layer:C})}}setSpriteDepth(P,C){P.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(C))+this.getPaddedPixelDepthSprite(P))}setContainerDepth(P,C){P.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(C))+this.getPaddedPixelDepthContainer(P))}getPaddedPixelDepthContainer(P){return ka.shiftPad(P.y+this.cachedContainerHeight,_a.Z_INDEX_PADDING)}getPaddedPixelDepthSprite(P){return ka.shiftPad(P.y+P.displayHeight,_a.Z_INDEX_PADDING)}getTransitionLayer(P){if(P.layer)return this.geHeadless.getTransition(P.position,P.layer)||P.layer}},aT=(P=>(P.DONT_BLOCK="DONT_BLOCK",P.BLOCK_TWO_TILES="BLOCK_TWO_TILES",P.BLOCK_ONE_TILE_AHEAD="BLOCK_ONE_TILE_AHEAD",P.BLOCK_ONE_TILE_BEHIND="BLOCK_ONE_TILE_BEHIND",P))(aT||{}),If=(P=>(P.STOP="STOP",P.CLOSEST_REACHABLE="CLOSEST_REACHABLE",P.RETRY="RETRY",P.ALTERNATIVE_TARGETS="ALTERNATIVE_TARGETS",P))(If||{}),oT=class{distance(P,C){return ri.manhattanDistance(P,C)}direction(P,C){if(ri.equal(P,C))return"none";let A=P.clone().subtract(C);return Math.abs(A.x)>Math.abs(A.y)?A.x>0?"left":"right":A.y>0?"up":"down"}neighbors(P){return[new ut(P.x,P.y+1),new ut(P.x+1,P.y),new ut(P.x-1,P.y),new ut(P.x,P.y-1)]}getDirections(){return["up","right","down","left"]}},hT=class{distance(P,C){return ri.chebyshevDistance(P,C)}neighbors(P){let C=[new ut(P.x,P.y+1),new ut(P.x+1,P.y),new ut(P.x-1,P.y),new ut(P.x,P.y-1)],A=[new ut(P.x+1,P.y+1),new ut(P.x+1,P.y-1),new ut(P.x-1,P.y+1),new ut(P.x-1,P.y-1)];return[...C,...A]}direction(P,C){return C.x>P.x?C.y>P.y?"down-right":C.yP.y?"down-left":C.yP.y?"down":"none"}getDirections(){return["up","right","down","left","down-left","down-right","up-right","up-left"]}},Zs=class{static create(P){switch(P){case 4:return new oT;case 8:return new hT}}},gu=class{constructor(P,C,A){this.backoffMs=P,this.maxRetries=C,this.onFinished=A,this.retries=0,this.elapsed=0}retry(P,C){this.shouldRetry()?(this.elapsed+=P,this.elapsed>=this.backoffMs&&(this.elapsed=0,this.retries++,C())):this.onFinished()}reset(){this.retries=0,this.elapsed=0}getMaxRetries(){return this.maxRetries}getBackoffMs(){return this.backoffMs}shouldRetry(){return this.maxRetries===-1||this.retries(P.WAIT="WAIT",P.RETRY="RETRY",P.STOP="STOP",P))(Bf||{}),Cr=class{constructor(P,{shortestPathAlgorithm:C="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=P,this.options={shortestPathAlgorithm:C,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(P,C){this.options.ignoreLayers&&(this.gridTilemap.fixCacheLayer(P.layer),C.layer=P.layer);let A=this.findShortestPathImpl(P,C);return this.gridTilemap.unfixCacheLayers(),A}getNeighbors(P,C){var A;return Zs.create((A=this.options.numberOfDirections)!=null?A:4).neighbors(P.position).map(I=>{let B=P.layer;return this.options.ignoreLayers||(B=this.gridTilemap.getTransition(I,P.layer)),{position:I,layer:B||P.layer}}).filter(I=>!this.isBlocking(P,I)||this.options.ignoreBlockedTarget&&Gt.equal(I,C))}getTransition(P,C){if(!this.options.ignoreLayers)return this.gridTilemap.getTransition(P,C)}getCosts(P,C){if(!this.options.considerCosts)return 1;let A=Qe(C.position,P);return this.gridTilemap.getTileCosts(C,A)}isBlocking(P,C){return!(this.options.ignoreMapBounds||this.gridTilemap.isInRange(C.position))||!this.options.isPositionAllowed(C.position,C.layer)||!this.options.ignoreTiles&&this.hasBlockingTileFrom(P,C,this.options.pathWidth,this.options.pathHeight,this.options.ignoreMapBounds,this.gridTilemap)?!0:this.hasBlockingCharFrom(P,C,this.options.pathWidth,this.options.pathHeight,this.options.collisionGroups,this.ignoredCharsSet,this.gridTilemap)}distance(P,C){return(this.options.numberOfDirections===4?ri.manhattanDistance:ri.chebyshevDistance)(P,C)}getTilePosInDir(P,C){return this.options.ignoreLayers?{position:P.position.add(qi(this.gridTilemap.toMapDirection(C))),layer:P.layer}:this.gridTilemap.getTilePosInDirection(P,C)}getReverseNeighbors(P,C){var A;let I=Zs.create((A=this.options.numberOfDirections)!=null?A:4).neighbors(P.position),B;if(!this.options.ignoreLayers){let b=this.gridTilemap.getReverseTransitions(P.position,P.layer);B=b?[...b]:void 0}return I.map(b=>B?B.map(c=>({position:b,layer:c||P.layer})):[{position:b,layer:P.layer}]).flat().filter(b=>!this.isBlocking(b,P)||this.options.ignoreBlockedTarget&&Gt.equal(P,C))}hasBlockingCharFrom(P,C,A,I,B,b,c){if(A===1&&I===1)return c.hasBlockingChar(C.position,C.layer,B,b);let m=a=>c.hasBlockingChar(a,C.layer,B,b),t=Qe(P.position,C.position);return this.isBlockingMultiTile(P,t,A,I,m)}hasBlockingTileFrom(P,C,A,I,B,b){if(A===1&&I===1)return b.hasBlockingTile(C.position,C.layer,Qe(C.position,P.position),B);let c=Qe(P.position,C.position),m=t=>b.hasBlockingTile(t,C.layer,c,B);return this.isBlockingMultiTile(P,c,A,I,m)}isBlockingMultiTile(P,C,A,I,B){let b={src:new ut(P.position.x+A,P.position.y),dest:new ut(P.position.x+A,P.position.y+I-1)},c={src:new ut(P.position.x-1,P.position.y),dest:new ut(P.position.x-1,P.position.y+I-1)},m={src:new ut(P.position.x,P.position.y-1),dest:new ut(P.position.x+A-1,P.position.y-1)},t={src:new ut(P.position.x,P.position.y+I),dest:new ut(P.position.x+A-1,P.position.y+I)};switch(C){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(P,C){for(let A=P.src.x;A<=P.dest.x;A++)for(let I=P.src.y;I<=P.dest.y;I++)if(C(new ut(A,I)))return!0;return!1}},lT=Zu(vo(),1),uT=class extends Cr{findShortestPathImpl(P,C){let A=this.shortestPathBfs(P,C);return{path:this.returnPath(A.previous,P,C),closestToTarget:A.closestToTarget,steps:A.steps,maxPathLengthReached:A.maxPathLengthReached,algorithmUsed:"A_STAR"}}shortestPathBfs(P,C){let A=new Map,I=new Map,B=new Map,b=new lT.MinFibonacciHeap((a,v)=>Gs(B,a)-Gs(B,v)),c=P,m=this.distance(P.position,C.position),t=0;for(b.push(P),I.set(Gt.toString(P),0),B.set(Gt.toString(P),this.distance(P.position,C.position));b.size>0;){let a=b.pop();if(!a)break;t++;let v=this.distance(a.position,C.position);if(vthis.options.maxPathLength)return{previous:new Map,closestToTarget:c,steps:t,maxPathLengthReached:!0};for(let o of this.getNeighbors(a,C)){let r=Gs(I,a)+this.getCosts(a.position,o),n=Gt.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,C.position);if(othis.lastDist)}step(P,C,A){var I;this.lastDist=A;for(let B of P){let b=Gt.toString(B);if(!this.visited.has(b)){this.previous.set(b,C),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,C.position);if(ozs(this.f,B)-zs(this.f,b)),this.openSet.push(P);let I=Gt.toString(P);for(this.g.set(I,0),this.f.set(I,this.distance(P.position,C.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++,Gt.equal(B,C))return{previous:A,closestToTarget:C,steps:this.steps,maxPathLengthReached:!1};if(zs(this.g,B)+1>this.options.maxPathLength)return{previous:new Map,closestToTarget:this.closestToTarget,steps:this.steps,maxPathLengthReached:!0};this.updateClosestToTarget(B,C);for(let b of this.getNeighborsInternal(B,A.get(Gt.toString(B)),C)){let c=Gt.toString(b.p),m=zs(this.g,B)+b.dist;(!this.g.has(c)||m({p:b,dist:1}));let I=this.prune(C,P).filter(b=>!this.isBlockingIgnoreTarget(P,b,A)).map(b=>{let c=this.getTransition(b.position,P.layer);return{position:b.position,layer:c||P.layer}}),B=[];for(let b of I)if(this.isHorizontal(P.position,b.position))B.push({p:b,dist:1});else{let c=this.jump(P,b,A,1,Qe(P.position,b.position));c&&B.push(c)}return B}isBlockingIgnoreTarget(P,C,A){return this.isBlocking(P,C)&&!(this.options.ignoreBlockedTarget&&Gt.equal(C,A))}jump(P,C,A,I,B){if(!this.isBlockingIgnoreTarget(P,C,A))return Gt.equal(C,A)?{p:C,dist:I}:I>=this.maxJumpSize?{p:C,dist:I}:this.getTransition(C.position,P.layer)!==void 0?{p:C,dist:I}:this.hasForced(P,C)?{p:C,dist:I}:(this.updateClosestToTarget(C,A),this.jump(C,this.getTilePosInDir(C,B),A,I+1,B))}isHorizontal(P,C){return P.y===C.y}getForced(P,C,A,I,B,b){let c=[],m=P;return(this.blockOrTrans(m,A)||this.blockOrTrans(A,I))&&this.addIfNotBlocked(c,C,I),(this.blockOrTrans(m,B)||this.blockOrTrans(B,b))&&this.addIfNotBlocked(c,C,b),c}hasForced(P,C){let{topLeft:A,downLeft:I,top:B,bottom:b}=this.normalizedPositions(P,C);return!!((this.blockOrTrans(P,I)||this.blockOrTrans(I,b))&&!this.blockOrTrans(C,b)||(this.blockOrTrans(P,A)||this.blockOrTrans(A,B))&&!this.blockOrTrans(C,B))}prune(P,C){let{right:A,top:I,bottom:B,downLeft:b,topLeft:c}=this.normalizedPositions(P,C);return this.isHorizontal(P.position,C.position)?[A,I,B]:[A,...this.getForced(P,C,b,B,c,I)]}normalizedPositions(P,C){return P.position.xC.position.x?{topLeft:{position:new ut(C.position.x+1,C.position.y+1),layer:C.layer},downLeft:{position:new ut(C.position.x+1,C.position.y-1),layer:C.layer},top:{position:new ut(C.position.x,C.position.y+1),layer:C.layer},bottom:{position:new ut(C.position.x,C.position.y-1),layer:C.layer},right:{position:new ut(C.position.x-1,C.position.y),layer:C.layer}}:P.position.y1?this.fillPath(B,b,I):I.push(b),B=b}return I.reverse()}fillPath(P,C,A){let I=P;do{let B=Qe(I.position,C.position);I=this.getTilePosInDir(I,B),A.push(I)}while(!ri.equal(I.position,C.position))}};function zs(P,C){var A;return(A=P.get(Gt.toString(C)))!=null?A:Number.MAX_VALUE}var dT=class{constructor(P,C,A,I={}){this.character=P,this.gridTilemap=C,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=ne(ne({},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=P,this.updateTarget(this.charToFollow.getTilePos().position,this.charToFollow.getTilePos().layer),this.charToFollow.positionChangeStarted().pipe(Je(this.character.autoMovementSet().pipe(zi(b=>b!==this),Ss(1)))).subscribe(({enterTile:b,enterLayer:c})=>{this.updateTarget(b,c)})}update(P){var C;(C=this.targetMovement)==null||C.update(P)}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 P=kn[this.options.facingDirection]+kn[this.charToFollow.getFacingDirection()],C=nf("up",P),A={x:this.charToFollow.getTilePos().position.x,y:this.charToFollow.getTilePos().position.y};return C==="right"?A.x+=this.charToFollow.getTileWidth()-1:C==="down"?A.y+=this.charToFollow.getTileWidth()-1:C==="down-left"?A.y+=this.charToFollow.getTileWidth()-1:C==="down-right"?(A.y+=this.charToFollow.getTileWidth()-1,A.x+=this.charToFollow.getTileWidth()-1):C==="up-right"&&(A.x+=this.charToFollow.getTileWidth()-1),this.gridTilemap.getTilePosInDirection({position:new ut(A),layer:this.charToFollow.getTilePos().layer},C).position}updateTarget(P,C){let A=this.options.facingDirection!=="none"&&this.options.distance===0;A&&(P=this.getFacingPos()),this.targetMovement=new Vf(this.character,this.gridTilemap,{position:new ut(P),layer:C},{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()]}})}},Su=class{static getRandomInt(P){return Math.floor(Math.random()*Math.floor(P))}},cT=class{constructor(P,C=0,A=-1){this.character=P,this.delay=C,this.radius=A,this.stepSize=0,this.delayLeft=this.delay,this.initialRow=P.getNextTilePos().position.y,this.initialCol=P.getNextTilePos().position.x,this.randomizeStepSize(),this.stepsWalked=0,this.currentMovementDirection="none",this.character.positionChangeStarted().pipe(Je(this.character.autoMovementSet().pipe(zi(I=>I!==this),Ss(1)))).subscribe(()=>{this.stepsWalked++}),this.distanceUtils=Zs.create(P.getNumberOfDirections())}update(P){if(this.shouldContinueWalkingCurrentDirection())this.character.move(this.currentMovementDirection);else if(this.delayLeft-=P,this.delayLeft<=0){this.delayLeft=this.delay;let C=this.getFreeRandomDirection();this.stepsWalked=0,this.character.move(C),this.currentMovementDirection=C,this.randomizeStepSize()}}getInfo(){return{type:"Random",config:{delay:this.delay,radius:this.radius}}}shouldContinueWalkingCurrentDirection(){return this.stepsWalked!this.character.isBlockingDirection(P)).filter(P=>this.isWithinRadius(P))}isWithinRadius(P){return this.radius==-1?!0:this.getDist(P)<=this.radius}getDist(P){return this.distanceUtils.distance(this.character.getNextTilePos().position.add(qi(P)),new ut(this.initialCol,this.initialRow))}getFreeRandomDirection(){let P=this.getFreeDirections();return P.length==0?"none":P[Su.getRandomInt(P.length)]}randomizeStepSize(){this.stepSize=Su.getRandomInt(this.radius)+1}};function vT(P,C){return P.filter(A=>{var I,B,b,c,m,t;return(I=C.labels)!=null&&I.withAllLabels?(B=C.labels)==null?void 0:B.withAllLabels.every(a=>A.hasLabel(a)):(b=C.labels)!=null&&b.withOneOfLabels?(c=C.labels)==null?void 0:c.withOneOfLabels.some(a=>A.hasLabel(a)):(m=C.labels)!=null&&m.withNoneLabels?!((t=C.labels)!=null&&t.withNoneLabels.some(a=>A.hasLabel(a))):!0})}var Gf="2.44.6",pT=class{constructor(P,C){this.collistionStrategy=P,this.collisionGroupRelation=C,this.tilePosToCharacters=new gT,this.charRemoved$=new ae}isCharBlockingAt(P,C,A,I=new Set,B=new Set){if(A.length===0)return!1;let b=this.tilePosToCharacters.get(P,C);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(P,C){for(let A of P)if(C.has(A))return!0;return!1}collidesWith(P,C){return this.collisionGroupRelation?(this.collisionGroupRelation.get(P)||new Set).has(C):P===C}getCharactersAt(P,C){return this.tilePosToCharacters.get(P,C)||new Set}addCharacter(P){this.addTilePositions(P.getTilePos(),P),this.addTilePositions(P.getNextTilePos(),P),this.addPositionChangeSub(P),this.addPositionChangeFinishedSub(P),this.addTilePosSetSub(P)}removeCharacter(P){let C=P.getId();this.charRemoved$.next(C),this.deleteTilePositions(P.getTilePos(),P),this.deleteTilePositions(P.getNextTilePos(),P)}add(P,C,A){let I=this.tilePosToCharacters.get(P,C);I||this.tilePosToCharacters.set(P,C,new Set([A])),I?.add(A)}addTilePosSetSub(P){P.tilePositionSet().pipe(Je(this.charRemoved(P.getId()))).subscribe(C=>{this.deleteTilePositions(P.getNextTilePos(),P),this.addTilePositions(C,P)})}charRemoved(P){var C;return(C=this.charRemoved$)==null?void 0:C.pipe(Ss(1),zi(A=>A==P))}addPositionChangeSub(P){P.positionChangeStarted().pipe(Je(this.charRemoved(P.getId())),this.posChangeToLayerPos()).subscribe(C=>{this.collistionStrategy==="BLOCK_ONE_TILE_AHEAD"&&this.deleteTilePositions(C.exit,P),this.addTilePositions(C.enter,P)})}addPositionChangeFinishedSub(P){P.positionChangeFinished().pipe(Je(this.charRemoved(P.getId())),this.posChangeToLayerPos()).subscribe(C=>{this.deleteTilePositions(C.exit,P),this.addTilePositions(C.enter,P)})}addTilePositions(P,C){this.forEachCharTile(P,C,(A,I)=>{this.add(new ut(A,I),P.layer,C)})}deleteTilePositions(P,C){this.forEachCharTile(P,C,(A,I)=>{var B;(B=this.tilePosToCharacters.get(new ut(A,I),P.layer))==null||B.delete(C)})}forEachCharTile(P,C,A){let I=P.position;for(let B=I.x;B({enter:{position:new ut(P.enterTile),layer:P.enterLayer},exit:{position:new ut(P.exitTile),layer:P.exitLayer}})))}posToString(P,C){return`${P.x}#${P.y}#${C}`}},gT=class{constructor(){this.memo=new Map}set(P,C,A){let I=this.memo.get(P.x);I||(I=new Map,this.memo.set(P.x,I));let B=I.get(P.y);B||(B=new Map,I.set(P.y,B)),B.set(C,A)}get(P,C){let A=this.memo.get(P.x);if(!A)return;let I=A.get(P.y);if(I)return I.get(C)}},So=class{constructor(P,C,A,I){this.x=P,this.y=C,this.width=A,this.height=I}getX(){return this.x}getY(){return this.y}getWidth(){return this.width}getHeight(){return this.height}isInRange(P){return P.x>=this.x&&P.x=this.y&&P.yA.isCharLayer());for(let A of[...C,void 0]){let I=this.tileCollisionCache.get(A?.getName());if(I===void 0){I=new Array(this.tilemap.getWidth());for(let B=0;B>C&1)==1}var Eu="ge_cost",zf=class Uf{constructor(C,A,I,B=void 0,b=!1){this.tilemap=C,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 pT(I,B);for(let c of xo())this.collidesPropNames.set(c,Uf.ONE_WAY_COLLIDE_PROP_PREFIX+c),this.tileCostPropNames.set(c,`${Eu}_${c}`);this.useTileCollisionCache&&(this.tileCollisionCache=new xT(C,this),this.tileCollisionCache.rebuild())}fixCacheLayer(C){var A;(A=this.tileCollisionCache)==null||A.fixLayer(C)}unfixCacheLayers(){var C;(C=this.tileCollisionCache)==null||C.unfixLayers()}addCharacter(C){this.characters.set(C.getId(),C);let A=C.getNextTilePos().layer;A===void 0?C.setTilePosition(Gi(ne({},C.getNextTilePos()),{layer:this.getLowestCharLayer()})):this.getCharLayerNames().includes(A)||console.warn(`Char layer '${A}' of character '${C.getId()}' is unknown.`),this.charBlockCache.addCharacter(C)}removeCharacter(C){let A=this.characters.get(C);A&&(this.charBlockCache.removeCharacter(A),this.characters.delete(C))}getCharacters(){return[...this.characters.values()]}getCharactersAt(C,A){return this.charBlockCache.getCharactersAt(C,A)}rebuildTileCollisionCache(C){var A;(A=this.tileCollisionCache)==null||A.rebuild(C)}hasBlockingTileUncached(C,A,I,B){if(!B&&this.hasNoTileUncached(C,A))return!0;let b=this.getCollisionRelevantLayers(A);for(let c of b)if(this.isLayerBlockingAt(c.getName(),C,I))return!0;return!1}hasBlockingTile(C,A,I,B){var b;let c=(b=this.tileCollisionCache)==null?void 0:b.isBlockingFrom(C.x,C.y,A,I,B);return c!==void 0?c:this.hasBlockingTileUncached(C,A,I,B)}getTransition(C,A){let I=this.transitions.get(C.toString());if(I)return I.get(A)}getReverseTransitions(C,A){let I=this.reverseTransitions.get(C.toString());if(I)return I.get(A)}setTransition(C,A,I){var B,b,c,m,t;this.transitions.has(C.toString())||this.transitions.set(C.toString(),new Map),this.reverseTransitions.has(C.toString())||this.reverseTransitions.set(C.toString(),new Map),(B=this.transitions.get(C.toString()))==null||B.set(A,I),(b=this.reverseTransitions.get(C.toString()))!=null&&b.has(I)||(c=this.reverseTransitions.get(C.toString()))==null||c.set(I,new Set),(t=(m=this.reverseTransitions.get(C.toString()))==null?void 0:m.get(I))==null||t.add(A)}getTransitions(){return new Map([...this.transitions].map(([C,A])=>[C,new Map(A)]))}getTileCosts(C,A){let I=this.getCollisionRelevantLayers(C.layer),B=1;for(let b of I)B=Math.max(B,this.getTileCostsForLayer(Gi(ne({},C),{layer:b.getName()}),A));return B}getTileCostsForLayer(C,A){let I=this.tilemap.getTileAt(C.position.x,C.position.y,C.layer);return A&&I?.getProperty(this.tileCostPropNames.get(A)||"")||I?.getProperty(Eu)||1}hasNoTileUncached(C,A){return!this.getCollisionRelevantLayers(A).some(I=>this.tilemap.hasTileAt(C.x,C.y,I.getName()))}hasNoTile(C,A){var I;let B=(I=this.tileCollisionCache)==null?void 0:I.hasTileAt(C.x,C.y,A);return B!==void 0?B:this.hasNoTileUncached(C,A)}hasBlockingChar(C,A,I,B=new Set,b=new Set){return this.charBlockCache.isCharBlockingAt(C,A,I,B,b)}isInRange(C){return new So(0,0,this.tilemap.getWidth(),this.tilemap.getHeight()).isInRange(C)}toMapDirection(C){return this.isIsometric()?S1(C):C}fromMapDirection(C){return this.isIsometric()?nf(C):C}isIsometric(){return this.tilemap.getOrientation()==="isometric"}getTilePosInDirection(C,A){let I=C.position.add(qi(this.toMapDirection(A))),B=this.getTransition(I,C.layer)||C.layer;return{position:I,layer:B}}invalidateFrameCache(){this.collisionRelevantLayersFrameCache.clear()}isLayerBlockingAt(C,A,I){let B=this.tilemap.getTileAt(A.x,A.y,C);return B?!!(B.getProperty(this.collisionTilePropertyName)||I&&B.getProperty(this.collidesPropNames.get(I)||"")):!1}getCharLayerIndexes(){return this.tilemap.getLayers().map((C,A)=>({layer:C,index:A})).filter(({layer:C})=>C.isCharLayer()).map(({index:C})=>C)}findPrevAndCharLayer(C){let A=this.getCharLayerIndexes(),I=this.tilemap.getLayers(),B=A.findIndex(b=>I[b].getProperty(Zn)==C);return B==0?{prevIndex:-1,charLayerIndex:A[B]}:{prevIndex:A[B-1],charLayerIndex:A[B]}}getCollisionRelevantLayers(C){if(!C)return this.tilemap.getLayers();let A=this.collisionRelevantLayersFrameCache.get(C);if(A)return A;let{prevIndex:I,charLayerIndex:B}=this.findPrevAndCharLayer(C),b=this.tilemap.getLayers().slice(I+1,B+1);return this.collisionRelevantLayersFrameCache.set(C,b),b}getLowestCharLayer(){for(let C of this.tilemap.getLayers())if(C.isCharLayer())return C.getProperty(Zn)}getCharLayerNames(){return this.tilemap.getLayers().filter(C=>C.isCharLayer()).map(C=>C.getProperty(Zn)).filter(TT)}};zf.ONE_WAY_COLLIDE_PROP_PREFIX="ge_collide_";var yT=zf;function TT(P){return P!=null}var ST=(P=>(P.REMOVED="REMOVED",P.ADDED="ADDED",P))(ST||{}),CT=(P=>(P.WAIT="WAIT",P.SKIP="SKIP",P.STOP="STOP",P))(CT||{}),ET=class{constructor(P,C){this.character=P,this.tilemap=C,this.queue=new qn,this.finished$=new ae,this.pathBlockedWaitElapsed=0,this.distanceUtils=Zs.create(P.getNumberOfDirections()),this.character.autoMovementSet().pipe(zi(A=>A!==this),Ss(1)).subscribe(()=>{this.queue.size()>0&&this.finishMovementTerminated(),this.finished$.complete()})}update(P){(!this.character.isMoving()||this.character.willCrossTileBorderThisUpdate(P))&&this.queue.size()>0&&this.moveCharOnPath(P)}getInfo(){return{type:"Queue"}}enqueue(P,C={}){var A,I,B;let b={pathBlockedStrategy:(A=C.pathBlockedStrategy)!=null?A:"STOP",pathBlockedWaitTimeoutMs:C?.pathBlockedWaitTimeoutMs||-1,ignoreInvalidPositions:(I=C.ignoreInvalidPositions)!=null?I:!1,skipInvalidPositions:(B=C.skipInvalidPositions)!=null?B:!1};for(let c of P){let m={command:c,config:b};if(ps(c)){this.queue.enqueue(m);continue}let t=this.queue.peekEnd(),a=t?.command;if(a||(a=this.character.getNextTilePos()),ps(a)){this.queue.enqueue(m);continue}let v=this.distanceUtils.distance(a.position,c.position)===1;(!C.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(P){let C=this.queue.peek();if(!C)return;let A=C.command,I=C.config;if(ps(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(P);return}else I.pathBlockedStrategy==="WAIT"&&I.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=P,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 P;this.queue.size()>0;){let C=(P=this.queue.peek())==null?void 0:P.command;if(ps(C)&&(C=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),C)),C&&this.isNeighborPos(C))return C;this.queue.dequeue()}}isLastMovement(){return this.queue.size()===0}isNeighborPos(P){let C=this.distanceUtils.distance(this.character.getNextTilePos().position,P.position)===1,A=this.tilemap.getTransition(P.position,this.character.getNextTilePos().layer);if(this.character.getNextTilePos().layer!==P.layer)return C&&A===P.layer;let I=A!==void 0&&A!==P.layer;return C&&!I}finishMovementTerminated(){this.finish("MOVEMENT_TERMINATED","New automatic movement has been set to character.")}finishInvalidNextPos(P){P?this.finish("INVALID_NEXT_POS",`Position ${this.posToStr(P)} 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(P){this.finish("PATH_BLOCKED",`Position ${this.posToStr(P)} is blocked.`)}finishBlockedWaitTimeout(P,C){this.finish("PATH_BLOCKED_WAIT_TIMEOUT",`Position ${this.posToStr(P)} is blocked and the wait timeout of ${C} ms has been exceeded.`)}finish(P,C="",A=this.character.getNextTilePos()){this.queue=new qn,this.finished$.next({position:A.position,result:P,description:C,layer:A.layer})}getDir(P,C){return this.tilemap.fromMapDirection(Qe(P,C))}posToStr(P){return`(${P.position.x}, ${P.position.y}, ${P.layer})`}},PT=class{constructor(P=!0){this.isCreatedInternal=!1,P&&console.log(`Using GridEngine v${Gf}`)}getCharLayer(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getTilePos().layer}getTransition(P,C){var A;return this.initGuard(),(A=this.gridTilemap)==null?void 0:A.getTransition(new ut(P),C)}setTransition(P,C,A){var I;return this.initGuard(),(I=this.gridTilemap)==null?void 0:I.setTransition(new ut(P),C,A)}create(P,C){this.isCreatedInternal=!0,this.gridCharacters=new Map;let A=this.setConfigDefaults(C);this.config=A,this.movementStopped$=new ae,this.movementStarted$=new ae,this.directionChanged$=new ae,this.positionChangeStarted$=new ae,this.positionChangeFinished$=new ae,this.queueMovementFinished$=new ae,this.charRemoved$=new ae,this.charAdded$=new ae,this.gridTilemap=new yT(P,this.config.collisionTilePropertyName,this.config.characterCollisionStrategy,this.recordToMap(this.config.collisionGroupRelation),this.config.cacheTileCollisions),this.addCharacters()}recordToMap(P){return P?new Map(Object.entries(P).map(([C,A])=>[C,new Set(A)])):void 0}getPosition(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getTilePos().position}move(P,C){this.moveChar(P,C)}moveRandomly(P,C=0,A=-1){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(P);if(!B)throw this.createCharUnknownErr(P);let b=new cT(B,C,A);B.setMovement(b)}getMovement(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);let I=A.getMovement();return I?I.getInfo():{type:"None"}}moveTo(P,C,A){var I;let B=this.assembleMoveToConfig(A);this.initGuard();let b=(I=this.gridCharacters)==null?void 0:I.get(P);if(!b)throw this.createCharUnknownErr(P);if(!this.gridTilemap)throw this.createUninitializedErr();let c=new Vf(b,this.gridTilemap,{position:new ut(C),layer:A?.targetLayer||b.getNextTilePos().layer},{distance:0,config:B});return b.setMovement(c),c.finishedObs().pipe(Ws(m=>({charId:P,position:m.position,result:m.result,description:m.description,layer:m.layer})))}stopMovement(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);A.setMovement(void 0)}setSpeed(P,C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(P);if(!I)throw this.createCharUnknownErr(P);I.setSpeed(C)}getSpeed(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getSpeed()}collidesWithTiles(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.collidesWithTiles()}update(P,C){var A;if(this.isCreatedInternal&&this.gridCharacters)for(let[I,B]of this.gridCharacters)B.update(C);(A=this.gridTilemap)==null||A.invalidateFrameCache()}addCharacter(P){var C,A,I,B,b;if(!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let c={speed:P.speed||4,tilemap:this.gridTilemap,collidesWithTiles:!0,collisionGroups:["geDefault"],ignoreCollisionGroups:[],charLayer:P.charLayer,facingDirection:P.facingDirection,labels:P.labels,numberOfDirections:(C=P.numberOfDirections)!=null?C:this.config.numberOfDirections,tileWidth:P.tileWidth,tileHeight:P.tileHeight};typeof P.collides=="boolean"?P.collides===!1&&(c.collidesWithTiles=!1,c.collisionGroups=[]):P.collides!==void 0&&(P.collides.collidesWithTiles===!1&&(c.collidesWithTiles=!1),P.collides.collisionGroups&&(c.collisionGroups=P.collides.collisionGroups),P.collides.ignoreCollisionGroups&&(c.ignoreCollisionGroups=P.collides.ignoreCollisionGroups),c.ignoreMissingTiles=(I=(A=P.collides)==null?void 0:A.ignoreMissingTiles)!=null?I:!1);let m=new nT(P.id,c);P.startPosition&&m.setTilePosition({position:new ut(P.startPosition),layer:m.getTilePos().layer}),(B=this.gridCharacters)==null||B.set(P.id,m),this.gridTilemap.addCharacter(m);let t=m.getId();m.movementStopped().pipe(Je(this.charRemoved(t))).subscribe(a=>{var v;(v=this.movementStopped$)==null||v.next({charId:t,direction:a})}),m.movementStarted().pipe(Je(this.charRemoved(t))).subscribe(a=>{var v;(v=this.movementStarted$)==null||v.next({charId:t,direction:a})}),m.directionChanged().pipe(Je(this.charRemoved(t))).subscribe(a=>{var v;(v=this.directionChanged$)==null||v.next({charId:t,direction:a})}),m.positionChangeStarted().pipe(Je(this.charRemoved(t))).subscribe(a=>{var v;(v=this.positionChangeStarted$)==null||v.next(ne({charId:t},a))}),m.positionChangeFinished().pipe(Je(this.charRemoved(t))).subscribe(a=>{var v;(v=this.positionChangeFinished$)==null||v.next(ne({charId:t},a))}),(b=this.charAdded$)==null||b.next(t)}hasCharacter(P){var C;return this.initGuard(),!!((C=this.gridCharacters)!=null&&C.has(P))}removeCharacter(P){var C,A,I,B;if(this.initGuard(),!((C=this.gridCharacters)!=null&&C.get(P)))throw this.createCharUnknownErr(P);(A=this.gridTilemap)==null||A.removeCharacter(P),(I=this.gridCharacters)==null||I.delete(P),(B=this.charRemoved$)==null||B.next(P)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters)for(let P of this.gridCharacters.keys())this.removeCharacter(P)}getAllCharacters(P){if(this.initGuard(),!this.gridCharacters)return[];let C=[...this.gridCharacters.values()];return(P?vT(C,P):C).map(A=>A.getId())}getLabels(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getLabels()}addLabels(P,C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(P);if(!I)throw this.createCharUnknownErr(P);I.addLabels(C)}removeLabels(P,C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(P);if(!I)throw this.createCharUnknownErr(P);I.removeLabels(C)}clearLabels(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);A.clearLabels()}follow(P,C,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(P),r=(b=this.gridCharacters)==null?void 0:b.get(C);if(!o)throw this.createCharUnknownErr(P);if(!r)throw this.createCharUnknownErr(C);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(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.isMoving()}getFacingDirection(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getFacingDirection()}getFacingPosition(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);let I=A.getFacingPosition();return{x:I.x,y:I.y}}turnTowards(P,C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(P);if(!I)throw this.createCharUnknownErr(P);return I.turnTowards(C)}getCharactersAt(P,C){if(this.initGuard(),!this.gridTilemap)return[];let A=this.gridTilemap.getCharactersAt(new ut(P),C);return Array.from(A).map(I=>I.getId())}setPosition(P,C,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(P);if(!B)throw this.createCharUnknownErr(P);A||B.setTilePosition({position:new ut(C),layer:B.getTilePos().layer}),B.setTilePosition({position:new ut(C),layer:A})}isBlocked(P,C,A=["geDefault"]){var I,B;this.initGuard();let b=new ut(P);return!!((I=this.gridTilemap)!=null&&I.hasBlockingTile(b,C)||(B=this.gridTilemap)!=null&&B.hasBlockingChar(b,C,A))}isTileBlocked(P,C){var A;return this.initGuard(),!!((A=this.gridTilemap)!=null&&A.hasBlockingTile(new ut(P),C))}getCollisionGroups(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getCollisionGroups()||[]}setCollisionGroups(P,C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(P);if(!I)throw this.createCharUnknownErr(P);I.setCollisionGroups(C)}getIgnoreCollisionGroups(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getIgnoreCollisionGroups()||[]}setIgnoreCollisionGroups(P,C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(P);if(!I)throw this.createCharUnknownErr(P);I.setIgnoreCollisionGroups(C)}getTilePosInDirection(P,C,A){if(!this.gridTilemap)throw this.createUninitializedErr();let I=this.gridTilemap.getTilePosInDirection({position:new ut(P),layer:C},A);return{position:I.position.toPosition(),charLayer:I.layer}}findShortestPath(P,C,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 Xf(this.gridTilemap).findShortestPath(Gt.toInternal(P),Gt.toInternal(C),Gi(ne({},A),{shortestPathAlgorithm:I}));return{path:c.path.map(Gt.fromInternal),closestToTarget:c.closestToTarget?Gt.fromInternal(c.closestToTarget):void 0,reachedMaxPathLength:!1,steps:c.steps}}steppedOn(P,C,A){return this.positionChangeFinished().pipe(zi(I=>P.includes(I.charId)&&C.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(Ws(P=>({charId:P,action:"ADDED"})),sT(this.charRemoved$.pipe(Ws(P=>({charId:P,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(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getMovementProgress()}rebuildTileCollisionCache(P,C,A,I){var B;(B=this.gridTilemap)==null||B.rebuildTileCollisionCache(new So(P,C,A,I))}addQueueMovements(P,C,A){var I,B;this.initGuard();let b=(I=this.gridCharacters)==null?void 0:I.get(P);if(!b)throw this.createCharUnknownErr(P);if(!this.gridTilemap)throw this.createUninitializedErr();let c;((B=b?.getMovement())==null?void 0:B.getInfo().type)==="Queue"?c=b.getMovement():(c=new ET(b,this.gridTilemap),b.setMovement(c),c.finished().pipe(Je(_1(this.charRemoved(P),b.autoMovementSet()))).subscribe(m=>{var t;(t=this.queueMovementFinished$)==null||t.next(ne({charId:P},m))})),c.enqueue(C.map(m=>ps(m)?m:{position:new ut(m.position),layer:m.charLayer}),A)}queueMovementFinished(){if(!this.queueMovementFinished$)throw this.createUninitializedErr();return this.queueMovementFinished$}getEnqueuedMovements(P){var C,A;this.initGuard();let I=(C=this.gridCharacters)==null?void 0:C.get(P);if(!I)throw this.createCharUnknownErr(P);return((A=I.getMovement())==null?void 0:A.getInfo().type)==="Queue"?I.getMovement().peekAll().map(B=>({command:ps(B.command)?B.command:Gt.fromInternal(B.command),config:B.config})):[]}clearEnqueuedMovements(P){var C,A;this.initGuard();let I=(C=this.gridCharacters)==null?void 0:C.get(P);if(!I)throw this.createCharUnknownErr(P);((A=I.getMovement())==null?void 0:A.getInfo().type)==="Queue"&&I.getMovement().clear()}getTileCost(P,C,A){var I,B;return this.initGuard(),(B=(I=this.gridTilemap)==null?void 0:I.getTileCosts({position:new ut(P),layer:C},A))!=null?B:1}getState(){let P=[];if(this.gridCharacters)for(let[C,A]of this.gridCharacters.entries())P.push({id:C,position:Gt.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:P}}setState(P){if(this.gridCharacters)for(let C of P.characters){let A=this.gridCharacters.get(C.id);if(A){let I=A.getTilePos();Gt.equal(I,Gt.toInternal(C.position))||A.setTilePosition(Gt.toInternal(C.position)),A.setSpeed(C.speed),A.turnTowards(C.facingDirection),C.collisionConfig.collisionGroups&&A.setCollisionGroups(C.collisionConfig.collisionGroups),C.collisionConfig.collidesWithTiles!==void 0&&A.setCollidesWithTiles(C.collisionConfig.collidesWithTiles),C.collisionConfig.ignoreMissingTiles!==void 0&&A.setIgnoreMissingTiles(C.collisionConfig.ignoreMissingTiles),A.setMovementProgress(C.movementProgress),A.clearLabels(),A.addLabels(C.labels)}}}charRemoved(P){var C;if(!this.charRemoved$)throw this.createUninitializedErr();return(C=this.charRemoved$)==null?void 0:C.pipe(Ss(1),zi(A=>A==P))}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var P;(P=this.config)==null||P.characters.forEach(C=>this.addCharacter(C))}moveChar(P,C){var A,I,B;this.initGuard();let b=(A=this.gridCharacters)==null?void 0:A.get(P);if(!b)throw this.createCharUnknownErr(P);if(b.getNumberOfDirections()===4){if(!((I=this.gridTilemap)!=null&&I.isIsometric())&&Vs(C)){console.warn(`GridEngine: Character '${P}' can't be moved '${C}' in 4 direction mode.`);return}else if((B=this.gridTilemap)!=null&&B.isIsometric()&&!Vs(C)){console.warn(`GridEngine: Character '${P}' can't be moved '${C}' in 4 direction isometric mode.`);return}}b.move(C)}createCharUnknownErr(P){return new Error(`Character unknown: ${P}`)}assembleMoveToConfig(P={}){let C=Gi(ne({},P),{noPathFoundStrategy:"STOP",pathBlockedStrategy:"WAIT"});return P!=null&&P.noPathFoundStrategy&&(Object.values(If).includes(P.noPathFoundStrategy)?C.noPathFoundStrategy=P.noPathFoundStrategy:console.warn(`GridEngine: Unknown NoPathFoundStrategy '${P.noPathFoundStrategy}'. Falling back to 'STOP'`)),P!=null&&P.pathBlockedStrategy&&(Object.values(Bf).includes(P.pathBlockedStrategy)?C.pathBlockedStrategy=P.pathBlockedStrategy:console.warn(`GridEngine: Unknown PathBlockedStrategy '${P.pathBlockedStrategy}'. Falling back to 'WAIT'`)),C}setConfigDefaults(P){return ne({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",cacheTileCollisions:!1},P)}},AT=class extends Nf{constructor(P,C={}){super(P,C),this.jumpCache=new Pu}findShortestPathImpl(P,C){return this.jumpCache=new Pu,super.findShortestPathImpl(P,C)}getNeighborsInternal(P,C,A){if(!C||P.layer!==C.layer)return this.getNeighbors(P,A).map(b=>({p:b,dist:1}));let I=this.prune(C,P).map(b=>{let c=this.getTransition(b.position,P.layer);return{position:b.position,layer:c||P.layer}}),B=[];for(let b of I){let c=this.jump(P,b,A,1,Qe(P.position,b.position));c&&(c.dist=this.distance(P.position,c.p.position),B.push(c))}return B}getForced(P,C){let A=[],{topLeft:I,downLeft:B,top:b,bottom:c,topRight:m,downRight:t}=this.normalizedPositions(P,C),a=Qe(P.position,C.position);return Vs(a)?(this.blockOrTrans(P,I)&&(this.addIfNotBlocked(A,C,b),this.addIfNotBlocked(A,C,m),this.blockOrTrans(B,I)&&this.addIfNotBlocked(A,C,I)),this.blockOrTrans(P,B)&&(this.addIfNotBlocked(A,C,c),this.addIfNotBlocked(A,C,t),this.blockOrTrans(I,B)&&this.addIfNotBlocked(A,C,B)),this.blockOrTrans(I,b)&&this.addIfNotBlocked(A,C,b),this.blockOrTrans(B,c)&&this.addIfNotBlocked(A,C,c),this.blockOrTrans(I,m)&&this.addIfNotBlocked(A,C,m),this.blockOrTrans(B,t)&&this.addIfNotBlocked(A,C,t)):((this.blockOrTrans(P,b)||this.blockOrTrans(b,m))&&this.addIfNotBlocked(A,C,m),(this.blockOrTrans(P,c)||this.blockOrTrans(c,t))&&this.addIfNotBlocked(A,C,t),this.blockOrTrans(P,I)&&this.blockOrTrans(P,b)&&(this.addIfNotBlocked(A,C,b),this.addIfNotBlocked(A,C,I)),this.blockOrTrans(P,B)&&this.blockOrTrans(P,c)&&(this.addIfNotBlocked(A,C,c),this.addIfNotBlocked(A,C,B)),this.blockOrTrans(I,b)&&this.blockOrTrans(P,b)&&this.addIfNotBlocked(A,C,b),this.blockOrTrans(B,c)&&this.blockOrTrans(P,c)&&this.addIfNotBlocked(A,C,c)),A}hasForced(P,C){let{topLeft:A,downLeft:I,top:B,bottom:b,topRight:c,downRight:m}=this.normalizedPositions(P,C),t=Qe(P.position,C.position);if(Vs(t)){if(this.blockOrTrans(P,A)&&(!this.blockOrTrans(C,B)||!this.blockOrTrans(C,c)||this.blockOrTrans(I,A)&&!this.blockOrTrans(C,A))||this.blockOrTrans(P,I)&&(!this.blockOrTrans(C,b)||!this.blockOrTrans(C,m)||this.blockOrTrans(A,I)&&!this.blockOrTrans(C,I))||this.blockOrTrans(A,B)&&!this.blockOrTrans(C,B)||this.blockOrTrans(I,b)&&!this.blockOrTrans(C,b)||this.blockOrTrans(A,c)&&!this.blockOrTrans(C,c)||this.blockOrTrans(I,m)&&!this.blockOrTrans(C,m))return!0}else if((this.blockOrTrans(P,B)||this.blockOrTrans(B,c))&&!this.blockOrTrans(C,c)||(this.blockOrTrans(P,b)||this.blockOrTrans(b,m))&&!this.blockOrTrans(C,m)||this.blockOrTrans(P,A)&&this.blockOrTrans(P,B)&&(!this.blockOrTrans(C,B)||!this.blockOrTrans(C,A))||this.blockOrTrans(P,I)&&this.blockOrTrans(P,b)&&(!this.blockOrTrans(C,b)||!this.blockOrTrans(C,I))||this.blockOrTrans(A,B)&&this.blockOrTrans(P,B)&&!this.blockOrTrans(C,B)||this.blockOrTrans(I,b)&&this.blockOrTrans(P,b)&&!this.blockOrTrans(C,b))return!0;return!1}prune(P,C){let{top:A,right:I,topRight:B,downRight:b,bottom:c}=this.normalizedPositions(P,C),m=this.getForced(P,C),t=Qe(P.position,C.position);return Vs(t)?[A,I,B,b,c,...m]:[I,...m]}jump(P,C,A,I,B){let b=this.jumpCache.get(P,C);if(b!==null)return b;if(this.isBlocking(P,C)&&!(Gt.equal(C,A)&&this.options.ignoreBlockedTarget)){this.jumpCache.set(P,C,void 0);return}if(Gt.equal(C,A))return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(I>=this.maxJumpSize)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(this.getTransition(C.position,P.layer)!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(this.hasForced(P,C))return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(this.updateClosestToTarget(C,A),B==="up-left"){if(this.jump(C,this.getTilePosInDir(C,"up"),A,I+1,"up")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(this.jump(C,this.getTilePosInDir(C,"left"),A,I+1,"left")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0}}else if(B==="down-left"){if(this.jump(C,this.getTilePosInDir(C,"down"),A,I+1,"down")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(this.jump(C,this.getTilePosInDir(C,"left"),A,I+1,"left")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0}}else if(B==="up-right"){if(this.jump(C,this.getTilePosInDir(C,"up"),A,I+1,"up")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(this.jump(C,this.getTilePosInDir(C,"right"),A,I+1,"right")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0}}else if(B==="down-right"){if(this.jump(C,this.getTilePosInDir(C,"down"),A,I+1,"down")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(this.jump(C,this.getTilePosInDir(C,"right"),A,I+1,"right")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0}}let c=this.jump(C,this.getTilePosInDir(C,B),A,I+1,B);return this.jumpCache.set(P,C,c),c}normalizedPositions(P,C){return P.position.xC.position.x&&P.position.y===C.position.y?{topLeft:{position:new ut(C.position.x+1,C.position.y+1),layer:C.layer},downLeft:{position:new ut(C.position.x+1,C.position.y-1),layer:C.layer},top:{position:new ut(C.position.x,C.position.y+1),layer:C.layer},bottom:{position:new ut(C.position.x,C.position.y-1),layer:C.layer},right:{position:new ut(C.position.x-1,C.position.y),layer:C.layer},topRight:{position:new ut(C.position.x-1,C.position.y+1),layer:C.layer},downRight:{position:new ut(C.position.x-1,C.position.y-1),layer:C.layer}}:P.position.yC.position.y&&P.position.x===C.position.x?{topLeft:{position:new ut(C.position.x-1,C.position.y+1),layer:C.layer},downLeft:{position:new ut(C.position.x+1,C.position.y+1),layer:C.layer},top:{position:new ut(C.position.x-1,C.position.y),layer:C.layer},bottom:{position:new ut(C.position.x+1,C.position.y),layer:C.layer},right:{position:new ut(C.position.x,C.position.y-1),layer:C.layer},topRight:{position:new ut(C.position.x-1,C.position.y-1),layer:C.layer},downRight:{position:new ut(C.position.x+1,C.position.y-1),layer:C.layer}}:P.position.yC.position.x?{topLeft:{position:new ut(C.position.x+1,C.position.y),layer:C.layer},downLeft:{position:new ut(C.position.x,C.position.y-1),layer:C.layer},top:{position:new ut(C.position.x+1,C.position.y+1),layer:C.layer},bottom:{position:new ut(C.position.x-1,C.position.y-1),layer:C.layer},right:{position:new ut(C.position.x-1,C.position.y+1),layer:C.layer},topRight:{position:new ut(C.position.x,C.position.y+1),layer:C.layer},downRight:{position:new ut(C.position.x-1,C.position.y),layer:C.layer}}:P.position.y>C.position.y&&P.position.x(P.SUCCESS="SUCCESS",P.NO_PATH_FOUND_MAX_RETRIES_EXCEEDED="NO_PATH_FOUND_MAX_RETRIES_EXCEEDED",P.PATH_BLOCKED_MAX_RETRIES_EXCEEDED="PATH_BLOCKED_MAX_RETRIES_EXCEEDED",P.PATH_BLOCKED="PATH_BLOCKED",P.NO_PATH_FOUND="NO_PATH_FOUND",P.PATH_BLOCKED_WAIT_TIMEOUT="PATH_BLOCKED_WAIT_TIMEOUT",P.MOVEMENT_TERMINATED="MOVEMENT_TERMINATED",P.MAX_PATH_LENGTH_REACHED="MAX_PATH_LENGTH_REACHED",P))(wT||{}),Vf=class{constructor(P,C,A,{config:I,ignoreBlockedTarget:B=!1,distance:b=0}={}){this.character=P,this.tilemap=C,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 bf(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 gu(I?.noPathFoundRetryBackoffMs||200,I?.noPathFoundMaxRetries||-1,()=>{this.stop("NO_PATH_FOUND_MAX_RETRIES_EXCEEDED")}),this.pathBlockedRetryable=new gu(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=Zs.create(P.getNumberOfDirections()),this.pathBlockedWaitTimeoutMs=I?.pathBlockedWaitTimeoutMs||-1,this.ignoredChars=(m=I?.ignoredChars)!=null?m:[],this.finished$=new ae,this.setCharacter(P)}setPathBlockedStrategy(P){this.pathBlockedStrategy=P}getPathBlockedStrategy(){return this.pathBlockedStrategy}setCharacter(P){this.character=P,this.noPathFoundRetryable.reset(),this.pathBlockedRetryable.reset(),this.pathBlockedWaitElapsed=0,this.calcShortestPath(),this.character.autoMovementSet().pipe(zi(C=>C!==this),Ss(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(P){var C,A,I,B;this.stopped||(this.noPathFound()&&(this.noPathFoundStrategy==="RETRY"?this.noPathFoundRetryable.retry(P,()=>this.calcShortestPath()):this.noPathFoundStrategy==="STOP"&&this.stop("NO_PATH_FOUND")),this.updatePosOnPath(),this.isBlocking((C=this.nextTileOnPath())==null?void 0:C.position,(A=this.character)==null?void 0:A.getNextTilePos().layer)?this.applyPathBlockedStrategy(P):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(P=>Gt.fromInternal(P))},config:{algorithm:this.shortestPathAlgorithm,ignoreBlockedTarget:this.ignoreBlockedTarget,distance:this.distance,targetPos:Gt.fromInternal(this.targetPos),noPathFoundStrategy:this.noPathFoundStrategy,pathBlockedStrategy:this.pathBlockedStrategy,noPathFoundRetryBackoffMs:this.noPathFoundRetryable.getBackoffMs(),noPathFoundMaxRetries:this.noPathFoundRetryable.getMaxRetries()}}}resultToReason(P){switch(P){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(P){this.pathBlockedStrategy==="RETRY"?this.pathBlockedRetryable.retry(P,()=>{let C=this.getShortestPath();C.path.length>0&&this.calcShortestPath(C)}):this.pathBlockedStrategy==="STOP"?this.stop("PATH_BLOCKED"):this.pathBlockedStrategy==="WAIT"&&this.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=P,this.pathBlockedWaitElapsed>=this.pathBlockedWaitTimeoutMs&&this.stop("PATH_BLOCKED_WAIT_TIMEOUT"))}moveCharOnPath(){let P=this.nextTileOnPath();if(!P)return;let C=this.getDir(this.character.getNextTilePos().position,P.position);this.character.move(C)}nextTileOnPath(){return this.shortestPath[this.posOnPath+1]}stop(P){this.finished$.next({position:this.character.getTilePos().position,result:P,description:this.resultToReason(P),layer:this.character.getTilePos().layer}),this.finished$.complete(),this.stopped=!0}turnTowardsTarget(){let P=this.shortestPath[this.posOnPath+1],C=this.getDir(this.character.getNextTilePos().position,P.position);this.character.turnTowards(C)}existsDistToTarget(){return this.posOnPath=this.shortestPath.length-1}updatePosOnPath(){let P=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(P,C){let A=C.findShortestPath(this.character.getNextTilePos(),P,this.getPathfindingOptions()).path,I=this.distanceUtils.distance(P.position,this.targetPos.position);return{path:A,distOffset:I}}getDir(P,C){return this.tilemap.fromMapDirection(this.distanceUtils.direction(P,C))}},RT=Object.create,Wf=Object.defineProperty,FT=Object.getOwnPropertyDescriptor,LT=Object.getOwnPropertyNames,OT=Object.getPrototypeOf,DT=Object.prototype.hasOwnProperty,IT=(P,C)=>()=>(C||P((C={exports:{}}).exports,C),C.exports),BT=(P,C,A,I)=>{if(C&&typeof C=="object"||typeof C=="function")for(let B of LT(C))!DT.call(P,B)&&B!==A&&Wf(P,B,{get:()=>C[B],enumerable:!(I=FT(C,B))||I.enumerable});return P},Co=(P,C,A)=>(A=P!=null?RT(OT(P)):{},BT(C||!P||!P.__esModule?Wf(A,"default",{value:P,enumerable:!0}):A,P)),Eo=IT((P,C)=>{(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,S="...",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]",j="[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]",Et="[object Proxy]",St="[object RegExp]",Ct="[object Set]",ct="[object String]",Tt="[object Symbol]",pt="[object Undefined]",At="[object WeakMap]",Dt="[object WeakSet]",Kt="[object ArrayBuffer]",Nt="[object DataView]",Wt="[object Float32Array]",It="[object Float64Array]",ee="[object Int8Array]",Zt="[object Int16Array]",he="[object Int32Array]",ue="[object Uint8Array]",Te="[object Uint8ClampedArray]",_e="[object Uint16Array]",ti="[object Uint32Array]",fi=/\b__p \+= '';/g,di=/\b(__p \+=) '' \+/g,ci=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Po=/&(?:amp|lt|gt|quot|#39);/g,Ao=/[&<>"']/g,Jf=RegExp(Po.source),Qf=RegExp(Ao.source),kf=/<%-([\s\S]+?)%>/g,qf=/<%([\s\S]+?)%>/g,Mo=/<%=([\s\S]+?)%>/g,_f=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,td=/^\w*$/,ed=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Er=/[\\^$.*+?()[\]{}|]/g,id=RegExp(Er.source),Pr=/^\s+/,sd=/\s/,nd=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,rd=/\{\n\/\* \[wrapped with (.+)\] \*/,ad=/,? & /,od=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hd=/[()=,{}\[\]\/\s]/,ld=/\\(\\)?/g,ud=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,wo=/\w*$/,fd=/^[-+]0x[0-9a-f]+$/i,dd=/^0b[01]+$/i,cd=/^\[object .+?Constructor\]$/,vd=/^0o[0-7]+$/i,pd=/^(?:0|[1-9]\d*)$/,gd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qs=/($^)/,md=/['\n\r\u2028\u2029\\]/g,ks="\\ud800-\\udfff",xd="\\u0300-\\u036f",yd="\\ufe20-\\ufe2f",Td="\\u20d0-\\u20ff",Ro=xd+yd+Td,Fo="\\u2700-\\u27bf",Lo="a-z\\xdf-\\xf6\\xf8-\\xff",Sd="\\xac\\xb1\\xd7\\xf7",Cd="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ed="\\u2000-\\u206f",Pd=" \\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",Oo="A-Z\\xc0-\\xd6\\xd8-\\xde",Do="\\ufe0e\\ufe0f",Io=Sd+Cd+Ed+Pd,Ar="['’]",Ad="["+ks+"]",Bo="["+Io+"]",qs="["+Ro+"]",bo="\\d+",Md="["+Fo+"]",No="["+Lo+"]",Go="[^"+ks+Io+bo+Fo+Lo+Oo+"]",Mr="\\ud83c[\\udffb-\\udfff]",wd="(?:"+qs+"|"+Mr+")",zo="[^"+ks+"]",wr="(?:\\ud83c[\\udde6-\\uddff]){2}",Rr="[\\ud800-\\udbff][\\udc00-\\udfff]",es="["+Oo+"]",Uo="\\u200d",Xo="(?:"+No+"|"+Go+")",Rd="(?:"+es+"|"+Go+")",Vo="(?:"+Ar+"(?:d|ll|m|re|s|t|ve))?",Wo="(?:"+Ar+"(?:D|LL|M|RE|S|T|VE))?",Yo=wd+"?",Ho="["+Do+"]?",Fd="(?:"+Uo+"(?:"+[zo,wr,Rr].join("|")+")"+Ho+Yo+")*",Ld="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Od="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ko=Ho+Yo+Fd,Dd="(?:"+[Md,wr,Rr].join("|")+")"+Ko,Id="(?:"+[zo+qs+"?",qs,wr,Rr,Ad].join("|")+")",Bd=RegExp(Ar,"g"),bd=RegExp(qs,"g"),Fr=RegExp(Mr+"(?="+Mr+")|"+Id+Ko,"g"),Nd=RegExp([es+"?"+No+"+"+Vo+"(?="+[Bo,es,"$"].join("|")+")",Rd+"+"+Wo+"(?="+[Bo,es+Xo,"$"].join("|")+")",es+"?"+Xo+"+"+Vo,es+"+"+Wo,Od,Ld,bo,Dd].join("|"),"g"),Gd=RegExp("["+Uo+ks+Ro+Do+"]"),zd=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ud=["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"],Xd=-1,ie={};ie[Wt]=ie[It]=ie[ee]=ie[Zt]=ie[he]=ie[ue]=ie[Te]=ie[_e]=ie[ti]=!0,ie[D]=ie[z]=ie[Kt]=ie[H]=ie[Nt]=ie[j]=ie[k]=ie[et]=ie[rt]=ie[ot]=ie[at]=ie[St]=ie[Ct]=ie[ct]=ie[At]=!1;var te={};te[D]=te[z]=te[Kt]=te[Nt]=te[H]=te[j]=te[Wt]=te[It]=te[ee]=te[Zt]=te[he]=te[rt]=te[ot]=te[at]=te[St]=te[Ct]=te[ct]=te[Tt]=te[ue]=te[Te]=te[_e]=te[ti]=!0,te[k]=te[et]=te[At]=!1;var Vd={À:"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"},Wd={"&":"&","<":"<",">":">",'"':""","'":"'"},Yd={"&":"&","<":"<",">":">",""":'"',"'":"'"},Hd={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Kd=parseFloat,$d=parseInt,$o=typeof global=="object"&&global&&global.Object===Object&&global,Zd=typeof self=="object"&&self&&self.Object===Object&&self,me=$o||Zd||Function("return this")(),Lr=typeof P=="object"&&P&&!P.nodeType&&P,Xi=Lr&&typeof C=="object"&&C&&!C.nodeType&&C,Zo=Xi&&Xi.exports===Lr,Or=Zo&&$o.process,Ve=function(){try{var ht=Xi&&Xi.require&&Xi.require("util").types;return ht||Or&&Or.binding&&Or.binding("util")}catch{}}(),jo=Ve&&Ve.isArrayBuffer,Jo=Ve&&Ve.isDate,Qo=Ve&&Ve.isMap,ko=Ve&&Ve.isRegExp,qo=Ve&&Ve.isSet,_o=Ve&&Ve.isTypedArray;function Ie(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 jd(ht,gt,dt,Mt){for(var Bt=-1,jt=ht==null?0:ht.length;++Bt-1}function Dr(ht,gt,dt){for(var Mt=-1,Bt=ht==null?0:ht.length;++Mt-1;);return dt}function oh(ht,gt){for(var dt=ht.length;dt--&&is(gt,ht[dt],0)>-1;);return dt}function sc(ht,gt){for(var dt=ht.length,Mt=0;dt--;)ht[dt]===gt&&++Mt;return Mt}var nc=Nr(Vd),rc=Nr(Wd);function ac(ht){return"\\"+Hd[ht]}function oc(ht,gt){return ht==null?A:ht[gt]}function ss(ht){return Gd.test(ht)}function hc(ht){return zd.test(ht)}function lc(ht){for(var gt,dt=[];!(gt=ht.next()).done;)dt.push(gt.value);return dt}function Xr(ht){var gt=-1,dt=Array(ht.size);return ht.forEach(function(Mt,Bt){dt[++gt]=[Bt,Mt]}),dt}function hh(ht,gt){return function(dt){return ht(gt(dt))}}function wi(ht,gt){for(var dt=-1,Mt=ht.length,Bt=0,jt=[];++dt-1}function Qc(E,R){var U=this.__data__,Z=mn(U,E);return Z<0?(++this.size,U.push([E,R])):U[Z][1]=R,this}vi.prototype.clear=$c,vi.prototype.delete=Zc,vi.prototype.get=jc,vi.prototype.has=Jc,vi.prototype.set=Qc;function pi(E){var R=-1,U=E==null?0:E.length;for(this.clear();++R=R?E:R)),E}function Ke(E,R,U,Z,q,tt){var it,nt=R&o,lt=R&r,mt=R&n;if(U&&(it=q?U(E,Z,q,tt):U(E)),it!==A)return it;if(!re(E))return E;var xt=bt(E);if(xt){if(it=tp(E),!nt)return Re(E,it)}else{var yt=Pe(E),Pt=yt==et||yt==st;if(Bi(E))return Hh(E,nt);if(yt==at||yt==D||Pt&&!q){if(it=lt||Pt?{}:ll(E),!nt)return lt?Yv(E,dv(it,E)):Wv(E,Th(it,E))}else{if(!te[yt])return q?E:{};it=ep(E,yt,nt)}}tt||(tt=new ii);var wt=tt.get(E);if(wt)return wt;tt.set(E,it),zl(E)?E.forEach(function(Ot){it.add(Ke(Ot,R,U,Ot,E,tt))}):Nl(E)&&E.forEach(function(Ot,Yt){it.set(Yt,Ke(Ot,R,U,Yt,E,tt))});var Lt=mt?lt?da:fa:lt?Le:xe,Ut=xt?A:Lt(E);return We(Ut||E,function(Ot,Yt){Ut&&(Yt=Ot,Ot=E[Yt]),Rs(it,Yt,Ke(Ot,R,U,Yt,E,tt))}),it}function cv(E){var R=xe(E);return function(U){return Sh(U,E,R)}}function Sh(E,R,U){var Z=U.length;if(E==null)return!Z;for(E=_t(E);Z--;){var q=U[Z],tt=R[q],it=E[q];if(it===A&&!(q in E)||!tt(it))return!1}return!0}function Ch(E,R,U){if(typeof E!="function")throw new Ye(c);return bs(function(){E.apply(A,U)},R)}function Fs(E,R,U,Z){var q=-1,tt=_s,it=!0,nt=E.length,lt=[],mt=R.length;if(!nt)return lt;U&&(R=se(R,Be(U))),Z?(tt=Dr,it=!1):R.length>=B&&(tt=Cs,it=!1,R=new Yi(R));t:for(;++qq?0:q+U),Z=Z===A||Z>q?q:zt(Z),Z<0&&(Z+=q),Z=U>Z?0:Xl(Z);U0&&U(nt)?R>1?Se(nt,R-1,U,Z,q):Mi(q,nt):Z||(q[q.length]=nt)}return q}var Zr=Qh(),Ah=Qh(!0);function ai(E,R){return E&&Zr(E,R,xe)}function jr(E,R){return E&&Ah(E,R,xe)}function yn(E,R){return Ai(R,function(U){return Ti(E[U])})}function Ki(E,R){R=Di(R,E);for(var U=0,Z=R.length;E!=null&&UR}function gv(E,R){return E!=null&&Qt.call(E,R)}function mv(E,R){return E!=null&&R in _t(E)}function xv(E,R,U){return E>=Ee(R,U)&&E=120&&xt.length>=120)?new Yi(it&&xt):A}xt=E[0];var yt=-1,Pt=nt[0];t:for(;++yt-1;)nt!==E&&un.call(nt,lt,1),un.call(E,lt,1);return E}function Nh(E,R){for(var U=E?R.length:0,Z=U-1;U--;){var q=R[U];if(U==Z||q!==tt){var tt=q;yi(q)?un.call(E,q,1):na(E,q)}}return E}function ea(E,R){return E+cn(gh()*(R-E+1))}function Ov(E,R,U,Z){for(var q=-1,tt=pe(dn((R-E)/(U||1)),0),it=dt(tt);tt--;)it[Z?tt:++q]=E,E+=U;return it}function ia(E,R){var U="";if(!E||R<1||R>G)return U;do R%2&&(U+=E),R=cn(R/2),R&&(E+=E);while(R);return U}function Xt(E,R){return ya(dl(E,R,Oe),E+"")}function Dv(E){return yh(cs(E))}function Iv(E,R){var U=cs(E);return Ln(U,Hi(R,0,U.length))}function Ds(E,R,U,Z){if(!re(E))return E;R=Di(R,E);for(var q=-1,tt=R.length,it=tt-1,nt=E;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);++Z>>1,it=E[tt];it!==null&&!Ne(it)&&(U?it<=R:it=B){var mt=R?null:Zv(E);if(mt)return en(mt);it=!1,q=Cs,lt=new Yi}else lt=R?[]:nt;t:for(;++Z=Z?E:$e(E,R,U)}var Yh=Pc||function(E){return me.clearTimeout(E)};function Hh(E,R){if(R)return E.slice();var U=E.length,Z=fh?fh(U):new E.constructor(U);return E.copy(Z),Z}function ha(E){var R=new E.constructor(E.byteLength);return new hn(R).set(new hn(E)),R}function zv(E,R){var U=R?ha(E.buffer):E.buffer;return new E.constructor(U,E.byteOffset,E.byteLength)}function Uv(E){var R=new E.constructor(E.source,wo.exec(E));return R.lastIndex=E.lastIndex,R}function Xv(E){return ws?_t(ws.call(E)):{}}function Kh(E,R){var U=R?ha(E.buffer):E.buffer;return new E.constructor(U,E.byteOffset,E.length)}function $h(E,R){if(E!==R){var U=E!==A,Z=E===null,q=E===E,tt=Ne(E),it=R!==A,nt=R===null,lt=R===R,mt=Ne(R);if(!nt&&!mt&&!tt&&E>R||tt&&it&<&&!nt&&!mt||Z&&it&<||!U&<||!q)return 1;if(!Z&&!tt&&!mt&&E=nt)return lt;var mt=U[Z];return lt*(mt=="desc"?-1:1)}}return E.index-R.index}function Zh(E,R,U,Z){for(var q=-1,tt=E.length,it=U.length,nt=-1,lt=R.length,mt=pe(tt-it,0),xt=dt(lt+mt),yt=!Z;++nt1?U[q-1]:A,it=q>2?U[2]:A;for(tt=E.length>3&&typeof tt=="function"?(q--,tt):A,it&&Me(U[0],U[1],it)&&(tt=q<3?A:tt,q=1),R=_t(R);++Z-1?q[tt?R[it]:it]:A}}function _h(E){return xi(function(R){var U=R.length,Z=U,q=He.prototype.thru;for(E&&R.reverse();Z--;){var tt=R[Z];if(typeof tt!="function")throw new Ye(c);if(q&&!it&&Rn(tt)=="wrapper")var it=new He([],!0)}for(Z=it?Z:U;++Z1&&$t.reverse(),xt&<nt))return!1;var mt=tt.get(E),xt=tt.get(R);if(mt&&xt)return mt==R&&xt==E;var yt=-1,Pt=!0,wt=U&i?new Yi:A;for(tt.set(E,R),tt.set(R,E);++yt1?"& ":"")+R[Z],R=R.join(U>2?", ":" "),E.replace(nd,`{ + */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,`{ /* [wrapped with `+R+`] */ -`)}function sp(E){return bt(E)||ji(E)||!!(vh&&E&&E[vh])}function yi(E,R){var U=typeof E;return R=R??G,!!R&&(U=="number"||U!="symbol"&&pd.test(E))&&E>-1&&E%1==0&&E0){if(++R>=M)return arguments[0]}else R=0;return E.apply(A,arguments)}}function Ln(E,R){var U=-1,Z=E.length,q=Z-1;for(R=R===A?Z:R;++U1?E[R-1]:A;return U=typeof U=="function"?(E.pop(),U):A,Pl(E,U)});function Al(E){var R=_(E);return R.__chain__=!0,R}function v0(E,R){return R(E),E}function On(E,R){return R(E)}var p0=xi(function(E){var R=E.length,U=R?E[0]:0,Z=this.__wrapped__,q=function(tt){return $r(tt,E)};return R>1||this.__actions__.length||!(Z instanceof Ht)||!yi(U)?this.thru(q):(Z=Z.slice(U,+U+(R?1:0)),Z.__actions__.push({func:On,args:[q],thisArg:A}),new He(Z,this.__chain__).thru(function(tt){return R&&!tt.length&&tt.push(A),tt}))});function g0(){return Al(this)}function m0(){return new He(this.value(),this.__chain__)}function x0(){this.__values__===A&&(this.__values__=Ul(this.value()));var E=this.__index__>=this.__values__.length,R=E?A:this.__values__[this.__index__++];return{done:E,value:R}}function y0(){return this}function T0(E){for(var R,U=this;U instanceof gn;){var Z=xl(U);Z.__index__=0,Z.__values__=A,R?q.__wrapped__=Z:R=Z;var q=Z;U=U.__wrapped__}return q.__wrapped__=E,R}function S0(){var E=this.__wrapped__;if(E instanceof Ht){var R=E;return this.__actions__.length&&(R=new Ht(this)),R=R.reverse(),R.__actions__.push({func:On,args:[Ta],thisArg:A}),new He(R,this.__chain__)}return this.thru(Ta)}function C0(){return Vh(this.__wrapped__,this.__actions__)}var E0=En(function(E,R,U){Qt.call(E,U)?++E[U]:gi(E,U,1)});function P0(E,R,U){var Z=bt(E)?th:vv;return U&&Me(E,R,U)&&(R=A),Z(E,Ft(R,3))}function A0(E,R){var U=bt(E)?Ai:Ph;return U(E,Ft(R,3))}var M0=qh(yl),w0=qh(Tl);function R0(E,R){return Se(Dn(E,R),1)}function F0(E,R){return Se(Dn(E,R),N)}function L0(E,R,U){return U=U===A?1:zt(U),Se(Dn(E,R),U)}function Ml(E,R){var U=bt(E)?We:Li;return U(E,Ft(R,3))}function wl(E,R){var U=bt(E)?Jd:Eh;return U(E,Ft(R,3))}var O0=En(function(E,R,U){Qt.call(E,U)?E[U].push(R):gi(E,U,[R])});function D0(E,R,U,Z){E=Fe(E)?E:cs(E),U=U&&!Z?zt(U):0;var q=E.length;return U<0&&(U=pe(q+U,0)),Gn(E)?U<=q&&E.indexOf(R,U)>-1:!!q&&is(E,R,U)>-1}var I0=Xt(function(E,R,U){var Z=-1,q=typeof R=="function",tt=Fe(E)?dt(E.length):[];return Li(E,function(it){tt[++Z]=q?Ie(R,it,U):Ls(it,R,U)}),tt}),B0=En(function(E,R,U){gi(E,U,R)});function Dn(E,R){var U=bt(E)?se:Lh;return U(E,Ft(R,3))}function b0(E,R,U,Z){return E==null?[]:(bt(R)||(R=R==null?[]:[R]),U=Z?A:U,bt(U)||(U=U==null?[]:[U]),Bh(E,R,U))}var N0=En(function(E,R,U){E[U?0:1].push(R)},function(){return[[],[]]});function G0(E,R,U){var Z=bt(E)?Ir:nh,q=arguments.length<3;return Z(E,Ft(R,4),U,q,Li)}function z0(E,R,U){var Z=bt(E)?Qd:nh,q=arguments.length<3;return Z(E,Ft(R,4),U,q,Eh)}function U0(E,R){var U=bt(E)?Ai:Ph;return U(E,bn(Ft(R,3)))}function X0(E){var R=bt(E)?yh:Dv;return R(E)}function V0(E,R,U){(U?Me(E,R,U):R===A)?R=1:R=zt(R);var Z=bt(E)?lv:Iv;return Z(E,R)}function W0(E){var R=bt(E)?uv:bv;return R(E)}function Y0(E){if(E==null)return 0;if(Fe(E))return Gn(E)?ns(E):E.length;var R=Pe(E);return R==rt||R==Ct?E.size:qr(E).length}function H0(E,R,U){var Z=bt(E)?Br:Nv;return U&&Me(E,R,U)&&(R=A),Z(E,Ft(R,3))}var K0=Xt(function(E,R){if(E==null)return[];var U=R.length;return U>1&&Me(E,R[0],R[1])?R=[]:U>2&&Me(R[0],R[1],R[2])&&(R=[R[0]]),Bh(E,Se(R,1),[])}),In=Ac||function(){return me.Date.now()};function $0(E,R){if(typeof R!="function")throw new Ye(c);return E=zt(E),function(){if(--E<1)return R.apply(this,arguments)}}function Rl(E,R,U){return R=U?A:R,R=E&&R==null?E.length:R,mi(E,g,A,A,A,A,R)}function Fl(E,R){var U;if(typeof R!="function")throw new Ye(c);return E=zt(E),function(){return--E>0&&(U=R.apply(this,arguments)),E<=1&&(R=A),U}}var Ca=Xt(function(E,R,U){var Z=h;if(U.length){var q=wi(U,fs(Ca));Z|=d}return mi(E,Z,R,U,q)}),Ll=Xt(function(E,R,U){var Z=h|s;if(U.length){var q=wi(U,fs(Ll));Z|=d}return mi(R,Z,E,U,q)});function Ol(E,R,U){R=U?A:R;var Z=mi(E,f,A,A,A,A,A,R);return Z.placeholder=Ol.placeholder,Z}function Dl(E,R,U){R=U?A:R;var Z=mi(E,u,A,A,A,A,A,R);return Z.placeholder=Dl.placeholder,Z}function Il(E,R,U){var Z,q,tt,it,nt,lt,mt=0,xt=!1,yt=!1,Pt=!0;if(typeof E!="function")throw new Ye(c);R=je(R)||0,re(U)&&(xt=!!U.leading,yt="maxWait"in U,tt=yt?pe(je(U.maxWait)||0,R):tt,Pt="trailing"in U?!!U.trailing:Pt);function wt(de){var ni=Z,Ci=q;return Z=q=A,mt=de,it=E.apply(Ci,ni),it}function Lt(de){return mt=de,nt=bs(Yt,R),xt?wt(de):it}function Ut(de){var ni=de-lt,Ci=de-mt,ql=R-ni;return yt?Ee(ql,tt-Ci):ql}function Ot(de){var ni=de-lt,Ci=de-mt;return lt===A||ni>=R||ni<0||yt&&Ci>=tt}function Yt(){var de=In();if(Ot(de))return $t(de);nt=bs(Yt,Ut(de))}function $t(de){return nt=A,Pt&&Z?wt(de):(Z=q=A,it)}function Ge(){nt!==A&&Yh(nt),mt=0,Z=lt=q=nt=A}function we(){return nt===A?it:$t(In())}function ze(){var de=In(),ni=Ot(de);if(Z=arguments,q=this,lt=de,ni){if(nt===A)return Lt(lt);if(yt)return Yh(nt),nt=bs(Yt,R),wt(lt)}return nt===A&&(nt=bs(Yt,R)),it}return ze.cancel=Ge,ze.flush=we,ze}var Z0=Xt(function(E,R){return Ch(E,1,R)}),j0=Xt(function(E,R,U){return Ch(E,je(R)||0,U)});function J0(E){return mi(E,x)}function Bn(E,R){if(typeof E!="function"||R!=null&&typeof R!="function")throw new Ye(c);var U=function(){var Z=arguments,q=R?R.apply(this,Z):Z[0],tt=U.cache;if(tt.has(q))return tt.get(q);var it=E.apply(this,Z);return U.cache=tt.set(q,it)||tt,it};return U.cache=new(Bn.Cache||pi),U}Bn.Cache=pi;function bn(E){if(typeof E!="function")throw new Ye(c);return function(){var R=arguments;switch(R.length){case 0:return!E.call(this);case 1:return!E.call(this,R[0]);case 2:return!E.call(this,R[0],R[1]);case 3:return!E.call(this,R[0],R[1],R[2])}return!E.apply(this,R)}}function Q0(E){return Fl(2,E)}var k0=Gv(function(E,R){R=R.length==1&&bt(R[0])?se(R[0],Be(Ft())):se(Se(R,1),Be(Ft()));var U=R.length;return Xt(function(Z){for(var q=-1,tt=Ee(Z.length,U);++q=R}),ji=wh(function(){return arguments}())?wh:function(E){return le(E)&&Qt.call(E,"callee")&&!ch.call(E,"callee")},bt=dt.isArray,dg=jo?Be(jo):Tv;function Fe(E){return E!=null&&Nn(E.length)&&!Ti(E)}function fe(E){return le(E)&&Fe(E)}function cg(E){return E===!0||E===!1||le(E)&&Ae(E)==H}var Bi=wc||Ba,vg=Jo?Be(Jo):Sv;function pg(E){return le(E)&&E.nodeType===1&&!Ns(E)}function gg(E){if(E==null)return!0;if(Fe(E)&&(bt(E)||typeof E=="string"||typeof E.splice=="function"||Bi(E)||ds(E)||ji(E)))return!E.length;var R=Pe(E);if(R==rt||R==Ct)return!E.size;if(Bs(E))return!qr(E).length;for(var U in E)if(Qt.call(E,U))return!1;return!0}function mg(E,R){return Os(E,R)}function xg(E,R,U){U=typeof U=="function"?U:A;var Z=U?U(E,R):A;return Z===A?Os(E,R,A,U):!!Z}function Pa(E){if(!le(E))return!1;var R=Ae(E);return R==k||R==Q||typeof E.message=="string"&&typeof E.name=="string"&&!Ns(E)}function yg(E){return typeof E=="number"&&ph(E)}function Ti(E){if(!re(E))return!1;var R=Ae(E);return R==et||R==st||R==W||R==Et}function bl(E){return typeof E=="number"&&E==zt(E)}function Nn(E){return typeof E=="number"&&E>-1&&E%1==0&&E<=G}function re(E){var R=typeof E;return E!=null&&(R=="object"||R=="function")}function le(E){return E!=null&&typeof E=="object"}var Nl=Qo?Be(Qo):Ev;function Tg(E,R){return E===R||kr(E,R,va(R))}function Sg(E,R,U){return U=typeof U=="function"?U:A,kr(E,R,va(R),U)}function Cg(E){return Gl(E)&&E!=+E}function Eg(E){if(ap(E))throw new Bt(b);return Rh(E)}function Pg(E){return E===null}function Ag(E){return E==null}function Gl(E){return typeof E=="number"||le(E)&&Ae(E)==ot}function Ns(E){if(!le(E)||Ae(E)!=at)return!1;var R=ln(E);if(R===null)return!0;var U=Qt.call(R,"constructor")&&R.constructor;return typeof U=="function"&&U instanceof U&&rn.call(U)==Sc}var Aa=ko?Be(ko):Pv;function Mg(E){return bl(E)&&E>=-G&&E<=G}var zl=qo?Be(qo):Av;function Gn(E){return typeof E=="string"||!bt(E)&&le(E)&&Ae(E)==ct}function Ne(E){return typeof E=="symbol"||le(E)&&Ae(E)==Tt}var ds=_o?Be(_o):Mv;function wg(E){return E===A}function Rg(E){return le(E)&&Pe(E)==At}function Fg(E){return le(E)&&Ae(E)==Dt}var Lg=wn(_r),Og=wn(function(E,R){return E<=R});function Ul(E){if(!E)return[];if(Fe(E))return Gn(E)?ei(E):Re(E);if(Es&&E[Es])return lc(E[Es]());var R=Pe(E),U=R==rt?Xr:R==Ct?en:cs;return U(E)}function Si(E){if(!E)return E===0?E:0;if(E=je(E),E===N||E===-N){var R=E<0?-1:1;return R*V}return E===E?E:0}function zt(E){var R=Si(E),U=R%1;return R===R?U?R-U:R:0}function Xl(E){return E?Hi(zt(E),0,$):0}function je(E){if(typeof E=="number")return E;if(Ne(E))return K;if(re(E)){var R=typeof E.valueOf=="function"?E.valueOf():E;E=re(R)?R+"":R}if(typeof E!="string")return E===0?E:+E;E=rh(E);var U=dd.test(E);return U||vd.test(E)?$d(E.slice(2),U?2:8):fd.test(E)?K:+E}function Vl(E){return oi(E,Le(E))}function Dg(E){return E?Hi(zt(E),-G,G):E===0?E:0}function Jt(E){return E==null?"":be(E)}var Ig=ls(function(E,R){if(Bs(R)||Fe(R)){oi(R,xe(R),E);return}for(var U in R)Qt.call(R,U)&&Rs(E,U,R[U])}),Wl=ls(function(E,R){oi(R,Le(R),E)}),zn=ls(function(E,R,U,Z){oi(R,Le(R),E,Z)}),Bg=ls(function(E,R,U,Z){oi(R,xe(R),E,Z)}),bg=xi($r);function Ng(E,R){var U=hs(E);return R==null?U:Th(U,R)}var Gg=Xt(function(E,R){E=_t(E);var U=-1,Z=R.length,q=Z>2?R[2]:A;for(q&&Me(R[0],R[1],q)&&(Z=1);++U1),tt}),oi(E,da(E),U),Z&&(U=Ke(U,o|r|n,jv));for(var q=R.length;q--;)na(U,R[q]);return U});function em(E,R){return Hl(E,bn(Ft(R)))}var im=xi(function(E,R){return E==null?{}:Fv(E,R)});function Hl(E,R){if(E==null)return{};var U=se(da(E),function(Z){return[Z]});return R=Ft(R),bh(E,U,function(Z,q){return R(Z,q[0])})}function sm(E,R,U){R=Di(R,E);var Z=-1,q=R.length;for(q||(q=1,E=A);++ZR){var Z=E;E=R,R=Z}if(U||E%1||R%1){var q=gh();return Ee(E+q*(R-E+Kd("1e-"+((q+"").length-1))),R)}return ea(E,R)}var vm=us(function(E,R,U){return R=R.toLowerCase(),E+(U?Zl(R):R)});function Zl(E){return Ra(Jt(E).toLowerCase())}function jl(E){return E=Jt(E),E&&E.replace(gd,nc).replace(bd,"")}function pm(E,R,U){E=Jt(E),R=be(R);var Z=E.length;U=U===A?Z:Hi(zt(U),0,Z);var q=U;return U-=R.length,U>=0&&E.slice(U,q)==R}function gm(E){return E=Jt(E),E&&Qf.test(E)?E.replace(Ao,rc):E}function mm(E){return E=Jt(E),E&&id.test(E)?E.replace(Er,"\\$&"):E}var xm=us(function(E,R,U){return E+(U?"-":"")+R.toLowerCase()}),ym=us(function(E,R,U){return E+(U?" ":"")+R.toLowerCase()}),Tm=kh("toLowerCase");function Sm(E,R,U){E=Jt(E),R=zt(R);var Z=R?ns(E):0;if(!R||Z>=R)return E;var q=(R-Z)/2;return Mn(cn(q),U)+E+Mn(dn(q),U)}function Cm(E,R,U){E=Jt(E),R=zt(R);var Z=R?ns(E):0;return R&&Z>>0,U?(E=Jt(E),E&&(typeof R=="string"||R!=null&&!Aa(R))&&(R=be(R),!R&&ss(E))?Ii(ei(E),0,U):E.split(R,U)):[]}var Fm=us(function(E,R,U){return E+(U?" ":"")+Ra(R)});function Lm(E,R,U){return E=Jt(E),U=U==null?0:Hi(zt(U),0,E.length),R=be(R),E.slice(U,U+R.length)==R}function Om(E,R,U){var Z=_.templateSettings;U&&Me(E,R,U)&&(R=A),E=Jt(E),R=zn({},R,Z,nl);var q=zn({},R.imports,Z.imports,nl),tt=xe(q),it=Ur(q,tt),nt,lt,mt=0,xt=R.interpolate||Qs,yt="__p += '",Pt=Vr((R.escape||Qs).source+"|"+xt.source+"|"+(xt===Mo?ud:Qs).source+"|"+(R.evaluate||Qs).source+"|$","g"),wt="//# sourceURL="+(Qt.call(R,"sourceURL")?(R.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xd+"]")+` -`;E.replace(Pt,function(Ot,Yt,$t,Ge,we,ze){return $t||($t=Ge),yt+=E.slice(mt,ze).replace(md,ac),Yt&&(nt=!0,yt+=`' + +`)}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+`) + -'`),we&&(lt=!0,yt+=`'; -`+we+`; +'`),Re&&(lt=!0,yt+=`'; +`+Re+`; __p += '`),$t&&(yt+=`' + ((__t = (`+$t+`)) == null ? '' : __t) + -'`),mt=ze+Ot.length,Ot}),yt+=`'; -`;var Lt=Qt.call(R,"variable")&&R.variable;if(!Lt)yt=`with (obj) { +'`),mt=Xe+Dt.length,Dt}),yt+=`'; +`;var Ot=kt.call(R,"variable")&&R.variable;if(!Ot)yt=`with (obj) { `+yt+` } -`;else if(hd.test(Lt))throw new Bt(m);yt=(lt?yt.replace(fi,""):yt).replace(di,"$1").replace(ci,"$1;"),yt="function("+(Lt||"obj")+`) { -`+(Lt?"":`obj || (obj = {}); +`;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 = {}); `)+"var __t, __p = ''"+(nt?", __e = _.escape":"")+(lt?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+yt+`return __p -}`;var Ut=Ql(function(){return jt(tt,wt+"return "+yt).apply(A,it)});if(Ut.source=yt,Pa(Ut))throw Ut;return Ut}function Dm(E){return Jt(E).toLowerCase()}function Im(E){return Jt(E).toUpperCase()}function Bm(E,R,U){if(E=Jt(E),E&&(U||R===A))return rh(E);if(!E||!(R=be(R)))return E;var Z=ei(E),q=ei(R),tt=ah(Z,q),it=oh(Z,q)+1;return Ii(Z,tt,it).join("")}function bm(E,R,U){if(E=Jt(E),E&&(U||R===A))return E.slice(0,lh(E)+1);if(!E||!(R=be(R)))return E;var Z=ei(E),q=oh(Z,ei(R))+1;return Ii(Z,0,q).join("")}function Nm(E,R,U){if(E=Jt(E),E&&(U||R===A))return E.replace(Pr,"");if(!E||!(R=be(R)))return E;var Z=ei(E),q=ah(Z,ei(R));return Ii(Z,q).join("")}function Gm(E,R){var U=T,Z=S;if(re(R)){var q="separator"in R?R.separator:q;U="length"in R?zt(R.length):U,Z="omission"in R?be(R.omission):Z}E=Jt(E);var tt=E.length;if(ss(E)){var it=ei(E);tt=it.length}if(U>=tt)return E;var nt=U-ns(Z);if(nt<1)return Z;var lt=it?Ii(it,0,nt).join(""):E.slice(0,nt);if(q===A)return lt+Z;if(it&&(nt+=lt.length-nt),Aa(q)){if(E.slice(nt).search(q)){var mt,xt=lt;for(q.global||(q=Vr(q.source,Jt(wo.exec(q))+"g")),q.lastIndex=0;mt=q.exec(xt);)var yt=mt.index;lt=lt.slice(0,yt===A?nt:yt)}}else if(E.indexOf(be(q),nt)!=nt){var Pt=lt.lastIndexOf(q);Pt>-1&&(lt=lt.slice(0,Pt))}return lt+Z}function zm(E){return E=Jt(E),E&&Jf.test(E)?E.replace(Po,cc):E}var Um=us(function(E,R,U){return E+(U?" ":"")+R.toUpperCase()}),Ra=kh("toUpperCase");function Jl(E,R,U){return E=Jt(E),R=U?A:R,R===A?hc(E)?gc(E):_d(E):E.match(R)||[]}var Ql=Xt(function(E,R){try{return Ie(E,A,R)}catch(U){return Pa(U)?U:new Bt(U)}}),Xm=xi(function(E,R){return We(R,function(U){U=hi(U),gi(E,U,Ca(E[U],E))}),E});function Vm(E){var R=E==null?0:E.length,U=Ft();return E=R?se(E,function(Z){if(typeof Z[1]!="function")throw new Ye(c);return[U(Z[0]),Z[1]]}):[],Xt(function(Z){for(var q=-1;++qG)return[];var U=$,Z=Ee(E,$);R=Ft(R),E-=$;for(var q=zr(Z,R);++U0||R<0)?new Ht(U):(E<0?U=U.takeRight(-E):E&&(U=U.drop(E)),R!==A&&(R=zt(R),U=R<0?U.dropRight(-R):U.take(R-E)),U)},Ht.prototype.takeRightWhile=function(E){return this.reverse().takeWhile(E).reverse()},Ht.prototype.toArray=function(){return this.take($)},ai(Ht.prototype,function(E,R){var U=/^(?:filter|find|map|reject)|While$/.test(R),Z=/^(?:head|last)$/.test(R),q=_[Z?"take"+(R=="last"?"Right":""):R],tt=Z||/^find/.test(R);q&&(_.prototype[R]=function(){var it=this.__wrapped__,nt=Z?[1]:arguments,lt=it instanceof Ht,mt=nt[0],xt=lt||bt(it),yt=function(Yt){var $t=q.apply(_,Mi([Yt],nt));return Z&&Pt?$t[0]:$t};xt&&U&&typeof mt=="function"&&mt.length!=1&&(lt=xt=!1);var Pt=this.__chain__,wt=!!this.__actions__.length,Lt=tt&&!Pt,Ut=lt&&!wt;if(!tt&&xt){it=Ut?it:new Ht(this);var Ot=E.apply(it,nt);return Ot.__actions__.push({func:On,args:[yt],thisArg:A}),new He(Ot,Pt)}return Lt&&Ut?E.apply(this,nt):(Ot=this.thru(yt),Lt?Z?Ot.value()[0]:Ot.value():Ot)})}),We(["pop","push","shift","sort","splice","unshift"],function(E){var R=sn[E],U=/^(?:push|sort|unshift)$/.test(E)?"tap":"thru",Z=/^(?:pop|shift)$/.test(E);_.prototype[E]=function(){var q=arguments;if(Z&&!this.__chain__){var tt=this.value();return R.apply(bt(tt)?tt:[],q)}return this[U](function(it){return R.apply(bt(it)?it:[],q)})}}),ai(Ht.prototype,function(E,R){var U=_[R];if(U){var Z=U.name+"";Qt.call(os,Z)||(os[Z]=[]),os[Z].push({name:R,func:U})}}),os[Pn(A,s).name]=[{name:"wrapper",func:A}],Ht.prototype.clone=zc,Ht.prototype.reverse=Uc,Ht.prototype.value=Xc,_.prototype.at=p0,_.prototype.chain=g0,_.prototype.commit=m0,_.prototype.next=x0,_.prototype.plant=T0,_.prototype.reverse=S0,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=C0,_.prototype.first=_.prototype.head,Es&&(_.prototype[Es]=y0),_},Ri=mc();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(me._=Ri,define(function(){return Ri})):Xi?((Xi.exports=Ri)._=Ri,Lr._=Ri):me._=Ri}).call(P)}),Yf=class extends Set{constructor(P,C=!1){super(P),this.valuesAsFlags=C}};function Ys(P){if(P instanceof Map)return Object.fromEntries([...P.entries()].map(([C,A])=>[C,Ys(A)]));if(P instanceof Set)return Array.from(P.values()).map(Ys);if(P instanceof Yf)return{values:[...P.values()],valuesAsFlags:P.valuesAsFlags};if(typeof P=="object"){let C={};return Object.entries(P).forEach(([A,I])=>{C[A]=Ys(I)}),C}else return P}Co(Eo(),1);var bT=Co(Eo(),1);function ki(P,C){if(typeof P!="object")throw new Error(`Cannot merge into non-object objectToMergeWith. Received: ${JSON.stringify(P)}`);if(typeof C!="object")throw new Error(`Cannot merge using non-object objectToMergeWith. Received: ${JSON.stringify(C)}`);let A=(0,bT.cloneDeep)(P);for(let[I,B]of Object.entries(C))typeof B!="object"||B instanceof Set||A[I]===void 0?A[I]=B:A[I]=ki(A[I],B);return A}function Hf(P,C){if(!(P===void 0||typeof P!="object"))for(let A of Object.keys(P)){if(A===C)return P[A];let I=P[A];if(typeof I=="object"){let B=Hf(I,C);if(B!==void 0)return B}}}var Va="@composite:",NT="@inherit:",GT=class{constructor(P,C,A){this.tiledClassToMembersMap=P,this.enumNameToValuesMap=C,this.parserOptions=A,this.memoiser=new Map}flattenMembers(P,C){return this.memoiser.has(P)?{[P]:this.memoiser.get(P)}:(this.memoiser.set(P,C.reduce((A,I)=>ne(ne({},A),this.flattenMemberProperty(I)),{})),{[P]:this.memoiser.get(P)})}flattenMemberProperty(P){var C;let A=(C=P.propertyType)!=null?C:P.propertytype;if(P.type==="class"){if(!this.memoiser.has(A)){let b=this.tiledClassToMembersMap.get(A).reduce((c,m)=>ki(this.flattenMemberProperty(m),c),{});this.memoiser.set(A,b)}let I=this.memoiser.get(A),B=ki(I,this.flattenValue(P.value,I));return this.checkIfShouldFlatten(P.name)?B:{[P.name.replace(Va,"")]:B}}else return this.enumNameToValuesMap.has(A)?this.enumNameToValuesMap.get(A).valuesAsFlags?{[P.name]:new Set(P.value.split(",").filter(I=>I!==""))}:{[P.name]:P.value}:{[P.name]:P.value}}get memoisedFlattenedProperties(){return this.memoiser}flattenValue(P,C){return Object.entries(P).reduce((A,[I,B])=>{if(typeof B!="object")return Hf(C,I)instanceof Set?ki({[I]:new Set(B.split(",").filter(b=>b!==""))},A):ki({[I]:B},A);if(this.checkIfShouldFlatten(I))return ki(this.flattenValue(B,C),A);{let b=I.replace(Va,"");return ki({[b]:this.flattenValue(B,C)},A)}},{})}checkIfShouldFlatten(P){var C;return((C=this.parserOptions)==null?void 0:C.defaultComposite)===!0?P.startsWith(NT):!P.startsWith(Va)}},Au=Co(Eo(),1),zT=class{constructor(P){this.flattener=P}flattenPropertiesOnObject(P){var C,A,I,B;return Gi(ne(ne({},this.flattener.memoisedFlattenedProperties.get((C=P.class)!=null?C:P.type)),(A=P.properties)==null?void 0:A.reduce((b,c)=>ne(ne({},b),this.flattener.flattenMemberProperty(c)),{})),{name:P.name,id:P.id,class:(B=(I=P.class)!=null?I:P.type)!=null?B:null,x:P.x,y:P.y})}flattenPropertiesOnTile(P){var C,A,I,B;return Gi(ne(ne({},this.flattener.memoisedFlattenedProperties.get((C=P.class)!=null?C:P.type)),(A=P.properties)==null?void 0:A.reduce((b,c)=>ne(ne({},b),this.flattener.flattenMemberProperty(c)),{})),{id:P.id,class:(B=(I=P.class)!=null?I:P.type)!=null?B:null})}getCustomTypesMap(){return new Map([...this.flattener.memoisedFlattenedProperties.entries()].map(([P,C])=>[P,(0,Au.cloneDeep)(C)]))}getEnumsMap(){return new Map([...this.flattener.enumNameToValuesMap.entries()].map(([P,C])=>[P,(0,Au.cloneDeep)(C)]))}toJSON(){return JSON.stringify({customTypes:Ys(this.getCustomTypesMap()),enums:Ys(this.getEnumsMap())},null,4)}};function UT(P,C){let A=new Map(P.propertyTypes.filter(b=>b.type==="enum").map(b=>[b.name,new Yf(b.values,b.valuesAsFlags)])),I=new Map(P.propertyTypes.filter(b=>b.type==="class").map(b=>[b.name,b.members])),B=new GT(I,A,C);return I.forEach((b,c)=>{B.flattenMembers(c,b)}),new zT(B)}var XT={parse:UT},Kf=class{constructor(P,C){this.phaserTile=P,this.tiledProject=C}getProperty(P){var C,A;let I={};if(this.tiledProject){let B=XT.parse(this.tiledProject),b=this.getType();if(b){let c=(C=B.getCustomTypesMap())==null?void 0:C.get(b);if(c)for(let[m,t]of Object.entries(c))I[m]=t}}return(A=this.phaserTile.properties[P])!=null?A:I[P]}hasProperty(P){return this.getProperty(P)!=null}getType(){var P,C;return(C=(P=this.phaserTile.tileset)==null?void 0:P.tileData[this.phaserTile.index-1])==null?void 0:C.type}},VT=class{constructor(P,C){this.phaserTilemapLayer=P,this.tiledProject=C}getName(){return this.phaserTilemapLayer.layer.name}getProperty(P){let C=this.phaserTilemapLayer.layer.properties,A=C?.find(I=>I.name==P);return A?.value}hasProperty(P){return this.getProperty(P)!=null}isCharLayer(){return this.hasProperty(Zn)}getData(){return this.phaserTilemapLayer.layer.data.map(P=>P.map(C=>new Kf(C,this.tiledProject)))}},WT=class{constructor(P,C){this.phaserTilemap=P,this.tiledProject=C;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(P=>new VT(P.tilemapLayer,this.tiledProject))}hasTileAt(P,C,A){return!!this.phaserTilemap.hasTileAt(P,C,A)}getTileAt(P,C,A){let I=this.phaserTilemap.getTileAt(P,C,!1,A);if(I)return new Kf(I,this.tiledProject)}},$f=class to{constructor(C){this.scene=C,this.geHeadless=new PT(!1),this.isCreatedInternal=!1,to.welcomeMessagePrinted||(console.log(`Using GridEngine Phaser Plugin v${Gf}`),to.welcomeMessagePrinted=!0),this.scene.sys.events.once("boot",this.boot,this)}boot(){this.scene.sys.events.on("update",this.update,this)}getCharLayer(C){return this.geHeadless.getCharLayer(C)}getTransition(C,A){return this.geHeadless.getTransition(C,A)}setTransition(C,A,I){this.geHeadless.setTransition(C,A,I)}create(C,A){this.geHeadless.create(new WT(C,A.tiledProject),A),this.isCreatedInternal=!0,this.gridCharacters=new Map;let I=this.setConfigDefaults(A);this.config=I,this.gridTilemap=new _a(C),this.addCharacters()}getPosition(C){return this.geHeadless.getPosition(C)}move(C,A){this.geHeadless.move(C,A)}moveRandomly(C,A=0,I=-1){this.geHeadless.moveRandomly(C,A,I)}getMovement(C){return this.geHeadless.getMovement(C)}moveTo(C,A,I){return this.geHeadless.moveTo(C,A,I)}stopMovement(C){this.geHeadless.stopMovement(C)}setSpeed(C,A){this.geHeadless.setSpeed(C,A)}getSpeed(C){return this.geHeadless.getSpeed(C)}setContainer(C,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(C);if(!B)throw this.createCharUnknownErr(C);B.setContainer(A)}getContainer(C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(C);if(!I)throw this.createCharUnknownErr(C);return I.getContainer()}getOffsetX(C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(C);if(!I)throw this.createCharUnknownErr(C);return I.getOffsetX()}setOffsetX(C,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(C);if(!B)throw this.createCharUnknownErr(C);B.setOffsetX(A)}getOffsetY(C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(C);if(!I)throw this.createCharUnknownErr(C);return I.getOffsetY()}setOffsetY(C,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(C);if(!B)throw this.createCharUnknownErr(C);B.setOffsetY(A)}collidesWithTiles(C){return this.geHeadless.collidesWithTiles(C)}getWalkingAnimationMapping(C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(C);if(!I)throw this.createCharUnknownErr(C);let B=I.getAnimation();return B?.getWalkingAnimationMapping()}hasLayerOverlay(){var C;return this.initGuard(),!!((C=this.config)!=null&&C.layerOverlay)}setWalkingAnimationMapping(C,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(C);if(!B)throw this.createCharUnknownErr(C);let b=B.getAnimation();b?.setWalkingAnimationMapping(A)}update(C,A){if(this.isCreatedInternal&&this.gridCharacters)for(let[I,B]of this.gridCharacters)B.update(A);this.geHeadless.update(C,A)}addCharacter(C){this.geHeadless.addCharacter(C),this.addCharacterInternal(C)}hasCharacter(C){return this.geHeadless.hasCharacter(C)}removeCharacter(C){var A,I;this.initGuard();let B=(A=this.gridCharacters)==null?void 0:A.get(C);if(!B)throw this.createCharUnknownErr(C);B.destroy(),(I=this.gridCharacters)==null||I.delete(C),this.geHeadless.removeCharacter(C)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters){for(let C of this.gridCharacters.keys())this.removeCharacter(C);this.geHeadless.removeAllCharacters()}}getAllCharacters(C){return this.geHeadless.getAllCharacters(C)}getLabels(C){return this.geHeadless.getLabels(C)}addLabels(C,A){this.geHeadless.addLabels(C,A)}removeLabels(C,A){this.geHeadless.removeLabels(C,A)}clearLabels(C){this.geHeadless.clearLabels(C)}follow(C,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(C,A,b)}isMoving(C){return this.geHeadless.isMoving(C)}getFacingDirection(C){return this.geHeadless.getFacingDirection(C)}getFacingPosition(C){return this.geHeadless.getFacingPosition(C)}turnTowards(C,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(C);if(!B)throw this.createCharUnknownErr(C);B.turnTowards(A),this.geHeadless.turnTowards(C,A)}getCharactersAt(C,A){return this.geHeadless.getCharactersAt(C,A)}setPosition(C,A,I){this.geHeadless.setPosition(C,A,I)}getSprite(C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(C);if(!I)throw this.createCharUnknownErr(C);return I.getSprite()}setSprite(C,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(C);if(!B)throw this.createCharUnknownErr(C);A.setOrigin(0,0),B.setSprite(A)}isBlocked(C,A,I=["geDefault"]){return this.geHeadless.isBlocked(C,A,I)}isTileBlocked(C,A){return this.geHeadless.isTileBlocked(C,A)}getCollisionGroups(C){return this.geHeadless.getCollisionGroups(C)}setCollisionGroups(C,A){this.geHeadless.setCollisionGroups(C,A)}getIgnoreCollisionGroups(C){return this.geHeadless.getIgnoreCollisionGroups(C)}setIgnoreCollisionGroups(C,A){this.geHeadless.setIgnoreCollisionGroups(C,A)}getTilePosInDirection(C,A,I){return this.geHeadless.getTilePosInDirection(C,A,I)}findShortestPath(C,A,I={}){return this.geHeadless.findShortestPath(C,A,I)}steppedOn(C,A,I){return this.geHeadless.steppedOn(C,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(C){return this.geHeadless.getMovementProgress(C)}rebuildTileCollisionCache(C,A,I,B){this.geHeadless.rebuildTileCollisionCache(C,A,I,B)}addQueueMovements(C,A,I){this.geHeadless.addQueueMovements(C,A,I)}getEnqueuedMovements(C){return this.geHeadless.getEnqueuedMovements(C)}queueMovementFinished(){return this.geHeadless.queueMovementFinished()}clearEnqueuedMovements(C){return this.geHeadless.clearEnqueuedMovements(C)}getState(){return{characters:this.geHeadless.getState().characters.map(C=>Gi(ne({},C),{offsetX:this.getOffsetX(C.id),offsetY:this.getOffsetY(C.id)}))}}setState(C){if(this.geHeadless.setState(C),this.gridCharacters)for(let A of C.characters){let I=this.gridCharacters.get(A.id);I&&(I.setOffsetX(A.offsetX),I.setOffsetY(A.offsetY))}}getTileCost(C,A,I){return this.initGuard(),this.geHeadless.getTileCost(C,A,I)}setConfigDefaults(C){return ne({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",layerOverlay:!1,cacheTileCollisions:!1},C)}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var C;(C=this.config)==null||C.characters.forEach(A=>this.addCharacterInternal(A))}createCharUnknownErr(C){return new Error(`Character unknown: ${C}`)}addCharacterInternal(C){var A;if(this.initGuard(),!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let I=new rT(C,this.scene,this.gridTilemap,this.config.layerOverlay,this.geHeadless);(A=this.gridCharacters)==null||A.set(C.id,I)}};$f.welcomeMessagePrinted=!1;var YT=$f,HT=YT;/*! Bundled license information: +}`;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: tiled-property-flattener/dist/tiled_property_flattener.min.js: (*! Bundled license information: @@ -6396,8 +6396,9 @@ tiled-property-flattener/dist/tiled_property_flattener.min.js: * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) *) -*/class KT extends fo.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.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})}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("CityScene")},this)}}class gs{constructor(C,A=4){this.bounds=C,this.capacity=A,this.points=[],this.divided=!1,this.cache=new Map}subdivide(){const{xMin:C,yMin:A,xMax:I,yMax:B}=this.bounds,b=(I-C)/2,c=(B-A)/2,m=C,t=A;this.northeast=new gs({xMin:m+b,xMax:m+2*b,yMin:A,yMax:t+c},this.capacity),this.northwest=new gs({xMin:C,xMax:m+b,yMin:A,yMax:t+c},this.capacity),this.southeast=new gs({xMin:m+b,xMax:m+2*b,yMin:t+c,yMax:t+2*c},this.capacity),this.southwest=new gs({xMin:C,xMax:m+b,yMin:t+c,yMax:t+2*c},this.capacity),this.divided=!0}insert(C){return this.contains(C.bounds)?this.points.length=A&&C.xMax<=B&&C.yMin>=I&&C.yMax<=b}generateCacheKey(C){const{xMin:A,xMax:I,yMin:B,yMax:b}=C;return`${A},${I},${B},${b}`}queryRange(C,A=[]){if(!this.intersects(C))return A;for(const I of this.points)this.isWithinBounds(I.bounds,C)&&A.push(I);return this.divided&&(this.northwest?.queryRange(C,A),this.northeast?.queryRange(C,A),this.southwest?.queryRange(C,A),this.southeast?.queryRange(C,A)),A}query(C,A=[]){const I=`${C.x},${C.y}`,B=this.cache.get(I);if(B)return B;if(!this.intersects({xMin:C.x,xMax:C.x,yMin:C.y,yMax:C.y}))return A;for(const b of this.points)this.isWithinRange(C,b.bounds)&&A.push(b);return this.divided&&(this.northwest?.query(C,A),this.northeast?.query(C,A),this.southwest?.query(C,A),this.southeast?.query(C,A)),this.cache.set(I,A),A}intersects(C){const{xMin:A,yMin:I,xMax:B,yMax:b}=this.bounds;return!(C.xMin>B||C.xMaxb||C.yMax=A.xMin&&C.xMin<=A.xMax&&C.yMax>=A.yMin&&C.yMin<=A.yMax}isWithinRange(C,A){return C.x>=A.xMin&&C.x<=A.xMax&&C.y>=A.yMin&&C.y<=A.yMax}}class $T{constructor(){this.events={}}on(C,A){this.events[C]||(this.events[C]=[]),this.events[C]?.push(A)}off(C,A){this.events[C]&&(this.events[C]=this.events[C]?.filter(I=>I!==A))}emit(C,A){this.events[C]&&this.events[C]?.forEach(I=>I(A))}}const Ei=new $T;class ZT{constructor(C,A,I){this.scene=C,this.gridEngine=A,this.quadtree=I,this.cursor=this.scene.input.keyboard?.createCursorKeys(),this.initializeWASDKeys()}initializeWASDKeys(){const C=this.scene.input.keyboard;C&&(this.wasdKeys={W:C.addKey(Phaser.Input.Keyboard.KeyCodes.W),A:C.addKey(Phaser.Input.Keyboard.KeyCodes.A),S:C.addKey(Phaser.Input.Keyboard.KeyCodes.S),D:C.addKey(Phaser.Input.Keyboard.KeyCodes.D)})}handleMovement(){if(!this.cursor)return;const C=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()}(C.left.isDown||A.A.isDown)&&(C.up.isDown||A.W.isDown)?this.gridEngine.move("player","up-left"):(C.left.isDown||A.A.isDown)&&(C.down.isDown||A.S.isDown)?this.gridEngine.move("player","down-left"):(C.right.isDown||A.D.isDown)&&(C.up.isDown||A.W.isDown)?this.gridEngine.move("player","up-right"):(C.right.isDown||A.D.isDown)&&(C.down.isDown||A.S.isDown)?this.gridEngine.move("player","down-right"):C.left.isDown||A.A.isDown?this.gridEngine.move("player","left"):C.right.isDown||A.D.isDown?this.gridEngine.move("player","right"):C.up.isDown||A.W.isDown?this.gridEngine.move("player","up"):(C.down.isDown||A.S.isDown)&&this.gridEngine.move("player","down")}}let uS=class extends Phaser.GameObjects.Sprite{};function jT(P,C,A){const c=P.add.graphics();c.fillStyle(16777215,1),c.fillRoundedRect(0,0,200,60,16),c.setDepth(99);const m=P.add.text(100,30,A,{fontFamily:"Arial",fontSize:16,color:"#000000"});m.setOrigin(.5),m.setWordWrapWidth(200-10*2),m.setDepth(100);const t=P.add.container(0,0,[c,m]);return t.setDepth(100),C.textBubble=t,eo(C),t}function eo(P){const C=P.textBubble;C&&(C.x=P.x,C.y=P.y-P.height-C.height/2)}function JT(P){return+P[P.length-1]}function QT(P){return P.startsWith("monster_bird_")&&!P.startsWith("monster_bird_shadow")}function Zf(P,C,A,I,B){const b=[];for(let c=0;c<10;c++){const m=P.add.sprite(0,0,"monster_bird");m.setCrop(C,A,I,B),m.scale=3,b.push(m)}return b}function kT(P){return Zf(P,0,0,61,47)}function qT(P){return Zf(P,22,47,16,10)}function _T(P){P.anims.create({key:"bird",frames:P.anims.generateFrameNumbers("monster_bird",{start:0,end:2}),frameRate:10,repeat:-1,yoyo:!0})}class dS extends Hn.GameObjects.Sprite{textBubble}class tS extends fo.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"CityScene"});const C={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new gs(C)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57});const C={health:"100",account:"Guest",mana:"100",inventory:[]};Ei.emit("playerEvent",C)}create(){const C=this.make.tilemap({key:"cloud-city-map"});C.addTilesetImage("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(C,I),this.loadRanges(),this.playerController=new ZT(this,this.gridEngine,this.quadtree),jT(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!"),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:b,enterTile:c})=>{QT(B)&&this.gridEngine.moveTo("monster_bird_shadow_"+JT(B),{x:c.x,y:c.y})}),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const C=[{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."};Ei.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"};Ei.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"};Ei.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"};Ei.emit("charEvent",A)}}];for(const A of C)this.quadtree.insert(A)}update(){this.playerController?.handleMovement(),this.npcSprite&&this.npcSprite.textBubble&&eo(this.npcSprite),this.fishNpcSprite&&this.fishNpcSprite.textBubble&&eo(this.fishNpcSprite)}}const eS=Qn.div` +*/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,A){console.log(`Talking to NPC with ID: ${S}`)}tradeWithNPC(S,A){console.log(`Trading with NPC with ID: ${S}`)}moveToNPC(S,A){const B=A?.coords||{x:10,y:15};jt.emit("playerMove",B)}stealFromNPC(S,A,I){const B={npcId:S,npcName:A,data:I};jt.emit("playerSteal",B)}startCombat(S,A){console.log(`Starting combat with NPC with ID: ${S}`)}checkFish(S,A){console.log(`Checking fish for NPC with ID: ${S}`)}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` // Your style here -`;function iS(){const P=ui.useRef(null);return ui.useEffect(()=>{if(P.current){const C=P.current,I={...{title:"CryptoThrone",render:{antialias:!1},scale:{mode:Hn.Scale.RESIZE,min:{width:1024,height:768},max:{width:1600,height:1200},zoom:1},type:Hn.AUTO,transparent:!0,width:800,height:600,physics:{default:"arcade",arcade:{gravity:{x:0,y:0},debug:!1}},plugins:{scene:[{key:"gridEngine",plugin:HT,mapping:"gridEngine"}]},scene:[KT,tS],input:{mouse:{preventDefaultWheel:!1},touch:{capture:!1}}},parent:C},B=new Hn.Game(I);return()=>{B.destroy(!0)}}},[]),Vt.jsx(eS,{children:Vt.jsx("div",{ref:P})})}function sS(P,C,A){let I=new Set([...C,void 0]);return P.listen((B,b)=>{I.has(b)&&A(B,b)})}function jf(P,C={}){let A=ui.useCallback(B=>C.keys?sS(P,C.keys,B):P.listen(B),[C.keys,P]),I=P.get.bind(P);return ui.useSyncExternalStore(A,I,I)}const Mu=Fu({message:""}),nS=()=>{const P=jf(Mu);ui.useEffect(()=>{const A=I=>{if(I){Mu.set(I);const B=document.querySelector("#hs-stacked-overlays");B&&(B.classList.remove("hidden"),B.classList.add("open"))}};return Ei.on("charEvent",A),()=>{Ei.off("charEvent",A)}},[]);const C=()=>{const A=document.querySelector("#hs-stacked-overlays");A&&(A.classList.add("hidden"),A.classList.remove("open"))};return Vt.jsx(Vt.Fragment,{children:Vt.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:Vt.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:Vt.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(${P.background_image||"https://kbve.com/assets/img/curved-images/wave.jpg"})`},children:[Vt.jsxs("div",{className:"w-full lg:w-1/3 p-4 rounded-l-xl flex flex-col items-center justify-center",children:[Vt.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4",children:`${P.character_name||"NPC"}`}),Vt.jsx("img",{src:P.character_image||"/assets/npc/barkeep.webp",alt:"Character",className:"w-full h-auto rounded-md"})]}),Vt.jsxs("div",{className:"w-full lg:w-2/3 p-4 bg-cover bg-center rounded-r-xl",children:[Vt.jsxs("div",{className:"flex justify-between items-center pb-3 border-b",children:[Vt.jsx("h3",{className:"font-bold text-yellow-400",children:""}),Vt.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:C,children:[Vt.jsx("span",{className:"sr-only",children:"Close"}),Vt.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:[Vt.jsx("path",{d:"M18 6 6 18"}),Vt.jsx("path",{d:"m6 6 12 12"})]})]})]}),Vt.jsx("div",{className:"p-4 overflow-y-auto",children:Vt.jsx("p",{className:"mt-1 mb-2 text-yellow-400 bg-zinc-950/80 rounded-xl p-4",children:P.message||"No Message"})}),Vt.jsx("div",{className:"flex justify-end items-center gap-x-2 py-3 px-4 border-t",children:Vt.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:C,children:[Vt.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"}),Vt.jsx("span",{className:"relative",children:"Okay."})]})})]})]})})})})},wu=Fu({health:"",account:"",mana:"",inventory:[]}),rS=()=>{const P=jf(wu);return ui.useEffect(()=>{const C=A=>{A&&wu.set(A)};return Ei.on("playerEvent",C),()=>{Ei.off("playerEvent",C)}},[]),Vt.jsxs("div",{className:"fixed top-1/2 left-0 transform -translate-y-1/2 translate-x-10 w-64 p-4 bg-zinc-800 text-yellow-400 border border-yellow-300 rounded-lg z-50",children:[Vt.jsxs("div",{className:"mb-4",children:[Vt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Stats"}),Vt.jsx("p",{className:"text-sm text-green-400",children:`HP: ${P.health||"0"} / 100`}),Vt.jsx("p",{className:"text-sm text-blue-400",children:`MP: ${P.mana||"0"} / 100`})]}),Vt.jsxs("div",{className:"mb-4",children:[Vt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"User Information"}),Vt.jsx("p",{className:"text-sm",children:P.account})]}),Vt.jsxs("div",{className:"mb-4",children:[Vt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"General Information"}),Vt.jsx("p",{className:"text-sm",children:P.inventory})]})]})},aS=Qn.div` +`;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-[300px] 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.npcId,E.npcName,E.data)}};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-[300px] 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: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` // Your style here -`;function cS(){return Vt.jsxs(aS,{children:[Vt.jsx(rS,{}),Vt.jsx(iS,{}),Vt.jsx(nS,{})]})}export{cS as default}; +`;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}; diff --git a/docs/_astro/JukeboxPlayer.CbcLpAqv.js b/docs/_astro/JukeboxPlayer.CbcLpAqv.js deleted file mode 100644 index 539f296..0000000 --- a/docs/_astro/JukeboxPlayer.CbcLpAqv.js +++ /dev/null @@ -1,3 +0,0 @@ -import{S as me,i as ve,s as ge,e as _,a as x,t as Y,v as be,c as w,h as d,d as E,b as B,f as K,g as Z,j as y,w as C,l as v,k,n as L,o as oe,p as re,q as _e,r as we,u as ce,x as ke,y as Te}from"./index.BUYXiDtP.js";import{e as ue}from"./each.-gASlQSi.js";import{p as X,a as je}from"./index.NMdaWTAX.js";import"./index.CEvxOxeV.js";let te=0,de=[];function Se(){return te+=1,()=>{if(te-=1,te===0){let e=de;de=[];for(let s of e)s()}}}function xe(e){let s=Se();return e().finally(s)}const Ee=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;X("atlas",{plugin:[]},{encode:JSON.stringify,decode:JSON.parse});const se=X("musicData",{items:[]},{encode:JSON.stringify,decode:JSON.parse}),W=X("tagSettings",{},{encode:JSON.stringify,decode:JSON.parse}),Oe=xe(async()=>{const e=await fetch("/api/music.json");if(!e.ok)throw new Error("Failed to fetch music data");const s=await e.json();return se.set(s),s}),Pe=[{i:"a",x:0,y:0,w:4,h:16,moved:!1,static:!0},{i:"b",x:4,y:0,w:4,h:16,moved:!1,static:!0},{i:"c",x:8,y:0,w:4,h:16,moved:!1,static:!0},{i:"d",x:4,y:16,w:4,h:4,moved:!1,static:!1},{i:"e",x:4,y:8,w:4,h:4,moved:!1,static:!1},{i:"f",x:8,y:16,w:4,h:4,moved:!1,static:!1},{i:"g",x:4,y:12,w:4,h:4,moved:!1,static:!1},{i:"h",x:8,y:12,w:4,h:4,moved:!1,static:!1},{i:"i",x:0,y:16,w:4,h:4,moved:!1,static:!1},{i:"j",x:8,y:0,w:4,h:16,moved:!1,static:!1}];X("layoutKey",Pe,{encode:JSON.stringify,decode:JSON.parse});je("kbve:");const{document:fe}=Ee;function he(e,s,c){const a=e.slice();return a[22]=s[c],a}function pe(e){let s,c=e[22]+"",a,f,m,T;function O(){return e[11](e[22])}return{c(){s=_("button"),a=Y(c),f=x(),this.h()},l(u){s=w(u,"BUTTON",{class:!0});var h=B(s);a=K(h,c),f=E(h),h.forEach(d),this.h()},h(){y(s,"class","relative z-1 px-3 py-1 text-sm font-medium border rounded-md hover:scale-110 ease-in-out duration-500"),C(s,"opacity-100",e[4][e[22]]),C(s,"opacity-50",!e[4][e[22]])},m(u,h){k(u,s,h),v(s,a),v(s,f),m||(T=L(s,"click",O),m=!0)},p(u,h){e=u,h&16&&c!==(c=e[22]+"")&&oe(a,c),h&16&&C(s,"opacity-100",e[4][e[22]]),h&16&&C(s,"opacity-50",!e[4][e[22]])},d(u){u&&d(s),m=!1,T()}}}function Ne(e){let s,c,a,f,m,T,O,u,h,P,V,j,U="Sync",M,S,J="Skip",I,g,D=e[1]?"Disable Force Play":"Enable Force Play",z,A,N,q,b,t=`

To view this video please enable JavaScript, and consider upgrading to a web - browser that - supports HTML5 video

`,l,n,G="Currently Playing Video ID:",Q,H,$,ae,F=ue(Object.keys(e[4])),p=[];for(let o=0;oc(4,a=t)),ce(e,se,t=>c(15,f=t));let m,T=!1,O=!1,u="",h=!1,P=!0,V=!1;ke(()=>{O=!0,console.log("Mounted"),j().then(()=>{O&&T&&S()})}),Te(()=>{O=!1,m&&m.dispose()});async function j(){try{await new Promise((t,l)=>{const n=document.createElement("script");n.src="https://unpkg.com/video.js/dist/video.min.js",n.onload=t,n.onerror=()=>l(new Error("Failed to load Video.js")),document.head.appendChild(n)}),await new Promise((t,l)=>{const n=document.createElement("script");n.src="https://unpkg.com/videojs-youtube/dist/Youtube.min.js",n.onload=t,n.onerror=()=>l(new Error("Failed to load YouTube plugin")),document.head.appendChild(n)}),T=!0}catch(t){console.error("Error loading scripts:",t)}}async function U(){Oe.then(()=>{console.log("Music data has been successfully updated.")}).catch(t=>{console.error("Error updating music data:",t)})}function M(){const t={};f.items.forEach(l=>{l.tags.forEach(n=>{n!=="music"&&(t[n]=!0)})}),W.set(t)}async function S(){if(f.items.length===0)try{await U(),console.log("Music Data Loaded:",f.items)}catch(t){console.error("Failed to fetch music data:",t);return}Object.keys(a).length===0?(console.log("Initializing tags from music data..."),M()):console.log("Tags already initialized:",a),J()}function J(){if(typeof videojs<"u"&&videojs.getTech("youtube")){const t=Ve("yt"),l=I();if(l.length===0&&(!t||!ye(t)))return;const n=t&&ye(t)?t:l[Math.floor(Math.random()*l.length)];m=videojs("video-js",{techOrder:["youtube"],sources:[{type:"video/youtube",src:`https://www.youtube.com/watch?v=${n}`}],youtube:{iv_load_policy:3},controls:!0,autoplay:!0,preload:"auto"}),m.on("pause",()=>{}),m.on("ended",g),c(0,u=n)}else setTimeout(J,100)}function I(){let t=[];return f.items.forEach(l=>{l.tags.some(G=>a[G]===!0)&&(P&&(t=t.concat(l.ytTracks)),V&&(t=t.concat(l.ytSets)))}),t}function g(){const t=I();if(t.length===0)return;const l=t[Math.floor(Math.random()*t.length)];m.src({type:"video/youtube",src:`https://www.youtube.com/watch?v=${l}`}),m.play(),c(0,u=l)}function D(t){const l={...a,[t]:!a[t]};W.set(l)}async function z(){se.set({items:[]}),W.set({});try{await U(),M(),J(),console.log("Data and tags have been synchronized."),window.location.reload()}catch(t){console.error("Error during synchronization:",t)}}return[u,h,P,V,a,g,D,z,()=>c(2,P=!P),()=>c(3,V=!V),()=>c(1,h=!h),t=>D(t)]}class ze extends me{constructor(s){super(),ve(this,s,De,Ne,ge,{})}}export{ze as default}; diff --git a/docs/_astro/JukeboxPlayer.JZvzSQHP.js b/docs/_astro/JukeboxPlayer.JZvzSQHP.js new file mode 100644 index 0000000..5869ec7 --- /dev/null +++ b/docs/_astro/JukeboxPlayer.JZvzSQHP.js @@ -0,0 +1,3 @@ +import{S as pe,i as me,s as ye,e as _,a as x,t as K,v as ve,c as w,h as u,d as E,b as B,f as R,g as Z,j as m,w as C,l as v,k,n as L,o as te,p as le,q as ge,r as be,u as re,x as _e,y as we}from"./index.BUYXiDtP.js";import{e as ce}from"./each.-gASlQSi.js";import{p as X,b as ke}from"./index.DxhZiom7.js";import{t as Te}from"./index.BH1EYZ08.js";const je=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;X("atlas",{plugin:[]},{encode:JSON.stringify,decode:JSON.parse});const oe=X("musicData",{items:[]},{encode:JSON.stringify,decode:JSON.parse}),W=X("tagSettings",{},{encode:JSON.stringify,decode:JSON.parse}),Se=Te(async()=>{const o=await fetch("/api/music.json");if(!o.ok)throw new Error("Failed to fetch music data");const a=await o.json();return oe.set(a),a}),xe=[{i:"a",x:0,y:0,w:4,h:16,moved:!1,static:!0},{i:"b",x:4,y:0,w:4,h:16,moved:!1,static:!0},{i:"c",x:8,y:0,w:4,h:16,moved:!1,static:!0},{i:"d",x:4,y:16,w:4,h:4,moved:!1,static:!1},{i:"e",x:4,y:8,w:4,h:4,moved:!1,static:!1},{i:"f",x:8,y:16,w:4,h:4,moved:!1,static:!1},{i:"g",x:4,y:12,w:4,h:4,moved:!1,static:!1},{i:"h",x:8,y:12,w:4,h:4,moved:!1,static:!1},{i:"i",x:0,y:16,w:4,h:4,moved:!1,static:!1},{i:"j",x:8,y:0,w:4,h:16,moved:!1,static:!1}];X("layoutKey",xe,{encode:JSON.stringify,decode:JSON.parse});ke("kbve:");const{document:de}=je;function ue(o,a,c){const s=o.slice();return s[22]=a[c],s}function fe(o){let a,c=o[22]+"",s,f,y,T;function O(){return o[11](o[22])}return{c(){a=_("button"),s=K(c),f=x(),this.h()},l(d){a=w(d,"BUTTON",{class:!0});var h=B(a);s=R(h,c),f=E(h),h.forEach(u),this.h()},h(){m(a,"class","relative z-1 px-3 py-1 text-sm font-medium border rounded-md hover:scale-110 ease-in-out duration-500"),C(a,"opacity-100",o[4][o[22]]),C(a,"opacity-50",!o[4][o[22]])},m(d,h){k(d,a,h),v(a,s),v(a,f),y||(T=L(a,"click",O),y=!0)},p(d,h){o=d,h&16&&c!==(c=o[22]+"")&&te(s,c),h&16&&C(a,"opacity-100",o[4][o[22]]),h&16&&C(a,"opacity-50",!o[4][o[22]])},d(d){d&&u(a),y=!1,T()}}}function Ee(o){let a,c,s,f,y,T,O,d,h,P,V,j,U="Sync",M,S,J="Skip",I,g,D=o[1]?"Disable Force Play":"Enable Force Play",z,A,N,q,b,e=`

To view this video please enable JavaScript, and consider upgrading to a web + browser that + supports HTML5 video

`,l,n,G="Currently Playing Video ID:",Q,H,$,se,F=ce(Object.keys(o[4])),p=[];for(let t=0;tc(4,s=e)),re(o,oe,e=>c(15,f=e));let y,T=!1,O=!1,d="",h=!1,P=!0,V=!1;_e(()=>{O=!0,console.log("Mounted"),j().then(()=>{O&&T&&S()})}),we(()=>{O=!1,y&&y.dispose()});async function j(){try{await new Promise((e,l)=>{const n=document.createElement("script");n.src="https://unpkg.com/video.js/dist/video.min.js",n.onload=e,n.onerror=()=>l(new Error("Failed to load Video.js")),document.head.appendChild(n)}),await new Promise((e,l)=>{const n=document.createElement("script");n.src="https://unpkg.com/videojs-youtube/dist/Youtube.min.js",n.onload=e,n.onerror=()=>l(new Error("Failed to load YouTube plugin")),document.head.appendChild(n)}),T=!0}catch(e){console.error("Error loading scripts:",e)}}async function U(){Se.then(()=>{console.log("Music data has been successfully updated.")}).catch(e=>{console.error("Error updating music data:",e)})}function M(){const e={};f.items.forEach(l=>{l.tags.forEach(n=>{n!=="music"&&(e[n]=!0)})}),W.set(e)}async function S(){if(f.items.length===0)try{await U(),console.log("Music Data Loaded:",f.items)}catch(e){console.error("Failed to fetch music data:",e);return}Object.keys(s).length===0?(console.log("Initializing tags from music data..."),M()):console.log("Tags already initialized:",s),J()}function J(){if(typeof videojs<"u"&&videojs.getTech("youtube")){const e=Oe("yt"),l=I();if(l.length===0&&(!e||!he(e)))return;const n=e&&he(e)?e:l[Math.floor(Math.random()*l.length)];y=videojs("video-js",{techOrder:["youtube"],sources:[{type:"video/youtube",src:`https://www.youtube.com/watch?v=${n}`}],youtube:{iv_load_policy:3},controls:!0,autoplay:!0,preload:"auto"}),y.on("pause",()=>{}),y.on("ended",g),c(0,d=n)}else setTimeout(J,100)}function I(){let e=[];return f.items.forEach(l=>{l.tags.some(G=>s[G]===!0)&&(P&&(e=e.concat(l.ytTracks)),V&&(e=e.concat(l.ytSets)))}),e}function g(){const e=I();if(e.length===0)return;const l=e[Math.floor(Math.random()*e.length)];y.src({type:"video/youtube",src:`https://www.youtube.com/watch?v=${l}`}),y.play(),c(0,d=l)}function D(e){const l={...s,[e]:!s[e]};W.set(l)}async function z(){oe.set({items:[]}),W.set({});try{await U(),M(),J(),console.log("Data and tags have been synchronized."),window.location.reload()}catch(e){console.error("Error during synchronization:",e)}}return[d,h,P,V,s,g,D,z,()=>c(2,P=!P),()=>c(3,V=!V),()=>c(1,h=!h),e=>D(e)]}class Me extends pe{constructor(a){super(),me(this,a,Pe,Ee,ye,{})}}export{Me as default}; diff --git a/docs/_astro/ResumeApp.DMSiblfo.js b/docs/_astro/ResumeApp.DTTfIcsY.js similarity index 93% rename from docs/_astro/ResumeApp.DMSiblfo.js rename to docs/_astro/ResumeApp.DTTfIcsY.js index 16bbc9b..1ba184c 100644 --- a/docs/_astro/ResumeApp.DMSiblfo.js +++ b/docs/_astro/ResumeApp.DTTfIcsY.js @@ -1,4 +1,4 @@ -import{S as Cl,i as Al,s as Nl,e as a,a as v,t as E,c as s,b as m,g as He,d as y,f as w,h as b,j as l,k as cl,l as t,m as u,n as d,o as Tl,p as gl,q as vl,r as pl,u as Ul}from"./index.BUYXiDtP.js";import{e as kt}from"./each.-gASlQSi.js";import{p as Pl}from"./index.NMdaWTAX.js";import"./index.CEvxOxeV.js";const yl={basics:{name:"",label:"",image:"",email:"",phone:"",url:"",summary:"",location:{address:"",postalCode:"",city:"",countryCode:"",region:""},profiles:[{network:"",username:"",url:""}]},work:[],volunteer:[],education:[],awards:[],certificates:[],publications:[],skills:[],languages:[],interests:[],references:[],projects:[]},_=Pl("resume",yl,{encode(e){return JSON.stringify(e)},decode(e){try{return JSON.parse(e)}catch{return yl}}}),me=e=>{_.set({..._.get(),basics:{..._.get().basics,...e}})},Il=e=>{_.set({..._.get(),basics:{..._.get().basics,profiles:[..._.get().basics.profiles,e]}})},dl=(e,o)=>{const p=[..._.get().basics.profiles];p[e]={...p[e],...o},_.set({..._.get(),basics:{..._.get().basics,profiles:p}})},Bl=e=>{const o=[..._.get().basics.profiles];o.splice(e,1),_.set({..._.get(),basics:{..._.get().basics,profiles:o}})},Dl=e=>{_.set({..._.get(),work:[..._.get().work,e]})},st=(e,o)=>{const p=[..._.get().work];p[e]={...p[e],...o},_.set({..._.get(),work:p})},Rl=e=>{const o=[..._.get().work];o.splice(e,1),_.set({..._.get(),work:o})};function kl(e,o,p){const T=e.slice();return T[97]=o[p],T[98]=o,T[99]=p,T}function El(e,o,p){const T=e.slice();return T[100]=o[p],T[101]=o,T[99]=p,T}function wl(e){let o,p,T,n,f,g,F,A,X,P,I,C,z,U,O="Remove",D,Y;function ee(){e[35].call(n,e[101],e[99])}function j(){return e[36](e[99],e[100])}function G(){e[37].call(A,e[101],e[99])}function te(){return e[38](e[99],e[100])}function le(){e[39].call(C,e[101],e[99])}function J(){return e[40](e[99],e[100])}function V(){return e[41](e[99])}return{c(){o=a("div"),p=a("label"),T=E(`Network: +import{S as Cl,i as Al,s as Nl,e as a,a as v,t as E,c as s,b as m,g as He,d as y,f as w,h as b,j as l,k as cl,l as t,m as u,n as d,o as Tl,p as gl,q as vl,r as pl,u as Ul}from"./index.BUYXiDtP.js";import{e as kt}from"./each.-gASlQSi.js";import{p as Pl}from"./index.DxhZiom7.js";const yl={basics:{name:"",label:"",image:"",email:"",phone:"",url:"",summary:"",location:{address:"",postalCode:"",city:"",countryCode:"",region:""},profiles:[{network:"",username:"",url:""}]},work:[],volunteer:[],education:[],awards:[],certificates:[],publications:[],skills:[],languages:[],interests:[],references:[],projects:[]},_=Pl("resume",yl,{encode(e){return JSON.stringify(e)},decode(e){try{return JSON.parse(e)}catch{return yl}}}),me=e=>{_.set({..._.get(),basics:{..._.get().basics,...e}})},Il=e=>{_.set({..._.get(),basics:{..._.get().basics,profiles:[..._.get().basics.profiles,e]}})},dl=(e,o)=>{const p=[..._.get().basics.profiles];p[e]={...p[e],...o},_.set({..._.get(),basics:{..._.get().basics,profiles:p}})},Bl=e=>{const o=[..._.get().basics.profiles];o.splice(e,1),_.set({..._.get(),basics:{..._.get().basics,profiles:o}})},Dl=e=>{_.set({..._.get(),work:[..._.get().work,e]})},st=(e,o)=>{const p=[..._.get().work];p[e]={...p[e],...o},_.set({..._.get(),work:p})},Rl=e=>{const o=[..._.get().work];o.splice(e,1),_.set({..._.get(),work:o})};function kl(e,o,p){const T=e.slice();return T[97]=o[p],T[98]=o,T[99]=p,T}function El(e,o,p){const T=e.slice();return T[100]=o[p],T[101]=o,T[99]=p,T}function wl(e){let o,p,T,n,f,g,F,A,X,P,I,C,z,U,O="Remove",D,Y;function ee(){e[35].call(n,e[101],e[99])}function j(){return e[36](e[99],e[100])}function G(){e[37].call(A,e[101],e[99])}function te(){return e[38](e[99],e[100])}function le(){e[39].call(C,e[101],e[99])}function J(){return e[40](e[99],e[100])}function V(){return e[41](e[99])}return{c(){o=a("div"),p=a("label"),T=E(`Network: `),n=a("input"),f=v(),g=a("label"),F=E(`Username: `),A=a("input"),X=v(),P=a("label"),I=E(`URL: `),C=a("input"),z=v(),U=a("button"),U.textContent=O,this.h()},l(B){o=s(B,"DIV",{class:!0});var N=m(o);p=s(N,"LABEL",{class:!0});var W=m(p);T=w(W,`Network: @@ -62,4 +62,4 @@ import{S as Cl,i as Al,s as Nl,e as a,a as v,t as E,c as s,b as m,g as He,d as y `),Oe=s(rl,"INPUT",{type:!0,class:!0}),rl.forEach(b),Rt=y(x),et=s(x,"LABEL",{class:!0});var ol=m(et);St=w(ol,`End Date: `),We=s(ol,"INPUT",{type:!0,class:!0}),ol.forEach(b),Ht=y(x),tt=s(x,"LABEL",{class:!0});var ul=m(tt);Ot=w(ul,`Summary: `),qe=s(ul,"TEXTAREA",{class:!0}),m(qe).forEach(b),ul.forEach(b),Wt=y(x),lt=s(x,"LABEL",{class:!0});var il=m(lt);qt=w(il,`Highlights: - `),De=s(il,"TEXTAREA",{class:!0}),m(De).forEach(b),il.forEach(b),Xt=y(x),Re=s(x,"BUTTON",{type:!0,class:!0,"data-svelte-h":!0}),He(Re)!=="svelte-17cxqfe"&&(Re.textContent=ml),x.forEach(b),ct.forEach(b),c.forEach(b),jt=y(k),ot=s(k,"PRE",{class:!0});var fl=m(ot);yt=w(fl,ft),fl.forEach(b),k.forEach(b),this.h()},h(){l(p,"class","text-3xl font-bold text-cyan-600"),l(g,"class","text-2xl font-semibold text-yellow-600"),l(I,"type","text"),l(I,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(X,"class","block mt-4"),l(O,"type","text"),l(O,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(z,"class","block mt-4"),l(j,"type","text"),l(j,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(Y,"class","block mt-4"),l(J,"type","email"),l(J,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(te,"class","block mt-4"),l(W,"type","tel"),l(W,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(B,"class","block mt-4"),l(se,"type","url"),l(se,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(M,"class","block mt-4"),l(ue,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(pe,"class","block mt-4"),l(_e,"class","text-lg font-semibold"),l(ne,"type","text"),l(ne,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(fe,"class","block mt-4"),l(re,"type","text"),l(re,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(ge,"class","block mt-4"),l(Z,"type","text"),l(Z,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(q,"class","block mt-4"),l($,"type","text"),l($,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(ie,"class","block mt-4"),l(be,"type","text"),l(be,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(de,"class","block mt-4"),l(S,"class","mt-4"),l(Ce,"class","text-lg font-semibold"),l(ve,"type","text"),l(ve,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(Ae,"class","block"),l(Ne,"type","text"),l(Ne,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(h,"class","block mt-4"),l(Te,"type","url"),l(Te,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(Ke,"class","block mt-4"),l(Ue,"type","button"),l(Ue,"class","mt-2 bg-cyan-500 text-white px-3 py-1 rounded"),l(oe,"class","mt-4"),l(ce,"class","mt-4"),l(Qe,"class","text-lg font-semibold"),l(Pe,"type","text"),l(Pe,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(Ye,"class","block"),l(Ie,"type","text"),l(Ie,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(Ze,"class","block mt-4"),l(Be,"type","url"),l(Be,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l($e,"class","block mt-4"),l(Oe,"type","date"),l(Oe,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(xe,"class","block mt-4"),l(We,"type","date"),l(We,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(et,"class","block mt-4"),l(qe,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(tt,"class","block mt-4"),l(De,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(lt,"class","block mt-4"),l(Re,"type","button"),l(Re,"class","mt-2 bg-cyan-500 text-white px-3 py-1 rounded"),l(H,"class","mt-4"),l(ye,"class","mt-4"),l(f,"class","mt-6"),l(ot,"class","mt-6 p-4 bg-gray-100 rounded-md shadow-md"),l(o,"class","p-6 max-w-3xl mx-auto")},m(r,k){cl(r,o,k),t(o,p),t(o,n),t(o,f),t(f,g),t(f,A),t(f,X),t(X,P),t(X,I),u(I,e[0].basics.name),t(f,C),t(f,z),t(z,U),t(z,O),u(O,e[0].basics.label),t(f,D),t(f,Y),t(Y,ee),t(Y,j),u(j,e[0].basics.image),t(f,G),t(f,te),t(te,le),t(te,J),u(J,e[0].basics.email),t(f,V),t(f,B),t(B,N),t(B,W),u(W,e[0].basics.phone),t(f,R),t(f,M),t(M,ae),t(M,se),u(se,e[0].basics.url),t(f,ke),t(f,pe),t(pe,je),t(pe,ue),u(ue,e[0].basics.summary),t(f,Ge),t(f,S),t(S,_e),t(S,Je),t(S,fe),t(fe,Ve),t(fe,ne),u(ne,e[0].basics.location.address),t(S,Fe),t(S,ge),t(ge,ze),t(ge,re),u(re,e[0].basics.location.postalCode),t(S,Me),t(S,q),t(q,L),t(q,Z),u(Z,e[0].basics.location.city),t(S,Ee),t(S,ie),t(ie,we),t(ie,$),u($,e[0].basics.location.countryCode),t(S,Le),t(S,de),t(de,pt),t(de,be),u(be,e[0].basics.location.region),t(f,bt),t(f,ce),t(ce,Ce),t(ce,ht);for(let c=0;cp(0,n=i));let f={network:"",username:"",url:""},g={name:"",position:"",url:"",startDate:"",endDate:"",summary:"",highlights:[]},F="";const A=()=>{Il(f),p(1,f={network:"",username:"",url:""})},X=i=>{Bl(i)},P=()=>{Dl(g),p(2,g={name:"",position:"",url:"",startDate:"",endDate:"",summary:"",highlights:[]}),p(3,F="")},I=i=>{Rl(i)};function C(i,h){const _t=i.target;st(h,{highlights:_t.value.split(",")})}function z(i){const h=i.target;p(3,F=h.value),p(2,g.highlights=F.split(","),g)}function U(){n.basics.name=this.value,_.set(n)}const O=()=>me({name:n.basics.name});function D(){n.basics.label=this.value,_.set(n)}const Y=()=>me({label:n.basics.label});function ee(){n.basics.image=this.value,_.set(n)}const j=()=>me({image:n.basics.image});function G(){n.basics.email=this.value,_.set(n)}const te=()=>me({email:n.basics.email});function le(){n.basics.phone=this.value,_.set(n)}const J=()=>me({phone:n.basics.phone});function V(){n.basics.url=this.value,_.set(n)}const B=()=>me({url:n.basics.url});function N(){n.basics.summary=this.value,_.set(n)}const W=()=>me({summary:n.basics.summary});function R(){n.basics.location.address=this.value,_.set(n)}const M=()=>me({location:{...n.basics.location,address:n.basics.location.address}});function ae(){n.basics.location.postalCode=this.value,_.set(n)}const se=()=>me({location:{...n.basics.location,postalCode:n.basics.location.postalCode}});function ke(){n.basics.location.city=this.value,_.set(n)}const pe=()=>me({location:{...n.basics.location,city:n.basics.location.city}});function je(){n.basics.location.countryCode=this.value,_.set(n)}const ue=()=>me({location:{...n.basics.location,countryCode:n.basics.location.countryCode}});function Ge(){n.basics.location.region=this.value,_.set(n)}const S=()=>me({location:{...n.basics.location,region:n.basics.location.region}});function _e(i,h){i[h].network=this.value,_.set(n)}const nt=(i,h)=>dl(i,{network:h.network});function Je(i,h){i[h].username=this.value,_.set(n)}const fe=(i,h)=>dl(i,{username:h.username});function Ve(i,h){i[h].url=this.value,_.set(n)}const ne=(i,h)=>dl(i,{url:h.url}),Fe=i=>X(i);function ge(){f.network=this.value,p(1,f)}function ze(){f.username=this.value,p(1,f)}function re(){f.url=this.value,p(1,f)}function Me(i,h){i[h].name=this.value,_.set(n)}const q=(i,h)=>st(i,{name:h.name});function L(i,h){i[h].position=this.value,_.set(n)}const Z=(i,h)=>st(i,{position:h.position});function Ee(i,h){i[h].url=this.value,_.set(n)}const ie=(i,h)=>st(i,{url:h.url});function we(i,h){i[h].startDate=this.value,_.set(n)}const $=(i,h)=>st(i,{startDate:h.startDate});function Le(i,h){i[h].endDate=this.value,_.set(n)}const de=(i,h)=>st(i,{endDate:h.endDate});function pt(i,h){i[h].summary=this.value,_.set(n)}const be=(i,h)=>st(i,{summary:h.summary});function bt(i){T[i]=this.value,p(4,T),p(0,n)}const ce=(i,h)=>C(h,i),Ce=i=>I(i);function gt(){g.name=this.value,p(2,g)}function ht(){g.position=this.value,p(2,g)}function rt(){g.url=this.value,p(2,g)}function oe(){g.startDate=this.value,p(2,g)}function Ae(){g.endDate=this.value,p(2,g)}function mt(){g.summary=this.value,p(2,g)}function ve(){F=this.value,p(3,F)}return e.$$.update=()=>{e.$$.dirty[0]&1&&p(4,T=n.work.map(i=>i.highlights.join(",")))},[n,f,g,F,T,A,X,P,I,C,z,U,O,D,Y,ee,j,G,te,le,J,V,B,N,W,R,M,ae,se,ke,pe,je,ue,Ge,S,_e,nt,Je,fe,Ve,ne,Fe,ge,ze,re,Me,q,L,Z,Ee,ie,we,$,Le,de,pt,be,bt,ce,Ce,gt,ht,rt,oe,Ae,mt,ve]}class jl extends Cl{constructor(o){super(),Al(this,o,Hl,Sl,Nl,{},null,[-1,-1,-1,-1])}}export{jl as default}; + `),De=s(il,"TEXTAREA",{class:!0}),m(De).forEach(b),il.forEach(b),Xt=y(x),Re=s(x,"BUTTON",{type:!0,class:!0,"data-svelte-h":!0}),He(Re)!=="svelte-17cxqfe"&&(Re.textContent=ml),x.forEach(b),ct.forEach(b),c.forEach(b),jt=y(k),ot=s(k,"PRE",{class:!0});var fl=m(ot);yt=w(fl,ft),fl.forEach(b),k.forEach(b),this.h()},h(){l(p,"class","text-3xl font-bold text-cyan-600"),l(g,"class","text-2xl font-semibold text-yellow-600"),l(I,"type","text"),l(I,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(X,"class","block mt-4"),l(O,"type","text"),l(O,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(z,"class","block mt-4"),l(j,"type","text"),l(j,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(Y,"class","block mt-4"),l(J,"type","email"),l(J,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(te,"class","block mt-4"),l(W,"type","tel"),l(W,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(B,"class","block mt-4"),l(se,"type","url"),l(se,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(M,"class","block mt-4"),l(ue,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(pe,"class","block mt-4"),l(_e,"class","text-lg font-semibold"),l(ne,"type","text"),l(ne,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(fe,"class","block mt-4"),l(re,"type","text"),l(re,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(ge,"class","block mt-4"),l(Z,"type","text"),l(Z,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(q,"class","block mt-4"),l($,"type","text"),l($,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(ie,"class","block mt-4"),l(be,"type","text"),l(be,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(de,"class","block mt-4"),l(S,"class","mt-4"),l(Ce,"class","text-lg font-semibold"),l(ve,"type","text"),l(ve,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(Ae,"class","block"),l(Ne,"type","text"),l(Ne,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(h,"class","block mt-4"),l(Te,"type","url"),l(Te,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(Ke,"class","block mt-4"),l(Ue,"type","button"),l(Ue,"class","mt-2 bg-cyan-500 text-white px-3 py-1 rounded"),l(oe,"class","mt-4"),l(ce,"class","mt-4"),l(Qe,"class","text-lg font-semibold"),l(Pe,"type","text"),l(Pe,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(Ye,"class","block"),l(Ie,"type","text"),l(Ie,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(Ze,"class","block mt-4"),l(Be,"type","url"),l(Be,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l($e,"class","block mt-4"),l(Oe,"type","date"),l(Oe,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(xe,"class","block mt-4"),l(We,"type","date"),l(We,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(et,"class","block mt-4"),l(qe,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(tt,"class","block mt-4"),l(De,"class","mt-1 block w-full border border-gray-300 rounded-md shadow-sm p-2"),l(lt,"class","block mt-4"),l(Re,"type","button"),l(Re,"class","mt-2 bg-cyan-500 text-white px-3 py-1 rounded"),l(H,"class","mt-4"),l(ye,"class","mt-4"),l(f,"class","mt-6"),l(ot,"class","mt-6 p-4 bg-gray-100 rounded-md shadow-md"),l(o,"class","p-6 max-w-3xl mx-auto")},m(r,k){cl(r,o,k),t(o,p),t(o,n),t(o,f),t(f,g),t(f,A),t(f,X),t(X,P),t(X,I),u(I,e[0].basics.name),t(f,C),t(f,z),t(z,U),t(z,O),u(O,e[0].basics.label),t(f,D),t(f,Y),t(Y,ee),t(Y,j),u(j,e[0].basics.image),t(f,G),t(f,te),t(te,le),t(te,J),u(J,e[0].basics.email),t(f,V),t(f,B),t(B,N),t(B,W),u(W,e[0].basics.phone),t(f,R),t(f,M),t(M,ae),t(M,se),u(se,e[0].basics.url),t(f,ke),t(f,pe),t(pe,je),t(pe,ue),u(ue,e[0].basics.summary),t(f,Ge),t(f,S),t(S,_e),t(S,Je),t(S,fe),t(fe,Ve),t(fe,ne),u(ne,e[0].basics.location.address),t(S,Fe),t(S,ge),t(ge,ze),t(ge,re),u(re,e[0].basics.location.postalCode),t(S,Me),t(S,q),t(q,L),t(q,Z),u(Z,e[0].basics.location.city),t(S,Ee),t(S,ie),t(ie,we),t(ie,$),u($,e[0].basics.location.countryCode),t(S,Le),t(S,de),t(de,pt),t(de,be),u(be,e[0].basics.location.region),t(f,bt),t(f,ce),t(ce,Ce),t(ce,ht);for(let c=0;cp(0,n=i));let f={network:"",username:"",url:""},g={name:"",position:"",url:"",startDate:"",endDate:"",summary:"",highlights:[]},F="";const A=()=>{Il(f),p(1,f={network:"",username:"",url:""})},X=i=>{Bl(i)},P=()=>{Dl(g),p(2,g={name:"",position:"",url:"",startDate:"",endDate:"",summary:"",highlights:[]}),p(3,F="")},I=i=>{Rl(i)};function C(i,h){const _t=i.target;st(h,{highlights:_t.value.split(",")})}function z(i){const h=i.target;p(3,F=h.value),p(2,g.highlights=F.split(","),g)}function U(){n.basics.name=this.value,_.set(n)}const O=()=>me({name:n.basics.name});function D(){n.basics.label=this.value,_.set(n)}const Y=()=>me({label:n.basics.label});function ee(){n.basics.image=this.value,_.set(n)}const j=()=>me({image:n.basics.image});function G(){n.basics.email=this.value,_.set(n)}const te=()=>me({email:n.basics.email});function le(){n.basics.phone=this.value,_.set(n)}const J=()=>me({phone:n.basics.phone});function V(){n.basics.url=this.value,_.set(n)}const B=()=>me({url:n.basics.url});function N(){n.basics.summary=this.value,_.set(n)}const W=()=>me({summary:n.basics.summary});function R(){n.basics.location.address=this.value,_.set(n)}const M=()=>me({location:{...n.basics.location,address:n.basics.location.address}});function ae(){n.basics.location.postalCode=this.value,_.set(n)}const se=()=>me({location:{...n.basics.location,postalCode:n.basics.location.postalCode}});function ke(){n.basics.location.city=this.value,_.set(n)}const pe=()=>me({location:{...n.basics.location,city:n.basics.location.city}});function je(){n.basics.location.countryCode=this.value,_.set(n)}const ue=()=>me({location:{...n.basics.location,countryCode:n.basics.location.countryCode}});function Ge(){n.basics.location.region=this.value,_.set(n)}const S=()=>me({location:{...n.basics.location,region:n.basics.location.region}});function _e(i,h){i[h].network=this.value,_.set(n)}const nt=(i,h)=>dl(i,{network:h.network});function Je(i,h){i[h].username=this.value,_.set(n)}const fe=(i,h)=>dl(i,{username:h.username});function Ve(i,h){i[h].url=this.value,_.set(n)}const ne=(i,h)=>dl(i,{url:h.url}),Fe=i=>X(i);function ge(){f.network=this.value,p(1,f)}function ze(){f.username=this.value,p(1,f)}function re(){f.url=this.value,p(1,f)}function Me(i,h){i[h].name=this.value,_.set(n)}const q=(i,h)=>st(i,{name:h.name});function L(i,h){i[h].position=this.value,_.set(n)}const Z=(i,h)=>st(i,{position:h.position});function Ee(i,h){i[h].url=this.value,_.set(n)}const ie=(i,h)=>st(i,{url:h.url});function we(i,h){i[h].startDate=this.value,_.set(n)}const $=(i,h)=>st(i,{startDate:h.startDate});function Le(i,h){i[h].endDate=this.value,_.set(n)}const de=(i,h)=>st(i,{endDate:h.endDate});function pt(i,h){i[h].summary=this.value,_.set(n)}const be=(i,h)=>st(i,{summary:h.summary});function bt(i){T[i]=this.value,p(4,T),p(0,n)}const ce=(i,h)=>C(h,i),Ce=i=>I(i);function gt(){g.name=this.value,p(2,g)}function ht(){g.position=this.value,p(2,g)}function rt(){g.url=this.value,p(2,g)}function oe(){g.startDate=this.value,p(2,g)}function Ae(){g.endDate=this.value,p(2,g)}function mt(){g.summary=this.value,p(2,g)}function ve(){F=this.value,p(3,F)}return e.$$.update=()=>{e.$$.dirty[0]&1&&p(4,T=n.work.map(i=>i.highlights.join(",")))},[n,f,g,F,T,A,X,P,I,C,z,U,O,D,Y,ee,j,G,te,le,J,V,B,N,W,R,M,ae,se,ke,pe,je,ue,Ge,S,_e,nt,Je,fe,Ve,ne,Fe,ge,ze,re,Me,q,L,Z,Ee,ie,we,$,Le,de,pt,be,bt,ce,Ce,gt,ht,rt,oe,Ae,mt,ve]}class Xl extends Cl{constructor(o){super(),Al(this,o,Hl,Sl,Nl,{},null,[-1,-1,-1,-1])}}export{Xl as default}; diff --git a/docs/_astro/index.BH1EYZ08.js b/docs/_astro/index.BH1EYZ08.js new file mode 100644 index 0000000..787f1c8 --- /dev/null +++ b/docs/_astro/index.BH1EYZ08.js @@ -0,0 +1 @@ +let s=0,l=[];function r(){return s+=1,()=>{if(s-=1,s===0){let t=l;l=[];for(let e of t)e()}}}function n(t){let e=r();return t().finally(e)}export{n as t}; diff --git a/docs/_astro/index.CEvxOxeV.js b/docs/_astro/index.CEvxOxeV.js deleted file mode 100644 index 2836ebe..0000000 --- a/docs/_astro/index.CEvxOxeV.js +++ /dev/null @@ -1 +0,0 @@ -let l=[],a=(s,o)=>{let n=[],t={get(){return t.lc||t.listen(()=>{})(),t.value},l:o||0,lc:0,listen(i,u){return t.lc=n.push(i,u||t.l)/2,()=>{let e=n.indexOf(i);~e&&(n.splice(e,2),--t.lc||t.off())}},notify(i){let u=!l.length;for(let e=0;e: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-\[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-none{border-style:none}.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-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-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / 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-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-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-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-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-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-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-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-zinc-800{--tw-bg-opacity: 1;background-color:rgb(39 39 42 / 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-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}.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-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-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-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / 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))}.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-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}.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-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\: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\: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\/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))}.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-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-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-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\: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.Dv2NMtjF.css b/docs/_astro/index.Dv2NMtjF.css new file mode 100644 index 0000000..8cfa94c --- /dev/null +++ b/docs/_astro/index.Dv2NMtjF.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%}.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-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-\[300px\]{width:300px}.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}.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-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-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-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}.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-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-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.DxhZiom7.js b/docs/_astro/index.DxhZiom7.js new file mode 100644 index 0000000..988c53c --- /dev/null +++ b/docs/_astro/index.DxhZiom7.js @@ -0,0 +1 @@ +let u=[],g=(e,f)=>{let t=[],l={get(){return l.lc||l.listen(()=>{})(),l.value},l:f||0,lc:0,listen(s,i){return l.lc=t.push(s,i||l.l)/2,()=>{let n=t.indexOf(s);~n&&(t.splice(n,2),--l.lc||l.off())}},notify(s){let i=!u.length;for(let n=0;n(e.events=e.events||{},e.events[t+10]||(e.events[t+10]=l(s=>{e.events[t].reduceRight((i,n)=>(n(i),i),{shared:{},...s})})),e.events[t]=e.events[t]||[],e.events[t].push(f),()=>{let s=e.events[t],i=s.indexOf(f);s.splice(i,1),s.length||(delete e.events[t],e.events[t+10](),delete e.events[t+10])}),N=1e3,h=(e,f)=>L(e,l=>{let s=f(l);s&&e.events[6].push(s)},5,l=>{let s=e.listen;e.listen=(...n)=>(!e.lc&&!e.active&&(e.active=!0,l()),s(...n));let i=e.off;return e.events[6]=[],e.off=()=>{i(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let n of e.events[6])n();e.events[6]=[]}},N)},()=>{e.listen=s,e.off=i}}),U=(e={})=>{let f=g(e);return f.setKey=function(t,l){typeof l>"u"?t in f.value&&(f.value={...f.value},delete f.value[t],f.notify(t)):f.value[t]!==l&&(f.value={...f.value,[t]:l},f.notify(t))},f},T=e=>e,E={},a={addEventListener(){},removeEventListener(){}};function M(){try{return typeof localStorage<"u"}catch{return!1}}M()&&(E=localStorage);let O={addEventListener(e,f,t){window.addEventListener("storage",f),window.addEventListener("pageshow",t)},removeEventListener(e,f,t){window.removeEventListener("storage",f),window.removeEventListener("pageshow",t)}};typeof window<"u"&&(a=O);function y(e,f=void 0,t={}){let l=t.encode||T,s=t.decode||T,i=g(f),n=i.set;i.set=d=>{typeof d>"u"?delete E[e]:E[e]=l(d),n(d)};function c(d){d.key===e?d.newValue===null?n(void 0):n(s(d.newValue)):E[e]||n(void 0)}function o(){i.set(E[e]?s(E[e]):f)}return h(i,()=>{if(o(),t.listen!==!1)return a.addEventListener(e,c,o),()=>{a.removeEventListener(e,c,o)}}),i}function R(e,f={},t={}){let l=t.encode||T,s=t.decode||T,i=U(),n=i.setKey;i.setKey=(r,v)=>{typeof v>"u"?(t.listen!==!1&&a.perKey&&a.removeEventListener(e+r,o,d),delete E[e+r]):(t.listen!==!1&&a.perKey&&!(r in i.value)&&a.addEventListener(e+r,o,d),E[e+r]=l(v)),n(r,v)};let c=i.set;i.set=function(r){for(let v in r)i.setKey(v,r[v]);for(let v in i.value)v in r||i.setKey(v)};function o(r){r.key?r.key.startsWith(e)&&(r.newValue===null?n(r.key.slice(e.length),void 0):n(r.key.slice(e.length),s(r.newValue))):c({})}function d(){let r={...f};for(let v in E)v.startsWith(e)&&(r[v.slice(e.length)]=s(E[v]));i.set(r)}return h(i,()=>{if(d(),t.listen!==!1)return a.addEventListener(e,o,d),()=>{a.removeEventListener(e,o,d);for(let r in i.value)a.removeEventListener(e+r,o,d)}}),i}export{g as a,R as b,y as p}; diff --git a/docs/_astro/index.NMdaWTAX.js b/docs/_astro/index.NMdaWTAX.js deleted file mode 100644 index 02030c5..0000000 --- a/docs/_astro/index.NMdaWTAX.js +++ /dev/null @@ -1 +0,0 @@ -import{a as h}from"./index.CEvxOxeV.js";const w=5,E=6,L=10;let m=(e,i,t,r)=>(e.events=e.events||{},e.events[t+L]||(e.events[t+L]=r(l=>{e.events[t].reduceRight((n,d)=>(d(n),n),{shared:{},...l})})),e.events[t]=e.events[t]||[],e.events[t].push(i),()=>{let l=e.events[t],n=l.indexOf(i);l.splice(n,1),l.length||(delete e.events[t],e.events[t+L](),delete e.events[t+L])}),T=1e3,y=(e,i)=>m(e,r=>{let l=i(r);l&&e.events[E].push(l)},w,r=>{let l=e.listen;e.listen=(...d)=>(!e.lc&&!e.active&&(e.active=!0,r()),l(...d));let n=e.off;return e.events[E]=[],e.off=()=>{n(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let d of e.events[E])d();e.events[E]=[]}},T)},()=>{e.listen=l,e.off=n}}),M=(e={})=>{let i=h(e);return i.setKey=function(t,r){typeof r>"u"?t in i.value&&(i.value={...i.value},delete i.value[t],i.notify(t)):i.value[t]!==r&&(i.value={...i.value,[t]:r},i.notify(t))},i},g=e=>e,o={},v={addEventListener(){},removeEventListener(){}};function N(){try{return typeof localStorage<"u"}catch{return!1}}N()&&(o=localStorage);let U={addEventListener(e,i,t){window.addEventListener("storage",i),window.addEventListener("pageshow",t)},removeEventListener(e,i,t){window.removeEventListener("storage",i),window.removeEventListener("pageshow",t)}};typeof window<"u"&&(v=U);function O(e,i=void 0,t={}){let r=t.encode||g,l=t.decode||g,n=h(i),d=n.set;n.set=f=>{typeof f>"u"?delete o[e]:o[e]=r(f),d(f)};function c(f){f.key===e?f.newValue===null?d(void 0):d(l(f.newValue)):o[e]||d(void 0)}function a(){n.set(o[e]?l(o[e]):i)}return y(n,()=>{if(a(),t.listen!==!1)return v.addEventListener(e,c,a),()=>{v.removeEventListener(e,c,a)}}),n}function R(e,i={},t={}){let r=t.encode||g,l=t.decode||g,n=M(),d=n.setKey;n.setKey=(s,u)=>{typeof u>"u"?(t.listen!==!1&&v.perKey&&v.removeEventListener(e+s,a,f),delete o[e+s]):(t.listen!==!1&&v.perKey&&!(s in n.value)&&v.addEventListener(e+s,a,f),o[e+s]=r(u)),d(s,u)};let c=n.set;n.set=function(s){for(let u in s)n.setKey(u,s[u]);for(let u in n.value)u in s||n.setKey(u)};function a(s){s.key?s.key.startsWith(e)&&(s.newValue===null?d(s.key.slice(e.length),void 0):d(s.key.slice(e.length),l(s.newValue))):c({})}function f(){let s={...i};for(let u in o)u.startsWith(e)&&(s[u.slice(e.length)]=l(o[u]));n.set(s)}return y(n,()=>{if(f(),t.listen!==!1)return v.addEventListener(e,a,f),()=>{v.removeEventListener(e,a,f);for(let s in n.value)v.removeEventListener(e+s,a,f)}}),n}export{R as a,O as p}; diff --git a/docs/assets/entity/bard.png b/docs/assets/entity/bard.png new file mode 100644 index 0000000..1056797 Binary files /dev/null and b/docs/assets/entity/bard.png differ diff --git a/docs/assets/entity/fairies.png b/docs/assets/entity/fairies.png new file mode 100644 index 0000000..4f6c244 Binary files /dev/null and b/docs/assets/entity/fairies.png differ diff --git a/docs/assets/entity/ghost.png b/docs/assets/entity/ghost.png new file mode 100644 index 0000000..5081872 Binary files /dev/null and b/docs/assets/entity/ghost.png differ diff --git a/docs/assets/entity/jacko.png b/docs/assets/entity/jacko.png new file mode 100644 index 0000000..2fbdb04 Binary files /dev/null and b/docs/assets/entity/jacko.png differ diff --git a/docs/assets/entity/knights.png b/docs/assets/entity/knights.png new file mode 100644 index 0000000..f952fe9 Binary files /dev/null and b/docs/assets/entity/knights.png differ diff --git a/docs/assets/entity/monks.png b/docs/assets/entity/monks.png new file mode 100644 index 0000000..5d4bdc9 Binary files /dev/null and b/docs/assets/entity/monks.png differ diff --git a/docs/assets/entity/reaper_weapon.png b/docs/assets/entity/reaper_weapon.png new file mode 100644 index 0000000..097bea4 Binary files /dev/null and b/docs/assets/entity/reaper_weapon.png differ diff --git a/docs/assets/icons/hallowicons.png b/docs/assets/icons/hallowicons.png new file mode 100644 index 0000000..29d6f54 Binary files /dev/null and b/docs/assets/icons/hallowicons.png differ diff --git a/docs/assets/icons/notification.svg b/docs/assets/icons/notification.svg new file mode 100644 index 0000000..42d45a4 --- /dev/null +++ b/docs/assets/icons/notification.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/docs/assets/map/cloud_city_large.json b/docs/assets/map/cloud_city_large.json new file mode 100644 index 0000000..5f38861 --- /dev/null +++ b/docs/assets/map/cloud_city_large.json @@ -0,0 +1,1927 @@ +{ "compressionlevel":-1, + "editorsettings": + { + "export": + { + "target":"." + } + }, + "height":50, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49, 0, 0, 92, 362, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 364, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 417, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 414, 368, 417, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 411, 453, 453, 453, 410, 368, 368, 368, 369, 368, 368, 368, 411, 453, 453, 453, 410, 368, 368, 368, 368, 368, 368, 368, 414, 368, 368, 416, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 409, 242, 243, 244, 407, 368, 368, 368, 368, 368, 368, 368, 409, 242, 243, 244, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 409, 287, 288, 289, 407, 368, 368, 368, 368, 368, 368, 368, 409, 287, 288, 289, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 417, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 409, 332, 333, 334, 407, 368, 368, 368, 368, 368, 368, 368, 409, 332, 333, 334, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 366, 363, 363, 363, 365, 368, 368, 368, 368, 368, 368, 368, 366, 363, 363, 363, 365, 368, 368, 368, 368, 368, 368, 368, 368, 417, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 369, 368, 417, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 417, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 414, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 417, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 370, 368, 369, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 370, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 416, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 417, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 416, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 414, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 370, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 53, 54, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 409, 57, 58, 98, 93, 452, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 649, 650, 651, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 454, 93, 103, 63, 63, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 694, 695, 696, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 63, 63, 108, 108, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 739, 740, 741, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 108, 108, 108, 108, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 694, 695, 696, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 108, 108, 153, 153, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 739, 740, 741, 153, 153, 153, 153, 153, 153, 153, 153, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 153, 153, 188, 93, 362, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 784, 785, 786, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 364, 93, 193, 234, 190, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 102, 238, 0, 92, 407, 368, 368, 417, 368, 368, 368, 368, 368, 368, 368, 368, 368, 370, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 368, 368, 368, 370, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 368, 368, 368, 416, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 416, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 414, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 369, 368, 368, 368, 368, 368, 368, 368, 368, 416, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 416, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 417, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 417, 368, 368, 368, 409, 94, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 94, 0, 0, 92, 452, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 454, 94, 0, 0, 137, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 139, 0, 0, 182, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":50, + "id":1, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":50, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1111, 1112, 1113, 0, 1147, 1148, 1149, 0, 1111, 1112, 1113, 0, 0, 0, 0, 0, 1147, 1148, 1149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1156, 1157, 1158, 0, 0, 0, 0, 0, 1156, 1157, 1158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1059, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1060, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1111, 1112, 1113, 0, 1147, 1148, 1149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1147, 1148, 1149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1156, 1157, 1158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 967, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1151, 1152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":50, + "id":2, + "name":"Tile Layer 2", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":50, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":50, + "id":3, + "name":"Tile Layer 3", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":50, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1066, 1067, 1068, 0, 0, 0, 0, 0, 1066, 1067, 1068, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1066, 1067, 1068, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 884, 885, 886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1061, 1062, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 974, 975, 976, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1106, 1107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":50, + "id":4, + "name":"Tile Layer 4", + "opacity":1, + "properties":[ + { + "name":"ge_alwaysTop", + "type":"bool", + "value":true + }], + "type":"tilelayer", + "visible":true, + "width":50, + "x":0, + "y":0 + }], + "nextlayerid":5, + "nextobjectid":1, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.4.3", + "tileheight":16, + "tilesets":[ + { + "columns":45, + "firstgid":1, + "image":"cloud_tileset.png", + "imageheight":448, + "imagewidth":720, + "margin":0, + "name":"cloud_tileset", + "spacing":0, + "tilecount":1260, + "tileheight":16, + "tiles":[ + { + "id":46, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":47, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":48, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":49, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":50, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":52, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":53, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":54, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":55, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":56, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":57, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":61, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":62, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":63, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":64, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":65, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":66, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":67, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":68, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":69, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":70, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":71, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":72, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":73, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":74, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":75, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":76, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":77, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":78, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":79, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":80, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":81, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":82, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":83, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":91, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":92, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":93, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":94, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":95, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":97, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":98, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":99, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":100, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":101, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":102, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":106, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":107, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":108, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":109, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":110, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":111, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":112, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":113, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":114, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":115, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":116, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":117, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":118, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":119, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":120, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":121, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":122, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":123, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":124, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":125, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":126, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":127, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":128, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":136, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":137, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":138, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":142, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":143, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":144, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":145, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":146, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":147, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":151, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":152, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":153, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":154, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":155, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":156, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":157, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":158, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":159, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":160, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":161, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":162, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":163, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":164, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":165, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":166, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":167, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":168, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":169, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":170, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":171, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":172, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":173, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":181, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":182, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":183, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":187, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":188, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":189, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":190, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":191, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":192, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":232, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":233, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":234, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":235, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":236, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":237, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":241, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":242, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":243, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":247, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":248, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":249, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":253, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":254, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":255, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":259, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":260, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":261, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":286, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":287, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":288, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":292, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":293, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":294, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":298, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":299, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":300, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":304, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":305, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":306, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":331, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":332, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":333, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":337, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":338, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":339, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":343, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":344, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":345, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":349, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":350, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":351, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":361, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":362, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":363, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":364, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":365, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":406, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":407, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":408, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":409, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":410, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":451, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":452, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":453, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":541, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":542, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":543, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":586, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":587, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":588, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":631, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":632, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":633, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":648, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":650, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":693, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":695, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":738, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":740, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":783, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":785, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":966, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":967, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":969, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":972, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1058, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1059, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1063, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1064, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1101, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1102, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1103, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1104, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1110, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1111, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1112, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1146, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1147, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1148, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1149, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1150, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1151, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1153, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1154, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }], + "tilewidth":16 + }], + "tilewidth":16, + "type":"map", + "version":1.4, + "width":50 +} \ No newline at end of file diff --git a/docs/assets/map/cloud_tileset.png b/docs/assets/map/cloud_tileset.png new file mode 100644 index 0000000..17f6dca Binary files /dev/null and b/docs/assets/map/cloud_tileset.png differ diff --git a/docs/assets/split_please/animals.png b/docs/assets/split_please/animals.png new file mode 100644 index 0000000..1df51d6 Binary files /dev/null and b/docs/assets/split_please/animals.png differ diff --git a/docs/index.html b/docs/index.html index fd697b6..e1dcbd5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ - Welcome to CryptoThrone. + Welcome to CryptoThrone.