diff --git a/docs/_astro/App.uHVrMA5f.js b/docs/_astro/App.Bv9xislp.js similarity index 77% rename from docs/_astro/App.uHVrMA5f.js rename to docs/_astro/App.Bv9xislp.js index 6a703b5..8030b85 100644 --- a/docs/_astro/App.uHVrMA5f.js +++ b/docs/_astro/App.Bv9xislp.js @@ -1,4 +1,4 @@ -import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c as Ey}from"./index.SSXOyoI7.js";import{p as OL,a as rc}from"./index.DxhZiom7.js";import{t as Ir}from"./index.BH1EYZ08.js";var RM={exports:{}},ln={};/** +import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as Kd,R as Du,r as Me,c as Cy}from"./index.SSXOyoI7.js";import{p as RL,a as nc}from"./index.DxhZiom7.js";import{t as Ir}from"./index.BH1EYZ08.js";var bM={exports:{}},hn={};/** * @license React * react-is.production.min.js * @@ -6,21 +6,21 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Bx=Symbol.for("react.element"),Ux=Symbol.for("react.portal"),Dm=Symbol.for("react.fragment"),Im=Symbol.for("react.strict_mode"),Nm=Symbol.for("react.profiler"),Bm=Symbol.for("react.provider"),Um=Symbol.for("react.context"),DL=Symbol.for("react.server_context"),zm=Symbol.for("react.forward_ref"),Gm=Symbol.for("react.suspense"),Vm=Symbol.for("react.suspense_list"),Hm=Symbol.for("react.memo"),Wm=Symbol.for("react.lazy"),IL=Symbol.for("react.offscreen"),bM;bM=Symbol.for("react.module.reference");function Ra(g){if(typeof g=="object"&&g!==null){var t=g.$$typeof;switch(t){case Bx:switch(g=g.type,g){case Dm:case Nm:case Im:case Gm:case Vm:return g;default:switch(g=g&&g.$$typeof,g){case DL:case Um:case zm:case Wm:case Hm:case Bm:return g;default:return t}}case Ux:return t}}}ln.ContextConsumer=Um;ln.ContextProvider=Bm;ln.Element=Bx;ln.ForwardRef=zm;ln.Fragment=Dm;ln.Lazy=Wm;ln.Memo=Hm;ln.Portal=Ux;ln.Profiler=Nm;ln.StrictMode=Im;ln.Suspense=Gm;ln.SuspenseList=Vm;ln.isAsyncMode=function(){return!1};ln.isConcurrentMode=function(){return!1};ln.isContextConsumer=function(g){return Ra(g)===Um};ln.isContextProvider=function(g){return Ra(g)===Bm};ln.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===Bx};ln.isForwardRef=function(g){return Ra(g)===zm};ln.isFragment=function(g){return Ra(g)===Dm};ln.isLazy=function(g){return Ra(g)===Wm};ln.isMemo=function(g){return Ra(g)===Hm};ln.isPortal=function(g){return Ra(g)===Ux};ln.isProfiler=function(g){return Ra(g)===Nm};ln.isStrictMode=function(g){return Ra(g)===Im};ln.isSuspense=function(g){return Ra(g)===Gm};ln.isSuspenseList=function(g){return Ra(g)===Vm};ln.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===Dm||g===Nm||g===Im||g===Gm||g===Vm||g===IL||typeof g=="object"&&g!==null&&(g.$$typeof===Wm||g.$$typeof===Hm||g.$$typeof===Bm||g.$$typeof===Um||g.$$typeof===zm||g.$$typeof===bM||g.getModuleId!==void 0)};ln.typeOf=Ra;RM.exports=ln;var LM=RM.exports;function NL(g){function t(tt,Y,Z,U,H){for(var $=0,_=0,q=0,at=0,ot,rt,gt=0,yt=0,Et,At=Et=ot=0,Pt=0,Vt=0,dt=0,ut=0,Rt=Z.length,Dt=Rt-1,Ht,Bt="",re="",le="",ge="",xe;Ptot)&&(ut=(Bt=Bt.replace(" ",":")).length),0U&&(U=(Y=Y.trim()).charCodeAt(0)),U){case 38:return Y.replace(o,"$1"+tt.trim());case 58:return tt.trim()+Y.replace(o,"$1"+tt.trim());default:if(0<1*Z&&0_.charCodeAt(8))break;case 115:H=H.replace(_,"-webkit-"+_)+";"+H;break;case 207:case 102:H=H.replace(_,"-webkit-"+(102<$?"inline-":"")+"box")+";"+H.replace(_,"-webkit-"+_)+";"+H.replace(_,"-ms-"+_+"box")+";"+H}return H+";";case 938:if(H.charCodeAt(5)===45)switch(H.charCodeAt(6)){case 105:return _=H.replace("-items",""),"-webkit-"+H+"-webkit-box-"+_+"-ms-flex-"+_+H;case 115:return"-webkit-"+H+"-ms-flex-item-"+H.replace(w,"")+H;default:return"-webkit-"+H+"-ms-flex-line-pack"+H.replace("align-content","").replace(w,"")+H}break;case 973:case 989:if(H.charCodeAt(3)!==45||H.charCodeAt(4)===122)break;case 931:case 953:if(A.test(tt)===!0)return(_=tt.substring(tt.indexOf(":")+1)).charCodeAt(0)===115?T(tt.replace("stretch","fill-available"),Y,Z,U).replace(":fill-available",":stretch"):H.replace(_,"-webkit-"+_)+H.replace(_,"-moz-"+_.replace("fill-",""))+H;break;case 962:if(H="-webkit-"+H+(H.charCodeAt(5)===102?"-ms-"+H:"")+H,Z+U===211&&H.charCodeAt(13)===105&&0Z.charCodeAt(0)&&(Z=Z.trim()),Q=Z,Z=[Q],0ot)&&(ut=(Bt=Bt.replace(" ",":")).length),0U&&(U=(Y=Y.trim()).charCodeAt(0)),U){case 38:return Y.replace(o,"$1"+tt.trim());case 58:return tt.trim()+Y.replace(o,"$1"+tt.trim());default:if(0<1*$&&0_.charCodeAt(8))break;case 115:H=H.replace(_,"-webkit-"+_)+";"+H;break;case 207:case 102:H=H.replace(_,"-webkit-"+(102$.charCodeAt(0)&&($=$.trim()),Q=$,$=[Q],01?t-1:0),x=1;x0?" Args: "+i.join(", "):""))}var eF=function(){function g(i){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=i}var t=g.prototype;return t.indexOfGroup=function(i){for(var x=0,T=0;T=this.groupSizes.length){for(var T=this.groupSizes,E=T.length,s=E;i>=s;)(s<<=1)<0&&Kd(16,""+i);this.groupSizes=new Uint32Array(s),this.groupSizes.set(T),this.length=s;for(var y=E;y=this.length||this.groupSizes[i]===0)return x;for(var T=this.groupSizes[i],E=this.indexOfGroup(i),s=E+T,y=E;y=hd&&(hd=t+1),tm.set(g,t),gm.set(t,g)},rF="style["+$f+'][data-styled-version="5.3.6"]',sF=new RegExp("^"+$f+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),aF=function(g,t,i){for(var x,T=i.split(","),E=0,s=T.length;E=0;r--){var d=e[r];if(d&&d.nodeType===1&&d.hasAttribute($f))return d}}(i),E=T!==void 0?T.nextSibling:null;x.setAttribute($f,"active"),x.setAttribute("data-styled-version","5.3.6");var s=lF();return s&&x.setAttribute("nonce",s),i.insertBefore(x,E),x},hF=function(){function g(i){var x=this.element=NM(i);x.appendChild(document.createTextNode("")),this.sheet=function(T){if(T.sheet)return T.sheet;for(var E=document.styleSheets,s=0,y=E.length;s=0){var T=document.createTextNode(x),E=this.nodes[i];return this.element.insertBefore(T,E||null),this.length++,!0}return!1},t.deleteRule=function(i){this.element.removeChild(this.nodes[i]),this.length--},t.getRule=function(i){return i0&&(h+=a+",")}),E+=""+r+d+'{content:"'+h+`"}/*!sc*/ -`}}}return E}(this)},g}(),dF=/(a)(d)/gi,JS=function(g){return String.fromCharCode(g+(g>25?39:97))};function Cy(g){var t,i="";for(t=Math.abs(g);t>52;t=t/52|0)i=JS(t%52)+i;return(JS(t%52)+i).replace(dF,"$1-$2")}var Uf=function(g,t){for(var i=t.length;i;)g=33*g^t.charCodeAt(--i);return g},UM=function(g){return Uf(5381,g)};function pF(g){for(var t=0;t>>0);if(!i.hasNameForId(T,y)){var e=x(s,"."+y,void 0,T);i.insertRules(T,y,e)}E.push(y),this.staticRulesId=y}else{for(var r=this.rules.length,d=Uf(this.baseHash,x.hash),h="",a=0;a>>0);if(!i.hasNameForId(T,f)){var o=x(h,"."+f,void 0,T);i.insertRules(T,f,o)}E.push(f)}}return E.join(" ")},g}(),gF=/^\s*\/\/.*$/gm,yF=[":","[",".","#"];function xF(g){var t,i,x,T,E=g===void 0?ch:g,s=E.options,y=s===void 0?ch:s,e=E.plugins,r=e===void 0?mm:e,d=new NL(y),h=[],a=function(u){function f(o){if(o)try{u(o+"}")}catch{}}return function(o,c,p,v,m,S,M,w,C,A){switch(o){case 1:if(C===0&&c.charCodeAt(0)===64)return u(c+";"),"";break;case 2:if(w===0)return c+"/*|*/";break;case 3:switch(w){case 102:case 112:return u(p[0]+c),"";default:return c+(A===0?"/*|*/":"")}case-2:c.split("/*|*/}").forEach(f)}}}(function(u){h.push(u)}),l=function(u,f,o){return f===0&&yF.indexOf(o[i.length])!==-1||o.match(T)?u:"."+t};function n(u,f,o,c){c===void 0&&(c="&");var p=u.replace(gF,""),v=f&&o?o+" "+f+" { "+p+" }":p;return t=c,i=f,x=new RegExp("\\"+i+"\\b","g"),T=new RegExp("(\\"+i+"\\b){2,}"),d(o||!f?"":f,v)}return d.use([].concat(r,[function(u,f,o){u===2&&o.length&&o[0].lastIndexOf(i)>0&&(o[0]=o[0].replace(x,l))},a,function(u){if(u===-2){var f=h;return h=[],f}}])),n.hash=r.length?r.reduce(function(u,f){return f.name||Kd(15),Uf(u,f.name)},5381).toString():"",n}var zM=Du.createContext();zM.Consumer;var GM=Du.createContext(),SF=(GM.Consumer,new BM),wy=xF();function TF(){return Me.useContext(zM)||SF}function EF(){return Me.useContext(GM)||wy}var MF=function(){function g(t,i){var x=this;this.inject=function(T,E){E===void 0&&(E=wy);var s=x.name+E.hash;T.hasNameForId(x.id,s)||T.insertRules(x.id,s,E(x.rules,s,"@keyframes"))},this.toString=function(){return Kd(12,String(x.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=i}return g.prototype.getName=function(t){return t===void 0&&(t=wy),this.name+t.hash},g}(),CF=/([A-Z])/,wF=/([A-Z])/g,AF=/^ms-/,PF=function(g){return"-"+g.toLowerCase()};function QS(g){return CF.test(g)?g.replace(wF,PF).replace(AF,"-ms-"):g}var _S=function(g){return g==null||g===!1||g===""};function Jf(g,t,i,x){if(Array.isArray(g)){for(var T,E=[],s=0,y=g.length;s1?t-1:0),x=1;x?@[\\\]^`{|}~-]+/g,FF=/(^-|-$)/g;function v0(g){return g.replace(LF,"-").replace(FF,"")}var OF=function(g){return Cy(UM(g)>>>0)};function iv(g){return typeof g=="string"&&!0}var Ay=function(g){return typeof g=="function"||typeof g=="object"&&g!==null&&!Array.isArray(g)},DF=function(g){return g!=="__proto__"&&g!=="constructor"&&g!=="prototype"};function IF(g,t,i){var x=g[i];Ay(t)&&Ay(x)?VM(x,t):g[i]=t}function VM(g){for(var t=arguments.length,i=new Array(t>1?t-1:0),x=1;x=0||(A[w]=S[w]);return A}(t,["componentId"]),m=p&&p+"-"+(iv(c)?c:v0(ZS(c)));return WM(c,Sl({},v,{attrs:a,componentId:m}),i)},Object.defineProperty(n,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(c){this._foldedDefaultProps=x?VM({},g.defaultProps,c):c}}),n.toString=function(){return"."+n.styledComponentId},T&&qL(n,g,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),n}var ym=function(g){return function t(i,x,T){if(T===void 0&&(T=ch),!LM.isValidElementType(x))return Kd(1,String(x));var E=function(){return i(x,T,RF.apply(void 0,arguments))};return E.withConfig=function(s){return t(i,x,Sl({},T,{},s))},E.attrs=function(s){return t(i,x,Sl({},T,{attrs:Array.prototype.concat(T.attrs,s).filter(Boolean)}))},E}(WM,g)};["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(g){ym[g]=ym(g)});var XM={exports:{}};(function(g,t){(function(x,T){g.exports=T()})(Ey,()=>(()=>{var i={50792:s=>{var y=Object.prototype.hasOwnProperty,e="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(e=!1));function d(n,u,f){this.fn=n,this.context=u,this.once=f||!1}function h(n,u,f,o,c){if(typeof f!="function")throw new TypeError("The listener must be a function");var p=new d(f,o||n,c),v=e?e+u:u;return n._events[v]?n._events[v].fn?n._events[v]=[n._events[v],p]:n._events[v].push(p):(n._events[v]=p,n._eventsCount++),n}function a(n,u){--n._eventsCount===0?n._events=new r:delete n._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],f,o;if(this._eventsCount===0)return u;for(o in f=this._events)y.call(f,o)&&u.push(e?o.slice(1):o);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},l.prototype.listeners=function(u){var f=e?e+u:u,o=this._events[f];if(!o)return[];if(o.fn)return[o.fn];for(var c=0,p=o.length,v=new Array(p);c{/** + */var Nr=typeof Symbol=="function"&&Symbol.for,Gx=Nr?Symbol.for("react.element"):60103,Vx=Nr?Symbol.for("react.portal"):60106,km=Nr?Symbol.for("react.fragment"):60107,jm=Nr?Symbol.for("react.strict_mode"):60108,Km=Nr?Symbol.for("react.profiler"):60114,$m=Nr?Symbol.for("react.provider"):60109,Zm=Nr?Symbol.for("react.context"):60110,Hx=Nr?Symbol.for("react.async_mode"):60111,Jm=Nr?Symbol.for("react.concurrent_mode"):60111,Qm=Nr?Symbol.for("react.forward_ref"):60112,_m=Nr?Symbol.for("react.suspense"):60113,NL=Nr?Symbol.for("react.suspense_list"):60120,qm=Nr?Symbol.for("react.memo"):60115,tg=Nr?Symbol.for("react.lazy"):60116,BL=Nr?Symbol.for("react.block"):60121,UL=Nr?Symbol.for("react.fundamental"):60117,zL=Nr?Symbol.for("react.responder"):60118,GL=Nr?Symbol.for("react.scope"):60119;function sa(g){if(typeof g=="object"&&g!==null){var t=g.$$typeof;switch(t){case Gx:switch(g=g.type,g){case Hx:case Jm:case km:case Km:case jm:case _m:return g;default:switch(g=g&&g.$$typeof,g){case Zm:case Qm:case tg:case qm:case $m:return g;default:return t}}case Vx:return t}}}function DM(g){return sa(g)===Jm}un.AsyncMode=Hx;un.ConcurrentMode=Jm;un.ContextConsumer=Zm;un.ContextProvider=$m;un.Element=Gx;un.ForwardRef=Qm;un.Fragment=km;un.Lazy=tg;un.Memo=qm;un.Portal=Vx;un.Profiler=Km;un.StrictMode=jm;un.Suspense=_m;un.isAsyncMode=function(g){return DM(g)||sa(g)===Hx};un.isConcurrentMode=DM;un.isContextConsumer=function(g){return sa(g)===Zm};un.isContextProvider=function(g){return sa(g)===$m};un.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===Gx};un.isForwardRef=function(g){return sa(g)===Qm};un.isFragment=function(g){return sa(g)===km};un.isLazy=function(g){return sa(g)===tg};un.isMemo=function(g){return sa(g)===qm};un.isPortal=function(g){return sa(g)===Vx};un.isProfiler=function(g){return sa(g)===Km};un.isStrictMode=function(g){return sa(g)===jm};un.isSuspense=function(g){return sa(g)===_m};un.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===km||g===Jm||g===Km||g===jm||g===_m||g===NL||typeof g=="object"&&g!==null&&(g.$$typeof===tg||g.$$typeof===qm||g.$$typeof===$m||g.$$typeof===Zm||g.$$typeof===Qm||g.$$typeof===UL||g.$$typeof===zL||g.$$typeof===GL||g.$$typeof===BL)};un.typeOf=sa;OM.exports=un;var VL=OM.exports,Wx=VL,HL={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},WL={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},XL={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},IM={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Xx={};Xx[Wx.ForwardRef]=XL;Xx[Wx.Memo]=IM;function kS(g){return Wx.isMemo(g)?IM:Xx[g.$$typeof]||HL}var YL=Object.defineProperty,kL=Object.getOwnPropertyNames,jS=Object.getOwnPropertySymbols,jL=Object.getOwnPropertyDescriptor,KL=Object.getPrototypeOf,KS=Object.prototype;function NM(g,t,i){if(typeof t!="string"){if(KS){var y=KL(t);y&&y!==KS&&NM(g,y,i)}var T=kL(t);jS&&(T=T.concat(jS(t)));for(var E=kS(g),s=kS(t),x=0;x1?t-1:0),y=1;y0?" Args: "+i.join(", "):""))}var QL=function(){function g(i){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=i}var t=g.prototype;return t.indexOfGroup=function(i){for(var y=0,T=0;T=this.groupSizes.length){for(var T=this.groupSizes,E=T.length,s=E;i>=s;)(s<<=1)<0&&$d(16,""+i);this.groupSizes=new Uint32Array(s),this.groupSizes.set(T),this.length=s;for(var x=E;x=this.length||this.groupSizes[i]===0)return y;for(var T=this.groupSizes[i],E=this.indexOfGroup(i),s=E+T,x=E;x=hd&&(hd=t+1),em.set(g,t),ym.set(t,g)},tF="style["+$f+'][data-styled-version="5.3.6"]',eF=new RegExp("^"+$f+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),iF=function(g,t,i){for(var y,T=i.split(","),E=0,s=T.length;E=0;r--){var d=e[r];if(d&&d.nodeType===1&&d.hasAttribute($f))return d}}(i),E=T!==void 0?T.nextSibling:null;y.setAttribute($f,"active"),y.setAttribute("data-styled-version","5.3.6");var s=rF();return s&&y.setAttribute("nonce",s),i.insertBefore(y,E),y},sF=function(){function g(i){var y=this.element=BM(i);y.appendChild(document.createTextNode("")),this.sheet=function(T){if(T.sheet)return T.sheet;for(var E=document.styleSheets,s=0,x=E.length;s=0){var T=document.createTextNode(y),E=this.nodes[i];return this.element.insertBefore(T,E||null),this.length++,!0}return!1},t.deleteRule=function(i){this.element.removeChild(this.nodes[i]),this.length--},t.getRule=function(i){return i0&&(h+=a+",")}),E+=""+r+d+'{content:"'+h+`"}/*!sc*/ +`}}}return E}(this)},g}(),hF=/(a)(d)/gi,QS=function(g){return String.fromCharCode(g+(g>25?39:97))};function Ay(g){var t,i="";for(t=Math.abs(g);t>52;t=t/52|0)i=QS(t%52)+i;return(QS(t%52)+i).replace(hF,"$1-$2")}var Uf=function(g,t){for(var i=t.length;i;)g=33*g^t.charCodeAt(--i);return g},zM=function(g){return Uf(5381,g)};function uF(g){for(var t=0;t>>0);if(!i.hasNameForId(T,x)){var e=y(s,"."+x,void 0,T);i.insertRules(T,x,e)}E.push(x),this.staticRulesId=x}else{for(var r=this.rules.length,d=Uf(this.baseHash,y.hash),h="",a=0;a>>0);if(!i.hasNameForId(T,f)){var o=y(h,"."+f,void 0,T);i.insertRules(T,f,o)}E.push(f)}}return E.join(" ")},g}(),dF=/^\s*\/\/.*$/gm,pF=[":","[",".","#"];function vF(g){var t,i,y,T,E=g===void 0?fh:g,s=E.options,x=s===void 0?fh:s,e=E.plugins,r=e===void 0?gm:e,d=new FL(x),h=[],a=function(u){function f(o){if(o)try{u(o+"}")}catch{}}return function(o,c,p,v,m,S,M,w,C,A){switch(o){case 1:if(C===0&&c.charCodeAt(0)===64)return u(c+";"),"";break;case 2:if(w===0)return c+"/*|*/";break;case 3:switch(w){case 102:case 112:return u(p[0]+c),"";default:return c+(A===0?"/*|*/":"")}case-2:c.split("/*|*/}").forEach(f)}}}(function(u){h.push(u)}),l=function(u,f,o){return f===0&&pF.indexOf(o[i.length])!==-1||o.match(T)?u:"."+t};function n(u,f,o,c){c===void 0&&(c="&");var p=u.replace(dF,""),v=f&&o?o+" "+f+" { "+p+" }":p;return t=c,i=f,y=new RegExp("\\"+i+"\\b","g"),T=new RegExp("(\\"+i+"\\b){2,}"),d(o||!f?"":f,v)}return d.use([].concat(r,[function(u,f,o){u===2&&o.length&&o[0].lastIndexOf(i)>0&&(o[0]=o[0].replace(y,l))},a,function(u){if(u===-2){var f=h;return h=[],f}}])),n.hash=r.length?r.reduce(function(u,f){return f.name||$d(15),Uf(u,f.name)},5381).toString():"",n}var GM=Du.createContext();GM.Consumer;var VM=Du.createContext(),mF=(VM.Consumer,new UM),Py=vF();function gF(){return Me.useContext(GM)||mF}function yF(){return Me.useContext(VM)||Py}var xF=function(){function g(t,i){var y=this;this.inject=function(T,E){E===void 0&&(E=Py);var s=y.name+E.hash;T.hasNameForId(y.id,s)||T.insertRules(y.id,s,E(y.rules,s,"@keyframes"))},this.toString=function(){return $d(12,String(y.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=i}return g.prototype.getName=function(t){return t===void 0&&(t=Py),this.name+t.hash},g}(),SF=/([A-Z])/,TF=/([A-Z])/g,EF=/^ms-/,MF=function(g){return"-"+g.toLowerCase()};function _S(g){return SF.test(g)?g.replace(TF,MF).replace(EF,"-ms-"):g}var qS=function(g){return g==null||g===!1||g===""};function Zf(g,t,i,y){if(Array.isArray(g)){for(var T,E=[],s=0,x=g.length;s1?t-1:0),y=1;y?@[\\\]^`{|}~-]+/g,PF=/(^-|-$)/g;function g0(g){return g.replace(AF,"-").replace(PF,"")}var RF=function(g){return Ay(zM(g)>>>0)};function nv(g){return typeof g=="string"&&!0}var Ry=function(g){return typeof g=="function"||typeof g=="object"&&g!==null&&!Array.isArray(g)},bF=function(g){return g!=="__proto__"&&g!=="constructor"&&g!=="prototype"};function LF(g,t,i){var y=g[i];Ry(t)&&Ry(y)?HM(y,t):g[i]=t}function HM(g){for(var t=arguments.length,i=new Array(t>1?t-1:0),y=1;y=0||(A[w]=S[w]);return A}(t,["componentId"]),m=p&&p+"-"+(nv(c)?c:g0(ZS(c)));return XM(c,Sl({},v,{attrs:a,componentId:m}),i)},Object.defineProperty(n,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(c){this._foldedDefaultProps=y?HM({},g.defaultProps,c):c}}),n.toString=function(){return"."+n.styledComponentId},T&&ZL(n,g,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),n}var xm=function(g){return function t(i,y,T){if(T===void 0&&(T=fh),!FM.isValidElementType(y))return $d(1,String(y));var E=function(){return i(y,T,CF.apply(void 0,arguments))};return E.withConfig=function(s){return t(i,y,Sl({},T,{},s))},E.attrs=function(s){return t(i,y,Sl({},T,{attrs:Array.prototype.concat(T.attrs,s).filter(Boolean)}))},E}(XM,g)};["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(g){xm[g]=xm(g)});var YM={exports:{}};(function(g,t){(function(y,T){g.exports=T()})(Cy,()=>(()=>{var i={50792:s=>{var x=Object.prototype.hasOwnProperty,e="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(e=!1));function d(n,u,f){this.fn=n,this.context=u,this.once=f||!1}function h(n,u,f,o,c){if(typeof f!="function")throw new TypeError("The listener must be a function");var p=new d(f,o||n,c),v=e?e+u:u;return n._events[v]?n._events[v].fn?n._events[v]=[n._events[v],p]:n._events[v].push(p):(n._events[v]=p,n._eventsCount++),n}function a(n,u){--n._eventsCount===0?n._events=new r:delete n._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],f,o;if(this._eventsCount===0)return u;for(o in f=this._events)x.call(f,o)&&u.push(e?o.slice(1):o);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},l.prototype.listeners=function(u){var f=e?e+u:u,o=this._events[f];if(!o)return[];if(o.fn)return[o.fn];for(var c=0,p=o.length,v=new Array(p);c{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(38829),d=function(h,a,l,n){for(var u=h[0],f=1;f{/** + */var r=e(38829),d=function(h,a,l,n){for(var u=h[0],f=1;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -28,31 +28,31 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){for(var h=0;h{/** + */var x=function(e,r,d){for(var h=0;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){d===void 0&&(d=0);for(var h=d;h{/** + */var x=function(e,r,d){d===void 0&&(d=0);for(var h=d;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){d===void 0&&(d=0);for(var h=e.length-1;h>=d;h--){var a=e[h],l=!0;for(var n in r)a[n]!==r[n]&&(l=!1);if(l)return a}return null};s.exports=y},94420:(s,y,e)=>{/** + */var x=function(e,r,d){d===void 0&&(d=0);for(var h=e.length-1;h>=d;h--){var a=e[h],l=!0;for(var n in r)a[n]!==r[n]&&(l=!1);if(l)return a}return null};s.exports=x},94420:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(11879),d=e(60461),h=e(95540),a=e(29747),l=e(41481),n=new l({sys:{queueDepthSort:a,events:{once:a}}},0,0,1,1).setOrigin(0,0),u=function(f,o){o===void 0&&(o={});var c=o.hasOwnProperty("width"),p=o.hasOwnProperty("height"),v=h(o,"width",-1),m=h(o,"height",-1),S=h(o,"cellWidth",1),M=h(o,"cellHeight",S),w=h(o,"position",d.TOP_LEFT),C=h(o,"x",0),A=h(o,"y",0),P=0,b=0,O=v*S,I=m*M;n.setPosition(C,A),n.setSize(S,M);for(var D=0;D{/** + */var r=e(11879),d=e(60461),h=e(95540),a=e(29747),l=e(41481),n=new l({sys:{queueDepthSort:a,events:{once:a}}},0,0,1,1).setOrigin(0,0),u=function(f,o){o===void 0&&(o={});var c=o.hasOwnProperty("width"),p=o.hasOwnProperty("height"),v=h(o,"width",-1),m=h(o,"height",-1),S=h(o,"cellWidth",1),M=h(o,"cellHeight",S),w=h(o,"position",d.TOP_LEFT),C=h(o,"x",0),A=h(o,"y",0),P=0,b=0,O=v*S,I=m*M;n.setPosition(C,A),n.setSize(S,M);for(var D=0;D{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(66979),d=function(h,a,l,n,u){return r(h,"alpha",a,l,n,u)};s.exports=d},67285:(s,y,e)=>{/** + */var r=e(66979),d=function(h,a,l,n,u){return r(h,"alpha",a,l,n,u)};s.exports=d},67285:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(66979),d=function(h,a,l,n,u){return r(h,"x",a,l,n,u)};s.exports=d},9074:(s,y,e)=>{/** + */var r=e(66979),d=function(h,a,l,n,u){return r(h,"x",a,l,n,u)};s.exports=d},9074:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(66979),d=function(h,a,l,n,u,f,o){return l==null&&(l=a),r(h,"x",a,n,f,o),r(h,"y",l,u,f,o)};s.exports=d},75222:(s,y,e)=>{/** + */var r=e(66979),d=function(h,a,l,n,u,f,o){return l==null&&(l=a),r(h,"x",a,n,f,o),r(h,"y",l,u,f,o)};s.exports=d},75222:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -60,19 +60,19 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){d===void 0&&(d=0),h===void 0&&(h=6.28);for(var a=d,l=(h-d)/e.length,n=r.x,u=r.y,f=r.radius,o=0;o{/** + */var x=function(e,r,d,h){d===void 0&&(d=0),h===void 0&&(h=6.28);for(var a=d,l=(h-d)/e.length,n=r.x,u=r.y,f=r.radius,o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){d===void 0&&(d=0),h===void 0&&(h=6.28);for(var a=d,l=(h-d)/e.length,n=r.width/2,u=r.height/2,f=0;f{/** + */var x=function(e,r,d,h){d===void 0&&(d=0),h===void 0&&(h=6.28);for(var a=d,l=(h-d)/e.length,n=r.width/2,u=r.height/2,f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(15258),d=e(26708),h=function(a,l,n){var u;n?u=d(l,n,a.length):u=r(l,a.length);for(var f=0;f{/** + */var r=e(15258),d=e(26708),h=function(a,l,n){var u;n?u=d(l,n,a.length):u=r(l,a.length);for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(14649),d=e(86003),h=e(49498),a=function(l,n,u){u===void 0&&(u=0);var f=r(n,!1,l.length);u>0?d(f,u):u<0&&h(f,Math.abs(u));for(var o=0;o{/** + */var r=e(14649),d=e(86003),h=e(49498),a=function(l,n,u){u===void 0&&(u=0);var f=r(n,!1,l.length);u>0?d(f,u):u<0&&h(f,Math.abs(u));for(var o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -80,67 +80,67 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){for(var h=0;h{/** + */var x=function(e,r,d){for(var h=0;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h,a,l){h===void 0&&(h=0),a===void 0&&(a=0),l===void 0&&(l=1);var n,u=0,f=e.length;if(l===1)for(n=a;n=0;n--)e[n][r]+=d+u*h,u++;return e};s.exports=y},43967:s=>{/** + */var x=function(e,r,d,h,a,l){h===void 0&&(h=0),a===void 0&&(a=0),l===void 0&&(l=1);var n,u=0,f=e.length;if(l===1)for(n=a;n=0;n--)e[n][r]+=d+u*h,u++;return e};s.exports=x},43967:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h,a,l){h===void 0&&(h=0),a===void 0&&(a=0),l===void 0&&(l=1);var n,u=0,f=e.length;if(l===1)for(n=a;n=0;n--)e[n][r]=d+u*h,u++;return e};s.exports=y},88926:(s,y,e)=>{/** + */var x=function(e,r,d,h,a,l){h===void 0&&(h=0),a===void 0&&(a=0),l===void 0&&(l=1);var n,u=0,f=e.length;if(l===1)for(n=a;n=0;n--)e[n][r]=d+u*h,u++;return e};s.exports=x},88926:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(28176),d=function(h,a){for(var l=0;l{/** + */var r=e(28176),d=function(h,a){for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(24820),d=function(h,a){for(var l=0;l{/** + */var r=e(24820),d=function(h,a){for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(65822),d=function(h,a){for(var l=0;l{/** + */var r=e(65822),d=function(h,a){for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26597),d=function(h,a){for(var l=0;l{/** + */var r=e(26597),d=function(h,a){for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(90260),d=function(h,a){for(var l=0;l{/** + */var r=e(90260),d=function(h,a){for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(66979),d=function(h,a,l,n,u){return r(h,"rotation",a,l,n,u)};s.exports=d},91051:(s,y,e)=>{/** + */var r=e(66979),d=function(h,a,l,n,u){return r(h,"rotation",a,l,n,u)};s.exports=d},91051:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(1163),d=e(20339),h=function(a,l,n){for(var u=l.x,f=l.y,o=0;o{/** + */var r=e(1163),d=e(20339),h=function(a,l,n){for(var u=l.x,f=l.y,o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(1163),d=function(h,a,l,n){var u=a.x,f=a.y;if(n===0)return h;for(var o=0;o{/** + */var r=e(1163),d=function(h,a,l,n){var u=a.x,f=a.y;if(n===0)return h;for(var o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(66979),d=function(h,a,l,n,u){return r(h,"scaleX",a,l,n,u)};s.exports=d},94868:(s,y,e)=>{/** + */var r=e(66979),d=function(h,a,l,n,u){return r(h,"scaleX",a,l,n,u)};s.exports=d},94868:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(66979),d=function(h,a,l,n,u,f,o){return l==null&&(l=a),r(h,"scaleX",a,n,f,o),r(h,"scaleY",l,u,f,o)};s.exports=d},95532:(s,y,e)=>{/** + */var r=e(66979),d=function(h,a,l,n,u,f,o){return l==null&&(l=a),r(h,"scaleX",a,n,f,o),r(h,"scaleY",l,u,f,o)};s.exports=d},95532:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(66979),d=function(h,a,l,n,u){return r(h,"scaleY",a,l,n,u)};s.exports=d},8689:(s,y,e)=>{/** + */var r=e(66979),d=function(h,a,l,n,u){return r(h,"scaleY",a,l,n,u)};s.exports=d},8689:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43967),d=function(h,a,l,n,u){return r(h,"alpha",a,l,n,u)};s.exports=d},2645:(s,y,e)=>{/** + */var r=e(43967),d=function(h,a,l,n,u){return r(h,"alpha",a,l,n,u)};s.exports=d},2645:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43967),d=function(h,a,l,n){return r(h,"blendMode",a,0,l,n)};s.exports=d},32372:(s,y,e)=>{/** + */var r=e(43967),d=function(h,a,l,n){return r(h,"blendMode",a,0,l,n)};s.exports=d},32372:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -148,35 +148,35 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){for(var h=0;h{/** + */var x=function(e,r,d){for(var h=0;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43967),d=function(h,a,l,n,u,f,o){return l==null&&(l=a),r(h,"originX",a,n,f,o),r(h,"originY",l,u,f,o),h.forEach(function(c){c.updateDisplayOrigin()}),h};s.exports=d},79939:(s,y,e)=>{/** + */var r=e(43967),d=function(h,a,l,n,u,f,o){return l==null&&(l=a),r(h,"originX",a,n,f,o),r(h,"originY",l,u,f,o),h.forEach(function(c){c.updateDisplayOrigin()}),h};s.exports=d},79939:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43967),d=function(h,a,l,n,u){return r(h,"rotation",a,l,n,u)};s.exports=d},2699:(s,y,e)=>{/** + */var r=e(43967),d=function(h,a,l,n,u){return r(h,"rotation",a,l,n,u)};s.exports=d},2699:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43967),d=function(h,a,l,n,u,f,o){return l==null&&(l=a),r(h,"scaleX",a,n,f,o),r(h,"scaleY",l,u,f,o)};s.exports=d},98739:(s,y,e)=>{/** + */var r=e(43967),d=function(h,a,l,n,u,f,o){return l==null&&(l=a),r(h,"scaleX",a,n,f,o),r(h,"scaleY",l,u,f,o)};s.exports=d},98739:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43967),d=function(h,a,l,n,u){return r(h,"scaleX",a,l,n,u)};s.exports=d},98476:(s,y,e)=>{/** + */var r=e(43967),d=function(h,a,l,n,u){return r(h,"scaleX",a,l,n,u)};s.exports=d},98476:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43967),d=function(h,a,l,n,u){return r(h,"scaleY",a,l,n,u)};s.exports=d},6207:(s,y,e)=>{/** + */var r=e(43967),d=function(h,a,l,n,u){return r(h,"scaleY",a,l,n,u)};s.exports=d},6207:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43967),d=function(h,a,l,n,u,f,o){return l==null&&(l=a),r(h,"scrollFactorX",a,n,f,o),r(h,"scrollFactorY",l,u,f,o)};s.exports=d},6607:(s,y,e)=>{/** + */var r=e(43967),d=function(h,a,l,n,u,f,o){return l==null&&(l=a),r(h,"scrollFactorX",a,n,f,o),r(h,"scrollFactorY",l,u,f,o)};s.exports=d},6607:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43967),d=function(h,a,l,n,u){return r(h,"scrollFactorX",a,l,n,u)};s.exports=d},72248:(s,y,e)=>{/** + */var r=e(43967),d=function(h,a,l,n,u){return r(h,"scrollFactorX",a,l,n,u)};s.exports=d},72248:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -184,35 +184,35 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h,a){for(var l=0;l{/** + */var x=function(e,r,d,h,a){for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43967),d=function(h,a,l,n){return r(h,"visible",a,0,l,n)};s.exports=d},77597:(s,y,e)=>{/** + */var r=e(43967),d=function(h,a,l,n){return r(h,"visible",a,0,l,n)};s.exports=d},77597:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43967),d=function(h,a,l,n,u){return r(h,"x",a,l,n,u)};s.exports=d},83194:(s,y,e)=>{/** + */var r=e(43967),d=function(h,a,l,n,u){return r(h,"x",a,l,n,u)};s.exports=d},83194:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43967),d=function(h,a,l,n,u,f,o){return l==null&&(l=a),r(h,"x",a,n,f,o),r(h,"y",l,u,f,o)};s.exports=d},67678:(s,y,e)=>{/** + */var r=e(43967),d=function(h,a,l,n,u,f,o){return l==null&&(l=a),r(h,"x",a,n,f,o),r(h,"y",l,u,f,o)};s.exports=d},67678:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43967),d=function(h,a,l,n,u){return r(h,"y",a,l,n,u)};s.exports=d},35850:(s,y,e)=>{/** + */var r=e(43967),d=function(h,a,l,n,u){return r(h,"y",a,l,n,u)};s.exports=d},35850:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26099),d=function(h,a,l,n,u){n===void 0&&(n=0),u===void 0&&(u=new r);var f,o,c=h.length;if(c===1)f=h[0].x,o=h[0].y,h[0].x=a,h[0].y=l;else{var p=1,v=0;n===0&&(v=c-1,p=c-2),f=h[v].x,o=h[v].y,h[v].x=a,h[v].y=l;for(var m=0;m=c||p===-1)){var S=h[p],M=S.x,w=S.y;S.x=f,S.y=o,f=M,o=w,n===0?p--:p++}}return u.x=f,u.y=o,u};s.exports=d},8628:(s,y,e)=>{/** + */var r=e(26099),d=function(h,a,l,n,u){n===void 0&&(n=0),u===void 0&&(u=new r);var f,o,c=h.length;if(c===1)f=h[0].x,o=h[0].y,h[0].x=a,h[0].y=l;else{var p=1,v=0;n===0&&(v=c-1,p=c-2),f=h[v].x,o=h[v].y,h[v].x=a,h[v].y=l;for(var m=0;m=c||p===-1)){var S=h[p],M=S.x,w=S.y;S.x=f,S.y=o,f=M,o=w,n===0?p--:p++}}return u.x=f,u.y=o,u};s.exports=d},8628:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(33680),d=function(h){return r(h)};s.exports=d},21837:(s,y,e)=>{/** + */var r=e(33680),d=function(h){return r(h)};s.exports=d},21837:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7602),d=function(h,a,l,n,u){u===void 0&&(u=!1);var f=Math.abs(n-l)/h.length,o;if(u)for(o=0;o{/** + */var r=e(7602),d=function(h,a,l,n,u){u===void 0&&(u=!1);var f=Math.abs(n-l)/h.length,o;if(u)for(o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -220,32 +220,32 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h,a){if(a===void 0&&(a=!1),e.length===0)return e;if(e.length===1)return a?e[0][r]+=(h+d)/2:e[0][r]=(h+d)/2,e;var l=Math.abs(h-d)/(e.length-1),n;if(a)for(n=0;n{/** + */var x=function(e,r,d,h,a){if(a===void 0&&(a=!1),e.length===0)return e;if(e.length===1)return a?e[0][r]+=(h+d)/2:e[0][r]=(h+d)/2,e;var l=Math.abs(h-d)/(e.length-1),n;if(a)for(n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){for(var r=0;r{/** + */var x=function(e){for(var r=0;r{/** * @author Richard Davey * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(15994),d=function(h,a,l){l===void 0&&(l=0);for(var n=0;n{/** + */var r=e(15994),d=function(h,a,l){l===void 0&&(l=0);for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={AlignTo:e(11517),Angle:e(80318),Call:e(60757),GetFirst:e(69927),GetLast:e(32265),GridAlign:e(94420),IncAlpha:e(41721),IncX:e(67285),IncXY:e(9074),IncY:e(75222),PlaceOnCircle:e(22983),PlaceOnEllipse:e(95253),PlaceOnLine:e(88505),PlaceOnRectangle:e(41346),PlaceOnTriangle:e(11575),PlayAnimation:e(29953),PropertyValueInc:e(66979),PropertyValueSet:e(43967),RandomCircle:e(88926),RandomEllipse:e(33286),RandomLine:e(96e3),RandomRectangle:e(28789),RandomTriangle:e(97154),Rotate:e(20510),RotateAround:e(91051),RotateAroundDistance:e(76332),ScaleX:e(61619),ScaleXY:e(94868),ScaleY:e(95532),SetAlpha:e(8689),SetBlendMode:e(2645),SetDepth:e(32372),SetHitArea:e(85373),SetOrigin:e(81583),SetRotation:e(79939),SetScale:e(2699),SetScaleX:e(98739),SetScaleY:e(98476),SetScrollFactor:e(6207),SetScrollFactorX:e(6607),SetScrollFactorY:e(72248),SetTint:e(14036),SetVisible:e(50159),SetX:e(77597),SetXY:e(83194),SetY:e(67678),ShiftPosition:e(35850),Shuffle:e(8628),SmootherStep:e(21910),SmoothStep:e(21837),Spread:e(62054),ToggleVisible:e(79815),WrapInRectangle:e(39665)}},42099:(s,y,e)=>{/** + */s.exports={AlignTo:e(11517),Angle:e(80318),Call:e(60757),GetFirst:e(69927),GetLast:e(32265),GridAlign:e(94420),IncAlpha:e(41721),IncX:e(67285),IncXY:e(9074),IncY:e(75222),PlaceOnCircle:e(22983),PlaceOnEllipse:e(95253),PlaceOnLine:e(88505),PlaceOnRectangle:e(41346),PlaceOnTriangle:e(11575),PlayAnimation:e(29953),PropertyValueInc:e(66979),PropertyValueSet:e(43967),RandomCircle:e(88926),RandomEllipse:e(33286),RandomLine:e(96e3),RandomRectangle:e(28789),RandomTriangle:e(97154),Rotate:e(20510),RotateAround:e(91051),RotateAroundDistance:e(76332),ScaleX:e(61619),ScaleXY:e(94868),ScaleY:e(95532),SetAlpha:e(8689),SetBlendMode:e(2645),SetDepth:e(32372),SetHitArea:e(85373),SetOrigin:e(81583),SetRotation:e(79939),SetScale:e(2699),SetScaleX:e(98739),SetScaleY:e(98476),SetScrollFactor:e(6207),SetScrollFactorX:e(6607),SetScrollFactorY:e(72248),SetTint:e(14036),SetVisible:e(50159),SetX:e(77597),SetXY:e(83194),SetY:e(67678),ShiftPosition:e(35850),Shuffle:e(8628),SmootherStep:e(21910),SmoothStep:e(21837),Spread:e(62054),ToggleVisible:e(79815),WrapInRectangle:e(39665)}},42099:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(45319),d=e(83419),h=e(74943),a=e(81957),l=e(41138),n=e(35154),u=e(90126),f=new d({initialize:function(c,p,v){this.manager=c,this.key=p,this.type="frame",this.frames=this.getFrames(c.textureManager,n(v,"frames",[]),n(v,"defaultTextureKey",null),n(v,"sortFrames",!0)),this.frameRate=n(v,"frameRate",null),this.duration=n(v,"duration",null),this.msPerFrame,this.skipMissedFrames=n(v,"skipMissedFrames",!0),this.delay=n(v,"delay",0),this.repeat=n(v,"repeat",0),this.repeatDelay=n(v,"repeatDelay",0),this.yoyo=n(v,"yoyo",!1),this.showBeforeDelay=n(v,"showBeforeDelay",!1),this.showOnStart=n(v,"showOnStart",!1),this.hideOnComplete=n(v,"hideOnComplete",!1),this.randomFrame=n(v,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(h.PAUSE_ALL,this.pause,this),this.manager.on(h.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(o,c,p,v){p===null&&v===null?(o.frameRate=24,o.duration=24/c*1e3):p&&v===null?(o.duration=p,o.frameRate=c/(p/1e3)):(o.frameRate=v,o.duration=c/v*1e3),o.msPerFrame=1e3/o.frameRate},addFrame:function(o){return this.addFrameAt(this.frames.length,o)},addFrameAt:function(o,c){var p=this.getFrames(this.manager.textureManager,c);if(p.length>0){if(o===0)this.frames=p.concat(this.frames);else if(o===this.frames.length)this.frames=this.frames.concat(p);else{var v=this.frames.slice(0,o),m=this.frames.slice(o);this.frames=v.concat(p,m)}this.updateFrameSequence()}return this},checkFrame:function(o){return o>=0&&o0){M.isLast=!0,M.nextFrame=m[0],m[0].prevFrame=M;var G=1/(m.length-1);for(C=0;C0?o.inReverse&&o.forward?o.forward=!1:this.repeatAnimation(o):o.complete():this.updateAndGetNextTick(o,c.nextFrame)},handleYoyoFrame:function(o,c){if(c||(c=!1),o.inReverse===!c&&o.repeatCounter>0){(o.repeatDelay===0||o.pendingRepeat)&&(o.forward=c),this.repeatAnimation(o);return}if(o.inReverse!==c&&o.repeatCounter===0){o.complete();return}o.forward=c;var p=c?o.currentFrame.nextFrame:o.currentFrame.prevFrame;this.updateAndGetNextTick(o,p)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(o){var c=o.currentFrame;c.isFirst?o.yoyo?this.handleYoyoFrame(o,!0):o.repeatCounter>0?o.inReverse&&!o.forward?this.repeatAnimation(o):(o.forward=!0,this.repeatAnimation(o)):o.complete():this.updateAndGetNextTick(o,c.prevFrame)},updateAndGetNextTick:function(o,c){o.setCurrentFrame(c),this.getNextTick(o)},removeFrame:function(o){var c=this.frames.indexOf(o);return c!==-1&&this.removeFrameAt(c),this},removeFrameAt:function(o){return this.frames.splice(o,1),this.updateFrameSequence(),this},repeatAnimation:function(o){if(o._pendingStop===2){if(o._pendingStopValue===0)return o.stop();o._pendingStopValue--}o.repeatDelay>0&&!o.pendingRepeat?(o.pendingRepeat=!0,o.accumulator-=o.nextTick,o.nextTick+=o.repeatDelay):(o.repeatCounter--,o.forward?o.setCurrentFrame(o.currentFrame.nextFrame):o.setCurrentFrame(o.currentFrame.prevFrame),o.isPlaying&&(this.getNextTick(o),o.handleRepeat()))},toJSON:function(){var o={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(c){o.frames.push(c.toJSON())}),o},updateFrameSequence:function(){for(var o=this.frames.length,c=1/(o-1),p,v=0;v1?(p.isLast=!0,p.prevFrame=this.frames[o-2],p.nextFrame=this.frames[0]):o>1&&(p.prevFrame=this.frames[v-1],p.nextFrame=this.frames[v+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(h.PAUSE_ALL,this.pause,this),this.manager.off(h.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var o=0;o{/** + */var r=e(45319),d=e(83419),h=e(74943),a=e(81957),l=e(41138),n=e(35154),u=e(90126),f=new d({initialize:function(c,p,v){this.manager=c,this.key=p,this.type="frame",this.frames=this.getFrames(c.textureManager,n(v,"frames",[]),n(v,"defaultTextureKey",null),n(v,"sortFrames",!0)),this.frameRate=n(v,"frameRate",null),this.duration=n(v,"duration",null),this.msPerFrame,this.skipMissedFrames=n(v,"skipMissedFrames",!0),this.delay=n(v,"delay",0),this.repeat=n(v,"repeat",0),this.repeatDelay=n(v,"repeatDelay",0),this.yoyo=n(v,"yoyo",!1),this.showBeforeDelay=n(v,"showBeforeDelay",!1),this.showOnStart=n(v,"showOnStart",!1),this.hideOnComplete=n(v,"hideOnComplete",!1),this.randomFrame=n(v,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(h.PAUSE_ALL,this.pause,this),this.manager.on(h.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(o,c,p,v){p===null&&v===null?(o.frameRate=24,o.duration=24/c*1e3):p&&v===null?(o.duration=p,o.frameRate=c/(p/1e3)):(o.frameRate=v,o.duration=c/v*1e3),o.msPerFrame=1e3/o.frameRate},addFrame:function(o){return this.addFrameAt(this.frames.length,o)},addFrameAt:function(o,c){var p=this.getFrames(this.manager.textureManager,c);if(p.length>0){if(o===0)this.frames=p.concat(this.frames);else if(o===this.frames.length)this.frames=this.frames.concat(p);else{var v=this.frames.slice(0,o),m=this.frames.slice(o);this.frames=v.concat(p,m)}this.updateFrameSequence()}return this},checkFrame:function(o){return o>=0&&o0){M.isLast=!0,M.nextFrame=m[0],m[0].prevFrame=M;var G=1/(m.length-1);for(C=0;C0?o.inReverse&&o.forward?o.forward=!1:this.repeatAnimation(o):o.complete():this.updateAndGetNextTick(o,c.nextFrame)},handleYoyoFrame:function(o,c){if(c||(c=!1),o.inReverse===!c&&o.repeatCounter>0){(o.repeatDelay===0||o.pendingRepeat)&&(o.forward=c),this.repeatAnimation(o);return}if(o.inReverse!==c&&o.repeatCounter===0){o.complete();return}o.forward=c;var p=c?o.currentFrame.nextFrame:o.currentFrame.prevFrame;this.updateAndGetNextTick(o,p)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(o){var c=o.currentFrame;c.isFirst?o.yoyo?this.handleYoyoFrame(o,!0):o.repeatCounter>0?o.inReverse&&!o.forward?this.repeatAnimation(o):(o.forward=!0,this.repeatAnimation(o)):o.complete():this.updateAndGetNextTick(o,c.prevFrame)},updateAndGetNextTick:function(o,c){o.setCurrentFrame(c),this.getNextTick(o)},removeFrame:function(o){var c=this.frames.indexOf(o);return c!==-1&&this.removeFrameAt(c),this},removeFrameAt:function(o){return this.frames.splice(o,1),this.updateFrameSequence(),this},repeatAnimation:function(o){if(o._pendingStop===2){if(o._pendingStopValue===0)return o.stop();o._pendingStopValue--}o.repeatDelay>0&&!o.pendingRepeat?(o.pendingRepeat=!0,o.accumulator-=o.nextTick,o.nextTick+=o.repeatDelay):(o.repeatCounter--,o.forward?o.setCurrentFrame(o.currentFrame.nextFrame):o.setCurrentFrame(o.currentFrame.prevFrame),o.isPlaying&&(this.getNextTick(o),o.handleRepeat()))},toJSON:function(){var o={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(c){o.frames.push(c.toJSON())}),o},updateFrameSequence:function(){for(var o=this.frames.length,c=1/(o-1),p,v=0;v1?(p.isLast=!0,p.prevFrame=this.frames[o-2],p.nextFrame=this.frames[0]):o>1&&(p.prevFrame=this.frames[v-1],p.nextFrame=this.frames[v+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(h.PAUSE_ALL,this.pause,this),this.manager.off(h.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a,l,n,u,f){f===void 0&&(f=!1),this.textureKey=a,this.textureFrame=l,this.index=n,this.frame=u,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=f},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});s.exports=d},60848:(s,y,e)=>{/** + */var r=e(83419),d=new r({initialize:function(a,l,n,u,f){f===void 0&&(f=!1),this.textureKey=a,this.textureFrame=l,this.index=n,this.frame=u,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=f},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});s.exports=d},60848:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(42099),d=e(83419),h=e(90330),a=e(50792),l=e(74943),n=e(8443),u=e(95540),f=e(35154),o=e(36383),c=e(20283),p=e(41836),v=new d({Extends:a,initialize:function(S){a.call(this),this.game=S,this.textureManager=null,this.globalTimeScale=1,this.anims=new h,this.mixes=new h,this.paused=!1,this.name="AnimationManager",S.events.once(n.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(n.DESTROY,this.destroy,this)},addMix:function(m,S,M){var w=this.anims,C=this.mixes,A=typeof m=="string"?m:m.key,P=typeof S=="string"?S:S.key;if(w.has(A)&&w.has(P)){var b=C.get(A);b||(b={}),b[P]=M,C.set(A,b)}return this},removeMix:function(m,S){var M=this.mixes,w=typeof m=="string"?m:m.key,C=M.get(w);if(C)if(S){var A=typeof S=="string"?S:S.key;C.hasOwnProperty(A)&&delete C[A]}else S||M.delete(w);return this},getMix:function(m,S){var M=this.mixes,w=typeof m=="string"?m:m.key,C=typeof S=="string"?S:S.key,A=M.get(w);return A&&A.hasOwnProperty(C)?A[C]:0},add:function(m,S){return this.anims.has(m)?(console.warn("Animation key exists: "+m),this):(S.key=m,this.anims.set(m,S),this.emit(l.ADD_ANIMATION,m,S),this)},exists:function(m){return this.anims.has(m)},createFromAseprite:function(m,S,M){var w=[],C=this.game.cache.json.get(m);if(!C)return console.warn("No Aseprite data found for: "+m),w;var A=this,P=f(C,"meta",null),b=f(C,"frames",null);if(P&&b){var O=f(P,"frameTags",[]);O.forEach(function(I){var D=[],B=u(I,"name",null),G=u(I,"from",0),z=u(I,"to",0),X=u(I,"direction","forward");if(B&&(!S||S&&S.indexOf(B)>-1)){for(var j=0,Q=G;Q<=z;Q++){var tt=Q.toString(),Y=b[tt];if(Y){var Z=u(Y,"duration",o.MAX_SAFE_INTEGER);D.push({key:m,frame:tt,duration:Z}),j+=Z}}X==="reverse"&&(D=D.reverse());var U={key:B,frames:D,duration:j,yoyo:X==="pingpong"},H;M?M.anims&&(H=M.anims.create(U)):H=A.create(U),H&&w.push(H)}})}return w},create:function(m){var S=m.key,M=!1;return S&&(M=this.get(S),M?console.warn("AnimationManager key already exists: "+S):(M=new r(this,S,m),this.anims.set(S,M),this.emit(l.ADD_ANIMATION,S,M))),M},fromJSON:function(m,S){S===void 0&&(S=!1),S&&this.anims.clear(),typeof m=="string"&&(m=JSON.parse(m));var M=[];if(m.hasOwnProperty("anims")&&Array.isArray(m.anims)){for(var w=0;w{/** + */var r=e(42099),d=e(83419),h=e(90330),a=e(50792),l=e(74943),n=e(8443),u=e(95540),f=e(35154),o=e(36383),c=e(20283),p=e(41836),v=new d({Extends:a,initialize:function(S){a.call(this),this.game=S,this.textureManager=null,this.globalTimeScale=1,this.anims=new h,this.mixes=new h,this.paused=!1,this.name="AnimationManager",S.events.once(n.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(n.DESTROY,this.destroy,this)},addMix:function(m,S,M){var w=this.anims,C=this.mixes,A=typeof m=="string"?m:m.key,P=typeof S=="string"?S:S.key;if(w.has(A)&&w.has(P)){var b=C.get(A);b||(b={}),b[P]=M,C.set(A,b)}return this},removeMix:function(m,S){var M=this.mixes,w=typeof m=="string"?m:m.key,C=M.get(w);if(C)if(S){var A=typeof S=="string"?S:S.key;C.hasOwnProperty(A)&&delete C[A]}else S||M.delete(w);return this},getMix:function(m,S){var M=this.mixes,w=typeof m=="string"?m:m.key,C=typeof S=="string"?S:S.key,A=M.get(w);return A&&A.hasOwnProperty(C)?A[C]:0},add:function(m,S){return this.anims.has(m)?(console.warn("Animation key exists: "+m),this):(S.key=m,this.anims.set(m,S),this.emit(l.ADD_ANIMATION,m,S),this)},exists:function(m){return this.anims.has(m)},createFromAseprite:function(m,S,M){var w=[],C=this.game.cache.json.get(m);if(!C)return console.warn("No Aseprite data found for: "+m),w;var A=this,P=f(C,"meta",null),b=f(C,"frames",null);if(P&&b){var O=f(P,"frameTags",[]);O.forEach(function(I){var D=[],B=u(I,"name",null),G=u(I,"from",0),z=u(I,"to",0),X=u(I,"direction","forward");if(B&&(!S||S&&S.indexOf(B)>-1)){for(var j=0,Q=G;Q<=z;Q++){var tt=Q.toString(),Y=b[tt];if(Y){var $=u(Y,"duration",o.MAX_SAFE_INTEGER);D.push({key:m,frame:tt,duration:$}),j+=$}}X==="reverse"&&(D=D.reverse());var U={key:B,frames:D,duration:j,yoyo:X==="pingpong"},H;M?M.anims&&(H=M.anims.create(U)):H=A.create(U),H&&w.push(H)}})}return w},create:function(m){var S=m.key,M=!1;return S&&(M=this.get(S),M?console.warn("AnimationManager key already exists: "+S):(M=new r(this,S,m),this.anims.set(S,M),this.emit(l.ADD_ANIMATION,S,M))),M},fromJSON:function(m,S){S===void 0&&(S=!1),S&&this.anims.clear(),typeof m=="string"&&(m=JSON.parse(m));var M=[];if(m.hasOwnProperty("anims")&&Array.isArray(m.anims)){for(var w=0;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -293,19 +293,19 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="resumeall"},74943:(s,y,e)=>{/** + */s.exports="resumeall"},74943:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={ADD_ANIMATION:e(57090),ANIMATION_COMPLETE:e(25312),ANIMATION_COMPLETE_KEY:e(89580),ANIMATION_REPEAT:e(52860),ANIMATION_RESTART:e(63850),ANIMATION_START:e(99085),ANIMATION_STOP:e(28087),ANIMATION_UPDATE:e(1794),PAUSE_ALL:e(52562),REMOVE_ANIMATION:e(57953),RESUME_ALL:e(68339)}},60421:(s,y,e)=>{/** + */s.exports={ADD_ANIMATION:e(57090),ANIMATION_COMPLETE:e(25312),ANIMATION_COMPLETE_KEY:e(89580),ANIMATION_REPEAT:e(52860),ANIMATION_RESTART:e(63850),ANIMATION_START:e(99085),ANIMATION_STOP:e(28087),ANIMATION_UPDATE:e(1794),PAUSE_ALL:e(52562),REMOVE_ANIMATION:e(57953),RESUME_ALL:e(68339)}},60421:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Animation:e(42099),AnimationFrame:e(41138),AnimationManager:e(60848),AnimationState:e(9674),Events:e(74943)}},2161:(s,y,e)=>{/** + */s.exports={Animation:e(42099),AnimationFrame:e(41138),AnimationManager:e(60848),AnimationState:e(9674),Events:e(74943)}},2161:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(90330),h=e(50792),a=e(24736),l=new r({initialize:function(){this.entries=new d,this.events=new h},add:function(n,u){return this.entries.set(n,u),this.events.emit(a.ADD,this,n,u),this},has:function(n){return this.entries.has(n)},exists:function(n){return this.entries.has(n)},get:function(n){return this.entries.get(n)},remove:function(n){var u=this.get(n);return u&&(this.entries.delete(n),this.events.emit(a.REMOVE,this,n,u.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});s.exports=l},24047:(s,y,e)=>{/** + */var r=e(83419),d=e(90330),h=e(50792),a=e(24736),l=new r({initialize:function(){this.entries=new d,this.events=new h},add:function(n,u){return this.entries.set(n,u),this.events.emit(a.ADD,this,n,u),this},has:function(n){return this.entries.has(n)},exists:function(n){return this.entries.has(n)},get:function(n){return this.entries.get(n)},remove:function(n){var u=this.get(n);return u&&(this.entries.delete(n),this.events.emit(a.REMOVE,this,n,u.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});s.exports=l},24047:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -317,51 +317,51 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="remove"},24736:(s,y,e)=>{/** + */s.exports="remove"},24736:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={ADD:e(51464),REMOVE:e(59261)}},83388:(s,y,e)=>{/** + */s.exports={ADD:e(51464),REMOVE:e(59261)}},83388:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={BaseCache:e(2161),CacheManager:e(24047),Events:e(24736)}},71911:(s,y,e)=>{/** + */s.exports={BaseCache:e(2161),CacheManager:e(24047),Events:e(24736)}},71911:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(31401),h=e(39506),a=e(50792),l=e(19715),n=e(87841),u=e(61340),f=e(80333),o=e(26099),c=new r({Extends:a,Mixins:[d.AlphaSingle,d.Visible],initialize:function(v,m,S,M){v===void 0&&(v=0),m===void 0&&(m=0),S===void 0&&(S=0),M===void 0&&(M=0),a.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new n,this.dirty=!0,this._x=v,this._y=m,this._width=S,this._height=M,this._bounds=new n,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new u,this.transparent=!0,this.backgroundColor=f("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new o(S/2,M/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(p){this.renderList.push(p)},setOrigin:function(p,v){return p===void 0&&(p=.5),v===void 0&&(v=p),this.originX=p,this.originY=v,this},getScroll:function(p,v,m){m===void 0&&(m=new o);var S=this.width*.5,M=this.height*.5;return m.x=p-S,m.y=v-M,this.useBounds&&(m.x=this.clampX(m.x),m.y=this.clampY(m.y)),m},centerOnX:function(p){var v=this.width*.5;return this.midPoint.x=p,this.scrollX=p-v,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(p){var v=this.height*.5;return this.midPoint.y=p,this.scrollY=p-v,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(p,v){return this.centerOnX(p),this.centerOnY(v),this},centerToBounds:function(){if(this.useBounds){var p=this._bounds,v=this.width*.5,m=this.height*.5;this.midPoint.set(p.centerX,p.centerY),this.scrollX=p.centerX-v,this.scrollY=p.centerY-m}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(p){if(this.disableCull)return p;var v=this.matrix.matrix,m=v[0],S=v[1],M=v[2],w=v[3],C=m*w-S*M;if(!C)return p;var A=v[4],P=v[5],b=this.scrollX,O=this.scrollY,I=this.width,D=this.height,B=this.y,G=B+D,z=this.x,X=z+I,j=this.culledObjects,Q=p.length;C=1/C,j.length=0;for(var tt=0;ttz&&_B&&qM&&(p=M),p},clampY:function(p){var v=this._bounds,m=this.displayHeight,S=v.y+(m-this.height)/2,M=Math.max(S,S+v.height-m);return pM&&(p=M),p},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(p){return p===void 0&&(p=0),this.rotation=h(p),this},setBackgroundColor:function(p){return p===void 0&&(p="rgba(0,0,0,0)"),this.backgroundColor=f(p),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(p,v,m,S,M){return M===void 0&&(M=!1),this._bounds.setTo(p,v,m,S),this.dirty=!0,this.useBounds=!0,M?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(p){p===void 0&&(p=new n);var v=this._bounds;return p.setTo(v.x,v.y,v.width,v.height),p},setName:function(p){return p===void 0&&(p=""),this.name=p,this},setPosition:function(p,v){return v===void 0&&(v=p),this.x=p,this.y=v,this},setRotation:function(p){return p===void 0&&(p=0),this.rotation=p,this},setRoundPixels:function(p){return this.roundPixels=p,this},setScene:function(p,v){v===void 0&&(v=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=p,this.isSceneCamera=v;var m=p.sys;return this.sceneManager=m.game.scene,this.scaleManager=m.scale,this.cameraManager=m.cameras,this.updateSystem(),this},setScroll:function(p,v){return v===void 0&&(v=p),this.scrollX=p,this.scrollY=v,this},setSize:function(p,v){return v===void 0&&(v=p),this.width=p,this.height=v,this},setViewport:function(p,v,m,S){return this.x=p,this.y=v,this.width=m,this.height=S,this},setZoom:function(p,v){return p===void 0&&(p=1),v===void 0&&(v=p),p===0&&(p=.001),v===0&&(v=.001),this.zoomX=p,this.zoomY=v,this},setMask:function(p,v){return v===void 0&&(v=!0),this.mask=p,this._maskCamera=v?this.cameraManager.default:this,this},clearMask:function(p){return p===void 0&&(p=!1),p&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var p={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&&(p.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),p},update:function(){},setIsSceneCamera:function(p){return this.isSceneCamera=p,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var p=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,v=this.sceneManager;p&&!this._customViewport?v.customViewports++:!p&&this._customViewport&&v.customViewports--,this.dirty=!0,this._customViewport=p}},destroy:function(){this.emit(l.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(p){this._x=p,this.updateSystem()}},y:{get:function(){return this._y},set:function(p){this._y=p,this.updateSystem()}},width:{get:function(){return this._width},set:function(p){this._width=p,this.updateSystem()}},height:{get:function(){return this._height},set:function(p){this._height=p,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(p){p!==this._scrollX&&(this._scrollX=p,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(p){p!==this._scrollY&&(this._scrollY=p,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(p){this._zoomX=p,this._zoomY=p,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(p){this._zoomX=p,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(p){this._zoomY=p,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(p){this._rotation=p,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}}});s.exports=c},38058:(s,y,e)=>{/** + */var r=e(83419),d=e(31401),h=e(39506),a=e(50792),l=e(19715),n=e(87841),u=e(61340),f=e(80333),o=e(26099),c=new r({Extends:a,Mixins:[d.AlphaSingle,d.Visible],initialize:function(v,m,S,M){v===void 0&&(v=0),m===void 0&&(m=0),S===void 0&&(S=0),M===void 0&&(M=0),a.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new n,this.dirty=!0,this._x=v,this._y=m,this._width=S,this._height=M,this._bounds=new n,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new u,this.transparent=!0,this.backgroundColor=f("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new o(S/2,M/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(p){this.renderList.push(p)},setOrigin:function(p,v){return p===void 0&&(p=.5),v===void 0&&(v=p),this.originX=p,this.originY=v,this},getScroll:function(p,v,m){m===void 0&&(m=new o);var S=this.width*.5,M=this.height*.5;return m.x=p-S,m.y=v-M,this.useBounds&&(m.x=this.clampX(m.x),m.y=this.clampY(m.y)),m},centerOnX:function(p){var v=this.width*.5;return this.midPoint.x=p,this.scrollX=p-v,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(p){var v=this.height*.5;return this.midPoint.y=p,this.scrollY=p-v,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(p,v){return this.centerOnX(p),this.centerOnY(v),this},centerToBounds:function(){if(this.useBounds){var p=this._bounds,v=this.width*.5,m=this.height*.5;this.midPoint.set(p.centerX,p.centerY),this.scrollX=p.centerX-v,this.scrollY=p.centerY-m}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(p){if(this.disableCull)return p;var v=this.matrix.matrix,m=v[0],S=v[1],M=v[2],w=v[3],C=m*w-S*M;if(!C)return p;var A=v[4],P=v[5],b=this.scrollX,O=this.scrollY,I=this.width,D=this.height,B=this.y,G=B+D,z=this.x,X=z+I,j=this.culledObjects,Q=p.length;C=1/C,j.length=0;for(var tt=0;ttz&&_B&&qM&&(p=M),p},clampY:function(p){var v=this._bounds,m=this.displayHeight,S=v.y+(m-this.height)/2,M=Math.max(S,S+v.height-m);return pM&&(p=M),p},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(p){return p===void 0&&(p=0),this.rotation=h(p),this},setBackgroundColor:function(p){return p===void 0&&(p="rgba(0,0,0,0)"),this.backgroundColor=f(p),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(p,v,m,S,M){return M===void 0&&(M=!1),this._bounds.setTo(p,v,m,S),this.dirty=!0,this.useBounds=!0,M?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(p){p===void 0&&(p=new n);var v=this._bounds;return p.setTo(v.x,v.y,v.width,v.height),p},setName:function(p){return p===void 0&&(p=""),this.name=p,this},setPosition:function(p,v){return v===void 0&&(v=p),this.x=p,this.y=v,this},setRotation:function(p){return p===void 0&&(p=0),this.rotation=p,this},setRoundPixels:function(p){return this.roundPixels=p,this},setScene:function(p,v){v===void 0&&(v=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=p,this.isSceneCamera=v;var m=p.sys;return this.sceneManager=m.game.scene,this.scaleManager=m.scale,this.cameraManager=m.cameras,this.updateSystem(),this},setScroll:function(p,v){return v===void 0&&(v=p),this.scrollX=p,this.scrollY=v,this},setSize:function(p,v){return v===void 0&&(v=p),this.width=p,this.height=v,this},setViewport:function(p,v,m,S){return this.x=p,this.y=v,this.width=m,this.height=S,this},setZoom:function(p,v){return p===void 0&&(p=1),v===void 0&&(v=p),p===0&&(p=.001),v===0&&(v=.001),this.zoomX=p,this.zoomY=v,this},setMask:function(p,v){return v===void 0&&(v=!0),this.mask=p,this._maskCamera=v?this.cameraManager.default:this,this},clearMask:function(p){return p===void 0&&(p=!1),p&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var p={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&&(p.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),p},update:function(){},setIsSceneCamera:function(p){return this.isSceneCamera=p,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var p=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,v=this.sceneManager;p&&!this._customViewport?v.customViewports++:!p&&this._customViewport&&v.customViewports--,this.dirty=!0,this._customViewport=p}},destroy:function(){this.emit(l.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(p){this._x=p,this.updateSystem()}},y:{get:function(){return this._y},set:function(p){this._y=p,this.updateSystem()}},width:{get:function(){return this._width},set:function(p){this._width=p,this.updateSystem()}},height:{get:function(){return this._height},set:function(p){this._height=p,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(p){p!==this._scrollX&&(this._scrollX=p,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(p){p!==this._scrollY&&(this._scrollY=p,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(p){this._zoomX=p,this._zoomY=p,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(p){this._zoomX=p,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(p){this._zoomY=p,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(p){this._rotation=p,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}}});s.exports=c},38058:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(71911),d=e(67502),h=e(45319),a=e(83419),l=e(31401),n=e(20052),u=e(19715),f=e(28915),o=e(87841),c=e(26099),p=new a({Extends:r,Mixins:[l.PostPipeline],initialize:function(m,S,M,w){r.call(this,m,S,M,w),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new n.Fade(this),this.flashEffect=new n.Flash(this),this.shakeEffect=new n.Shake(this),this.panEffect=new n.Pan(this),this.rotateToEffect=new n.RotateTo(this),this.zoomEffect=new n.Zoom(this),this.lerp=new c(1,1),this.followOffset=new c,this.deadzone=null,this._follow=null},setDeadzone:function(v,m){if(v===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=v,this.deadzone.height=m):this.deadzone=new o(0,0,v,m),this._follow){var S=this.width/2,M=this.height/2,w=this._follow.x-this.followOffset.x,C=this._follow.y-this.followOffset.y;this.midPoint.set(w,C),this.scrollX=w-S,this.scrollY=C-M}d(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(v,m,S,M,w,C){return this.fadeEffect.start(!1,v,m,S,M,!0,w,C)},fadeOut:function(v,m,S,M,w,C){return this.fadeEffect.start(!0,v,m,S,M,!0,w,C)},fadeFrom:function(v,m,S,M,w,C,A){return this.fadeEffect.start(!1,v,m,S,M,w,C,A)},fade:function(v,m,S,M,w,C,A){return this.fadeEffect.start(!0,v,m,S,M,w,C,A)},flash:function(v,m,S,M,w,C,A){return this.flashEffect.start(v,m,S,M,w,C,A)},shake:function(v,m,S,M,w){return this.shakeEffect.start(v,m,S,M,w)},pan:function(v,m,S,M,w,C,A){return this.panEffect.start(v,m,S,M,w,C,A)},rotateTo:function(v,m,S,M,w,C,A){return this.rotateToEffect.start(v,m,S,M,w,C,A)},zoomTo:function(v,m,S,M,w,C){return this.zoomEffect.start(v,m,S,M,w,C)},preRender:function(){this.renderList.length=0;var v=this.width,m=this.height,S=v*.5,M=m*.5,w=this.zoom,C=this.matrix,A=v*this.originX,P=m*this.originY,b=this._follow,O=this.deadzone,I=this.scrollX,D=this.scrollY;O&&d(O,this.midPoint.x,this.midPoint.y);var B=!1;if(b&&!this.panEffect.isRunning){var G=this.lerp,z=b.x-this.followOffset.x,X=b.y-this.followOffset.y;O?(zO.right&&(I=f(I,I+(z-O.right),G.x)),XO.bottom&&(D=f(D,D+(X-O.bottom),G.y))):(I=f(I,z-A,G.x),D=f(D,X-P,G.y)),B=!0}this.useBounds&&(I=this.clampX(I),D=this.clampY(D)),this.scrollX=I,this.scrollY=D;var j=I+S,Q=D+M;this.midPoint.set(j,Q);var tt=v/w,Y=m/w,Z=Math.floor(j-tt/2),U=Math.floor(Q-Y/2);this.worldView.setTo(Z,U,tt,Y),C.applyITRS(Math.floor(this.x+A),Math.floor(this.y+P),this.rotation,w,w),C.translate(-A,-P),this.shakeEffect.preRender(),B&&this.emit(u.FOLLOW_UPDATE,this,b)},setLerp:function(v,m){return v===void 0&&(v=1),m===void 0&&(m=v),this.lerp.set(v,m),this},setFollowOffset:function(v,m){return v===void 0&&(v=0),m===void 0&&(m=0),this.followOffset.set(v,m),this},startFollow:function(v,m,S,M,w,C){m===void 0&&(m=!1),S===void 0&&(S=1),M===void 0&&(M=S),w===void 0&&(w=0),C===void 0&&(C=w),this._follow=v,this.roundPixels=m,S=h(S,0,1),M=h(M,0,1),this.lerp.set(S,M),this.followOffset.set(w,C);var A=this.width/2,P=this.height/2,b=v.x-w,O=v.y-C;return this.midPoint.set(b,O),this.scrollX=b-A,this.scrollY=O-P,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(v,m){this.visible&&(this.rotateToEffect.update(v,m),this.panEffect.update(v,m),this.zoomEffect.update(v,m),this.shakeEffect.update(v,m),this.flashEffect.update(v,m),this.fadeEffect.update(v,m))},destroy:function(){this.resetFX(),r.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});s.exports=p},32743:(s,y,e)=>{/** + */var r=e(71911),d=e(67502),h=e(45319),a=e(83419),l=e(31401),n=e(20052),u=e(19715),f=e(28915),o=e(87841),c=e(26099),p=new a({Extends:r,Mixins:[l.PostPipeline],initialize:function(m,S,M,w){r.call(this,m,S,M,w),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new n.Fade(this),this.flashEffect=new n.Flash(this),this.shakeEffect=new n.Shake(this),this.panEffect=new n.Pan(this),this.rotateToEffect=new n.RotateTo(this),this.zoomEffect=new n.Zoom(this),this.lerp=new c(1,1),this.followOffset=new c,this.deadzone=null,this._follow=null},setDeadzone:function(v,m){if(v===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=v,this.deadzone.height=m):this.deadzone=new o(0,0,v,m),this._follow){var S=this.width/2,M=this.height/2,w=this._follow.x-this.followOffset.x,C=this._follow.y-this.followOffset.y;this.midPoint.set(w,C),this.scrollX=w-S,this.scrollY=C-M}d(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(v,m,S,M,w,C){return this.fadeEffect.start(!1,v,m,S,M,!0,w,C)},fadeOut:function(v,m,S,M,w,C){return this.fadeEffect.start(!0,v,m,S,M,!0,w,C)},fadeFrom:function(v,m,S,M,w,C,A){return this.fadeEffect.start(!1,v,m,S,M,w,C,A)},fade:function(v,m,S,M,w,C,A){return this.fadeEffect.start(!0,v,m,S,M,w,C,A)},flash:function(v,m,S,M,w,C,A){return this.flashEffect.start(v,m,S,M,w,C,A)},shake:function(v,m,S,M,w){return this.shakeEffect.start(v,m,S,M,w)},pan:function(v,m,S,M,w,C,A){return this.panEffect.start(v,m,S,M,w,C,A)},rotateTo:function(v,m,S,M,w,C,A){return this.rotateToEffect.start(v,m,S,M,w,C,A)},zoomTo:function(v,m,S,M,w,C){return this.zoomEffect.start(v,m,S,M,w,C)},preRender:function(){this.renderList.length=0;var v=this.width,m=this.height,S=v*.5,M=m*.5,w=this.zoom,C=this.matrix,A=v*this.originX,P=m*this.originY,b=this._follow,O=this.deadzone,I=this.scrollX,D=this.scrollY;O&&d(O,this.midPoint.x,this.midPoint.y);var B=!1;if(b&&!this.panEffect.isRunning){var G=this.lerp,z=b.x-this.followOffset.x,X=b.y-this.followOffset.y;O?(zO.right&&(I=f(I,I+(z-O.right),G.x)),XO.bottom&&(D=f(D,D+(X-O.bottom),G.y))):(I=f(I,z-A,G.x),D=f(D,X-P,G.y)),B=!0}this.useBounds&&(I=this.clampX(I),D=this.clampY(D)),this.scrollX=I,this.scrollY=D;var j=I+S,Q=D+M;this.midPoint.set(j,Q);var tt=v/w,Y=m/w,$=Math.floor(j-tt/2),U=Math.floor(Q-Y/2);this.worldView.setTo($,U,tt,Y),C.applyITRS(Math.floor(this.x+A),Math.floor(this.y+P),this.rotation,w,w),C.translate(-A,-P),this.shakeEffect.preRender(),B&&this.emit(u.FOLLOW_UPDATE,this,b)},setLerp:function(v,m){return v===void 0&&(v=1),m===void 0&&(m=v),this.lerp.set(v,m),this},setFollowOffset:function(v,m){return v===void 0&&(v=0),m===void 0&&(m=0),this.followOffset.set(v,m),this},startFollow:function(v,m,S,M,w,C){m===void 0&&(m=!1),S===void 0&&(S=1),M===void 0&&(M=S),w===void 0&&(w=0),C===void 0&&(C=w),this._follow=v,this.roundPixels=m,S=h(S,0,1),M=h(M,0,1),this.lerp.set(S,M),this.followOffset.set(w,C);var A=this.width/2,P=this.height/2,b=v.x-w,O=v.y-C;return this.midPoint.set(b,O),this.scrollX=b-A,this.scrollY=O-P,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(v,m){this.visible&&(this.rotateToEffect.update(v,m),this.panEffect.update(v,m),this.zoomEffect.update(v,m),this.shakeEffect.update(v,m),this.flashEffect.update(v,m),this.fadeEffect.update(v,m))},destroy:function(){this.resetFX(),r.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});s.exports=p},32743:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(38058),d=e(83419),h=e(95540),a=e(37277),l=e(37303),n=e(97480),u=e(44594),f=new d({initialize:function(c){this.scene=c,this.systems=c.sys,this.roundPixels=c.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,c.sys.events.once(u.BOOT,this.boot,this),c.sys.events.on(u.START,this.start,this)},boot:function(){var o=this.systems;o.settings.cameras?this.fromJSON(o.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new r(0,0,o.scale.width,o.scale.height).setScene(this.scene),o.game.scale.on(n.RESIZE,this.onResize,this),this.systems.events.once(u.DESTROY,this.destroy,this)},start:function(){if(!this.main){var o=this.systems;o.settings.cameras?this.fromJSON(o.settings.cameras):this.add(),this.main=this.cameras[0]}var c=this.systems.events;c.on(u.UPDATE,this.update,this),c.once(u.SHUTDOWN,this.shutdown,this)},add:function(o,c,p,v,m,S){o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=this.scene.sys.scale.width),v===void 0&&(v=this.scene.sys.scale.height),m===void 0&&(m=!1),S===void 0&&(S="");var M=new r(o,c,p,v);return M.setName(S),M.setScene(this.scene),M.setRoundPixels(this.roundPixels),M.id=this.getNextID(),this.cameras.push(M),m&&(this.main=M),M},addExisting:function(o,c){c===void 0&&(c=!1);var p=this.cameras.indexOf(o);return p===-1?(o.id=this.getNextID(),o.setRoundPixels(this.roundPixels),this.cameras.push(o),c&&(this.main=o),o):null},getNextID:function(){for(var o=this.cameras,c=1,p=0;p<32;p++){for(var v=!1,m=0;m0){S.preRender();var M=this.getVisibleChildren(c.getChildren(),S);o.render(p,M,S)}}},getVisibleChildren:function(o,c){return o.filter(function(p){return p.willRender(c)})},resetAll:function(){for(var o=0;o{/** + */var r=e(38058),d=e(83419),h=e(95540),a=e(37277),l=e(37303),n=e(97480),u=e(44594),f=new d({initialize:function(c){this.scene=c,this.systems=c.sys,this.roundPixels=c.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,c.sys.events.once(u.BOOT,this.boot,this),c.sys.events.on(u.START,this.start,this)},boot:function(){var o=this.systems;o.settings.cameras?this.fromJSON(o.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new r(0,0,o.scale.width,o.scale.height).setScene(this.scene),o.game.scale.on(n.RESIZE,this.onResize,this),this.systems.events.once(u.DESTROY,this.destroy,this)},start:function(){if(!this.main){var o=this.systems;o.settings.cameras?this.fromJSON(o.settings.cameras):this.add(),this.main=this.cameras[0]}var c=this.systems.events;c.on(u.UPDATE,this.update,this),c.once(u.SHUTDOWN,this.shutdown,this)},add:function(o,c,p,v,m,S){o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=this.scene.sys.scale.width),v===void 0&&(v=this.scene.sys.scale.height),m===void 0&&(m=!1),S===void 0&&(S="");var M=new r(o,c,p,v);return M.setName(S),M.setScene(this.scene),M.setRoundPixels(this.roundPixels),M.id=this.getNextID(),this.cameras.push(M),m&&(this.main=M),M},addExisting:function(o,c){c===void 0&&(c=!1);var p=this.cameras.indexOf(o);return p===-1?(o.id=this.getNextID(),o.setRoundPixels(this.roundPixels),this.cameras.push(o),c&&(this.main=o),o):null},getNextID:function(){for(var o=this.cameras,c=1,p=0;p<32;p++){for(var v=!1,m=0;m0){S.preRender();var M=this.getVisibleChildren(c.getChildren(),S);o.render(p,M,S)}}},getVisibleChildren:function(o,c){return o.filter(function(p){return p.willRender(c)})},resetAll:function(){for(var o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(45319),d=e(83419),h=e(19715),a=new d({initialize:function(n){this.camera=n,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(l,n,u,f,o,c,p,v){if(l===void 0&&(l=!0),n===void 0&&(n=1e3),u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=!1),p===void 0&&(p=null),v===void 0&&(v=this.camera.scene),!c&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=n,this.direction=l,this.progress=0,this.red=u,this.green=f,this.blue=o,this.alpha=l?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=p,this._onUpdateScope=v;var m=l?h.FADE_OUT_START:h.FADE_IN_START;return this.camera.emit(m,this.camera,this,n,u,f,o),this.camera},update:function(l,n){this.isRunning&&(this._elapsed+=n,this.progress=r(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + */var r=e(45319),d=e(83419),h=e(19715),a=new d({initialize:function(n){this.camera=n,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(l,n,u,f,o,c,p,v){if(l===void 0&&(l=!0),n===void 0&&(n=1e3),u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=!1),p===void 0&&(p=null),v===void 0&&(v=this.camera.scene),!c&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=n,this.direction=l,this.progress=0,this.red=u,this.green=f,this.blue=o,this.alpha=l?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=p,this._onUpdateScope=v;var m=l?h.FADE_OUT_START:h.FADE_IN_START;return this.camera.emit(m,this.camera,this,n,u,f,o),this.camera},update:function(l,n){this.isRunning&&(this._elapsed+=n,this.progress=r(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(45319),d=e(83419),h=e(19715),a=new d({initialize:function(n){this.camera=n,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(l,n,u,f,o,c,p){return l===void 0&&(l=250),n===void 0&&(n=255),u===void 0&&(u=255),f===void 0&&(f=255),o===void 0&&(o=!1),c===void 0&&(c=null),p===void 0&&(p=this.camera.scene),!o&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=l,this.progress=0,this.red=n,this.green=u,this.blue=f,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=c,this._onUpdateScope=p,this.camera.emit(h.FLASH_START,this.camera,this,l,n,u,f),this.camera)},update:function(l,n){this.isRunning&&(this._elapsed+=n,this.progress=r(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + */var r=e(45319),d=e(83419),h=e(19715),a=new d({initialize:function(n){this.camera=n,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(l,n,u,f,o,c,p){return l===void 0&&(l=250),n===void 0&&(n=255),u===void 0&&(u=255),f===void 0&&(f=255),o===void 0&&(o=!1),c===void 0&&(c=null),p===void 0&&(p=this.camera.scene),!o&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=l,this.progress=0,this.red=n,this.green=u,this.blue=f,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=c,this._onUpdateScope=p,this.camera.emit(h.FLASH_START,this.camera,this,l,n,u,f),this.camera)},update:function(l,n){this.isRunning&&(this._elapsed+=n,this.progress=r(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(45319),d=e(83419),h=e(62640),a=e(19715),l=e(26099),n=new d({initialize:function(f){this.camera=f,this.isRunning=!1,this.duration=0,this.source=new l,this.current=new l,this.destination=new l,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(u,f,o,c,p,v,m){o===void 0&&(o=1e3),c===void 0&&(c=h.Linear),p===void 0&&(p=!1),v===void 0&&(v=null),m===void 0&&(m=this.camera.scene);var S=this.camera;return!p&&this.isRunning||(this.isRunning=!0,this.duration=o,this.progress=0,this.source.set(S.scrollX,S.scrollY),this.destination.set(u,f),S.getScroll(u,f,this.current),typeof c=="string"&&h.hasOwnProperty(c)?this.ease=h[c]:typeof c=="function"&&(this.ease=c),this._elapsed=0,this._onUpdate=v,this._onUpdateScope=m,this.camera.emit(a.PAN_START,this.camera,this,o,u,f)),S},update:function(u,f){if(this.isRunning){this._elapsed+=f;var o=r(this._elapsed/this.duration,0,1);this.progress=o;var c=this.camera;if(this._elapsed{/** + */var r=e(45319),d=e(83419),h=e(62640),a=e(19715),l=e(26099),n=new d({initialize:function(f){this.camera=f,this.isRunning=!1,this.duration=0,this.source=new l,this.current=new l,this.destination=new l,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(u,f,o,c,p,v,m){o===void 0&&(o=1e3),c===void 0&&(c=h.Linear),p===void 0&&(p=!1),v===void 0&&(v=null),m===void 0&&(m=this.camera.scene);var S=this.camera;return!p&&this.isRunning||(this.isRunning=!0,this.duration=o,this.progress=0,this.source.set(S.scrollX,S.scrollY),this.destination.set(u,f),S.getScroll(u,f,this.current),typeof c=="string"&&h.hasOwnProperty(c)?this.ease=h[c]:typeof c=="function"&&(this.ease=c),this._elapsed=0,this._onUpdate=v,this._onUpdateScope=m,this.camera.emit(a.PAN_START,this.camera,this,o,u,f)),S},update:function(u,f){if(this.isRunning){this._elapsed+=f;var o=r(this._elapsed/this.duration,0,1);this.progress=o;var c=this.camera;if(this._elapsed{/** * @author Jason Nicholls * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */var r=e(45319),d=e(83419),h=e(19715),a=e(62640),l=new d({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(n,u,f,o,c,p,v){f===void 0&&(f=1e3),o===void 0&&(o=a.Linear),c===void 0&&(c=!1),p===void 0&&(p=null),v===void 0&&(v=this.camera.scene),u===void 0&&(u=!1),this.shortestPath=u;var m=n;n<0?(m=-1*n,this.clockwise=!1):this.clockwise=!0;var S=360*Math.PI/180;m=m-Math.floor(m/S)*S;var M=this.camera;if(!c&&this.isRunning)return M;if(this.isRunning=!0,this.duration=f,this.progress=0,this.source=M.rotation,this.destination=m,typeof o=="string"&&a.hasOwnProperty(o)?this.ease=a[o]:typeof o=="function"&&(this.ease=o),this._elapsed=0,this._onUpdate=p,this._onUpdateScope=v,this.shortestPath){var w=0,C=0;this.destination>this.source?w=Math.abs(this.destination-this.source):w=Math.abs(this.destination+S)-this.source,this.source>this.destination?C=Math.abs(this.source-this.destination):C=Math.abs(this.source+S)-this.destination,wC&&(this.clockwise=!1)}return this.camera.emit(h.ROTATE_START,this.camera,this,f,m),M},update:function(n,u){if(this.isRunning){this._elapsed+=u;var f=r(this._elapsed/this.duration,0,1);this.progress=f;var o=this.camera;if(this._elapsed=S?p=Math.abs(m-S):p=Math.abs(m+v)-S;var M=0;this.clockwise?M=o.rotation+p*c:M=o.rotation-p*c,o.rotation=M,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,o,f,M)}else o.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,o,f,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(h.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});s.exports=l},30330:(s,y,e)=>{/** + */var r=e(45319),d=e(83419),h=e(19715),a=e(62640),l=new d({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(n,u,f,o,c,p,v){f===void 0&&(f=1e3),o===void 0&&(o=a.Linear),c===void 0&&(c=!1),p===void 0&&(p=null),v===void 0&&(v=this.camera.scene),u===void 0&&(u=!1),this.shortestPath=u;var m=n;n<0?(m=-1*n,this.clockwise=!1):this.clockwise=!0;var S=360*Math.PI/180;m=m-Math.floor(m/S)*S;var M=this.camera;if(!c&&this.isRunning)return M;if(this.isRunning=!0,this.duration=f,this.progress=0,this.source=M.rotation,this.destination=m,typeof o=="string"&&a.hasOwnProperty(o)?this.ease=a[o]:typeof o=="function"&&(this.ease=o),this._elapsed=0,this._onUpdate=p,this._onUpdateScope=v,this.shortestPath){var w=0,C=0;this.destination>this.source?w=Math.abs(this.destination-this.source):w=Math.abs(this.destination+S)-this.source,this.source>this.destination?C=Math.abs(this.source-this.destination):C=Math.abs(this.source+S)-this.destination,wC&&(this.clockwise=!1)}return this.camera.emit(h.ROTATE_START,this.camera,this,f,m),M},update:function(n,u){if(this.isRunning){this._elapsed+=u;var f=r(this._elapsed/this.duration,0,1);this.progress=f;var o=this.camera;if(this._elapsed=S?p=Math.abs(m-S):p=Math.abs(m+v)-S;var M=0;this.clockwise?M=o.rotation+p*c:M=o.rotation-p*c,o.rotation=M,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,o,f,M)}else o.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,o,f,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(h.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});s.exports=l},30330:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(45319),d=e(83419),h=e(19715),a=e(26099),l=new d({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.intensity=new a,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(n,u,f,o,c){return n===void 0&&(n=100),u===void 0&&(u=.05),f===void 0&&(f=!1),o===void 0&&(o=null),c===void 0&&(c=this.camera.scene),!f&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=n,this.progress=0,typeof u=="number"?this.intensity.set(u):this.intensity.set(u.x,u.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=o,this._onUpdateScope=c,this.camera.emit(h.SHAKE_START,this.camera,this,n,u),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(n,u){if(this.isRunning)if(this._elapsed+=u,this.progress=r(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + */var r=e(45319),d=e(83419),h=e(19715),a=e(26099),l=new d({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.intensity=new a,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(n,u,f,o,c){return n===void 0&&(n=100),u===void 0&&(u=.05),f===void 0&&(f=!1),o===void 0&&(o=null),c===void 0&&(c=this.camera.scene),!f&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=n,this.progress=0,typeof u=="number"?this.intensity.set(u):this.intensity.set(u.x,u.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=o,this._onUpdateScope=c,this.camera.emit(h.SHAKE_START,this.camera,this,n,u),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(n,u){if(this.isRunning)if(this._elapsed+=u,this.progress=r(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(45319),d=e(83419),h=e(62640),a=e(19715),l=new d({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(n,u,f,o,c,p){u===void 0&&(u=1e3),f===void 0&&(f=h.Linear),o===void 0&&(o=!1),c===void 0&&(c=null),p===void 0&&(p=this.camera.scene);var v=this.camera;return!o&&this.isRunning||(this.isRunning=!0,this.duration=u,this.progress=0,this.source=v.zoom,this.destination=n,typeof f=="string"&&h.hasOwnProperty(f)?this.ease=h[f]:typeof f=="function"&&(this.ease=f),this._elapsed=0,this._onUpdate=c,this._onUpdateScope=p,this.camera.emit(a.ZOOM_START,this.camera,this,u,n)),v},update:function(n,u){this.isRunning&&(this._elapsed+=u,this.progress=r(this._elapsed/this.duration,0,1),this._elapsed{/** + */var r=e(45319),d=e(83419),h=e(62640),a=e(19715),l=new d({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(n,u,f,o,c,p){u===void 0&&(u=1e3),f===void 0&&(f=h.Linear),o===void 0&&(o=!1),c===void 0&&(c=null),p===void 0&&(p=this.camera.scene);var v=this.camera;return!o&&this.isRunning||(this.isRunning=!0,this.duration=u,this.progress=0,this.source=v.zoom,this.destination=n,typeof f=="string"&&h.hasOwnProperty(f)?this.ease=h[f]:typeof f=="function"&&(this.ease=f),this._elapsed=0,this._onUpdate=c,this._onUpdateScope=p,this.camera.emit(a.ZOOM_START,this.camera,this,u,n)),v},update:function(n,u){this.isRunning&&(this._elapsed+=u,this.progress=r(this._elapsed/this.duration,0,1),this._elapsed{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -437,55 +437,55 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="camerazoomstart"},19715:(s,y,e)=>{/** + */s.exports="camerazoomstart"},19715:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={DESTROY:e(16438),FADE_IN_COMPLETE:e(32726),FADE_IN_START:e(87807),FADE_OUT_COMPLETE:e(45917),FADE_OUT_START:e(95666),FLASH_COMPLETE:e(47056),FLASH_START:e(91261),FOLLOW_UPDATE:e(45047),PAN_COMPLETE:e(81927),PAN_START:e(74264),POST_RENDER:e(54419),PRE_RENDER:e(79330),ROTATE_COMPLETE:e(93183),ROTATE_START:e(80112),SHAKE_COMPLETE:e(62252),SHAKE_START:e(86017),ZOOM_COMPLETE:e(539),ZOOM_START:e(51892)}},87969:(s,y,e)=>{/** + */s.exports={DESTROY:e(16438),FADE_IN_COMPLETE:e(32726),FADE_IN_START:e(87807),FADE_OUT_COMPLETE:e(45917),FADE_OUT_START:e(95666),FLASH_COMPLETE:e(47056),FLASH_START:e(91261),FOLLOW_UPDATE:e(45047),PAN_COMPLETE:e(81927),PAN_START:e(74264),POST_RENDER:e(54419),PRE_RENDER:e(79330),ROTATE_COMPLETE:e(93183),ROTATE_START:e(80112),SHAKE_COMPLETE:e(62252),SHAKE_START:e(86017),ZOOM_COMPLETE:e(539),ZOOM_START:e(51892)}},87969:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Camera:e(38058),BaseCamera:e(71911),CameraManager:e(32743),Effects:e(20052),Events:e(19715)}},63091:(s,y,e)=>{/** + */s.exports={Camera:e(38058),BaseCamera:e(71911),CameraManager:e(32743),Effects:e(20052),Events:e(19715)}},63091:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(35154),h=new r({initialize:function(l){this.camera=d(l,"camera",null),this.left=d(l,"left",null),this.right=d(l,"right",null),this.up=d(l,"up",null),this.down=d(l,"down",null),this.zoomIn=d(l,"zoomIn",null),this.zoomOut=d(l,"zoomOut",null),this.zoomSpeed=d(l,"zoomSpeed",.01),this.minZoom=d(l,"minZoom",.001),this.maxZoom=d(l,"maxZoom",1e3),this.speedX=0,this.speedY=0;var n=d(l,"speed",null);typeof n=="number"?(this.speedX=n,this.speedY=n):(this.speedX=d(l,"speed.x",0),this.speedY=d(l,"speed.y",0)),this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(a){return this.camera=a,this},update:function(a){if(this.active){a===void 0&&(a=1);var l=this.camera;this.up&&this.up.isDown?l.scrollY-=this.speedY*a|0:this.down&&this.down.isDown&&(l.scrollY+=this.speedY*a|0),this.left&&this.left.isDown?l.scrollX-=this.speedX*a|0:this.right&&this.right.isDown&&(l.scrollX+=this.speedX*a|0),this.zoomIn&&this.zoomIn.isDown?(l.zoom-=this.zoomSpeed,l.zoomthis.maxZoom&&(l.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});s.exports=h},58818:(s,y,e)=>{/** + */var r=e(83419),d=e(35154),h=new r({initialize:function(l){this.camera=d(l,"camera",null),this.left=d(l,"left",null),this.right=d(l,"right",null),this.up=d(l,"up",null),this.down=d(l,"down",null),this.zoomIn=d(l,"zoomIn",null),this.zoomOut=d(l,"zoomOut",null),this.zoomSpeed=d(l,"zoomSpeed",.01),this.minZoom=d(l,"minZoom",.001),this.maxZoom=d(l,"maxZoom",1e3),this.speedX=0,this.speedY=0;var n=d(l,"speed",null);typeof n=="number"?(this.speedX=n,this.speedY=n):(this.speedX=d(l,"speed.x",0),this.speedY=d(l,"speed.y",0)),this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(a){return this.camera=a,this},update:function(a){if(this.active){a===void 0&&(a=1);var l=this.camera;this.up&&this.up.isDown?l.scrollY-=this.speedY*a|0:this.down&&this.down.isDown&&(l.scrollY+=this.speedY*a|0),this.left&&this.left.isDown?l.scrollX-=this.speedX*a|0:this.right&&this.right.isDown&&(l.scrollX+=this.speedX*a|0),this.zoomIn&&this.zoomIn.isDown?(l.zoom-=this.zoomSpeed,l.zoomthis.maxZoom&&(l.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});s.exports=h},58818:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(35154),h=new r({initialize:function(l){this.camera=d(l,"camera",null),this.left=d(l,"left",null),this.right=d(l,"right",null),this.up=d(l,"up",null),this.down=d(l,"down",null),this.zoomIn=d(l,"zoomIn",null),this.zoomOut=d(l,"zoomOut",null),this.zoomSpeed=d(l,"zoomSpeed",.01),this.minZoom=d(l,"minZoom",.001),this.maxZoom=d(l,"maxZoom",1e3),this.accelX=0,this.accelY=0;var n=d(l,"acceleration",null);typeof n=="number"?(this.accelX=n,this.accelY=n):(this.accelX=d(l,"acceleration.x",0),this.accelY=d(l,"acceleration.y",0)),this.dragX=0,this.dragY=0;var u=d(l,"drag",null);typeof u=="number"?(this.dragX=u,this.dragY=u):(this.dragX=d(l,"drag.x",0),this.dragY=d(l,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var f=d(l,"maxSpeed",null);typeof f=="number"?(this.maxSpeedX=f,this.maxSpeedY=f):(this.maxSpeedX=d(l,"maxSpeed.x",0),this.maxSpeedY=d(l,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(a){return this.camera=a,this},update:function(a){if(this.active){a===void 0&&(a=1);var l=this.camera;this._speedX>0?(this._speedX-=this.dragX*a,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*a,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*a,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*a,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,this._speedX!==0&&(l.scrollX-=this._speedX*a|0),this._speedY!==0&&(l.scrollY-=this._speedY*a|0),this._zoom!==0&&(l.zoom+=this._zoom,l.zoomthis.maxZoom&&(l.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});s.exports=h},38865:(s,y,e)=>{/** + */var r=e(83419),d=e(35154),h=new r({initialize:function(l){this.camera=d(l,"camera",null),this.left=d(l,"left",null),this.right=d(l,"right",null),this.up=d(l,"up",null),this.down=d(l,"down",null),this.zoomIn=d(l,"zoomIn",null),this.zoomOut=d(l,"zoomOut",null),this.zoomSpeed=d(l,"zoomSpeed",.01),this.minZoom=d(l,"minZoom",.001),this.maxZoom=d(l,"maxZoom",1e3),this.accelX=0,this.accelY=0;var n=d(l,"acceleration",null);typeof n=="number"?(this.accelX=n,this.accelY=n):(this.accelX=d(l,"acceleration.x",0),this.accelY=d(l,"acceleration.y",0)),this.dragX=0,this.dragY=0;var u=d(l,"drag",null);typeof u=="number"?(this.dragX=u,this.dragY=u):(this.dragX=d(l,"drag.x",0),this.dragY=d(l,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var f=d(l,"maxSpeed",null);typeof f=="number"?(this.maxSpeedX=f,this.maxSpeedY=f):(this.maxSpeedX=d(l,"maxSpeed.x",0),this.maxSpeedY=d(l,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(a){return this.camera=a,this},update:function(a){if(this.active){a===void 0&&(a=1);var l=this.camera;this._speedX>0?(this._speedX-=this.dragX*a,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*a,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*a,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*a,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,this._speedX!==0&&(l.scrollX-=this._speedX*a|0),this._speedY!==0&&(l.scrollY-=this._speedY*a|0),this._zoom!==0&&(l.zoom+=this._zoom,l.zoomthis.maxZoom&&(l.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});s.exports=h},38865:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={FixedKeyControl:e(63091),SmoothedKeyControl:e(58818)}},26638:(s,y,e)=>{/** + */s.exports={FixedKeyControl:e(63091),SmoothedKeyControl:e(58818)}},26638:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Controls:e(38865),Scene2D:e(87969)}},8054:(s,y,e)=>{/** + */s.exports={Controls:e(38865),Scene2D:e(87969)}},8054:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r={VERSION:"3.80.1",BlendModes:e(10312),ScaleModes:e(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};s.exports=r},69547:(s,y,e)=>{/** + */var r={VERSION:"3.80.1",BlendModes:e(10312),ScaleModes:e(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};s.exports=r},69547:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(8054),h=e(42363),a=e(82264),l=e(95540),n=e(35154),u=e(41212),f=e(29747),o=e(75508),c=e(36060),p=e(80333),v=new r({initialize:function(S){S===void 0&&(S={});var M=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],w="#ffffff",C=n(S,"scale",null);this.width=n(C,"width",1024,S),this.height=n(C,"height",768,S),this.zoom=n(C,"zoom",1,S),this.parent=n(C,"parent",void 0,S),this.scaleMode=n(C,C?"mode":"scaleMode",0,S),this.expandParent=n(C,"expandParent",!0,S),this.autoRound=n(C,"autoRound",!1,S),this.autoCenter=n(C,"autoCenter",0,S),this.resizeInterval=n(C,"resizeInterval",500,S),this.fullscreenTarget=n(C,"fullscreenTarget",null,S),this.minWidth=n(C,"min.width",0,S),this.maxWidth=n(C,"max.width",0,S),this.minHeight=n(C,"min.height",0,S),this.maxHeight=n(C,"max.height",0,S),this.snapWidth=n(C,"snap.width",0,S),this.snapHeight=n(C,"snap.height",0,S),this.renderType=n(S,"type",d.AUTO),this.canvas=n(S,"canvas",null),this.context=n(S,"context",null),this.canvasStyle=n(S,"canvasStyle",null),this.customEnvironment=n(S,"customEnvironment",!1),this.sceneConfig=n(S,"scene",null),this.seed=n(S,"seed",[(Date.now()*Math.random()).toString()]),o.RND=new o.RandomDataGenerator(this.seed),this.gameTitle=n(S,"title",""),this.gameURL=n(S,"url","https://phaser.io"),this.gameVersion=n(S,"version",""),this.autoFocus=n(S,"autoFocus",!0),this.stableSort=n(S,"stableSort",-1),this.stableSort===-1&&(this.stableSort=a.browser.es2019?1:0),a.features.stableSort=this.stableSort,this.domCreateContainer=n(S,"dom.createContainer",!1),this.domPointerEvents=n(S,"dom.pointerEvents","none"),this.inputKeyboard=n(S,"input.keyboard",!0),this.inputKeyboardEventTarget=n(S,"input.keyboard.target",window),this.inputKeyboardCapture=n(S,"input.keyboard.capture",[]),this.inputMouse=n(S,"input.mouse",!0),this.inputMouseEventTarget=n(S,"input.mouse.target",null),this.inputMousePreventDefaultDown=n(S,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=n(S,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=n(S,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=n(S,"input.mouse.preventDefaultWheel",!0),this.inputTouch=n(S,"input.touch",a.input.touch),this.inputTouchEventTarget=n(S,"input.touch.target",null),this.inputTouchCapture=n(S,"input.touch.capture",!0),this.inputActivePointers=n(S,"input.activePointers",1),this.inputSmoothFactor=n(S,"input.smoothFactor",0),this.inputWindowEvents=n(S,"input.windowEvents",!0),this.inputGamepad=n(S,"input.gamepad",!1),this.inputGamepadEventTarget=n(S,"input.gamepad.target",window),this.disableContextMenu=n(S,"disableContextMenu",!1),this.audio=n(S,"audio",{}),this.hideBanner=n(S,"banner",null)===!1,this.hidePhaser=n(S,"banner.hidePhaser",!1),this.bannerTextColor=n(S,"banner.text",w),this.bannerBackgroundColor=n(S,"banner.background",M),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=n(S,"fps",null),this.disablePreFX=n(S,"disablePreFX",!1),this.disablePostFX=n(S,"disablePostFX",!1);var A=n(S,"render",null);this.pipeline=n(A,"pipeline",null,S),this.autoMobilePipeline=n(A,"autoMobilePipeline",!0,S),this.defaultPipeline=n(A,"defaultPipeline",c.MULTI_PIPELINE,S),this.antialias=n(A,"antialias",!0,S),this.antialiasGL=n(A,"antialiasGL",!0,S),this.mipmapFilter=n(A,"mipmapFilter","",S),this.desynchronized=n(A,"desynchronized",!1,S),this.roundPixels=n(A,"roundPixels",!0,S),this.pixelArt=n(A,"pixelArt",this.zoom!==1,S),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=n(A,"transparent",!1,S),this.clearBeforeRender=n(A,"clearBeforeRender",!0,S),this.preserveDrawingBuffer=n(A,"preserveDrawingBuffer",!1,S),this.premultipliedAlpha=n(A,"premultipliedAlpha",!0,S),this.failIfMajorPerformanceCaveat=n(A,"failIfMajorPerformanceCaveat",!1,S),this.powerPreference=n(A,"powerPreference","default",S),this.batchSize=n(A,"batchSize",4096,S),this.maxTextures=n(A,"maxTextures",-1,S),this.maxLights=n(A,"maxLights",10,S);var P=n(S,"backgroundColor",0);this.backgroundColor=p(P),this.transparent&&(this.backgroundColor=p(0),this.backgroundColor.alpha=0),this.preBoot=n(S,"callbacks.preBoot",f),this.postBoot=n(S,"callbacks.postBoot",f),this.physics=n(S,"physics",{}),this.defaultPhysicsSystem=n(this.physics,"default",!1),this.loaderBaseURL=n(S,"loader.baseURL",""),this.loaderPath=n(S,"loader.path",""),this.loaderMaxParallelDownloads=n(S,"loader.maxParallelDownloads",a.os.android?6:32),this.loaderCrossOrigin=n(S,"loader.crossOrigin",void 0),this.loaderResponseType=n(S,"loader.responseType",""),this.loaderAsync=n(S,"loader.async",!0),this.loaderUser=n(S,"loader.user",""),this.loaderPassword=n(S,"loader.password",""),this.loaderTimeout=n(S,"loader.timeout",0),this.loaderWithCredentials=n(S,"loader.withCredentials",!1),this.loaderImageLoadType=n(S,"loader.imageLoadType","XHR"),this.loaderLocalScheme=n(S,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=n(S,"fx.glow.quality",.1),this.glowFXDistance=n(S,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var b=n(S,"plugins",null),O=h.DefaultScene;b&&(Array.isArray(b)?this.defaultPlugins=b:u(b)&&(this.installGlobalPlugins=l(b,"global",[]),this.installScenePlugins=l(b,"scene",[]),Array.isArray(b.default)?O=b.default:Array.isArray(b.defaultMerge)&&(O=O.concat(b.defaultMerge)))),this.defaultPlugins=O;var I="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=n(S,"images.default",I+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=n(S,"images.missing",I+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=n(S,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=d.WEBGL:window.FORCE_CANVAS&&(this.renderType=d.CANVAS))}});s.exports=v},86054:(s,y,e)=>{/** + */var r=e(83419),d=e(8054),h=e(42363),a=e(82264),l=e(95540),n=e(35154),u=e(41212),f=e(29747),o=e(75508),c=e(36060),p=e(80333),v=new r({initialize:function(S){S===void 0&&(S={});var M=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],w="#ffffff",C=n(S,"scale",null);this.width=n(C,"width",1024,S),this.height=n(C,"height",768,S),this.zoom=n(C,"zoom",1,S),this.parent=n(C,"parent",void 0,S),this.scaleMode=n(C,C?"mode":"scaleMode",0,S),this.expandParent=n(C,"expandParent",!0,S),this.autoRound=n(C,"autoRound",!1,S),this.autoCenter=n(C,"autoCenter",0,S),this.resizeInterval=n(C,"resizeInterval",500,S),this.fullscreenTarget=n(C,"fullscreenTarget",null,S),this.minWidth=n(C,"min.width",0,S),this.maxWidth=n(C,"max.width",0,S),this.minHeight=n(C,"min.height",0,S),this.maxHeight=n(C,"max.height",0,S),this.snapWidth=n(C,"snap.width",0,S),this.snapHeight=n(C,"snap.height",0,S),this.renderType=n(S,"type",d.AUTO),this.canvas=n(S,"canvas",null),this.context=n(S,"context",null),this.canvasStyle=n(S,"canvasStyle",null),this.customEnvironment=n(S,"customEnvironment",!1),this.sceneConfig=n(S,"scene",null),this.seed=n(S,"seed",[(Date.now()*Math.random()).toString()]),o.RND=new o.RandomDataGenerator(this.seed),this.gameTitle=n(S,"title",""),this.gameURL=n(S,"url","https://phaser.io"),this.gameVersion=n(S,"version",""),this.autoFocus=n(S,"autoFocus",!0),this.stableSort=n(S,"stableSort",-1),this.stableSort===-1&&(this.stableSort=a.browser.es2019?1:0),a.features.stableSort=this.stableSort,this.domCreateContainer=n(S,"dom.createContainer",!1),this.domPointerEvents=n(S,"dom.pointerEvents","none"),this.inputKeyboard=n(S,"input.keyboard",!0),this.inputKeyboardEventTarget=n(S,"input.keyboard.target",window),this.inputKeyboardCapture=n(S,"input.keyboard.capture",[]),this.inputMouse=n(S,"input.mouse",!0),this.inputMouseEventTarget=n(S,"input.mouse.target",null),this.inputMousePreventDefaultDown=n(S,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=n(S,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=n(S,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=n(S,"input.mouse.preventDefaultWheel",!0),this.inputTouch=n(S,"input.touch",a.input.touch),this.inputTouchEventTarget=n(S,"input.touch.target",null),this.inputTouchCapture=n(S,"input.touch.capture",!0),this.inputActivePointers=n(S,"input.activePointers",1),this.inputSmoothFactor=n(S,"input.smoothFactor",0),this.inputWindowEvents=n(S,"input.windowEvents",!0),this.inputGamepad=n(S,"input.gamepad",!1),this.inputGamepadEventTarget=n(S,"input.gamepad.target",window),this.disableContextMenu=n(S,"disableContextMenu",!1),this.audio=n(S,"audio",{}),this.hideBanner=n(S,"banner",null)===!1,this.hidePhaser=n(S,"banner.hidePhaser",!1),this.bannerTextColor=n(S,"banner.text",w),this.bannerBackgroundColor=n(S,"banner.background",M),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=n(S,"fps",null),this.disablePreFX=n(S,"disablePreFX",!1),this.disablePostFX=n(S,"disablePostFX",!1);var A=n(S,"render",null);this.pipeline=n(A,"pipeline",null,S),this.autoMobilePipeline=n(A,"autoMobilePipeline",!0,S),this.defaultPipeline=n(A,"defaultPipeline",c.MULTI_PIPELINE,S),this.antialias=n(A,"antialias",!0,S),this.antialiasGL=n(A,"antialiasGL",!0,S),this.mipmapFilter=n(A,"mipmapFilter","",S),this.desynchronized=n(A,"desynchronized",!1,S),this.roundPixels=n(A,"roundPixels",!0,S),this.pixelArt=n(A,"pixelArt",this.zoom!==1,S),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=n(A,"transparent",!1,S),this.clearBeforeRender=n(A,"clearBeforeRender",!0,S),this.preserveDrawingBuffer=n(A,"preserveDrawingBuffer",!1,S),this.premultipliedAlpha=n(A,"premultipliedAlpha",!0,S),this.failIfMajorPerformanceCaveat=n(A,"failIfMajorPerformanceCaveat",!1,S),this.powerPreference=n(A,"powerPreference","default",S),this.batchSize=n(A,"batchSize",4096,S),this.maxTextures=n(A,"maxTextures",-1,S),this.maxLights=n(A,"maxLights",10,S);var P=n(S,"backgroundColor",0);this.backgroundColor=p(P),this.transparent&&(this.backgroundColor=p(0),this.backgroundColor.alpha=0),this.preBoot=n(S,"callbacks.preBoot",f),this.postBoot=n(S,"callbacks.postBoot",f),this.physics=n(S,"physics",{}),this.defaultPhysicsSystem=n(this.physics,"default",!1),this.loaderBaseURL=n(S,"loader.baseURL",""),this.loaderPath=n(S,"loader.path",""),this.loaderMaxParallelDownloads=n(S,"loader.maxParallelDownloads",a.os.android?6:32),this.loaderCrossOrigin=n(S,"loader.crossOrigin",void 0),this.loaderResponseType=n(S,"loader.responseType",""),this.loaderAsync=n(S,"loader.async",!0),this.loaderUser=n(S,"loader.user",""),this.loaderPassword=n(S,"loader.password",""),this.loaderTimeout=n(S,"loader.timeout",0),this.loaderWithCredentials=n(S,"loader.withCredentials",!1),this.loaderImageLoadType=n(S,"loader.imageLoadType","XHR"),this.loaderLocalScheme=n(S,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=n(S,"fx.glow.quality",.1),this.glowFXDistance=n(S,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var b=n(S,"plugins",null),O=h.DefaultScene;b&&(Array.isArray(b)?this.defaultPlugins=b:u(b)&&(this.installGlobalPlugins=l(b,"global",[]),this.installScenePlugins=l(b,"scene",[]),Array.isArray(b.default)?O=b.default:Array.isArray(b.defaultMerge)&&(O=O.concat(b.defaultMerge)))),this.defaultPlugins=O;var I="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=n(S,"images.default",I+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=n(S,"images.missing",I+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=n(S,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=d.WEBGL:window.FORCE_CANVAS&&(this.renderType=d.CANVAS))}});s.exports=v},86054:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(20623),d=e(27919),h=e(8054),a=e(89357),l=function(n){var u=n.config;if((u.customEnvironment||u.canvas)&&u.renderType===h.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!u.customEnvironment&&!u.canvas&&u.renderType!==h.HEADLESS)if(u.renderType===h.AUTO&&(u.renderType=a.webGL?h.WEBGL:h.CANVAS),u.renderType===h.WEBGL){if(!a.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(u.renderType===h.CANVAS){if(!a.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+u.renderType);u.antialias||d.disableSmoothing();var f=n.scale.baseSize,o=f.width,c=f.height;if(u.canvas?(n.canvas=u.canvas,n.canvas.width=o,n.canvas.height=c):n.canvas=d.create(n,o,c,u.renderType),u.canvasStyle&&(n.canvas.style=u.canvasStyle),u.antialias||r.setCrisp(n.canvas),u.renderType!==h.HEADLESS){var p,v;p=e(68627),v=e(74797),u.renderType===h.WEBGL?n.renderer=new v(n):(n.renderer=new p(n),n.context=n.renderer.gameContext)}};s.exports=l},96391:(s,y,e)=>{/** + */var r=e(20623),d=e(27919),h=e(8054),a=e(89357),l=function(n){var u=n.config;if((u.customEnvironment||u.canvas)&&u.renderType===h.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!u.customEnvironment&&!u.canvas&&u.renderType!==h.HEADLESS)if(u.renderType===h.AUTO&&(u.renderType=a.webGL?h.WEBGL:h.CANVAS),u.renderType===h.WEBGL){if(!a.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(u.renderType===h.CANVAS){if(!a.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+u.renderType);u.antialias||d.disableSmoothing();var f=n.scale.baseSize,o=f.width,c=f.height;if(u.canvas?(n.canvas=u.canvas,n.canvas.width=o,n.canvas.height=c):n.canvas=d.create(n,o,c,u.renderType),u.canvasStyle&&(n.canvas.style=u.canvasStyle),u.antialias||r.setCrisp(n.canvas),u.renderType!==h.HEADLESS){var p,v;p=e(68627),v=e(74797),u.renderType===h.WEBGL?n.renderer=new v(n):(n.renderer=new p(n),n.context=n.renderer.gameContext)}};s.exports=l},96391:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(8054),d=function(h){var a=h.config;if(!a.hideBanner){var l="WebGL";a.renderType===r.CANVAS?l="Canvas":a.renderType===r.HEADLESS&&(l="Headless");var n=a.audio,u=h.device.audio,f;if(u.webAudio&&!n.disableWebAudio?f="Web Audio":n.noAudio||!u.webAudio&&!u.audioData?f="No Audio":f="HTML5 Audio",h.device.browser.ie)window.console&&console.log("Phaser v"+r.VERSION+" / https://phaser.io");else{var o="",c=[o];if(Array.isArray(a.bannerBackgroundColor)){var p;a.bannerBackgroundColor.forEach(function(m){o=o.concat("%c "),c.push("background: "+m),p=m}),c[c.length-1]="color: "+a.bannerTextColor+"; background: "+p}else o=o.concat("%c "),c.push("color: "+a.bannerTextColor+"; background: "+a.bannerBackgroundColor);c.push("background: transparent"),a.gameTitle&&(o=o.concat(a.gameTitle),a.gameVersion&&(o=o.concat(" v"+a.gameVersion)),a.hidePhaser||(o=o.concat(" / ")));var v="";a.hidePhaser||(o=o.concat("Phaser v"+r.VERSION+v+" ("+l+" | "+f+")")),o=o.concat(" %c "+a.gameURL),c[0]=o,console.log.apply(console,c)}}};s.exports=d},50127:(s,y,e)=>{/** + */var r=e(8054),d=function(h){var a=h.config;if(!a.hideBanner){var l="WebGL";a.renderType===r.CANVAS?l="Canvas":a.renderType===r.HEADLESS&&(l="Headless");var n=a.audio,u=h.device.audio,f;if(u.webAudio&&!n.disableWebAudio?f="Web Audio":n.noAudio||!u.webAudio&&!u.audioData?f="No Audio":f="HTML5 Audio",h.device.browser.ie)window.console&&console.log("Phaser v"+r.VERSION+" / https://phaser.io");else{var o="",c=[o];if(Array.isArray(a.bannerBackgroundColor)){var p;a.bannerBackgroundColor.forEach(function(m){o=o.concat("%c "),c.push("background: "+m),p=m}),c[c.length-1]="color: "+a.bannerTextColor+"; background: "+p}else o=o.concat("%c "),c.push("color: "+a.bannerTextColor+"; background: "+a.bannerBackgroundColor);c.push("background: transparent"),a.gameTitle&&(o=o.concat(a.gameTitle),a.gameVersion&&(o=o.concat(" v"+a.gameVersion)),a.hidePhaser||(o=o.concat(" / ")));var v="";a.hidePhaser||(o=o.concat("Phaser v"+r.VERSION+v+" ("+l+" | "+f+")")),o=o.concat(" %c "+a.gameURL),c[0]=o,console.log.apply(console,c)}}};s.exports=d},50127:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(40366),d=e(60848),h=e(24047),a=e(27919),l=e(83419),n=e(69547),u=e(83719),f=e(86054),o=e(45893),c=e(96391),p=e(82264),v=e(57264),m=e(50792),S=e(8443),M=e(7003),w=e(37277),C=e(77332),A=e(76531),P=e(60903),b=e(69442),O=e(17130),I=e(65898),D=e(51085),B=e(14747),G=new l({initialize:function(X){this.config=new n(X),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new m,this.anims=new d(this),this.textures=new O(this),this.cache=new h(this),this.registry=new o(this,new m),this.input=new M(this,this.config),this.scene=new P(this,this.config.sceneConfig),this.device=p,this.scale=new A(this,this.config),this.sound=null,this.sound=B.create(this),this.loop=new I(this,this.config.fps),this.plugins=new C(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,v(this.boot.bind(this))},boot:function(){if(!w.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),f(this),u(this),c(this),r(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(S.BOOT)},texturesReady:function(){this.events.emit(S.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)),D(this);var z=this.events;z.on(S.HIDDEN,this.onHidden,this),z.on(S.VISIBLE,this.onVisible,this),z.on(S.BLUR,this.onBlur,this),z.on(S.FOCUS,this.onFocus,this)},step:function(z,X){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var j=this.events;j.emit(S.PRE_STEP,z,X),j.emit(S.STEP,z,X),this.scene.update(z,X),j.emit(S.POST_STEP,z,X);var Q=this.renderer;Q.preRender(),j.emit(S.PRE_RENDER,Q,z,X),this.scene.render(Q),Q.postRender(),j.emit(S.POST_RENDER,Q,z,X)}},headlessStep:function(z,X){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var j=this.events;j.emit(S.PRE_STEP,z,X),j.emit(S.STEP,z,X),this.scene.update(z,X),j.emit(S.POST_STEP,z,X),this.scene.isProcessing=!1,j.emit(S.PRE_RENDER,null,z,X),j.emit(S.POST_RENDER,null,z,X)}},onHidden:function(){this.loop.pause(),this.events.emit(S.PAUSE)},pause:function(){var z=this.isPaused;this.isPaused=!0,z||this.events.emit(S.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(S.RESUME)},resume:function(){var z=this.isPaused;this.isPaused=!1,z&&this.events.emit(S.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(z,X){X===void 0&&(X=!1),this.pendingDestroy=!0,this.removeCanvas=z,this.noReturn=X},runDestroy:function(){this.scene.destroy(),this.events.emit(S.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(a.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}});s.exports=G},65898:(s,y,e)=>{/** + */var r=e(40366),d=e(60848),h=e(24047),a=e(27919),l=e(83419),n=e(69547),u=e(83719),f=e(86054),o=e(45893),c=e(96391),p=e(82264),v=e(57264),m=e(50792),S=e(8443),M=e(7003),w=e(37277),C=e(77332),A=e(76531),P=e(60903),b=e(69442),O=e(17130),I=e(65898),D=e(51085),B=e(14747),G=new l({initialize:function(X){this.config=new n(X),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new m,this.anims=new d(this),this.textures=new O(this),this.cache=new h(this),this.registry=new o(this,new m),this.input=new M(this,this.config),this.scene=new P(this,this.config.sceneConfig),this.device=p,this.scale=new A(this,this.config),this.sound=null,this.sound=B.create(this),this.loop=new I(this,this.config.fps),this.plugins=new C(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,v(this.boot.bind(this))},boot:function(){if(!w.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),f(this),u(this),c(this),r(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(S.BOOT)},texturesReady:function(){this.events.emit(S.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)),D(this);var z=this.events;z.on(S.HIDDEN,this.onHidden,this),z.on(S.VISIBLE,this.onVisible,this),z.on(S.BLUR,this.onBlur,this),z.on(S.FOCUS,this.onFocus,this)},step:function(z,X){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var j=this.events;j.emit(S.PRE_STEP,z,X),j.emit(S.STEP,z,X),this.scene.update(z,X),j.emit(S.POST_STEP,z,X);var Q=this.renderer;Q.preRender(),j.emit(S.PRE_RENDER,Q,z,X),this.scene.render(Q),Q.postRender(),j.emit(S.POST_RENDER,Q,z,X)}},headlessStep:function(z,X){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var j=this.events;j.emit(S.PRE_STEP,z,X),j.emit(S.STEP,z,X),this.scene.update(z,X),j.emit(S.POST_STEP,z,X),this.scene.isProcessing=!1,j.emit(S.PRE_RENDER,null,z,X),j.emit(S.POST_RENDER,null,z,X)}},onHidden:function(){this.loop.pause(),this.events.emit(S.PAUSE)},pause:function(){var z=this.isPaused;this.isPaused=!0,z||this.events.emit(S.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(S.RESUME)},resume:function(){var z=this.isPaused;this.isPaused=!1,z&&this.events.emit(S.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(z,X){X===void 0&&(X=!1),this.pendingDestroy=!0,this.removeCanvas=z,this.noReturn=X},runDestroy:function(){this.scene.destroy(),this.events.emit(S.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(a.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}});s.exports=G},65898:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(35154),h=e(29747),a=e(43092),l=new r({initialize:function(u,f){this.game=u,this.raf=new a,this.started=!1,this.running=!1,this.minFps=d(f,"min",5),this.targetFps=d(f,"target",60),this.fpsLimit=d(f,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=h,this.forceSetTimeOut=d(f,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=d(f,"deltaHistory",10),this.panicMax=d(f,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=d(f,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var n=window.performance.now();this.time=n,this.lastTime=n,this.nextFpsUpdate=n+1e3,this.framesThisSecond=0;for(var u=0;u0||!this.inFocus)&&(this._coolDown--,n=Math.min(n,this._target)),n>this._min&&(n=f[u],n=Math.min(n,this._min)),f[u]=n,this.deltaIndex++,this.deltaIndex>=o&&(this.deltaIndex=0);for(var c=0,p=0;p=this.nextFpsUpdate&&this.updateFPS(n),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(n,this.delta),this.delta=0),this.lastTime=n,this.frame++},step:function(n){this.now=n;var u=Math.max(0,n-this.lastTime);this.rawDelta=u,this.time+=this.rawDelta,this.smoothStep&&(u=this.smoothDelta(u)),this.delta=u,n>=this.nextFpsUpdate&&this.updateFPS(n),this.framesThisSecond++,this.callback(n,u),this.lastTime=n,this.frame++},tick:function(){var n=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(n):this.step(n)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(n){n===void 0&&(n=!1);var u=window.performance.now();if(!this.running){n&&(this.startTime+=-this.lastTime+(this.lastTime+u));var f=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(f,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=u+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});s.exports=l},51085:(s,y,e)=>{/** + */var r=e(83419),d=e(35154),h=e(29747),a=e(43092),l=new r({initialize:function(u,f){this.game=u,this.raf=new a,this.started=!1,this.running=!1,this.minFps=d(f,"min",5),this.targetFps=d(f,"target",60),this.fpsLimit=d(f,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=h,this.forceSetTimeOut=d(f,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=d(f,"deltaHistory",10),this.panicMax=d(f,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=d(f,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var n=window.performance.now();this.time=n,this.lastTime=n,this.nextFpsUpdate=n+1e3,this.framesThisSecond=0;for(var u=0;u0||!this.inFocus)&&(this._coolDown--,n=Math.min(n,this._target)),n>this._min&&(n=f[u],n=Math.min(n,this._min)),f[u]=n,this.deltaIndex++,this.deltaIndex>=o&&(this.deltaIndex=0);for(var c=0,p=0;p=this.nextFpsUpdate&&this.updateFPS(n),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(n,this.delta),this.delta=0),this.lastTime=n,this.frame++},step:function(n){this.now=n;var u=Math.max(0,n-this.lastTime);this.rawDelta=u,this.time+=this.rawDelta,this.smoothStep&&(u=this.smoothDelta(u)),this.delta=u,n>=this.nextFpsUpdate&&this.updateFPS(n),this.framesThisSecond++,this.callback(n,u),this.lastTime=n,this.frame++},tick:function(){var n=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(n):this.step(n)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(n){n===void 0&&(n=!1);var u=window.performance.now();if(!this.running){n&&(this.startTime+=-this.lastTime+(this.lastTime+u));var f=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(f,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=u+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});s.exports=l},51085:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -553,19 +553,19 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="visible"},8443:(s,y,e)=>{/** + */s.exports="visible"},8443:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={BLUR:e(97217),BOOT:e(47548),CONTEXT_LOST:e(19814),DESTROY:e(68446),FOCUS:e(41700),HIDDEN:e(25432),PAUSE:e(65942),POST_RENDER:e(59211),POST_STEP:e(47789),PRE_RENDER:e(39066),PRE_STEP:e(460),READY:e(16175),RESUME:e(42331),STEP:e(11966),SYSTEM_READY:e(32969),VISIBLE:e(94830)}},42857:(s,y,e)=>{/** + */s.exports={BLUR:e(97217),BOOT:e(47548),CONTEXT_LOST:e(19814),DESTROY:e(68446),FOCUS:e(41700),HIDDEN:e(25432),PAUSE:e(65942),POST_RENDER:e(59211),POST_STEP:e(47789),PRE_RENDER:e(39066),PRE_STEP:e(460),READY:e(16175),RESUME:e(42331),STEP:e(11966),SYSTEM_READY:e(32969),VISIBLE:e(94830)}},42857:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Config:e(69547),CreateRenderer:e(86054),DebugHeader:e(96391),Events:e(8443),TimeStep:e(65898),VisibilityHandler:e(51085)}},99584:(s,y,e)=>{/** + */s.exports={Config:e(69547),CreateRenderer:e(86054),DebugHeader:e(96391),Events:e(8443),TimeStep:e(65898),VisibilityHandler:e(51085)}},99584:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(5290),d=e(27919),h=e(35154),a=function(l){var n=h(l,"data",[]),u=h(l,"canvas",null),f=h(l,"palette",r),o=h(l,"pixelWidth",1),c=h(l,"pixelHeight",o),p=h(l,"resizeCanvas",!0),v=h(l,"clearCanvas",!0),m=h(l,"preRender",null),S=h(l,"postRender",null),M=Math.floor(Math.abs(n[0].length*o)),w=Math.floor(Math.abs(n.length*c));u||(u=d.create2D(this,M,w),p=!1,v=!1),p&&(u.width=M,u.height=w);var C=u.getContext("2d",{willReadFrequently:!0});v&&C.clearRect(0,0,M,w),m&&m(u,C);for(var A=0;A{/** + */var r=e(5290),d=e(27919),h=e(35154),a=function(l){var n=h(l,"data",[]),u=h(l,"canvas",null),f=h(l,"palette",r),o=h(l,"pixelWidth",1),c=h(l,"pixelHeight",o),p=h(l,"resizeCanvas",!0),v=h(l,"clearCanvas",!0),m=h(l,"preRender",null),S=h(l,"postRender",null),M=Math.floor(Math.abs(n[0].length*o)),w=Math.floor(Math.abs(n.length*c));u||(u=d.create2D(this,M,w),p=!1,v=!1),p&&(u.width=M,u.height=w);var C=u.getContext("2d",{willReadFrequently:!0});v&&C.clearRect(0,0,M,w),m&&m(u,C);for(var A=0;A{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -589,51 +589,51 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},57763:(s,y,e)=>{/** + */s.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},57763:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={ARNE16:e(5290),C64:e(23816),CGA:e(9866),JMP:e(77552),MSX:e(92259)}},46728:(s,y,e)=>{/** + */s.exports={ARNE16:e(5290),C64:e(23816),CGA:e(9866),JMP:e(77552),MSX:e(92259)}},46728:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(36316),h=e(80021),a=e(26099),l=new r({Extends:h,initialize:function(u,f,o,c){h.call(this,"CubicBezierCurve"),Array.isArray(u)&&(c=new a(u[6],u[7]),o=new a(u[4],u[5]),f=new a(u[2],u[3]),u=new a(u[0],u[1])),this.p0=u,this.p1=f,this.p2=o,this.p3=c},getStartPoint:function(n){return n===void 0&&(n=new a),n.copy(this.p0)},getResolution:function(n){return n},getPoint:function(n,u){u===void 0&&(u=new a);var f=this.p0,o=this.p1,c=this.p2,p=this.p3;return u.set(d(n,f.x,o.x,c.x,p.x),d(n,f.y,o.y,c.y,p.y))},draw:function(n,u){u===void 0&&(u=32);var f=this.getPoints(u);n.beginPath(),n.moveTo(this.p0.x,this.p0.y);for(var o=1;o{/** + */var r=e(83419),d=e(36316),h=e(80021),a=e(26099),l=new r({Extends:h,initialize:function(u,f,o,c){h.call(this,"CubicBezierCurve"),Array.isArray(u)&&(c=new a(u[6],u[7]),o=new a(u[4],u[5]),f=new a(u[2],u[3]),u=new a(u[0],u[1])),this.p0=u,this.p1=f,this.p2=o,this.p3=c},getStartPoint:function(n){return n===void 0&&(n=new a),n.copy(this.p0)},getResolution:function(n){return n},getPoint:function(n,u){u===void 0&&(u=new a);var f=this.p0,o=this.p1,c=this.p2,p=this.p3;return u.set(d(n,f.x,o.x,c.x,p.x),d(n,f.y,o.y,c.y,p.y))},draw:function(n,u){u===void 0&&(u=32);var f=this.getPoints(u);n.beginPath(),n.moveTo(this.p0.x,this.p0.y);for(var o=1;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(19217),h=e(87841),a=e(26099),l=new r({initialize:function(u){this.type=u,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new a,this._tmpVec2B=new a},draw:function(n,u){return u===void 0&&(u=32),n.strokePoints(this.getPoints(u))},getBounds:function(n,u){n||(n=new h),u===void 0&&(u=16);var f=this.getLength();u>f&&(u=f/2);var o=Math.max(1,Math.round(f/u));return d(this.getSpacedPoints(o),n)},getDistancePoints:function(n){var u=this.getLength(),f=Math.max(1,u/n);return this.getSpacedPoints(f)},getEndPoint:function(n){return n===void 0&&(n=new a),this.getPointAt(1,n)},getLength:function(){var n=this.getLengths();return n[n.length-1]},getLengths:function(n){if(n===void 0&&(n=this.arcLengthDivisions),this.cacheArcLengths.length===n+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var u=[],f,o=this.getPoint(0,this._tmpVec2A),c=0;u.push(0);for(var p=1;p<=n;p++)f=this.getPoint(p/n,this._tmpVec2B),c+=f.distance(o),u.push(c),o.copy(f);return this.cacheArcLengths=u,u},getPointAt:function(n,u){var f=this.getUtoTmapping(n);return this.getPoint(f,u)},getPoints:function(n,u,f){f===void 0&&(f=[]),n||(u?n=this.getLength()/u:n=this.defaultDivisions);for(var o=0;o<=n;o++)f.push(this.getPoint(o/n));return f},getRandomPoint:function(n){return n===void 0&&(n=new a),this.getPoint(Math.random(),n)},getSpacedPoints:function(n,u,f){f===void 0&&(f=[]),n||(u?n=this.getLength()/u:n=this.defaultDivisions);for(var o=0;o<=n;o++){var c=this.getUtoTmapping(o/n,null,n);f.push(this.getPoint(c))}return f},getStartPoint:function(n){return n===void 0&&(n=new a),this.getPointAt(0,n)},getTangent:function(n,u){u===void 0&&(u=new a);var f=1e-4,o=n-f,c=n+f;return o<0&&(o=0),c>1&&(c=1),this.getPoint(o,this._tmpVec2A),this.getPoint(c,u),u.subtract(this._tmpVec2A).normalize()},getTangentAt:function(n,u){var f=this.getUtoTmapping(n);return this.getTangent(f,u)},getTFromDistance:function(n,u){return n<=0?0:this.getUtoTmapping(0,n,u)},getUtoTmapping:function(n,u,f){var o=this.getLengths(f),c=0,p=o.length,v;u?v=Math.min(u,o[p-1]):v=n*o[p-1];for(var m=0,S=p-1,M;m<=S;)if(c=Math.floor(m+(S-m)/2),M=o[c]-v,M<0)m=c+1;else if(M>0)S=c-1;else{S=c;break}if(c=S,o[c]===v)return c/(p-1);var w=o[c],C=o[c+1],A=C-w,P=(v-w)/A;return(c+P)/(p-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});s.exports=l},73825:(s,y,e)=>{/** + */var r=e(83419),d=e(19217),h=e(87841),a=e(26099),l=new r({initialize:function(u){this.type=u,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new a,this._tmpVec2B=new a},draw:function(n,u){return u===void 0&&(u=32),n.strokePoints(this.getPoints(u))},getBounds:function(n,u){n||(n=new h),u===void 0&&(u=16);var f=this.getLength();u>f&&(u=f/2);var o=Math.max(1,Math.round(f/u));return d(this.getSpacedPoints(o),n)},getDistancePoints:function(n){var u=this.getLength(),f=Math.max(1,u/n);return this.getSpacedPoints(f)},getEndPoint:function(n){return n===void 0&&(n=new a),this.getPointAt(1,n)},getLength:function(){var n=this.getLengths();return n[n.length-1]},getLengths:function(n){if(n===void 0&&(n=this.arcLengthDivisions),this.cacheArcLengths.length===n+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var u=[],f,o=this.getPoint(0,this._tmpVec2A),c=0;u.push(0);for(var p=1;p<=n;p++)f=this.getPoint(p/n,this._tmpVec2B),c+=f.distance(o),u.push(c),o.copy(f);return this.cacheArcLengths=u,u},getPointAt:function(n,u){var f=this.getUtoTmapping(n);return this.getPoint(f,u)},getPoints:function(n,u,f){f===void 0&&(f=[]),n||(u?n=this.getLength()/u:n=this.defaultDivisions);for(var o=0;o<=n;o++)f.push(this.getPoint(o/n));return f},getRandomPoint:function(n){return n===void 0&&(n=new a),this.getPoint(Math.random(),n)},getSpacedPoints:function(n,u,f){f===void 0&&(f=[]),n||(u?n=this.getLength()/u:n=this.defaultDivisions);for(var o=0;o<=n;o++){var c=this.getUtoTmapping(o/n,null,n);f.push(this.getPoint(c))}return f},getStartPoint:function(n){return n===void 0&&(n=new a),this.getPointAt(0,n)},getTangent:function(n,u){u===void 0&&(u=new a);var f=1e-4,o=n-f,c=n+f;return o<0&&(o=0),c>1&&(c=1),this.getPoint(o,this._tmpVec2A),this.getPoint(c,u),u.subtract(this._tmpVec2A).normalize()},getTangentAt:function(n,u){var f=this.getUtoTmapping(n);return this.getTangent(f,u)},getTFromDistance:function(n,u){return n<=0?0:this.getUtoTmapping(0,n,u)},getUtoTmapping:function(n,u,f){var o=this.getLengths(f),c=0,p=o.length,v;u?v=Math.min(u,o[p-1]):v=n*o[p-1];for(var m=0,S=p-1,M;m<=S;)if(c=Math.floor(m+(S-m)/2),M=o[c]-v,M<0)m=c+1;else if(M>0)S=c-1;else{S=c;break}if(c=S,o[c]===v)return c/(p-1);var w=o[c],C=o[c+1],A=C-w,P=(v-w)/A;return(c+P)/(p-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});s.exports=l},73825:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(80021),h=e(39506),a=e(35154),l=e(43396),n=e(26099),u=new r({Extends:d,initialize:function(o,c,p,v,m,S,M,w){if(typeof o=="object"){var C=o;o=a(C,"x",0),c=a(C,"y",0),p=a(C,"xRadius",0),v=a(C,"yRadius",p),m=a(C,"startAngle",0),S=a(C,"endAngle",360),M=a(C,"clockwise",!1),w=a(C,"rotation",0)}else v===void 0&&(v=p),m===void 0&&(m=0),S===void 0&&(S=360),M===void 0&&(M=!1),w===void 0&&(w=0);d.call(this,"EllipseCurve"),this.p0=new n(o,c),this._xRadius=p,this._yRadius=v,this._startAngle=h(m),this._endAngle=h(S),this._clockwise=M,this._rotation=h(w)},getStartPoint:function(f){return f===void 0&&(f=new n),this.getPoint(0,f)},getResolution:function(f){return f*2},getPoint:function(f,o){o===void 0&&(o=new n);for(var c=Math.PI*2,p=this._endAngle-this._startAngle,v=Math.abs(p)c;)p-=c;p{/** + */var r=e(83419),d=e(80021),h=e(39506),a=e(35154),l=e(43396),n=e(26099),u=new r({Extends:d,initialize:function(o,c,p,v,m,S,M,w){if(typeof o=="object"){var C=o;o=a(C,"x",0),c=a(C,"y",0),p=a(C,"xRadius",0),v=a(C,"yRadius",p),m=a(C,"startAngle",0),S=a(C,"endAngle",360),M=a(C,"clockwise",!1),w=a(C,"rotation",0)}else v===void 0&&(v=p),m===void 0&&(m=0),S===void 0&&(S=360),M===void 0&&(M=!1),w===void 0&&(w=0);d.call(this,"EllipseCurve"),this.p0=new n(o,c),this._xRadius=p,this._yRadius=v,this._startAngle=h(m),this._endAngle=h(S),this._clockwise=M,this._rotation=h(w)},getStartPoint:function(f){return f===void 0&&(f=new n),this.getPoint(0,f)},getResolution:function(f){return f*2},getPoint:function(f,o){o===void 0&&(o=new n);for(var c=Math.PI*2,p=this._endAngle-this._startAngle,v=Math.abs(p)c;)p-=c;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(80021),h=e(19217),a=e(87841),l=e(26099),n=new r({Extends:d,initialize:function(f,o){d.call(this,"LineCurve"),Array.isArray(f)&&(o=new l(f[2],f[3]),f=new l(f[0],f[1])),this.p0=f,this.p1=o,this.arcLengthDivisions=1},getBounds:function(u){return u===void 0&&(u=new a),h([this.p0,this.p1],u)},getStartPoint:function(u){return u===void 0&&(u=new l),u.copy(this.p0)},getResolution:function(u){return u===void 0&&(u=1),u},getPoint:function(u,f){return f===void 0&&(f=new l),u===1?f.copy(this.p1):(f.copy(this.p1).subtract(this.p0).scale(u).add(this.p0),f)},getPointAt:function(u,f){return this.getPoint(u,f)},getTangent:function(u,f){return f===void 0&&(f=new l),f.copy(this.p1).subtract(this.p0).normalize(),f},getUtoTmapping:function(u,f,o){var c;if(f){var p=this.getLengths(o),v=p[p.length-1],m=Math.min(f,v);c=m/v}else c=u;return c},draw:function(u){return u.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),u},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});n.fromJSON=function(u){var f=u.points,o=new l(f[0],f[1]),c=new l(f[2],f[3]);return new n(o,c)},s.exports=n},14744:(s,y,e)=>{/** + */var r=e(83419),d=e(80021),h=e(19217),a=e(87841),l=e(26099),n=new r({Extends:d,initialize:function(f,o){d.call(this,"LineCurve"),Array.isArray(f)&&(o=new l(f[2],f[3]),f=new l(f[0],f[1])),this.p0=f,this.p1=o,this.arcLengthDivisions=1},getBounds:function(u){return u===void 0&&(u=new a),h([this.p0,this.p1],u)},getStartPoint:function(u){return u===void 0&&(u=new l),u.copy(this.p0)},getResolution:function(u){return u===void 0&&(u=1),u},getPoint:function(u,f){return f===void 0&&(f=new l),u===1?f.copy(this.p1):(f.copy(this.p1).subtract(this.p0).scale(u).add(this.p0),f)},getPointAt:function(u,f){return this.getPoint(u,f)},getTangent:function(u,f){return f===void 0&&(f=new l),f.copy(this.p1).subtract(this.p0).normalize(),f},getUtoTmapping:function(u,f,o){var c;if(f){var p=this.getLengths(o),v=p[p.length-1],m=Math.min(f,v);c=m/v}else c=u;return c},draw:function(u){return u.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),u},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});n.fromJSON=function(u){var f=u.points,o=new l(f[0],f[1]),c=new l(f[2],f[3]);return new n(o,c)},s.exports=n},14744:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(80021),h=e(32112),a=e(26099),l=new r({Extends:d,initialize:function(u,f,o){d.call(this,"QuadraticBezierCurve"),Array.isArray(u)&&(o=new a(u[4],u[5]),f=new a(u[2],u[3]),u=new a(u[0],u[1])),this.p0=u,this.p1=f,this.p2=o},getStartPoint:function(n){return n===void 0&&(n=new a),n.copy(this.p0)},getResolution:function(n){return n},getPoint:function(n,u){u===void 0&&(u=new a);var f=this.p0,o=this.p1,c=this.p2;return u.set(h(n,f.x,o.x,c.x),h(n,f.y,o.y,c.y))},draw:function(n,u){u===void 0&&(u=32);var f=this.getPoints(u);n.beginPath(),n.moveTo(this.p0.x,this.p0.y);for(var o=1;o{/** + */var r=e(83419),d=e(80021),h=e(32112),a=e(26099),l=new r({Extends:d,initialize:function(u,f,o){d.call(this,"QuadraticBezierCurve"),Array.isArray(u)&&(o=new a(u[4],u[5]),f=new a(u[2],u[3]),u=new a(u[0],u[1])),this.p0=u,this.p1=f,this.p2=o},getStartPoint:function(n){return n===void 0&&(n=new a),n.copy(this.p0)},getResolution:function(n){return n},getPoint:function(n,u){u===void 0&&(u=new a);var f=this.p0,o=this.p1,c=this.p2;return u.set(h(n,f.x,o.x,c.x),h(n,f.y,o.y,c.y))},draw:function(n,u){u===void 0&&(u=32);var f=this.getPoints(u);n.beginPath(),n.moveTo(this.p0.x,this.p0.y);for(var o=1;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(87842),d=e(83419),h=e(80021),a=e(26099),l=new d({Extends:h,initialize:function(u){u===void 0&&(u=[]),h.call(this,"SplineCurve"),this.points=[],this.addPoints(u)},addPoints:function(n){for(var u=0;uf.length-2?f.length-1:c+1],M=f[c>f.length-3?f.length-1:c+2];return u.set(r(p,v.x,m.x,S.x,M.x),r(p,v.y,m.y,S.y,M.y))},toJSON:function(){for(var n=[],u=0;u{/** + */var r=e(87842),d=e(83419),h=e(80021),a=e(26099),l=new d({Extends:h,initialize:function(u){u===void 0&&(u=[]),h.call(this,"SplineCurve"),this.points=[],this.addPoints(u)},addPoints:function(n){for(var u=0;uf.length-2?f.length-1:c+1],M=f[c>f.length-3?f.length-1:c+2];return u.set(r(p,v.x,m.x,S.x,M.x),r(p,v.y,m.y,S.y,M.y))},toJSON:function(){for(var n=[],u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Path:e(46669),MoveTo:e(68618),CubicBezier:e(46728),Curve:e(80021),Ellipse:e(73825),Line:e(33951),QuadraticBezier:e(14744),Spline:e(42534)}},68618:(s,y,e)=>{/** + */s.exports={Path:e(46669),MoveTo:e(68618),CubicBezier:e(46728),Curve:e(80021),Ellipse:e(73825),Line:e(33951),QuadraticBezier:e(14744),Spline:e(42534)}},68618:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(26099),h=new r({initialize:function(l,n){this.active=!1,this.p0=new d(l,n)},getPoint:function(a,l){return l===void 0&&(l=new d),l.copy(this.p0)},getPointAt:function(a,l){return this.getPoint(a,l)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});s.exports=h},46669:(s,y,e)=>{/** + */var r=e(83419),d=e(26099),h=new r({initialize:function(l,n){this.active=!1,this.p0=new d(l,n)},getPoint:function(a,l){return l===void 0&&(l=new d),l.copy(this.p0)},getPointAt:function(a,l){return this.getPoint(a,l)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});s.exports=h},46669:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(46728),h=e(73825),a=e(39429),l=e(33951),n=e(68618),u=e(14744),f=e(87841),o=e(42534),c=e(26099),p=e(36383),v=new r({initialize:function(S,M){S===void 0&&(S=0),M===void 0&&(M=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new c,this._tmpVec2A=new c,this._tmpVec2B=new c,typeof S=="object"?this.fromJSON(S):this.startPoint.set(S,M)},add:function(m){return this.curves.push(m),this},circleTo:function(m,S,M){return S===void 0&&(S=!1),this.ellipseTo(m,m,0,360,S,M)},closePath:function(){var m=this.curves[0].getPoint(0),S=this.curves[this.curves.length-1].getPoint(1);return m.equals(S)||this.curves.push(new l(S,m)),this},cubicBezierTo:function(m,S,M,w,C,A){var P=this.getEndPoint(),b,O,I;return m instanceof c?(b=m,O=S,I=M):(b=new c(M,w),O=new c(C,A),I=new c(m,S)),this.add(new d(P,b,O,I))},quadraticBezierTo:function(m,S,M,w){var C=this.getEndPoint(),A,P;return m instanceof c?(A=m,P=S):(A=new c(M,w),P=new c(m,S)),this.add(new u(C,A,P))},draw:function(m,S){for(var M=0;M=S)return this.curves[w];w++}return null},getEndPoint:function(m){return m===void 0&&(m=new c),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,m):m.copy(this.startPoint),m},getLength:function(){var m=this.getCurveLengths();return m[m.length-1]},getPoint:function(m,S){S===void 0&&(S=new c);for(var M=m*this.getLength(),w=this.getCurveLengths(),C=0;C=M){var A=w[C]-M,P=this.curves[C],b=P.getLength(),O=b===0?0:1-A/b;return P.getPointAt(O,S)}C++}return null},getPoints:function(m,S){!m&&!S&&(m=this.defaultDivisions);for(var M=[],w,C=0;C1&&!M[M.length-1].equals(M[0])&&M.push(M[0]),M},getRandomPoint:function(m){return m===void 0&&(m=new c),this.getPoint(Math.random(),m)},getSpacedPoints:function(m){m===void 0&&(m=40);for(var S=[],M=0;M<=m;M++)S.push(this.getPoint(M/m));return this.autoClose&&S.push(S[0]),S},getStartPoint:function(m){return m===void 0&&(m=new c),m.copy(this.startPoint)},getTangent:function(m,S){S===void 0&&(S=new c);for(var M=m*this.getLength(),w=this.getCurveLengths(),C=0;C=M){var A=w[C]-M,P=this.curves[C],b=P.getLength(),O=b===0?0:1-A/b;return P.getTangentAt(O,S)}C++}return null},lineTo:function(m,S){m instanceof c?this._tmpVec2B.copy(m):typeof m=="object"?this._tmpVec2B.setFromObject(m):this._tmpVec2B.set(m,S);var M=this.getEndPoint(this._tmpVec2A);return this.add(new l([M.x,M.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(m){return m.unshift(this.getEndPoint()),this.add(new o(m))},moveTo:function(m,S){return m instanceof c?this.add(new n(m.x,m.y)):this.add(new n(m,S))},toJSON:function(){for(var m=[],S=0;S{/** + */var r=e(83419),d=e(46728),h=e(73825),a=e(39429),l=e(33951),n=e(68618),u=e(14744),f=e(87841),o=e(42534),c=e(26099),p=e(36383),v=new r({initialize:function(S,M){S===void 0&&(S=0),M===void 0&&(M=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new c,this._tmpVec2A=new c,this._tmpVec2B=new c,typeof S=="object"?this.fromJSON(S):this.startPoint.set(S,M)},add:function(m){return this.curves.push(m),this},circleTo:function(m,S,M){return S===void 0&&(S=!1),this.ellipseTo(m,m,0,360,S,M)},closePath:function(){var m=this.curves[0].getPoint(0),S=this.curves[this.curves.length-1].getPoint(1);return m.equals(S)||this.curves.push(new l(S,m)),this},cubicBezierTo:function(m,S,M,w,C,A){var P=this.getEndPoint(),b,O,I;return m instanceof c?(b=m,O=S,I=M):(b=new c(M,w),O=new c(C,A),I=new c(m,S)),this.add(new d(P,b,O,I))},quadraticBezierTo:function(m,S,M,w){var C=this.getEndPoint(),A,P;return m instanceof c?(A=m,P=S):(A=new c(M,w),P=new c(m,S)),this.add(new u(C,A,P))},draw:function(m,S){for(var M=0;M=S)return this.curves[w];w++}return null},getEndPoint:function(m){return m===void 0&&(m=new c),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,m):m.copy(this.startPoint),m},getLength:function(){var m=this.getCurveLengths();return m[m.length-1]},getPoint:function(m,S){S===void 0&&(S=new c);for(var M=m*this.getLength(),w=this.getCurveLengths(),C=0;C=M){var A=w[C]-M,P=this.curves[C],b=P.getLength(),O=b===0?0:1-A/b;return P.getPointAt(O,S)}C++}return null},getPoints:function(m,S){!m&&!S&&(m=this.defaultDivisions);for(var M=[],w,C=0;C1&&!M[M.length-1].equals(M[0])&&M.push(M[0]),M},getRandomPoint:function(m){return m===void 0&&(m=new c),this.getPoint(Math.random(),m)},getSpacedPoints:function(m){m===void 0&&(m=40);for(var S=[],M=0;M<=m;M++)S.push(this.getPoint(M/m));return this.autoClose&&S.push(S[0]),S},getStartPoint:function(m){return m===void 0&&(m=new c),m.copy(this.startPoint)},getTangent:function(m,S){S===void 0&&(S=new c);for(var M=m*this.getLength(),w=this.getCurveLengths(),C=0;C=M){var A=w[C]-M,P=this.curves[C],b=P.getLength(),O=b===0?0:1-A/b;return P.getTangentAt(O,S)}C++}return null},lineTo:function(m,S){m instanceof c?this._tmpVec2B.copy(m):typeof m=="object"?this._tmpVec2B.setFromObject(m):this._tmpVec2B.set(m,S);var M=this.getEndPoint(this._tmpVec2A);return this.add(new l([M.x,M.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(m){return m.unshift(this.getEndPoint()),this.add(new o(m))},moveTo:function(m,S){return m instanceof c?this.add(new n(m.x,m.y)):this.add(new n(m,S))},toJSON:function(){for(var m=[],S=0;S{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(24882),h=new r({initialize:function(l,n){this.parent=l,this.events=n,n||(this.events=l.events?l.events:l),this.list={},this.values={},this._frozen=!1,!l.hasOwnProperty("sys")&&this.events&&this.events.once(d.DESTROY,this.destroy,this)},get:function(a){var l=this.list;if(Array.isArray(a)){for(var n=[],u=0;u{/** + */var r=e(83419),d=e(24882),h=new r({initialize:function(l,n){this.parent=l,this.events=n,n||(this.events=l.events?l.events:l),this.list={},this.values={},this._frozen=!1,!l.hasOwnProperty("sys")&&this.events&&this.events.once(d.DESTROY,this.destroy,this)},get:function(a){var l=this.list;if(Array.isArray(a)){for(var n=[],u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -657,27 +657,27 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="setdata"},24882:(s,y,e)=>{/** + */s.exports="setdata"},24882:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={CHANGE_DATA:e(10700),CHANGE_DATA_KEY:e(93608),DESTROY:e(60883),REMOVE_DATA:e(69780),SET_DATA:e(22166)}},44965:(s,y,e)=>{/** + */s.exports={CHANGE_DATA:e(10700),CHANGE_DATA_KEY:e(93608),DESTROY:e(60883),REMOVE_DATA:e(69780),SET_DATA:e(22166)}},44965:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={DataManager:e(45893),DataManagerPlugin:e(63646),Events:e(24882)}},7098:(s,y,e)=>{/** + */s.exports={DataManager:e(45893),DataManagerPlugin:e(63646),Events:e(24882)}},7098:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(84148),d={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function h(){if(typeof importScripts=="function")return d;d.audioData=!!window.Audio,d.webAudio=!!(window.AudioContext||window.webkitAudioContext);var a=document.createElement("audio"),l=!!a.canPlayType;try{if(l){var n=function(o,c){var p=a.canPlayType("audio/"+o).replace(/^no$/,"");return c?!!(p||a.canPlayType("audio/"+c).replace(/^no$/,"")):!!p};if(d.ogg=n('ogg; codecs="vorbis"'),d.opus=n('ogg; codecs="opus"',"opus"),d.mp3=n("mpeg"),d.wav=n("wav"),d.m4a=n("x-m4a"),d.aac=n("aac"),d.flac=n("flac","x-flac"),d.webm=n('webm; codecs="vorbis"'),a.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(r.edge)d.dolby=!0;else if(r.safari&&r.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var u=parseInt(RegExp.$1,10),f=parseInt(RegExp.$2,10);(u===10&&f>=11||u>10)&&(d.dolby=!0)}}}}catch{}return d}s.exports=h()},84148:(s,y,e)=>{/** + */var r=e(84148),d={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function h(){if(typeof importScripts=="function")return d;d.audioData=!!window.Audio,d.webAudio=!!(window.AudioContext||window.webkitAudioContext);var a=document.createElement("audio"),l=!!a.canPlayType;try{if(l){var n=function(o,c){var p=a.canPlayType("audio/"+o).replace(/^no$/,"");return c?!!(p||a.canPlayType("audio/"+c).replace(/^no$/,"")):!!p};if(d.ogg=n('ogg; codecs="vorbis"'),d.opus=n('ogg; codecs="opus"',"opus"),d.mp3=n("mpeg"),d.wav=n("wav"),d.m4a=n("x-m4a"),d.aac=n("aac"),d.flac=n("flac","x-flac"),d.webm=n('webm; codecs="vorbis"'),a.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(r.edge)d.dolby=!0;else if(r.safari&&r.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var u=parseInt(RegExp.$1,10),f=parseInt(RegExp.$2,10);(u===10&&f>=11||u>10)&&(d.dolby=!0)}}}}catch{}return d}s.exports=h()},84148:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25892),d={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};function h(){var a=navigator.userAgent;return/Edg\/\d+/.test(a)?(d.edge=!0,d.es2019=!0):/OPR/.test(a)?(d.opera=!0,d.es2019=!0):/Chrome\/(\d+)/.test(a)&&!r.windowsPhone?(d.chrome=!0,d.chromeVersion=parseInt(RegExp.$1,10),d.es2019=d.chromeVersion>69):/Firefox\D+(\d+)/.test(a)?(d.firefox=!0,d.firefoxVersion=parseInt(RegExp.$1,10),d.es2019=d.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(a)&&r.iOS?(d.mobileSafari=!0,d.es2019=!0):/MSIE (\d+\.\d+);/.test(a)?(d.ie=!0,d.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(a)&&!r.windowsPhone?(d.safari=!0,d.safariVersion=parseInt(RegExp.$1,10),d.es2019=d.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(a)&&(d.ie=!0,d.trident=!0,d.tridentVersion=parseInt(RegExp.$1,10),d.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(a)&&(d.silk=!0),d}s.exports=h()},89289:(s,y,e)=>{/** + */var r=e(25892),d={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};function h(){var a=navigator.userAgent;return/Edg\/\d+/.test(a)?(d.edge=!0,d.es2019=!0):/OPR/.test(a)?(d.opera=!0,d.es2019=!0):/Chrome\/(\d+)/.test(a)&&!r.windowsPhone?(d.chrome=!0,d.chromeVersion=parseInt(RegExp.$1,10),d.es2019=d.chromeVersion>69):/Firefox\D+(\d+)/.test(a)?(d.firefox=!0,d.firefoxVersion=parseInt(RegExp.$1,10),d.es2019=d.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(a)&&r.iOS?(d.mobileSafari=!0,d.es2019=!0):/MSIE (\d+\.\d+);/.test(a)?(d.ie=!0,d.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(a)&&!r.windowsPhone?(d.safari=!0,d.safariVersion=parseInt(RegExp.$1,10),d.es2019=d.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(a)&&(d.ie=!0,d.trident=!0,d.tridentVersion=parseInt(RegExp.$1,10),d.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(a)&&(d.silk=!0),d}s.exports=h()},89289:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(27919),d={supportInverseAlpha:!1,supportNewBlendModes:!1};function h(){var n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",u="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",f=new Image;return f.onload=function(){var o=new Image;o.onload=function(){var c=r.create2D(o,6),p=c.getContext("2d",{willReadFrequently:!0});if(p.globalCompositeOperation="multiply",p.drawImage(f,0,0),p.drawImage(o,2,0),!p.getImageData(2,0,1,1))return!1;var v=p.getImageData(2,0,1,1).data;r.remove(o),d.supportNewBlendModes=v[0]===255&&v[1]===0&&v[2]===0},o.src=n+"/wCKxvRF"+u},f.src=n+"AP804Oa6"+u,!1}function a(){var n=r.create2D(this,2),u=n.getContext("2d",{willReadFrequently:!0});u.fillStyle="rgba(10, 20, 30, 0.5)",u.fillRect(0,0,1,1);var f=u.getImageData(0,0,1,1);if(f===null)return!1;u.putImageData(f,1,0);var o=u.getImageData(1,0,1,1),c=o.data[0]===f.data[0]&&o.data[1]===f.data[1]&&o.data[2]===f.data[2]&&o.data[3]===f.data[3];return r.remove(this),c}function l(){return typeof importScripts!="function"&&document!==void 0&&(d.supportNewBlendModes=h(),d.supportInverseAlpha=a()),d}s.exports=l()},89357:(s,y,e)=>{/** + */var r=e(27919),d={supportInverseAlpha:!1,supportNewBlendModes:!1};function h(){var n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",u="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",f=new Image;return f.onload=function(){var o=new Image;o.onload=function(){var c=r.create2D(o,6),p=c.getContext("2d",{willReadFrequently:!0});if(p.globalCompositeOperation="multiply",p.drawImage(f,0,0),p.drawImage(o,2,0),!p.getImageData(2,0,1,1))return!1;var v=p.getImageData(2,0,1,1).data;r.remove(o),d.supportNewBlendModes=v[0]===255&&v[1]===0&&v[2]===0},o.src=n+"/wCKxvRF"+u},f.src=n+"AP804Oa6"+u,!1}function a(){var n=r.create2D(this,2),u=n.getContext("2d",{willReadFrequently:!0});u.fillStyle="rgba(10, 20, 30, 0.5)",u.fillRect(0,0,1,1);var f=u.getImageData(0,0,1,1);if(f===null)return!1;u.putImageData(f,1,0);var o=u.getImageData(1,0,1,1),c=o.data[0]===f.data[0]&&o.data[1]===f.data[1]&&o.data[2]===f.data[2]&&o.data[3]===f.data[3];return r.remove(this),c}function l(){return typeof importScripts!="function"&&document!==void 0&&(d.supportNewBlendModes=h(),d.supportInverseAlpha=a()),d}s.exports=l()},89357:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -685,7 +685,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={available:!1,cancel:"",keyboard:!1,request:""};function e(){if(typeof importScripts=="function")return y;var r,d="Fullscreen",h="FullScreen",a=["request"+d,"request"+h,"webkitRequest"+d,"webkitRequest"+h,"msRequest"+d,"msRequest"+h,"mozRequest"+h,"mozRequest"+d];for(r=0;r{/** + */var x={available:!1,cancel:"",keyboard:!1,request:""};function e(){if(typeof importScripts=="function")return x;var r,d="Fullscreen",h="FullScreen",a=["request"+d,"request"+h,"webkitRequest"+d,"webkitRequest"+h,"msRequest"+d,"msRequest"+h,"mozRequest"+h,"mozRequest"+d];for(r=0;r{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -693,19 +693,19 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};function e(){if(typeof importScripts=="function")return y;var r=navigator.userAgent;/Windows/.test(r)?y.windows=!0:/Mac OS/.test(r)&&!/like Mac OS/.test(r)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(y.iOS=!0,y.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),y.iOSVersion=parseInt(RegExp.$1,10)):y.macOS=!0:/Android/.test(r)?y.android=!0:/Linux/.test(r)?y.linux=!0:/iP[ao]d|iPhone/i.test(r)?(y.iOS=!0,navigator.appVersion.match(/OS (\d+)/),y.iOSVersion=parseInt(RegExp.$1,10),y.iPhone=r.toLowerCase().indexOf("iphone")!==-1,y.iPad=r.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(r)||/\bKF[A-Z][A-Z]+/.test(r)||/Silk.*Mobile Safari/.test(r)?y.kindle=!0:/CrOS/.test(r)&&(y.chromeOS=!0),(/Windows Phone/i.test(r)||/IEMobile/i.test(r))&&(y.android=!1,y.iOS=!1,y.macOS=!1,y.windows=!0,y.windowsPhone=!0);var d=/Silk/.test(r);return(y.windows||y.macOS||y.linux&&!d||y.chromeOS)&&(y.desktop=!0),(y.windowsPhone||/Windows NT/i.test(r)&&/Touch/i.test(r))&&(y.desktop=!1),navigator.standalone&&(y.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(y.cordova=!0),window.ejecta!==void 0&&(y.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(y.node=!0),y.node&&typeof process.versions=="object"&&(y.nodeWebkit=!!process.versions["node-webkit"],y.electron=!!process.versions.electron),/Crosswalk/.test(r)&&(y.crosswalk=!0),y.pixelRatio=window.devicePixelRatio||1,y}s.exports=e()},43267:(s,y,e)=>{/** + */var x={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};function e(){if(typeof importScripts=="function")return x;var r=navigator.userAgent;/Windows/.test(r)?x.windows=!0:/Mac OS/.test(r)&&!/like Mac OS/.test(r)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(x.iOS=!0,x.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),x.iOSVersion=parseInt(RegExp.$1,10)):x.macOS=!0:/Android/.test(r)?x.android=!0:/Linux/.test(r)?x.linux=!0:/iP[ao]d|iPhone/i.test(r)?(x.iOS=!0,navigator.appVersion.match(/OS (\d+)/),x.iOSVersion=parseInt(RegExp.$1,10),x.iPhone=r.toLowerCase().indexOf("iphone")!==-1,x.iPad=r.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(r)||/\bKF[A-Z][A-Z]+/.test(r)||/Silk.*Mobile Safari/.test(r)?x.kindle=!0:/CrOS/.test(r)&&(x.chromeOS=!0),(/Windows Phone/i.test(r)||/IEMobile/i.test(r))&&(x.android=!1,x.iOS=!1,x.macOS=!1,x.windows=!0,x.windowsPhone=!0);var d=/Silk/.test(r);return(x.windows||x.macOS||x.linux&&!d||x.chromeOS)&&(x.desktop=!0),(x.windowsPhone||/Windows NT/i.test(r)&&/Touch/i.test(r))&&(x.desktop=!1),navigator.standalone&&(x.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(x.cordova=!0),window.ejecta!==void 0&&(x.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(x.node=!0),x.node&&typeof process.versions=="object"&&(x.nodeWebkit=!!process.versions["node-webkit"],x.electron=!!process.versions.electron),/Crosswalk/.test(r)&&(x.crosswalk=!0),x.pixelRatio=window.devicePixelRatio||1,x}s.exports=e()},43267:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(95540),d={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function h(){if(typeof importScripts=="function")return d;var a=document.createElement("video"),l=!!a.canPlayType,n=/^no$/;try{l&&(a.canPlayType('video/ogg; codecs="theora"').replace(n,"")&&(d.ogg=!0),a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(n,"")&&(d.h264=!0,d.mp4=!0),a.canPlayType("video/x-m4v").replace(n,"")&&(d.m4v=!0),a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(n,"")&&(d.webm=!0),a.canPlayType('video/webm; codecs="vp9"').replace(n,"")&&(d.vp9=!0),a.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(n,"")&&(d.hls=!0))}catch{}return a.parentNode&&a.parentNode.removeChild(a),d.getVideoURL=function(u){Array.isArray(u)||(u=[u]);for(var f=0;f{/** + */var r=e(95540),d={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function h(){if(typeof importScripts=="function")return d;var a=document.createElement("video"),l=!!a.canPlayType,n=/^no$/;try{l&&(a.canPlayType('video/ogg; codecs="theora"').replace(n,"")&&(d.ogg=!0),a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(n,"")&&(d.h264=!0,d.mp4=!0),a.canPlayType("video/x-m4v").replace(n,"")&&(d.m4v=!0),a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(n,"")&&(d.webm=!0),a.canPlayType('video/webm; codecs="vp9"').replace(n,"")&&(d.vp9=!0),a.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(n,"")&&(d.hls=!0))}catch{}return a.parentNode&&a.parentNode.removeChild(a),d.getVideoURL=function(u){Array.isArray(u)||(u=[u]);for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={os:e(25892),browser:e(84148),features:e(89357),input:e(31784),audio:e(7098),video:e(43267),fullscreen:e(91639),canvasFeatures:e(89289)}},89422:(s,y,e)=>{/** + */s.exports={os:e(25892),browser:e(84148),features:e(89357),input:e(31784),audio:e(7098),video:e(43267),fullscreen:e(91639),canvasFeatures:e(89289)}},89422:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new Float32Array(20),h=new r({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(a){return this._matrix.set(a),this._dirty=!0,this},reset:function(){var a=this._matrix;return a.fill(0),a[0]=1,a[6]=1,a[12]=1,a[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var a=this._data;return this._dirty&&(a.set(this._matrix),a[4]/=255,a[9]/=255,a[14]/=255,a[19]/=255,this._dirty=!1),a},brightness:function(a,l){a===void 0&&(a=0),l===void 0&&(l=!1);var n=a;return this.multiply([n,0,0,0,0,0,n,0,0,0,0,0,n,0,0,0,0,0,1,0],l)},saturate:function(a,l){a===void 0&&(a=0),l===void 0&&(l=!1);var n=a*2/3+1,u=(n-1)*-.5;return this.multiply([n,u,u,0,0,u,n,u,0,0,u,u,n,0,0,0,0,0,1,0],l)},desaturate:function(a){return a===void 0&&(a=!1),this.saturate(-1,a)},hue:function(a,l){a===void 0&&(a=0),l===void 0&&(l=!1),a=a/180*Math.PI;var n=Math.cos(a),u=Math.sin(a),f=.213,o=.715,c=.072;return this.multiply([f+n*(1-f)+u*-f,o+n*-o+u*-o,c+n*-c+u*(1-c),0,0,f+n*-f+u*.143,o+n*(1-o)+u*.14,c+n*-c+u*-.283,0,0,f+n*-f+u*-(1-f),o+n*-o+u*o,c+n*(1-c)+u*c,0,0,0,0,0,1,0],l)},grayscale:function(a,l){return a===void 0&&(a=1),l===void 0&&(l=!1),this.saturate(-a,l)},blackWhite:function(a){return a===void 0&&(a=!1),this.multiply(h.BLACK_WHITE,a)},contrast:function(a,l){a===void 0&&(a=0),l===void 0&&(l=!1);var n=a+1,u=-.5*(n-1);return this.multiply([n,0,0,0,u,0,n,0,0,u,0,0,n,0,u,0,0,0,1,0],l)},negative:function(a){return a===void 0&&(a=!1),this.multiply(h.NEGATIVE,a)},desaturateLuminance:function(a){return a===void 0&&(a=!1),this.multiply(h.DESATURATE_LUMINANCE,a)},sepia:function(a){return a===void 0&&(a=!1),this.multiply(h.SEPIA,a)},night:function(a,l){return a===void 0&&(a=.1),l===void 0&&(l=!1),this.multiply([a*-2,-a,0,0,0,-a,0,a,0,0,0,a,a*2,0,0,0,0,0,1,0],l)},lsd:function(a){return a===void 0&&(a=!1),this.multiply(h.LSD,a)},brown:function(a){return a===void 0&&(a=!1),this.multiply(h.BROWN,a)},vintagePinhole:function(a){return a===void 0&&(a=!1),this.multiply(h.VINTAGE,a)},kodachrome:function(a){return a===void 0&&(a=!1),this.multiply(h.KODACHROME,a)},technicolor:function(a){return a===void 0&&(a=!1),this.multiply(h.TECHNICOLOR,a)},polaroid:function(a){return a===void 0&&(a=!1),this.multiply(h.POLAROID,a)},shiftToBGR:function(a){return a===void 0&&(a=!1),this.multiply(h.SHIFT_BGR,a)},multiply:function(a,l){l===void 0&&(l=!1),l||this.reset();var n=this._matrix,u=d;return u.set(n),n.set([u[0]*a[0]+u[1]*a[5]+u[2]*a[10]+u[3]*a[15],u[0]*a[1]+u[1]*a[6]+u[2]*a[11]+u[3]*a[16],u[0]*a[2]+u[1]*a[7]+u[2]*a[12]+u[3]*a[17],u[0]*a[3]+u[1]*a[8]+u[2]*a[13]+u[3]*a[18],u[0]*a[4]+u[1]*a[9]+u[2]*a[14]+u[3]*a[19]+u[4],u[5]*a[0]+u[6]*a[5]+u[7]*a[10]+u[8]*a[15],u[5]*a[1]+u[6]*a[6]+u[7]*a[11]+u[8]*a[16],u[5]*a[2]+u[6]*a[7]+u[7]*a[12]+u[8]*a[17],u[5]*a[3]+u[6]*a[8]+u[7]*a[13]+u[8]*a[18],u[5]*a[4]+u[6]*a[9]+u[7]*a[14]+u[8]*a[19]+u[9],u[10]*a[0]+u[11]*a[5]+u[12]*a[10]+u[13]*a[15],u[10]*a[1]+u[11]*a[6]+u[12]*a[11]+u[13]*a[16],u[10]*a[2]+u[11]*a[7]+u[12]*a[12]+u[13]*a[17],u[10]*a[3]+u[11]*a[8]+u[12]*a[13]+u[13]*a[18],u[10]*a[4]+u[11]*a[9]+u[12]*a[14]+u[13]*a[19]+u[14],u[15]*a[0]+u[16]*a[5]+u[17]*a[10]+u[18]*a[15],u[15]*a[1]+u[16]*a[6]+u[17]*a[11]+u[18]*a[16],u[15]*a[2]+u[16]*a[7]+u[17]*a[12]+u[18]*a[17],u[15]*a[3]+u[16]*a[8]+u[17]*a[13]+u[18]*a[18],u[15]*a[4]+u[16]*a[9]+u[17]*a[14]+u[18]*a[19]+u[19]]),this._dirty=!0,this}});h.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],h.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],h.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],h.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],h.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],h.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],h.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],h.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],h.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],h.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],h.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],s.exports=h},51767:(s,y,e)=>{/** + */var r=e(83419),d=new Float32Array(20),h=new r({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(a){return this._matrix.set(a),this._dirty=!0,this},reset:function(){var a=this._matrix;return a.fill(0),a[0]=1,a[6]=1,a[12]=1,a[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var a=this._data;return this._dirty&&(a.set(this._matrix),a[4]/=255,a[9]/=255,a[14]/=255,a[19]/=255,this._dirty=!1),a},brightness:function(a,l){a===void 0&&(a=0),l===void 0&&(l=!1);var n=a;return this.multiply([n,0,0,0,0,0,n,0,0,0,0,0,n,0,0,0,0,0,1,0],l)},saturate:function(a,l){a===void 0&&(a=0),l===void 0&&(l=!1);var n=a*2/3+1,u=(n-1)*-.5;return this.multiply([n,u,u,0,0,u,n,u,0,0,u,u,n,0,0,0,0,0,1,0],l)},desaturate:function(a){return a===void 0&&(a=!1),this.saturate(-1,a)},hue:function(a,l){a===void 0&&(a=0),l===void 0&&(l=!1),a=a/180*Math.PI;var n=Math.cos(a),u=Math.sin(a),f=.213,o=.715,c=.072;return this.multiply([f+n*(1-f)+u*-f,o+n*-o+u*-o,c+n*-c+u*(1-c),0,0,f+n*-f+u*.143,o+n*(1-o)+u*.14,c+n*-c+u*-.283,0,0,f+n*-f+u*-(1-f),o+n*-o+u*o,c+n*(1-c)+u*c,0,0,0,0,0,1,0],l)},grayscale:function(a,l){return a===void 0&&(a=1),l===void 0&&(l=!1),this.saturate(-a,l)},blackWhite:function(a){return a===void 0&&(a=!1),this.multiply(h.BLACK_WHITE,a)},contrast:function(a,l){a===void 0&&(a=0),l===void 0&&(l=!1);var n=a+1,u=-.5*(n-1);return this.multiply([n,0,0,0,u,0,n,0,0,u,0,0,n,0,u,0,0,0,1,0],l)},negative:function(a){return a===void 0&&(a=!1),this.multiply(h.NEGATIVE,a)},desaturateLuminance:function(a){return a===void 0&&(a=!1),this.multiply(h.DESATURATE_LUMINANCE,a)},sepia:function(a){return a===void 0&&(a=!1),this.multiply(h.SEPIA,a)},night:function(a,l){return a===void 0&&(a=.1),l===void 0&&(l=!1),this.multiply([a*-2,-a,0,0,0,-a,0,a,0,0,0,a,a*2,0,0,0,0,0,1,0],l)},lsd:function(a){return a===void 0&&(a=!1),this.multiply(h.LSD,a)},brown:function(a){return a===void 0&&(a=!1),this.multiply(h.BROWN,a)},vintagePinhole:function(a){return a===void 0&&(a=!1),this.multiply(h.VINTAGE,a)},kodachrome:function(a){return a===void 0&&(a=!1),this.multiply(h.KODACHROME,a)},technicolor:function(a){return a===void 0&&(a=!1),this.multiply(h.TECHNICOLOR,a)},polaroid:function(a){return a===void 0&&(a=!1),this.multiply(h.POLAROID,a)},shiftToBGR:function(a){return a===void 0&&(a=!1),this.multiply(h.SHIFT_BGR,a)},multiply:function(a,l){l===void 0&&(l=!1),l||this.reset();var n=this._matrix,u=d;return u.set(n),n.set([u[0]*a[0]+u[1]*a[5]+u[2]*a[10]+u[3]*a[15],u[0]*a[1]+u[1]*a[6]+u[2]*a[11]+u[3]*a[16],u[0]*a[2]+u[1]*a[7]+u[2]*a[12]+u[3]*a[17],u[0]*a[3]+u[1]*a[8]+u[2]*a[13]+u[3]*a[18],u[0]*a[4]+u[1]*a[9]+u[2]*a[14]+u[3]*a[19]+u[4],u[5]*a[0]+u[6]*a[5]+u[7]*a[10]+u[8]*a[15],u[5]*a[1]+u[6]*a[6]+u[7]*a[11]+u[8]*a[16],u[5]*a[2]+u[6]*a[7]+u[7]*a[12]+u[8]*a[17],u[5]*a[3]+u[6]*a[8]+u[7]*a[13]+u[8]*a[18],u[5]*a[4]+u[6]*a[9]+u[7]*a[14]+u[8]*a[19]+u[9],u[10]*a[0]+u[11]*a[5]+u[12]*a[10]+u[13]*a[15],u[10]*a[1]+u[11]*a[6]+u[12]*a[11]+u[13]*a[16],u[10]*a[2]+u[11]*a[7]+u[12]*a[12]+u[13]*a[17],u[10]*a[3]+u[11]*a[8]+u[12]*a[13]+u[13]*a[18],u[10]*a[4]+u[11]*a[9]+u[12]*a[14]+u[13]*a[19]+u[14],u[15]*a[0]+u[16]*a[5]+u[17]*a[10]+u[18]*a[15],u[15]*a[1]+u[16]*a[6]+u[17]*a[11]+u[18]*a[16],u[15]*a[2]+u[16]*a[7]+u[17]*a[12]+u[18]*a[17],u[15]*a[3]+u[16]*a[8]+u[17]*a[13]+u[18]*a[18],u[15]*a[4]+u[16]*a[9]+u[17]*a[14]+u[18]*a[19]+u[19]]),this._dirty=!0,this}});h.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],h.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],h.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],h.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],h.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],h.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],h.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],h.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],h.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],h.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],h.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],s.exports=h},51767:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -713,111 +713,111 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12};s.exports=y},54312:(s,y,e)=>{/** + */var x={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12};s.exports=x},54312:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(62235),d=e(35893),h=e(86327),a=e(88417),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)+f),h(n,r(u)+o),n};s.exports=l},46768:(s,y,e)=>{/** + */var r=e(62235),d=e(35893),h=e(86327),a=e(88417),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)+f),h(n,r(u)+o),n};s.exports=l},46768:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(62235),d=e(26541),h=e(86327),a=e(385),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)-f),h(n,r(u)+o),n};s.exports=l},35827:(s,y,e)=>{/** + */var r=e(62235),d=e(26541),h=e(86327),a=e(385),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)-f),h(n,r(u)+o),n};s.exports=l},35827:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(62235),d=e(54380),h=e(86327),a=e(40136),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)+f),h(n,r(u)+o),n};s.exports=l},46871:(s,y,e)=>{/** + */var r=e(62235),d=e(54380),h=e(86327),a=e(40136),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)+f),h(n,r(u)+o),n};s.exports=l},46871:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(66786),d=e(35893),h=e(7702),a=function(l,n,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),r(l,d(n)+u,h(n)+f),l};s.exports=a},5198:(s,y,e)=>{/** + */var r=e(66786),d=e(35893),h=e(7702),a=function(l,n,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),r(l,d(n)+u,h(n)+f),l};s.exports=a},5198:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7702),d=e(26541),h=e(20786),a=e(385),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)-f),h(n,r(u)+o),n};s.exports=l},11879:(s,y,e)=>{/** + */var r=e(7702),d=e(26541),h=e(20786),a=e(385),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)-f),h(n,r(u)+o),n};s.exports=l},11879:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(60461),d=[];d[r.BOTTOM_CENTER]=e(54312),d[r.BOTTOM_LEFT]=e(46768),d[r.BOTTOM_RIGHT]=e(35827),d[r.CENTER]=e(46871),d[r.LEFT_CENTER]=e(5198),d[r.RIGHT_CENTER]=e(80503),d[r.TOP_CENTER]=e(89698),d[r.TOP_LEFT]=e(922),d[r.TOP_RIGHT]=e(21373),d[r.LEFT_BOTTOM]=d[r.BOTTOM_LEFT],d[r.LEFT_TOP]=d[r.TOP_LEFT],d[r.RIGHT_BOTTOM]=d[r.BOTTOM_RIGHT],d[r.RIGHT_TOP]=d[r.TOP_RIGHT];var h=function(a,l,n,u,f){return d[n](a,l,u,f)};s.exports=h},80503:(s,y,e)=>{/** + */var r=e(60461),d=[];d[r.BOTTOM_CENTER]=e(54312),d[r.BOTTOM_LEFT]=e(46768),d[r.BOTTOM_RIGHT]=e(35827),d[r.CENTER]=e(46871),d[r.LEFT_CENTER]=e(5198),d[r.RIGHT_CENTER]=e(80503),d[r.TOP_CENTER]=e(89698),d[r.TOP_LEFT]=e(922),d[r.TOP_RIGHT]=e(21373),d[r.LEFT_BOTTOM]=d[r.BOTTOM_LEFT],d[r.LEFT_TOP]=d[r.TOP_LEFT],d[r.RIGHT_BOTTOM]=d[r.BOTTOM_RIGHT],d[r.RIGHT_TOP]=d[r.TOP_RIGHT];var h=function(a,l,n,u,f){return d[n](a,l,u,f)};s.exports=h},80503:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7702),d=e(54380),h=e(20786),a=e(40136),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)+f),h(n,r(u)+o),n};s.exports=l},89698:(s,y,e)=>{/** + */var r=e(7702),d=e(54380),h=e(20786),a=e(40136),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)+f),h(n,r(u)+o),n};s.exports=l},89698:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(35893),d=e(17717),h=e(88417),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,r(u)+f),a(n,d(u)-o),n};s.exports=l},922:(s,y,e)=>{/** + */var r=e(35893),d=e(17717),h=e(88417),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,r(u)+f),a(n,d(u)-o),n};s.exports=l},922:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26541),d=e(17717),h=e(385),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,r(u)-f),a(n,d(u)-o),n};s.exports=l},21373:(s,y,e)=>{/** + */var r=e(26541),d=e(17717),h=e(385),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,r(u)-f),a(n,d(u)-o),n};s.exports=l},21373:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(54380),d=e(17717),h=e(40136),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,r(u)+f),a(n,d(u)-o),n};s.exports=l},91660:(s,y,e)=>{/** + */var r=e(54380),d=e(17717),h=e(40136),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,r(u)+f),a(n,d(u)-o),n};s.exports=l},91660:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={BottomCenter:e(54312),BottomLeft:e(46768),BottomRight:e(35827),Center:e(46871),LeftCenter:e(5198),QuickSet:e(11879),RightCenter:e(80503),TopCenter:e(89698),TopLeft:e(922),TopRight:e(21373)}},71926:(s,y,e)=>{/** + */s.exports={BottomCenter:e(54312),BottomLeft:e(46768),BottomRight:e(35827),Center:e(46871),LeftCenter:e(5198),QuickSet:e(11879),RightCenter:e(80503),TopCenter:e(89698),TopLeft:e(922),TopRight:e(21373)}},71926:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(60461),d=e(79291),h={In:e(91660),To:e(16694)};h=d(!1,h,r),s.exports=h},21578:(s,y,e)=>{/** + */var r=e(60461),d=e(79291),h={In:e(91660),To:e(16694)};h=d(!1,h,r),s.exports=h},21578:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(62235),d=e(35893),h=e(88417),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,d(u)+f),a(n,r(u)+o),n};s.exports=l},10210:(s,y,e)=>{/** + */var r=e(62235),d=e(35893),h=e(88417),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,d(u)+f),a(n,r(u)+o),n};s.exports=l},10210:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(62235),d=e(26541),h=e(385),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,d(u)-f),a(n,r(u)+o),n};s.exports=l},82341:(s,y,e)=>{/** + */var r=e(62235),d=e(26541),h=e(385),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,d(u)-f),a(n,r(u)+o),n};s.exports=l},82341:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(62235),d=e(54380),h=e(40136),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,d(u)+f),a(n,r(u)+o),n};s.exports=l},87958:(s,y,e)=>{/** + */var r=e(62235),d=e(54380),h=e(40136),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,d(u)+f),a(n,r(u)+o),n};s.exports=l},87958:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(62235),d=e(26541),h=e(86327),a=e(40136),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)-f),h(n,r(u)+o),n};s.exports=l},40080:(s,y,e)=>{/** + */var r=e(62235),d=e(26541),h=e(86327),a=e(40136),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)-f),h(n,r(u)+o),n};s.exports=l},40080:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7702),d=e(26541),h=e(20786),a=e(40136),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)-f),h(n,r(u)+o),n};s.exports=l},88466:(s,y,e)=>{/** + */var r=e(7702),d=e(26541),h=e(20786),a=e(40136),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)-f),h(n,r(u)+o),n};s.exports=l},88466:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26541),d=e(17717),h=e(40136),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,r(u)-f),a(n,d(u)-o),n};s.exports=l},38829:(s,y,e)=>{/** + */var r=e(26541),d=e(17717),h=e(40136),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,r(u)-f),a(n,d(u)-o),n};s.exports=l},38829:(s,x,e)=>{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(60461),d=[];d[r.BOTTOM_CENTER]=e(21578),d[r.BOTTOM_LEFT]=e(10210),d[r.BOTTOM_RIGHT]=e(82341),d[r.LEFT_BOTTOM]=e(87958),d[r.LEFT_CENTER]=e(40080),d[r.LEFT_TOP]=e(88466),d[r.RIGHT_BOTTOM]=e(19211),d[r.RIGHT_CENTER]=e(34609),d[r.RIGHT_TOP]=e(48741),d[r.TOP_CENTER]=e(49440),d[r.TOP_LEFT]=e(81288),d[r.TOP_RIGHT]=e(61323);var h=function(a,l,n,u,f){return d[n](a,l,u,f)};s.exports=h},19211:(s,y,e)=>{/** + */var r=e(60461),d=[];d[r.BOTTOM_CENTER]=e(21578),d[r.BOTTOM_LEFT]=e(10210),d[r.BOTTOM_RIGHT]=e(82341),d[r.LEFT_BOTTOM]=e(87958),d[r.LEFT_CENTER]=e(40080),d[r.LEFT_TOP]=e(88466),d[r.RIGHT_BOTTOM]=e(19211),d[r.RIGHT_CENTER]=e(34609),d[r.RIGHT_TOP]=e(48741),d[r.TOP_CENTER]=e(49440),d[r.TOP_LEFT]=e(81288),d[r.TOP_RIGHT]=e(61323);var h=function(a,l,n,u,f){return d[n](a,l,u,f)};s.exports=h},19211:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(62235),d=e(54380),h=e(86327),a=e(385),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)+f),h(n,r(u)+o),n};s.exports=l},34609:(s,y,e)=>{/** + */var r=e(62235),d=e(54380),h=e(86327),a=e(385),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)+f),h(n,r(u)+o),n};s.exports=l},34609:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7702),d=e(54380),h=e(20786),a=e(385),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)+f),h(n,r(u)+o),n};s.exports=l},48741:(s,y,e)=>{/** + */var r=e(7702),d=e(54380),h=e(20786),a=e(385),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,d(u)+f),h(n,r(u)+o),n};s.exports=l},48741:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(54380),d=e(17717),h=e(385),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,r(u)+f),a(n,d(u)-o),n};s.exports=l},49440:(s,y,e)=>{/** + */var r=e(54380),d=e(17717),h=e(385),a=e(66737),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),h(n,r(u)+f),a(n,d(u)-o),n};s.exports=l},49440:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(35893),d=e(17717),h=e(86327),a=e(88417),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,r(u)+f),h(n,d(u)-o),n};s.exports=l},81288:(s,y,e)=>{/** + */var r=e(35893),d=e(17717),h=e(86327),a=e(88417),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,r(u)+f),h(n,d(u)-o),n};s.exports=l},81288:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26541),d=e(17717),h=e(86327),a=e(385),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,r(u)-f),h(n,d(u)-o),n};s.exports=l},61323:(s,y,e)=>{/** + */var r=e(26541),d=e(17717),h=e(86327),a=e(385),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,r(u)-f),h(n,d(u)-o),n};s.exports=l},61323:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(54380),d=e(17717),h=e(86327),a=e(40136),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,r(u)+f),h(n,d(u)-o),n};s.exports=l},16694:(s,y,e)=>{/** + */var r=e(54380),d=e(17717),h=e(86327),a=e(40136),l=function(n,u,f,o){return f===void 0&&(f=0),o===void 0&&(o=0),a(n,r(u)+f),h(n,d(u)-o),n};s.exports=l},16694:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={BottomCenter:e(21578),BottomLeft:e(10210),BottomRight:e(82341),LeftBottom:e(87958),LeftCenter:e(40080),LeftTop:e(88466),QuickSet:e(38829),RightBottom:e(19211),RightCenter:e(34609),RightTop:e(48741),TopCenter:e(49440),TopLeft:e(81288),TopRight:e(61323)}},66786:(s,y,e)=>{/** + */s.exports={BottomCenter:e(21578),BottomLeft:e(10210),BottomRight:e(82341),LeftBottom:e(87958),LeftCenter:e(40080),LeftTop:e(88466),QuickSet:e(38829),RightBottom:e(19211),RightCenter:e(34609),RightTop:e(48741),TopCenter:e(49440),TopLeft:e(81288),TopRight:e(61323)}},66786:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -825,7 +825,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.y+e.height-e.height*e.originY};s.exports=y},72873:(s,y,e)=>{/** + */var x=function(e){return e.y+e.height-e.height*e.originY};s.exports=x},72873:(s,x,e)=>{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -833,55 +833,55 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.x-e.width*e.originX+e.width*.5};s.exports=y},7702:s=>{/** + */var x=function(e){return e.x-e.width*e.originX+e.width*.5};s.exports=x},7702:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.y-e.height*e.originY+e.height*.5};s.exports=y},26541:s=>{/** + */var x=function(e){return e.y-e.height*e.originY+e.height*.5};s.exports=x},26541:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.x-e.width*e.originX};s.exports=y},87431:s=>{/** + */var x=function(e){return e.x-e.width*e.originX};s.exports=x},87431:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.width*e.originX};s.exports=y},46928:s=>{/** + */var x=function(e){return e.width*e.originX};s.exports=x},46928:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.height*e.originY};s.exports=y},54380:s=>{/** + */var x=function(e){return e.height*e.originY};s.exports=x},54380:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.x+e.width-e.width*e.originX};s.exports=y},17717:s=>{/** + */var x=function(e){return e.x+e.width-e.width*e.originX};s.exports=x},17717:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.y-e.height*e.originY};s.exports=y},86327:s=>{/** + */var x=function(e){return e.y-e.height*e.originY};s.exports=x},86327:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.y=r-e.height+e.height*e.originY,e};s.exports=y},88417:s=>{/** + */var x=function(e,r){return e.y=r-e.height+e.height*e.originY,e};s.exports=x},88417:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=e.width*e.originX;return e.x=r+d-e.width*.5,e};s.exports=y},20786:s=>{/** + */var x=function(e,r){var d=e.width*e.originX;return e.x=r+d-e.width*.5,e};s.exports=x},20786:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=e.height*e.originY;return e.y=r+d-e.height*.5,e};s.exports=y},385:s=>{/** + */var x=function(e,r){var d=e.height*e.originY;return e.y=r+d-e.height*.5,e};s.exports=x},385:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.x=r+e.width*e.originX,e};s.exports=y},40136:s=>{/** + */var x=function(e,r){return e.x=r+e.width*e.originX,e};s.exports=x},40136:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.x=r-e.width+e.width*e.originX,e};s.exports=y},66737:s=>{/** + */var x=function(e,r){return e.x=r-e.width+e.width*e.originX,e};s.exports=x},66737:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.y=r+e.height*e.originY,e};s.exports=y},58724:(s,y,e)=>{/** + */var x=function(e,r){return e.y=r+e.height*e.originY,e};s.exports=x},58724:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -889,7 +889,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setCrisp:function(e){var r=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return r.forEach(function(d){e.style["image-rendering"]=d}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(e){return e.style["image-rendering"]="auto",e.style.msInterpolationMode="bicubic",e}};s.exports=y},27919:(s,y,e)=>{/** + */var x={setCrisp:function(e){var r=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return r.forEach(function(d){e.style["image-rendering"]=d}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(e){return e.style["image-rendering"]="auto",e.style.msInterpolationMode="bicubic",e}};s.exports=x},27919:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -897,23 +897,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y="",e=function(){var r=function(l){for(var n=["i","webkitI","msI","mozI","oI"],u=0;u{/** + */var x="",e=function(){var r=function(l){for(var n=["i","webkitI","msI","mozI","oI"],u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r===void 0&&(r="none"),e.style.msTouchAction=r,e.style["ms-touch-action"]=r,e.style["touch-action"]=r,e};s.exports=y},91610:s=>{/** + */var x=function(e,r){return r===void 0&&(r="none"),e.style.msTouchAction=r,e.style["ms-touch-action"]=r,e.style["touch-action"]=r,e};s.exports=x},91610:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){r===void 0&&(r="none");var d=["-webkit-","-khtml-","-moz-","-ms-",""];return d.forEach(function(h){e.style[h+"user-select"]=r}),e.style["-webkit-touch-callout"]=r,e.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",e};s.exports=y},26253:(s,y,e)=>{/** + */var x=function(e,r){r===void 0&&(r="none");var d=["-webkit-","-khtml-","-moz-","-ms-",""];return d.forEach(function(h){e.style[h+"user-select"]=r}),e.style["-webkit-touch-callout"]=r,e.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",e};s.exports=x},26253:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={CanvasInterpolation:e(20623),CanvasPool:e(27919),Smoothing:e(68703),TouchAction:e(65208),UserSelect:e(91610)}},40987:(s,y,e)=>{/** + */s.exports={CanvasInterpolation:e(20623),CanvasPool:e(27919),Smoothing:e(68703),TouchAction:e(65208),UserSelect:e(91610)}},40987:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(37589),h=e(1e3),a=e(7537),l=e(87837),n=new r({initialize:function(f,o,c,p){f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(f,o,c,p)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(u,f,o,c,p){return c===void 0&&(c=255),p===void 0&&(p=!0),this._locked=!0,this.red=u,this.green=f,this.blue=o,this.alpha=c,this._locked=!1,this.update(p)},setGLTo:function(u,f,o,c){return c===void 0&&(c=1),this._locked=!0,this.redGL=u,this.greenGL=f,this.blueGL=o,this.alphaGL=c,this._locked=!1,this.update(!0)},setFromRGB:function(u){return this._locked=!0,this.red=u.r,this.green=u.g,this.blue=u.b,u.hasOwnProperty("a")&&(this.alpha=u.a),this._locked=!1,this.update(!0)},setFromHSV:function(u,f,o){return a(u,f,o,this)},update:function(u){if(u===void 0&&(u=!1),this._locked)return this;var f=this.r,o=this.g,c=this.b,p=this.a;return this._color=d(f,o,c),this._color32=h(f,o,c,p),this._rgba="rgba("+f+","+o+","+c+","+p/255+")",u&&l(f,o,c,this),this},updateHSV:function(){var u=this.r,f=this.g,o=this.b;return l(u,f,o,this),this},clone:function(){return new n(this.r,this.g,this.b,this.a)},gray:function(u){return this.setTo(u,u,u)},random:function(u,f){u===void 0&&(u=0),f===void 0&&(f=255);var o=Math.floor(u+Math.random()*(f-u)),c=Math.floor(u+Math.random()*(f-u)),p=Math.floor(u+Math.random()*(f-u));return this.setTo(o,c,p)},randomGray:function(u,f){u===void 0&&(u=0),f===void 0&&(f=255);var o=Math.floor(u+Math.random()*(f-u));return this.setTo(o,o,o)},saturate:function(u){return this.s+=u/100,this},desaturate:function(u){return this.s-=u/100,this},lighten:function(u){return this.v+=u/100,this},darken:function(u){return this.v-=u/100,this},brighten:function(u){var f=this.r,o=this.g,c=this.b;return f=Math.max(0,Math.min(255,f-Math.round(255*-(u/100)))),o=Math.max(0,Math.min(255,o-Math.round(255*-(u/100)))),c=Math.max(0,Math.min(255,c-Math.round(255*-(u/100)))),this.setTo(f,o,c)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(u){this.gl[0]=Math.min(Math.abs(u),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(u){this.gl[1]=Math.min(Math.abs(u),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(u){this.gl[2]=Math.min(Math.abs(u),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(u){this.gl[3]=Math.min(Math.abs(u),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(u){u=Math.floor(Math.abs(u)),this.r=Math.min(u,255),this.gl[0]=u/255,this.update(!0)}},green:{get:function(){return this.g},set:function(u){u=Math.floor(Math.abs(u)),this.g=Math.min(u,255),this.gl[1]=u/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(u){u=Math.floor(Math.abs(u)),this.b=Math.min(u,255),this.gl[2]=u/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(u){u=Math.floor(Math.abs(u)),this.a=Math.min(u,255),this.gl[3]=u/255,this.update()}},h:{get:function(){return this._h},set:function(u){this._h=u,a(u,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(u){this._s=u,a(this._h,u,this._v,this)}},v:{get:function(){return this._v},set:function(u){this._v=u,a(this._h,this._s,u,this)}}});s.exports=n},92728:(s,y,e)=>{/** + */var r=e(83419),d=e(37589),h=e(1e3),a=e(7537),l=e(87837),n=new r({initialize:function(f,o,c,p){f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(f,o,c,p)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(u,f,o,c,p){return c===void 0&&(c=255),p===void 0&&(p=!0),this._locked=!0,this.red=u,this.green=f,this.blue=o,this.alpha=c,this._locked=!1,this.update(p)},setGLTo:function(u,f,o,c){return c===void 0&&(c=1),this._locked=!0,this.redGL=u,this.greenGL=f,this.blueGL=o,this.alphaGL=c,this._locked=!1,this.update(!0)},setFromRGB:function(u){return this._locked=!0,this.red=u.r,this.green=u.g,this.blue=u.b,u.hasOwnProperty("a")&&(this.alpha=u.a),this._locked=!1,this.update(!0)},setFromHSV:function(u,f,o){return a(u,f,o,this)},update:function(u){if(u===void 0&&(u=!1),this._locked)return this;var f=this.r,o=this.g,c=this.b,p=this.a;return this._color=d(f,o,c),this._color32=h(f,o,c,p),this._rgba="rgba("+f+","+o+","+c+","+p/255+")",u&&l(f,o,c,this),this},updateHSV:function(){var u=this.r,f=this.g,o=this.b;return l(u,f,o,this),this},clone:function(){return new n(this.r,this.g,this.b,this.a)},gray:function(u){return this.setTo(u,u,u)},random:function(u,f){u===void 0&&(u=0),f===void 0&&(f=255);var o=Math.floor(u+Math.random()*(f-u)),c=Math.floor(u+Math.random()*(f-u)),p=Math.floor(u+Math.random()*(f-u));return this.setTo(o,c,p)},randomGray:function(u,f){u===void 0&&(u=0),f===void 0&&(f=255);var o=Math.floor(u+Math.random()*(f-u));return this.setTo(o,o,o)},saturate:function(u){return this.s+=u/100,this},desaturate:function(u){return this.s-=u/100,this},lighten:function(u){return this.v+=u/100,this},darken:function(u){return this.v-=u/100,this},brighten:function(u){var f=this.r,o=this.g,c=this.b;return f=Math.max(0,Math.min(255,f-Math.round(255*-(u/100)))),o=Math.max(0,Math.min(255,o-Math.round(255*-(u/100)))),c=Math.max(0,Math.min(255,c-Math.round(255*-(u/100)))),this.setTo(f,o,c)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(u){this.gl[0]=Math.min(Math.abs(u),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(u){this.gl[1]=Math.min(Math.abs(u),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(u){this.gl[2]=Math.min(Math.abs(u),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(u){this.gl[3]=Math.min(Math.abs(u),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(u){u=Math.floor(Math.abs(u)),this.r=Math.min(u,255),this.gl[0]=u/255,this.update(!0)}},green:{get:function(){return this.g},set:function(u){u=Math.floor(Math.abs(u)),this.g=Math.min(u,255),this.gl[1]=u/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(u){u=Math.floor(Math.abs(u)),this.b=Math.min(u,255),this.gl[2]=u/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(u){u=Math.floor(Math.abs(u)),this.a=Math.min(u,255),this.gl[3]=u/255,this.update()}},h:{get:function(){return this._h},set:function(u){this._h=u,a(u,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(u){this._s=u,a(this._h,u,this._v,this)}},v:{get:function(){return this._v},set:function(u){this._v=u,a(this._h,this._s,u,this)}}});s.exports=n},92728:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -921,31 +921,31 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r={r:e>>16&255,g:e>>8&255,b:e&255,a:255};return e>16777215&&(r.a=e>>>24),r};s.exports=y},62957:s=>{/** + */var x=function(e){var r={r:e>>16&255,g:e>>8&255,b:e&255,a:255};return e>16777215&&(r.a=e>>>24),r};s.exports=x},62957:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r=e.toString(16);return r.length===1?"0"+r:r};s.exports=y},37589:s=>{/** + */var x=function(e){var r=e.toString(16);return r.length===1?"0"+r:r};s.exports=x},37589:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return e<<16|r<<8|d};s.exports=y},1e3:s=>{/** + */var x=function(e,r,d){return e<<16|r<<8|d};s.exports=x},1e3:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){return h<<24|e<<16|r<<8|d};s.exports=y},62183:(s,y,e)=>{/** + */var x=function(e,r,d,h){return h<<24|e<<16|r<<8|d};s.exports=x},62183:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(40987),d=e(89528),h=function(a,l,n){var u=n,f=n,o=n;if(l!==0){var c=n<.5?n*(1+l):n+l-n*l,p=2*n-c;u=d(p,c,a+1/3),f=d(p,c,a),o=d(p,c,a-1/3)}var v=new r;return v.setGLTo(u,f,o,1)};s.exports=h},27939:(s,y,e)=>{/** + */var r=e(40987),d=e(89528),h=function(a,l,n){var u=n,f=n,o=n;if(l!==0){var c=n<.5?n*(1+l):n+l-n*l,p=2*n-c;u=d(p,c,a+1/3),f=d(p,c,a),o=d(p,c,a-1/3)}var v=new r;return v.setGLTo(u,f,o,1)};s.exports=h},27939:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7537),d=function(h,a){h===void 0&&(h=1),a===void 0&&(a=1);for(var l=[],n=0;n<=359;n++)l.push(r(n/359,h,a));return l};s.exports=d},7537:(s,y,e)=>{/** + */var r=e(7537),d=function(h,a){h===void 0&&(h=1),a===void 0&&(a=1);for(var l=[],n=0;n<=359;n++)l.push(r(n/359,h,a));return l};s.exports=d},7537:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(37589);function d(a,l,n,u){var f=(a+l*6)%6,o=Math.min(f,4-f,1);return Math.round(255*(u-u*n*Math.max(0,o)))}var h=function(a,l,n,u){l===void 0&&(l=1),n===void 0&&(n=1);var f=d(5,a,l,n),o=d(3,a,l,n),c=d(1,a,l,n);return u?u.setTo?u.setTo(f,o,c,u.alpha,!0):(u.r=f,u.g=o,u.b=c,u.color=r(f,o,c),u):{r:f,g:o,b:c,color:r(f,o,c)}};s.exports=h},70238:(s,y,e)=>{/** + */var r=e(37589);function d(a,l,n,u){var f=(a+l*6)%6,o=Math.min(f,4-f,1);return Math.round(255*(u-u*n*Math.max(0,o)))}var h=function(a,l,n,u){l===void 0&&(l=1),n===void 0&&(n=1);var f=d(5,a,l,n),o=d(3,a,l,n),c=d(1,a,l,n);return u?u.setTo?u.setTo(f,o,c,u.alpha,!0):(u.r=f,u.g=o,u.b=c,u.color=r(f,o,c),u):{r:f,g:o,b:c,color:r(f,o,c)}};s.exports=h},70238:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -953,7 +953,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?e+(r-e)*6*d:d<.5?r:d<.6666666666666666?e+(r-e)*(.6666666666666666-d)*6:e};s.exports=y},30100:(s,y,e)=>{/** + */var x=function(e,r,d){return d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?e+(r-e)*6*d:d<.5?r:d<.6666666666666666?e+(r-e)*(.6666666666666666-d)*6:e};s.exports=x},30100:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -961,15 +961,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e>16777215?{a:e>>>24,r:e>>16&255,g:e>>8&255,b:e&255}:{a:255,r:e>>16&255,g:e>>8&255,b:e&255}};s.exports=y},13699:(s,y,e)=>{/** + */var x=function(e){return e>16777215?{a:e>>>24,r:e>>16&255,g:e>>8&255,b:e&255}:{a:255,r:e>>16&255,g:e>>8&255,b:e&255}};s.exports=x},13699:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(28915),d=function(l,n,u,f,o,c,p,v){p===void 0&&(p=100),v===void 0&&(v=0);var m=v/p;return{r:r(l,f,m),g:r(n,o,m),b:r(u,c,m)}},h=function(l,n,u,f){return u===void 0&&(u=100),f===void 0&&(f=0),d(l.r,l.g,l.b,n.r,n.g,n.b,u,f)},a=function(l,n,u,f,o,c){return o===void 0&&(o=100),c===void 0&&(c=0),d(l.r,l.g,l.b,n,u,f,o,c)};s.exports={RGBWithRGB:d,ColorWithRGB:a,ColorWithColor:h}},68957:(s,y,e)=>{/** + */var r=e(28915),d=function(l,n,u,f,o,c,p,v){p===void 0&&(p=100),v===void 0&&(v=0);var m=v/p;return{r:r(l,f,m),g:r(n,o,m),b:r(u,c,m)}},h=function(l,n,u,f){return u===void 0&&(u=100),f===void 0&&(f=0),d(l.r,l.g,l.b,n.r,n.g,n.b,u,f)},a=function(l,n,u,f,o,c){return o===void 0&&(o=100),c===void 0&&(c=0),d(l.r,l.g,l.b,n,u,f,o,c)};s.exports={RGBWithRGB:d,ColorWithRGB:a,ColorWithColor:h}},68957:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(40987),d=function(h){return new r(h.r,h.g,h.b,h.a)};s.exports=d},87388:(s,y,e)=>{/** + */var r=e(40987),d=function(h){return new r(h.r,h.g,h.b,h.a)};s.exports=d},87388:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -977,39 +977,39 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){h===void 0&&(h={h:0,s:0,v:0}),e/=255,r/=255,d/=255;var a=Math.min(e,r,d),l=Math.max(e,r,d),n=l-a,u=0,f=l===0?0:n/l,o=l;return l!==a&&(l===e?u=(r-d)/n+(r{/** + */var x=function(e,r,d,h){h===void 0&&(h={h:0,s:0,v:0}),e/=255,r/=255,d/=255;var a=Math.min(e,r,d),l=Math.max(e,r,d),n=l-a,u=0,f=l===0?0:n/l,o=l;return l!==a&&(l===e?u=(r-d)/n+(r{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(62957),d=function(h,a,l,n,u){return n===void 0&&(n=255),u===void 0&&(u="#"),u==="#"?"#"+((1<<24)+(h<<16)+(a<<8)+l).toString(16).slice(1,7):"0x"+r(n)+r(h)+r(a)+r(l)};s.exports=d},85386:(s,y,e)=>{/** + */var r=e(62957),d=function(h,a,l,n,u){return n===void 0&&(n=255),u===void 0&&(u="#"),u==="#"?"#"+((1<<24)+(h<<16)+(a<<8)+l).toString(16).slice(1,7):"0x"+r(n)+r(h)+r(a)+r(l)};s.exports=d},85386:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(30976),d=e(40987),h=function(a,l){return a===void 0&&(a=0),l===void 0&&(l=255),new d(r(a,l),r(a,l),r(a,l))};s.exports=h},80333:(s,y,e)=>{/** + */var r=e(30976),d=e(40987),h=function(a,l){return a===void 0&&(a=0),l===void 0&&(l=255),new d(r(a,l),r(a,l),r(a,l))};s.exports=h},80333:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(70238),d=e(30100),h=e(68957),a=e(87388),l=function(n){var u=typeof n;switch(u){case"string":return n.substr(0,3).toLowerCase()==="rgb"?a(n):r(n);case"number":return d(n);case"object":return h(n)}};s.exports=l},3956:(s,y,e)=>{/** + */var r=e(70238),d=e(30100),h=e(68957),a=e(87388),l=function(n){var u=typeof n;switch(u){case"string":return n.substr(0,3).toLowerCase()==="rgb"?a(n):r(n);case"number":return d(n);case"object":return h(n)}};s.exports=l},3956:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(40987);r.ColorSpectrum=e(92728),r.ColorToRGBA=e(91588),r.ComponentToHex=e(62957),r.GetColor=e(37589),r.GetColor32=e(1e3),r.HexStringToColor=e(70238),r.HSLToColor=e(62183),r.HSVColorWheel=e(27939),r.HSVToRGB=e(7537),r.HueToComponent=e(89528),r.IntegerToColor=e(30100),r.IntegerToRGB=e(90664),r.Interpolate=e(13699),r.ObjectToColor=e(68957),r.RandomRGB=e(85386),r.RGBStringToColor=e(87388),r.RGBToHSV=e(87837),r.RGBToString=e(75723),r.ValueToColor=e(80333),s.exports=r},27460:(s,y,e)=>{/** + */var r=e(40987);r.ColorSpectrum=e(92728),r.ColorToRGBA=e(91588),r.ComponentToHex=e(62957),r.GetColor=e(37589),r.GetColor32=e(1e3),r.HexStringToColor=e(70238),r.HSLToColor=e(62183),r.HSVColorWheel=e(27939),r.HSVToRGB=e(7537),r.HueToComponent=e(89528),r.IntegerToColor=e(30100),r.IntegerToRGB=e(90664),r.Interpolate=e(13699),r.ObjectToColor=e(68957),r.RandomRGB=e(85386),r.RGBStringToColor=e(87388),r.RGBToHSV=e(87837),r.RGBToString=e(75723),r.ValueToColor=e(80333),s.exports=r},27460:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Align:e(71926),BaseShader:e(73894),Bounds:e(58724),Canvas:e(26253),Color:e(3956),ColorMatrix:e(89422),Masks:e(69781),RGB:e(51767)}},6858:(s,y,e)=>{/** + */s.exports={Align:e(71926),BaseShader:e(73894),Bounds:e(58724),Canvas:e(26253),Color:e(3956),ColorMatrix:e(89422),Masks:e(69781),RGB:e(51767)}},6858:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(39429),h=new r({initialize:function(l,n,u,f,o,c){n||(n=l.sys.make.image({x:u,y:f,key:o,frame:c,add:!1})),this.bitmapMask=n,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(a){this.bitmapMask=a},preRenderWebGL:function(a,l,n){a.pipelines.BITMAPMASK_PIPELINE.beginMask(this,l,n)},postRenderWebGL:function(a,l,n){a.pipelines.BITMAPMASK_PIPELINE.endMask(this,l,n)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});d.register("bitmapMask",function(a,l,n,u,f){return new h(this.scene,a,l,n,u,f)}),s.exports=h},80661:(s,y,e)=>{/** + */var r=e(83419),d=e(39429),h=new r({initialize:function(l,n,u,f,o,c){n||(n=l.sys.make.image({x:u,y:f,key:o,frame:c,add:!1})),this.bitmapMask=n,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(a){this.bitmapMask=a},preRenderWebGL:function(a,l,n){a.pipelines.BITMAPMASK_PIPELINE.beginMask(this,l,n)},postRenderWebGL:function(a,l,n){a.pipelines.BITMAPMASK_PIPELINE.endMask(this,l,n)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});d.register("bitmapMask",function(a,l,n,u,f){return new h(this.scene,a,l,n,u,f)}),s.exports=h},80661:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a,l){this.geometryMask=l,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(h){return this.geometryMask=h,this},setInvertAlpha:function(h){return h===void 0&&(h=!0),this.invertAlpha=h,this},preRenderWebGL:function(h,a,l){var n=h.gl;h.flush(),h.maskStack.length===0&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),h.maskCount=0),h.currentCameraMask.mask!==this&&(h.currentMask.mask=this),h.maskStack.push({mask:this,camera:l}),this.applyStencil(h,l,!0),h.maskCount++},applyStencil:function(h,a,l){var n=h.gl,u=this.geometryMask,f=h.maskCount,o=255;n.colorMask(!1,!1,!1,!1),l?(n.stencilFunc(n.EQUAL,f,o),n.stencilOp(n.KEEP,n.KEEP,n.INCR),f++):(n.stencilFunc(n.EQUAL,f+1,o),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),this.level=f,u.renderWebGL(h,u,a),h.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),this.invertAlpha?n.stencilFunc(n.NOTEQUAL,f,o):n.stencilFunc(n.EQUAL,f,o)},postRenderWebGL:function(h){var a=h.gl;h.maskStack.pop(),h.maskCount--,h.flush();var l=h.currentMask;if(h.maskStack.length===0)l.mask=null,a.disable(a.STENCIL_TEST);else{var n=h.maskStack[h.maskStack.length-1];n.mask.applyStencil(h,n.camera,!1),h.currentCameraMask.mask!==n.mask?(l.mask=n.mask,l.camera=n.camera):l.mask=null}},preRenderCanvas:function(h,a,l){var n=this.geometryMask;h.currentContext.save(),n.renderCanvas(h,n,l,null,null,!0),h.currentContext.clip()},postRenderCanvas:function(h){h.currentContext.restore()},destroy:function(){this.geometryMask=null}});s.exports=d},69781:(s,y,e)=>{/** + */var r=e(83419),d=new r({initialize:function(a,l){this.geometryMask=l,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(h){return this.geometryMask=h,this},setInvertAlpha:function(h){return h===void 0&&(h=!0),this.invertAlpha=h,this},preRenderWebGL:function(h,a,l){var n=h.gl;h.flush(),h.maskStack.length===0&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),h.maskCount=0),h.currentCameraMask.mask!==this&&(h.currentMask.mask=this),h.maskStack.push({mask:this,camera:l}),this.applyStencil(h,l,!0),h.maskCount++},applyStencil:function(h,a,l){var n=h.gl,u=this.geometryMask,f=h.maskCount,o=255;n.colorMask(!1,!1,!1,!1),l?(n.stencilFunc(n.EQUAL,f,o),n.stencilOp(n.KEEP,n.KEEP,n.INCR),f++):(n.stencilFunc(n.EQUAL,f+1,o),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),this.level=f,u.renderWebGL(h,u,a),h.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),this.invertAlpha?n.stencilFunc(n.NOTEQUAL,f,o):n.stencilFunc(n.EQUAL,f,o)},postRenderWebGL:function(h){var a=h.gl;h.maskStack.pop(),h.maskCount--,h.flush();var l=h.currentMask;if(h.maskStack.length===0)l.mask=null,a.disable(a.STENCIL_TEST);else{var n=h.maskStack[h.maskStack.length-1];n.mask.applyStencil(h,n.camera,!1),h.currentCameraMask.mask!==n.mask?(l.mask=n.mask,l.camera=n.camera):l.mask=null}},preRenderCanvas:function(h,a,l){var n=this.geometryMask;h.currentContext.save(),n.renderCanvas(h,n,l,null,null,!0),h.currentContext.clip()},postRenderCanvas:function(h){h.currentContext.restore()},destroy:function(){this.geometryMask=null}});s.exports=d},69781:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={BitmapMask:e(6858),GeometryMask:e(80661)}},73894:(s,y,e)=>{/** + */s.exports={BitmapMask:e(6858),GeometryMask:e(80661)}},73894:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1019,11 +1019,11 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d;if(r)typeof r=="string"?d=document.getElementById(r):typeof r=="object"&&r.nodeType===1&&(d=r);else if(e.parentElement||r===null)return e;return d||(d=document.body),d.appendChild(e),e};s.exports=y},83719:(s,y,e)=>{/** + */var x=function(e,r){var d;if(r)typeof r=="string"?d=document.getElementById(r):typeof r=="object"&&r.nodeType===1&&(d=r);else if(e.parentElement||r===null)return e;return d||(d=document.body),d.appendChild(e),e};s.exports=x},83719:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(40366),d=function(h){var a=h.config;if(!(!a.parent||!a.domCreateContainer)){var l=document.createElement("div");l.style.cssText=["display: block;","width: "+h.scale.width+"px;","height: "+h.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+a.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),h.domContainer=l,r(l,a.parent)}};s.exports=d},57264:(s,y,e)=>{/** + */var r=e(40366),d=function(h){var a=h.config;if(!(!a.parent||!a.domCreateContainer)){var l=document.createElement("div");l.style.cssText=["display: block;","width: "+h.scale.width+"px;","height: "+h.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+a.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),h.domContainer=l,r(l,a.parent)}};s.exports=d},57264:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1031,7 +1031,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){if(!e)return window.innerHeight;var r=Math.abs(window.orientation),d={w:0,h:0},h=document.createElement("div");return h.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(h),d.w=r===90?h.offsetHeight:window.innerWidth,d.h=r===90?window.innerWidth:h.offsetHeight,document.documentElement.removeChild(h),h=null,Math.abs(window.orientation)!==90?d.h:d.w};s.exports=y},45818:(s,y,e)=>{/** + */var x=function(e){if(!e)return window.innerHeight;var r=Math.abs(window.orientation),d={w:0,h:0},h=document.createElement("div");return h.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(h),d.w=r===90?h.offsetHeight:window.innerWidth,d.h=r===90?window.innerWidth:h.offsetHeight,document.documentElement.removeChild(h),h=null,Math.abs(window.orientation)!==90?d.h:d.w};s.exports=x},45818:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1039,87 +1039,87 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r;return e!==""&&(typeof e=="string"?r=document.getElementById(e):e&&e.nodeType===1&&(r=e)),r||(r=document.body),r};s.exports=y},56836:s=>{/** + */var x=function(e){var r;return e!==""&&(typeof e=="string"?r=document.getElementById(e):e&&e.nodeType===1&&(r=e)),r||(r=document.body),r};s.exports=x},56836:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r="";try{if(window.DOMParser){var d=new DOMParser;r=d.parseFromString(e,"text/xml")}else r=new ActiveXObject("Microsoft.XMLDOM"),r.loadXML(e)}catch{r=null}return!r||!r.documentElement||r.getElementsByTagName("parsererror").length?null:r};s.exports=y},35846:s=>{/** + */var x=function(e){var r="";try{if(window.DOMParser){var d=new DOMParser;r=d.parseFromString(e,"text/xml")}else r=new ActiveXObject("Microsoft.XMLDOM"),r.loadXML(e)}catch{r=null}return!r||!r.documentElement||r.getElementsByTagName("parsererror").length?null:r};s.exports=x},35846:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){e.parentNode&&e.parentNode.removeChild(e)};s.exports=y},43092:(s,y,e)=>{/** + */var x=function(e){e.parentNode&&e.parentNode.removeChild(e)};s.exports=x},43092:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(29747),h=new r({initialize:function(){this.isRunning=!1,this.callback=d,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var l=this;this.step=function n(u){l.callback(u),l.isRunning&&(l.timeOutID=window.requestAnimationFrame(n))},this.stepTimeout=function n(){l.isRunning&&(l.timeOutID=window.setTimeout(n,l.delay)),l.callback(window.performance.now())}},start:function(a,l,n){this.isRunning||(this.callback=a,this.isSetTimeOut=l,this.delay=n,this.isRunning=!0,this.timeOutID=l?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=d}});s.exports=h},84902:(s,y,e)=>{/** + */var r=e(83419),d=e(29747),h=new r({initialize:function(){this.isRunning=!1,this.callback=d,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var l=this;this.step=function n(u){l.callback(u),l.isRunning&&(l.timeOutID=window.requestAnimationFrame(n))},this.stepTimeout=function n(){l.isRunning&&(l.timeOutID=window.setTimeout(n,l.delay)),l.callback(window.performance.now())}},start:function(a,l,n){this.isRunning||(this.callback=a,this.isSetTimeOut=l,this.delay=n,this.isRunning=!0,this.timeOutID=l?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=d}});s.exports=h},84902:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r={AddToDOM:e(40366),DOMContentLoaded:e(57264),GetInnerHeight:e(57811),GetScreenOrientation:e(45818),GetTarget:e(74403),ParseXML:e(56836),RemoveFromDOM:e(35846),RequestAnimationFrame:e(43092)};s.exports=r},47565:(s,y,e)=>{/** + */var r={AddToDOM:e(40366),DOMContentLoaded:e(57264),GetInnerHeight:e(57811),GetScreenOrientation:e(45818),GetTarget:e(74403),ParseXML:e(56836),RemoveFromDOM:e(35846),RequestAnimationFrame:e(43092)};s.exports=r},47565:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(50792),h=e(37277),a=new r({Extends:d,initialize:function(){d.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});h.register("EventEmitter",a,"events"),s.exports=a},93055:(s,y,e)=>{/** + */var r=e(83419),d=e(50792),h=e(37277),a=new r({Extends:d,initialize:function(){d.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});h.register("EventEmitter",a,"events"),s.exports=a},93055:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={EventEmitter:e(47565)}},20122:(s,y,e)=>{/** + */s.exports={EventEmitter:e(47565)}},20122:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u){u===void 0&&(u=1),d.call(this,h.BARREL,n),this.amount=u}});s.exports=a},32251:(s,y,e)=>{/** + */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u){u===void 0&&(u=1),d.call(this,h.BARREL,n),this.amount=u}});s.exports=a},32251:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c,p,v){f===void 0&&(f=1),o===void 0&&(o=1),c===void 0&&(c=1),p===void 0&&(p=1),v===void 0&&(v=4),d.call(this,h.BLOOM,n),this.steps=v,this.offsetX=f,this.offsetY=o,this.blurStrength=c,this.strength=p,this.glcolor=[1,1,1],u!=null&&(this.color=u)},color:{get:function(){var l=this.glcolor;return(l[0]*255<<16)+(l[1]*255<<8)+(l[2]*255|0)},set:function(l){var n=this.glcolor;n[0]=(l>>16&255)/255,n[1]=(l>>8&255)/255,n[2]=(l&255)/255}}});s.exports=a},9047:(s,y,e)=>{/** + */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c,p,v){f===void 0&&(f=1),o===void 0&&(o=1),c===void 0&&(c=1),p===void 0&&(p=1),v===void 0&&(v=4),d.call(this,h.BLOOM,n),this.steps=v,this.offsetX=f,this.offsetY=o,this.blurStrength=c,this.strength=p,this.glcolor=[1,1,1],u!=null&&(this.color=u)},color:{get:function(){var l=this.glcolor;return(l[0]*255<<16)+(l[1]*255<<8)+(l[2]*255|0)},set:function(l){var n=this.glcolor;n[0]=(l>>16&255)/255,n[1]=(l>>8&255)/255,n[2]=(l&255)/255}}});s.exports=a},9047:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c,p,v){u===void 0&&(u=0),f===void 0&&(f=2),o===void 0&&(o=2),c===void 0&&(c=1),v===void 0&&(v=4),d.call(this,h.BLUR,n),this.quality=u,this.x=f,this.y=o,this.steps=v,this.strength=c,this.glcolor=[1,1,1],p!=null&&(this.color=p)},color:{get:function(){var l=this.glcolor;return(l[0]*255<<16)+(l[1]*255<<8)+(l[2]*255|0)},set:function(l){var n=this.glcolor;n[0]=(l>>16&255)/255,n[1]=(l>>8&255)/255,n[2]=(l&255)/255}}});s.exports=a},27885:(s,y,e)=>{/** + */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c,p,v){u===void 0&&(u=0),f===void 0&&(f=2),o===void 0&&(o=2),c===void 0&&(c=1),v===void 0&&(v=4),d.call(this,h.BLUR,n),this.quality=u,this.x=f,this.y=o,this.steps=v,this.strength=c,this.glcolor=[1,1,1],p!=null&&(this.color=p)},color:{get:function(){var l=this.glcolor;return(l[0]*255<<16)+(l[1]*255<<8)+(l[2]*255|0)},set:function(l){var n=this.glcolor;n[0]=(l>>16&255)/255,n[1]=(l>>8&255)/255,n[2]=(l&255)/255}}});s.exports=a},27885:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c,p,v,m){u===void 0&&(u=.5),f===void 0&&(f=1),o===void 0&&(o=.2),c===void 0&&(c=!1),p===void 0&&(p=1),v===void 0&&(v=1),m===void 0&&(m=1),d.call(this,h.BOKEH,n),this.radius=u,this.amount=f,this.contrast=o,this.isTiltShift=c,this.strength=m,this.blurX=p,this.blurY=v}});s.exports=a},12578:(s,y,e)=>{/** + */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c,p,v,m){u===void 0&&(u=.5),f===void 0&&(f=1),o===void 0&&(o=.2),c===void 0&&(c=!1),p===void 0&&(p=1),v===void 0&&(v=1),m===void 0&&(m=1),d.call(this,h.BOKEH,n),this.radius=u,this.amount=f,this.contrast=o,this.isTiltShift=c,this.strength=m,this.blurX=p,this.blurY=v}});s.exports=a},12578:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c,p){u===void 0&&(u=8),c===void 0&&(c=1),p===void 0&&(p=.005),d.call(this,h.CIRCLE,n),this.scale=c,this.feather=p,this.thickness=u,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],f!=null&&(this.color=f),o!=null&&(this.backgroundColor=o)},color:{get:function(){var l=this.glcolor;return(l[0]*255<<16)+(l[1]*255<<8)+(l[2]*255|0)},set:function(l){var n=this.glcolor;n[0]=(l>>16&255)/255,n[1]=(l>>8&255)/255,n[2]=(l&255)/255}},backgroundColor:{get:function(){var l=this.glcolor2;return(l[0]*255<<16)+(l[1]*255<<8)+(l[2]*255|0)},set:function(l){var n=this.glcolor2;n[0]=(l>>16&255)/255,n[1]=(l>>8&255)/255,n[2]=(l&255)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(l){this.glcolor2[3]=l}}});s.exports=a},15802:(s,y,e)=>{/** + */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c,p){u===void 0&&(u=8),c===void 0&&(c=1),p===void 0&&(p=.005),d.call(this,h.CIRCLE,n),this.scale=c,this.feather=p,this.thickness=u,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],f!=null&&(this.color=f),o!=null&&(this.backgroundColor=o)},color:{get:function(){var l=this.glcolor;return(l[0]*255<<16)+(l[1]*255<<8)+(l[2]*255|0)},set:function(l){var n=this.glcolor;n[0]=(l>>16&255)/255,n[1]=(l>>8&255)/255,n[2]=(l&255)/255}},backgroundColor:{get:function(){var l=this.glcolor2;return(l[0]*255<<16)+(l[1]*255<<8)+(l[2]*255|0)},set:function(l){var n=this.glcolor2;n[0]=(l>>16&255)/255,n[1]=(l>>8&255)/255,n[2]=(l&255)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(l){this.glcolor2[3]=l}}});s.exports=a},15802:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(89422),h=e(14811),a=new r({Extends:d,initialize:function(n){d.call(this),this.type=h.COLOR_MATRIX,this.gameObject=n,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});s.exports=a},72898:(s,y,e)=>{/** + */var r=e(83419),d=e(89422),h=e(14811),a=new r({Extends:d,initialize:function(n){d.call(this),this.type=h.COLOR_MATRIX,this.gameObject=n,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});s.exports=a},72898:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a,l){this.type=a,this.gameObject=l,this.active=!0},setActive:function(h){return this.active=h,this},destroy:function(){this.gameObject=null,this.active=!1}});s.exports=d},44553:(s,y,e)=>{/** + */var r=e(83419),d=new r({initialize:function(a,l){this.type=a,this.gameObject=l,this.active=!0},setActive:function(h){return this.active=h,this},destroy:function(){this.gameObject=null,this.active=!1}});s.exports=d},44553:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o){u===void 0&&(u="__WHITE"),f===void 0&&(f=.005),o===void 0&&(o=.005),d.call(this,h.DISPLACEMENT,n),this.x=f,this.y=o,this.glTexture,this.setTexture(u)},setTexture:function(l){var n=this.gameObject.scene.sys.textures.getFrame(l);return n&&(this.glTexture=n.glTexture),this}});s.exports=a},68531:(s,y,e)=>{/** + */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o){u===void 0&&(u="__WHITE"),f===void 0&&(f=.005),o===void 0&&(o=.005),d.call(this,h.DISPLACEMENT,n),this.x=f,this.y=o,this.glTexture,this.setTexture(u)},setTexture:function(l){var n=this.gameObject.scene.sys.textures.getFrame(l);return n&&(this.glTexture=n.glTexture),this}});s.exports=a},68531:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c){f===void 0&&(f=4),o===void 0&&(o=0),c===void 0&&(c=!1),d.call(this,h.GLOW,n),this.outerStrength=f,this.innerStrength=o,this.knockout=c,this.glcolor=[1,1,1,1],u!==void 0&&(this.color=u)},color:{get:function(){var l=this.glcolor;return(l[0]*255<<16)+(l[1]*255<<8)+(l[2]*255|0)},set:function(l){var n=this.glcolor;n[0]=(l>>16&255)/255,n[1]=(l>>8&255)/255,n[2]=(l&255)/255}}});s.exports=a},37102:(s,y,e)=>{/** + */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c){f===void 0&&(f=4),o===void 0&&(o=0),c===void 0&&(c=!1),d.call(this,h.GLOW,n),this.outerStrength=f,this.innerStrength=o,this.knockout=c,this.glcolor=[1,1,1,1],u!==void 0&&(this.color=u)},color:{get:function(){var l=this.glcolor;return(l[0]*255<<16)+(l[1]*255<<8)+(l[2]*255|0)},set:function(l){var n=this.glcolor;n[0]=(l>>16&255)/255,n[1]=(l>>8&255)/255,n[2]=(l&255)/255}}});s.exports=a},37102:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c,p,v,m,S){o===void 0&&(o=.2),c===void 0&&(c=0),p===void 0&&(p=0),v===void 0&&(v=0),m===void 0&&(m=1),S===void 0&&(S=0),d.call(this,h.GRADIENT,n),this.alpha=o,this.size=S,this.fromX=c,this.fromY=p,this.toX=v,this.toY=m,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],u!=null&&(this.color1=u),f!=null&&(this.color2=f)},color1:{get:function(){var l=this.glcolor1;return(l[0]<<16)+(l[1]<<8)+(l[2]|0)},set:function(l){var n=this.glcolor1;n[0]=l>>16&255,n[1]=l>>8&255,n[2]=l&255}},color2:{get:function(){var l=this.glcolor2;return(l[0]<<16)+(l[1]<<8)+(l[2]|0)},set:function(l){var n=this.glcolor2;n[0]=l>>16&255,n[1]=l>>8&255,n[2]=l&255}}});s.exports=a},86886:(s,y,e)=>{/** + */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c,p,v,m,S){o===void 0&&(o=.2),c===void 0&&(c=0),p===void 0&&(p=0),v===void 0&&(v=0),m===void 0&&(m=1),S===void 0&&(S=0),d.call(this,h.GRADIENT,n),this.alpha=o,this.size=S,this.fromX=c,this.fromY=p,this.toX=v,this.toY=m,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],u!=null&&(this.color1=u),f!=null&&(this.color2=f)},color1:{get:function(){var l=this.glcolor1;return(l[0]<<16)+(l[1]<<8)+(l[2]|0)},set:function(l){var n=this.glcolor1;n[0]=l>>16&255,n[1]=l>>8&255,n[2]=l&255}},color2:{get:function(){var l=this.glcolor2;return(l[0]<<16)+(l[1]<<8)+(l[2]|0)},set:function(l){var n=this.glcolor2;n[0]=l>>16&255,n[1]=l>>8&255,n[2]=l&255}}});s.exports=a},86886:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u){u===void 0&&(u=1),d.call(this,h.PIXELATE,n),this.amount=u}});s.exports=a},92322:(s,y,e)=>{/** + */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u){u===void 0&&(u=1),d.call(this,h.PIXELATE,n),this.amount=u}});s.exports=a},92322:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c,p,v,m){u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o=.1),c===void 0&&(c=1),v===void 0&&(v=6),m===void 0&&(m=1),d.call(this,h.SHADOW,n),this.x=u,this.y=f,this.decay=o,this.power=c,this.glcolor=[0,0,0,1],this.samples=v,this.intensity=m,p!==void 0&&(this.color=p)},color:{get:function(){var l=this.glcolor;return(l[0]*255<<16)+(l[1]*255<<8)+(l[2]*255|0)},set:function(l){var n=this.glcolor;n[0]=(l>>16&255)/255,n[1]=(l>>8&255)/255,n[2]=(l&255)/255}}});s.exports=a},39563:(s,y,e)=>{/** + */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c,p,v,m){u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o=.1),c===void 0&&(c=1),v===void 0&&(v=6),m===void 0&&(m=1),d.call(this,h.SHADOW,n),this.x=u,this.y=f,this.decay=o,this.power=c,this.glcolor=[0,0,0,1],this.samples=v,this.intensity=m,p!==void 0&&(this.color=p)},color:{get:function(){var l=this.glcolor;return(l[0]*255<<16)+(l[1]*255<<8)+(l[2]*255|0)},set:function(l){var n=this.glcolor;n[0]=(l>>16&255)/255,n[1]=(l>>8&255)/255,n[2]=(l&255)/255}}});s.exports=a},39563:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c){u===void 0&&(u=.5),f===void 0&&(f=.5),o===void 0&&(o=3),c===void 0&&(c=!1),d.call(this,h.SHINE,n),this.speed=u,this.lineWidth=f,this.gradient=o,this.reveal=c}});s.exports=a},56448:(s,y,e)=>{/** + */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c){u===void 0&&(u=.5),f===void 0&&(f=.5),o===void 0&&(o=3),c===void 0&&(c=!1),d.call(this,h.SHINE,n),this.speed=u,this.lineWidth=f,this.gradient=o,this.reveal=c}});s.exports=a},56448:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c){u===void 0&&(u=.5),f===void 0&&(f=.5),o===void 0&&(o=.5),c===void 0&&(c=.5),d.call(this,h.VIGNETTE,n),this.x=u,this.y=f,this.radius=o,this.strength=c}});s.exports=a},38433:(s,y,e)=>{/** + */var r=e(83419),d=e(72898),h=e(14811),a=new r({Extends:d,initialize:function(n,u,f,o,c){u===void 0&&(u=.5),f===void 0&&(f=.5),o===void 0&&(o=.5),c===void 0&&(c=.5),d.call(this,h.VIGNETTE,n),this.x=u,this.y=f,this.radius=o,this.strength=c}});s.exports=a},38433:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1127,39 +1127,39 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19};s.exports=y},66064:(s,y,e)=>{/** + */var x={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19};s.exports=x},66064:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(79291),d=e(14811),h={Barrel:e(20122),Controller:e(72898),Bloom:e(32251),Blur:e(9047),Bokeh:e(27885),Circle:e(12578),ColorMatrix:e(15802),Displacement:e(44553),Glow:e(68531),Gradient:e(37102),Pixelate:e(86886),Shadow:e(92322),Shine:e(39563),Vignette:e(56448),Wipe:e(38433)};h=r(!1,h,d),s.exports=h},25305:(s,y,e)=>{/** + */var r=e(79291),d=e(14811),h={Barrel:e(20122),Controller:e(72898),Bloom:e(32251),Blur:e(9047),Bokeh:e(27885),Circle:e(12578),ColorMatrix:e(15802),Displacement:e(44553),Glow:e(68531),Gradient:e(37102),Pixelate:e(86886),Shadow:e(92322),Shine:e(39563),Vignette:e(56448),Wipe:e(38433)};h=r(!1,h,d),s.exports=h},25305:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(10312),d=e(23568),h=function(a,l,n){l.x=d(n,"x",0),l.y=d(n,"y",0),l.depth=d(n,"depth",0),l.flipX=d(n,"flipX",!1),l.flipY=d(n,"flipY",!1);var u=d(n,"scale",null);typeof u=="number"?l.setScale(u):u!==null&&(l.scaleX=d(u,"x",1),l.scaleY=d(u,"y",1));var f=d(n,"scrollFactor",null);typeof f=="number"?l.setScrollFactor(f):f!==null&&(l.scrollFactorX=d(f,"x",1),l.scrollFactorY=d(f,"y",1)),l.rotation=d(n,"rotation",0);var o=d(n,"angle",null);o!==null&&(l.angle=o),l.alpha=d(n,"alpha",1);var c=d(n,"origin",null);if(typeof c=="number")l.setOrigin(c);else if(c!==null){var p=d(c,"x",.5),v=d(c,"y",.5);l.setOrigin(p,v)}l.blendMode=d(n,"blendMode",r.NORMAL),l.visible=d(n,"visible",!0);var m=d(n,"add",!0);return m&&a.sys.displayList.add(l),l.preUpdate&&a.sys.updateList.add(l),l};s.exports=h},13059:(s,y,e)=>{/** + */var r=e(10312),d=e(23568),h=function(a,l,n){l.x=d(n,"x",0),l.y=d(n,"y",0),l.depth=d(n,"depth",0),l.flipX=d(n,"flipX",!1),l.flipY=d(n,"flipY",!1);var u=d(n,"scale",null);typeof u=="number"?l.setScale(u):u!==null&&(l.scaleX=d(u,"x",1),l.scaleY=d(u,"y",1));var f=d(n,"scrollFactor",null);typeof f=="number"?l.setScrollFactor(f):f!==null&&(l.scrollFactorX=d(f,"x",1),l.scrollFactorY=d(f,"y",1)),l.rotation=d(n,"rotation",0);var o=d(n,"angle",null);o!==null&&(l.angle=o),l.alpha=d(n,"alpha",1);var c=d(n,"origin",null);if(typeof c=="number")l.setOrigin(c);else if(c!==null){var p=d(c,"x",.5),v=d(c,"y",.5);l.setOrigin(p,v)}l.blendMode=d(n,"blendMode",r.NORMAL),l.visible=d(n,"visible",!0);var m=d(n,"add",!0);return m&&a.sys.displayList.add(l),l.preUpdate&&a.sys.updateList.add(l),l};s.exports=h},13059:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(23568),d=function(h,a){var l=r(a,"anims",null);if(l===null)return h;if(typeof l=="string")h.anims.play(l);else if(typeof l=="object"){var n=h.anims,u=r(l,"key",void 0);if(u){var f=r(l,"startFrame",void 0),o=r(l,"delay",0),c=r(l,"repeat",0),p=r(l,"repeatDelay",0),v=r(l,"yoyo",!1),m=r(l,"play",!1),S=r(l,"delayedPlay",0),M={key:u,delay:o,repeat:c,repeatDelay:p,yoyo:v,startFrame:f};m?n.play(M):S>0?n.playAfterDelay(M,S):n.load(M)}}return h};s.exports=d},8050:(s,y,e)=>{/** + */var r=e(23568),d=function(h,a){var l=r(a,"anims",null);if(l===null)return h;if(typeof l=="string")h.anims.play(l);else if(typeof l=="object"){var n=h.anims,u=r(l,"key",void 0);if(u){var f=r(l,"startFrame",void 0),o=r(l,"delay",0),c=r(l,"repeat",0),p=r(l,"repeatDelay",0),v=r(l,"yoyo",!1),m=r(l,"play",!1),S=r(l,"delayedPlay",0),M={key:u,delay:o,repeat:c,repeatDelay:p,yoyo:v,startFrame:f};m?n.play(M):S>0?n.playAfterDelay(M,S):n.load(M)}}return h};s.exports=d},8050:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(73162),h=e(37277),a=e(51708),l=e(44594),n=e(19186),u=new r({Extends:d,initialize:function(o){d.call(this,o),this.sortChildrenFlag=!1,this.scene=o,this.systems=o.sys,this.events=o.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(l.BOOT,this.boot,this),this.events.on(l.START,this.start,this)},boot:function(){this.events.once(l.DESTROY,this.destroy,this)},addChildCallback:function(f){f.displayList&&f.displayList!==this&&f.removeFromDisplayList(),f.parentContainer&&f.parentContainer.remove(f),f.displayList||(this.queueDepthSort(),f.displayList=this,f.emit(a.ADDED_TO_SCENE,f,this.scene),this.events.emit(l.ADDED_TO_SCENE,f,this.scene))},removeChildCallback:function(f){this.queueDepthSort(),f.displayList=null,f.emit(a.REMOVED_FROM_SCENE,f,this.scene),this.events.emit(l.REMOVED_FROM_SCENE,f,this.scene)},start:function(){this.events.once(l.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(n(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(f,o){return f._depth-o._depth},getChildren:function(){return this.list},shutdown:function(){for(var f=this.list;f.length;)f[0].destroy(!0);this.events.off(l.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(l.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});h.register("DisplayList",u,"displayList"),s.exports=u},95643:(s,y,e)=>{/** + */var r=e(83419),d=e(73162),h=e(37277),a=e(51708),l=e(44594),n=e(19186),u=new r({Extends:d,initialize:function(o){d.call(this,o),this.sortChildrenFlag=!1,this.scene=o,this.systems=o.sys,this.events=o.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(l.BOOT,this.boot,this),this.events.on(l.START,this.start,this)},boot:function(){this.events.once(l.DESTROY,this.destroy,this)},addChildCallback:function(f){f.displayList&&f.displayList!==this&&f.removeFromDisplayList(),f.parentContainer&&f.parentContainer.remove(f),f.displayList||(this.queueDepthSort(),f.displayList=this,f.emit(a.ADDED_TO_SCENE,f,this.scene),this.events.emit(l.ADDED_TO_SCENE,f,this.scene))},removeChildCallback:function(f){this.queueDepthSort(),f.displayList=null,f.emit(a.REMOVED_FROM_SCENE,f,this.scene),this.events.emit(l.REMOVED_FROM_SCENE,f,this.scene)},start:function(){this.events.once(l.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(n(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(f,o){return f._depth-o._depth},getChildren:function(){return this.list},shutdown:function(){for(var f=this.list;f.length;)f[0].destroy(!0);this.events.off(l.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(l.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});h.register("DisplayList",u,"displayList"),s.exports=u},95643:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(53774),h=e(45893),a=e(50792),l=e(51708),n=e(44594),u=new r({Extends:a,initialize:function(o,c){a.call(this),this.scene=o,this.displayList=null,this.type=c,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(l.ADDED_TO_SCENE,this.addedToScene,this),this.on(l.REMOVED_FROM_SCENE,this.removedFromScene,this),o.sys.queueDepthSort()},setActive:function(f){return this.active=f,this},setName:function(f){return this.name=f,this},setState:function(f){return this.state=f,this},setDataEnabled:function(){return this.data||(this.data=new h(this)),this},setData:function(f,o){return this.data||(this.data=new h(this)),this.data.set(f,o),this},incData:function(f,o){return this.data||(this.data=new h(this)),this.data.inc(f,o),this},toggleData:function(f){return this.data||(this.data=new h(this)),this.data.toggle(f),this},getData:function(f){return this.data||(this.data=new h(this)),this.data.get(f)},setInteractive:function(f,o,c){return this.scene.sys.input.enable(this,f,o,c),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return d(this)},willRender:function(f){var o=this.displayList&&this.displayList.active?this.displayList.willRender(f):!0;return!(!o||u.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&f.id)},getIndexList:function(){for(var f=this,o=this.parentContainer,c=[];o&&(c.unshift(o.getIndex(f)),f=o,o.parentContainer);)o=o.parentContainer;return this.displayList?c.unshift(this.displayList.getIndex(f)):c.unshift(this.scene.sys.displayList.getIndex(f)),c},addToDisplayList:function(f){return f===void 0&&(f=this.scene.sys.displayList),this.displayList&&this.displayList!==f&&this.removeFromDisplayList(),f.exists(this)||(this.displayList=f,f.add(this,!0),f.queueDepthSort(),this.emit(l.ADDED_TO_SCENE,this,this.scene),f.events.emit(n.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var f=this.displayList||this.scene.sys.displayList;return f&&f.exists(this)&&(f.remove(this,!0),f.queueDepthSort(),this.displayList=null,this.emit(l.REMOVED_FROM_SCENE,this,this.scene),f.events.emit(n.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(f){!this.scene||this.ignoreDestroy||(f===void 0&&(f=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(l.DESTROY,this,f),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});u.RENDER_MASK=15,s.exports=u},44603:(s,y,e)=>{/** + */var r=e(83419),d=e(53774),h=e(45893),a=e(50792),l=e(51708),n=e(44594),u=new r({Extends:a,initialize:function(o,c){a.call(this),this.scene=o,this.displayList=null,this.type=c,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(l.ADDED_TO_SCENE,this.addedToScene,this),this.on(l.REMOVED_FROM_SCENE,this.removedFromScene,this),o.sys.queueDepthSort()},setActive:function(f){return this.active=f,this},setName:function(f){return this.name=f,this},setState:function(f){return this.state=f,this},setDataEnabled:function(){return this.data||(this.data=new h(this)),this},setData:function(f,o){return this.data||(this.data=new h(this)),this.data.set(f,o),this},incData:function(f,o){return this.data||(this.data=new h(this)),this.data.inc(f,o),this},toggleData:function(f){return this.data||(this.data=new h(this)),this.data.toggle(f),this},getData:function(f){return this.data||(this.data=new h(this)),this.data.get(f)},setInteractive:function(f,o,c){return this.scene.sys.input.enable(this,f,o,c),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return d(this)},willRender:function(f){var o=this.displayList&&this.displayList.active?this.displayList.willRender(f):!0;return!(!o||u.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&f.id)},getIndexList:function(){for(var f=this,o=this.parentContainer,c=[];o&&(c.unshift(o.getIndex(f)),f=o,o.parentContainer);)o=o.parentContainer;return this.displayList?c.unshift(this.displayList.getIndex(f)):c.unshift(this.scene.sys.displayList.getIndex(f)),c},addToDisplayList:function(f){return f===void 0&&(f=this.scene.sys.displayList),this.displayList&&this.displayList!==f&&this.removeFromDisplayList(),f.exists(this)||(this.displayList=f,f.add(this,!0),f.queueDepthSort(),this.emit(l.ADDED_TO_SCENE,this,this.scene),f.events.emit(n.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var f=this.displayList||this.scene.sys.displayList;return f&&f.exists(this)&&(f.remove(this,!0),f.queueDepthSort(),this.displayList=null,this.emit(l.REMOVED_FROM_SCENE,this,this.scene),f.events.emit(n.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(f){!this.scene||this.ignoreDestroy||(f===void 0&&(f=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(l.DESTROY,this,f),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});u.RENDER_MASK=15,s.exports=u},44603:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(37277),h=e(44594),a=new r({initialize:function(n){this.scene=n,this.systems=n.sys,this.events=n.sys.events,this.displayList,this.updateList,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(l,n){a.prototype.hasOwnProperty(l)||(a.prototype[l]=n)},a.remove=function(l){a.prototype.hasOwnProperty(l)&&delete a.prototype[l]},d.register("GameObjectCreator",a,"make"),s.exports=a},39429:(s,y,e)=>{/** + */var r=e(83419),d=e(37277),h=e(44594),a=new r({initialize:function(n){this.scene=n,this.systems=n.sys,this.events=n.sys.events,this.displayList,this.updateList,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(l,n){a.prototype.hasOwnProperty(l)||(a.prototype[l]=n)},a.remove=function(l){a.prototype.hasOwnProperty(l)&&delete a.prototype[l]},d.register("GameObjectCreator",a,"make"),s.exports=a},39429:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(37277),h=e(44594),a=new r({initialize:function(n){this.scene=n,this.systems=n.sys,this.events=n.sys.events,this.displayList,this.updateList,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},existing:function(l){return(l.renderCanvas||l.renderWebGL)&&this.displayList.add(l),l.preUpdate&&this.updateList.add(l),l},shutdown:function(){this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(l,n){a.prototype.hasOwnProperty(l)||(a.prototype[l]=n)},a.remove=function(l){a.prototype.hasOwnProperty(l)&&delete a.prototype[l]},d.register("GameObjectFactory",a,"add"),s.exports=a},91296:(s,y,e)=>{/** + */var r=e(83419),d=e(37277),h=e(44594),a=new r({initialize:function(n){this.scene=n,this.systems=n.sys,this.events=n.sys.events,this.displayList,this.updateList,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},existing:function(l){return(l.renderCanvas||l.renderWebGL)&&this.displayList.add(l),l.preUpdate&&this.updateList.add(l),l},shutdown:function(){this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(l,n){a.prototype.hasOwnProperty(l)||(a.prototype[l]=n)},a.remove=function(l){a.prototype.hasOwnProperty(l)&&delete a.prototype[l]},d.register("GameObjectFactory",a,"add"),s.exports=a},91296:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(61340),d=new r,h=new r,a=new r,l={camera:d,sprite:h,calc:a},n=function(u,f,o){var c=d,p=h,v=a;return p.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY),c.copyFrom(f.matrix),o?(c.multiplyWithOffset(o,-f.scrollX*u.scrollFactorX,-f.scrollY*u.scrollFactorY),p.e=u.x,p.f=u.y):(p.e-=f.scrollX*u.scrollFactorX,p.f-=f.scrollY*u.scrollFactorY),c.multiply(p,v),l};s.exports=n},45027:(s,y,e)=>{/** + */var r=e(61340),d=new r,h=new r,a=new r,l={camera:d,sprite:h,calc:a},n=function(u,f,o){var c=d,p=h,v=a;return p.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY),c.copyFrom(f.matrix),o?(c.multiplyWithOffset(o,-f.scrollX*u.scrollFactorX,-f.scrollY*u.scrollFactorY),p.e=u.x,p.f=u.y):(p.e-=f.scrollX*u.scrollFactorX,p.f-=f.scrollY*u.scrollFactorY),c.multiply(p,v),l};s.exports=n},45027:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1167,24 +1167,24 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h,a,l,n,u,f,o,c,p,v,m,S){var M=d.x-r.displayOriginX+a,w=d.y-r.displayOriginY+l,C=M+d.w,A=w+d.h,P=n.getXRound(M,w,u),b=n.getYRound(M,w,u),O=n.getXRound(M,A,u),I=n.getYRound(M,A,u),D=n.getXRound(C,A,u),B=n.getYRound(C,A,u),G=n.getXRound(C,w,u),z=n.getYRound(C,w,u);e.batchQuad(r,P,b,O,I,D,B,G,z,h.u0,h.v0,h.u1,h.v1,f,o,c,p,v,m,S)};s.exports=y},53048:s=>{/** + */var x=function(e,r,d,h,a,l,n,u,f,o,c,p,v,m,S){var M=d.x-r.displayOriginX+a,w=d.y-r.displayOriginY+l,C=M+d.w,A=w+d.h,P=n.getXRound(M,w,u),b=n.getYRound(M,w,u),O=n.getXRound(M,A,u),I=n.getYRound(M,A,u),D=n.getXRound(C,A,u),B=n.getYRound(C,A,u),G=n.getXRound(C,w,u),z=n.getYRound(C,w,u);e.batchQuad(r,P,b,O,I,D,B,G,z,h.u0,h.v0,h.u1,h.v1,f,o,c,p,v,m,S)};s.exports=x},53048:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){if(d===void 0&&(d=!1),h===void 0)return h={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0},h;var a=e.text,l=a.length,n=e.maxWidth,u=e.wordWrapCharCode,f=Number.MAX_VALUE,o=Number.MAX_VALUE,c=0,p=0,v=e.fontData.chars,m=e.fontData.lineHeight,S=e.letterSpacing,M=e.lineSpacing,w=0,C=0,A=0,P=null,b=e._align,O=0,I=0,D=e.fontSize/e.fontData.size,B=D*e.scaleX,G=D*e.scaleY,z=null,X=0,j=[],Q=Number.MAX_VALUE,tt=0,Y=0,Z=0,U,H=[],$=[],_=null;if(n>0){for(U=0;Un||Vt>n?(rt.push(gt.i-1),gt.cr?(rt.push(gt.i+gt.word.length),ot=0,at=null):at=gt):gt.cr&&(rt.push(gt.i+gt.word.length),ot=0,at=null)}var dt=function(Oe,Be,Le){return Oe.substr(0,Be)+Le+Oe.substr(Be+1)};for(U=rt.length-1;U>=0;U--)a=dt(a,rt[U],` -`);h.wrappedText=a,l=a.length,H=[],_=null}var ut=0;for(U=0;Utt&&(tt=Z),ZO&&(f=O),o>I&&(o=I);var Dt=O+P.xAdvance,Ht=I+m;ctt&&(tt=Z),Z0)for(var re=0;re<$.length;re++){var le=$[re];if(b===1){var ge=(tt-j[le.line])/2;le.x+=ge,le.r+=ge}else if(b===2){var xe=tt-j[le.line];le.x+=xe,le.r+=xe}}var Pe=h.local,te=h.global,Ge=h.lines;return Pe.x=f*D,Pe.y=o*D,Pe.width=c*D,Pe.height=p*D,te.x=e.x-e._displayOriginX+f*B,te.y=e.y-e._displayOriginY+o*G,te.width=c*B,te.height=p*G,Ge.shortest=Q,Ge.longest=tt,Ge.lengths=j,r&&(Pe.x=Math.ceil(Pe.x),Pe.y=Math.ceil(Pe.y),Pe.width=Math.ceil(Pe.width),Pe.height=Math.ceil(Pe.height),te.x=Math.ceil(te.x),te.y=Math.ceil(te.y),te.width=Math.ceil(te.width),te.height=Math.ceil(te.height),Ge.shortest=Math.ceil(Q),Ge.longest=Math.ceil(tt)),d&&(e._displayOriginX=e.originX*Pe.width,e._displayOriginY=e.originY*Pe.height,te.x=e.x-e._displayOriginX*e.scaleX,te.y=e.y-e._displayOriginY*e.scaleY,r&&(te.x=Math.ceil(te.x),te.y=Math.ceil(te.y))),h.words=H,h.characters=$,h.lines.height=m,h.scale=D,h.scaleX=e.scaleX,h.scaleY=e.scaleY,h};s.exports=y},61327:(s,y,e)=>{/** + */var x=function(e,r,d,h){if(d===void 0&&(d=!1),h===void 0)return h={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0},h;var a=e.text,l=a.length,n=e.maxWidth,u=e.wordWrapCharCode,f=Number.MAX_VALUE,o=Number.MAX_VALUE,c=0,p=0,v=e.fontData.chars,m=e.fontData.lineHeight,S=e.letterSpacing,M=e.lineSpacing,w=0,C=0,A=0,P=null,b=e._align,O=0,I=0,D=e.fontSize/e.fontData.size,B=D*e.scaleX,G=D*e.scaleY,z=null,X=0,j=[],Q=Number.MAX_VALUE,tt=0,Y=0,$=0,U,H=[],Z=[],_=null;if(n>0){for(U=0;Un||Vt>n?(rt.push(gt.i-1),gt.cr?(rt.push(gt.i+gt.word.length),ot=0,at=null):at=gt):gt.cr&&(rt.push(gt.i+gt.word.length),ot=0,at=null)}var dt=function(De,Ue,Le){return De.substr(0,Ue)+Le+De.substr(Ue+1)};for(U=rt.length-1;U>=0;U--)a=dt(a,rt[U],` +`);h.wrappedText=a,l=a.length,H=[],_=null}var ut=0;for(U=0;Utt&&(tt=$),$O&&(f=O),o>I&&(o=I);var Dt=O+P.xAdvance,Ht=I+m;ctt&&(tt=$),$0)for(var re=0;re{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(21859),d=function(h,a,l,n,u,f,o){var c=h.sys.textures.get(l),p=c.get(n),v=h.sys.cache.xml.get(u);if(p&&v){var m=r(v,p,f,o,c);return h.sys.cache.bitmapFont.add(a,{data:m,texture:l,frame:n,fromAtlas:!0}),!0}else return!1};s.exports=d},6925:(s,y,e)=>{/** + */var r=e(21859),d=function(h,a,l,n,u,f,o){var c=h.sys.textures.get(l),p=c.get(n),v=h.sys.cache.xml.get(u);if(p&&v){var m=r(v,p,f,o,c);return h.sys.cache.bitmapFont.add(a,{data:m,texture:l,frame:n,fromAtlas:!0}),!0}else return!1};s.exports=d},6925:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(35154),d=function(h,a){var l=a.width,n=a.height,u=Math.floor(l/2),f=Math.floor(n/2),o=r(a,"chars","");if(o!==""){var c=r(a,"image",""),p=h.sys.textures.getFrame(c),v=p.cutX,m=p.cutY,S=p.source.width,M=p.source.height,w=r(a,"offset.x",0),C=r(a,"offset.y",0),A=r(a,"spacing.x",0),P=r(a,"spacing.y",0),b=r(a,"lineSpacing",0),O=r(a,"charsPerRow",null);O===null&&(O=S/l,O>o.length&&(O=o.length));for(var I=w,D=C,B={retroFont:!0,font:c,size:l,lineHeight:n+b,chars:{}},G=0,z=0;z{/** + */var r=e(35154),d=function(h,a){var l=a.width,n=a.height,u=Math.floor(l/2),f=Math.floor(n/2),o=r(a,"chars","");if(o!==""){var c=r(a,"image",""),p=h.sys.textures.getFrame(c),v=p.cutX,m=p.cutY,S=p.source.width,M=p.source.height,w=r(a,"offset.x",0),C=r(a,"offset.y",0),A=r(a,"spacing.x",0),P=r(a,"spacing.y",0),b=r(a,"lineSpacing",0),O=r(a,"charsPerRow",null);O===null&&(O=S/l,O>o.length&&(O=o.length));for(var I=w,D=C,B={retroFont:!0,font:c,size:l,lineHeight:n+b,chars:{}},G=0,z=0;z{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function y(r,d){return parseInt(r.getAttribute(d),10)}var e=function(r,d,h,a,l){h===void 0&&(h=0),a===void 0&&(a=0);var n=d.cutX,u=d.cutY,f=d.source.width,o=d.source.height,c=d.sourceIndex,p={},v=r.getElementsByTagName("info")[0],m=r.getElementsByTagName("common")[0];p.font=v.getAttribute("face"),p.size=y(v,"size"),p.lineHeight=y(m,"lineHeight")+a,p.chars={};var S=r.getElementsByTagName("char"),M=d!==void 0&&d.trimmed;if(M)var w=d.height,C=d.width;for(var A=0;A{/** + */function x(r,d){return parseInt(r.getAttribute(d),10)}var e=function(r,d,h,a,l){h===void 0&&(h=0),a===void 0&&(a=0);var n=d.cutX,u=d.cutY,f=d.source.width,o=d.source.height,c=d.sourceIndex,p={},v=r.getElementsByTagName("info")[0],m=r.getElementsByTagName("common")[0];p.font=v.getAttribute("face"),p.size=x(v,"size"),p.lineHeight=x(m,"lineHeight")+a,p.chars={};var S=r.getElementsByTagName("char"),M=d!==void 0&&d.trimmed;if(M)var w=d.height,C=d.width;for(var A=0;A{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1192,56 +1192,56 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ`,TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:`ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' `,TEXT_SET7:`AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39`,TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:`ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!`,TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:`ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789`};s.exports=y},2638:(s,y,e)=>{/** + */var x={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ`,TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:`ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' `,TEXT_SET7:`AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39`,TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:`ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!`,TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:`ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789`};s.exports=x},2638:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(22186),d=e(83419),h=e(12310),a=new d({Extends:r,Mixins:[h],initialize:function(n,u,f,o,c,p,v){r.call(this,n,u,f,o,c,p,v),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(l,n){return this.cropWidth=l,this.cropHeight=n,this},setDisplayCallback:function(l){return this.displayCallback=l,this},setScrollX:function(l){return this.scrollX=l,this},setScrollY:function(l){return this.scrollY=l,this}});s.exports=a},86741:(s,y,e)=>{/** + */var r=e(22186),d=e(83419),h=e(12310),a=new d({Extends:r,Mixins:[h],initialize:function(n,u,f,o,c,p,v){r.call(this,n,u,f,o,c,p,v),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(l,n){return this.cropWidth=l,this.cropHeight=n,this},setDisplayCallback:function(l){return this.displayCallback=l,this},setScrollX:function(l){return this.scrollX=l,this},setScrollY:function(l){return this.scrollY=l,this}});s.exports=a},86741:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(20926),d=function(h,a,l,n){var u=a._text,f=u.length,o=h.currentContext;if(!(f===0||!r(h,o,a,l,n))){l.addToRenderList(a);var c=a.fromAtlas?a.frame:a.texture.frames.__BASE,p=a.displayCallback,v=a.callbackData,m=a.fontData.chars,S=a.fontData.lineHeight,M=a._letterSpacing,w=0,C=0,A=0,P=null,b=0,O=0,I=0,D=0,B=0,G=0,z=null,X=0,j=a.frame.source.image,Q=c.cutX,tt=c.cutY,Y=0,Z=0,U=a._fontSize/a.fontData.size,H=a._align,$=0,_=0;a.getTextBounds(!1);var q=a._bounds.lines;H===1?_=(q.longest-q.lengths[0])/2:H===2&&(_=q.longest-q.lengths[0]),o.translate(-a.displayOriginX,-a.displayOriginY);var at=l.roundPixels;a.cropWidth>0&&a.cropHeight>0&&(o.beginPath(),o.rect(0,0,a.cropWidth,a.cropHeight),o.clip());for(var ot=0;ot{/** + */var r=e(20926),d=function(h,a,l,n){var u=a._text,f=u.length,o=h.currentContext;if(!(f===0||!r(h,o,a,l,n))){l.addToRenderList(a);var c=a.fromAtlas?a.frame:a.texture.frames.__BASE,p=a.displayCallback,v=a.callbackData,m=a.fontData.chars,S=a.fontData.lineHeight,M=a._letterSpacing,w=0,C=0,A=0,P=null,b=0,O=0,I=0,D=0,B=0,G=0,z=null,X=0,j=a.frame.source.image,Q=c.cutX,tt=c.cutY,Y=0,$=0,U=a._fontSize/a.fontData.size,H=a._align,Z=0,_=0;a.getTextBounds(!1);var q=a._bounds.lines;H===1?_=(q.longest-q.lengths[0])/2:H===2&&(_=q.longest-q.lengths[0]),o.translate(-a.displayOriginX,-a.displayOriginY);var at=l.roundPixels;a.cropWidth>0&&a.cropHeight>0&&(o.beginPath(),o.rect(0,0,a.cropWidth,a.cropHeight),o.clip());for(var ot=0;ot{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2638),d=e(25305),h=e(44603),a=e(23568);h.register("dynamicBitmapText",function(l,n){l===void 0&&(l={});var u=a(l,"font",""),f=a(l,"text",""),o=a(l,"size",!1),c=new r(this.scene,0,0,u,f,o);return n!==void 0&&(l.add=n),d(this.scene,c,l),c})},72566:(s,y,e)=>{/** + */var r=e(2638),d=e(25305),h=e(44603),a=e(23568);h.register("dynamicBitmapText",function(l,n){l===void 0&&(l={});var u=a(l,"font",""),f=a(l,"text",""),o=a(l,"size",!1),c=new r(this.scene,0,0,u,f,o);return n!==void 0&&(l.add=n),d(this.scene,c,l),c})},72566:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2638),d=e(39429);d.register("dynamicBitmapText",function(h,a,l,n,u){return this.displayList.add(new r(this.scene,h,a,l,n,u))})},12310:(s,y,e)=>{/** + */var r=e(2638),d=e(39429);d.register("dynamicBitmapText",function(h,a,l,n,u){return this.displayList.add(new r(this.scene,h,a,l,n,u))})},12310:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(73482),h=e(86741),s.exports={renderWebGL:d,renderCanvas:h}},73482:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(73482),h=e(86741),s.exports={renderWebGL:d,renderCanvas:h}},73482:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91296),d=e(61340),h=e(70554),a=new d,l=function(n,u,f,o){var c=u.text,p=c.length;if(p!==0){f.addToRenderList(u);var v=n.pipelines.set(u.pipeline,u),m=r(u,f,o);n.pipelines.preBatch(u);var S=m.sprite,M=m.calc,w=a,C=u.cropWidth>0||u.cropHeight>0;C&&(v.flush(),n.pushScissor(M.tx,M.ty,u.cropWidth*M.scaleX,u.cropHeight*M.scaleY));var A=u.frame,P=A.glTexture,b=u.tintFill,O=h.getTintAppendFloatAlpha(u.tintTopLeft,f.alpha*u._alphaTL),I=h.getTintAppendFloatAlpha(u.tintTopRight,f.alpha*u._alphaTR),D=h.getTintAppendFloatAlpha(u.tintBottomLeft,f.alpha*u._alphaBL),B=h.getTintAppendFloatAlpha(u.tintBottomRight,f.alpha*u._alphaBR),G=v.setGameObject(u),z=0,X=0,j=0,Q=0,tt=u.letterSpacing,Y,Z=0,U=0,H,$=u.scrollX,_=u.scrollY,q=u.fontData,at=q.chars,ot=q.lineHeight,rt=u.fontSize/q.size,gt=0,yt=u._align,Et=0,At=0,Pt=u.getTextBounds(!1);u.maxWidth>0&&(c=Pt.wrappedText,p=c.length);var Vt=u._bounds.lines;yt===1?At=(Vt.longest-Vt.lengths[0])/2:yt===2&&(At=Vt.longest-Vt.lengths[0]);for(var dt=f.roundPixels,ut=u.displayCallback,Rt=u.callbackData,Dt=0;Dt{/** + */var r=e(91296),d=e(61340),h=e(70554),a=new d,l=function(n,u,f,o){var c=u.text,p=c.length;if(p!==0){f.addToRenderList(u);var v=n.pipelines.set(u.pipeline,u),m=r(u,f,o);n.pipelines.preBatch(u);var S=m.sprite,M=m.calc,w=a,C=u.cropWidth>0||u.cropHeight>0;C&&(v.flush(),n.pushScissor(M.tx,M.ty,u.cropWidth*M.scaleX,u.cropHeight*M.scaleY));var A=u.frame,P=A.glTexture,b=u.tintFill,O=h.getTintAppendFloatAlpha(u.tintTopLeft,f.alpha*u._alphaTL),I=h.getTintAppendFloatAlpha(u.tintTopRight,f.alpha*u._alphaTR),D=h.getTintAppendFloatAlpha(u.tintBottomLeft,f.alpha*u._alphaBL),B=h.getTintAppendFloatAlpha(u.tintBottomRight,f.alpha*u._alphaBR),G=v.setGameObject(u),z=0,X=0,j=0,Q=0,tt=u.letterSpacing,Y,$=0,U=0,H,Z=u.scrollX,_=u.scrollY,q=u.fontData,at=q.chars,ot=q.lineHeight,rt=u.fontSize/q.size,gt=0,yt=u._align,Et=0,At=0,Pt=u.getTextBounds(!1);u.maxWidth>0&&(c=Pt.wrappedText,p=c.length);var Vt=u._bounds.lines;yt===1?At=(Vt.longest-Vt.lengths[0])/2:yt===2&&(At=Vt.longest-Vt.lengths[0]);for(var dt=f.roundPixels,ut=u.displayCallback,Rt=u.callbackData,Dt=0;Dt{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var r=e(83419),d=e(45319),h=e(31401),a=e(95643),l=e(53048),n=e(61327),u=e(21859),f=e(87841),o=e(18658),c=new r({Extends:a,Mixins:[h.Alpha,h.BlendMode,h.Depth,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.Texture,h.Tint,h.Transform,h.Visible,o],initialize:function(v,m,S,M,w,C,A){w===void 0&&(w=""),A===void 0&&(A=0),a.call(this,v,"BitmapText"),this.font=M;var P=this.scene.sys.cache.bitmapFont.get(M);P||console.warn("Invalid BitmapText key: "+M),this.fontData=P.data,this._text="",this._fontSize=C||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=A,this._bounds=l(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=P.fromAtlas,this.setTexture(P.texture,P.frame),this.setPosition(m,S),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(w)},setLeftAlign:function(){return this._align=c.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=c.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=c.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(p){return this._fontSize=p,this._dirty=!0,this},setLetterSpacing:function(p){return p===void 0&&(p=0),this._letterSpacing=p,this._dirty=!0,this},setLineSpacing:function(p){return p===void 0&&(p=0),this.lineSpacing=p,this},setText:function(p){return!p&&p!==0&&(p=""),Array.isArray(p)&&(p=p.join(` -`)),p!==this.text&&(this._text=p.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(p,v,m,S){return p===void 0&&(p=0),v===void 0&&(v=0),m===void 0&&(m=0),S===void 0&&(S=.5),this.dropShadowX=p,this.dropShadowY=v,this.dropShadowColor=m,this.dropShadowAlpha=S,this},setCharacterTint:function(p,v,m,S,M,w,C){p===void 0&&(p=0),v===void 0&&(v=1),m===void 0&&(m=!1),S===void 0&&(S=-1),M===void 0&&(M=S,w=S,C=S);var A=this.text.length;v===-1&&(v=A),p<0&&(p=A+p),p=d(p,0,A-1);for(var P=d(p+v,p,A),b=this.charColors,O=p;O{/** +`)),p!==this.text&&(this._text=p.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(p,v,m,S){return p===void 0&&(p=0),v===void 0&&(v=0),m===void 0&&(m=0),S===void 0&&(S=.5),this.dropShadowX=p,this.dropShadowY=v,this.dropShadowColor=m,this.dropShadowAlpha=S,this},setCharacterTint:function(p,v,m,S,M,w,C){p===void 0&&(p=0),v===void 0&&(v=1),m===void 0&&(m=!1),S===void 0&&(S=-1),M===void 0&&(M=S,w=S,C=S);var A=this.text.length;v===-1&&(v=A),p<0&&(p=A+p),p=d(p,0,A-1);for(var P=d(p+v,p,A),b=this.charColors,O=p;O{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(20926),d=function(h,a,l,n){var u=a._text,f=u.length,o=h.currentContext;if(!(f===0||!r(h,o,a,l,n))){l.addToRenderList(a);var c=a.fromAtlas?a.frame:a.texture.frames.__BASE,p=a.fontData.chars,v=a.fontData.lineHeight,m=a._letterSpacing,S=a._lineSpacing,M=0,w=0,C=0,A=null,P=0,b=0,O=0,I=0,D=0,B=0,G=null,z=0,X=c.source.image,j=c.cutX,Q=c.cutY,tt=a._fontSize/a.fontData.size,Y=a._align,Z=0,U=0,H=a.getTextBounds(!1);a.maxWidth>0&&(u=H.wrappedText,f=u.length);var $=a._bounds.lines;Y===1?U=($.longest-$.lengths[0])/2:Y===2&&(U=$.longest-$.lengths[0]),o.translate(-a.displayOriginX,-a.displayOriginY);for(var _=l.roundPixels,q=0;q{/** + */var r=e(20926),d=function(h,a,l,n){var u=a._text,f=u.length,o=h.currentContext;if(!(f===0||!r(h,o,a,l,n))){l.addToRenderList(a);var c=a.fromAtlas?a.frame:a.texture.frames.__BASE,p=a.fontData.chars,v=a.fontData.lineHeight,m=a._letterSpacing,S=a._lineSpacing,M=0,w=0,C=0,A=null,P=0,b=0,O=0,I=0,D=0,B=0,G=null,z=0,X=c.source.image,j=c.cutX,Q=c.cutY,tt=a._fontSize/a.fontData.size,Y=a._align,$=0,U=0,H=a.getTextBounds(!1);a.maxWidth>0&&(u=H.wrappedText,f=u.length);var Z=a._bounds.lines;Y===1?U=(Z.longest-Z.lengths[0])/2:Y===2&&(U=Z.longest-Z.lengths[0]),o.translate(-a.displayOriginX,-a.displayOriginY);for(var _=l.roundPixels,q=0;q{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(22186),d=e(25305),h=e(44603),a=e(23568),l=e(35154);h.register("bitmapText",function(n,u){n===void 0&&(n={});var f=l(n,"font",""),o=a(n,"text",""),c=a(n,"size",!1),p=l(n,"align",0),v=new r(this.scene,0,0,f,o,c,p);return u!==void 0&&(n.add=u),d(this.scene,v,n),v})},34914:(s,y,e)=>{/** + */var r=e(22186),d=e(25305),h=e(44603),a=e(23568),l=e(35154);h.register("bitmapText",function(n,u){n===void 0&&(n={});var f=l(n,"font",""),o=a(n,"text",""),c=a(n,"size",!1),p=l(n,"align",0),v=new r(this.scene,0,0,f,o,c,p);return u!==void 0&&(n.add=u),d(this.scene,v,n),v})},34914:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(22186),d=e(39429);d.register("bitmapText",function(h,a,l,n,u,f){return this.displayList.add(new r(this.scene,h,a,l,n,u,f))})},18658:(s,y,e)=>{/** + */var r=e(22186),d=e(39429);d.register("bitmapText",function(h,a,l,n,u,f){return this.displayList.add(new r(this.scene,h,a,l,n,u,f))})},18658:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(33590),h=e(37289),s.exports={renderWebGL:d,renderCanvas:h}},33590:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(33590),h=e(37289),s.exports={renderWebGL:d,renderCanvas:h}},33590:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(3217),d=e(91296),h=e(70554),a=function(l,n,u,f){var o=n._text,c=o.length;if(c!==0){u.addToRenderList(n);var p=l.pipelines.set(n.pipeline,n),v=d(n,u,f).calc;l.pipelines.preBatch(n);var m=u.roundPixels,S=u.alpha,M=n.charColors,w=n.tintFill,C=h.getTintAppendFloatAlpha,A=C(n.tintTopLeft,S*n._alphaTL),P=C(n.tintTopRight,S*n._alphaTR),b=C(n.tintBottomLeft,S*n._alphaBL),O=C(n.tintBottomRight,S*n._alphaBR),I=n.frame.glTexture,D=p.setGameObject(n),B=n.getTextBounds(!1),G,z,X,j=B.characters,Q=n.dropShadowX,tt=n.dropShadowY,Y=Q!==0||tt!==0;if(Y){var Z=n.dropShadowColor,U=n.dropShadowAlpha,H=C(Z,S*U*n._alphaTL),$=C(Z,S*U*n._alphaTR),_=C(Z,S*U*n._alphaBL),q=C(Z,S*U*n._alphaBR);for(G=0;G{/** + */var r=e(3217),d=e(91296),h=e(70554),a=function(l,n,u,f){var o=n._text,c=o.length;if(c!==0){u.addToRenderList(n);var p=l.pipelines.set(n.pipeline,n),v=d(n,u,f).calc;l.pipelines.preBatch(n);var m=u.roundPixels,S=u.alpha,M=n.charColors,w=n.tintFill,C=h.getTintAppendFloatAlpha,A=C(n.tintTopLeft,S*n._alphaTL),P=C(n.tintTopRight,S*n._alphaTR),b=C(n.tintBottomLeft,S*n._alphaBL),O=C(n.tintBottomRight,S*n._alphaBR),I=n.frame.glTexture,D=p.setGameObject(n),B=n.getTextBounds(!1),G,z,X,j=B.characters,Q=n.dropShadowX,tt=n.dropShadowY,Y=Q!==0||tt!==0;if(Y){var $=n.dropShadowColor,U=n.dropShadowAlpha,H=C($,S*U*n._alphaTL),Z=C($,S*U*n._alphaTR),_=C($,S*U*n._alphaBL),q=C($,S*U*n._alphaBR);for(G=0;G{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1249,35 +1249,35 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){var a=r.getRenderList();if(a.length!==0){var l=e.currentContext,n=d.alpha*r.alpha;if(n!==0){d.addToRenderList(r),l.globalCompositeOperation=e.blendModes[r.blendMode],l.imageSmoothingEnabled=!r.frame.source.scaleMode;var u=r.x-d.scrollX*r.scrollFactorX,f=r.y-d.scrollY*r.scrollFactorY;l.save(),h&&h.copyToContext(l);for(var o=d.roundPixels,c=0;c0&&S.height>0&&(l.save(),l.translate(p.x+u,p.y+f),l.scale(C,A),l.drawImage(m.source.image,S.x,S.y,S.width,S.height,M,w,S.width,S.height),l.restore())):(o&&(M=Math.round(M),w=Math.round(w)),S.width>0&&S.height>0&&l.drawImage(m.source.image,S.x,S.y,S.width,S.height,M+p.x+u,w+p.y+f,S.width,S.height)))}l.restore()}}};s.exports=y},9403:(s,y,e)=>{/** + */var x=function(e,r,d,h){var a=r.getRenderList();if(a.length!==0){var l=e.currentContext,n=d.alpha*r.alpha;if(n!==0){d.addToRenderList(r),l.globalCompositeOperation=e.blendModes[r.blendMode],l.imageSmoothingEnabled=!r.frame.source.scaleMode;var u=r.x-d.scrollX*r.scrollFactorX,f=r.y-d.scrollY*r.scrollFactorY;l.save(),h&&h.copyToContext(l);for(var o=d.roundPixels,c=0;c0&&S.height>0&&(l.save(),l.translate(p.x+u,p.y+f),l.scale(C,A),l.drawImage(m.source.image,S.x,S.y,S.width,S.height,M,w,S.width,S.height),l.restore())):(o&&(M=Math.round(M),w=Math.round(w)),S.width>0&&S.height>0&&l.drawImage(m.source.image,S.x,S.y,S.width,S.height,M+p.x+u,w+p.y+f,S.width,S.height)))}l.restore()}}};s.exports=x},9403:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(6107),d=e(25305),h=e(44603),a=e(23568);h.register("blitter",function(l,n){l===void 0&&(l={});var u=a(l,"key",null),f=a(l,"frame",null),o=new r(this.scene,0,0,u,f);return n!==void 0&&(l.add=n),d(this.scene,o,l),o})},12709:(s,y,e)=>{/** + */var r=e(6107),d=e(25305),h=e(44603),a=e(23568);h.register("blitter",function(l,n){l===void 0&&(l={});var u=a(l,"key",null),f=a(l,"frame",null),o=new r(this.scene,0,0,u,f);return n!==void 0&&(l.add=n),d(this.scene,o,l),o})},12709:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(6107),d=e(39429);d.register("blitter",function(h,a,l,n){return this.displayList.add(new r(this.scene,h,a,l,n))})},48011:(s,y,e)=>{/** + */var r=e(6107),d=e(39429);d.register("blitter",function(h,a,l,n){return this.displayList.add(new r(this.scene,h,a,l,n))})},48011:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(99485),h=e(72396),s.exports={renderWebGL:d,renderCanvas:h}},99485:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(99485),h=e(72396),s.exports={renderWebGL:d,renderCanvas:h}},99485:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(61340),d=e(70554),h=new r,a=function(l,n,u,f){var o=n.getRenderList(),c=u.alpha*n.alpha;if(!(o.length===0||c===0)){u.addToRenderList(n);var p=l.pipelines.set(this.pipeline,n),v=u.scrollX*n.scrollFactorX,m=u.scrollY*n.scrollFactorY,S=h.copyFrom(u.matrix);f&&(S.multiplyWithOffset(f,-v,-m),v=0,m=0);var M=n.x-v,w=n.y-m,C=-1,A=!1;l.pipelines.preBatch(n);for(var P=0;P{/** + */var r=e(61340),d=e(70554),h=new r,a=function(l,n,u,f){var o=n.getRenderList(),c=u.alpha*n.alpha;if(!(o.length===0||c===0)){u.addToRenderList(n);var p=l.pipelines.set(this.pipeline,n),v=u.scrollX*n.scrollFactorX,m=u.scrollY*n.scrollFactorY,S=h.copyFrom(u.matrix);f&&(S.multiplyWithOffset(f,-v,-m),v=0,m=0);var M=n.x-v,w=n.y-m,C=-1,A=!1;l.pipelines.preBatch(n);for(var P=0;P{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(4327),h=new r({initialize:function(l,n,u,f,o){this.parent=l,this.x=n,this.y=u,this.frame=f,this.data={},this.tint=16777215,this._visible=o,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(a){return a===void 0?this.frame=this.parent.frame:a instanceof d&&a.texture===this.parent.texture?this.frame=a:this.frame=this.parent.texture.get(a),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(a,l,n){return this.x=a,this.y=l,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,n&&this.setFrame(n),this},setPosition:function(a,l){return this.x=a,this.y=l,this},setFlipX:function(a){return this.flipX=a,this},setFlipY:function(a){return this.flipY=a,this},setFlip:function(a,l){return this.flipX=a,this.flipY=l,this},setVisible:function(a){return this.visible=a,this},setAlpha:function(a){return this.alpha=a,this},setTint:function(a){return this.tint=a,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(a){this.parent.dirty|=this._visible!==a,this._visible=a}},alpha:{get:function(){return this._alpha},set:function(a){this.parent.dirty|=this._alpha>0!=a>0,this._alpha=a}}});s.exports=h},16005:(s,y,e)=>{/** + */var r=e(83419),d=e(4327),h=new r({initialize:function(l,n,u,f,o){this.parent=l,this.x=n,this.y=u,this.frame=f,this.data={},this.tint=16777215,this._visible=o,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(a){return a===void 0?this.frame=this.parent.frame:a instanceof d&&a.texture===this.parent.texture?this.frame=a:this.frame=this.parent.texture.get(a),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(a,l,n){return this.x=a,this.y=l,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,n&&this.setFrame(n),this},setPosition:function(a,l){return this.x=a,this.y=l,this},setFlipX:function(a){return this.flipX=a,this},setFlipY:function(a){return this.flipY=a,this},setFlip:function(a,l){return this.flipX=a,this.flipY=l,this},setVisible:function(a){return this.visible=a,this},setAlpha:function(a){return this.alpha=a,this},setTint:function(a){return this.tint=a,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(a){this.parent.dirty|=this._visible!==a,this._visible=a}},alpha:{get:function(){return this._alpha},set:function(a){this.parent.dirty|=this._alpha>0!=a>0,this._alpha=a}}});s.exports=h},16005:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(45319),d=2,h={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(a,l,n,u){return a===void 0&&(a=1),l===void 0?this.alpha=a:(this._alphaTL=r(a,0,1),this._alphaTR=r(l,0,1),this._alphaBL=r(n,0,1),this._alphaBR=r(u,0,1)),this},alpha:{get:function(){return this._alpha},set:function(a){var l=r(a,0,1);this._alpha=l,this._alphaTL=l,this._alphaTR=l,this._alphaBL=l,this._alphaBR=l,l===0?this.renderFlags&=~d:this.renderFlags|=d}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(a){var l=r(a,0,1);this._alphaTL=l,l!==0&&(this.renderFlags|=d)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(a){var l=r(a,0,1);this._alphaTR=l,l!==0&&(this.renderFlags|=d)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(a){var l=r(a,0,1);this._alphaBL=l,l!==0&&(this.renderFlags|=d)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(a){var l=r(a,0,1);this._alphaBR=l,l!==0&&(this.renderFlags|=d)}}};s.exports=h},88509:(s,y,e)=>{/** + */var r=e(45319),d=2,h={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(a,l,n,u){return a===void 0&&(a=1),l===void 0?this.alpha=a:(this._alphaTL=r(a,0,1),this._alphaTR=r(l,0,1),this._alphaBL=r(n,0,1),this._alphaBR=r(u,0,1)),this},alpha:{get:function(){return this._alpha},set:function(a){var l=r(a,0,1);this._alpha=l,this._alphaTL=l,this._alphaTR=l,this._alphaBL=l,this._alphaBR=l,l===0?this.renderFlags&=~d:this.renderFlags|=d}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(a){var l=r(a,0,1);this._alphaTL=l,l!==0&&(this.renderFlags|=d)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(a){var l=r(a,0,1);this._alphaTR=l,l!==0&&(this.renderFlags|=d)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(a){var l=r(a,0,1);this._alphaBL=l,l!==0&&(this.renderFlags|=d)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(a){var l=r(a,0,1);this._alphaBR=l,l!==0&&(this.renderFlags|=d)}}};s.exports=h},88509:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(45319),d=2,h={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(a){return a===void 0&&(a=1),this.alpha=a,this},alpha:{get:function(){return this._alpha},set:function(a){var l=r(a,0,1);this._alpha=l,l===0?this.renderFlags&=~d:this.renderFlags|=d}}};s.exports=h},90065:(s,y,e)=>{/** + */var r=e(45319),d=2,h={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(a){return a===void 0&&(a=1),this.alpha=a,this},alpha:{get:function(){return this._alpha},set:function(a){var l=r(a,0,1);this._alpha=l,l===0?this.renderFlags&=~d:this.renderFlags|=d}}};s.exports=h},90065:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1285,15 +1285,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(e){this.scaleX=e/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(e){this.scaleY=e/this.height}},setSize:function(e,r){return this.width=e,this.height=r,this},setDisplaySize:function(e,r){return this.displayWidth=e,this.displayHeight=r,this}};s.exports=y},61683:s=>{/** + */var x={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(e){this.scaleX=e/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(e){this.scaleY=e/this.height}},setSize:function(e,r){return this.width=e,this.height=r,this},setDisplaySize:function(e,r){return this.displayWidth=e,this.displayHeight=r,this}};s.exports=x},61683:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={texture:null,frame:null,isCropped:!1,setCrop:function(e,r,d,h){if(e===void 0)this.isCropped=!1;else if(this.frame){if(typeof e=="number")this.frame.setCropUVs(this._crop,e,r,d,h,this.flipX,this.flipY);else{var a=e;this.frame.setCropUVs(this._crop,a.x,a.y,a.width,a.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};s.exports=y},89272:s=>{/** + */var x={texture:null,frame:null,isCropped:!1,setCrop:function(e,r,d,h){if(e===void 0)this.isCropped=!1;else if(this.frame){if(typeof e=="number")this.frame.setCropUVs(this._crop,e,r,d,h,this.flipX,this.flipY);else{var a=e;this.frame.setCropUVs(this._crop,a.x,a.y,a.width,a.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};s.exports=x},89272:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={_depth:0,depth:{get:function(){return this._depth},set:function(e){this.displayList&&this.displayList.queueDepthSort(),this._depth=e}},setDepth:function(e){return e===void 0&&(e=0),this.depth=e,this}};s.exports=y},47059:(s,y,e)=>{/** + */var x={_depth:0,depth:{get:function(){return this._depth},set:function(e){this.displayList&&this.displayList.queueDepthSort(),this._depth=e}},setDepth:function(e){return e===void 0&&(e=0),this.depth=e,this}};s.exports=x},47059:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1301,11 +1301,11 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(e){return this.flipX=e,this},setFlipY:function(e){return this.flipY=e,this},setFlip:function(e,r){return this.flipX=e,this.flipY=r,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};s.exports=y},8004:(s,y,e)=>{/** + */var x={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(e){return this.flipX=e,this},setFlipY:function(e){return this.flipY=e,this},setFlip:function(e,r){return this.flipX=e,this.flipY=r,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};s.exports=x},8004:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(87841),d=e(11520),h=e(26099),a={prepareBoundsOutput:function(l,n){if(n===void 0&&(n=!1),this.rotation!==0&&d(l,this.x,this.y,this.rotation),n&&this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();u.transformPoint(l.x,l.y,l)}return l},getCenter:function(l,n){return l===void 0&&(l=new h),l.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,l.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(l,n)},getTopLeft:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX,l.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(l,n)},getTopCenter:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,l.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(l,n)},getTopRight:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX+this.displayWidth,l.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(l,n)},getLeftCenter:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX,l.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(l,n)},getRightCenter:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX+this.displayWidth,l.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(l,n)},getBottomLeft:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX,l.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(l,n)},getBottomCenter:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,l.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(l,n)},getBottomRight:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX+this.displayWidth,l.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(l,n)},getBounds:function(l){l===void 0&&(l=new r);var n,u,f,o,c,p,v,m;if(this.parentContainer){var S=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(l),S.transformPoint(l.x,l.y,l),n=l.x,u=l.y,this.getTopRight(l),S.transformPoint(l.x,l.y,l),f=l.x,o=l.y,this.getBottomLeft(l),S.transformPoint(l.x,l.y,l),c=l.x,p=l.y,this.getBottomRight(l),S.transformPoint(l.x,l.y,l),v=l.x,m=l.y}else this.getTopLeft(l),n=l.x,u=l.y,this.getTopRight(l),f=l.x,o=l.y,this.getBottomLeft(l),c=l.x,p=l.y,this.getBottomRight(l),v=l.x,m=l.y;return l.x=Math.min(n,f,c,v),l.y=Math.min(u,o,p,m),l.width=Math.max(n,f,c,v)-l.x,l.height=Math.max(u,o,p,m)-l.y,l}};s.exports=a},8573:(s,y,e)=>{/** + */var r=e(87841),d=e(11520),h=e(26099),a={prepareBoundsOutput:function(l,n){if(n===void 0&&(n=!1),this.rotation!==0&&d(l,this.x,this.y,this.rotation),n&&this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();u.transformPoint(l.x,l.y,l)}return l},getCenter:function(l,n){return l===void 0&&(l=new h),l.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,l.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(l,n)},getTopLeft:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX,l.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(l,n)},getTopCenter:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,l.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(l,n)},getTopRight:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX+this.displayWidth,l.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(l,n)},getLeftCenter:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX,l.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(l,n)},getRightCenter:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX+this.displayWidth,l.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(l,n)},getBottomLeft:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX,l.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(l,n)},getBottomCenter:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,l.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(l,n)},getBottomRight:function(l,n){return l||(l=new h),l.x=this.x-this.displayWidth*this.originX+this.displayWidth,l.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(l,n)},getBounds:function(l){l===void 0&&(l=new r);var n,u,f,o,c,p,v,m;if(this.parentContainer){var S=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(l),S.transformPoint(l.x,l.y,l),n=l.x,u=l.y,this.getTopRight(l),S.transformPoint(l.x,l.y,l),f=l.x,o=l.y,this.getBottomLeft(l),S.transformPoint(l.x,l.y,l),c=l.x,p=l.y,this.getBottomRight(l),S.transformPoint(l.x,l.y,l),v=l.x,m=l.y}else this.getTopLeft(l),n=l.x,u=l.y,this.getTopRight(l),f=l.x,o=l.y,this.getBottomLeft(l),c=l.x,p=l.y,this.getBottomRight(l),v=l.x,m=l.y;return l.x=Math.min(n,f,c,v),l.y=Math.min(u,o,p,m),l.width=Math.max(n,f,c,v)-l.x,l.height=Math.max(u,o,p,m)-l.y,l}};s.exports=a},8573:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1313,15 +1313,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(e){this._displayOriginX=e,this.originX=e/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(e){this._displayOriginY=e,this.originY=e/this.height}},setOrigin:function(e,r){return e===void 0&&(e=.5),r===void 0&&(r=e),this.originX=e,this.originY=r,this.updateDisplayOrigin()},setOriginFromFrame:function(){return!this.frame||!this.frame.customPivot?this.setOrigin():(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin())},setDisplayOrigin:function(e,r){return e===void 0&&(e=0),r===void 0&&(r=e),this.displayOriginX=e,this.displayOriginY=r,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};s.exports=y},37640:(s,y,e)=>{/** + */var x={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(e){this._displayOriginX=e,this.originX=e/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(e){this._displayOriginY=e,this.originY=e/this.height}},setOrigin:function(e,r){return e===void 0&&(e=.5),r===void 0&&(r=e),this.originX=e,this.originY=r,this.updateDisplayOrigin()},setOriginFromFrame:function(){return!this.frame||!this.frame.customPivot?this.setOrigin():(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin())},setDisplayOrigin:function(e,r){return e===void 0&&(e=0),r===void 0&&(r=e),this.displayOriginX=e,this.displayOriginY=r,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};s.exports=x},37640:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39506),d=e(57355),h=e(35154),a=e(86353),l=e(26099),n={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(u,f){f===void 0&&(f=this.pathConfig);var o=this.pathTween;return o&&o.isPlaying()&&o.stop(),this.path=u,f&&this.startFollow(f),this},setRotateToPath:function(u,f){return f===void 0&&(f=0),this.rotateToPath=u,this.pathRotationOffset=f,this},isFollowing:function(){var u=this.pathTween;return u&&u.isPlaying()},startFollow:function(u,f){u===void 0&&(u={}),f===void 0&&(f=0);var o=this.pathTween;o&&o.isPlaying()&&o.stop(),typeof u=="number"&&(u={duration:u}),u.from=h(u,"from",0),u.to=h(u,"to",1);var c=d(u,"positionOnPath",!1);this.rotateToPath=d(u,"rotateToPath",!1),this.pathRotationOffset=h(u,"rotationOffset",0);var p=h(u,"startAt",f);if(p&&(u.onStart=function(m){var S=m.data[0];S.progress=p,S.elapsed=S.duration*p;var M=S.ease(S.progress);S.current=S.start+(S.end-S.start)*M,S.setTargetValue()}),this.pathOffset||(this.pathOffset=new l(this.x,this.y)),this.pathVector||(this.pathVector=new l),this.pathDelta||(this.pathDelta=new l),this.pathDelta.reset(),u.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(u),this.path.getStartPoint(this.pathOffset),c&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var v=this.path.getPoint(.1);this.rotation=Math.atan2(v.y-this.y,v.x-this.x)+r(this.pathRotationOffset)}return this.pathConfig=u,this},pauseFollow:function(){var u=this.pathTween;return u&&u.isPlaying()&&u.pause(),this},resumeFollow:function(){var u=this.pathTween;return u&&u.isPaused()&&u.resume(),this},stopFollow:function(){var u=this.pathTween;return u&&u.isPlaying()&&u.stop(),this},pathUpdate:function(){var u=this.pathTween;if(u&&u.data){var f=u.data[0],o=this.pathDelta,c=this.pathVector;if(o.copy(c).negate(),f.state===a.COMPLETE){this.path.getPoint(f.end,c),o.add(c),c.add(this.pathOffset),this.setPosition(c.x,c.y);return}else if(f.state!==a.PLAYING_FORWARD&&f.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(u.getValue(),c),o.add(c),c.add(this.pathOffset);var p=this.x,v=this.y;this.setPosition(c.x,c.y);var m=this.x-p,S=this.y-v;if(m===0&&S===0)return;if(f.state!==this._prevDirection){this._prevDirection=f.state;return}this.rotateToPath&&(this.rotation=Math.atan2(S,m)+r(this.pathRotationOffset))}}};s.exports=n},72699:(s,y,e)=>{/** + */var r=e(39506),d=e(57355),h=e(35154),a=e(86353),l=e(26099),n={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(u,f){f===void 0&&(f=this.pathConfig);var o=this.pathTween;return o&&o.isPlaying()&&o.stop(),this.path=u,f&&this.startFollow(f),this},setRotateToPath:function(u,f){return f===void 0&&(f=0),this.rotateToPath=u,this.pathRotationOffset=f,this},isFollowing:function(){var u=this.pathTween;return u&&u.isPlaying()},startFollow:function(u,f){u===void 0&&(u={}),f===void 0&&(f=0);var o=this.pathTween;o&&o.isPlaying()&&o.stop(),typeof u=="number"&&(u={duration:u}),u.from=h(u,"from",0),u.to=h(u,"to",1);var c=d(u,"positionOnPath",!1);this.rotateToPath=d(u,"rotateToPath",!1),this.pathRotationOffset=h(u,"rotationOffset",0);var p=h(u,"startAt",f);if(p&&(u.onStart=function(m){var S=m.data[0];S.progress=p,S.elapsed=S.duration*p;var M=S.ease(S.progress);S.current=S.start+(S.end-S.start)*M,S.setTargetValue()}),this.pathOffset||(this.pathOffset=new l(this.x,this.y)),this.pathVector||(this.pathVector=new l),this.pathDelta||(this.pathDelta=new l),this.pathDelta.reset(),u.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(u),this.path.getStartPoint(this.pathOffset),c&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var v=this.path.getPoint(.1);this.rotation=Math.atan2(v.y-this.y,v.x-this.x)+r(this.pathRotationOffset)}return this.pathConfig=u,this},pauseFollow:function(){var u=this.pathTween;return u&&u.isPlaying()&&u.pause(),this},resumeFollow:function(){var u=this.pathTween;return u&&u.isPaused()&&u.resume(),this},stopFollow:function(){var u=this.pathTween;return u&&u.isPlaying()&&u.stop(),this},pathUpdate:function(){var u=this.pathTween;if(u&&u.data){var f=u.data[0],o=this.pathDelta,c=this.pathVector;if(o.copy(c).negate(),f.state===a.COMPLETE){this.path.getPoint(f.end,c),o.add(c),c.add(this.pathOffset),this.setPosition(c.x,c.y);return}else if(f.state!==a.PLAYING_FORWARD&&f.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(u.getValue(),c),o.add(c),c.add(this.pathOffset);var p=this.x,v=this.y;this.setPosition(c.x,c.y);var m=this.x-p,S=this.y-v;if(m===0&&S===0)return;if(f.state!==this._prevDirection){this._prevDirection=f.state;return}this.rotateToPath&&(this.rotation=Math.atan2(S,m)+r(this.pathRotationOffset))}}};s.exports=n},72699:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(62644),d={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(h){this.pipelineData={};var a=this.scene.sys.renderer;if(!a)return!1;var l=a.pipelines;if(l){h===void 0&&(h=l.default);var n=l.get(h);if(n)return this.defaultPipeline=n,this.pipeline=n,!0}return!1},setPipeline:function(h,a,l){var n=this.scene.sys.renderer;if(!n)return this;var u=n.pipelines;if(u){var f=u.get(h);f&&(this.pipeline=f),a&&(this.pipelineData=l?r(a):a)}return this},setPipelineData:function(h,a){var l=this.pipelineData;return a===void 0?delete l[h]:l[h]=a,this},resetPipeline:function(h){return h===void 0&&(h=!1),this.pipeline=this.defaultPipeline,h&&(this.pipelineData={}),this.pipeline!==null},getPipelineName:function(){return this.pipeline.name}};s.exports=d},17581:(s,y,e)=>{/** + */var r=e(62644),d={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(h){this.pipelineData={};var a=this.scene.sys.renderer;if(!a)return!1;var l=a.pipelines;if(l){h===void 0&&(h=l.default);var n=l.get(h);if(n)return this.defaultPipeline=n,this.pipeline=n,!0}return!1},setPipeline:function(h,a,l){var n=this.scene.sys.renderer;if(!n)return this;var u=n.pipelines;if(u){var f=u.get(h);f&&(this.pipeline=f),a&&(this.pipelineData=l?r(a):a)}return this},setPipelineData:function(h,a){var l=this.pipelineData;return a===void 0?delete l[h]:l[h]=a,this},resetPipeline:function(h){return h===void 0&&(h=!1),this.pipeline=this.defaultPipeline,h&&(this.pipelineData={}),this.pipeline!==null},getPipelineName:function(){return this.pipeline.name}};s.exports=d},17581:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1329,15 +1329,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(e,r){return r===void 0&&(r=e),this.scrollFactorX=e,this.scrollFactorY=r,this}};s.exports=y},16736:s=>{/** + */var x={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(e,r){return r===void 0&&(r=e),this.scrollFactorX=e,this.scrollFactorY=r,this}};s.exports=x},16736:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(e){this.scaleX=e/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(e){this.scaleY=e/this.frame.realHeight}},setSizeToFrame:function(e){e||(e=this.frame),this.width=e.realWidth,this.height=e.realHeight;var r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=this.width,r.hitArea.height=this.height),this},setSize:function(e,r){return this.width=e,this.height=r,this},setDisplaySize:function(e,r){return this.displayWidth=e,this.displayHeight=r,this}};s.exports=y},37726:(s,y,e)=>{/** + */var x={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(e){this.scaleX=e/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(e){this.scaleY=e/this.frame.realHeight}},setSizeToFrame:function(e){e||(e=this.frame),this.width=e.realWidth,this.height=e.realHeight;var r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=this.width,r.hitArea.height=this.height),this},setSize:function(e,r){return this.width=e,this.height=r,this},setDisplaySize:function(e,r){return this.displayWidth=e,this.displayHeight=r,this}};s.exports=x},37726:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(4327),d=8,h={texture:null,frame:null,isCropped:!1,setTexture:function(a,l,n,u){return this.texture=this.scene.sys.textures.get(a),this.setFrame(l,n,u)},setFrame:function(a,l,n){return l===void 0&&(l=!0),n===void 0&&(n=!0),a instanceof r?(this.texture=this.scene.sys.textures.get(a.texture.key),this.frame=a):this.frame=this.texture.get(a),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~d:this.renderFlags|=d,this._sizeComponent&&l&&this.setSizeToFrame(),this._originComponent&&n&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};s.exports=h},79812:(s,y,e)=>{/** + */var r=e(4327),d=8,h={texture:null,frame:null,isCropped:!1,setTexture:function(a,l,n,u){return this.texture=this.scene.sys.textures.get(a),this.setFrame(l,n,u)},setFrame:function(a,l,n){return l===void 0&&(l=!0),n===void 0&&(n=!0),a instanceof r?(this.texture=this.scene.sys.textures.get(a.texture.key),this.frame=a):this.frame=this.texture.get(a),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~d:this.renderFlags|=d,this._sizeComponent&&l&&this.setSizeToFrame(),this._originComponent&&n&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};s.exports=h},79812:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1345,15 +1345,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(e,r,d,h){return e===void 0&&(e=16777215),r===void 0&&(r=e,d=e,h=e),this.tintTopLeft=e,this.tintTopRight=r,this.tintBottomLeft=d,this.tintBottomRight=h,this.tintFill=!1,this},setTintFill:function(e,r,d,h){return this.setTint(e,r,d,h),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(e){this.setTint(e,e,e,e)}},isTinted:{get:function(){var e=16777215;return this.tintFill||this.tintTopLeft!==e||this.tintTopRight!==e||this.tintBottomLeft!==e||this.tintBottomRight!==e}}};s.exports=y},53774:s=>{/** + */var x={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(e,r,d,h){return e===void 0&&(e=16777215),r===void 0&&(r=e,d=e,h=e),this.tintTopLeft=e,this.tintTopRight=r,this.tintBottomLeft=d,this.tintBottomRight=h,this.tintFill=!1,this},setTintFill:function(e,r,d,h){return this.setTint(e,r,d,h),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(e){this.setTint(e,e,e,e)}},isTinted:{get:function(){var e=16777215;return this.tintFill||this.tintTopLeft!==e||this.tintTopRight!==e||this.tintBottomLeft!==e||this.tintBottomRight!==e}}};s.exports=x},53774:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r={name:e.name,type:e.type,x:e.x,y:e.y,depth:e.depth,scale:{x:e.scaleX,y:e.scaleY},origin:{x:e.originX,y:e.originY},flipX:e.flipX,flipY:e.flipY,rotation:e.rotation,alpha:e.alpha,visible:e.visible,blendMode:e.blendMode,textureKey:"",frameKey:"",data:{}};return e.texture&&(r.textureKey=e.texture.key,r.frameKey=e.frame.name),r};s.exports=y},16901:(s,y,e)=>{/** + */var x=function(e){var r={name:e.name,type:e.type,x:e.x,y:e.y,depth:e.depth,scale:{x:e.scaleX,y:e.scaleY},origin:{x:e.originX,y:e.originY},flipX:e.flipX,flipY:e.flipY,rotation:e.rotation,alpha:e.alpha,visible:e.visible,blendMode:e.blendMode,textureKey:"",frameKey:"",data:{}};return e.texture&&(r.textureKey=e.texture.key,r.frameKey=e.frame.name),r};s.exports=x},16901:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(36383),d=e(61340),h=e(85955),a=e(86554),l=e(30954),n=e(26099),u=4,f={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(o){this._scaleX=o,this._scaleY=o,o===0?this.renderFlags&=~u:this.renderFlags|=u}},scaleX:{get:function(){return this._scaleX},set:function(o){this._scaleX=o,o===0?this.renderFlags&=~u:this._scaleY!==0&&(this.renderFlags|=u)}},scaleY:{get:function(){return this._scaleY},set:function(o){this._scaleY=o,o===0?this.renderFlags&=~u:this._scaleX!==0&&(this.renderFlags|=u)}},angle:{get:function(){return l(this._rotation*r.RAD_TO_DEG)},set:function(o){this.rotation=l(o)*r.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(o){this._rotation=a(o)}},setPosition:function(o,c,p,v){return o===void 0&&(o=0),c===void 0&&(c=o),p===void 0&&(p=0),v===void 0&&(v=0),this.x=o,this.y=c,this.z=p,this.w=v,this},copyPosition:function(o){return o.x!==void 0&&(this.x=o.x),o.y!==void 0&&(this.y=o.y),o.z!==void 0&&(this.z=o.z),o.w!==void 0&&(this.w=o.w),this},setRandomPosition:function(o,c,p,v){return o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=this.scene.sys.scale.width),v===void 0&&(v=this.scene.sys.scale.height),this.x=o+Math.random()*p,this.y=c+Math.random()*v,this},setRotation:function(o){return o===void 0&&(o=0),this.rotation=o,this},setAngle:function(o){return o===void 0&&(o=0),this.angle=o,this},setScale:function(o,c){return o===void 0&&(o=1),c===void 0&&(c=o),this.scaleX=o,this.scaleY=c,this},setX:function(o){return o===void 0&&(o=0),this.x=o,this},setY:function(o){return o===void 0&&(o=0),this.y=o,this},setZ:function(o){return o===void 0&&(o=0),this.z=o,this},setW:function(o){return o===void 0&&(o=0),this.w=o,this},getLocalTransformMatrix:function(o){return o===void 0&&(o=new d),o.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(o,c){o===void 0&&(o=new d);var p=this.parentContainer;if(!p)return this.getLocalTransformMatrix(o);for(c||(c=new d),o.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);p;)c.applyITRS(p.x,p.y,p._rotation,p._scaleX,p._scaleY),c.multiply(o,o),p=p.parentContainer;return o},getLocalPoint:function(o,c,p,v){p||(p=new n),v||(v=this.scene.sys.cameras.main);var m=v.scrollX,S=v.scrollY,M=o+m*this.scrollFactorX-m,w=c+S*this.scrollFactorY-S;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(M,w,p):h(M,w,this.x,this.y,this.rotation,this.scaleX,this.scaleY,p),this._originComponent&&(p.x+=this._displayOriginX,p.y+=this._displayOriginY),p},getParentRotation:function(){for(var o=0,c=this.parentContainer;c;)o+=c.rotation,c=c.parentContainer;return o}};s.exports=f},61340:(s,y,e)=>{/** + */var r=e(36383),d=e(61340),h=e(85955),a=e(86554),l=e(30954),n=e(26099),u=4,f={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(o){this._scaleX=o,this._scaleY=o,o===0?this.renderFlags&=~u:this.renderFlags|=u}},scaleX:{get:function(){return this._scaleX},set:function(o){this._scaleX=o,o===0?this.renderFlags&=~u:this._scaleY!==0&&(this.renderFlags|=u)}},scaleY:{get:function(){return this._scaleY},set:function(o){this._scaleY=o,o===0?this.renderFlags&=~u:this._scaleX!==0&&(this.renderFlags|=u)}},angle:{get:function(){return l(this._rotation*r.RAD_TO_DEG)},set:function(o){this.rotation=l(o)*r.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(o){this._rotation=a(o)}},setPosition:function(o,c,p,v){return o===void 0&&(o=0),c===void 0&&(c=o),p===void 0&&(p=0),v===void 0&&(v=0),this.x=o,this.y=c,this.z=p,this.w=v,this},copyPosition:function(o){return o.x!==void 0&&(this.x=o.x),o.y!==void 0&&(this.y=o.y),o.z!==void 0&&(this.z=o.z),o.w!==void 0&&(this.w=o.w),this},setRandomPosition:function(o,c,p,v){return o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=this.scene.sys.scale.width),v===void 0&&(v=this.scene.sys.scale.height),this.x=o+Math.random()*p,this.y=c+Math.random()*v,this},setRotation:function(o){return o===void 0&&(o=0),this.rotation=o,this},setAngle:function(o){return o===void 0&&(o=0),this.angle=o,this},setScale:function(o,c){return o===void 0&&(o=1),c===void 0&&(c=o),this.scaleX=o,this.scaleY=c,this},setX:function(o){return o===void 0&&(o=0),this.x=o,this},setY:function(o){return o===void 0&&(o=0),this.y=o,this},setZ:function(o){return o===void 0&&(o=0),this.z=o,this},setW:function(o){return o===void 0&&(o=0),this.w=o,this},getLocalTransformMatrix:function(o){return o===void 0&&(o=new d),o.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(o,c){o===void 0&&(o=new d);var p=this.parentContainer;if(!p)return this.getLocalTransformMatrix(o);for(c||(c=new d),o.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);p;)c.applyITRS(p.x,p.y,p._rotation,p._scaleX,p._scaleY),c.multiply(o,o),p=p.parentContainer;return o},getLocalPoint:function(o,c,p,v){p||(p=new n),v||(v=this.scene.sys.cameras.main);var m=v.scrollX,S=v.scrollY,M=o+m*this.scrollFactorX-m,w=c+S*this.scrollFactorY-S;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(M,w,p):h(M,w,this.x,this.y,this.rotation,this.scaleX,this.scaleY,p),this._originComponent&&(p.x+=this._displayOriginX,p.y+=this._displayOriginY),p},getParentRotation:function(){for(var o=0,c=this.parentContainer;c;)o+=c.rotation,c=c.parentContainer;return o}};s.exports=f},61340:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1361,11 +1361,11 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=1,e={_visible:!0,visible:{get:function(){return this._visible},set:function(r){r?(this._visible=!0,this.renderFlags|=y):(this._visible=!1,this.renderFlags&=~y)}},setVisible:function(r){return this.visible=r,this}};s.exports=e},31401:(s,y,e)=>{/** + */var x=1,e={_visible:!0,visible:{get:function(){return this._visible},set:function(r){r?(this._visible=!0,this.renderFlags|=x):(this._visible=!1,this.renderFlags&=~x)}},setVisible:function(r){return this.visible=r,this}};s.exports=e},31401:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Alpha:e(16005),AlphaSingle:e(88509),BlendMode:e(90065),ComputedSize:e(94215),Crop:e(61683),Depth:e(89272),Flip:e(54434),FX:e(47059),GetBounds:e(8004),Mask:e(8573),Origin:e(27387),PathFollower:e(37640),Pipeline:e(72699),PostPipeline:e(17581),ScrollFactor:e(80227),Size:e(16736),Texture:e(37726),TextureCrop:e(79812),Tint:e(27472),ToJSON:e(53774),Transform:e(16901),TransformMatrix:e(61340),Visible:e(59715)}},31559:(s,y,e)=>{/** + */s.exports={Alpha:e(16005),AlphaSingle:e(88509),BlendMode:e(90065),ComputedSize:e(94215),Crop:e(61683),Depth:e(89272),Flip:e(54434),FX:e(47059),GetBounds:e(8004),Mask:e(8573),Origin:e(27387),PathFollower:e(37640),Pipeline:e(72699),PostPipeline:e(17581),ScrollFactor:e(80227),Size:e(16736),Texture:e(37726),TextureCrop:e(79812),Tint:e(27472),ToJSON:e(53774),Transform:e(16901),TransformMatrix:e(61340),Visible:e(59715)}},31559:(s,x,e)=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. @@ -1375,17 +1375,17 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){d.addToRenderList(r);var a=r.list;if(a.length!==0){var l=r.localTransform;h?(l.loadIdentity(),l.multiply(h),l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.scaleX,r.scaleY)):l.applyITRS(r.x,r.y,r.rotation,r.scaleX,r.scaleY);var n=r.blendMode!==-1;n||e.setBlendMode(0);var u=r._alpha,f=r.scrollFactorX,o=r.scrollFactorY;r.mask&&r.mask.preRenderCanvas(e,null,d);for(var c=0;c{/** + */var x=function(e,r,d,h){d.addToRenderList(r);var a=r.list;if(a.length!==0){var l=r.localTransform;h?(l.loadIdentity(),l.multiply(h),l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.scaleX,r.scaleY)):l.applyITRS(r.x,r.y,r.rotation,r.scaleX,r.scaleY);var n=r.blendMode!==-1;n||e.setBlendMode(0);var u=r._alpha,f=r.scrollFactorX,o=r.scrollFactorY;r.mask&&r.mask.preRenderCanvas(e,null,d);for(var c=0;c{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(31559),h=e(44603),a=e(23568),l=e(95540);h.register("container",function(n,u){n===void 0&&(n={});var f=a(n,"x",0),o=a(n,"y",0),c=l(n,"children",null),p=new d(this.scene,f,o,c);return u!==void 0&&(n.add=u),r(this.scene,p,n),p})},24961:(s,y,e)=>{/** + */var r=e(25305),d=e(31559),h=e(44603),a=e(23568),l=e(95540);h.register("container",function(n,u){n===void 0&&(n={});var f=a(n,"x",0),o=a(n,"y",0),c=l(n,"children",null),p=new d(this.scene,f,o,c);return u!==void 0&&(n.add=u),r(this.scene,p,n),p})},24961:(s,x,e)=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(31559),d=e(39429);d.register("container",function(h,a,l){return this.displayList.add(new r(this.scene,h,a,l))})},29959:(s,y,e)=>{/** + */var r=e(31559),d=e(39429);d.register("container",function(h,a,l){return this.displayList.add(new r(this.scene,h,a,l))})},29959:(s,x,e)=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. @@ -1395,23 +1395,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){d.addToRenderList(r);var a=r.list,l=a.length;if(l!==0){var n=r.localTransform;h?(n.loadIdentity(),n.multiply(h),n.translate(r.x,r.y),n.rotate(r.rotation),n.scale(r.scaleX,r.scaleY)):n.applyITRS(r.x,r.y,r.rotation,r.scaleX,r.scaleY),e.pipelines.preBatch(r);var u=r.blendMode!==-1;u||e.setBlendMode(0);for(var f=r.alpha,o=r.scrollFactorX,c=r.scrollFactorY,p=0;p{/** + */var x=function(e,r,d,h){d.addToRenderList(r);var a=r.list,l=a.length;if(l!==0){var n=r.localTransform;h?(n.loadIdentity(),n.multiply(h),n.translate(r.x,r.y),n.rotate(r.rotation),n.scale(r.scaleX,r.scaleY)):n.applyITRS(r.x,r.y,r.rotation,r.scaleX,r.scaleY),e.pipelines.preBatch(r);var u=r.blendMode!==-1;u||e.setBlendMode(0);for(var f=r.alpha,o=r.scrollFactorX,c=r.scrollFactorY,p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(s,y,e)=>{/** + */s.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(31401),h=e(441),a=e(95643),l=e(41212),n=e(35846),u=e(44594),f=e(61369),o=new r({Extends:a,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.Origin,d.ScrollFactor,d.Transform,d.Visible,h],initialize:function(p,v,m,S,M,w){a.call(this,p,"DOMElement"),this.parent=p.sys.game.domContainer,this.cache=p.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new f,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(v,m),typeof S=="string"?S[0]==="#"?this.setElement(S.substr(1),M,w):this.createElement(S,M,w):S&&this.setElement(S,M,w),p.sys.events.on(u.SLEEP,this.handleSceneEvent,this),p.sys.events.on(u.WAKE,this.handleSceneEvent,this),p.sys.events.on(u.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(c){var p=this.node,v=p.style;p&&(v.display=c.settings.visible?"block":"none")},setSkew:function(c,p){return c===void 0&&(c=0),p===void 0&&(p=c),this.skewX=c,this.skewY=p,this},setPerspective:function(c){return this.parent.style.perspective=c+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(c){this.parent.style.perspective=c+"px"}},addListener:function(c){if(this.node){c=c.split(" ");for(var p=0;p{/** + */var r=e(83419),d=e(31401),h=e(441),a=e(95643),l=e(41212),n=e(35846),u=e(44594),f=e(61369),o=new r({Extends:a,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.Origin,d.ScrollFactor,d.Transform,d.Visible,h],initialize:function(p,v,m,S,M,w){a.call(this,p,"DOMElement"),this.parent=p.sys.game.domContainer,this.cache=p.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new f,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(v,m),typeof S=="string"?S[0]==="#"?this.setElement(S.substr(1),M,w):this.createElement(S,M,w):S&&this.setElement(S,M,w),p.sys.events.on(u.SLEEP,this.handleSceneEvent,this),p.sys.events.on(u.WAKE,this.handleSceneEvent,this),p.sys.events.on(u.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(c){var p=this.node,v=p.style;p&&(v.display=c.settings.visible?"block":"none")},setSkew:function(c,p){return c===void 0&&(c=0),p===void 0&&(p=c),this.skewX=c,this.skewY=p,this},setPerspective:function(c){return this.parent.style.perspective=c+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(c){this.parent.style.perspective=c+"px"}},addListener:function(c){if(this.node){c=c.split(" ");for(var p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(47407),d=e(95643),h=e(61340),a=new h,l=new h,n=new h,u=function(f,o,c,p){if(o.node){var v=o.node.style,m=o.scene.sys.settings;if(!v||!m.visible||d.RENDER_MASK!==o.renderFlags||o.cameraFilter!==0&&o.cameraFilter&c.id||o.parentContainer&&!o.parentContainer.willRender()){v.display="none";return}var S=o.parentContainer,M=c.alpha*o.alpha;S&&(M*=S.alpha);var w=a,C=l,A=n,P=0,b=0,O="0%",I="0%";p?(P=o.width*o.scaleX*o.originX,b=o.height*o.scaleY*o.originY,C.applyITRS(o.x-P,o.y-b,o.rotation,o.scaleX,o.scaleY),w.copyFrom(c.matrix),w.multiplyWithOffset(p,-c.scrollX*o.scrollFactorX,-c.scrollY*o.scrollFactorY),C.e=o.x-P,C.f=o.y-b,w.multiply(C,A)):(P=o.width*o.originX,b=o.height*o.originY,C.applyITRS(o.x-P,o.y-b,o.rotation,o.scaleX,o.scaleY),w.copyFrom(c.matrix),O=100*o.originX+"%",I=100*o.originY+"%",C.e-=c.scrollX*o.scrollFactorX,C.f-=c.scrollY*o.scrollFactorY,w.multiply(C,A)),o.transformOnly||(v.display="block",v.opacity=M,v.zIndex=o._depth,v.pointerEvents=o.pointerEvents,v.mixBlendMode=r[o._blendMode]),v.transform=A.getCSSMatrix()+" skew("+o.skewX+"rad, "+o.skewY+"rad) rotate3d("+o.rotate3d.x+","+o.rotate3d.y+","+o.rotate3d.z+","+o.rotate3d.w+o.rotate3dAngle+")",v.transformOrigin=O+" "+I}};s.exports=u},2611:(s,y,e)=>{/** + */var r=e(47407),d=e(95643),h=e(61340),a=new h,l=new h,n=new h,u=function(f,o,c,p){if(o.node){var v=o.node.style,m=o.scene.sys.settings;if(!v||!m.visible||d.RENDER_MASK!==o.renderFlags||o.cameraFilter!==0&&o.cameraFilter&c.id||o.parentContainer&&!o.parentContainer.willRender()){v.display="none";return}var S=o.parentContainer,M=c.alpha*o.alpha;S&&(M*=S.alpha);var w=a,C=l,A=n,P=0,b=0,O="0%",I="0%";p?(P=o.width*o.scaleX*o.originX,b=o.height*o.scaleY*o.originY,C.applyITRS(o.x-P,o.y-b,o.rotation,o.scaleX,o.scaleY),w.copyFrom(c.matrix),w.multiplyWithOffset(p,-c.scrollX*o.scrollFactorX,-c.scrollY*o.scrollFactorY),C.e=o.x-P,C.f=o.y-b,w.multiply(C,A)):(P=o.width*o.originX,b=o.height*o.originY,C.applyITRS(o.x-P,o.y-b,o.rotation,o.scaleX,o.scaleY),w.copyFrom(c.matrix),O=100*o.originX+"%",I=100*o.originY+"%",C.e-=c.scrollX*o.scrollFactorX,C.f-=c.scrollY*o.scrollFactorY,w.multiply(C,A)),o.transformOnly||(v.display="block",v.opacity=M,v.zIndex=o._depth,v.pointerEvents=o.pointerEvents,v.mixBlendMode=r[o._blendMode]),v.transform=A.getCSSMatrix()+" skew("+o.skewX+"rad, "+o.skewY+"rad) rotate3d("+o.rotate3d.x+","+o.rotate3d.y+","+o.rotate3d.z+","+o.rotate3d.w+o.rotate3dAngle+")",v.transformOrigin=O+" "+I}};s.exports=u},2611:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(3069),d=e(39429);d.register("dom",function(h,a,l,n,u){var f=new r(this.scene,h,a,l,n,u);return this.displayList.add(f),f})},441:(s,y,e)=>{/** + */var r=e(3069),d=e(39429);d.register("dom",function(h,a,l,n,u){var f=new r(this.scene,h,a,l,n,u);return this.displayList.add(f),f})},441:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1487,23 +1487,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="unsupported"},51708:(s,y,e)=>{/** + */s.exports="unsupported"},51708:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={ADDED_TO_SCENE:e(62980),DESTROY:e(41337),REMOVED_FROM_SCENE:e(44947),VIDEO_COMPLETE:e(49358),VIDEO_CREATED:e(35163),VIDEO_ERROR:e(97249),VIDEO_LOCKED:e(19483),VIDEO_LOOP:e(56059),VIDEO_METADATA:e(26772),VIDEO_PLAY:e(83411),VIDEO_PLAYING:e(64437),VIDEO_SEEKED:e(75780),VIDEO_SEEKING:e(67799),VIDEO_STALLED:e(63500),VIDEO_STOP:e(55541),VIDEO_TEXTURE:e(53208),VIDEO_UNLOCKED:e(4992),VIDEO_UNSUPPORTED:e(12)}},42421:(s,y,e)=>{/** + */s.exports={ADDED_TO_SCENE:e(62980),DESTROY:e(41337),REMOVED_FROM_SCENE:e(44947),VIDEO_COMPLETE:e(49358),VIDEO_CREATED:e(35163),VIDEO_ERROR:e(97249),VIDEO_LOCKED:e(19483),VIDEO_LOOP:e(56059),VIDEO_METADATA:e(26772),VIDEO_PLAY:e(83411),VIDEO_PLAYING:e(64437),VIDEO_SEEKED:e(75780),VIDEO_SEEKING:e(67799),VIDEO_STALLED:e(63500),VIDEO_STOP:e(55541),VIDEO_TEXTURE:e(53208),VIDEO_UNLOCKED:e(4992),VIDEO_UNSUPPORTED:e(12)}},42421:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(31401),h=e(95643),a=e(64993),l=new r({Extends:h,Mixins:[d.Alpha,d.BlendMode,d.Depth,d.Flip,d.Origin,d.ScrollFactor,d.Size,d.Texture,d.Tint,d.Transform,d.Visible,a],initialize:function(u){h.call(this,u,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});s.exports=l},70217:()=>{},56315:(s,y,e)=>{/** + */var r=e(83419),d=e(31401),h=e(95643),a=e(64993),l=new r({Extends:h,Mixins:[d.Alpha,d.BlendMode,d.Depth,d.Flip,d.Origin,d.ScrollFactor,d.Size,d.Texture,d.Tint,d.Transform,d.Visible,a],initialize:function(u){h.call(this,u,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});s.exports=l},70217:()=>{},56315:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(42421),d=e(39429);d.register("extern",function(){var h=new r(this.scene);return this.displayList.add(h),h})},64993:(s,y,e)=>{/** + */var r=e(42421),d=e(39429);d.register("extern",function(){var h=new r(this.scene);return this.displayList.add(h),h})},64993:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(80287),h=e(70217),s.exports={renderWebGL:d,renderCanvas:h}},80287:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(80287),h=e(70217),s.exports={renderWebGL:d,renderCanvas:h}},80287:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1511,43 +1511,43 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},43831:(s,y,e)=>{/** + */s.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},43831:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(71911),d=e(83419),h=e(85592),a=e(31401),l=e(8497),n=e(95643),u=e(95540),f=e(35154),o=e(36383),c=e(84503),p=new d({Extends:n,Mixins:[a.AlphaSingle,a.BlendMode,a.Depth,a.Mask,a.Pipeline,a.PostPipeline,a.Transform,a.Visible,a.ScrollFactor,c],initialize:function(m,S){var M=f(S,"x",0),w=f(S,"y",0);n.call(this,m,"Graphics"),this.setPosition(M,w),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(S)},setDefaultStyles:function(v){return f(v,"lineStyle",null)&&(this.defaultStrokeWidth=f(v,"lineStyle.width",1),this.defaultStrokeColor=f(v,"lineStyle.color",16777215),this.defaultStrokeAlpha=f(v,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),f(v,"fillStyle",null)&&(this.defaultFillColor=f(v,"fillStyle.color",16777215),this.defaultFillAlpha=f(v,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(v,m,S){return S===void 0&&(S=1),this.commandBuffer.push(h.LINE_STYLE,v,m,S),this._lineWidth=v,this},fillStyle:function(v,m){return m===void 0&&(m=1),this.commandBuffer.push(h.FILL_STYLE,v,m),this},fillGradientStyle:function(v,m,S,M,w,C,A,P){return w===void 0&&(w=1),C===void 0&&(C=w),A===void 0&&(A=w),P===void 0&&(P=w),this.commandBuffer.push(h.GRADIENT_FILL_STYLE,w,C,A,P,v,m,S,M),this},lineGradientStyle:function(v,m,S,M,w,C){return C===void 0&&(C=1),this.commandBuffer.push(h.GRADIENT_LINE_STYLE,v,C,m,S,M,w),this},beginPath:function(){return this.commandBuffer.push(h.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(h.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(h.FILL_PATH),this},fill:function(){return this.commandBuffer.push(h.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(h.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(h.STROKE_PATH),this},fillCircleShape:function(v){return this.fillCircle(v.x,v.y,v.radius)},strokeCircleShape:function(v){return this.strokeCircle(v.x,v.y,v.radius)},fillCircle:function(v,m,S){return this.beginPath(),this.arc(v,m,S,0,o.PI2),this.fillPath(),this},strokeCircle:function(v,m,S){return this.beginPath(),this.arc(v,m,S,0,o.PI2),this.strokePath(),this},fillRectShape:function(v){return this.fillRect(v.x,v.y,v.width,v.height)},strokeRectShape:function(v){return this.strokeRect(v.x,v.y,v.width,v.height)},fillRect:function(v,m,S,M){return this.commandBuffer.push(h.FILL_RECT,v,m,S,M),this},strokeRect:function(v,m,S,M){var w=this._lineWidth/2,C=v-w,A=v+w;return this.beginPath(),this.moveTo(v,m),this.lineTo(v,m+M),this.strokePath(),this.beginPath(),this.moveTo(v+S,m),this.lineTo(v+S,m+M),this.strokePath(),this.beginPath(),this.moveTo(C,m),this.lineTo(A+S,m),this.strokePath(),this.beginPath(),this.moveTo(C,m+M),this.lineTo(A+S,m+M),this.strokePath(),this},fillRoundedRect:function(v,m,S,M,w){w===void 0&&(w=20);var C=w,A=w,P=w,b=w;typeof w!="number"&&(C=u(w,"tl",20),A=u(w,"tr",20),P=u(w,"bl",20),b=u(w,"br",20));var O=C>=0,I=A>=0,D=P>=0,B=b>=0;return C=Math.abs(C),A=Math.abs(A),P=Math.abs(P),b=Math.abs(b),this.beginPath(),this.moveTo(v+C,m),this.lineTo(v+S-A,m),I?this.arc(v+S-A,m+A,A,-o.TAU,0):this.arc(v+S,m,A,Math.PI,o.TAU,!0),this.lineTo(v+S,m+M-b),B?this.arc(v+S-b,m+M-b,b,0,o.TAU):this.arc(v+S,m+M,b,-o.TAU,Math.PI,!0),this.lineTo(v+P,m+M),D?this.arc(v+P,m+M-P,P,o.TAU,Math.PI):this.arc(v,m+M,P,0,-o.TAU,!0),this.lineTo(v,m+C),O?this.arc(v+C,m+C,C,-Math.PI,-o.TAU):this.arc(v,m,C,o.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(v,m,S,M,w){w===void 0&&(w=20);var C=w,A=w,P=w,b=w,O=Math.min(S,M)/2;typeof w!="number"&&(C=u(w,"tl",20),A=u(w,"tr",20),P=u(w,"bl",20),b=u(w,"br",20));var I=C>=0,D=A>=0,B=P>=0,G=b>=0;return C=Math.min(Math.abs(C),O),A=Math.min(Math.abs(A),O),P=Math.min(Math.abs(P),O),b=Math.min(Math.abs(b),O),this.beginPath(),this.moveTo(v+C,m),this.lineTo(v+S-A,m),this.moveTo(v+S-A,m),D?this.arc(v+S-A,m+A,A,-o.TAU,0):this.arc(v+S,m,A,Math.PI,o.TAU,!0),this.lineTo(v+S,m+M-b),this.moveTo(v+S,m+M-b),G?this.arc(v+S-b,m+M-b,b,0,o.TAU):this.arc(v+S,m+M,b,-o.TAU,Math.PI,!0),this.lineTo(v+P,m+M),this.moveTo(v+P,m+M),B?this.arc(v+P,m+M-P,P,o.TAU,Math.PI):this.arc(v,m+M,P,0,-o.TAU,!0),this.lineTo(v,m+C),this.moveTo(v,m+C),I?this.arc(v+C,m+C,C,-Math.PI,-o.TAU):this.arc(v,m,C,o.TAU,0,!0),this.strokePath(),this},fillPointShape:function(v,m){return this.fillPoint(v.x,v.y,m)},fillPoint:function(v,m,S){return!S||S<1?S=1:(v-=S/2,m-=S/2),this.commandBuffer.push(h.FILL_RECT,v,m,S,S),this},fillTriangleShape:function(v){return this.fillTriangle(v.x1,v.y1,v.x2,v.y2,v.x3,v.y3)},strokeTriangleShape:function(v){return this.strokeTriangle(v.x1,v.y1,v.x2,v.y2,v.x3,v.y3)},fillTriangle:function(v,m,S,M,w,C){return this.commandBuffer.push(h.FILL_TRIANGLE,v,m,S,M,w,C),this},strokeTriangle:function(v,m,S,M,w,C){return this.commandBuffer.push(h.STROKE_TRIANGLE,v,m,S,M,w,C),this},strokeLineShape:function(v){return this.lineBetween(v.x1,v.y1,v.x2,v.y2)},lineBetween:function(v,m,S,M){return this.beginPath(),this.moveTo(v,m),this.lineTo(S,M),this.strokePath(),this},lineTo:function(v,m){return this.commandBuffer.push(h.LINE_TO,v,m),this},moveTo:function(v,m){return this.commandBuffer.push(h.MOVE_TO,v,m),this},strokePoints:function(v,m,S,M){m===void 0&&(m=!1),S===void 0&&(S=!1),M===void 0&&(M=v.length),this.beginPath(),this.moveTo(v[0].x,v[0].y);for(var w=1;w-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(v,m,S){var M=this.scene.sys,w=M.game.renderer;m===void 0&&(m=M.scale.width),S===void 0&&(S=M.scale.height),p.TargetCamera.setScene(this.scene),p.TargetCamera.setViewport(0,0,m,S),p.TargetCamera.scrollX=this.x,p.TargetCamera.scrollY=this.y;var C,A,P={willReadFrequently:!0};if(typeof v=="string")if(M.textures.exists(v)){C=M.textures.get(v);var b=C.getSourceImage();b instanceof HTMLCanvasElement&&(A=b.getContext("2d",P))}else C=M.textures.createCanvas(v,m,S),A=C.getSourceImage().getContext("2d",P);else v instanceof HTMLCanvasElement&&(A=v.getContext("2d",P));return A&&(this.renderCanvas(w,this,p.TargetCamera,null,A,!1),C&&C.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});p.TargetCamera=new r,s.exports=p},32768:(s,y,e)=>{/** + */var r=e(71911),d=e(83419),h=e(85592),a=e(31401),l=e(8497),n=e(95643),u=e(95540),f=e(35154),o=e(36383),c=e(84503),p=new d({Extends:n,Mixins:[a.AlphaSingle,a.BlendMode,a.Depth,a.Mask,a.Pipeline,a.PostPipeline,a.Transform,a.Visible,a.ScrollFactor,c],initialize:function(m,S){var M=f(S,"x",0),w=f(S,"y",0);n.call(this,m,"Graphics"),this.setPosition(M,w),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(S)},setDefaultStyles:function(v){return f(v,"lineStyle",null)&&(this.defaultStrokeWidth=f(v,"lineStyle.width",1),this.defaultStrokeColor=f(v,"lineStyle.color",16777215),this.defaultStrokeAlpha=f(v,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),f(v,"fillStyle",null)&&(this.defaultFillColor=f(v,"fillStyle.color",16777215),this.defaultFillAlpha=f(v,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(v,m,S){return S===void 0&&(S=1),this.commandBuffer.push(h.LINE_STYLE,v,m,S),this._lineWidth=v,this},fillStyle:function(v,m){return m===void 0&&(m=1),this.commandBuffer.push(h.FILL_STYLE,v,m),this},fillGradientStyle:function(v,m,S,M,w,C,A,P){return w===void 0&&(w=1),C===void 0&&(C=w),A===void 0&&(A=w),P===void 0&&(P=w),this.commandBuffer.push(h.GRADIENT_FILL_STYLE,w,C,A,P,v,m,S,M),this},lineGradientStyle:function(v,m,S,M,w,C){return C===void 0&&(C=1),this.commandBuffer.push(h.GRADIENT_LINE_STYLE,v,C,m,S,M,w),this},beginPath:function(){return this.commandBuffer.push(h.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(h.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(h.FILL_PATH),this},fill:function(){return this.commandBuffer.push(h.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(h.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(h.STROKE_PATH),this},fillCircleShape:function(v){return this.fillCircle(v.x,v.y,v.radius)},strokeCircleShape:function(v){return this.strokeCircle(v.x,v.y,v.radius)},fillCircle:function(v,m,S){return this.beginPath(),this.arc(v,m,S,0,o.PI2),this.fillPath(),this},strokeCircle:function(v,m,S){return this.beginPath(),this.arc(v,m,S,0,o.PI2),this.strokePath(),this},fillRectShape:function(v){return this.fillRect(v.x,v.y,v.width,v.height)},strokeRectShape:function(v){return this.strokeRect(v.x,v.y,v.width,v.height)},fillRect:function(v,m,S,M){return this.commandBuffer.push(h.FILL_RECT,v,m,S,M),this},strokeRect:function(v,m,S,M){var w=this._lineWidth/2,C=v-w,A=v+w;return this.beginPath(),this.moveTo(v,m),this.lineTo(v,m+M),this.strokePath(),this.beginPath(),this.moveTo(v+S,m),this.lineTo(v+S,m+M),this.strokePath(),this.beginPath(),this.moveTo(C,m),this.lineTo(A+S,m),this.strokePath(),this.beginPath(),this.moveTo(C,m+M),this.lineTo(A+S,m+M),this.strokePath(),this},fillRoundedRect:function(v,m,S,M,w){w===void 0&&(w=20);var C=w,A=w,P=w,b=w;typeof w!="number"&&(C=u(w,"tl",20),A=u(w,"tr",20),P=u(w,"bl",20),b=u(w,"br",20));var O=C>=0,I=A>=0,D=P>=0,B=b>=0;return C=Math.abs(C),A=Math.abs(A),P=Math.abs(P),b=Math.abs(b),this.beginPath(),this.moveTo(v+C,m),this.lineTo(v+S-A,m),I?this.arc(v+S-A,m+A,A,-o.TAU,0):this.arc(v+S,m,A,Math.PI,o.TAU,!0),this.lineTo(v+S,m+M-b),B?this.arc(v+S-b,m+M-b,b,0,o.TAU):this.arc(v+S,m+M,b,-o.TAU,Math.PI,!0),this.lineTo(v+P,m+M),D?this.arc(v+P,m+M-P,P,o.TAU,Math.PI):this.arc(v,m+M,P,0,-o.TAU,!0),this.lineTo(v,m+C),O?this.arc(v+C,m+C,C,-Math.PI,-o.TAU):this.arc(v,m,C,o.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(v,m,S,M,w){w===void 0&&(w=20);var C=w,A=w,P=w,b=w,O=Math.min(S,M)/2;typeof w!="number"&&(C=u(w,"tl",20),A=u(w,"tr",20),P=u(w,"bl",20),b=u(w,"br",20));var I=C>=0,D=A>=0,B=P>=0,G=b>=0;return C=Math.min(Math.abs(C),O),A=Math.min(Math.abs(A),O),P=Math.min(Math.abs(P),O),b=Math.min(Math.abs(b),O),this.beginPath(),this.moveTo(v+C,m),this.lineTo(v+S-A,m),this.moveTo(v+S-A,m),D?this.arc(v+S-A,m+A,A,-o.TAU,0):this.arc(v+S,m,A,Math.PI,o.TAU,!0),this.lineTo(v+S,m+M-b),this.moveTo(v+S,m+M-b),G?this.arc(v+S-b,m+M-b,b,0,o.TAU):this.arc(v+S,m+M,b,-o.TAU,Math.PI,!0),this.lineTo(v+P,m+M),this.moveTo(v+P,m+M),B?this.arc(v+P,m+M-P,P,o.TAU,Math.PI):this.arc(v,m+M,P,0,-o.TAU,!0),this.lineTo(v,m+C),this.moveTo(v,m+C),I?this.arc(v+C,m+C,C,-Math.PI,-o.TAU):this.arc(v,m,C,o.TAU,0,!0),this.strokePath(),this},fillPointShape:function(v,m){return this.fillPoint(v.x,v.y,m)},fillPoint:function(v,m,S){return!S||S<1?S=1:(v-=S/2,m-=S/2),this.commandBuffer.push(h.FILL_RECT,v,m,S,S),this},fillTriangleShape:function(v){return this.fillTriangle(v.x1,v.y1,v.x2,v.y2,v.x3,v.y3)},strokeTriangleShape:function(v){return this.strokeTriangle(v.x1,v.y1,v.x2,v.y2,v.x3,v.y3)},fillTriangle:function(v,m,S,M,w,C){return this.commandBuffer.push(h.FILL_TRIANGLE,v,m,S,M,w,C),this},strokeTriangle:function(v,m,S,M,w,C){return this.commandBuffer.push(h.STROKE_TRIANGLE,v,m,S,M,w,C),this},strokeLineShape:function(v){return this.lineBetween(v.x1,v.y1,v.x2,v.y2)},lineBetween:function(v,m,S,M){return this.beginPath(),this.moveTo(v,m),this.lineTo(S,M),this.strokePath(),this},lineTo:function(v,m){return this.commandBuffer.push(h.LINE_TO,v,m),this},moveTo:function(v,m){return this.commandBuffer.push(h.MOVE_TO,v,m),this},strokePoints:function(v,m,S,M){m===void 0&&(m=!1),S===void 0&&(S=!1),M===void 0&&(M=v.length),this.beginPath(),this.moveTo(v[0].x,v[0].y);for(var w=1;w-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(v,m,S){var M=this.scene.sys,w=M.game.renderer;m===void 0&&(m=M.scale.width),S===void 0&&(S=M.scale.height),p.TargetCamera.setScene(this.scene),p.TargetCamera.setViewport(0,0,m,S),p.TargetCamera.scrollX=this.x,p.TargetCamera.scrollY=this.y;var C,A,P={willReadFrequently:!0};if(typeof v=="string")if(M.textures.exists(v)){C=M.textures.get(v);var b=C.getSourceImage();b instanceof HTMLCanvasElement&&(A=b.getContext("2d",P))}else C=M.textures.createCanvas(v,m,S),A=C.getSourceImage().getContext("2d",P);else v instanceof HTMLCanvasElement&&(A=v.getContext("2d",P));return A&&(this.renderCanvas(w,this,p.TargetCamera,null,A,!1),C&&C.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});p.TargetCamera=new r,s.exports=p},32768:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(85592),d=e(20926),h=function(a,l,n,u,f,o){var c=l.commandBuffer,p=c.length,v=f||a.currentContext;if(!(p===0||!d(a,v,l,n,u))){n.addToRenderList(l);var m=1,S=1,M=0,w=0,C=1,A=0,P=0,b=0;v.beginPath();for(var O=0;O>>16,P=(M&65280)>>>8,b=M&255,v.strokeStyle="rgba("+A+","+P+","+b+","+m+")",v.lineWidth=C,O+=3;break;case r.FILL_STYLE:w=c[O+1],S=c[O+2],A=(w&16711680)>>>16,P=(w&65280)>>>8,b=w&255,v.fillStyle="rgba("+A+","+P+","+b+","+S+")",O+=2;break;case r.BEGIN_PATH:v.beginPath();break;case r.CLOSE_PATH:v.closePath();break;case r.FILL_PATH:o||v.fill();break;case r.STROKE_PATH:o||v.stroke();break;case r.FILL_RECT:o?v.rect(c[O+1],c[O+2],c[O+3],c[O+4]):v.fillRect(c[O+1],c[O+2],c[O+3],c[O+4]),O+=4;break;case r.FILL_TRIANGLE:v.beginPath(),v.moveTo(c[O+1],c[O+2]),v.lineTo(c[O+3],c[O+4]),v.lineTo(c[O+5],c[O+6]),v.closePath(),o||v.fill(),O+=6;break;case r.STROKE_TRIANGLE:v.beginPath(),v.moveTo(c[O+1],c[O+2]),v.lineTo(c[O+3],c[O+4]),v.lineTo(c[O+5],c[O+6]),v.closePath(),o||v.stroke(),O+=6;break;case r.LINE_TO:v.lineTo(c[O+1],c[O+2]),O+=2;break;case r.MOVE_TO:v.moveTo(c[O+1],c[O+2]),O+=2;break;case r.LINE_FX_TO:v.lineTo(c[O+1],c[O+2]),O+=5;break;case r.MOVE_FX_TO:v.moveTo(c[O+1],c[O+2]),O+=5;break;case r.SAVE:v.save();break;case r.RESTORE:v.restore();break;case r.TRANSLATE:v.translate(c[O+1],c[O+2]),O+=2;break;case r.SCALE:v.scale(c[O+1],c[O+2]),O+=2;break;case r.ROTATE:v.rotate(c[O+1]),O+=1;break;case r.GRADIENT_FILL_STYLE:O+=5;break;case r.GRADIENT_LINE_STYLE:O+=6;break}}v.restore()}};s.exports=h},87079:(s,y,e)=>{/** + */var r=e(85592),d=e(20926),h=function(a,l,n,u,f,o){var c=l.commandBuffer,p=c.length,v=f||a.currentContext;if(!(p===0||!d(a,v,l,n,u))){n.addToRenderList(l);var m=1,S=1,M=0,w=0,C=1,A=0,P=0,b=0;v.beginPath();for(var O=0;O>>16,P=(M&65280)>>>8,b=M&255,v.strokeStyle="rgba("+A+","+P+","+b+","+m+")",v.lineWidth=C,O+=3;break;case r.FILL_STYLE:w=c[O+1],S=c[O+2],A=(w&16711680)>>>16,P=(w&65280)>>>8,b=w&255,v.fillStyle="rgba("+A+","+P+","+b+","+S+")",O+=2;break;case r.BEGIN_PATH:v.beginPath();break;case r.CLOSE_PATH:v.closePath();break;case r.FILL_PATH:o||v.fill();break;case r.STROKE_PATH:o||v.stroke();break;case r.FILL_RECT:o?v.rect(c[O+1],c[O+2],c[O+3],c[O+4]):v.fillRect(c[O+1],c[O+2],c[O+3],c[O+4]),O+=4;break;case r.FILL_TRIANGLE:v.beginPath(),v.moveTo(c[O+1],c[O+2]),v.lineTo(c[O+3],c[O+4]),v.lineTo(c[O+5],c[O+6]),v.closePath(),o||v.fill(),O+=6;break;case r.STROKE_TRIANGLE:v.beginPath(),v.moveTo(c[O+1],c[O+2]),v.lineTo(c[O+3],c[O+4]),v.lineTo(c[O+5],c[O+6]),v.closePath(),o||v.stroke(),O+=6;break;case r.LINE_TO:v.lineTo(c[O+1],c[O+2]),O+=2;break;case r.MOVE_TO:v.moveTo(c[O+1],c[O+2]),O+=2;break;case r.LINE_FX_TO:v.lineTo(c[O+1],c[O+2]),O+=5;break;case r.MOVE_FX_TO:v.moveTo(c[O+1],c[O+2]),O+=5;break;case r.SAVE:v.save();break;case r.RESTORE:v.restore();break;case r.TRANSLATE:v.translate(c[O+1],c[O+2]),O+=2;break;case r.SCALE:v.scale(c[O+1],c[O+2]),O+=2;break;case r.ROTATE:v.rotate(c[O+1]),O+=1;break;case r.GRADIENT_FILL_STYLE:O+=5;break;case r.GRADIENT_LINE_STYLE:O+=6;break}}v.restore()}};s.exports=h},87079:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(44603),d=e(43831);r.register("graphics",function(h,a){h===void 0&&(h={}),a!==void 0&&(h.add=a);var l=new d(this.scene,h);return h.add&&this.scene.sys.displayList.add(l),l})},1201:(s,y,e)=>{/** + */var r=e(44603),d=e(43831);r.register("graphics",function(h,a){h===void 0&&(h={}),a!==void 0&&(h.add=a);var l=new d(this.scene,h);return h.add&&this.scene.sys.displayList.add(l),l})},1201:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43831),d=e(39429);d.register("graphics",function(h){return this.displayList.add(new r(this.scene,h))})},84503:(s,y,e)=>{/** + */var r=e(43831),d=e(39429);d.register("graphics",function(h){return this.displayList.add(new r(this.scene,h))})},84503:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(77545),h=e(32768),h=e(32768),s.exports={renderWebGL:d,renderCanvas:h}},77545:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(77545),h=e(32768),h=e(32768),s.exports={renderWebGL:d,renderCanvas:h}},77545:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(85592),d=e(91296),h=e(61340),a=e(70554),l=function(c,p,v){this.x=c,this.y=p,this.width=v},n=function(c,p,v){this.points=[],this.pointsLength=1,this.points[0]=new l(c,p,v)},u=[],f=new h,o=function(c,p,v,m){if(p.commandBuffer.length!==0){v.addToRenderList(p);var S=c.pipelines.set(p.pipeline,p);c.pipelines.preBatch(p);for(var M=d(p,v,m).calc,w=f.loadIdentity(),C=p.commandBuffer,A=v.alpha*p.alpha,P=1,b=S.fillTint,O=S.strokeTint,I=0,D=0,B=0,G=.01,z=Math.PI*2,X,j=[],Q=0,tt=!0,Y=null,Z=a.getTintAppendFloatAlpha,U=0;U0&&(Dt=-z+Dt%z):Dt>z?Dt=z:Dt<0&&(Dt=z+Dt%z),Y===null&&(Y=new n(Vt+Math.cos(Rt)*ut,dt+Math.sin(Rt)*ut,P),j.push(Y),Pt+=G);Pt<1+Bt;)B=Dt*Pt+Rt,I=Vt+Math.cos(B)*ut,D=dt+Math.sin(B)*ut,Y.points.push(new l(I,D,P)),Pt+=G;B=Dt+Rt,I=Vt+Math.cos(B)*ut,D=dt+Math.sin(B)*ut,Y.points.push(new l(I,D,P));break}case r.FILL_RECT:{S.batchFillRect(C[++U],C[++U],C[++U],C[++U],w,M);break}case r.FILL_TRIANGLE:{S.batchFillTriangle(C[++U],C[++U],C[++U],C[++U],C[++U],C[++U],w,M);break}case r.STROKE_TRIANGLE:{S.batchStrokeTriangle(C[++U],C[++U],C[++U],C[++U],C[++U],C[++U],P,w,M);break}case r.LINE_TO:{Y!==null?Y.points.push(new l(C[++U],C[++U],P)):(Y=new n(C[++U],C[++U],P),j.push(Y));break}case r.MOVE_TO:{Y=new n(C[++U],C[++U],P),j.push(Y);break}case r.SAVE:{u.push(w.copyToArray());break}case r.RESTORE:{w.copyFromArray(u.pop());break}case r.TRANSLATE:{Vt=C[++U],dt=C[++U],w.translate(Vt,dt);break}case r.SCALE:{Vt=C[++U],dt=C[++U],w.scale(Vt,dt);break}case r.ROTATE:{w.rotate(C[++U]);break}}c.pipelines.postBatch(p)}};s.exports=o},26479:(s,y,e)=>{/** + */var r=e(85592),d=e(91296),h=e(61340),a=e(70554),l=function(c,p,v){this.x=c,this.y=p,this.width=v},n=function(c,p,v){this.points=[],this.pointsLength=1,this.points[0]=new l(c,p,v)},u=[],f=new h,o=function(c,p,v,m){if(p.commandBuffer.length!==0){v.addToRenderList(p);var S=c.pipelines.set(p.pipeline,p);c.pipelines.preBatch(p);for(var M=d(p,v,m).calc,w=f.loadIdentity(),C=p.commandBuffer,A=v.alpha*p.alpha,P=1,b=S.fillTint,O=S.strokeTint,I=0,D=0,B=0,G=.01,z=Math.PI*2,X,j=[],Q=0,tt=!0,Y=null,$=a.getTintAppendFloatAlpha,U=0;U0&&(Dt=-z+Dt%z):Dt>z?Dt=z:Dt<0&&(Dt=z+Dt%z),Y===null&&(Y=new n(Vt+Math.cos(Rt)*ut,dt+Math.sin(Rt)*ut,P),j.push(Y),Pt+=G);Pt<1+Bt;)B=Dt*Pt+Rt,I=Vt+Math.cos(B)*ut,D=dt+Math.sin(B)*ut,Y.points.push(new l(I,D,P)),Pt+=G;B=Dt+Rt,I=Vt+Math.cos(B)*ut,D=dt+Math.sin(B)*ut,Y.points.push(new l(I,D,P));break}case r.FILL_RECT:{S.batchFillRect(C[++U],C[++U],C[++U],C[++U],w,M);break}case r.FILL_TRIANGLE:{S.batchFillTriangle(C[++U],C[++U],C[++U],C[++U],C[++U],C[++U],w,M);break}case r.STROKE_TRIANGLE:{S.batchStrokeTriangle(C[++U],C[++U],C[++U],C[++U],C[++U],C[++U],P,w,M);break}case r.LINE_TO:{Y!==null?Y.points.push(new l(C[++U],C[++U],P)):(Y=new n(C[++U],C[++U],P),j.push(Y));break}case r.MOVE_TO:{Y=new n(C[++U],C[++U],P),j.push(Y);break}case r.SAVE:{u.push(w.copyToArray());break}case r.RESTORE:{w.copyFromArray(u.pop());break}case r.TRANSLATE:{Vt=C[++U],dt=C[++U],w.translate(Vt,dt);break}case r.SCALE:{Vt=C[++U],dt=C[++U],w.scale(Vt,dt);break}case r.ROTATE:{w.rotate(C[++U]);break}}c.pipelines.postBatch(p)}};s.exports=o},26479:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(61061),d=e(83419),h=e(51708),a=e(50792),l=e(46710),n=e(95540),u=e(35154),f=e(97022),o=e(41212),c=e(88492),p=e(35072),v=e(68287),m=new d({Extends:a,initialize:function(M,w,C){a.call(this),C?w&&!Array.isArray(w)&&(w=[w]):Array.isArray(w)?o(w[0])&&(C=w,w=null):o(w)&&(C=w,w=null),this.scene=M,this.children=new p,this.isParent=!0,this.type="Group",this.classType=n(C,"classType",v),this.name=n(C,"name",""),this.active=n(C,"active",!0),this.maxSize=n(C,"maxSize",-1),this.defaultKey=n(C,"defaultKey",null),this.defaultFrame=n(C,"defaultFrame",null),this.runChildUpdate=n(C,"runChildUpdate",!1),this.createCallback=n(C,"createCallback",null),this.removeCallback=n(C,"removeCallback",null),this.createMultipleCallback=n(C,"createMultipleCallback",null),this.internalCreateCallback=n(C,"internalCreateCallback",null),this.internalRemoveCallback=n(C,"internalRemoveCallback",null),w&&this.addMultiple(w),C&&this.createMultiple(C),this.on(h.ADDED_TO_SCENE,this.addedToScene,this),this.on(h.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(S,M,w,C,A,P){if(S===void 0&&(S=0),M===void 0&&(M=0),w===void 0&&(w=this.defaultKey),C===void 0&&(C=this.defaultFrame),A===void 0&&(A=!0),P===void 0&&(P=!0),this.isFull())return null;var b=new this.classType(this.scene,S,M,w,C);return b.addToDisplayList(this.scene.sys.displayList),b.addToUpdateList(),b.visible=A,b.setActive(P),this.add(b),b},createMultiple:function(S){if(this.isFull())return[];Array.isArray(S)||(S=[S]);var M=[];if(S[0].key)for(var w=0;w=0;B--)if(D=z[B],D.active===w){if(G++,G===M)break}else D=null;return D?(typeof A=="number"&&(D.x=A),typeof P=="number"&&(D.y=P),D):C?this.create(A,P,b,O,I):null},get:function(S,M,w,C,A){return this.getFirst(!1,!0,S,M,w,C,A)},getFirstAlive:function(S,M,w,C,A,P){return this.getFirst(!0,S,M,w,C,A,P)},getFirstDead:function(S,M,w,C,A,P){return this.getFirst(!1,S,M,w,C,A,P)},playAnimation:function(S,M){return r.PlayAnimation(this.children.entries,S,M),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(S){S===void 0&&(S=!0);for(var M=0,w=0;w{/** + */var r=e(61061),d=e(83419),h=e(51708),a=e(50792),l=e(46710),n=e(95540),u=e(35154),f=e(97022),o=e(41212),c=e(88492),p=e(35072),v=e(68287),m=new d({Extends:a,initialize:function(M,w,C){a.call(this),C?w&&!Array.isArray(w)&&(w=[w]):Array.isArray(w)?o(w[0])&&(C=w,w=null):o(w)&&(C=w,w=null),this.scene=M,this.children=new p,this.isParent=!0,this.type="Group",this.classType=n(C,"classType",v),this.name=n(C,"name",""),this.active=n(C,"active",!0),this.maxSize=n(C,"maxSize",-1),this.defaultKey=n(C,"defaultKey",null),this.defaultFrame=n(C,"defaultFrame",null),this.runChildUpdate=n(C,"runChildUpdate",!1),this.createCallback=n(C,"createCallback",null),this.removeCallback=n(C,"removeCallback",null),this.createMultipleCallback=n(C,"createMultipleCallback",null),this.internalCreateCallback=n(C,"internalCreateCallback",null),this.internalRemoveCallback=n(C,"internalRemoveCallback",null),w&&this.addMultiple(w),C&&this.createMultiple(C),this.on(h.ADDED_TO_SCENE,this.addedToScene,this),this.on(h.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(S,M,w,C,A,P){if(S===void 0&&(S=0),M===void 0&&(M=0),w===void 0&&(w=this.defaultKey),C===void 0&&(C=this.defaultFrame),A===void 0&&(A=!0),P===void 0&&(P=!0),this.isFull())return null;var b=new this.classType(this.scene,S,M,w,C);return b.addToDisplayList(this.scene.sys.displayList),b.addToUpdateList(),b.visible=A,b.setActive(P),this.add(b),b},createMultiple:function(S){if(this.isFull())return[];Array.isArray(S)||(S=[S]);var M=[];if(S[0].key)for(var w=0;w=0;B--)if(D=z[B],D.active===w){if(G++,G===M)break}else D=null;return D?(typeof A=="number"&&(D.x=A),typeof P=="number"&&(D.y=P),D):C?this.create(A,P,b,O,I):null},get:function(S,M,w,C,A){return this.getFirst(!1,!0,S,M,w,C,A)},getFirstAlive:function(S,M,w,C,A,P){return this.getFirst(!0,S,M,w,C,A,P)},getFirstDead:function(S,M,w,C,A,P){return this.getFirst(!1,S,M,w,C,A,P)},playAnimation:function(S,M){return r.PlayAnimation(this.children.entries,S,M),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(S){S===void 0&&(S=!0);for(var M=0,w=0;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(44603),d=e(26479);r.register("group",function(h){return new d(this.scene,null,h)})},3385:(s,y,e)=>{/** + */var r=e(44603),d=e(26479);r.register("group",function(h){return new d(this.scene,null,h)})},3385:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26479),d=e(39429);d.register("group",function(h,a){return this.updateList.add(new r(this.scene,h,a))})},88571:(s,y,e)=>{/** + */var r=e(26479),d=e(39429);d.register("group",function(h,a){return this.updateList.add(new r(this.scene,h,a))})},88571:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1555,15 +1555,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){d.addToRenderList(r),e.batchSprite(r,r.frame,d,h)};s.exports=y},82459:(s,y,e)=>{/** + */var x=function(e,r,d,h){d.addToRenderList(r),e.batchSprite(r,r.frame,d,h)};s.exports=x},82459:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(44603),h=e(23568),a=e(88571);d.register("image",function(l,n){l===void 0&&(l={});var u=h(l,"key",null),f=h(l,"frame",null),o=new a(this.scene,0,0,u,f);return n!==void 0&&(l.add=n),r(this.scene,o,l),o})},2117:(s,y,e)=>{/** + */var r=e(25305),d=e(44603),h=e(23568),a=e(88571);d.register("image",function(l,n){l===void 0&&(l={});var u=h(l,"key",null),f=h(l,"frame",null),o=new a(this.scene,0,0,u,f);return n!==void 0&&(l.add=n),r(this.scene,o,l),o})},2117:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(88571),d=e(39429);d.register("image",function(h,a,l,n){return this.displayList.add(new r(this.scene,h,a,l,n))})},59819:(s,y,e)=>{/** + */var r=e(88571),d=e(39429);d.register("image",function(h,a,l,n){return this.displayList.add(new r(this.scene,h,a,l,n))})},59819:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1571,11 +1571,11 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){d.addToRenderList(r),this.pipeline.batchSprite(r,d,h)};s.exports=y},77856:(s,y,e)=>{/** + */var x=function(e,r,d,h){d.addToRenderList(r),this.pipeline.batchSprite(r,d,h)};s.exports=x},77856:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r={Events:e(51708),DisplayList:e(8050),GameObjectCreator:e(44603),GameObjectFactory:e(39429),UpdateList:e(45027),Components:e(31401),GetCalcMatrix:e(91296),BuildGameObject:e(25305),BuildGameObjectAnimation:e(13059),GameObject:e(95643),BitmapText:e(22186),Blitter:e(6107),Bob:e(46590),Container:e(31559),DOMElement:e(3069),DynamicBitmapText:e(2638),Extern:e(42421),Graphics:e(43831),Group:e(26479),Image:e(88571),Layer:e(93595),Particles:e(18404),PathFollower:e(1159),RenderTexture:e(591),RetroFont:e(196),Rope:e(77757),Sprite:e(68287),Text:e(50171),GetTextSize:e(14220),MeasureText:e(79557),TextStyle:e(35762),TileSprite:e(20839),Zone:e(41481),Video:e(18471),Shape:e(17803),Arc:e(23629),Curve:e(89),Ellipse:e(19921),Grid:e(30479),IsoBox:e(61475),IsoTriangle:e(16933),Line:e(57847),Polygon:e(24949),Rectangle:e(74561),Star:e(55911),Triangle:e(36931),Factories:{Blitter:e(12709),Container:e(24961),DOMElement:e(2611),DynamicBitmapText:e(72566),Extern:e(56315),Graphics:e(1201),Group:e(3385),Image:e(2117),Layer:e(20005),Particles:e(676),PathFollower:e(90145),RenderTexture:e(60505),Rope:e(96819),Sprite:e(46409),StaticBitmapText:e(34914),Text:e(68005),TileSprite:e(91681),Zone:e(84175),Video:e(89025),Arc:e(42563),Curve:e(40511),Ellipse:e(1543),Grid:e(34137),IsoBox:e(3933),IsoTriangle:e(49803),Line:e(2481),Polygon:e(64827),Rectangle:e(87959),Star:e(93697),Triangle:e(45245)},Creators:{Blitter:e(9403),Container:e(77143),DynamicBitmapText:e(11164),Graphics:e(87079),Group:e(94975),Image:e(82459),Layer:e(25179),Particles:e(92730),RenderTexture:e(34495),Rope:e(26209),Sprite:e(15567),StaticBitmapText:e(57336),Text:e(71259),TileSprite:e(14167),Zone:e(95261),Video:e(11511)}};r.Shader=e(20071),r.Mesh=e(4703),r.NineSlice=e(28103),r.PointLight=e(80321),r.Plane=e(33663),r.Factories.Shader=e(74177),r.Factories.Mesh=e(9225),r.Factories.NineSlice=e(47521),r.Factories.PointLight=e(71255),r.Factories.Plane=e(30985),r.Creators.Shader=e(54935),r.Creators.Mesh=e(20527),r.Creators.NineSlice=e(28279),r.Creators.PointLight=e(39829),r.Creators.Plane=e(56015),r.Light=e(41432),r.LightsManager=e(61356),r.LightsPlugin=e(88992),s.exports=r},93595:(s,y,e)=>{/** + */var r={Events:e(51708),DisplayList:e(8050),GameObjectCreator:e(44603),GameObjectFactory:e(39429),UpdateList:e(45027),Components:e(31401),GetCalcMatrix:e(91296),BuildGameObject:e(25305),BuildGameObjectAnimation:e(13059),GameObject:e(95643),BitmapText:e(22186),Blitter:e(6107),Bob:e(46590),Container:e(31559),DOMElement:e(3069),DynamicBitmapText:e(2638),Extern:e(42421),Graphics:e(43831),Group:e(26479),Image:e(88571),Layer:e(93595),Particles:e(18404),PathFollower:e(1159),RenderTexture:e(591),RetroFont:e(196),Rope:e(77757),Sprite:e(68287),Text:e(50171),GetTextSize:e(14220),MeasureText:e(79557),TextStyle:e(35762),TileSprite:e(20839),Zone:e(41481),Video:e(18471),Shape:e(17803),Arc:e(23629),Curve:e(89),Ellipse:e(19921),Grid:e(30479),IsoBox:e(61475),IsoTriangle:e(16933),Line:e(57847),Polygon:e(24949),Rectangle:e(74561),Star:e(55911),Triangle:e(36931),Factories:{Blitter:e(12709),Container:e(24961),DOMElement:e(2611),DynamicBitmapText:e(72566),Extern:e(56315),Graphics:e(1201),Group:e(3385),Image:e(2117),Layer:e(20005),Particles:e(676),PathFollower:e(90145),RenderTexture:e(60505),Rope:e(96819),Sprite:e(46409),StaticBitmapText:e(34914),Text:e(68005),TileSprite:e(91681),Zone:e(84175),Video:e(89025),Arc:e(42563),Curve:e(40511),Ellipse:e(1543),Grid:e(34137),IsoBox:e(3933),IsoTriangle:e(49803),Line:e(2481),Polygon:e(64827),Rectangle:e(87959),Star:e(93697),Triangle:e(45245)},Creators:{Blitter:e(9403),Container:e(77143),DynamicBitmapText:e(11164),Graphics:e(87079),Group:e(94975),Image:e(82459),Layer:e(25179),Particles:e(92730),RenderTexture:e(34495),Rope:e(26209),Sprite:e(15567),StaticBitmapText:e(57336),Text:e(71259),TileSprite:e(14167),Zone:e(95261),Video:e(11511)}};r.Shader=e(20071),r.Mesh=e(4703),r.NineSlice=e(28103),r.PointLight=e(80321),r.Plane=e(33663),r.Factories.Shader=e(74177),r.Factories.Mesh=e(9225),r.Factories.NineSlice=e(47521),r.Factories.PointLight=e(71255),r.Factories.Plane=e(30985),r.Creators.Shader=e(54935),r.Creators.Mesh=e(20527),r.Creators.NineSlice=e(28279),r.Creators.PointLight=e(39829),r.Creators.Plane=e(56015),r.Light=e(41432),r.LightsManager=e(61356),r.LightsPlugin=e(88992),s.exports=r},93595:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1583,15 +1583,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=r.list;if(h.length!==0){r.depthSort();var a=r.blendMode!==-1;a||e.setBlendMode(0);var l=r._alpha;r.mask&&r.mask.preRenderCanvas(e,null,d);for(var n=0;n{/** + */var x=function(e,r,d){var h=r.list;if(h.length!==0){r.depthSort();var a=r.blendMode!==-1;a||e.setBlendMode(0);var l=r._alpha;r.mask&&r.mask.preRenderCanvas(e,null,d);for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(93595),h=e(44603),a=e(23568);h.register("layer",function(l,n){l===void 0&&(l={});var u=a(l,"children",null),f=new d(this.scene,u);return n!==void 0&&(l.add=n),r(this.scene,f,l),f})},20005:(s,y,e)=>{/** + */var r=e(25305),d=e(93595),h=e(44603),a=e(23568);h.register("layer",function(l,n){l===void 0&&(l={});var u=a(l,"children",null),f=new d(this.scene,u);return n!==void 0&&(l.add=n),r(this.scene,f,l),f})},20005:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(93595),d=e(39429);d.register("layer",function(h){return this.displayList.add(new r(this.scene,h))})},33963:(s,y,e)=>{/** + */var r=e(93595),d=e(39429);d.register("layer",function(h){return this.displayList.add(new r(this.scene,h))})},33963:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1599,107 +1599,107 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=r.list,a=h.length;if(a!==0){r.depthSort(),e.pipelines.preBatch(r);var l=r.blendMode!==-1;l||e.setBlendMode(0);for(var n=r.alpha,u=0;u{/** + */var x=function(e,r,d){var h=r.list,a=h.length;if(a!==0){r.depthSort(),e.pipelines.preBatch(r);var l=r.blendMode!==-1;l||e.setBlendMode(0);for(var n=r.alpha,u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(96503),d=e(83419),h=e(31401),a=e(51767),l=e(70554),n=new d({Extends:r,Mixins:[h.Origin,h.ScrollFactor,h.Visible],initialize:function(f,o,c,p,v,m,S){r.call(this,f,o,c),this.color=new a(p,v,m),this.intensity=S,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(c)},displayWidth:{get:function(){return this.diameter},set:function(u){this.diameter=u}},displayHeight:{get:function(){return this.diameter},set:function(u){this.diameter=u}},width:{get:function(){return this.diameter},set:function(u){this.diameter=u}},height:{get:function(){return this.diameter},set:function(u){this.diameter=u}},willRender:function(u){return!(n.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&u.id)},setColor:function(u){var f=l.getFloatsFromUintRGB(u);return this.color.set(f[0],f[1],f[2]),this},setIntensity:function(u){return this.intensity=u,this},setRadius:function(u){return this.radius=u,this}});n.RENDER_MASK=15,s.exports=n},61356:(s,y,e)=>{/** + */var r=e(96503),d=e(83419),h=e(31401),a=e(51767),l=e(70554),n=new d({Extends:r,Mixins:[h.Origin,h.ScrollFactor,h.Visible],initialize:function(f,o,c,p,v,m,S){r.call(this,f,o,c),this.color=new a(p,v,m),this.intensity=S,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(c)},displayWidth:{get:function(){return this.diameter},set:function(u){this.diameter=u}},displayHeight:{get:function(){return this.diameter},set:function(u){this.diameter=u}},width:{get:function(){return this.diameter},set:function(u){this.diameter=u}},height:{get:function(){return this.diameter},set:function(u){this.diameter=u}},willRender:function(u){return!(n.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&u.id)},setColor:function(u){var f=l.getFloatsFromUintRGB(u);return this.color.set(f[0],f[1],f[2]),this},setIntensity:function(u){return this.intensity=u,this},setRadius:function(u){return this.radius=u,this}});n.RENDER_MASK=15,s.exports=n},61356:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(81491),d=e(83419),h=e(20339),a=e(41432),l=e(80321),n=e(51767),u=e(19133),f=e(19186),o=e(70554),c=new d({initialize:function(){this.lights=[],this.ambientColor=new n(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(p,v,m,S,M,w){return this.systems.displayList.add(new l(this.scene,p,v,m,S,M,w))},enable:function(){return this.maxLights===-1&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(p){for(var v=this.lights,m=p.worldView,S=[],M=0;Mthis.maxLights&&(f(S,this.sortByDistance),S=S.slice(0,this.maxLights)),this.visibleLights=S.length,S},sortByDistance:function(p,v){return p.distance>=v.distance},setAmbientColor:function(p){var v=o.getFloatsFromUintRGB(p);return this.ambientColor.set(v[0],v[1],v[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(p,v,m,S,M){p===void 0&&(p=0),v===void 0&&(v=0),m===void 0&&(m=128),S===void 0&&(S=16777215),M===void 0&&(M=1);var w=o.getFloatsFromUintRGB(S),C=new a(p,v,m,w[0],w[1],w[2],M);return this.lights.push(C),C},removeLight:function(p){var v=this.lights.indexOf(p);return v>=0&&u(this.lights,v),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});s.exports=c},88992:(s,y,e)=>{/** + */var r=e(81491),d=e(83419),h=e(20339),a=e(41432),l=e(80321),n=e(51767),u=e(19133),f=e(19186),o=e(70554),c=new d({initialize:function(){this.lights=[],this.ambientColor=new n(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(p,v,m,S,M,w){return this.systems.displayList.add(new l(this.scene,p,v,m,S,M,w))},enable:function(){return this.maxLights===-1&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(p){for(var v=this.lights,m=p.worldView,S=[],M=0;Mthis.maxLights&&(f(S,this.sortByDistance),S=S.slice(0,this.maxLights)),this.visibleLights=S.length,S},sortByDistance:function(p,v){return p.distance>=v.distance},setAmbientColor:function(p){var v=o.getFloatsFromUintRGB(p);return this.ambientColor.set(v[0],v[1],v[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(p,v,m,S,M){p===void 0&&(p=0),v===void 0&&(v=0),m===void 0&&(m=128),S===void 0&&(S=16777215),M===void 0&&(M=1);var w=o.getFloatsFromUintRGB(S),C=new a(p,v,m,w[0],w[1],w[2],M);return this.lights.push(C),C},removeLight:function(p){var v=this.lights.indexOf(p);return v>=0&&u(this.lights,v),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});s.exports=c},88992:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(61356),h=e(37277),a=e(44594),l=new r({Extends:d,initialize:function(u){this.scene=u,this.systems=u.sys,u.sys.settings.isBooted||u.sys.events.once(a.BOOT,this.boot,this),d.call(this)},boot:function(){var n=this.systems.events;n.on(a.SHUTDOWN,this.shutdown,this),n.on(a.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});h.register("LightsPlugin",l,"lights"),s.exports=l},4703:(s,y,e)=>{/** + */var r=e(83419),d=e(61356),h=e(37277),a=e(44594),l=new r({Extends:d,initialize:function(u){this.scene=u,this.systems=u.sys,u.sys.settings.isBooted||u.sys.events.once(a.BOOT,this.boot,this),d.call(this)},boot:function(){var n=this.systems.events;n.on(a.SHUTDOWN,this.shutdown,this),n.on(a.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});h.register("LightsPlugin",l,"lights"),s.exports=l},4703:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(31401),h=e(39506),a=e(83997),l=e(95643),n=e(34684),u=e(92515),f=e(91296),o=e(37867),c=e(29807),p=e(43396),v=e(19186),m=e(25836),S=e(39318),M=new r({Extends:l,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.Mask,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Size,d.Texture,d.Transform,d.Visible,c],initialize:function(C,A,P,b,O,I,D,B,G,z,X,j){A===void 0&&(A=0),P===void 0&&(P=0),b===void 0&&(b="__WHITE"),l.call(this,C,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new m,this.modelScale=new m(1,1,1),this.modelRotation=new m,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new o,this.viewPosition=new m,this.viewMatrix=new o,this.projectionMatrix=new o,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var Q=C.sys.renderer;this.setPosition(A,P),this.setTexture(b,O),this.setSize(Q.width,Q.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(Q.width,Q.height),I&&this.addVertices(I,D,B,G,z,X,j)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(w){return this.viewPosition.addScale(m.LEFT,w),this.dirtyCache[10]=1,this},panY:function(w){return this.viewPosition.y+=m.DOWN.y*w,this.dirtyCache[10]=1,this},panZ:function(w){return this.viewPosition.z+=w,this.dirtyCache[10]=1,this},setPerspective:function(w,C,A,P,b){return A===void 0&&(A=45),P===void 0&&(P=.01),b===void 0&&(b=1e3),this.fov=A,this.projectionMatrix.perspective(h(A),w/C,P,b),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(w,C,A,P){return w===void 0&&(w=this.scene.sys.renderer.getAspectRatio()),C===void 0&&(C=1),A===void 0&&(A=-1e3),P===void 0&&(P=1e3),this.fov=0,this.projectionMatrix.ortho(-w,w,-C,C,A,P),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(w){w.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(w,C,A,P,b,O,I,D,B){var G=this.scene.sys.cache.obj.get(w),z;return G&&(z=n(G,this,C,A,P,b,O,I,D,B)),(!z||z.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",w),this},sortByDepth:function(w,C){return w.depth-C.depth},depthSort:function(){return v(this.faces,this.sortByDepth),this},addVertex:function(w,C,A,P,b,O,I){var D=new S(w,C,A,P,b,O,I);return this.vertices.push(D),D},addFace:function(w,C,A){var P=new a(w,C,A);return this.faces.push(P),this.dirtyCache[9]=-1,P},addVertices:function(w,C,A,P,b,O,I){var D=u(w,C,A,P,b,O,I);return D?(this.faces=this.faces.concat(D.faces),this.vertices=this.vertices.concat(D.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(w){return this.faces[w]},hasFaceAt:function(w,C,A){A===void 0&&(A=this.scene.sys.cameras.main);for(var P=f(this,A).calc,b=this.faces,O=0;O{/** + */var r=e(83419),d=e(31401),h=e(39506),a=e(83997),l=e(95643),n=e(34684),u=e(92515),f=e(91296),o=e(37867),c=e(29807),p=e(43396),v=e(19186),m=e(25836),S=e(39318),M=new r({Extends:l,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.Mask,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Size,d.Texture,d.Transform,d.Visible,c],initialize:function(C,A,P,b,O,I,D,B,G,z,X,j){A===void 0&&(A=0),P===void 0&&(P=0),b===void 0&&(b="__WHITE"),l.call(this,C,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new m,this.modelScale=new m(1,1,1),this.modelRotation=new m,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new o,this.viewPosition=new m,this.viewMatrix=new o,this.projectionMatrix=new o,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var Q=C.sys.renderer;this.setPosition(A,P),this.setTexture(b,O),this.setSize(Q.width,Q.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(Q.width,Q.height),I&&this.addVertices(I,D,B,G,z,X,j)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(w){return this.viewPosition.addScale(m.LEFT,w),this.dirtyCache[10]=1,this},panY:function(w){return this.viewPosition.y+=m.DOWN.y*w,this.dirtyCache[10]=1,this},panZ:function(w){return this.viewPosition.z+=w,this.dirtyCache[10]=1,this},setPerspective:function(w,C,A,P,b){return A===void 0&&(A=45),P===void 0&&(P=.01),b===void 0&&(b=1e3),this.fov=A,this.projectionMatrix.perspective(h(A),w/C,P,b),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(w,C,A,P){return w===void 0&&(w=this.scene.sys.renderer.getAspectRatio()),C===void 0&&(C=1),A===void 0&&(A=-1e3),P===void 0&&(P=1e3),this.fov=0,this.projectionMatrix.ortho(-w,w,-C,C,A,P),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(w){w.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(w,C,A,P,b,O,I,D,B){var G=this.scene.sys.cache.obj.get(w),z;return G&&(z=n(G,this,C,A,P,b,O,I,D,B)),(!z||z.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",w),this},sortByDepth:function(w,C){return w.depth-C.depth},depthSort:function(){return v(this.faces,this.sortByDepth),this},addVertex:function(w,C,A,P,b,O,I){var D=new S(w,C,A,P,b,O,I);return this.vertices.push(D),D},addFace:function(w,C,A){var P=new a(w,C,A);return this.faces.push(P),this.dirtyCache[9]=-1,P},addVertices:function(w,C,A,P,b,O,I){var D=u(w,C,A,P,b,O,I);return D?(this.faces=this.faces.concat(D.faces),this.vertices=this.vertices.concat(D.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(w){return this.faces[w]},hasFaceAt:function(w,C,A){A===void 0&&(A=this.scene.sys.cameras.main);for(var P=f(this,A).calc,b=this.faces,O=0;O{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(){};s.exports=y},20527:(s,y,e)=>{/** + */var x=function(){};s.exports=x},20527:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(44603),h=e(23568),a=e(35154),l=e(4703);d.register("mesh",function(n,u){n===void 0&&(n={});var f=h(n,"key",null),o=h(n,"frame",null),c=a(n,"vertices",[]),p=a(n,"uvs",[]),v=a(n,"indicies",[]),m=a(n,"containsZ",!1),S=a(n,"normals",[]),M=a(n,"colors",16777215),w=a(n,"alphas",1),C=new l(this.scene,0,0,f,o,c,p,v,m,S,M,w);return u!==void 0&&(n.add=u),r(this.scene,C,n),C})},9225:(s,y,e)=>{/** + */var r=e(25305),d=e(44603),h=e(23568),a=e(35154),l=e(4703);d.register("mesh",function(n,u){n===void 0&&(n={});var f=h(n,"key",null),o=h(n,"frame",null),c=a(n,"vertices",[]),p=a(n,"uvs",[]),v=a(n,"indicies",[]),m=a(n,"containsZ",!1),S=a(n,"normals",[]),M=a(n,"colors",16777215),w=a(n,"alphas",1),C=new l(this.scene,0,0,f,o,c,p,v,m,S,M,w);return u!==void 0&&(n.add=u),r(this.scene,C,n),C})},9225:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(4703),d=e(39429);d.register("mesh",function(h,a,l,n,u,f,o,c,p,v,m){return this.displayList.add(new r(this.scene,h,a,l,n,u,f,o,c,p,v,m))})},29807:(s,y,e)=>{/** + */var r=e(4703),d=e(39429);d.register("mesh",function(h,a,l,n,u,f,o,c,p,v,m){return this.displayList.add(new r(this.scene,h,a,l,n,u,f,o,c,p,v,m))})},29807:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(48833),h=e(36488),s.exports={renderWebGL:d,renderCanvas:h}},48833:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(48833),h=e(36488),s.exports={renderWebGL:d,renderCanvas:h}},48833:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91296),d=function(h,a,l,n){var u=a.faces,f=u.length;if(f!==0){l.addToRenderList(a);var o=h.pipelines.set(a.pipeline,a),c=r(a,l,n).calc;h.pipelines.preBatch(a);for(var p=o.setGameObject(a),v=o.vertexViewF32,m=o.vertexViewU32,S=o.vertexCount*o.currentShader.vertexComponentCount-1,M=a.tintFill,w=[],C=a.debugCallback,A=c.a,P=c.b,b=c.c,O=c.d,I=c.e,D=c.f,B=a.viewPosition.z,G=a.hideCCW,z=l.roundPixels,X=l.alpha*a.alpha,j=0,Q=0;Q{/** + */var r=e(91296),d=function(h,a,l,n){var u=a.faces,f=u.length;if(f!==0){l.addToRenderList(a);var o=h.pipelines.set(a.pipeline,a),c=r(a,l,n).calc;h.pipelines.preBatch(a);for(var p=o.setGameObject(a),v=o.vertexViewF32,m=o.vertexViewU32,S=o.vertexCount*o.currentShader.vertexComponentCount-1,M=a.tintFill,w=[],C=a.debugCallback,A=c.a,P=c.b,b=c.c,O=c.d,I=c.e,D=c.f,B=a.viewPosition.z,G=a.hideCCW,z=l.roundPixels,X=l.alpha*a.alpha,j=0,Q=0;Q{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(31401),h=e(95643),a=e(78023),l=e(39318),n=new r({Extends:h,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.GetBounds,d.Mask,d.Origin,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Texture,d.Transform,d.Visible,a],initialize:function(f,o,c,p,v,m,S,M,w,C,A){h.call(this,f,"NineSlice"),this._width,this._height,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth,this.rightWidth,this.topHeight,this.bottomHeight,this.tint=16777215,this.tintFill=!1;var P=f.textures.getFrame(p,v);this.is3Slice=!C&&!A,P.scale9&&(this.is3Slice=P.is3Slice);for(var b=this.is3Slice?18:54,O=0;O{/** + */var r=e(83419),d=e(31401),h=e(95643),a=e(78023),l=e(39318),n=new r({Extends:h,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.GetBounds,d.Mask,d.Origin,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Texture,d.Transform,d.Visible,a],initialize:function(f,o,c,p,v,m,S,M,w,C,A){h.call(this,f,"NineSlice"),this._width,this._height,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth,this.rightWidth,this.topHeight,this.bottomHeight,this.tint=16777215,this.tintFill=!1;var P=f.textures.getFrame(p,v);this.is3Slice=!C&&!A,P.scale9&&(this.is3Slice=P.is3Slice);for(var b=this.is3Slice?18:54,O=0;O{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(44603),h=e(23568),a=e(35154),l=e(28103);d.register("nineslice",function(n,u){n===void 0&&(n={});var f=h(n,"key",null),o=h(n,"frame",null),c=a(n,"width",256),p=a(n,"height",256),v=a(n,"leftWidth",10),m=a(n,"rightWidth",10),S=a(n,"topHeight",0),M=a(n,"bottomHeight",0),w=new l(this.scene,0,0,f,o,c,p,v,m,S,M);return u!==void 0&&(n.add=u),r(this.scene,w,n),w})},47521:(s,y,e)=>{/** + */var r=e(25305),d=e(44603),h=e(23568),a=e(35154),l=e(28103);d.register("nineslice",function(n,u){n===void 0&&(n={});var f=h(n,"key",null),o=h(n,"frame",null),c=a(n,"width",256),p=a(n,"height",256),v=a(n,"leftWidth",10),m=a(n,"rightWidth",10),S=a(n,"topHeight",0),M=a(n,"bottomHeight",0),w=new l(this.scene,0,0,f,o,c,p,v,m,S,M);return u!==void 0&&(n.add=u),r(this.scene,w,n),w})},47521:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(28103),d=e(39429);d.register("nineslice",function(h,a,l,n,u,f,o,c,p,v){return this.displayList.add(new r(this.scene,h,a,l,n,u,f,o,c,p,v))})},78023:(s,y,e)=>{/** + */var r=e(28103),d=e(39429);d.register("nineslice",function(h,a,l,n,u,f,o,c,p,v){return this.displayList.add(new r(this.scene,h,a,l,n,u,f,o,c,p,v))})},78023:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(52230),s.exports={renderWebGL:d,renderCanvas:h}},52230:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(52230),s.exports={renderWebGL:d,renderCanvas:h}},52230:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91296),d=e(70554),h=function(a,l,n,u){var f=l.vertices,o=f.length;if(o!==0){n.addToRenderList(l);var c=a.pipelines.set(l.pipeline,l),p=r(l,n,u,!1).calc;a.pipelines.preBatch(l);var v=c.setGameObject(l),m=c.vertexViewF32,S=c.vertexViewU32,M=c.vertexCount*c.currentShader.vertexComponentCount-1,w=n.roundPixels,C=l.tintFill,A=n.alpha*l.alpha,P=d.getTintAppendFloatAlpha(l.tint,A),b=c.vertexAvailable(),O=-1;b{/** + */var r=e(91296),d=e(70554),h=function(a,l,n,u){var f=l.vertices,o=f.length;if(o!==0){n.addToRenderList(l);var c=a.pipelines.set(l.pipeline,l),p=r(l,n,u,!1).calc;a.pipelines.preBatch(l);var v=c.setGameObject(l),m=c.vertexViewF32,S=c.vertexViewU32,M=c.vertexCount*c.currentShader.vertexComponentCount-1,w=n.roundPixels,C=l.tintFill,A=n.alpha*l.alpha,P=d.getTintAppendFloatAlpha(l.tint,A),b=c.vertexAvailable(),O=-1;b{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(44777),h=e(37589),a=e(6113),l=e(91389),n=e(90664),u=new r({Extends:d,initialize:function(o){d.call(this,o,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return this.propertyValue===null?0:9},setMethods:function(){var f=this.propertyValue,o=f,c=this.defaultEmit,p=this.defaultUpdate;if(this.method===9){this.start=f[0],this.ease=a("Linear"),this.interpolation=l("linear"),c=this.easedValueEmit,p=this.easeValueUpdate,o=f[0],this.active=!0;for(var v=0;v{/** + */var r=e(83419),d=e(44777),h=e(37589),a=e(6113),l=e(91389),n=e(90664),u=new r({Extends:d,initialize:function(o){d.call(this,o,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return this.propertyValue===null?0:9},setMethods:function(){var f=this.propertyValue,o=f,c=this.defaultEmit,p=this.defaultUpdate;if(this.method===9){this.start=f[0],this.ease=a("Linear"),this.interpolation=l("linear"),c=this.easedValueEmit,p=this.easeValueUpdate,o=f[0],this.active=!0;for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(30976),d=e(45319),h=e(83419),a=e(99472),l=e(6113),n=e(95540),u=e(91389),f=e(77720),o=e(15994),c=new h({initialize:function(v,m,S){S===void 0&&(S=!1),this.propertyKey=v,this.propertyValue=m,this.defaultValue=m,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=S,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(p,v){p===void 0&&(p={}),v&&(this.propertyKey=v),this.propertyValue=n(p,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(p){var v;switch(this.method){case 1:case 3:case 8:v=p;break;case 2:this.propertyValue.indexOf(p)>=0&&(v=p);break;case 4:var m=(this.end-this.start)/this.steps;v=f(p,m),this.counter=v;break;case 5:case 6:case 7:v=d(p,this.start,this.end);break;case 9:v=this.start[0];break}return this.current=v,this},getMethod:function(){var p=this.propertyValue;if(p===null)return 0;var v=typeof p;if(v==="number")return 1;if(Array.isArray(p))return 2;if(v==="function")return 3;if(v==="object"){if(this.hasBoth(p,"start","end"))return this.has(p,"steps")?4:5;if(this.hasBoth(p,"min","max"))return 6;if(this.has(p,"random"))return 7;if(this.hasEither(p,"onEmit","onUpdate"))return 8;if(this.hasEither(p,"values","interpolation"))return 9}return 0},setMethods:function(){var p=this.propertyValue,v=p,m=this.defaultEmit,S=this.defaultUpdate;switch(this.method){case 1:m=this.staticValueEmit;break;case 2:m=this.randomStaticValueEmit,v=p[0];break;case 3:this._onEmit=p,m=this.proxyEmit;break;case 4:this.start=p.start,this.end=p.end,this.steps=p.steps,this.counter=this.start,this.yoyo=this.has(p,"yoyo")?p.yoyo:!1,this.direction=0,m=this.steppedEmit,v=this.start;break;case 5:this.start=p.start,this.end=p.end;var M=this.has(p,"ease")?p.ease:"Linear";this.ease=l(M,p.easeParams),m=this.has(p,"random")&&p.random?this.randomRangedValueEmit:this.easedValueEmit,S=this.easeValueUpdate,v=this.start;break;case 6:this.start=p.min,this.end=p.max,m=this.has(p,"int")&&p.int?this.randomRangedIntEmit:this.randomRangedValueEmit,v=this.start;break;case 7:var w=p.random;Array.isArray(w)&&(this.start=w[0],this.end=w[1]),m=this.randomRangedIntEmit,v=this.start;break;case 8:this._onEmit=this.has(p,"onEmit")?p.onEmit:this.defaultEmit,this._onUpdate=this.has(p,"onUpdate")?p.onUpdate:this.defaultUpdate,m=this.proxyEmit,S=this.proxyUpdate;break;case 9:this.start=p.values;var C=this.has(p,"ease")?p.ease:"Linear";this.ease=l(C,p.easeParams),this.interpolation=u(p.interpolation),m=this.easedValueEmit,S=this.easeValueUpdate,v=this.start[0];break}return this.onEmit=m,this.onUpdate=S,this.current=v,this},has:function(p,v){return p.hasOwnProperty(v)},hasBoth:function(p,v,m){return p.hasOwnProperty(v)&&p.hasOwnProperty(m)},hasEither:function(p,v,m){return p.hasOwnProperty(v)||p.hasOwnProperty(m)},defaultEmit:function(p,v,m){return m},defaultUpdate:function(p,v,m,S){return S},proxyEmit:function(p,v,m){var S=this._onEmit(p,v,m);return this.current=S,S},proxyUpdate:function(p,v,m,S){var M=this._onUpdate(p,v,m,S);return this.current=M,M},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var p=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[p],this.current},randomRangedValueEmit:function(p,v){var m=a(this.start,this.end);return p&&p.data[v]&&(p.data[v].min=m,p.data[v].max=this.end),this.current=m,m},randomRangedIntEmit:function(p,v){var m=r(this.start,this.end);return p&&p.data[v]&&(p.data[v].min=m,p.data[v].max=this.end),this.current=m,m},steppedEmit:function(){var p=this.counter,v=p,m=(this.end-this.start)/this.steps;if(this.yoyo){var S;this.direction===0?(v+=m,v>=this.end&&(S=v-this.end,v=this.end-S,this.direction=1)):(v-=m,v<=this.start&&(S=this.start-v,v=this.start+S,this.direction=0)),this.counter=v}else this.counter=o(v+m,this.start,this.end);return this.current=p,p},easedValueEmit:function(p,v){if(p&&p.data[v]){var m=p.data[v];m.min=this.start,m.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(p,v,m){var S=p.data[v],M,w=this.ease(m);return this.interpolation?M=this.interpolation(this.start,w):M=(S.max-S.min)*w+S.min,this.current=M,M},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});s.exports=c},24502:(s,y,e)=>{/** + */var r=e(30976),d=e(45319),h=e(83419),a=e(99472),l=e(6113),n=e(95540),u=e(91389),f=e(77720),o=e(15994),c=new h({initialize:function(v,m,S){S===void 0&&(S=!1),this.propertyKey=v,this.propertyValue=m,this.defaultValue=m,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=S,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(p,v){p===void 0&&(p={}),v&&(this.propertyKey=v),this.propertyValue=n(p,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(p){var v;switch(this.method){case 1:case 3:case 8:v=p;break;case 2:this.propertyValue.indexOf(p)>=0&&(v=p);break;case 4:var m=(this.end-this.start)/this.steps;v=f(p,m),this.counter=v;break;case 5:case 6:case 7:v=d(p,this.start,this.end);break;case 9:v=this.start[0];break}return this.current=v,this},getMethod:function(){var p=this.propertyValue;if(p===null)return 0;var v=typeof p;if(v==="number")return 1;if(Array.isArray(p))return 2;if(v==="function")return 3;if(v==="object"){if(this.hasBoth(p,"start","end"))return this.has(p,"steps")?4:5;if(this.hasBoth(p,"min","max"))return 6;if(this.has(p,"random"))return 7;if(this.hasEither(p,"onEmit","onUpdate"))return 8;if(this.hasEither(p,"values","interpolation"))return 9}return 0},setMethods:function(){var p=this.propertyValue,v=p,m=this.defaultEmit,S=this.defaultUpdate;switch(this.method){case 1:m=this.staticValueEmit;break;case 2:m=this.randomStaticValueEmit,v=p[0];break;case 3:this._onEmit=p,m=this.proxyEmit;break;case 4:this.start=p.start,this.end=p.end,this.steps=p.steps,this.counter=this.start,this.yoyo=this.has(p,"yoyo")?p.yoyo:!1,this.direction=0,m=this.steppedEmit,v=this.start;break;case 5:this.start=p.start,this.end=p.end;var M=this.has(p,"ease")?p.ease:"Linear";this.ease=l(M,p.easeParams),m=this.has(p,"random")&&p.random?this.randomRangedValueEmit:this.easedValueEmit,S=this.easeValueUpdate,v=this.start;break;case 6:this.start=p.min,this.end=p.max,m=this.has(p,"int")&&p.int?this.randomRangedIntEmit:this.randomRangedValueEmit,v=this.start;break;case 7:var w=p.random;Array.isArray(w)&&(this.start=w[0],this.end=w[1]),m=this.randomRangedIntEmit,v=this.start;break;case 8:this._onEmit=this.has(p,"onEmit")?p.onEmit:this.defaultEmit,this._onUpdate=this.has(p,"onUpdate")?p.onUpdate:this.defaultUpdate,m=this.proxyEmit,S=this.proxyUpdate;break;case 9:this.start=p.values;var C=this.has(p,"ease")?p.ease:"Linear";this.ease=l(C,p.easeParams),this.interpolation=u(p.interpolation),m=this.easedValueEmit,S=this.easeValueUpdate,v=this.start[0];break}return this.onEmit=m,this.onUpdate=S,this.current=v,this},has:function(p,v){return p.hasOwnProperty(v)},hasBoth:function(p,v,m){return p.hasOwnProperty(v)&&p.hasOwnProperty(m)},hasEither:function(p,v,m){return p.hasOwnProperty(v)||p.hasOwnProperty(m)},defaultEmit:function(p,v,m){return m},defaultUpdate:function(p,v,m,S){return S},proxyEmit:function(p,v,m){var S=this._onEmit(p,v,m);return this.current=S,S},proxyUpdate:function(p,v,m,S){var M=this._onUpdate(p,v,m,S);return this.current=M,M},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var p=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[p],this.current},randomRangedValueEmit:function(p,v){var m=a(this.start,this.end);return p&&p.data[v]&&(p.data[v].min=m,p.data[v].max=this.end),this.current=m,m},randomRangedIntEmit:function(p,v){var m=r(this.start,this.end);return p&&p.data[v]&&(p.data[v].min=m,p.data[v].max=this.end),this.current=m,m},steppedEmit:function(){var p=this.counter,v=p,m=(this.end-this.start)/this.steps;if(this.yoyo){var S;this.direction===0?(v+=m,v>=this.end&&(S=v-this.end,v=this.end-S,this.direction=1)):(v-=m,v<=this.start&&(S=this.start-v,v=this.start+S,this.direction=0)),this.counter=v}else this.counter=o(v+m,this.start,this.end);return this.current=p,p},easedValueEmit:function(p,v){if(p&&p.data[v]){var m=p.data[v];m.min=this.start,m.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(p,v,m){var S=p.data[v],M,w=this.ease(m);return this.interpolation?M=this.interpolation(this.start,w):M=(S.max-S.min)*w+S.min,this.current=M,M},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});s.exports=c},24502:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(95540),h=e(20286),a=new r({Extends:h,initialize:function(n,u,f,o,c){if(typeof n=="object"){var p=n;n=d(p,"x",0),u=d(p,"y",0),f=d(p,"power",0),o=d(p,"epsilon",100),c=d(p,"gravity",50)}else n===void 0&&(n=0),u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o=100),c===void 0&&(c=50);h.call(this,n,u,!0),this._gravity=c,this._power=f*c,this._epsilon=o*o},update:function(l,n){var u=this.x-l.x,f=this.y-l.y,o=u*u+f*f;if(o!==0){var c=Math.sqrt(o);o{/** + */var r=e(83419),d=e(95540),h=e(20286),a=new r({Extends:h,initialize:function(n,u,f,o,c){if(typeof n=="object"){var p=n;n=d(p,"x",0),u=d(p,"y",0),f=d(p,"power",0),o=d(p,"epsilon",100),c=d(p,"gravity",50)}else n===void 0&&(n=0),u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o=100),c===void 0&&(c=50);h.call(this,n,u,!0),this._gravity=c,this._power=f*c,this._epsilon=o*o},update:function(l,n){var u=this.x-l.x,f=this.y-l.y,o=u*u+f*f;if(o!==0){var c=Math.sqrt(o);o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(9674),d=e(45319),h=e(83419),a=e(39506),l=e(87841),n=e(11520),u=e(26099),f=new h({initialize:function(c){this.emitter=c,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new u,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=c.scene,this.anims=new r(this),this.bounds=new l},emit:function(o,c,p,v,m,S){return this.emitter.emit(o,c,p,v,m,S)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(o,c){o===void 0&&(o=0),c===void 0&&(c=0),this.x=o,this.y=c},fire:function(o,c){var p=this.emitter,v=p.ops,m=p.getAnim();if(m?this.anims.play(m):(this.frame=p.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(p.getEmitZone(this),o===void 0?this.x+=v.x.onEmit(this,"x"):v.x.steps>0?this.x+=o+v.x.onEmit(this,"x"):this.x+=o,c===void 0?this.y+=v.y.onEmit(this,"y"):v.y.steps>0?this.y+=c+v.y.onEmit(this,"y"):this.y+=c,this.life=v.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=v.delay.onEmit(this,"delay"),this.holdCurrent=v.hold.onEmit(this,"hold"),this.scaleX=v.scaleX.onEmit(this,"scaleX"),this.scaleY=v.scaleY.active?v.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=v.rotate.onEmit(this,"rotate"),this.rotation=a(this.angle),p.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&p.getDeathZone(this))return this.lifeCurrent=0,!1;var S=v.speedX.onEmit(this,"speedX"),M=v.speedY.active?v.speedY.onEmit(this,"speedY"):S;if(p.radial){var w=a(v.angle.onEmit(this,"angle"));this.velocityX=Math.cos(w)*Math.abs(S),this.velocityY=Math.sin(w)*Math.abs(M)}else if(p.moveTo){var C=v.moveToX.onEmit(this,"moveToX"),A=v.moveToY.onEmit(this,"moveToY"),P=this.life/1e3;this.velocityX=(C-this.x)/P,this.velocityY=(A-this.y)/P}else this.velocityX=S,this.velocityY=M;return p.acceleration&&(this.accelerationX=v.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=v.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=v.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=v.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=v.bounce.onEmit(this,"bounce"),this.alpha=v.alpha.onEmit(this,"alpha"),v.color.active?this.tint=v.color.onEmit(this,"tint"):this.tint=v.tint.onEmit(this,"tint"),!0},update:function(o,c,p){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=o,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=o,!1;this.anims.update(0,o);var v=this.emitter,m=v.ops,S=1-this.lifeCurrent/this.life;if(this.lifeT=S,this.x=m.x.onUpdate(this,"x",S,this.x),this.y=m.y.onUpdate(this,"y",S,this.y),v.moveTo){var M=m.moveToX.onUpdate(this,"moveToX",S,v.moveToX),w=m.moveToY.onUpdate(this,"moveToY",S,v.moveToY),C=this.lifeCurrent/1e3;this.velocityX=(M-this.x)/C,this.velocityY=(w-this.y)/C}return this.computeVelocity(v,o,c,p,S),this.scaleX=m.scaleX.onUpdate(this,"scaleX",S,this.scaleX),m.scaleY.active?this.scaleY=m.scaleY.onUpdate(this,"scaleY",S,this.scaleY):this.scaleY=this.scaleX,this.angle=m.rotate.onUpdate(this,"rotate",S,this.angle),this.rotation=a(this.angle),v.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=d(m.alpha.onUpdate(this,"alpha",S,this.alpha),0,1),m.color.active?this.tint=m.color.onUpdate(this,"color",S,this.tint):this.tint=m.tint.onUpdate(this,"tint",S,this.tint),this.lifeCurrent-=o,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(o,c,p,v,m){var S=o.ops,M=this.velocityX,w=this.velocityY,C=S.accelerationX.onUpdate(this,"accelerationX",m,this.accelerationX),A=S.accelerationY.onUpdate(this,"accelerationY",m,this.accelerationY),P=S.maxVelocityX.onUpdate(this,"maxVelocityX",m,this.maxVelocityX),b=S.maxVelocityY.onUpdate(this,"maxVelocityY",m,this.maxVelocityY);this.bounce=S.bounce.onUpdate(this,"bounce",m,this.bounce),M+=o.gravityX*p+C*p,w+=o.gravityY*p+A*p,M=d(M,-P,P),w=d(w,-b,b),this.velocityX=M,this.velocityY=w,this.x+=M*p,this.y+=w*p,o.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var O=0;O{/** + */var r=e(9674),d=e(45319),h=e(83419),a=e(39506),l=e(87841),n=e(11520),u=e(26099),f=new h({initialize:function(c){this.emitter=c,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new u,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=c.scene,this.anims=new r(this),this.bounds=new l},emit:function(o,c,p,v,m,S){return this.emitter.emit(o,c,p,v,m,S)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(o,c){o===void 0&&(o=0),c===void 0&&(c=0),this.x=o,this.y=c},fire:function(o,c){var p=this.emitter,v=p.ops,m=p.getAnim();if(m?this.anims.play(m):(this.frame=p.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(p.getEmitZone(this),o===void 0?this.x+=v.x.onEmit(this,"x"):v.x.steps>0?this.x+=o+v.x.onEmit(this,"x"):this.x+=o,c===void 0?this.y+=v.y.onEmit(this,"y"):v.y.steps>0?this.y+=c+v.y.onEmit(this,"y"):this.y+=c,this.life=v.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=v.delay.onEmit(this,"delay"),this.holdCurrent=v.hold.onEmit(this,"hold"),this.scaleX=v.scaleX.onEmit(this,"scaleX"),this.scaleY=v.scaleY.active?v.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=v.rotate.onEmit(this,"rotate"),this.rotation=a(this.angle),p.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&p.getDeathZone(this))return this.lifeCurrent=0,!1;var S=v.speedX.onEmit(this,"speedX"),M=v.speedY.active?v.speedY.onEmit(this,"speedY"):S;if(p.radial){var w=a(v.angle.onEmit(this,"angle"));this.velocityX=Math.cos(w)*Math.abs(S),this.velocityY=Math.sin(w)*Math.abs(M)}else if(p.moveTo){var C=v.moveToX.onEmit(this,"moveToX"),A=v.moveToY.onEmit(this,"moveToY"),P=this.life/1e3;this.velocityX=(C-this.x)/P,this.velocityY=(A-this.y)/P}else this.velocityX=S,this.velocityY=M;return p.acceleration&&(this.accelerationX=v.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=v.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=v.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=v.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=v.bounce.onEmit(this,"bounce"),this.alpha=v.alpha.onEmit(this,"alpha"),v.color.active?this.tint=v.color.onEmit(this,"tint"):this.tint=v.tint.onEmit(this,"tint"),!0},update:function(o,c,p){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=o,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=o,!1;this.anims.update(0,o);var v=this.emitter,m=v.ops,S=1-this.lifeCurrent/this.life;if(this.lifeT=S,this.x=m.x.onUpdate(this,"x",S,this.x),this.y=m.y.onUpdate(this,"y",S,this.y),v.moveTo){var M=m.moveToX.onUpdate(this,"moveToX",S,v.moveToX),w=m.moveToY.onUpdate(this,"moveToY",S,v.moveToY),C=this.lifeCurrent/1e3;this.velocityX=(M-this.x)/C,this.velocityY=(w-this.y)/C}return this.computeVelocity(v,o,c,p,S),this.scaleX=m.scaleX.onUpdate(this,"scaleX",S,this.scaleX),m.scaleY.active?this.scaleY=m.scaleY.onUpdate(this,"scaleY",S,this.scaleY):this.scaleY=this.scaleX,this.angle=m.rotate.onUpdate(this,"rotate",S,this.angle),this.rotation=a(this.angle),v.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=d(m.alpha.onUpdate(this,"alpha",S,this.alpha),0,1),m.color.active?this.tint=m.color.onUpdate(this,"color",S,this.tint):this.tint=m.tint.onUpdate(this,"tint",S,this.tint),this.lifeCurrent-=o,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(o,c,p,v,m){var S=o.ops,M=this.velocityX,w=this.velocityY,C=S.accelerationX.onUpdate(this,"accelerationX",m,this.accelerationX),A=S.accelerationY.onUpdate(this,"accelerationY",m,this.accelerationY),P=S.maxVelocityX.onUpdate(this,"maxVelocityX",m,this.maxVelocityX),b=S.maxVelocityY.onUpdate(this,"maxVelocityY",m,this.maxVelocityY);this.bounce=S.bounce.onUpdate(this,"bounce",m,this.bounce),M+=o.gravityX*p+C*p,w+=o.gravityY*p+A*p,M=d(M,-P,P),w=d(w,-b,b),this.velocityX=M,this.velocityY=w,this.x+=M*p,this.y+=w*p,o.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var O=0;O{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(20286),h=e(87841),a=new r({Extends:d,initialize:function(n,u,f,o,c,p,v,m){c===void 0&&(c=!0),p===void 0&&(p=!0),v===void 0&&(v=!0),m===void 0&&(m=!0),d.call(this,n,u,!0),this.bounds=new h(n,u,f,o),this.collideLeft=c,this.collideRight=p,this.collideTop=v,this.collideBottom=m},update:function(l){var n=this.bounds,u=-l.bounce,f=l.worldPosition;f.xn.right&&this.collideRight&&(l.x-=f.x-n.right,l.velocityX*=u),f.yn.bottom&&this.collideBottom&&(l.y-=f.y-n.bottom,l.velocityY*=u)}});s.exports=a},31600:(s,y,e)=>{/** + */var r=e(83419),d=e(20286),h=e(87841),a=new r({Extends:d,initialize:function(n,u,f,o,c,p,v,m){c===void 0&&(c=!0),p===void 0&&(p=!0),v===void 0&&(v=!0),m===void 0&&(m=!0),d.call(this,n,u,!0),this.bounds=new h(n,u,f,o),this.collideLeft=c,this.collideRight=p,this.collideTop=v,this.collideBottom=m},update:function(l){var n=this.bounds,u=-l.bounce,f=l.worldPosition;f.xn.right&&this.collideRight&&(l.x-=f.x-n.right,l.velocityX*=u),f.yn.bottom&&this.collideBottom&&(l.y-=f.y-n.bottom,l.velocityY*=u)}});s.exports=a},31600:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(31401),h=e(53774),a=e(43459),l=e(26388),n=e(19909),u=e(76472),f=e(44777),o=e(20696),c=e(95643),p=e(95540),v=e(26546),m=e(24502),S=e(1985),M=e(97022),w=e(86091),C=e(73162),A=e(20074),P=e(56480),b=e(68875),O=e(87841),I=e(59996),D=e(72905),B=e(90668),G=e(19186),z=e(61340),X=e(26099),j=e(15994),Q=e(69601),tt=["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"],Y=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],Z=new r({Extends:c,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.Mask,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Texture,d.Transform,d.Visible,B],initialize:function(H,$,_,q,at){c.call(this,H,"ParticleEmitter"),this.particleClass=P,this.ops={accelerationX:new f("accelerationX",0),accelerationY:new f("accelerationY",0),alpha:new f("alpha",1),angle:new f("angle",{min:0,max:360},!0),bounce:new f("bounce",0),color:new u("color"),delay:new f("delay",0,!0),hold:new f("hold",0,!0),lifespan:new f("lifespan",1e3,!0),maxVelocityX:new f("maxVelocityX",1e4),maxVelocityY:new f("maxVelocityY",1e4),moveToX:new f("moveToX",0),moveToY:new f("moveToY",0),quantity:new f("quantity",1,!0),rotate:new f("rotate",0),scaleX:new f("scaleX",1),scaleY:new f("scaleY",1),speedX:new f("speedX",0,!0),speedY:new f("speedY",0,!0),tint:new f("tint",16777215),x:new f("x",0),y:new f("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 X,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 z,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new C(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition($,_),this.setTexture(q),at&&this.setConfig(at)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(U){if(!U)return this;var H=0,$="",_=this.ops;for(H=0;H=this.animQuantity&&(this.animCounter=0,this.currentAnim=j(this.currentAnim+1,0,H)),$},setAnim:function(U,H,$){H===void 0&&(H=!0),$===void 0&&($=1),this.randomAnim=H,this.animQuantity=$,this.currentAnim=0;var _=typeof U;if(this.anims.length=0,Array.isArray(U))this.anims=this.anims.concat(U);else if(_==="string")this.anims.push(U);else if(_==="object"){var q=U;U=p(q,"anims",null),U&&(this.anims=this.anims.concat(U));var at=p(q,"cycle",!1);this.randomAnim=!at,this.animQuantity=p(q,"quantity",$)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(U){return U===void 0&&(U=!0),this.radial=U,this},addParticleBounds:function(U,H,$,_,q,at,ot,rt){if(typeof U=="object"){var gt=U;U=gt.x,H=gt.y,$=M(gt,"w")?gt.w:gt.width,_=M(gt,"h")?gt.h:gt.height}return this.addParticleProcessor(new Q(U,H,$,_,q,at,ot,rt))},setParticleSpeed:function(U,H){return H===void 0&&(H=U),this.ops.speedX.onChange(U),U===H?this.ops.speedY.active=!1:this.ops.speedY.onChange(H),this.radial=!0,this},setParticleScale:function(U,H){return U===void 0&&(U=1),H===void 0&&(H=U),this.ops.scaleX.onChange(U),this.ops.scaleY.onChange(H),this},setParticleGravity:function(U,H){return this.gravityX=U,this.gravityY=H,this},setParticleAlpha:function(U){return this.ops.alpha.onChange(U),this},setParticleTint:function(U){return this.ops.tint.onChange(U),this},setEmitterAngle:function(U){return this.ops.angle.onChange(U),this},setParticleLifespan:function(U){return this.ops.lifespan.onChange(U),this},setQuantity:function(U){return this.quantity=U,this},setFrequency:function(U,H){return this.frequency=U,this.flowCounter=U>0?U:0,H&&(this.quantity=H),this},addDeathZone:function(U){Array.isArray(U)||(U=[U]);for(var H,$=[],_=0;_-1&&(this.zoneTotal++,this.zoneTotal===_.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===$&&(this.zoneIndex=0)))}},getDeathZone:function(U){for(var H=this.deathZones,$=0;$=0&&(this.zoneIndex=H),this},addParticleProcessor:function(U){return this.processors.exists(U)||(U.emitter&&U.emitter.removeParticleProcessor(U),this.processors.add(U),U.emitter=this),U},removeParticleProcessor:function(U){return this.processors.exists(U)&&(this.processors.remove(U,!0),U.emitter=null),U},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(U){return this.addParticleProcessor(new m(U))},reserve:function(U){var H=this.dead;if(this.maxParticles>0){var $=this.getParticleCount();$+U>this.maxParticles&&(U=this.maxParticles-($+U))}for(var _=0;_0&&this.getParticleCount()>=this.maxParticles?!0:this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(U,H){return U===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof U=="function"&&(this.emitCallback=U,H&&(this.emitCallbackScope=H)),this},onParticleDeath:function(U,H){return U===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof U=="function"&&(this.deathCallback=U,H&&(this.deathCallbackScope=H)),this},killAll:function(){for(var U=this.dead,H=this.alive;H.length>0;)U.push(H.pop());return this},forEachAlive:function(U,H){for(var $=this.alive,_=$.length,q=0;q<_;q++)U.call(H,$[q],this);return this},forEachDead:function(U,H){for(var $=this.dead,_=$.length,q=0;q<_;q++)U.call(H,$[q],this);return this},start:function(U,H){return U===void 0&&(U=0),this.emitting||(U>0&&this.fastForward(U),this.emitting=!0,this.resetCounters(this.frequency,!0),H!==void 0&&(this.duration=Math.abs(H)),this.emit(o.START,this)),this},stop:function(U){return U===void 0&&(U=!1),this.emitting&&(this.emitting=!1,U&&this.killAll(),this.emit(o.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(U,H){return U===void 0&&(U=""),H===void 0&&(H=this.true),this.sortProperty=U,this.sortOrderAsc=H,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(U){return this.sortProperty!==""?U=this.depthSortCallback:U=null,this.sortCallback=U,this},depthSort:function(){return G(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(U,H){var $=this.sortProperty;return this.sortOrderAsc?U[$]-H[$]:H[$]-U[$]},flow:function(U,H,$){return H===void 0&&(H=1),this.emitting=!1,this.frequency=U,this.quantity=H,$!==void 0&&(this.stopAfter=$),this.start()},explode:function(U,H,$){this.frequency=-1,this.resetCounters(-1,!0);var _=this.emitParticle(U,H,$);return this.emit(o.EXPLODE,this,_),_},emitParticleAt:function(U,H,$){return this.emitParticle($,U,H)},emitParticle:function(U,H,$){if(!this.atLimit()){U===void 0&&(U=this.ops.quantity.onEmit());for(var _=this.dead,q=this.stopAfter,at=this.follow?this.follow.x+this.followOffset.x:H,ot=this.follow?this.follow.y+this.followOffset.y:$,rt=0;rt0&&(this.stopCounter++,this.stopCounter>=q)||this.atLimit())break}return gt}},fastForward:function(U,H){H===void 0&&(H=1e3/60);var $=0;for(this.skipping=!0;$0){var Et=this.deathCallback,At=this.deathCallbackScope;for(ot=gt-1;ot>=0;ot--){var Pt=rt[ot];q.splice(Pt.index,1),at.push(Pt.particle),Et&&Et.call(At,Pt.particle),Pt.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&q.length===0&&(this.completeFlag=0,this.emit(o.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=H;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=H,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(U){for(var H=this.getWorldTransformMatrix(),$=this.alive,_=$.length,q=[],at=0;at<_;at++){var ot=$[at];I(U,ot.getBounds(H))&&q.push(ot)}return q},getBounds:function(U,H,$,_){U===void 0&&(U=0),H===void 0&&(H=0),$===void 0&&($=1e3/60),_===void 0&&(_=new O);var q=this.getWorldTransformMatrix(),at,ot,rt=this.alive,gt=!1;if(_.setTo(0,0,0,0),H>0){var yt=0;for(this.skipping=!0;yt0&&w(_,U,U),_},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(U){this.ops.x.onChange(U)}},particleY:{get:function(){return this.ops.y.current},set:function(U){this.ops.y.onChange(U)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(U){this.ops.accelerationX.onChange(U)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(U){this.ops.accelerationY.onChange(U)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(U){this.ops.maxVelocityX.onChange(U)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(U){this.ops.maxVelocityY.onChange(U)}},speed:{get:function(){return this.ops.speedX.current},set:function(U){this.ops.speedX.onChange(U),this.ops.speedY.onChange(U)}},speedX:{get:function(){return this.ops.speedX.current},set:function(U){this.ops.speedX.onChange(U)}},speedY:{get:function(){return this.ops.speedY.current},set:function(U){this.ops.speedY.onChange(U)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(U){this.ops.moveToX.onChange(U)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(U){this.ops.moveToY.onChange(U)}},bounce:{get:function(){return this.ops.bounce.current},set:function(U){this.ops.bounce.onChange(U)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(U){this.ops.scaleX.onChange(U)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(U){this.ops.scaleY.onChange(U)}},particleColor:{get:function(){return this.ops.color.current},set:function(U){this.ops.color.onChange(U)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(U){this.ops.color.setEase(U)}},particleTint:{get:function(){return this.ops.tint.current},set:function(U){this.ops.tint.onChange(U)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(U){this.ops.alpha.onChange(U)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(U){this.ops.lifespan.onChange(U)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(U){this.ops.angle.onChange(U)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(U){this.ops.rotate.onChange(U)}},quantity:{get:function(){return this.ops.quantity.current},set:function(U){this.ops.quantity.onChange(U)}},delay:{get:function(){return this.ops.delay.current},set:function(U){this.ops.delay.onChange(U)}},hold:{get:function(){return this.ops.hold.current},set:function(U){this.ops.hold.onChange(U)}},flowCounter:{get:function(){return this.counters[0]},set:function(U){this.counters[0]=U}},frameCounter:{get:function(){return this.counters[1]},set:function(U){this.counters[1]=U}},animCounter:{get:function(){return this.counters[2]},set:function(U){this.counters[2]=U}},elapsed:{get:function(){return this.counters[3]},set:function(U){this.counters[3]=U}},stopCounter:{get:function(){return this.counters[4]},set:function(U){this.counters[4]=U}},completeFlag:{get:function(){return this.counters[5]},set:function(U){this.counters[5]=U}},zoneIndex:{get:function(){return this.counters[6]},set:function(U){this.counters[6]=U}},zoneTotal:{get:function(){return this.counters[7]},set:function(U){this.counters[7]=U}},currentFrame:{get:function(){return this.counters[8]},set:function(U){this.counters[8]=U}},currentAnim:{get:function(){return this.counters[9]},set:function(U){this.counters[9]=U}},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 U,H=this.ops;for(U=0;U{/** + */var r=e(83419),d=e(31401),h=e(53774),a=e(43459),l=e(26388),n=e(19909),u=e(76472),f=e(44777),o=e(20696),c=e(95643),p=e(95540),v=e(26546),m=e(24502),S=e(1985),M=e(97022),w=e(86091),C=e(73162),A=e(20074),P=e(56480),b=e(68875),O=e(87841),I=e(59996),D=e(72905),B=e(90668),G=e(19186),z=e(61340),X=e(26099),j=e(15994),Q=e(69601),tt=["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"],Y=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],$=new r({Extends:c,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.Mask,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Texture,d.Transform,d.Visible,B],initialize:function(H,Z,_,q,at){c.call(this,H,"ParticleEmitter"),this.particleClass=P,this.ops={accelerationX:new f("accelerationX",0),accelerationY:new f("accelerationY",0),alpha:new f("alpha",1),angle:new f("angle",{min:0,max:360},!0),bounce:new f("bounce",0),color:new u("color"),delay:new f("delay",0,!0),hold:new f("hold",0,!0),lifespan:new f("lifespan",1e3,!0),maxVelocityX:new f("maxVelocityX",1e4),maxVelocityY:new f("maxVelocityY",1e4),moveToX:new f("moveToX",0),moveToY:new f("moveToY",0),quantity:new f("quantity",1,!0),rotate:new f("rotate",0),scaleX:new f("scaleX",1),scaleY:new f("scaleY",1),speedX:new f("speedX",0,!0),speedY:new f("speedY",0,!0),tint:new f("tint",16777215),x:new f("x",0),y:new f("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 X,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 z,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new C(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(Z,_),this.setTexture(q),at&&this.setConfig(at)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(U){if(!U)return this;var H=0,Z="",_=this.ops;for(H=0;H=this.animQuantity&&(this.animCounter=0,this.currentAnim=j(this.currentAnim+1,0,H)),Z},setAnim:function(U,H,Z){H===void 0&&(H=!0),Z===void 0&&(Z=1),this.randomAnim=H,this.animQuantity=Z,this.currentAnim=0;var _=typeof U;if(this.anims.length=0,Array.isArray(U))this.anims=this.anims.concat(U);else if(_==="string")this.anims.push(U);else if(_==="object"){var q=U;U=p(q,"anims",null),U&&(this.anims=this.anims.concat(U));var at=p(q,"cycle",!1);this.randomAnim=!at,this.animQuantity=p(q,"quantity",Z)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(U){return U===void 0&&(U=!0),this.radial=U,this},addParticleBounds:function(U,H,Z,_,q,at,ot,rt){if(typeof U=="object"){var gt=U;U=gt.x,H=gt.y,Z=M(gt,"w")?gt.w:gt.width,_=M(gt,"h")?gt.h:gt.height}return this.addParticleProcessor(new Q(U,H,Z,_,q,at,ot,rt))},setParticleSpeed:function(U,H){return H===void 0&&(H=U),this.ops.speedX.onChange(U),U===H?this.ops.speedY.active=!1:this.ops.speedY.onChange(H),this.radial=!0,this},setParticleScale:function(U,H){return U===void 0&&(U=1),H===void 0&&(H=U),this.ops.scaleX.onChange(U),this.ops.scaleY.onChange(H),this},setParticleGravity:function(U,H){return this.gravityX=U,this.gravityY=H,this},setParticleAlpha:function(U){return this.ops.alpha.onChange(U),this},setParticleTint:function(U){return this.ops.tint.onChange(U),this},setEmitterAngle:function(U){return this.ops.angle.onChange(U),this},setParticleLifespan:function(U){return this.ops.lifespan.onChange(U),this},setQuantity:function(U){return this.quantity=U,this},setFrequency:function(U,H){return this.frequency=U,this.flowCounter=U>0?U:0,H&&(this.quantity=H),this},addDeathZone:function(U){Array.isArray(U)||(U=[U]);for(var H,Z=[],_=0;_-1&&(this.zoneTotal++,this.zoneTotal===_.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===Z&&(this.zoneIndex=0)))}},getDeathZone:function(U){for(var H=this.deathZones,Z=0;Z=0&&(this.zoneIndex=H),this},addParticleProcessor:function(U){return this.processors.exists(U)||(U.emitter&&U.emitter.removeParticleProcessor(U),this.processors.add(U),U.emitter=this),U},removeParticleProcessor:function(U){return this.processors.exists(U)&&(this.processors.remove(U,!0),U.emitter=null),U},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(U){return this.addParticleProcessor(new m(U))},reserve:function(U){var H=this.dead;if(this.maxParticles>0){var Z=this.getParticleCount();Z+U>this.maxParticles&&(U=this.maxParticles-(Z+U))}for(var _=0;_0&&this.getParticleCount()>=this.maxParticles?!0:this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(U,H){return U===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof U=="function"&&(this.emitCallback=U,H&&(this.emitCallbackScope=H)),this},onParticleDeath:function(U,H){return U===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof U=="function"&&(this.deathCallback=U,H&&(this.deathCallbackScope=H)),this},killAll:function(){for(var U=this.dead,H=this.alive;H.length>0;)U.push(H.pop());return this},forEachAlive:function(U,H){for(var Z=this.alive,_=Z.length,q=0;q<_;q++)U.call(H,Z[q],this);return this},forEachDead:function(U,H){for(var Z=this.dead,_=Z.length,q=0;q<_;q++)U.call(H,Z[q],this);return this},start:function(U,H){return U===void 0&&(U=0),this.emitting||(U>0&&this.fastForward(U),this.emitting=!0,this.resetCounters(this.frequency,!0),H!==void 0&&(this.duration=Math.abs(H)),this.emit(o.START,this)),this},stop:function(U){return U===void 0&&(U=!1),this.emitting&&(this.emitting=!1,U&&this.killAll(),this.emit(o.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(U,H){return U===void 0&&(U=""),H===void 0&&(H=this.true),this.sortProperty=U,this.sortOrderAsc=H,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(U){return this.sortProperty!==""?U=this.depthSortCallback:U=null,this.sortCallback=U,this},depthSort:function(){return G(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(U,H){var Z=this.sortProperty;return this.sortOrderAsc?U[Z]-H[Z]:H[Z]-U[Z]},flow:function(U,H,Z){return H===void 0&&(H=1),this.emitting=!1,this.frequency=U,this.quantity=H,Z!==void 0&&(this.stopAfter=Z),this.start()},explode:function(U,H,Z){this.frequency=-1,this.resetCounters(-1,!0);var _=this.emitParticle(U,H,Z);return this.emit(o.EXPLODE,this,_),_},emitParticleAt:function(U,H,Z){return this.emitParticle(Z,U,H)},emitParticle:function(U,H,Z){if(!this.atLimit()){U===void 0&&(U=this.ops.quantity.onEmit());for(var _=this.dead,q=this.stopAfter,at=this.follow?this.follow.x+this.followOffset.x:H,ot=this.follow?this.follow.y+this.followOffset.y:Z,rt=0;rt0&&(this.stopCounter++,this.stopCounter>=q)||this.atLimit())break}return gt}},fastForward:function(U,H){H===void 0&&(H=1e3/60);var Z=0;for(this.skipping=!0;Z0){var Et=this.deathCallback,At=this.deathCallbackScope;for(ot=gt-1;ot>=0;ot--){var Pt=rt[ot];q.splice(Pt.index,1),at.push(Pt.particle),Et&&Et.call(At,Pt.particle),Pt.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&q.length===0&&(this.completeFlag=0,this.emit(o.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=H;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=H,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(U){for(var H=this.getWorldTransformMatrix(),Z=this.alive,_=Z.length,q=[],at=0;at<_;at++){var ot=Z[at];I(U,ot.getBounds(H))&&q.push(ot)}return q},getBounds:function(U,H,Z,_){U===void 0&&(U=0),H===void 0&&(H=0),Z===void 0&&(Z=1e3/60),_===void 0&&(_=new O);var q=this.getWorldTransformMatrix(),at,ot,rt=this.alive,gt=!1;if(_.setTo(0,0,0,0),H>0){var yt=0;for(this.skipping=!0;yt0&&w(_,U,U),_},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(U){this.ops.x.onChange(U)}},particleY:{get:function(){return this.ops.y.current},set:function(U){this.ops.y.onChange(U)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(U){this.ops.accelerationX.onChange(U)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(U){this.ops.accelerationY.onChange(U)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(U){this.ops.maxVelocityX.onChange(U)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(U){this.ops.maxVelocityY.onChange(U)}},speed:{get:function(){return this.ops.speedX.current},set:function(U){this.ops.speedX.onChange(U),this.ops.speedY.onChange(U)}},speedX:{get:function(){return this.ops.speedX.current},set:function(U){this.ops.speedX.onChange(U)}},speedY:{get:function(){return this.ops.speedY.current},set:function(U){this.ops.speedY.onChange(U)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(U){this.ops.moveToX.onChange(U)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(U){this.ops.moveToY.onChange(U)}},bounce:{get:function(){return this.ops.bounce.current},set:function(U){this.ops.bounce.onChange(U)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(U){this.ops.scaleX.onChange(U)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(U){this.ops.scaleY.onChange(U)}},particleColor:{get:function(){return this.ops.color.current},set:function(U){this.ops.color.onChange(U)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(U){this.ops.color.setEase(U)}},particleTint:{get:function(){return this.ops.tint.current},set:function(U){this.ops.tint.onChange(U)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(U){this.ops.alpha.onChange(U)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(U){this.ops.lifespan.onChange(U)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(U){this.ops.angle.onChange(U)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(U){this.ops.rotate.onChange(U)}},quantity:{get:function(){return this.ops.quantity.current},set:function(U){this.ops.quantity.onChange(U)}},delay:{get:function(){return this.ops.delay.current},set:function(U){this.ops.delay.onChange(U)}},hold:{get:function(){return this.ops.hold.current},set:function(U){this.ops.hold.onChange(U)}},flowCounter:{get:function(){return this.counters[0]},set:function(U){this.counters[0]=U}},frameCounter:{get:function(){return this.counters[1]},set:function(U){this.counters[1]=U}},animCounter:{get:function(){return this.counters[2]},set:function(U){this.counters[2]=U}},elapsed:{get:function(){return this.counters[3]},set:function(U){this.counters[3]=U}},stopCounter:{get:function(){return this.counters[4]},set:function(U){this.counters[4]=U}},completeFlag:{get:function(){return this.counters[5]},set:function(U){this.counters[5]=U}},zoneIndex:{get:function(){return this.counters[6]},set:function(U){this.counters[6]=U}},zoneTotal:{get:function(){return this.counters[7]},set:function(U){this.counters[7]=U}},currentFrame:{get:function(){return this.counters[8]},set:function(U){this.counters[8]=U}},currentAnim:{get:function(){return this.counters[9]},set:function(U){this.counters[9]=U}},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 U,H=this.ops;for(U=0;U{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(59996),d=e(61340),h=new d,a=new d,l=new d,n=new d,u=function(f,o,c,p){var v=h,m=a,S=l,M=n;p?(M.loadIdentity(),M.multiply(p),M.translate(o.x,o.y),M.rotate(o.rotation),M.scale(o.scaleX,o.scaleY)):M.applyITRS(o.x,o.y,o.rotation,o.scaleX,o.scaleY);var w=f.currentContext,C=c.roundPixels,A=c.alpha,P=o.alpha,b=o.alive,O=b.length,I=o.viewBounds;if(!(!o.visible||O===0||I&&!r(I,c.worldView))){o.sortCallback&&o.depthSort(),c.addToRenderList(o);var D=o.scrollFactorX,B=o.scrollFactorY;w.save(),w.globalCompositeOperation=f.blendModes[o.blendMode];for(var G=0;G0&&Q.height>0){var tt=-j.halfWidth,Y=-j.halfHeight;w.globalAlpha=X,w.save(),m.setToContext(w),C&&(tt=Math.round(tt),Y=Math.round(Y)),w.imageSmoothingEnabled=!j.source.scaleMode,w.drawImage(j.source.image,Q.x,Q.y,Q.width,Q.height,tt,Y,Q.width,Q.height),w.restore()}}}w.restore()}};s.exports=u},92730:(s,y,e)=>{/** + */var r=e(59996),d=e(61340),h=new d,a=new d,l=new d,n=new d,u=function(f,o,c,p){var v=h,m=a,S=l,M=n;p?(M.loadIdentity(),M.multiply(p),M.translate(o.x,o.y),M.rotate(o.rotation),M.scale(o.scaleX,o.scaleY)):M.applyITRS(o.x,o.y,o.rotation,o.scaleX,o.scaleY);var w=f.currentContext,C=c.roundPixels,A=c.alpha,P=o.alpha,b=o.alive,O=b.length,I=o.viewBounds;if(!(!o.visible||O===0||I&&!r(I,c.worldView))){o.sortCallback&&o.depthSort(),c.addToRenderList(o);var D=o.scrollFactorX,B=o.scrollFactorY;w.save(),w.globalCompositeOperation=f.blendModes[o.blendMode];for(var G=0;G0&&Q.height>0){var tt=-j.halfWidth,Y=-j.halfHeight;w.globalAlpha=X,w.save(),m.setToContext(w),C&&(tt=Math.round(tt),Y=Math.round(Y)),w.imageSmoothingEnabled=!j.source.scaleMode,w.drawImage(j.source.image,Q.x,Q.y,Q.width,Q.height,tt,Y,Q.width,Q.height),w.restore()}}}w.restore()}};s.exports=u},92730:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(44603),h=e(23568),a=e(95540),l=e(31600);d.register("particles",function(n,u){n===void 0&&(n={});var f=h(n,"key",null),o=a(n,"config",null),c=new l(this.scene,0,0,f);return u!==void 0&&(n.add=u),r(this.scene,c,n),o&&c.setConfig(o),c})},676:(s,y,e)=>{/** + */var r=e(25305),d=e(44603),h=e(23568),a=e(95540),l=e(31600);d.register("particles",function(n,u){n===void 0&&(n={});var f=h(n,"key",null),o=a(n,"config",null),c=new l(this.scene,0,0,f);return u!==void 0&&(n.add=u),r(this.scene,c,n),o&&c.setConfig(o),c})},676:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39429),d=e(31600);r.register("particles",function(h,a,l,n){return h!==void 0&&typeof h=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new d(this.scene,h,a,l,n))})},90668:(s,y,e)=>{/** + */var r=e(39429),d=e(31600);r.register("particles",function(h,a,l,n){return h!==void 0&&typeof h=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new d(this.scene,h,a,l,n))})},90668:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(21188),h=e(9871),s.exports={renderWebGL:d,renderCanvas:h}},21188:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(21188),h=e(9871),s.exports={renderWebGL:d,renderCanvas:h}},21188:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(59996),d=e(61340),h=e(70554),a=new d,l=new d,n=new d,u=new d,f=function(o,c,p,v){var m=o.pipelines.set(c.pipeline),S=a,M=l,w=n,C=u;v?(C.loadIdentity(),C.multiply(v),C.translate(c.x,c.y),C.rotate(c.rotation),C.scale(c.scaleX,c.scaleY)):C.applyITRS(c.x,c.y,c.rotation,c.scaleX,c.scaleY);var A=h.getTintAppendFloatAlpha,P=p.alpha,b=c.alpha;o.pipelines.preBatch(c);var O=c.alive,I=O.length,D=c.viewBounds;if(!(I===0||D&&!r(D,p.worldView))){c.sortCallback&&c.depthSort(),p.addToRenderList(c),S.copyFrom(p.matrix),S.multiplyWithOffset(C,-p.scrollX*c.scrollFactorX,-p.scrollY*c.scrollFactorY),o.setBlendMode(c.blendMode),c.mask&&(c.mask.preRenderWebGL(o,c,p),o.pipelines.set(c.pipeline));for(var B=c.tintFill,G,z,X=0;X{/** + */var r=e(59996),d=e(61340),h=e(70554),a=new d,l=new d,n=new d,u=new d,f=function(o,c,p,v){var m=o.pipelines.set(c.pipeline),S=a,M=l,w=n,C=u;v?(C.loadIdentity(),C.multiply(v),C.translate(c.x,c.y),C.rotate(c.rotation),C.scale(c.scaleX,c.scaleY)):C.applyITRS(c.x,c.y,c.rotation,c.scaleX,c.scaleY);var A=h.getTintAppendFloatAlpha,P=p.alpha,b=c.alpha;o.pipelines.preBatch(c);var O=c.alive,I=O.length,D=c.viewBounds;if(!(I===0||D&&!r(D,p.worldView))){c.sortCallback&&c.depthSort(),p.addToRenderList(c),S.copyFrom(p.matrix),S.multiplyWithOffset(C,-p.scrollX*c.scrollFactorX,-p.scrollY*c.scrollFactorY),o.setBlendMode(c.blendMode),c.mask&&(c.mask.preRenderWebGL(o,c,p),o.pipelines.set(c.pipeline));for(var B=c.tintFill,G,z,X=0;X{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1723,83 +1723,83 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="stop"},20696:(s,y,e)=>{/** + */s.exports="stop"},20696:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={COMPLETE:e(9774),DEATH_ZONE:e(812),EXPLODE:e(30522),START:e(96695),STOP:e(18677)}},18404:(s,y,e)=>{/** + */s.exports={COMPLETE:e(9774),DEATH_ZONE:e(812),EXPLODE:e(30522),START:e(96695),STOP:e(18677)}},18404:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={EmitterColorOp:e(76472),EmitterOp:e(44777),Events:e(20696),GravityWell:e(24502),Particle:e(56480),ParticleBounds:e(69601),ParticleEmitter:e(31600),ParticleProcessor:e(20286),Zones:e(21024)}},26388:(s,y,e)=>{/** + */s.exports={EmitterColorOp:e(76472),EmitterOp:e(44777),Events:e(20696),GravityWell:e(24502),Particle:e(56480),ParticleBounds:e(69601),ParticleEmitter:e(31600),ParticleProcessor:e(20286),Zones:e(21024)}},26388:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a,l){this.source=a,this.killOnEnter=l},willKill:function(h){var a=h.worldPosition,l=this.source.contains(a.x,a.y);return l&&this.killOnEnter||!l&&!this.killOnEnter}});s.exports=d},19909:(s,y,e)=>{/** + */var r=e(83419),d=new r({initialize:function(a,l){this.source=a,this.killOnEnter=l},willKill:function(h){var a=h.worldPosition,l=this.source.contains(a.x,a.y);return l&&this.killOnEnter||!l&&!this.killOnEnter}});s.exports=d},19909:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a,l,n,u,f,o){u===void 0&&(u=!1),f===void 0&&(f=!0),o===void 0&&(o=-1),this.source=a,this.points=[],this.quantity=l,this.stepRate=n,this.yoyo=u,this.counter=-1,this.seamless=f,this._length=0,this._direction=0,this.total=o,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var h=this.points[0],a=this.points[this.points.length-1];h.x===a.x&&h.y===a.y&&this.points.pop()}var l=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(h){return this.source=h,this.updateSource()},getPoint:function(h){this._direction===0?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,this.counter===-1&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var a=this.points[this.counter];a&&(h.x=a.x,h.y=a.y)}});s.exports=d},68875:(s,y,e)=>{/** + */var r=e(83419),d=new r({initialize:function(a,l,n,u,f,o){u===void 0&&(u=!1),f===void 0&&(f=!0),o===void 0&&(o=-1),this.source=a,this.points=[],this.quantity=l,this.stepRate=n,this.yoyo=u,this.counter=-1,this.seamless=f,this._length=0,this._direction=0,this.total=o,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var h=this.points[0],a=this.points[this.points.length-1];h.x===a.x&&h.y===a.y&&this.points.pop()}var l=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(h){return this.source=h,this.updateSource()},getPoint:function(h){this._direction===0?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,this.counter===-1&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var a=this.points[this.counter];a&&(h.x=a.x,h.y=a.y)}});s.exports=d},68875:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(26099),h=new r({initialize:function(l){this.source=l,this._tempVec=new d,this.total=-1},getPoint:function(a){var l=this._tempVec;this.source.getRandomPoint(l),a.x=l.x,a.y=l.y}});s.exports=h},21024:(s,y,e)=>{/** + */var r=e(83419),d=e(26099),h=new r({initialize:function(l){this.source=l,this._tempVec=new d,this.total=-1},getPoint:function(a){var l=this._tempVec;this.source.getRandomPoint(l),a.x=l.x,a.y=l.y}});s.exports=h},21024:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={DeathZone:e(26388),EdgeZone:e(19909),RandomZone:e(68875)}},1159:(s,y,e)=>{/** + */s.exports={DeathZone:e(26388),EdgeZone:e(19909),RandomZone:e(68875)}},1159:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(31401),h=e(68287),a=new r({Extends:h,Mixins:[d.PathFollower],initialize:function(n,u,f,o,c,p){h.call(this,n,f,o,c,p),this.path=u},preUpdate:function(l,n){this.anims.update(l,n),this.pathUpdate(l)}});s.exports=a},90145:(s,y,e)=>{/** + */var r=e(83419),d=e(31401),h=e(68287),a=new r({Extends:h,Mixins:[d.PathFollower],initialize:function(n,u,f,o,c,p){h.call(this,n,f,o,c,p),this.path=u},preUpdate:function(l,n){this.anims.update(l,n),this.pathUpdate(l)}});s.exports=a},90145:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39429),d=e(1159);r.register("follower",function(h,a,l,n,u){var f=new d(this.scene,h,a,l,n,u);return this.displayList.add(f),this.updateList.add(f),f})},33663:(s,y,e)=>{/** + */var r=e(39429),d=e(1159);r.register("follower",function(h,a,l,n,u){var f=new d(this.scene,h,a,l,n,u);return this.displayList.add(f),this.updateList.add(f),f})},33663:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(9674),d=e(83419),h=e(48803),a=e(90664),l=e(4703),n=e(45650),u=new d({Extends:l,initialize:function(o,c,p,v,m,S,M,w){v||(v="__DEFAULT"),l.call(this,o,c,p,v,m),this.type="Plane",this.anims=new r(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(S,M,w),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(f,o,c){f===void 0&&(f=8),o===void 0&&(o=8),c===void 0&&(c=!1);var p=!1;return c&&(p=!0),this.gridWidth=f,this.gridHeight=o,this.isTiled=c,this.clear(),h({mesh:this,widthSegments:f,heightSegments:o,isOrtho:!1,tile:c,flipY:p}),this},setSizeToFrame:function(f){f===void 0&&(f=!0);var o=this.frame;if(this.setPerspective(this.width/o.width,this.height/o.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!f)return this;var c=this.gridWidth,p=this.gridHeight,v=this.vertices,m=o.u0,S=o.u1,M=o.v0,w=o.v1,C,A,P=0;if(this.isTiled)for(M=o.v1,w=o.v0,A=0;A7&&C>7?M.push(m.r,m.g,m.b,c):M.push(S.r,S.g,S.b,p);var A=this.scene.sys.textures.addUint8Array(n(),new Uint8Array(M),16,16);return this.removeCheckerboard(),this.setTexture(A),this.setSizeToFrame(),this.setViewHeight(v),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(f,o){return this.anims.play(f,o)},playReverse:function(f,o){return this.anims.playReverse(f,o)},playAfterDelay:function(f,o){return this.anims.playAfterDelay(f,o)},playAfterRepeat:function(f,o){return this.anims.playAfterRepeat(f,o)},stop:function(){return this.anims.stop()},stopAfterDelay:function(f){return this.anims.stopAfterDelay(f)},stopAfterRepeat:function(f){return this.anims.stopAfterRepeat(f)},stopOnFrame:function(f){return this.anims.stopOnFrame(f)},preUpdate:function(f,o){l.prototype.preUpdate.call(this,f,o),this.anims.update(f,o)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});s.exports=u},56015:(s,y,e)=>{/** + */var r=e(9674),d=e(83419),h=e(48803),a=e(90664),l=e(4703),n=e(45650),u=new d({Extends:l,initialize:function(o,c,p,v,m,S,M,w){v||(v="__DEFAULT"),l.call(this,o,c,p,v,m),this.type="Plane",this.anims=new r(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(S,M,w),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(f,o,c){f===void 0&&(f=8),o===void 0&&(o=8),c===void 0&&(c=!1);var p=!1;return c&&(p=!0),this.gridWidth=f,this.gridHeight=o,this.isTiled=c,this.clear(),h({mesh:this,widthSegments:f,heightSegments:o,isOrtho:!1,tile:c,flipY:p}),this},setSizeToFrame:function(f){f===void 0&&(f=!0);var o=this.frame;if(this.setPerspective(this.width/o.width,this.height/o.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!f)return this;var c=this.gridWidth,p=this.gridHeight,v=this.vertices,m=o.u0,S=o.u1,M=o.v0,w=o.v1,C,A,P=0;if(this.isTiled)for(M=o.v1,w=o.v0,A=0;A7&&C>7?M.push(m.r,m.g,m.b,c):M.push(S.r,S.g,S.b,p);var A=this.scene.sys.textures.addUint8Array(n(),new Uint8Array(M),16,16);return this.removeCheckerboard(),this.setTexture(A),this.setSizeToFrame(),this.setViewHeight(v),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(f,o){return this.anims.play(f,o)},playReverse:function(f,o){return this.anims.playReverse(f,o)},playAfterDelay:function(f,o){return this.anims.playAfterDelay(f,o)},playAfterRepeat:function(f,o){return this.anims.playAfterRepeat(f,o)},stop:function(){return this.anims.stop()},stopAfterDelay:function(f){return this.anims.stopAfterDelay(f)},stopAfterRepeat:function(f){return this.anims.stopAfterRepeat(f)},stopOnFrame:function(f){return this.anims.stopOnFrame(f)},preUpdate:function(f,o){l.prototype.preUpdate.call(this,f,o),this.anims.update(f,o)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});s.exports=u},56015:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(13059),h=e(44603),a=e(23568),l=e(35154),n=e(33663);h.register("plane",function(u,f){u===void 0&&(u={});var o=a(u,"key",null),c=a(u,"frame",null),p=l(u,"width",8),v=l(u,"height",8),m=l(u,"tile",!1),S=new n(this.scene,0,0,o,c,p,v,m);f!==void 0&&(u.add=f);var M=l(u,"checkerboard",null);if(M){var w=l(M,"color1",16777215),C=l(M,"color2",255),A=l(M,"alpha1",255),P=l(M,"alpha2",255),b=l(M,"height",128);S.createCheckerboard(w,C,A,P,b)}return r(this.scene,S,u),d(S,u),S})},30985:(s,y,e)=>{/** + */var r=e(25305),d=e(13059),h=e(44603),a=e(23568),l=e(35154),n=e(33663);h.register("plane",function(u,f){u===void 0&&(u={});var o=a(u,"key",null),c=a(u,"frame",null),p=l(u,"width",8),v=l(u,"height",8),m=l(u,"tile",!1),S=new n(this.scene,0,0,o,c,p,v,m);f!==void 0&&(u.add=f);var M=l(u,"checkerboard",null);if(M){var w=l(M,"color1",16777215),C=l(M,"color2",255),A=l(M,"alpha1",255),P=l(M,"alpha2",255),b=l(M,"height",128);S.createCheckerboard(w,C,A,P,b)}return r(this.scene,S,u),d(S,u),S})},30985:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(33663),d=e(39429);d.register("plane",function(h,a,l,n,u,f,o){return this.displayList.add(new r(this.scene,h,a,l,n,u,f,o))})},80321:(s,y,e)=>{/** + */var r=e(33663),d=e(39429);d.register("plane",function(h,a,l,n,u,f,o){return this.displayList.add(new r(this.scene,h,a,l,n,u,f,o))})},80321:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(31401),h=e(95643),a=e(30100),l=e(36060),n=e(67277),u=new r({Extends:h,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.Mask,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Transform,d.Visible,n],initialize:function(o,c,p,v,m,S,M){v===void 0&&(v=16777215),m===void 0&&(m=128),S===void 0&&(S=1),M===void 0&&(M=.1),h.call(this,o,"PointLight"),this.initPipeline(l.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(c,p),this.color=a(v),this.intensity=S,this.attenuation=M,this.width=m*2,this.height=m*2,this._radius=m},radius:{get:function(){return this._radius},set:function(f){this._radius=f,this.width=f*2,this.height=f*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});s.exports=u},39829:(s,y,e)=>{/** + */var r=e(83419),d=e(31401),h=e(95643),a=e(30100),l=e(36060),n=e(67277),u=new r({Extends:h,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.Mask,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Transform,d.Visible,n],initialize:function(o,c,p,v,m,S,M){v===void 0&&(v=16777215),m===void 0&&(m=128),S===void 0&&(S=1),M===void 0&&(M=.1),h.call(this,o,"PointLight"),this.initPipeline(l.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(c,p),this.color=a(v),this.intensity=S,this.attenuation=M,this.width=m*2,this.height=m*2,this._radius=m},radius:{get:function(){return this._radius},set:function(f){this._radius=f,this.width=f*2,this.height=f*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});s.exports=u},39829:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(44603),h=e(23568),a=e(80321);d.register("pointlight",function(l,n){l===void 0&&(l={});var u=h(l,"color",16777215),f=h(l,"radius",128),o=h(l,"intensity",1),c=h(l,"attenuation",.1),p=new a(this.scene,0,0,u,f,o,c);return n!==void 0&&(l.add=n),r(this.scene,p,l),p})},71255:(s,y,e)=>{/** + */var r=e(25305),d=e(44603),h=e(23568),a=e(80321);d.register("pointlight",function(l,n){l===void 0&&(l={});var u=h(l,"color",16777215),f=h(l,"radius",128),o=h(l,"intensity",1),c=h(l,"attenuation",.1),p=new a(this.scene,0,0,u,f,o,c);return n!==void 0&&(l.add=n),r(this.scene,p,l),p})},71255:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39429),d=e(80321);r.register("pointlight",function(h,a,l,n,u,f){return this.displayList.add(new d(this.scene,h,a,l,n,u,f))})},67277:(s,y,e)=>{/** + */var r=e(39429),d=e(80321);r.register("pointlight",function(h,a,l,n,u,f){return this.displayList.add(new d(this.scene,h,a,l,n,u,f))})},67277:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(57787),s.exports={renderWebGL:d,renderCanvas:h}},57787:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(57787),s.exports={renderWebGL:d,renderCanvas:h}},57787:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91296),d=function(h,a,l,n){l.addToRenderList(a);var u=h.pipelines.set(a.pipeline),f=r(a,l,n).calc,o=a.width,c=a.height,p=-a._radius,v=-a._radius,m=p+o,S=v+c,M=f.getX(0,0),w=f.getY(0,0),C=f.getX(p,v),A=f.getY(p,v),P=f.getX(p,S),b=f.getY(p,S),O=f.getX(m,S),I=f.getY(m,S),D=f.getX(m,v),B=f.getY(m,v);h.pipelines.preBatch(a),u.batchPointLight(a,l,C,A,P,b,O,I,D,B,M,w),h.pipelines.postBatch(a)};s.exports=d},591:(s,y,e)=>{/** + */var r=e(91296),d=function(h,a,l,n){l.addToRenderList(a);var u=h.pipelines.set(a.pipeline),f=r(a,l,n).calc,o=a.width,c=a.height,p=-a._radius,v=-a._radius,m=p+o,S=v+c,M=f.getX(0,0),w=f.getY(0,0),C=f.getX(p,v),A=f.getY(p,v),P=f.getX(p,S),b=f.getY(p,S),O=f.getX(m,S),I=f.getY(m,S),D=f.getX(m,v),B=f.getY(m,v);h.pipelines.preBatch(a),u.batchPointLight(a,l,C,A,P,b,O,I,D,B,M,w),h.pipelines.postBatch(a)};s.exports=d},591:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(81320),h=e(88571),a=new r({Extends:h,initialize:function(n,u,f,o,c){u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o=32),c===void 0&&(c=32);var p=new d(n.sys.textures,"",o,c);h.call(this,n,u,f,p),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(l,n){this.width=l,this.height=n,this.texture.setSize(l,n),this.updateDisplayOrigin();var u=this.input;return u&&!u.customHitArea&&(u.hitArea.width=l,u.hitArea.height=n),this},resize:function(l,n){return this.setSize(l,n),this},saveTexture:function(l){var n=this.texture;return n.key=l,n.manager.addDynamicTexture(n)&&(this._saved=!0),n},fill:function(l,n,u,f,o,c){return this.texture.fill(l,n,u,f,o,c),this},clear:function(){return this.texture.clear(),this},stamp:function(l,n,u,f,o){return this.texture.stamp(l,n,u,f,o),this},erase:function(l,n,u){return this.texture.erase(l,n,u),this},draw:function(l,n,u,f,o){return this.texture.draw(l,n,u,f,o),this},drawFrame:function(l,n,u,f,o,c){return this.texture.drawFrame(l,n,u,f,o,c),this},repeat:function(l,n,u,f,o,c,p,v,m){return this.texture.repeat(l,n,u,f,o,c,p,v,m),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(l,n,u,f,o){return this.texture.batchDraw(l,n,u,f,o),this},batchDrawFrame:function(l,n,u,f,o,c){return this.texture.batchDrawFrame(l,n,u,f,o,c),this},endDraw:function(l){return this.texture.endDraw(l),this},snapshotArea:function(l,n,u,f,o,c,p){return this.texture.snapshotArea(l,n,u,f,o,c,p),this},snapshot:function(l,n,u){return this.snapshotArea(0,0,this.width,this.height,l,n,u)},snapshotPixel:function(l,n,u){return this.snapshotArea(l,n,1,1,u,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});s.exports=a},34495:(s,y,e)=>{/** + */var r=e(83419),d=e(81320),h=e(88571),a=new r({Extends:h,initialize:function(n,u,f,o,c){u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o=32),c===void 0&&(c=32);var p=new d(n.sys.textures,"",o,c);h.call(this,n,u,f,p),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(l,n){this.width=l,this.height=n,this.texture.setSize(l,n),this.updateDisplayOrigin();var u=this.input;return u&&!u.customHitArea&&(u.hitArea.width=l,u.hitArea.height=n),this},resize:function(l,n){return this.setSize(l,n),this},saveTexture:function(l){var n=this.texture;return n.key=l,n.manager.addDynamicTexture(n)&&(this._saved=!0),n},fill:function(l,n,u,f,o,c){return this.texture.fill(l,n,u,f,o,c),this},clear:function(){return this.texture.clear(),this},stamp:function(l,n,u,f,o){return this.texture.stamp(l,n,u,f,o),this},erase:function(l,n,u){return this.texture.erase(l,n,u),this},draw:function(l,n,u,f,o){return this.texture.draw(l,n,u,f,o),this},drawFrame:function(l,n,u,f,o,c){return this.texture.drawFrame(l,n,u,f,o,c),this},repeat:function(l,n,u,f,o,c,p,v,m){return this.texture.repeat(l,n,u,f,o,c,p,v,m),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(l,n,u,f,o){return this.texture.batchDraw(l,n,u,f,o),this},batchDrawFrame:function(l,n,u,f,o,c){return this.texture.batchDrawFrame(l,n,u,f,o,c),this},endDraw:function(l){return this.texture.endDraw(l),this},snapshotArea:function(l,n,u,f,o,c,p){return this.texture.snapshotArea(l,n,u,f,o,c,p),this},snapshot:function(l,n,u){return this.snapshotArea(0,0,this.width,this.height,l,n,u)},snapshotPixel:function(l,n,u){return this.snapshotArea(l,n,1,1,u,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});s.exports=a},34495:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(44603),h=e(23568),a=e(591);d.register("renderTexture",function(l,n){l===void 0&&(l={});var u=h(l,"x",0),f=h(l,"y",0),o=h(l,"width",32),c=h(l,"height",32),p=new a(this.scene,u,f,o,c);return n!==void 0&&(l.add=n),r(this.scene,p,l),p})},60505:(s,y,e)=>{/** + */var r=e(25305),d=e(44603),h=e(23568),a=e(591);d.register("renderTexture",function(l,n){l===void 0&&(l={});var u=h(l,"x",0),f=h(l,"y",0),o=h(l,"width",32),c=h(l,"height",32),p=new a(this.scene,u,f,o,c);return n!==void 0&&(l.add=n),r(this.scene,p,l),p})},60505:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39429),d=e(591);r.register("renderTexture",function(h,a,l,n){return this.displayList.add(new d(this.scene,h,a,l,n))})},77757:(s,y,e)=>{/** + */var r=e(39429),d=e(591);r.register("renderTexture",function(h,a,l,n){return this.displayList.add(new d(this.scene,h,a,l,n))})},77757:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1807,23 +1807,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(){};s.exports=y},26209:(s,y,e)=>{/** + */var x=function(){};s.exports=x},26209:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(44603),h=e(23568),a=e(35154),l=e(77757);d.register("rope",function(n,u){n===void 0&&(n={});var f=h(n,"key",null),o=h(n,"frame",null),c=h(n,"horizontal",!0),p=a(n,"points",void 0),v=a(n,"colors",void 0),m=a(n,"alphas",void 0),S=new l(this.scene,0,0,f,o,p,c,v,m);return u!==void 0&&(n.add=u),r(this.scene,S,n),S})},96819:(s,y,e)=>{/** + */var r=e(25305),d=e(44603),h=e(23568),a=e(35154),l=e(77757);d.register("rope",function(n,u){n===void 0&&(n={});var f=h(n,"key",null),o=h(n,"frame",null),c=h(n,"horizontal",!0),p=a(n,"points",void 0),v=a(n,"colors",void 0),m=a(n,"alphas",void 0),S=new l(this.scene,0,0,f,o,p,c,v,m);return u!==void 0&&(n.add=u),r(this.scene,S,n),S})},96819:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(77757),d=e(39429);d.register("rope",function(h,a,l,n,u,f,o,c){return this.displayList.add(new r(this.scene,h,a,l,n,u,f,o,c))})},38745:(s,y,e)=>{/** + */var r=e(77757),d=e(39429);d.register("rope",function(h,a,l,n,u,f,o,c){return this.displayList.add(new r(this.scene,h,a,l,n,u,f,o,c))})},38745:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(20439),h=e(95262),s.exports={renderWebGL:d,renderCanvas:h}},20439:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(20439),h=e(95262),s.exports={renderWebGL:d,renderCanvas:h}},20439:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91296),d=e(70554),h=function(a,l,n,u){n.addToRenderList(l);var f=a.pipelines.set(l.pipeline,l),o=r(l,n,u).calc,c=l.vertices,p=l.uv,v=l.colors,m=l.alphas,S=l.alpha,M=d.getTintAppendFloatAlpha,w=n.roundPixels,C=c.length,A=Math.floor(C*.5);f.flush(),a.pipelines.preBatch(l);var P=f.setGameObject(l),b=f.vertexViewF32,O=f.vertexViewU32,I=f.vertexCount*f.currentShader.vertexComponentCount-1,D=0,B=l.tintFill;l.dirty&&l.updateVertices();for(var G=l.debugCallback,z=[],X=0;X{/** + */var r=e(91296),d=e(70554),h=function(a,l,n,u){n.addToRenderList(l);var f=a.pipelines.set(l.pipeline,l),o=r(l,n,u).calc,c=l.vertices,p=l.uv,v=l.colors,m=l.alphas,S=l.alpha,M=d.getTintAppendFloatAlpha,w=n.roundPixels,C=c.length,A=Math.floor(C*.5);f.flush(),a.pipelines.preBatch(l);var P=f.setGameObject(l),b=f.vertexViewF32,O=f.vertexViewU32,I=f.vertexCount*f.currentShader.vertexComponentCount-1,D=0,B=l.tintFill;l.dirty&&l.updateVertices();for(var G=l.debugCallback,z=[],X=0;X{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1831,23 +1831,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(){};s.exports=y},54935:(s,y,e)=>{/** + */var x=function(){};s.exports=x},54935:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(44603),h=e(23568),a=e(20071);d.register("shader",function(l,n){l===void 0&&(l={});var u=h(l,"key",null),f=h(l,"x",0),o=h(l,"y",0),c=h(l,"width",128),p=h(l,"height",128),v=new a(this.scene,u,f,o,c,p);return n!==void 0&&(l.add=n),r(this.scene,v,l),v})},74177:(s,y,e)=>{/** + */var r=e(25305),d=e(44603),h=e(23568),a=e(20071);d.register("shader",function(l,n){l===void 0&&(l={});var u=h(l,"key",null),f=h(l,"x",0),o=h(l,"y",0),c=h(l,"width",128),p=h(l,"height",128),v=new a(this.scene,u,f,o,c,p);return n!==void 0&&(l.add=n),r(this.scene,v,l),v})},74177:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(20071),d=e(39429);d.register("shader",function(h,a,l,n,u,f,o){return this.displayList.add(new r(this.scene,h,a,l,n,u,f,o))})},25479:(s,y,e)=>{/** + */var r=e(20071),d=e(39429);d.register("shader",function(h,a,l,n,u,f,o){return this.displayList.add(new r(this.scene,h,a,l,n,u,f,o))})},25479:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(19257),h=e(80464),s.exports={renderWebGL:d,renderCanvas:h}},19257:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(19257),h=e(80464),s.exports={renderWebGL:d,renderCanvas:h}},19257:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91296),d=function(h,a,l,n){if(a.shader){if(l.addToRenderList(a),h.pipelines.clear(),a.renderToTexture)a.load(),a.flush();else{var u=r(a,l,n).calc;(h.width!==a._rendererWidth||h.height!==a._rendererHeight)&&a.projOrtho(0,h.width,h.height,0),a.load(u.matrix),a.flush()}h.pipelines.rebind()}};s.exports=d},10441:(s,y,e)=>{/** + */var r=e(91296),d=function(h,a,l,n){if(a.shader){if(l.addToRenderList(a),h.pipelines.clear(),a.renderToTexture)a.load(),a.flush();else{var u=r(a,l,n).calc;(h.width!==a._rendererWidth||h.height!==a._rendererHeight)&&a.projOrtho(0,h.width,h.height,0),a.load(u.matrix),a.flush()}h.pipelines.rebind()}};s.exports=d},10441:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -1855,239 +1855,239 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){var a=d||r.fillColor,l=h||r.fillAlpha,n=(a&16711680)>>>16,u=(a&65280)>>>8,f=a&255;e.fillStyle="rgba("+n+","+u+","+f+","+l+")"};s.exports=y},75177:s=>{/** + */var x=function(e,r,d,h){var a=d||r.fillColor,l=h||r.fillAlpha,n=(a&16711680)>>>16,u=(a&65280)>>>8,f=a&255;e.fillStyle="rgba("+n+","+u+","+f+","+l+")"};s.exports=x},75177:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){var a=d||r.strokeColor,l=h||r.strokeAlpha,n=(a&16711680)>>>16,u=(a&65280)>>>8,f=a&255;e.strokeStyle="rgba("+n+","+u+","+f+","+l+")",e.lineWidth=r.lineWidth};s.exports=y},17803:(s,y,e)=>{/** + */var x=function(e,r,d,h){var a=d||r.strokeColor,l=h||r.strokeAlpha,n=(a&16711680)>>>16,u=(a&65280)>>>8,f=a&255;e.strokeStyle="rgba("+n+","+u+","+f+","+l+")",e.lineWidth=r.lineWidth};s.exports=x},17803:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(31401),h=e(95643),a=e(23031),l=new r({Extends:h,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.GetBounds,d.Mask,d.Origin,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Transform,d.Visible],initialize:function(u,f,o){f===void 0&&(f="Shape"),h.call(this,u,f),this.geom=o,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new a,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(n,u){return u===void 0&&(u=1),n===void 0?this.isFilled=!1:(this.fillColor=n,this.fillAlpha=u,this.isFilled=!0),this},setStrokeStyle:function(n,u,f){return f===void 0&&(f=1),n===void 0?this.isStroked=!1:(this.lineWidth=n,this.strokeColor=u,this.strokeAlpha=f,this.isStroked=!0),this},setClosePath:function(n){return this.closePath=n,this},setSize:function(n,u){return this.width=n,this.height=u,this},setDisplaySize:function(n,u){return this.displayWidth=n,this.displayHeight=u,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(n){this.scaleX=n/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(n){this.scaleY=n/this.height}}});s.exports=l},34682:(s,y,e)=>{/** + */var r=e(83419),d=e(31401),h=e(95643),a=e(23031),l=new r({Extends:h,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.GetBounds,d.Mask,d.Origin,d.Pipeline,d.PostPipeline,d.ScrollFactor,d.Transform,d.Visible],initialize:function(u,f,o){f===void 0&&(f="Shape"),h.call(this,u,f),this.geom=o,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new a,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(n,u){return u===void 0&&(u=1),n===void 0?this.isFilled=!1:(this.fillColor=n,this.fillAlpha=u,this.isFilled=!0),this},setStrokeStyle:function(n,u,f){return f===void 0&&(f=1),n===void 0?this.isStroked=!1:(this.lineWidth=n,this.strokeColor=u,this.strokeAlpha=f,this.isStroked=!0),this},setClosePath:function(n){return this.closePath=n,this},setSize:function(n,u){return this.width=n,this.height=u,this},setDisplaySize:function(n,u){return this.displayWidth=n,this.displayHeight=u,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(n){this.scaleX=n/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(n){this.scaleY=n/this.height}}});s.exports=l},34682:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(70554),d=function(h,a,l,n,u){var f=h.strokeTint,o=r.getTintAppendFloatAlpha(a.strokeColor,a.strokeAlpha*l);f.TL=o,f.TR=o,f.BL=o,f.BR=o;var c=a.pathData,p=c.length-1,v=a.lineWidth,m=v/2,S=c[0]-n,M=c[1]-u;a.closePath||(p-=2);for(var w=2;w{/** + */var r=e(70554),d=function(h,a,l,n,u){var f=h.strokeTint,o=r.getTintAppendFloatAlpha(a.strokeColor,a.strokeAlpha*l);f.TL=o,f.TR=o,f.BL=o,f.BR=o;var c=a.pathData,p=c.length-1,v=a.lineWidth,m=v/2,S=c[0]-n,M=c[1]-u;a.closePath||(p-=2);for(var w=2;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(13609),d=e(83419),h=e(39506),a=e(94811),l=e(96503),n=e(36383),u=e(17803),f=new d({Extends:u,Mixins:[r],initialize:function(c,p,v,m,S,M,w,C,A){p===void 0&&(p=0),v===void 0&&(v=0),m===void 0&&(m=128),S===void 0&&(S=0),M===void 0&&(M=360),w===void 0&&(w=!1),u.call(this,c,"Arc",new l(0,0,m)),this._startAngle=S,this._endAngle=M,this._anticlockwise=w,this._iterations=.01,this.setPosition(p,v);var P=this.geom.radius*2;this.setSize(P,P),C!==void 0&&this.setFillStyle(C,A),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(o){this._iterations=o,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(o){this.geom.radius=o;var c=o*2;this.setSize(c,c),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(o){this._startAngle=o,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(o){this._endAngle=o,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(o){this._anticlockwise=o,this.updateData()}},setRadius:function(o){return this.radius=o,this},setIterations:function(o){return o===void 0&&(o=.01),this.iterations=o,this},setStartAngle:function(o,c){return this._startAngle=o,c!==void 0&&(this._anticlockwise=c),this.updateData()},setEndAngle:function(o,c){return this._endAngle=o,c!==void 0&&(this._anticlockwise=c),this.updateData()},updateData:function(){var o=this._iterations,c=o,p=this.geom.radius,v=h(this._startAngle),m=h(this._endAngle),S=this._anticlockwise,M=p,w=p;m-=v,S?m<-n.PI2?m=-n.PI2:m>0&&(m=-n.PI2+m%n.PI2):m>n.PI2?m=n.PI2:m<0&&(m=n.PI2+m%n.PI2);for(var C=[M+Math.cos(v)*p,w+Math.sin(v)*p],A;c<1;)A=m*c+v,C.push(M+Math.cos(A)*p,w+Math.sin(A)*p),c+=o;return A=m+v,C.push(M+Math.cos(A)*p,w+Math.sin(A)*p),C.push(M+Math.cos(v)*p,w+Math.sin(v)*p),this.pathIndexes=a(C),this.pathData=C,this}});s.exports=f},42542:(s,y,e)=>{/** + */var r=e(13609),d=e(83419),h=e(39506),a=e(94811),l=e(96503),n=e(36383),u=e(17803),f=new d({Extends:u,Mixins:[r],initialize:function(c,p,v,m,S,M,w,C,A){p===void 0&&(p=0),v===void 0&&(v=0),m===void 0&&(m=128),S===void 0&&(S=0),M===void 0&&(M=360),w===void 0&&(w=!1),u.call(this,c,"Arc",new l(0,0,m)),this._startAngle=S,this._endAngle=M,this._anticlockwise=w,this._iterations=.01,this.setPosition(p,v);var P=this.geom.radius*2;this.setSize(P,P),C!==void 0&&this.setFillStyle(C,A),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(o){this._iterations=o,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(o){this.geom.radius=o;var c=o*2;this.setSize(c,c),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(o){this._startAngle=o,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(o){this._endAngle=o,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(o){this._anticlockwise=o,this.updateData()}},setRadius:function(o){return this.radius=o,this},setIterations:function(o){return o===void 0&&(o=.01),this.iterations=o,this},setStartAngle:function(o,c){return this._startAngle=o,c!==void 0&&(this._anticlockwise=c),this.updateData()},setEndAngle:function(o,c){return this._endAngle=o,c!==void 0&&(this._anticlockwise=c),this.updateData()},updateData:function(){var o=this._iterations,c=o,p=this.geom.radius,v=h(this._startAngle),m=h(this._endAngle),S=this._anticlockwise,M=p,w=p;m-=v,S?m<-n.PI2?m=-n.PI2:m>0&&(m=-n.PI2+m%n.PI2):m>n.PI2?m=n.PI2:m<0&&(m=n.PI2+m%n.PI2);for(var C=[M+Math.cos(v)*p,w+Math.sin(v)*p],A;c<1;)A=m*c+v,C.push(M+Math.cos(A)*p,w+Math.sin(A)*p),c+=o;return A=m+v,C.push(M+Math.cos(A)*p,w+Math.sin(A)*p),C.push(M+Math.cos(v)*p,w+Math.sin(v)*p),this.pathIndexes=a(C),this.pathData=C,this}});s.exports=f},42542:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39506),d=e(65960),h=e(75177),a=e(20926),l=function(n,u,f,o){f.addToRenderList(u);var c=n.currentContext;if(a(n,c,u,f,o)){var p=u.radius;c.beginPath(),c.arc(p-u.originX*(p*2),p-u.originY*(p*2),p,r(u._startAngle),r(u._endAngle),u.anticlockwise),u.closePath&&c.closePath(),u.isFilled&&(d(c,u),c.fill()),u.isStroked&&(h(c,u),c.stroke()),c.restore()}};s.exports=l},42563:(s,y,e)=>{/** + */var r=e(39506),d=e(65960),h=e(75177),a=e(20926),l=function(n,u,f,o){f.addToRenderList(u);var c=n.currentContext;if(a(n,c,u,f,o)){var p=u.radius;c.beginPath(),c.arc(p-u.originX*(p*2),p-u.originY*(p*2),p,r(u._startAngle),r(u._endAngle),u.anticlockwise),u.closePath&&c.closePath(),u.isFilled&&(d(c,u),c.fill()),u.isStroked&&(h(c,u),c.stroke()),c.restore()}};s.exports=l},42563:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(23629),d=e(39429);d.register("arc",function(h,a,l,n,u,f,o,c){return this.displayList.add(new r(this.scene,h,a,l,n,u,f,o,c))}),d.register("circle",function(h,a,l,n,u){return this.displayList.add(new r(this.scene,h,a,l,0,360,!1,n,u))})},13609:(s,y,e)=>{/** + */var r=e(23629),d=e(39429);d.register("arc",function(h,a,l,n,u,f,o,c){return this.displayList.add(new r(this.scene,h,a,l,n,u,f,o,c))}),d.register("circle",function(h,a,l,n,u){return this.displayList.add(new r(this.scene,h,a,l,0,360,!1,n,u))})},13609:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(41447),h=e(42542),s.exports={renderWebGL:d,renderCanvas:h}},41447:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(41447),h=e(42542),s.exports={renderWebGL:d,renderCanvas:h}},41447:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91296),d=e(10441),h=e(34682),a=function(l,n,u,f){u.addToRenderList(n);var o=l.pipelines.set(n.pipeline),c=r(n,u,f),p=o.calcMatrix.copyFrom(c.calc),v=n._displayOriginX,m=n._displayOriginY,S=u.alpha*n.alpha;l.pipelines.preBatch(n),n.isFilled&&d(o,p,n,S,v,m),n.isStroked&&h(o,n,S,v,m),l.pipelines.postBatch(n)};s.exports=a},89:(s,y,e)=>{/** + */var r=e(91296),d=e(10441),h=e(34682),a=function(l,n,u,f){u.addToRenderList(n);var o=l.pipelines.set(n.pipeline),c=r(n,u,f),p=o.calcMatrix.copyFrom(c.calc),v=n._displayOriginX,m=n._displayOriginY,S=u.alpha*n.alpha;l.pipelines.preBatch(n),n.isFilled&&d(o,p,n,S,v,m),n.isStroked&&h(o,n,S,v,m),l.pipelines.postBatch(n)};s.exports=a},89:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(33141),h=e(94811),a=e(87841),l=e(17803),n=new r({Extends:l,Mixins:[d],initialize:function(f,o,c,p,v,m){o===void 0&&(o=0),c===void 0&&(c=0),l.call(this,f,"Curve",p),this._smoothness=32,this._curveBounds=new a,this.closePath=!1,this.setPosition(o,c),v!==void 0&&this.setFillStyle(v,m),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(u){this._smoothness=u,this.updateData()}},setSmoothness:function(u){return this._smoothness=u,this.updateData()},updateData:function(){var u=this._curveBounds,f=this._smoothness;this.geom.getBounds(u,f),this.setSize(u.width,u.height),this.updateDisplayOrigin();for(var o=[],c=this.geom.getPoints(f),p=0;p{/** + */var r=e(83419),d=e(33141),h=e(94811),a=e(87841),l=e(17803),n=new r({Extends:l,Mixins:[d],initialize:function(f,o,c,p,v,m){o===void 0&&(o=0),c===void 0&&(c=0),l.call(this,f,"Curve",p),this._smoothness=32,this._curveBounds=new a,this.closePath=!1,this.setPosition(o,c),v!==void 0&&this.setFillStyle(v,m),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(u){this._smoothness=u,this.updateData()}},setSmoothness:function(u){return this._smoothness=u,this.updateData()},updateData:function(){var u=this._curveBounds,f=this._smoothness;this.geom.getBounds(u,f),this.setSize(u.width,u.height),this.updateDisplayOrigin();for(var o=[],c=this.geom.getPoints(f),p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(65960),d=e(75177),h=e(20926),a=function(l,n,u,f){u.addToRenderList(n);var o=l.currentContext;if(h(l,o,n,u,f)){var c=n._displayOriginX+n._curveBounds.x,p=n._displayOriginY+n._curveBounds.y,v=n.pathData,m=v.length-1,S=v[0]-c,M=v[1]-p;o.beginPath(),o.moveTo(S,M),n.closePath||(m-=2);for(var w=2;w{/** + */var r=e(65960),d=e(75177),h=e(20926),a=function(l,n,u,f){u.addToRenderList(n);var o=l.currentContext;if(h(l,o,n,u,f)){var c=n._displayOriginX+n._curveBounds.x,p=n._displayOriginY+n._curveBounds.y,v=n.pathData,m=v.length-1,S=v[0]-c,M=v[1]-p;o.beginPath(),o.moveTo(S,M),n.closePath||(m-=2);for(var w=2;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39429),d=e(89);r.register("curve",function(h,a,l,n,u){return this.displayList.add(new d(this.scene,h,a,l,n,u))})},33141:(s,y,e)=>{/** + */var r=e(39429),d=e(89);r.register("curve",function(h,a,l,n,u){return this.displayList.add(new d(this.scene,h,a,l,n,u))})},33141:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(53987),h=e(3170),s.exports={renderWebGL:d,renderCanvas:h}},53987:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(53987),h=e(3170),s.exports={renderWebGL:d,renderCanvas:h}},53987:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(10441),d=e(91296),h=e(34682),a=function(l,n,u,f){u.addToRenderList(n);var o=l.pipelines.set(n.pipeline),c=d(n,u,f),p=o.calcMatrix.copyFrom(c.calc),v=n._displayOriginX+n._curveBounds.x,m=n._displayOriginY+n._curveBounds.y,S=u.alpha*n.alpha;l.pipelines.preBatch(n),n.isFilled&&r(o,p,n,S,v,m),n.isStroked&&h(o,n,S,v,m),l.pipelines.postBatch(n)};s.exports=a},19921:(s,y,e)=>{/** + */var r=e(10441),d=e(91296),h=e(34682),a=function(l,n,u,f){u.addToRenderList(n);var o=l.pipelines.set(n.pipeline),c=d(n,u,f),p=o.calcMatrix.copyFrom(c.calc),v=n._displayOriginX+n._curveBounds.x,m=n._displayOriginY+n._curveBounds.y,S=u.alpha*n.alpha;l.pipelines.preBatch(n),n.isFilled&&r(o,p,n,S,v,m),n.isStroked&&h(o,n,S,v,m),l.pipelines.postBatch(n)};s.exports=a},19921:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(94811),h=e(54205),a=e(8497),l=e(17803),n=new r({Extends:l,Mixins:[h],initialize:function(f,o,c,p,v,m,S){o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=128),v===void 0&&(v=128),l.call(this,f,"Ellipse",new a(p/2,v/2,p,v)),this._smoothness=64,this.setPosition(o,c),this.width=p,this.height=v,m!==void 0&&this.setFillStyle(m,S),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(u){this._smoothness=u,this.updateData()}},setSize:function(u,f){return this.width=u,this.height=f,this.geom.setPosition(u/2,f/2),this.geom.setSize(u,f),this.updateData()},setSmoothness:function(u){return this._smoothness=u,this.updateData()},updateData:function(){for(var u=[],f=this.geom.getPoints(this._smoothness),o=0;o{/** + */var r=e(83419),d=e(94811),h=e(54205),a=e(8497),l=e(17803),n=new r({Extends:l,Mixins:[h],initialize:function(f,o,c,p,v,m,S){o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=128),v===void 0&&(v=128),l.call(this,f,"Ellipse",new a(p/2,v/2,p,v)),this._smoothness=64,this.setPosition(o,c),this.width=p,this.height=v,m!==void 0&&this.setFillStyle(m,S),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(u){this._smoothness=u,this.updateData()}},setSize:function(u,f){return this.width=u,this.height=f,this.geom.setPosition(u/2,f/2),this.geom.setSize(u,f),this.updateData()},setSmoothness:function(u){return this._smoothness=u,this.updateData()},updateData:function(){for(var u=[],f=this.geom.getPoints(this._smoothness),o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(65960),d=e(75177),h=e(20926),a=function(l,n,u,f){u.addToRenderList(n);var o=l.currentContext;if(h(l,o,n,u,f)){var c=n._displayOriginX,p=n._displayOriginY,v=n.pathData,m=v.length-1,S=v[0]-c,M=v[1]-p;o.beginPath(),o.moveTo(S,M),n.closePath||(m-=2);for(var w=2;w{/** + */var r=e(65960),d=e(75177),h=e(20926),a=function(l,n,u,f){u.addToRenderList(n);var o=l.currentContext;if(h(l,o,n,u,f)){var c=n._displayOriginX,p=n._displayOriginY,v=n.pathData,m=v.length-1,S=v[0]-c,M=v[1]-p;o.beginPath(),o.moveTo(S,M),n.closePath||(m-=2);for(var w=2;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(19921),d=e(39429);d.register("ellipse",function(h,a,l,n,u,f){return this.displayList.add(new r(this.scene,h,a,l,n,u,f))})},54205:(s,y,e)=>{/** + */var r=e(19921),d=e(39429);d.register("ellipse",function(h,a,l,n,u,f){return this.displayList.add(new r(this.scene,h,a,l,n,u,f))})},54205:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(19467),h=e(7930),s.exports={renderWebGL:d,renderCanvas:h}},19467:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(19467),h=e(7930),s.exports={renderWebGL:d,renderCanvas:h}},19467:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(10441),d=e(91296),h=e(34682),a=function(l,n,u,f){u.addToRenderList(n);var o=l.pipelines.set(n.pipeline),c=d(n,u,f),p=o.calcMatrix.copyFrom(c.calc),v=n._displayOriginX,m=n._displayOriginY,S=u.alpha*n.alpha;l.pipelines.preBatch(n),n.isFilled&&r(o,p,n,S,v,m),n.isStroked&&h(o,n,S,v,m),l.pipelines.postBatch(n)};s.exports=a},30479:(s,y,e)=>{/** + */var r=e(10441),d=e(91296),h=e(34682),a=function(l,n,u,f){u.addToRenderList(n);var o=l.pipelines.set(n.pipeline),c=d(n,u,f),p=o.calcMatrix.copyFrom(c.calc),v=n._displayOriginX,m=n._displayOriginY,S=u.alpha*n.alpha;l.pipelines.preBatch(n),n.isFilled&&r(o,p,n,S,v,m),n.isStroked&&h(o,n,S,v,m),l.pipelines.postBatch(n)};s.exports=a},30479:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(17803),h=e(26015),a=new r({Extends:d,Mixins:[h],initialize:function(n,u,f,o,c,p,v,m,S,M,w){u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o=128),c===void 0&&(c=128),p===void 0&&(p=32),v===void 0&&(v=32),d.call(this,n,"Grid",null),this.cellWidth=p,this.cellHeight=v,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(u,f),this.setSize(o,c),this.setFillStyle(m,S),M!==void 0&&this.setOutlineStyle(M,w),this.updateDisplayOrigin()},setFillStyle:function(l,n){return n===void 0&&(n=1),l===void 0?this.showCells=!1:(this.fillColor=l,this.fillAlpha=n,this.showCells=!0),this},setAltFillStyle:function(l,n){return n===void 0&&(n=1),l===void 0?this.showAltCells=!1:(this.altFillColor=l,this.altFillAlpha=n,this.showAltCells=!0),this},setOutlineStyle:function(l,n){return n===void 0&&(n=1),l===void 0?this.showOutline=!1:(this.outlineFillColor=l,this.outlineFillAlpha=n,this.showOutline=!0),this}});s.exports=a},49912:(s,y,e)=>{/** + */var r=e(83419),d=e(17803),h=e(26015),a=new r({Extends:d,Mixins:[h],initialize:function(n,u,f,o,c,p,v,m,S,M,w){u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o=128),c===void 0&&(c=128),p===void 0&&(p=32),v===void 0&&(v=32),d.call(this,n,"Grid",null),this.cellWidth=p,this.cellHeight=v,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(u,f),this.setSize(o,c),this.setFillStyle(m,S),M!==void 0&&this.setOutlineStyle(M,w),this.updateDisplayOrigin()},setFillStyle:function(l,n){return n===void 0&&(n=1),l===void 0?this.showCells=!1:(this.fillColor=l,this.fillAlpha=n,this.showCells=!0),this},setAltFillStyle:function(l,n){return n===void 0&&(n=1),l===void 0?this.showAltCells=!1:(this.altFillColor=l,this.altFillAlpha=n,this.showAltCells=!0),this},setOutlineStyle:function(l,n){return n===void 0&&(n=1),l===void 0?this.showOutline=!1:(this.outlineFillColor=l,this.outlineFillAlpha=n,this.showOutline=!0),this}});s.exports=a},49912:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(65960),d=e(75177),h=e(20926),a=function(l,n,u,f){u.addToRenderList(n);var o=l.currentContext;if(h(l,o,n,u,f)){var c=-n._displayOriginX,p=-n._displayOriginY,v=u.alpha*n.alpha,m=n.width,S=n.height,M=n.cellWidth,w=n.cellHeight,C=Math.ceil(m/M),A=Math.ceil(S/w),P=M,b=w,O=M-(C*M-m),I=w-(A*w-S),D=n.showCells,B=n.showAltCells,G=n.showOutline,z=0,X=0,j=0,Q=0,tt=0;if(G&&(P--,b--,O===M&&O--,I===w&&I--),D&&n.fillAlpha>0)for(r(o,n),X=0;X0)for(r(o,n,n.altFillColor,n.altFillAlpha*v),X=0;X0){for(d(o,n,n.outlineFillColor,n.outlineFillAlpha*v),z=1;z{/** + */var r=e(65960),d=e(75177),h=e(20926),a=function(l,n,u,f){u.addToRenderList(n);var o=l.currentContext;if(h(l,o,n,u,f)){var c=-n._displayOriginX,p=-n._displayOriginY,v=u.alpha*n.alpha,m=n.width,S=n.height,M=n.cellWidth,w=n.cellHeight,C=Math.ceil(m/M),A=Math.ceil(S/w),P=M,b=w,O=M-(C*M-m),I=w-(A*w-S),D=n.showCells,B=n.showAltCells,G=n.showOutline,z=0,X=0,j=0,Q=0,tt=0;if(G&&(P--,b--,O===M&&O--,I===w&&I--),D&&n.fillAlpha>0)for(r(o,n),X=0;X0)for(r(o,n,n.altFillColor,n.altFillAlpha*v),X=0;X0){for(d(o,n,n.outlineFillColor,n.outlineFillAlpha*v),z=1;z{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39429),d=e(30479);r.register("grid",function(h,a,l,n,u,f,o,c,p,v){return this.displayList.add(new d(this.scene,h,a,l,n,u,f,o,c,p,v))})},26015:(s,y,e)=>{/** + */var r=e(39429),d=e(30479);r.register("grid",function(h,a,l,n,u,f,o,c,p,v){return this.displayList.add(new d(this.scene,h,a,l,n,u,f,o,c,p,v))})},26015:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(46161),h=e(49912),s.exports={renderWebGL:d,renderCanvas:h}},46161:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(46161),h=e(49912),s.exports={renderWebGL:d,renderCanvas:h}},46161:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91296),d=e(70554),h=function(a,l,n,u){n.addToRenderList(l);var f=a.pipelines.set(l.pipeline),o=r(l,n,u),c=f.calcMatrix.copyFrom(o.calc);c.translate(-l._displayOriginX,-l._displayOriginY);var p=n.alpha*l.alpha,v=l.width,m=l.height,S=l.cellWidth,M=l.cellHeight,w=Math.ceil(v/S),C=Math.ceil(m/M),A=S,P=M,b=S-(w*S-v),O=M-(C*M-m),I,D,B=l.showCells,G=l.showAltCells,z=l.showOutline,X=0,j=0,Q=0,tt=0,Y=0;if(z&&(A--,P--,b===S&&b--,O===M&&O--),a.pipelines.preBatch(l),B&&l.fillAlpha>0)for(I=f.fillTint,D=d.getTintAppendFloatAlpha(l.fillColor,l.fillAlpha*p),I.TL=D,I.TR=D,I.BL=D,I.BR=D,j=0;j0)for(I=f.fillTint,D=d.getTintAppendFloatAlpha(l.altFillColor,l.altFillAlpha*p),I.TL=D,I.TR=D,I.BL=D,I.BR=D,j=0;j0){var Z=f.strokeTint,U=d.getTintAppendFloatAlpha(l.outlineFillColor,l.outlineFillAlpha*p);for(Z.TL=U,Z.TR=U,Z.BL=U,Z.BR=U,X=1;X{/** + */var r=e(91296),d=e(70554),h=function(a,l,n,u){n.addToRenderList(l);var f=a.pipelines.set(l.pipeline),o=r(l,n,u),c=f.calcMatrix.copyFrom(o.calc);c.translate(-l._displayOriginX,-l._displayOriginY);var p=n.alpha*l.alpha,v=l.width,m=l.height,S=l.cellWidth,M=l.cellHeight,w=Math.ceil(v/S),C=Math.ceil(m/M),A=S,P=M,b=S-(w*S-v),O=M-(C*M-m),I,D,B=l.showCells,G=l.showAltCells,z=l.showOutline,X=0,j=0,Q=0,tt=0,Y=0;if(z&&(A--,P--,b===S&&b--,O===M&&O--),a.pipelines.preBatch(l),B&&l.fillAlpha>0)for(I=f.fillTint,D=d.getTintAppendFloatAlpha(l.fillColor,l.fillAlpha*p),I.TL=D,I.TR=D,I.BL=D,I.BR=D,j=0;j0)for(I=f.fillTint,D=d.getTintAppendFloatAlpha(l.altFillColor,l.altFillAlpha*p),I.TL=D,I.TR=D,I.BL=D,I.BR=D,j=0;j0){var $=f.strokeTint,U=d.getTintAppendFloatAlpha(l.outlineFillColor,l.outlineFillAlpha*p);for($.TL=U,$.TR=U,$.BL=U,$.BR=U,X=1;X{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(99651),d=e(83419),h=e(17803),a=new d({Extends:h,Mixins:[r],initialize:function(n,u,f,o,c,p,v,m){u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o=48),c===void 0&&(c=32),p===void 0&&(p=15658734),v===void 0&&(v=10066329),m===void 0&&(m=13421772),h.call(this,n,"IsoBox",null),this.projection=4,this.fillTop=p,this.fillLeft=v,this.fillRight=m,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(u,f),this.setSize(o,c),this.updateDisplayOrigin()},setProjection:function(l){return this.projection=l,this},setFaces:function(l,n,u){return l===void 0&&(l=!0),n===void 0&&(n=!0),u===void 0&&(u=!0),this.showTop=l,this.showLeft=n,this.showRight=u,this},setFillStyle:function(l,n,u){return this.fillTop=l,this.fillLeft=n,this.fillRight=u,this.isFilled=!0,this}});s.exports=a},11508:(s,y,e)=>{/** + */var r=e(99651),d=e(83419),h=e(17803),a=new d({Extends:h,Mixins:[r],initialize:function(n,u,f,o,c,p,v,m){u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o=48),c===void 0&&(c=32),p===void 0&&(p=15658734),v===void 0&&(v=10066329),m===void 0&&(m=13421772),h.call(this,n,"IsoBox",null),this.projection=4,this.fillTop=p,this.fillLeft=v,this.fillRight=m,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(u,f),this.setSize(o,c),this.updateDisplayOrigin()},setProjection:function(l){return this.projection=l,this},setFaces:function(l,n,u){return l===void 0&&(l=!0),n===void 0&&(n=!0),u===void 0&&(u=!0),this.showTop=l,this.showLeft=n,this.showRight=u,this},setFillStyle:function(l,n,u){return this.fillTop=l,this.fillLeft=n,this.fillRight=u,this.isFilled=!0,this}});s.exports=a},11508:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(65960),d=e(20926),h=function(a,l,n,u){n.addToRenderList(l);var f=a.currentContext;if(d(a,f,l,n,u)&&l.isFilled){var o=l.width,c=l.height,p=o/2,v=o/l.projection;l.showTop&&(r(f,l,l.fillTop),f.beginPath(),f.moveTo(-p,-c),f.lineTo(0,-v-c),f.lineTo(p,-c),f.lineTo(p,-1),f.lineTo(0,v-1),f.lineTo(-p,-1),f.lineTo(-p,-c),f.fill()),l.showLeft&&(r(f,l,l.fillLeft),f.beginPath(),f.moveTo(-p,0),f.lineTo(0,v),f.lineTo(0,v-c),f.lineTo(-p,-c),f.lineTo(-p,0),f.fill()),l.showRight&&(r(f,l,l.fillRight),f.beginPath(),f.moveTo(p,0),f.lineTo(0,v),f.lineTo(0,v-c),f.lineTo(p,-c),f.lineTo(p,0),f.fill()),f.restore()}};s.exports=h},3933:(s,y,e)=>{/** + */var r=e(65960),d=e(20926),h=function(a,l,n,u){n.addToRenderList(l);var f=a.currentContext;if(d(a,f,l,n,u)&&l.isFilled){var o=l.width,c=l.height,p=o/2,v=o/l.projection;l.showTop&&(r(f,l,l.fillTop),f.beginPath(),f.moveTo(-p,-c),f.lineTo(0,-v-c),f.lineTo(p,-c),f.lineTo(p,-1),f.lineTo(0,v-1),f.lineTo(-p,-1),f.lineTo(-p,-c),f.fill()),l.showLeft&&(r(f,l,l.fillLeft),f.beginPath(),f.moveTo(-p,0),f.lineTo(0,v),f.lineTo(0,v-c),f.lineTo(-p,-c),f.lineTo(-p,0),f.fill()),l.showRight&&(r(f,l,l.fillRight),f.beginPath(),f.moveTo(p,0),f.lineTo(0,v),f.lineTo(0,v-c),f.lineTo(p,-c),f.lineTo(p,0),f.fill()),f.restore()}};s.exports=h},3933:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39429),d=e(61475);r.register("isobox",function(h,a,l,n,u,f,o){return this.displayList.add(new d(this.scene,h,a,l,n,u,f,o))})},99651:(s,y,e)=>{/** + */var r=e(39429),d=e(61475);r.register("isobox",function(h,a,l,n,u,f,o){return this.displayList.add(new d(this.scene,h,a,l,n,u,f,o))})},99651:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(68149),h=e(11508),s.exports={renderWebGL:d,renderCanvas:h}},68149:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(68149),h=e(11508),s.exports={renderWebGL:d,renderCanvas:h}},68149:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91296),d=e(70554),h=function(a,l,n,u){n.addToRenderList(l);var f=a.pipelines.set(l.pipeline),o=r(l,n,u),c=f.calcMatrix.copyFrom(o.calc),p=l.width,v=l.height,m=p/2,S=p/l.projection,M=n.alpha*l.alpha;if(l.isFilled){var w,C,A,P,b,O,I,D,B;a.pipelines.preBatch(l),l.showTop&&(w=d.getTintAppendFloatAlpha(l.fillTop,M),C=c.getX(-m,-v),A=c.getY(-m,-v),P=c.getX(0,-S-v),b=c.getY(0,-S-v),O=c.getX(m,-v),I=c.getY(m,-v),D=c.getX(0,S-v),B=c.getY(0,S-v),f.batchQuad(l,C,A,P,b,O,I,D,B,0,0,1,1,w,w,w,w,2)),l.showLeft&&(w=d.getTintAppendFloatAlpha(l.fillLeft,M),C=c.getX(-m,0),A=c.getY(-m,0),P=c.getX(0,S),b=c.getY(0,S),O=c.getX(0,S-v),I=c.getY(0,S-v),D=c.getX(-m,-v),B=c.getY(-m,-v),f.batchQuad(l,C,A,P,b,O,I,D,B,0,0,1,1,w,w,w,w,2)),l.showRight&&(w=d.getTintAppendFloatAlpha(l.fillRight,M),C=c.getX(m,0),A=c.getY(m,0),P=c.getX(0,S),b=c.getY(0,S),O=c.getX(0,S-v),I=c.getY(0,S-v),D=c.getX(m,-v),B=c.getY(m,-v),f.batchQuad(l,C,A,P,b,O,I,D,B,0,0,1,1,w,w,w,w,2)),a.pipelines.postBatch(l)}};s.exports=h},16933:(s,y,e)=>{/** + */var r=e(91296),d=e(70554),h=function(a,l,n,u){n.addToRenderList(l);var f=a.pipelines.set(l.pipeline),o=r(l,n,u),c=f.calcMatrix.copyFrom(o.calc),p=l.width,v=l.height,m=p/2,S=p/l.projection,M=n.alpha*l.alpha;if(l.isFilled){var w,C,A,P,b,O,I,D,B;a.pipelines.preBatch(l),l.showTop&&(w=d.getTintAppendFloatAlpha(l.fillTop,M),C=c.getX(-m,-v),A=c.getY(-m,-v),P=c.getX(0,-S-v),b=c.getY(0,-S-v),O=c.getX(m,-v),I=c.getY(m,-v),D=c.getX(0,S-v),B=c.getY(0,S-v),f.batchQuad(l,C,A,P,b,O,I,D,B,0,0,1,1,w,w,w,w,2)),l.showLeft&&(w=d.getTintAppendFloatAlpha(l.fillLeft,M),C=c.getX(-m,0),A=c.getY(-m,0),P=c.getX(0,S),b=c.getY(0,S),O=c.getX(0,S-v),I=c.getY(0,S-v),D=c.getX(-m,-v),B=c.getY(-m,-v),f.batchQuad(l,C,A,P,b,O,I,D,B,0,0,1,1,w,w,w,w,2)),l.showRight&&(w=d.getTintAppendFloatAlpha(l.fillRight,M),C=c.getX(m,0),A=c.getY(m,0),P=c.getX(0,S),b=c.getY(0,S),O=c.getX(0,S-v),I=c.getY(0,S-v),D=c.getX(m,-v),B=c.getY(m,-v),f.batchQuad(l,C,A,P,b,O,I,D,B,0,0,1,1,w,w,w,w,2)),a.pipelines.postBatch(l)}};s.exports=h},16933:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(60561),h=e(17803),a=new r({Extends:h,Mixins:[d],initialize:function(n,u,f,o,c,p,v,m,S){u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o=48),c===void 0&&(c=32),p===void 0&&(p=!1),v===void 0&&(v=15658734),m===void 0&&(m=10066329),S===void 0&&(S=13421772),h.call(this,n,"IsoTriangle",null),this.projection=4,this.fillTop=v,this.fillLeft=m,this.fillRight=S,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=p,this.isFilled=!0,this.setPosition(u,f),this.setSize(o,c),this.updateDisplayOrigin()},setProjection:function(l){return this.projection=l,this},setReversed:function(l){return this.isReversed=l,this},setFaces:function(l,n,u){return l===void 0&&(l=!0),n===void 0&&(n=!0),u===void 0&&(u=!0),this.showTop=l,this.showLeft=n,this.showRight=u,this},setFillStyle:function(l,n,u){return this.fillTop=l,this.fillLeft=n,this.fillRight=u,this.isFilled=!0,this}});s.exports=a},79590:(s,y,e)=>{/** + */var r=e(83419),d=e(60561),h=e(17803),a=new r({Extends:h,Mixins:[d],initialize:function(n,u,f,o,c,p,v,m,S){u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o=48),c===void 0&&(c=32),p===void 0&&(p=!1),v===void 0&&(v=15658734),m===void 0&&(m=10066329),S===void 0&&(S=13421772),h.call(this,n,"IsoTriangle",null),this.projection=4,this.fillTop=v,this.fillLeft=m,this.fillRight=S,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=p,this.isFilled=!0,this.setPosition(u,f),this.setSize(o,c),this.updateDisplayOrigin()},setProjection:function(l){return this.projection=l,this},setReversed:function(l){return this.isReversed=l,this},setFaces:function(l,n,u){return l===void 0&&(l=!0),n===void 0&&(n=!0),u===void 0&&(u=!0),this.showTop=l,this.showLeft=n,this.showRight=u,this},setFillStyle:function(l,n,u){return this.fillTop=l,this.fillLeft=n,this.fillRight=u,this.isFilled=!0,this}});s.exports=a},79590:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(65960),d=e(20926),h=function(a,l,n,u){n.addToRenderList(l);var f=a.currentContext;if(d(a,f,l,n,u)&&l.isFilled){var o=l.width,c=l.height,p=o/2,v=o/l.projection,m=l.isReversed;l.showTop&&m&&(r(f,l,l.fillTop),f.beginPath(),f.moveTo(-p,-c),f.lineTo(0,-v-c),f.lineTo(p,-c),f.lineTo(0,v-c),f.fill()),l.showLeft&&(r(f,l,l.fillLeft),f.beginPath(),m?(f.moveTo(-p,-c),f.lineTo(0,v),f.lineTo(0,v-c)):(f.moveTo(-p,0),f.lineTo(0,v),f.lineTo(0,v-c)),f.fill()),l.showRight&&(r(f,l,l.fillRight),f.beginPath(),m?(f.moveTo(p,-c),f.lineTo(0,v),f.lineTo(0,v-c)):(f.moveTo(p,0),f.lineTo(0,v),f.lineTo(0,v-c)),f.fill()),f.restore()}};s.exports=h},49803:(s,y,e)=>{/** + */var r=e(65960),d=e(20926),h=function(a,l,n,u){n.addToRenderList(l);var f=a.currentContext;if(d(a,f,l,n,u)&&l.isFilled){var o=l.width,c=l.height,p=o/2,v=o/l.projection,m=l.isReversed;l.showTop&&m&&(r(f,l,l.fillTop),f.beginPath(),f.moveTo(-p,-c),f.lineTo(0,-v-c),f.lineTo(p,-c),f.lineTo(0,v-c),f.fill()),l.showLeft&&(r(f,l,l.fillLeft),f.beginPath(),m?(f.moveTo(-p,-c),f.lineTo(0,v),f.lineTo(0,v-c)):(f.moveTo(-p,0),f.lineTo(0,v),f.lineTo(0,v-c)),f.fill()),l.showRight&&(r(f,l,l.fillRight),f.beginPath(),m?(f.moveTo(p,-c),f.lineTo(0,v),f.lineTo(0,v-c)):(f.moveTo(p,0),f.lineTo(0,v),f.lineTo(0,v-c)),f.fill()),f.restore()}};s.exports=h},49803:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39429),d=e(16933);r.register("isotriangle",function(h,a,l,n,u,f,o,c){return this.displayList.add(new d(this.scene,h,a,l,n,u,f,o,c))})},60561:(s,y,e)=>{/** + */var r=e(39429),d=e(16933);r.register("isotriangle",function(h,a,l,n,u,f,o,c){return this.displayList.add(new d(this.scene,h,a,l,n,u,f,o,c))})},60561:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(51503),h=e(79590),s.exports={renderWebGL:d,renderCanvas:h}},51503:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(51503),h=e(79590),s.exports={renderWebGL:d,renderCanvas:h}},51503:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91296),d=e(70554),h=function(a,l,n,u){n.addToRenderList(l);var f=a.pipelines.set(l.pipeline),o=r(l,n,u),c=f.calcMatrix.copyFrom(o.calc),p=l.width,v=l.height,m=p/2,S=p/l.projection,M=l.isReversed,w=n.alpha*l.alpha;if(l.isFilled){a.pipelines.preBatch(l);var C,A,P,b,O,I,D;if(l.showTop&&M){C=d.getTintAppendFloatAlpha(l.fillTop,w),A=c.getX(-m,-v),P=c.getY(-m,-v),b=c.getX(0,-S-v),O=c.getY(0,-S-v),I=c.getX(m,-v),D=c.getY(m,-v);var B=c.getX(0,S-v),G=c.getY(0,S-v);f.batchQuad(l,A,P,b,O,I,D,B,G,0,0,1,1,C,C,C,C,2)}l.showLeft&&(C=d.getTintAppendFloatAlpha(l.fillLeft,w),M?(A=c.getX(-m,-v),P=c.getY(-m,-v),b=c.getX(0,S),O=c.getY(0,S),I=c.getX(0,S-v),D=c.getY(0,S-v)):(A=c.getX(-m,0),P=c.getY(-m,0),b=c.getX(0,S),O=c.getY(0,S),I=c.getX(0,S-v),D=c.getY(0,S-v)),f.batchTri(l,A,P,b,O,I,D,0,0,1,1,C,C,C,2)),l.showRight&&(C=d.getTintAppendFloatAlpha(l.fillRight,w),M?(A=c.getX(m,-v),P=c.getY(m,-v),b=c.getX(0,S),O=c.getY(0,S),I=c.getX(0,S-v),D=c.getY(0,S-v)):(A=c.getX(m,0),P=c.getY(m,0),b=c.getX(0,S),O=c.getY(0,S),I=c.getX(0,S-v),D=c.getY(0,S-v)),f.batchTri(l,A,P,b,O,I,D,0,0,1,1,C,C,C,2)),a.pipelines.postBatch(l)}};s.exports=h},57847:(s,y,e)=>{/** + */var r=e(91296),d=e(70554),h=function(a,l,n,u){n.addToRenderList(l);var f=a.pipelines.set(l.pipeline),o=r(l,n,u),c=f.calcMatrix.copyFrom(o.calc),p=l.width,v=l.height,m=p/2,S=p/l.projection,M=l.isReversed,w=n.alpha*l.alpha;if(l.isFilled){a.pipelines.preBatch(l);var C,A,P,b,O,I,D;if(l.showTop&&M){C=d.getTintAppendFloatAlpha(l.fillTop,w),A=c.getX(-m,-v),P=c.getY(-m,-v),b=c.getX(0,-S-v),O=c.getY(0,-S-v),I=c.getX(m,-v),D=c.getY(m,-v);var B=c.getX(0,S-v),G=c.getY(0,S-v);f.batchQuad(l,A,P,b,O,I,D,B,G,0,0,1,1,C,C,C,C,2)}l.showLeft&&(C=d.getTintAppendFloatAlpha(l.fillLeft,w),M?(A=c.getX(-m,-v),P=c.getY(-m,-v),b=c.getX(0,S),O=c.getY(0,S),I=c.getX(0,S-v),D=c.getY(0,S-v)):(A=c.getX(-m,0),P=c.getY(-m,0),b=c.getX(0,S),O=c.getY(0,S),I=c.getX(0,S-v),D=c.getY(0,S-v)),f.batchTri(l,A,P,b,O,I,D,0,0,1,1,C,C,C,2)),l.showRight&&(C=d.getTintAppendFloatAlpha(l.fillRight,w),M?(A=c.getX(m,-v),P=c.getY(m,-v),b=c.getX(0,S),O=c.getY(0,S),I=c.getX(0,S-v),D=c.getY(0,S-v)):(A=c.getX(m,0),P=c.getY(m,0),b=c.getX(0,S),O=c.getY(0,S),I=c.getX(0,S-v),D=c.getY(0,S-v)),f.batchTri(l,A,P,b,O,I,D,0,0,1,1,C,C,C,2)),a.pipelines.postBatch(l)}};s.exports=h},57847:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(17803),h=e(23031),a=e(36823),l=new r({Extends:d,Mixins:[a],initialize:function(u,f,o,c,p,v,m,S,M){f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=0),v===void 0&&(v=128),m===void 0&&(m=0),d.call(this,u,"Line",new h(c,p,v,m));var w=Math.max(1,this.geom.right-this.geom.left),C=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(f,o),this.setSize(w,C),S!==void 0&&this.setStrokeStyle(1,S,M),this.updateDisplayOrigin()},setLineWidth:function(n,u){return u===void 0&&(u=n),this._startWidth=n,this._endWidth=u,this.lineWidth=n,this},setTo:function(n,u,f,o){return this.geom.setTo(n,u,f,o),this}});s.exports=l},17440:(s,y,e)=>{/** + */var r=e(83419),d=e(17803),h=e(23031),a=e(36823),l=new r({Extends:d,Mixins:[a],initialize:function(u,f,o,c,p,v,m,S,M){f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=0),v===void 0&&(v=128),m===void 0&&(m=0),d.call(this,u,"Line",new h(c,p,v,m));var w=Math.max(1,this.geom.right-this.geom.left),C=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(f,o),this.setSize(w,C),S!==void 0&&this.setStrokeStyle(1,S,M),this.updateDisplayOrigin()},setLineWidth:function(n,u){return u===void 0&&(u=n),this._startWidth=n,this._endWidth=u,this.lineWidth=n,this},setTo:function(n,u,f,o){return this.geom.setTo(n,u,f,o),this}});s.exports=l},17440:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(75177),d=e(20926),h=function(a,l,n,u){n.addToRenderList(l);var f=a.currentContext;if(d(a,f,l,n,u)){var o=l._displayOriginX,c=l._displayOriginY;l.isStroked&&(r(f,l),f.beginPath(),f.moveTo(l.geom.x1-o,l.geom.y1-c),f.lineTo(l.geom.x2-o,l.geom.y2-c),f.stroke()),f.restore()}};s.exports=h},2481:(s,y,e)=>{/** + */var r=e(75177),d=e(20926),h=function(a,l,n,u){n.addToRenderList(l);var f=a.currentContext;if(d(a,f,l,n,u)){var o=l._displayOriginX,c=l._displayOriginY;l.isStroked&&(r(f,l),f.beginPath(),f.moveTo(l.geom.x1-o,l.geom.y1-c),f.lineTo(l.geom.x2-o,l.geom.y2-c),f.stroke()),f.restore()}};s.exports=h},2481:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39429),d=e(57847);r.register("line",function(h,a,l,n,u,f,o,c){return this.displayList.add(new d(this.scene,h,a,l,n,u,f,o,c))})},36823:(s,y,e)=>{/** + */var r=e(39429),d=e(57847);r.register("line",function(h,a,l,n,u,f,o,c){return this.displayList.add(new d(this.scene,h,a,l,n,u,f,o,c))})},36823:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(77385),h=e(17440),s.exports={renderWebGL:d,renderCanvas:h}},77385:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(77385),h=e(17440),s.exports={renderWebGL:d,renderCanvas:h}},77385:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91296),d=e(70554),h=function(a,l,n,u){n.addToRenderList(l);var f=a.pipelines.set(l.pipeline),o=r(l,n,u);f.calcMatrix.copyFrom(o.calc);var c=l._displayOriginX,p=l._displayOriginY,v=n.alpha*l.alpha;if(a.pipelines.preBatch(l),l.isStroked){var m=f.strokeTint,S=d.getTintAppendFloatAlpha(l.strokeColor,l.strokeAlpha*v);m.TL=S,m.TR=S,m.BL=S,m.BR=S,f.batchLine(l.geom.x1-c,l.geom.y1-p,l.geom.x2-c,l.geom.y2-p,l._startWidth/2,l._endWidth/2,1,0,!1,o.sprite,o.camera)}a.pipelines.postBatch(l)};s.exports=h},24949:(s,y,e)=>{/** + */var r=e(91296),d=e(70554),h=function(a,l,n,u){n.addToRenderList(l);var f=a.pipelines.set(l.pipeline),o=r(l,n,u);f.calcMatrix.copyFrom(o.calc);var c=l._displayOriginX,p=l._displayOriginY,v=n.alpha*l.alpha;if(a.pipelines.preBatch(l),l.isStroked){var m=f.strokeTint,S=d.getTintAppendFloatAlpha(l.strokeColor,l.strokeAlpha*v);m.TL=S,m.TR=S,m.BL=S,m.BR=S,f.batchLine(l.geom.x1-c,l.geom.y1-p,l.geom.x2-c,l.geom.y2-p,l._startWidth/2,l._endWidth/2,1,0,!1,o.sprite,o.camera)}a.pipelines.postBatch(l)};s.exports=h},24949:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(90273),d=e(83419),h=e(94811),a=e(13829),l=e(25717),n=e(17803),u=e(5469),f=new d({Extends:n,Mixins:[r],initialize:function(c,p,v,m,S,M){p===void 0&&(p=0),v===void 0&&(v=0),n.call(this,c,"Polygon",new l(m));var w=a(this.geom);this.setPosition(p,v),this.setSize(w.width,w.height),S!==void 0&&this.setFillStyle(S,M),this.updateDisplayOrigin(),this.updateData()},smooth:function(o){o===void 0&&(o=1);for(var c=0;c{/** + */var r=e(90273),d=e(83419),h=e(94811),a=e(13829),l=e(25717),n=e(17803),u=e(5469),f=new d({Extends:n,Mixins:[r],initialize:function(c,p,v,m,S,M){p===void 0&&(p=0),v===void 0&&(v=0),n.call(this,c,"Polygon",new l(m));var w=a(this.geom);this.setPosition(p,v),this.setSize(w.width,w.height),S!==void 0&&this.setFillStyle(S,M),this.updateDisplayOrigin(),this.updateData()},smooth:function(o){o===void 0&&(o=1);for(var c=0;c{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(65960),d=e(75177),h=e(20926),a=function(l,n,u,f){u.addToRenderList(n);var o=l.currentContext;if(h(l,o,n,u,f)){var c=n._displayOriginX,p=n._displayOriginY,v=n.pathData,m=v.length-1,S=v[0]-c,M=v[1]-p;o.beginPath(),o.moveTo(S,M),n.closePath||(m-=2);for(var w=2;w{/** + */var r=e(65960),d=e(75177),h=e(20926),a=function(l,n,u,f){u.addToRenderList(n);var o=l.currentContext;if(h(l,o,n,u,f)){var c=n._displayOriginX,p=n._displayOriginY,v=n.pathData,m=v.length-1,S=v[0]-c,M=v[1]-p;o.beginPath(),o.moveTo(S,M),n.closePath||(m-=2);for(var w=2;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39429),d=e(24949);r.register("polygon",function(h,a,l,n,u){return this.displayList.add(new d(this.scene,h,a,l,n,u))})},90273:(s,y,e)=>{/** + */var r=e(39429),d=e(24949);r.register("polygon",function(h,a,l,n,u){return this.displayList.add(new d(this.scene,h,a,l,n,u))})},90273:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(73695),h=e(38710),s.exports={renderWebGL:d,renderCanvas:h}},73695:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(73695),h=e(38710),s.exports={renderWebGL:d,renderCanvas:h}},73695:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(10441),d=e(91296),h=e(34682),a=function(l,n,u,f){u.addToRenderList(n);var o=l.pipelines.set(n.pipeline),c=d(n,u,f),p=o.calcMatrix.copyFrom(c.calc),v=n._displayOriginX,m=n._displayOriginY,S=u.alpha*n.alpha;l.pipelines.preBatch(n),n.isFilled&&r(o,p,n,S,v,m),n.isStroked&&h(o,n,S,v,m),l.pipelines.postBatch(n)};s.exports=a},74561:(s,y,e)=>{/** + */var r=e(10441),d=e(91296),h=e(34682),a=function(l,n,u,f){u.addToRenderList(n);var o=l.pipelines.set(n.pipeline),c=d(n,u,f),p=o.calcMatrix.copyFrom(c.calc),v=n._displayOriginX,m=n._displayOriginY,S=u.alpha*n.alpha;l.pipelines.preBatch(n),n.isFilled&&r(o,p,n,S,v,m),n.isStroked&&h(o,n,S,v,m),l.pipelines.postBatch(n)};s.exports=a},74561:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(87841),h=e(17803),a=e(95597),l=new r({Extends:h,Mixins:[a],initialize:function(u,f,o,c,p,v,m){f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=128),p===void 0&&(p=128),h.call(this,u,"Rectangle",new d(0,0,c,p)),this.setPosition(f,o),this.setSize(c,p),v!==void 0&&this.setFillStyle(v,m),this.updateDisplayOrigin(),this.updateData()},setSize:function(n,u){this.width=n,this.height=u,this.geom.setSize(n,u),this.updateData(),this.updateDisplayOrigin();var f=this.input;return f&&!f.customHitArea&&(f.hitArea.width=n,f.hitArea.height=u),this},updateData:function(){var n=[],u=this.geom,f=this._tempLine;return u.getLineA(f),n.push(f.x1,f.y1,f.x2,f.y2),u.getLineB(f),n.push(f.x2,f.y2),u.getLineC(f),n.push(f.x2,f.y2),u.getLineD(f),n.push(f.x2,f.y2),this.pathData=n,this}});s.exports=l},48682:(s,y,e)=>{/** + */var r=e(83419),d=e(87841),h=e(17803),a=e(95597),l=new r({Extends:h,Mixins:[a],initialize:function(u,f,o,c,p,v,m){f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=128),p===void 0&&(p=128),h.call(this,u,"Rectangle",new d(0,0,c,p)),this.setPosition(f,o),this.setSize(c,p),v!==void 0&&this.setFillStyle(v,m),this.updateDisplayOrigin(),this.updateData()},setSize:function(n,u){this.width=n,this.height=u,this.geom.setSize(n,u),this.updateData(),this.updateDisplayOrigin();var f=this.input;return f&&!f.customHitArea&&(f.hitArea.width=n,f.hitArea.height=u),this},updateData:function(){var n=[],u=this.geom,f=this._tempLine;return u.getLineA(f),n.push(f.x1,f.y1,f.x2,f.y2),u.getLineB(f),n.push(f.x2,f.y2),u.getLineC(f),n.push(f.x2,f.y2),u.getLineD(f),n.push(f.x2,f.y2),this.pathData=n,this}});s.exports=l},48682:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(65960),d=e(75177),h=e(20926),a=function(l,n,u,f){u.addToRenderList(n);var o=l.currentContext;if(h(l,o,n,u,f)){var c=n._displayOriginX,p=n._displayOriginY;n.isFilled&&(r(o,n),o.fillRect(-c,-p,n.width,n.height)),n.isStroked&&(d(o,n),o.beginPath(),o.rect(-c,-p,n.width,n.height),o.stroke()),o.restore()}};s.exports=a},87959:(s,y,e)=>{/** + */var r=e(65960),d=e(75177),h=e(20926),a=function(l,n,u,f){u.addToRenderList(n);var o=l.currentContext;if(h(l,o,n,u,f)){var c=n._displayOriginX,p=n._displayOriginY;n.isFilled&&(r(o,n),o.fillRect(-c,-p,n.width,n.height)),n.isStroked&&(d(o,n),o.beginPath(),o.rect(-c,-p,n.width,n.height),o.stroke()),o.restore()}};s.exports=a},87959:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39429),d=e(74561);r.register("rectangle",function(h,a,l,n,u,f){return this.displayList.add(new d(this.scene,h,a,l,n,u,f))})},95597:(s,y,e)=>{/** + */var r=e(39429),d=e(74561);r.register("rectangle",function(h,a,l,n,u,f){return this.displayList.add(new d(this.scene,h,a,l,n,u,f))})},95597:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(52059),h=e(48682),s.exports={renderWebGL:d,renderCanvas:h}},52059:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(52059),h=e(48682),s.exports={renderWebGL:d,renderCanvas:h}},52059:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91296),d=e(34682),h=e(70554),a=function(l,n,u,f){u.addToRenderList(n);var o=l.pipelines.set(n.pipeline),c=r(n,u,f);o.calcMatrix.copyFrom(c.calc);var p=n._displayOriginX,v=n._displayOriginY,m=u.alpha*n.alpha;if(l.pipelines.preBatch(n),n.isFilled){var S=o.fillTint,M=h.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*m);S.TL=M,S.TR=M,S.BL=M,S.BR=M,o.batchFillRect(-p,-v,n.width,n.height)}n.isStroked&&d(o,n,m,p,v),l.pipelines.postBatch(n)};s.exports=a},55911:(s,y,e)=>{/** + */var r=e(91296),d=e(34682),h=e(70554),a=function(l,n,u,f){u.addToRenderList(n);var o=l.pipelines.set(n.pipeline),c=r(n,u,f);o.calcMatrix.copyFrom(c.calc);var p=n._displayOriginX,v=n._displayOriginY,m=u.alpha*n.alpha;if(l.pipelines.preBatch(n),n.isFilled){var S=o.fillTint,M=h.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*m);S.TL=M,S.TR=M,S.BL=M,S.BR=M,o.batchFillRect(-p,-v,n.width,n.height)}n.isStroked&&d(o,n,m,p,v),l.pipelines.postBatch(n)};s.exports=a},55911:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(81991),d=e(83419),h=e(94811),a=e(17803),l=new d({Extends:a,Mixins:[r],initialize:function(u,f,o,c,p,v,m,S){f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=5),p===void 0&&(p=32),v===void 0&&(v=64),a.call(this,u,"Star",null),this._points=c,this._innerRadius=p,this._outerRadius=v,this.setPosition(f,o),this.setSize(v*2,v*2),m!==void 0&&this.setFillStyle(m,S),this.updateDisplayOrigin(),this.updateData()},setPoints:function(n){return this._points=n,this.updateData()},setInnerRadius:function(n){return this._innerRadius=n,this.updateData()},setOuterRadius:function(n){return this._outerRadius=n,this.updateData()},points:{get:function(){return this._points},set:function(n){this._points=n,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(n){this._innerRadius=n,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(n){this._outerRadius=n,this.updateData()}},updateData:function(){var n=[],u=this._points,f=this._innerRadius,o=this._outerRadius,c=Math.PI/2*3,p=Math.PI/u,v=o,m=o;n.push(v,m+-o);for(var S=0;S{/** + */var r=e(81991),d=e(83419),h=e(94811),a=e(17803),l=new d({Extends:a,Mixins:[r],initialize:function(u,f,o,c,p,v,m,S){f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=5),p===void 0&&(p=32),v===void 0&&(v=64),a.call(this,u,"Star",null),this._points=c,this._innerRadius=p,this._outerRadius=v,this.setPosition(f,o),this.setSize(v*2,v*2),m!==void 0&&this.setFillStyle(m,S),this.updateDisplayOrigin(),this.updateData()},setPoints:function(n){return this._points=n,this.updateData()},setInnerRadius:function(n){return this._innerRadius=n,this.updateData()},setOuterRadius:function(n){return this._outerRadius=n,this.updateData()},points:{get:function(){return this._points},set:function(n){this._points=n,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(n){this._innerRadius=n,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(n){this._outerRadius=n,this.updateData()}},updateData:function(){var n=[],u=this._points,f=this._innerRadius,o=this._outerRadius,c=Math.PI/2*3,p=Math.PI/u,v=o,m=o;n.push(v,m+-o);for(var S=0;S{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(65960),d=e(75177),h=e(20926),a=function(l,n,u,f){u.addToRenderList(n);var o=l.currentContext;if(h(l,o,n,u,f)){var c=n._displayOriginX,p=n._displayOriginY,v=n.pathData,m=v.length-1,S=v[0]-c,M=v[1]-p;o.beginPath(),o.moveTo(S,M),n.closePath||(m-=2);for(var w=2;w{/** + */var r=e(65960),d=e(75177),h=e(20926),a=function(l,n,u,f){u.addToRenderList(n);var o=l.currentContext;if(h(l,o,n,u,f)){var c=n._displayOriginX,p=n._displayOriginY,v=n.pathData,m=v.length-1,S=v[0]-c,M=v[1]-p;o.beginPath(),o.moveTo(S,M),n.closePath||(m-=2);for(var w=2;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(55911),d=e(39429);d.register("star",function(h,a,l,n,u,f,o){return this.displayList.add(new r(this.scene,h,a,l,n,u,f,o))})},81991:(s,y,e)=>{/** + */var r=e(55911),d=e(39429);d.register("star",function(h,a,l,n,u,f,o){return this.displayList.add(new r(this.scene,h,a,l,n,u,f,o))})},81991:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(57017),h=e(64272),s.exports={renderWebGL:d,renderCanvas:h}},57017:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(57017),h=e(64272),s.exports={renderWebGL:d,renderCanvas:h}},57017:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(10441),d=e(91296),h=e(34682),a=function(l,n,u,f){u.addToRenderList(n);var o=l.pipelines.set(n.pipeline),c=d(n,u,f),p=o.calcMatrix.copyFrom(c.calc),v=n._displayOriginX,m=n._displayOriginY,S=u.alpha*n.alpha;l.pipelines.preBatch(n),n.isFilled&&r(o,p,n,S,v,m),n.isStroked&&h(o,n,S,v,m),l.pipelines.postBatch(n)};s.exports=a},36931:(s,y,e)=>{/** + */var r=e(10441),d=e(91296),h=e(34682),a=function(l,n,u,f){u.addToRenderList(n);var o=l.pipelines.set(n.pipeline),c=d(n,u,f),p=o.calcMatrix.copyFrom(c.calc),v=n._displayOriginX,m=n._displayOriginY,S=u.alpha*n.alpha;l.pipelines.preBatch(n),n.isFilled&&r(o,p,n,S,v,m),n.isStroked&&h(o,n,S,v,m),l.pipelines.postBatch(n)};s.exports=a},36931:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(17803),h=e(16483),a=e(96195),l=new r({Extends:d,Mixins:[a],initialize:function(u,f,o,c,p,v,m,S,M,w,C){f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=128),v===void 0&&(v=64),m===void 0&&(m=0),S===void 0&&(S=128),M===void 0&&(M=128),d.call(this,u,"Triangle",new h(c,p,v,m,S,M));var A=this.geom.right-this.geom.left,P=this.geom.bottom-this.geom.top;this.setPosition(f,o),this.setSize(A,P),w!==void 0&&this.setFillStyle(w,C),this.updateDisplayOrigin(),this.updateData()},setTo:function(n,u,f,o,c,p){return this.geom.setTo(n,u,f,o,c,p),this.updateData()},updateData:function(){var n=[],u=this.geom,f=this._tempLine;return u.getLineA(f),n.push(f.x1,f.y1,f.x2,f.y2),u.getLineB(f),n.push(f.x2,f.y2),u.getLineC(f),n.push(f.x2,f.y2),this.pathData=n,this}});s.exports=l},85172:(s,y,e)=>{/** + */var r=e(83419),d=e(17803),h=e(16483),a=e(96195),l=new r({Extends:d,Mixins:[a],initialize:function(u,f,o,c,p,v,m,S,M,w,C){f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=128),v===void 0&&(v=64),m===void 0&&(m=0),S===void 0&&(S=128),M===void 0&&(M=128),d.call(this,u,"Triangle",new h(c,p,v,m,S,M));var A=this.geom.right-this.geom.left,P=this.geom.bottom-this.geom.top;this.setPosition(f,o),this.setSize(A,P),w!==void 0&&this.setFillStyle(w,C),this.updateDisplayOrigin(),this.updateData()},setTo:function(n,u,f,o,c,p){return this.geom.setTo(n,u,f,o,c,p),this.updateData()},updateData:function(){var n=[],u=this.geom,f=this._tempLine;return u.getLineA(f),n.push(f.x1,f.y1,f.x2,f.y2),u.getLineB(f),n.push(f.x2,f.y2),u.getLineC(f),n.push(f.x2,f.y2),this.pathData=n,this}});s.exports=l},85172:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(65960),d=e(75177),h=e(20926),a=function(l,n,u,f){u.addToRenderList(n);var o=l.currentContext;if(h(l,o,n,u,f)){var c=n._displayOriginX,p=n._displayOriginY,v=n.geom.x1-c,m=n.geom.y1-p,S=n.geom.x2-c,M=n.geom.y2-p,w=n.geom.x3-c,C=n.geom.y3-p;o.beginPath(),o.moveTo(v,m),o.lineTo(S,M),o.lineTo(w,C),o.closePath(),n.isFilled&&(r(o,n),o.fill()),n.isStroked&&(d(o,n),o.stroke()),o.restore()}};s.exports=a},45245:(s,y,e)=>{/** + */var r=e(65960),d=e(75177),h=e(20926),a=function(l,n,u,f){u.addToRenderList(n);var o=l.currentContext;if(h(l,o,n,u,f)){var c=n._displayOriginX,p=n._displayOriginY,v=n.geom.x1-c,m=n.geom.y1-p,S=n.geom.x2-c,M=n.geom.y2-p,w=n.geom.x3-c,C=n.geom.y3-p;o.beginPath(),o.moveTo(v,m),o.lineTo(S,M),o.lineTo(w,C),o.closePath(),n.isFilled&&(r(o,n),o.fill()),n.isStroked&&(d(o,n),o.stroke()),o.restore()}};s.exports=a},45245:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39429),d=e(36931);r.register("triangle",function(h,a,l,n,u,f,o,c,p,v){return this.displayList.add(new d(this.scene,h,a,l,n,u,f,o,c,p,v))})},96195:(s,y,e)=>{/** + */var r=e(39429),d=e(36931);r.register("triangle",function(h,a,l,n,u,f,o,c,p,v){return this.displayList.add(new d(this.scene,h,a,l,n,u,f,o,c,p,v))})},96195:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(83253),h=e(85172),s.exports={renderWebGL:d,renderCanvas:h}},83253:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(83253),h=e(85172),s.exports={renderWebGL:d,renderCanvas:h}},83253:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91296),d=e(34682),h=e(70554),a=function(l,n,u,f){u.addToRenderList(n);var o=l.pipelines.set(n.pipeline),c=r(n,u,f);o.calcMatrix.copyFrom(c.calc);var p=n._displayOriginX,v=n._displayOriginY,m=u.alpha*n.alpha;if(l.pipelines.preBatch(n),n.isFilled){var S=o.fillTint,M=h.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*m);S.TL=M,S.TR=M,S.BL=M,S.BR=M;var w=n.geom.x1-p,C=n.geom.y1-v,A=n.geom.x2-p,P=n.geom.y2-v,b=n.geom.x3-p,O=n.geom.y3-v;o.batchFillTriangle(w,C,A,P,b,O,c.sprite,c.camera)}n.isStroked&&d(o,n,m,p,v),l.pipelines.postBatch(n)};s.exports=a},68287:(s,y,e)=>{/** + */var r=e(91296),d=e(34682),h=e(70554),a=function(l,n,u,f){u.addToRenderList(n);var o=l.pipelines.set(n.pipeline),c=r(n,u,f);o.calcMatrix.copyFrom(c.calc);var p=n._displayOriginX,v=n._displayOriginY,m=u.alpha*n.alpha;if(l.pipelines.preBatch(n),n.isFilled){var S=o.fillTint,M=h.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*m);S.TL=M,S.TR=M,S.BL=M,S.BR=M;var w=n.geom.x1-p,C=n.geom.y1-v,A=n.geom.x2-p,P=n.geom.y2-v,b=n.geom.x3-p,O=n.geom.y3-v;o.batchFillTriangle(w,C,A,P,b,O,c.sprite,c.camera)}n.isStroked&&d(o,n,m,p,v),l.pipelines.postBatch(n)};s.exports=a},68287:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2095,15 +2095,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){d.addToRenderList(r),e.batchSprite(r,r.frame,d,h)};s.exports=y},15567:(s,y,e)=>{/** + */var x=function(e,r,d,h){d.addToRenderList(r),e.batchSprite(r,r.frame,d,h)};s.exports=x},15567:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(13059),h=e(44603),a=e(23568),l=e(68287);h.register("sprite",function(n,u){n===void 0&&(n={});var f=a(n,"key",null),o=a(n,"frame",null),c=new l(this.scene,0,0,f,o);return u!==void 0&&(n.add=u),r(this.scene,c,n),d(c,n),c})},46409:(s,y,e)=>{/** + */var r=e(25305),d=e(13059),h=e(44603),a=e(23568),l=e(68287);h.register("sprite",function(n,u){n===void 0&&(n={});var f=a(n,"key",null),o=a(n,"frame",null),c=new l(this.scene,0,0,f,o);return u!==void 0&&(n.add=u),r(this.scene,c,n),d(c,n),c})},46409:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39429),d=e(68287);r.register("sprite",function(h,a,l,n){return this.displayList.add(new d(this.scene,h,a,l,n))})},92751:(s,y,e)=>{/** + */var r=e(39429),d=e(68287);r.register("sprite",function(h,a,l,n){return this.displayList.add(new d(this.scene,h,a,l,n))})},92751:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2111,51 +2111,51 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){d.addToRenderList(r),r.pipeline.batchSprite(r,d,h)};s.exports=y},14220:s=>{/** + */var x=function(e,r,d,h){d.addToRenderList(r),r.pipeline.batchSprite(r,d,h)};s.exports=x},14220:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=e.canvas,a=e.context,l=e.style,n=[],u=0,f=d.length;l.maxLines>0&&l.maxLines1&&(c+=e.letterSpacing*(d[o].length-1)),l.wordWrap&&(c-=a.measureText(" ").width),n[o]=Math.ceil(c),u=Math.max(u,n[o])}var p=r.fontSize+l.strokeThickness,v=p*f,m=e.lineSpacing;return f>1&&(v+=m*(f-1)),{width:u,height:v,lines:f,lineWidths:n,lineSpacing:m,lineHeight:p}};s.exports=y},79557:(s,y,e)=>{/** + */var x=function(e,r,d){var h=e.canvas,a=e.context,l=e.style,n=[],u=0,f=d.length;l.maxLines>0&&l.maxLines1&&(c+=e.letterSpacing*(d[o].length-1)),l.wordWrap&&(c-=a.measureText(" ").width),n[o]=Math.ceil(c),u=Math.max(u,n[o])}var p=r.fontSize+l.strokeThickness,v=p*f,m=e.lineSpacing;return f>1&&(v+=m*(f-1)),{width:u,height:v,lines:f,lineWidths:n,lineSpacing:m,lineHeight:p}};s.exports=x},79557:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(27919),d=function(h){var a=r.create(this),l=a.getContext("2d",{willReadFrequently:!0});h.syncFont(a,l);var n=l.measureText(h.testString);if("actualBoundingBoxAscent"in n){var u=n.actualBoundingBoxAscent,f=n.actualBoundingBoxDescent;return r.remove(a),{ascent:u,descent:f,fontSize:u+f}}var o=Math.ceil(n.width*h.baselineX),c=o,p=2*c;c=c*h.baselineY|0,a.width=o,a.height=p,l.fillStyle="#f00",l.fillRect(0,0,o,p),l.font=h._font,l.textBaseline="alphabetic",l.fillStyle="#000",l.fillText(h.testString,0,c);var v={ascent:0,descent:0,fontSize:0},m=l.getImageData(0,0,o,p);if(!m)return v.ascent=c,v.descent=c+6,v.fontSize=v.ascent+v.descent,r.remove(a),v;var S=m.data,M=S.length,w=o*4,C,A,P=0,b=!1;for(C=0;Cc;C--){for(A=0;A{/** + */var r=e(27919),d=function(h){var a=r.create(this),l=a.getContext("2d",{willReadFrequently:!0});h.syncFont(a,l);var n=l.measureText(h.testString);if("actualBoundingBoxAscent"in n){var u=n.actualBoundingBoxAscent,f=n.actualBoundingBoxDescent;return r.remove(a),{ascent:u,descent:f,fontSize:u+f}}var o=Math.ceil(n.width*h.baselineX),c=o,p=2*c;c=c*h.baselineY|0,a.width=o,a.height=p,l.fillStyle="#f00",l.fillRect(0,0,o,p),l.font=h._font,l.textBaseline="alphabetic",l.fillStyle="#000",l.fillText(h.testString,0,c);var v={ascent:0,descent:0,fontSize:0},m=l.getImageData(0,0,o,p);if(!m)return v.ascent=c,v.descent=c+6,v.fontSize=v.ascent+v.descent,r.remove(a),v;var S=m.data,M=S.length,w=o*4,C,A,P=0,b=!1;for(C=0;Cc;C--){for(A=0;A{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var r=e(40366),d=e(27919),h=e(83419),a=e(31401),l=e(95643),n=e(14220),u=e(35154),f=e(35846),o=e(61771),c=e(35762),p=e(45650),v=new h({Extends:l,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Crop,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.PostPipeline,a.ScrollFactor,a.Tint,a.Transform,a.Visible,o],initialize:function(S,M,w,C,A){M===void 0&&(M=0),w===void 0&&(w=0),l.call(this,S,"Text"),this.renderer=S.sys.renderer,this.setPosition(M,w),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=d.create(this),this.context,this.style=new c(this,A),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=p(),this.texture=S.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(C),A&&A.padding&&this.setPadding(A.padding),A&&A.lineSpacing&&this.setLineSpacing(A.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",r(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(m){var S=this.style;if(S.wordWrapCallback){var M=S.wordWrapCallback.call(S.wordWrapCallbackScope,m,this);return Array.isArray(M)&&(M=M.join(` `)),M}else return S.wordWrapWidth?S.wordWrapUseAdvanced?this.advancedWordWrap(m,this.context,this.style.wordWrapWidth):this.basicWordWrap(m,this.context,this.style.wordWrapWidth):m},advancedWordWrap:function(m,S,M){for(var w="",C=m.replace(/ +/gi," ").split(this.splitRegExp),A=C.length,P=0;PD){if(G===0){for(var Q=X;Q.length&&(Q=Q.slice(0,-1),j=S.measureText(Q).width,!(j<=D)););if(!Q.length)throw new Error("wordWrapWidth < a single character");var tt=z.substr(Q.length);B[G]=tt,O+=Q}var Y=B[G].length?G:G+1,Z=B.slice(Y).join(" ").replace(/[ \n]*$/gi,"");C.splice(P+1,0,Z),A=C.length;break}else O+=X,D-=j}w+=O.replace(/[ \n]*$/gi,"")+` +`;continue}for(var D=M,B=b.split(" "),G=0;GD){if(G===0){for(var Q=X;Q.length&&(Q=Q.slice(0,-1),j=S.measureText(Q).width,!(j<=D)););if(!Q.length)throw new Error("wordWrapWidth < a single character");var tt=z.substr(Q.length);B[G]=tt,O+=Q}var Y=B[G].length?G:G+1,$=B.slice(Y).join(" ").replace(/[ \n]*$/gi,"");C.splice(P+1,0,$),A=C.length;break}else O+=X,D-=j}w+=O.replace(/[ \n]*$/gi,"")+` `}return w=w.replace(/[\s|\n]*$/gi,""),w},basicWordWrap:function(m,S,M){for(var w="",C=m.split(this.splitRegExp),A=C.length-1,P=S.measureText(" ").width,b=0;b<=A;b++){for(var O=M,I=C[b].split(" "),D=I.length-1,B=0;B<=D;B++){var G=I[B],z=S.measureText(G).width,X=z;BO&&B>0&&(w+=` `,O=M),w+=G,B0&&(z+=b.lineSpacing*X),M.rtl)G=D-G-O.left-O.right;else if(M.align==="right")G+=I-b.lineWidths[X];else if(M.align==="center")G+=(I-b.lineWidths[X])/2;else if(M.align==="justify"){var j=.85;if(b.lineWidths[X]/b.width>=j){var Q=b.width-b.lineWidths[X],tt=S.measureText(" ").width,Y=P[X].trim(),Z=Y.split(" ");Q+=(P[X].length-Y.length)*tt;for(var U=Math.floor(Q/tt),H=0;U>0;)Z[H]+=" ",H=(H+1)%(Z.length-1||1),--U;P[X]=Z.join(" ")}}if(this.autoRound&&(G=Math.round(G),z=Math.round(z)),M.strokeThickness&&(M.syncShadow(S,M.shadowStroke),S.strokeText(P[X],G,z)),M.color){M.syncShadow(S,M.shadowFill);var $=this.letterSpacing;if($!==0)for(var _=0,q=P[X].split(""),at=0;at{/** +`+m:m);return M!==this._text&&(this._text=M,this.updateText()),this},setStyle:function(m){return this.style.setStyle(m)},setFont:function(m){return this.style.setFont(m)},setFontFamily:function(m){return this.style.setFontFamily(m)},setFontSize:function(m){return this.style.setFontSize(m)},setFontStyle:function(m){return this.style.setFontStyle(m)},setFixedSize:function(m,S){return this.style.setFixedSize(m,S)},setBackgroundColor:function(m){return this.style.setBackgroundColor(m)},setFill:function(m){return this.style.setFill(m)},setColor:function(m){return this.style.setColor(m)},setStroke:function(m,S){return this.style.setStroke(m,S)},setShadow:function(m,S,M,w,C,A){return this.style.setShadow(m,S,M,w,C,A)},setShadowOffset:function(m,S){return this.style.setShadowOffset(m,S)},setShadowColor:function(m){return this.style.setShadowColor(m)},setShadowBlur:function(m){return this.style.setShadowBlur(m)},setShadowStroke:function(m){return this.style.setShadowStroke(m)},setShadowFill:function(m){return this.style.setShadowFill(m)},setWordWrapWidth:function(m,S){return this.style.setWordWrapWidth(m,S)},setWordWrapCallback:function(m,S){return this.style.setWordWrapCallback(m,S)},setAlign:function(m){return this.style.setAlign(m)},setResolution:function(m){return this.style.setResolution(m)},setLineSpacing:function(m){return this.lineSpacing=m,this.updateText()},setLetterSpacing:function(m){return this.letterSpacing=m,this.updateText()},setPadding:function(m,S,M,w){if(typeof m=="object"){var C=m,A=u(C,"x",null);A!==null?(m=A,M=A):(m=u(C,"left",0),M=u(C,"right",m));var P=u(C,"y",null);P!==null?(S=P,w=P):(S=u(C,"top",0),w=u(C,"bottom",S))}else m===void 0&&(m=0),S===void 0&&(S=m),M===void 0&&(M=m),w===void 0&&(w=S);return this.padding.left=m,this.padding.top=S,this.padding.right=M,this.padding.bottom=w,this.updateText()},setMaxLines:function(m){return this.style.setMaxLines(m)},setRTL:function(m){m===void 0&&(m=!0);var S=this.style;return S.rtl===m?this:(S.rtl=m,m?(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",r(this.canvas,this.scene.sys.canvas)):(this.canvas.dir="ltr",this.context.direction="ltr"),S.align==="left"?S.align="right":S.align==="right"&&(S.align="left"),this)},updateText:function(){var m=this.canvas,S=this.context,M=this.style,w=M.resolution,C=M.metrics;M.syncFont(m,S);var A=this._text;(M.wordWrapWidth||M.wordWrapCallback)&&(A=this.runWordWrap(this._text));var P=A.split(this.splitRegExp),b=n(this,C,P),O=this.padding,I;M.fixedWidth===0?(this.width=b.width+O.left+O.right,I=b.width):(this.width=M.fixedWidth,I=this.width-O.left-O.right,I0&&(z+=b.lineSpacing*X),M.rtl)G=D-G-O.left-O.right;else if(M.align==="right")G+=I-b.lineWidths[X];else if(M.align==="center")G+=(I-b.lineWidths[X])/2;else if(M.align==="justify"){var j=.85;if(b.lineWidths[X]/b.width>=j){var Q=b.width-b.lineWidths[X],tt=S.measureText(" ").width,Y=P[X].trim(),$=Y.split(" ");Q+=(P[X].length-Y.length)*tt;for(var U=Math.floor(Q/tt),H=0;U>0;)$[H]+=" ",H=(H+1)%($.length-1||1),--U;P[X]=$.join(" ")}}if(this.autoRound&&(G=Math.round(G),z=Math.round(z)),M.strokeThickness&&(M.syncShadow(S,M.shadowStroke),S.strokeText(P[X],G,z)),M.color){M.syncShadow(S,M.shadowFill);var Z=this.letterSpacing;if(Z!==0)for(var _=0,q=P[X].split(""),at=0;at{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){r.width===0||r.height===0||(d.addToRenderList(r),e.batchSprite(r,r.frame,d,h))};s.exports=y},71259:(s,y,e)=>{/** + */var x=function(e,r,d,h){r.width===0||r.height===0||(d.addToRenderList(r),e.batchSprite(r,r.frame,d,h))};s.exports=x},71259:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(44603),h=e(23568),a=e(50171);d.register("text",function(l,n){l===void 0&&(l={});var u=h(l,"text",""),f=h(l,"style",null),o=h(l,"padding",null);o!==null&&(f.padding=o);var c=new a(this.scene,0,0,u,f);return n!==void 0&&(l.add=n),r(this.scene,c,l),c.autoRound=h(l,"autoRound",!0),c.resolution=h(l,"resolution",1),c})},68005:(s,y,e)=>{/** + */var r=e(25305),d=e(44603),h=e(23568),a=e(50171);d.register("text",function(l,n){l===void 0&&(l={});var u=h(l,"text",""),f=h(l,"style",null),o=h(l,"padding",null);o!==null&&(f.padding=o);var c=new a(this.scene,0,0,u,f);return n!==void 0&&(l.add=n),r(this.scene,c,l),c.autoRound=h(l,"autoRound",!0),c.resolution=h(l,"resolution",1),c})},68005:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(50171),d=e(39429);d.register("text",function(h,a,l,n){return this.displayList.add(new r(this.scene,h,a,l,n))})},61771:(s,y,e)=>{/** + */var r=e(50171),d=e(39429);d.register("text",function(h,a,l,n){return this.displayList.add(new r(this.scene,h,a,l,n))})},61771:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(34397),h=e(79724),s.exports={renderWebGL:d,renderCanvas:h}},35762:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(34397),h=e(79724),s.exports={renderWebGL:d,renderCanvas:h}},35762:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23568),h=e(35154),a=e(79557),l={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},n=new r({initialize:function(f,o){this.parent=f,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(o,!1,!0)},setStyle:function(u,f,o){f===void 0&&(f=!0),o===void 0&&(o=!1),u&&u.hasOwnProperty("fontSize")&&typeof u.fontSize=="number"&&(u.fontSize=u.fontSize.toString()+"px");for(var c in l){var p=o?l[c][1]:this[c];c==="wordWrapCallback"||c==="wordWrapCallbackScope"?this[c]=h(u,l[c][0],p):this[c]=d(u,l[c][0],p)}var v=h(u,"font",null);v!==null&&this.setFont(v,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var m=h(u,"fill",null);m!==null&&(this.color=m);var S=h(u,"metrics",!1);return S?this.metrics={ascent:h(S,"ascent",0),descent:h(S,"descent",0),fontSize:h(S,"fontSize",0)}:(f||!this.metrics)&&(this.metrics=a(this)),f?this.parent.updateText():this.parent},syncFont:function(u,f){f.font=this._font},syncStyle:function(u,f){f.textBaseline="alphabetic",f.fillStyle=this.color,f.strokeStyle=this.stroke,f.lineWidth=this.strokeThickness,f.lineCap="round",f.lineJoin="round"},syncShadow:function(u,f){f?(u.shadowOffsetX=this.shadowOffsetX,u.shadowOffsetY=this.shadowOffsetY,u.shadowColor=this.shadowColor,u.shadowBlur=this.shadowBlur):(u.shadowOffsetX=0,u.shadowOffsetY=0,u.shadowColor=0,u.shadowBlur=0)},update:function(u){return u&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=a(this)),this.parent.updateText()},setFont:function(u,f){f===void 0&&(f=!0);var o=u,c="",p="";if(typeof u!="string")o=h(u,"fontFamily","Courier"),c=h(u,"fontSize","16px"),p=h(u,"fontStyle","");else{var v=u.split(" "),m=0;p=v.length>2?v[m++]:"",c=v[m++]||"16px",o=v[m++]||"Courier"}return(o!==this.fontFamily||c!==this.fontSize||p!==this.fontStyle)&&(this.fontFamily=o,this.fontSize=c,this.fontStyle=p,f&&this.update(!0)),this.parent},setFontFamily:function(u){return this.fontFamily!==u&&(this.fontFamily=u,this.update(!0)),this.parent},setFontStyle:function(u){return this.fontStyle!==u&&(this.fontStyle=u,this.update(!0)),this.parent},setFontSize:function(u){return typeof u=="number"&&(u=u.toString()+"px"),this.fontSize!==u&&(this.fontSize=u,this.update(!0)),this.parent},setTestString:function(u){return this.testString=u,this.update(!0)},setFixedSize:function(u,f){return this.fixedWidth=u,this.fixedHeight=f,u&&(this.parent.width=u),f&&(this.parent.height=f),this.update(!1)},setBackgroundColor:function(u){return this.backgroundColor=u,this.update(!1)},setFill:function(u){return this.color=u,this.update(!1)},setColor:function(u){return this.color=u,this.update(!1)},setResolution:function(u){return this.resolution=u,this.update(!1)},setStroke:function(u,f){return f===void 0&&(f=this.strokeThickness),u===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==u||this.strokeThickness!==f)&&(this.stroke=u,this.strokeThickness=f,this.update(!0)),this.parent},setShadow:function(u,f,o,c,p,v){return u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o="#000"),c===void 0&&(c=0),p===void 0&&(p=!1),v===void 0&&(v=!0),this.shadowOffsetX=u,this.shadowOffsetY=f,this.shadowColor=o,this.shadowBlur=c,this.shadowStroke=p,this.shadowFill=v,this.update(!1)},setShadowOffset:function(u,f){return u===void 0&&(u=0),f===void 0&&(f=u),this.shadowOffsetX=u,this.shadowOffsetY=f,this.update(!1)},setShadowColor:function(u){return u===void 0&&(u="#000"),this.shadowColor=u,this.update(!1)},setShadowBlur:function(u){return u===void 0&&(u=0),this.shadowBlur=u,this.update(!1)},setShadowStroke:function(u){return this.shadowStroke=u,this.update(!1)},setShadowFill:function(u){return this.shadowFill=u,this.update(!1)},setWordWrapWidth:function(u,f){return f===void 0&&(f=!1),this.wordWrapWidth=u,this.wordWrapUseAdvanced=f,this.update(!1)},setWordWrapCallback:function(u,f){return f===void 0&&(f=null),this.wordWrapCallback=u,this.wordWrapCallbackScope=f,this.update(!1)},setAlign:function(u){return u===void 0&&(u="left"),this.align=u,this.update(!1)},setMaxLines:function(u){return u===void 0&&(u=0),this.maxLines=u,this.update(!1)},getTextMetrics:function(){var u=this.metrics;return{ascent:u.ascent,descent:u.descent,fontSize:u.fontSize}},toJSON:function(){var u={};for(var f in l)u[f]=this[f];return u.metrics=this.getTextMetrics(),u},destroy:function(){this.parent=void 0}});s.exports=n},34397:(s,y,e)=>{/** + */var r=e(83419),d=e(23568),h=e(35154),a=e(79557),l={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},n=new r({initialize:function(f,o){this.parent=f,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(o,!1,!0)},setStyle:function(u,f,o){f===void 0&&(f=!0),o===void 0&&(o=!1),u&&u.hasOwnProperty("fontSize")&&typeof u.fontSize=="number"&&(u.fontSize=u.fontSize.toString()+"px");for(var c in l){var p=o?l[c][1]:this[c];c==="wordWrapCallback"||c==="wordWrapCallbackScope"?this[c]=h(u,l[c][0],p):this[c]=d(u,l[c][0],p)}var v=h(u,"font",null);v!==null&&this.setFont(v,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var m=h(u,"fill",null);m!==null&&(this.color=m);var S=h(u,"metrics",!1);return S?this.metrics={ascent:h(S,"ascent",0),descent:h(S,"descent",0),fontSize:h(S,"fontSize",0)}:(f||!this.metrics)&&(this.metrics=a(this)),f?this.parent.updateText():this.parent},syncFont:function(u,f){f.font=this._font},syncStyle:function(u,f){f.textBaseline="alphabetic",f.fillStyle=this.color,f.strokeStyle=this.stroke,f.lineWidth=this.strokeThickness,f.lineCap="round",f.lineJoin="round"},syncShadow:function(u,f){f?(u.shadowOffsetX=this.shadowOffsetX,u.shadowOffsetY=this.shadowOffsetY,u.shadowColor=this.shadowColor,u.shadowBlur=this.shadowBlur):(u.shadowOffsetX=0,u.shadowOffsetY=0,u.shadowColor=0,u.shadowBlur=0)},update:function(u){return u&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=a(this)),this.parent.updateText()},setFont:function(u,f){f===void 0&&(f=!0);var o=u,c="",p="";if(typeof u!="string")o=h(u,"fontFamily","Courier"),c=h(u,"fontSize","16px"),p=h(u,"fontStyle","");else{var v=u.split(" "),m=0;p=v.length>2?v[m++]:"",c=v[m++]||"16px",o=v[m++]||"Courier"}return(o!==this.fontFamily||c!==this.fontSize||p!==this.fontStyle)&&(this.fontFamily=o,this.fontSize=c,this.fontStyle=p,f&&this.update(!0)),this.parent},setFontFamily:function(u){return this.fontFamily!==u&&(this.fontFamily=u,this.update(!0)),this.parent},setFontStyle:function(u){return this.fontStyle!==u&&(this.fontStyle=u,this.update(!0)),this.parent},setFontSize:function(u){return typeof u=="number"&&(u=u.toString()+"px"),this.fontSize!==u&&(this.fontSize=u,this.update(!0)),this.parent},setTestString:function(u){return this.testString=u,this.update(!0)},setFixedSize:function(u,f){return this.fixedWidth=u,this.fixedHeight=f,u&&(this.parent.width=u),f&&(this.parent.height=f),this.update(!1)},setBackgroundColor:function(u){return this.backgroundColor=u,this.update(!1)},setFill:function(u){return this.color=u,this.update(!1)},setColor:function(u){return this.color=u,this.update(!1)},setResolution:function(u){return this.resolution=u,this.update(!1)},setStroke:function(u,f){return f===void 0&&(f=this.strokeThickness),u===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==u||this.strokeThickness!==f)&&(this.stroke=u,this.strokeThickness=f,this.update(!0)),this.parent},setShadow:function(u,f,o,c,p,v){return u===void 0&&(u=0),f===void 0&&(f=0),o===void 0&&(o="#000"),c===void 0&&(c=0),p===void 0&&(p=!1),v===void 0&&(v=!0),this.shadowOffsetX=u,this.shadowOffsetY=f,this.shadowColor=o,this.shadowBlur=c,this.shadowStroke=p,this.shadowFill=v,this.update(!1)},setShadowOffset:function(u,f){return u===void 0&&(u=0),f===void 0&&(f=u),this.shadowOffsetX=u,this.shadowOffsetY=f,this.update(!1)},setShadowColor:function(u){return u===void 0&&(u="#000"),this.shadowColor=u,this.update(!1)},setShadowBlur:function(u){return u===void 0&&(u=0),this.shadowBlur=u,this.update(!1)},setShadowStroke:function(u){return this.shadowStroke=u,this.update(!1)},setShadowFill:function(u){return this.shadowFill=u,this.update(!1)},setWordWrapWidth:function(u,f){return f===void 0&&(f=!1),this.wordWrapWidth=u,this.wordWrapUseAdvanced=f,this.update(!1)},setWordWrapCallback:function(u,f){return f===void 0&&(f=null),this.wordWrapCallback=u,this.wordWrapCallbackScope=f,this.update(!1)},setAlign:function(u){return u===void 0&&(u="left"),this.align=u,this.update(!1)},setMaxLines:function(u){return u===void 0&&(u=0),this.maxLines=u,this.update(!1)},getTextMetrics:function(){var u=this.metrics;return{ascent:u.ascent,descent:u.descent,fontSize:u.fontSize}},toJSON:function(){var u={};for(var f in l)u[f]=this[f];return u.metrics=this.getTextMetrics(),u},destroy:function(){this.parent=void 0}});s.exports=n},34397:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(70554),d=function(h,a,l,n){if(!(a.width===0||a.height===0)){l.addToRenderList(a);var u=a.frame,f=u.width,o=u.height,c=r.getTintAppendFloatAlpha,p=h.pipelines.set(a.pipeline,a),v=p.setTexture2D(u.glTexture,a);p.batchTexture(a,u.glTexture,f,o,a.x,a.y,f/a.style.resolution,o/a.style.resolution,a.scaleX,a.scaleY,a.rotation,a.flipX,a.flipY,a.scrollFactorX,a.scrollFactorY,a.displayOriginX,a.displayOriginY,0,0,f,o,c(a.tintTopLeft,l.alpha*a._alphaTL),c(a.tintTopRight,l.alpha*a._alphaTR),c(a.tintBottomLeft,l.alpha*a._alphaBL),c(a.tintBottomRight,l.alpha*a._alphaBR),a.tintFill,0,0,l,n,!1,v)}};s.exports=d},20839:(s,y,e)=>{/** + */var r=e(70554),d=function(h,a,l,n){if(!(a.width===0||a.height===0)){l.addToRenderList(a);var u=a.frame,f=u.width,o=u.height,c=r.getTintAppendFloatAlpha,p=h.pipelines.set(a.pipeline,a),v=p.setTexture2D(u.glTexture,a);p.batchTexture(a,u.glTexture,f,o,a.x,a.y,f/a.style.resolution,o/a.style.resolution,a.scaleX,a.scaleY,a.rotation,a.flipX,a.flipY,a.scrollFactorX,a.scrollFactorY,a.displayOriginX,a.displayOriginY,0,0,f,o,c(a.tintTopLeft,l.alpha*a._alphaTL),c(a.tintTopRight,l.alpha*a._alphaTR),c(a.tintBottomLeft,l.alpha*a._alphaBL),c(a.tintBottomRight,l.alpha*a._alphaBR),a.tintFill,0,0,l,n,!1,v)}};s.exports=d},20839:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2163,23 +2163,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){r.updateCanvas(),d.addToRenderList(r),e.batchSprite(r,r.frame,d,h)};s.exports=y},14167:(s,y,e)=>{/** + */var x=function(e,r,d,h){r.updateCanvas(),d.addToRenderList(r),e.batchSprite(r,r.frame,d,h)};s.exports=x},14167:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(44603),h=e(23568),a=e(20839);d.register("tileSprite",function(l,n){l===void 0&&(l={});var u=h(l,"x",0),f=h(l,"y",0),o=h(l,"width",512),c=h(l,"height",512),p=h(l,"key",""),v=h(l,"frame",""),m=new a(this.scene,u,f,o,c,p,v);return n!==void 0&&(l.add=n),r(this.scene,m,l),m})},91681:(s,y,e)=>{/** + */var r=e(25305),d=e(44603),h=e(23568),a=e(20839);d.register("tileSprite",function(l,n){l===void 0&&(l={});var u=h(l,"x",0),f=h(l,"y",0),o=h(l,"width",512),c=h(l,"height",512),p=h(l,"key",""),v=h(l,"frame",""),m=new a(this.scene,u,f,o,c,p,v);return n!==void 0&&(l.add=n),r(this.scene,m,l),m})},91681:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(20839),d=e(39429);d.register("tileSprite",function(h,a,l,n,u,f){return this.displayList.add(new r(this.scene,h,a,l,n,u,f))})},56295:(s,y,e)=>{/** + */var r=e(20839),d=e(39429);d.register("tileSprite",function(h,a,l,n,u,f){return this.displayList.add(new r(this.scene,h,a,l,n,u,f))})},56295:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(18553),h=e(46992),s.exports={renderWebGL:d,renderCanvas:h}},18553:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(18553),h=e(46992),s.exports={renderWebGL:d,renderCanvas:h}},18553:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(70554),d=function(h,a,l,n){a.updateCanvas();var u=a.width,f=a.height;if(!(u===0||f===0)){l.addToRenderList(a);var o=r.getTintAppendFloatAlpha,c=h.pipelines.set(a.pipeline,a),p=c.setTexture2D(a.fillPattern,a);c.batchTexture(a,a.fillPattern,a.displayFrame.width*a.tileScaleX,a.displayFrame.height*a.tileScaleY,a.x,a.y,u,f,a.scaleX,a.scaleY,a.rotation,a.flipX,a.flipY,a.scrollFactorX,a.scrollFactorY,a.originX*u,a.originY*f,0,0,u,f,o(a.tintTopLeft,l.alpha*a._alphaTL),o(a.tintTopRight,l.alpha*a._alphaTR),o(a.tintBottomLeft,l.alpha*a._alphaBL),o(a.tintBottomRight,l.alpha*a._alphaBR),a.tintFill,a.tilePositionX%a.displayFrame.width/a.displayFrame.width,a.tilePositionY%a.displayFrame.height/a.displayFrame.height,l,n,!1,p)}};s.exports=d},18471:(s,y,e)=>{/** + */var r=e(70554),d=function(h,a,l,n){a.updateCanvas();var u=a.width,f=a.height;if(!(u===0||f===0)){l.addToRenderList(a);var o=r.getTintAppendFloatAlpha,c=h.pipelines.set(a.pipeline,a),p=c.setTexture2D(a.fillPattern,a);c.batchTexture(a,a.fillPattern,a.displayFrame.width*a.tileScaleX,a.displayFrame.height*a.tileScaleY,a.x,a.y,u,f,a.scaleX,a.scaleY,a.rotation,a.flipX,a.flipY,a.scrollFactorX,a.scrollFactorY,a.originX*u,a.originY*f,0,0,u,f,o(a.tintTopLeft,l.alpha*a._alphaTL),o(a.tintTopRight,l.alpha*a._alphaTR),o(a.tintBottomLeft,l.alpha*a._alphaBL),o(a.tintBottomRight,l.alpha*a._alphaBR),a.tintFill,a.tilePositionX%a.displayFrame.width/a.displayFrame.width,a.tilePositionY%a.displayFrame.height/a.displayFrame.height,l,n,!1,p)}};s.exports=d},18471:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2187,15 +2187,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){r.videoTexture&&(d.addToRenderList(r),e.batchSprite(r,r.frame,d,h))};s.exports=y},11511:(s,y,e)=>{/** + */var x=function(e,r,d,h){r.videoTexture&&(d.addToRenderList(r),e.batchSprite(r,r.frame,d,h))};s.exports=x},11511:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25305),d=e(44603),h=e(23568),a=e(18471);d.register("video",function(l,n){l===void 0&&(l={});var u=h(l,"key",null),f=new a(this.scene,0,0,u);return n!==void 0&&(l.add=n),r(this.scene,f,l),f})},89025:(s,y,e)=>{/** + */var r=e(25305),d=e(44603),h=e(23568),a=e(18471);d.register("video",function(l,n){l===void 0&&(l={});var u=h(l,"key",null),f=new a(this.scene,0,0,u);return n!==void 0&&(l.add=n),r(this.scene,f,l),f})},89025:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(18471),d=e(39429);d.register("video",function(h,a,l){return this.displayList.add(new r(this.scene,h,a,l))})},10247:(s,y,e)=>{/** + */var r=e(18471),d=e(39429);d.register("video",function(h,a,l){return this.displayList.add(new r(this.scene,h,a,l))})},10247:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2203,15 +2203,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){r.videoTexture&&(d.addToRenderList(r),r.pipeline.batchSprite(r,d,h))};s.exports=y},41481:(s,y,e)=>{/** + */var x=function(e,r,d,h){r.videoTexture&&(d.addToRenderList(r),r.pipeline.batchSprite(r,d,h))};s.exports=x},41481:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(10312),d=e(96503),h=e(87902),a=e(83419),l=e(31401),n=e(95643),u=e(87841),f=e(37303),o=new a({Extends:n,Mixins:[l.Depth,l.GetBounds,l.Origin,l.Transform,l.ScrollFactor,l.Visible],initialize:function(p,v,m,S,M){S===void 0&&(S=1),M===void 0&&(M=S),n.call(this,p,"Zone"),this.setPosition(v,m),this.width=S,this.height=M,this.blendMode=r.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(c){this.scaleX=c/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(c){this.scaleY=c/this.height}},setSize:function(c,p,v){v===void 0&&(v=!0),this.width=c,this.height=p,this.updateDisplayOrigin();var m=this.input;return v&&m&&!m.customHitArea&&(m.hitArea.width=c,m.hitArea.height=p),this},setDisplaySize:function(c,p){return this.displayWidth=c,this.displayHeight=p,this},setCircleDropZone:function(c){return this.setDropZone(new d(0,0,c),h)},setRectangleDropZone:function(c,p){return this.setDropZone(new u(0,0,c,p),f)},setDropZone:function(c,p){return this.input||this.setInteractive(c,p,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(c,p,v){v.addToRenderList(p)},renderWebGL:function(c,p,v){v.addToRenderList(p)}});s.exports=o},95261:(s,y,e)=>{/** + */var r=e(10312),d=e(96503),h=e(87902),a=e(83419),l=e(31401),n=e(95643),u=e(87841),f=e(37303),o=new a({Extends:n,Mixins:[l.Depth,l.GetBounds,l.Origin,l.Transform,l.ScrollFactor,l.Visible],initialize:function(p,v,m,S,M){S===void 0&&(S=1),M===void 0&&(M=S),n.call(this,p,"Zone"),this.setPosition(v,m),this.width=S,this.height=M,this.blendMode=r.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(c){this.scaleX=c/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(c){this.scaleY=c/this.height}},setSize:function(c,p,v){v===void 0&&(v=!0),this.width=c,this.height=p,this.updateDisplayOrigin();var m=this.input;return v&&m&&!m.customHitArea&&(m.hitArea.width=c,m.hitArea.height=p),this},setDisplaySize:function(c,p){return this.displayWidth=c,this.displayHeight=p,this},setCircleDropZone:function(c){return this.setDropZone(new d(0,0,c),h)},setRectangleDropZone:function(c,p){return this.setDropZone(new u(0,0,c,p),f)},setDropZone:function(c,p){return this.input||this.setInteractive(c,p,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(c,p,v){v.addToRenderList(p)},renderWebGL:function(c,p,v){v.addToRenderList(p)}});s.exports=o},95261:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(44603),d=e(23568),h=e(41481);r.register("zone",function(a){var l=d(a,"x",0),n=d(a,"y",0),u=d(a,"width",1),f=d(a,"height",u);return new h(this.scene,l,n,u,f)})},84175:(s,y,e)=>{/** + */var r=e(44603),d=e(23568),h=e(41481);r.register("zone",function(a){var l=d(a,"x",0),n=d(a,"y",0),u=d(a,"width",1),f=d(a,"height",u);return new h(this.scene,l,n,u,f)})},84175:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2219,7 +2219,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.radius>0?Math.PI*e.radius*e.radius:0};s.exports=y},96503:(s,y,e)=>{/** + */var x=function(e){return e.radius>0?Math.PI*e.radius*e.radius:0};s.exports=x},96503:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2227,11 +2227,11 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return 2*(Math.PI*e.radius)};s.exports=y},92110:(s,y,e)=>{/** + */var x=function(e){return 2*(Math.PI*e.radius)};s.exports=x},92110:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a,l){return l===void 0&&(l=new r),l.x=h.x+h.radius*Math.cos(a),l.y=h.y+h.radius*Math.sin(a),l};s.exports=d},42250:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a,l){return l===void 0&&(l=new r),l.x=h.x+h.radius*Math.cos(a),l.y=h.y+h.radius*Math.sin(a),l};s.exports=d},42250:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2239,11 +2239,11 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){if(e.radius>0&&r>=e.left&&r<=e.right&&d>=e.top&&d<=e.bottom){var h=(e.x-r)*(e.x-r),a=(e.y-d)*(e.y-d);return h+a<=e.radius*e.radius}else return!1};s.exports=y},5698:(s,y,e)=>{/** + */var x=function(e,r,d){if(e.radius>0&&r>=e.left&&r<=e.right&&d>=e.top&&d<=e.bottom){var h=(e.x-r)*(e.x-r),a=(e.y-d)*(e.y-d);return h+a<=e.radius*e.radius}else return!1};s.exports=x},5698:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(87902),d=function(h,a){return r(h,a.x,a.y)};s.exports=d},70588:(s,y,e)=>{/** + */var r=e(87902),d=function(h,a){return r(h,a.x,a.y)};s.exports=d},70588:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2251,19 +2251,19 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r.setTo(e.x,e.y,e.radius)};s.exports=y},76278:s=>{/** + */var x=function(e,r){return r.setTo(e.x,e.y,e.radius)};s.exports=x},76278:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.x===r.x&&e.y===r.y&&e.radius===r.radius};s.exports=y},2074:(s,y,e)=>{/** + */var x=function(e,r){return e.x===r.x&&e.y===r.y&&e.radius===r.radius};s.exports=x},2074:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(87841),d=function(h,a){return a===void 0&&(a=new r),a.x=h.left,a.y=h.top,a.width=h.diameter,a.height=h.diameter,a};s.exports=d},26241:(s,y,e)=>{/** + */var r=e(87841),d=function(h,a){return a===void 0&&(a=new r),a.x=h.left,a.y=h.top,a.width=h.diameter,a.height=h.diameter,a};s.exports=d},26241:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(92110),d=e(62945),h=e(36383),a=e(2141),l=function(n,u,f){f===void 0&&(f=new a);var o=d(u,0,h.PI2);return r(n,o,f)};s.exports=l},79124:(s,y,e)=>{/** + */var r=e(92110),d=e(62945),h=e(36383),a=e(2141),l=function(n,u,f){f===void 0&&(f=new a);var o=d(u,0,h.PI2);return r(n,o,f)};s.exports=l},79124:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2271,15 +2271,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return e.x+=r,e.y+=d,e};s.exports=y},39212:s=>{/** + */var x=function(e,r,d){return e.x+=r,e.y+=d,e};s.exports=x},39212:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.x+=r.x,e.y+=r.y,e};s.exports=y},28176:(s,y,e)=>{/** + */var x=function(e,r){return e.x+=r.x,e.y+=r.y,e};s.exports=x},28176:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a){a===void 0&&(a=new r);var l=2*Math.PI*Math.random(),n=Math.random()+Math.random(),u=n>1?2-n:n,f=u*Math.cos(l),o=u*Math.sin(l);return a.x=h.x+f*h.radius,a.y=h.y+o*h.radius,a};s.exports=d},88911:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a){a===void 0&&(a=new r);var l=2*Math.PI*Math.random(),n=Math.random()+Math.random(),u=n>1?2-n:n,f=u*Math.cos(l),o=u*Math.sin(l);return a.x=h.x+f*h.radius,a.y=h.y+o*h.radius,a};s.exports=d},88911:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2287,19 +2287,19 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};s.exports=y},78874:s=>{/** + */var x={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};s.exports=x},78874:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.isEmpty()?0:e.getMajorRadius()*e.getMinorRadius()*Math.PI};s.exports=y},92990:s=>{/** + */var x=function(e){return e.isEmpty()?0:e.getMajorRadius()*e.getMinorRadius()*Math.PI};s.exports=x},92990:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r=e.width/2,d=e.height/2,h=Math.pow(r-d,2)/Math.pow(r+d,2);return Math.PI*(r+d)*(1+3*h/(10+Math.sqrt(4-3*h)))};s.exports=y},79522:(s,y,e)=>{/** + */var x=function(e){var r=e.width/2,d=e.height/2,h=Math.pow(r-d,2)/Math.pow(r+d,2);return Math.PI*(r+d)*(1+3*h/(10+Math.sqrt(4-3*h)))};s.exports=x},79522:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a,l){l===void 0&&(l=new r);var n=h.width/2,u=h.height/2;return l.x=h.x+n*Math.cos(a),l.y=h.y+u*Math.sin(a),l};s.exports=d},58102:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a,l){l===void 0&&(l=new r);var n=h.width/2,u=h.height/2;return l.x=h.x+n*Math.cos(a),l.y=h.y+u*Math.sin(a),l};s.exports=d},58102:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2307,11 +2307,11 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){if(e.width<=0||e.height<=0)return!1;var h=(r-e.x)/e.width,a=(d-e.y)/e.height;return h*=h,a*=a,h+a<.25};s.exports=y},46662:(s,y,e)=>{/** + */var x=function(e,r,d){if(e.width<=0||e.height<=0)return!1;var h=(r-e.x)/e.width,a=(d-e.y)/e.height;return h*=h,a*=a,h+a<.25};s.exports=x},46662:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(81154),d=function(h,a){return r(h,a.x,a.y)};s.exports=d},1632:(s,y,e)=>{/** + */var r=e(81154),d=function(h,a){return r(h,a.x,a.y)};s.exports=d},1632:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2319,7 +2319,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r.setTo(e.x,e.y,e.width,e.height)};s.exports=y},8497:(s,y,e)=>{/** + */var x=function(e,r){return r.setTo(e.x,e.y,e.width,e.height)};s.exports=x},8497:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2327,15 +2327,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height};s.exports=y},23694:(s,y,e)=>{/** + */var x=function(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height};s.exports=x},23694:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(87841),d=function(h,a){return a===void 0&&(a=new r),a.x=h.left,a.y=h.top,a.width=h.width,a.height=h.height,a};s.exports=d},90549:(s,y,e)=>{/** + */var r=e(87841),d=function(h,a){return a===void 0&&(a=new r),a.x=h.left,a.y=h.top,a.width=h.width,a.height=h.height,a};s.exports=d},90549:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(79522),d=e(62945),h=e(36383),a=e(2141),l=function(n,u,f){f===void 0&&(f=new a);var o=d(u,0,h.PI2);return r(n,o,f)};s.exports=l},48320:(s,y,e)=>{/** + */var r=e(79522),d=e(62945),h=e(36383),a=e(2141),l=function(n,u,f){f===void 0&&(f=new a);var o=d(u,0,h.PI2);return r(n,o,f)};s.exports=l},48320:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2343,23 +2343,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return e.x+=r,e.y+=d,e};s.exports=y},44808:s=>{/** + */var x=function(e,r,d){return e.x+=r,e.y+=d,e};s.exports=x},44808:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.x+=r.x,e.y+=r.y,e};s.exports=y},24820:(s,y,e)=>{/** + */var x=function(e,r){return e.x+=r.x,e.y+=r.y,e};s.exports=x},24820:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a){a===void 0&&(a=new r);var l=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return a.x=h.x+n*Math.cos(l)*h.width/2,a.y=h.y+n*Math.sin(l)*h.height/2,a};s.exports=d},49203:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a){a===void 0&&(a=new r);var l=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return a.x=h.x+n*Math.cos(l)*h.width/2,a.y=h.y+n*Math.sin(l)*h.height/2,a};s.exports=d},49203:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(8497);r.Area=e(78874),r.Circumference=e(92990),r.CircumferencePoint=e(79522),r.Clone=e(58102),r.Contains=e(81154),r.ContainsPoint=e(46662),r.ContainsRect=e(1632),r.CopyFrom=e(65534),r.Equals=e(36146),r.GetBounds=e(23694),r.GetPoint=e(90549),r.GetPoints=e(48320),r.Offset=e(73424),r.OffsetPoint=e(44808),r.Random=e(24820),s.exports=r},55738:(s,y,e)=>{/** + */var r=e(8497);r.Area=e(78874),r.Circumference=e(92990),r.CircumferencePoint=e(79522),r.Clone=e(58102),r.Contains=e(81154),r.ContainsPoint=e(46662),r.ContainsRect=e(1632),r.CopyFrom=e(65534),r.Equals=e(36146),r.GetBounds=e(23694),r.GetPoint=e(90549),r.GetPoints=e(48320),r.Offset=e(73424),r.OffsetPoint=e(44808),r.Random=e(24820),s.exports=r},55738:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(23777),d=e(79291),h={Circle:e(88911),Ellipse:e(49203),Intersects:e(91865),Line:e(2529),Mesh:e(73090),Point:e(43711),Polygon:e(58423),Rectangle:e(93232),Triangle:e(84435)};h=d(!1,h,r),s.exports=h},2044:(s,y,e)=>{/** + */var r=e(23777),d=e(79291),h={Circle:e(88911),Ellipse:e(49203),Intersects:e(91865),Line:e(2529),Mesh:e(73090),Point:e(43711),Polygon:e(58423),Rectangle:e(93232),Triangle:e(84435)};h=d(!1,h,r),s.exports=h},2044:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2367,72 +2367,72 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=r.width/2,h=r.height/2,a=Math.abs(e.x-r.x-d),l=Math.abs(e.y-r.y-h),n=d+e.radius,u=h+e.radius;if(a>n||l>u)return!1;if(a<=d||l<=h)return!0;var f=a-d,o=l-h,c=f*f,p=o*o,v=e.radius*e.radius;return c+p<=v};s.exports=y},63376:(s,y,e)=>{/** + */var x=function(e,r){var d=r.width/2,h=r.height/2,a=Math.abs(e.x-r.x-d),l=Math.abs(e.y-r.y-h),n=d+e.radius,u=h+e.radius;if(a>n||l>u)return!1;if(a<=d||l<=h)return!0;var f=a-d,o=l-h,c=f*f,p=o*o,v=e.radius*e.radius;return c+p<=v};s.exports=x},63376:(s,x,e)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=e(2044),h=function(a,l,n){if(n===void 0&&(n=[]),d(a,l)){var u=a.x,f=a.y,o=a.radius,c=l.x,p=l.y,v=l.radius,m,S,M,w,C;if(f===p)C=(v*v-o*o-c*c+u*u)/(2*(u-c)),m=1,S=-2*p,M=c*c+C*C-2*c*C+p*p-v*v,w=S*S-4*m*M,w===0?n.push(new r(C,-S/(2*m))):w>0&&(n.push(new r(C,(-S+Math.sqrt(w))/(2*m))),n.push(new r(C,(-S-Math.sqrt(w))/(2*m))));else{var A=(u-c)/(f-p),P=(v*v-o*o-c*c+u*u-p*p+f*f)/(2*(f-p));m=A*A+1,S=2*f*A-2*P*A-2*u,M=u*u+f*f+P*P-o*o-2*f*P,w=S*S-4*m*M,w===0?(C=-S/(2*m),n.push(new r(C,P-C*A))):w>0&&(C=(-S+Math.sqrt(w))/(2*m),n.push(new r(C,P-C*A)),C=(-S-Math.sqrt(w))/(2*m),n.push(new r(C,P-C*A)))}}return n};s.exports=h},97439:(s,y,e)=>{/** + */var r=e(2141),d=e(2044),h=function(a,l,n){if(n===void 0&&(n=[]),d(a,l)){var u=a.x,f=a.y,o=a.radius,c=l.x,p=l.y,v=l.radius,m,S,M,w,C;if(f===p)C=(v*v-o*o-c*c+u*u)/(2*(u-c)),m=1,S=-2*p,M=c*c+C*C-2*c*C+p*p-v*v,w=S*S-4*m*M,w===0?n.push(new r(C,-S/(2*m))):w>0&&(n.push(new r(C,(-S+Math.sqrt(w))/(2*m))),n.push(new r(C,(-S-Math.sqrt(w))/(2*m))));else{var A=(u-c)/(f-p),P=(v*v-o*o-c*c+u*u-p*p+f*f)/(2*(f-p));m=A*A+1,S=2*f*A-2*P*A-2*u,M=u*u+f*f+P*P-o*o-2*f*P,w=S*S-4*m*M,w===0?(C=-S/(2*m),n.push(new r(C,P-C*A))):w>0&&(C=(-S+Math.sqrt(w))/(2*m),n.push(new r(C,P-C*A)),C=(-S-Math.sqrt(w))/(2*m),n.push(new r(C,P-C*A)))}}return n};s.exports=h},97439:(s,x,e)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(4042),d=e(81491),h=function(a,l,n){if(n===void 0&&(n=[]),d(a,l)){var u=l.getLineA(),f=l.getLineB(),o=l.getLineC(),c=l.getLineD();r(u,a,n),r(f,a,n),r(o,a,n),r(c,a,n)}return n};s.exports=h},4042:(s,y,e)=>{/** + */var r=e(4042),d=e(81491),h=function(a,l,n){if(n===void 0&&(n=[]),d(a,l)){var u=l.getLineA(),f=l.getLineB(),o=l.getLineC(),c=l.getLineD();r(u,a,n),r(f,a,n),r(o,a,n),r(c,a,n)}return n};s.exports=h},4042:(s,x,e)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=e(80462),h=function(a,l,n){if(n===void 0&&(n=[]),d(a,l)){var u=a.x1,f=a.y1,o=a.x2,c=a.y2,p=l.x,v=l.y,m=l.radius,S=o-u,M=c-f,w=u-p,C=f-v,A=S*S+M*M,P=2*(S*w+M*C),b=w*w+C*C-m*m,O=P*P-4*A*b,I,D;if(O===0){var B=-P/(2*A);I=u+B*S,D=f+B*M,B>=0&&B<=1&&n.push(new r(I,D))}else if(O>0){var G=(-P-Math.sqrt(O))/(2*A);I=u+G*S,D=f+G*M,G>=0&&G<=1&&n.push(new r(I,D));var z=(-P+Math.sqrt(O))/(2*A);I=u+z*S,D=f+z*M,z>=0&&z<=1&&n.push(new r(I,D))}}return n};s.exports=h},36100:(s,y,e)=>{/** + */var r=e(2141),d=e(80462),h=function(a,l,n){if(n===void 0&&(n=[]),d(a,l)){var u=a.x1,f=a.y1,o=a.x2,c=a.y2,p=l.x,v=l.y,m=l.radius,S=o-u,M=c-f,w=u-p,C=f-v,A=S*S+M*M,P=2*(S*w+M*C),b=w*w+C*C-m*m,O=P*P-4*A*b,I,D;if(O===0){var B=-P/(2*A);I=u+B*S,D=f+B*M,B>=0&&B<=1&&n.push(new r(I,D))}else if(O>0){var G=(-P-Math.sqrt(O))/(2*A);I=u+G*S,D=f+G*M,G>=0&&G<=1&&n.push(new r(I,D));var z=(-P+Math.sqrt(O))/(2*A);I=u+z*S,D=f+z*M,z>=0&&z<=1&&n.push(new r(I,D))}}return n};s.exports=h},36100:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25836),d=function(h,a,l,n){l===void 0&&(l=!1);var u=h.x1,f=h.y1,o=h.x2,c=h.y2,p=a.x1,v=a.y1,m=a.x2,S=a.y2,M=o-u,w=c-f,C=m-p,A=S-v,P=M*A-w*C;if(P===0)return null;var b,O,I;if(l){if(b=(M*(v-f)+w*(u-p))/(C*w-A*M),O=(p+C*b-u)/M,O<0||b<0||b>1)return null;I=O}else{if(b=((p-u)*A-(v-f)*C)/P,O=((f-v)*M-(u-p)*w)/P,b<0||b>1||O<0||O>1)return null;I=b}return n===void 0&&(n=new r),n.set(u+M*I,f+w*I,I)};s.exports=d},3073:(s,y,e)=>{/** + */var r=e(25836),d=function(h,a,l,n){l===void 0&&(l=!1);var u=h.x1,f=h.y1,o=h.x2,c=h.y2,p=a.x1,v=a.y1,m=a.x2,S=a.y2,M=o-u,w=c-f,C=m-p,A=S-v,P=M*A-w*C;if(P===0)return null;var b,O,I;if(l){if(b=(M*(v-f)+w*(u-p))/(C*w-A*M),O=(p+C*b-u)/M,O<0||b<0||b>1)return null;I=O}else{if(b=((p-u)*A-(v-f)*C)/P,O=((f-v)*M-(u-p)*w)/P,b<0||b>1||O<0||O>1)return null;I=b}return n===void 0&&(n=new r),n.set(u+M*I,f+w*I,I)};s.exports=d},3073:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(36100),d=e(23031),h=e(25836),a=new d,l=new h,n=function(u,f,o,c){o===void 0&&(o=!1),c===void 0&&(c=new h);var p=!1;c.set(),l.set();for(var v=f[f.length-1],m=0;m{/** + */var r=e(36100),d=e(23031),h=e(25836),a=new d,l=new h,n=function(u,f,o,c){o===void 0&&(o=!1),c===void 0&&(c=new h);var p=!1;c.set(),l.set();for(var v=f[f.length-1],m=0;m{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(25836),d=e(61369),h=e(3073),a=new r,l=function(n,u,f,o){o===void 0&&(o=new d),Array.isArray(u)||(u=[u]);var c=!1;o.set(),a.set();for(var p=0;p{/** + */var r=e(25836),d=e(61369),h=e(3073),a=new r,l=function(n,u,f,o){o===void 0&&(o=new d),Array.isArray(u)||(u=[u]);var c=!1;o.set(),a.set();for(var p=0;p{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=e(76112),h=e(92773),a=function(l,n,u){if(u===void 0&&(u=[]),h(l,n))for(var f=n.getLineA(),o=n.getLineB(),c=n.getLineC(),p=n.getLineD(),v=[new r,new r,new r,new r],m=[d(f,l,v[0]),d(o,l,v[1]),d(c,l,v[2]),d(p,l,v[3])],S=0;S<4;S++)m[S]&&u.push(v[S]);return u};s.exports=a},71147:(s,y,e)=>{/** + */var r=e(2141),d=e(76112),h=e(92773),a=function(l,n,u){if(u===void 0&&(u=[]),h(l,n))for(var f=n.getLineA(),o=n.getLineB(),c=n.getLineC(),p=n.getLineD(),v=[new r,new r,new r,new r],m=[d(f,l,v[0]),d(o,l,v[1]),d(c,l,v[2]),d(p,l,v[3])],S=0;S<4;S++)m[S]&&u.push(v[S]);return u};s.exports=a},71147:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(61369),d=e(56362),h=e(23031),a=new h;function l(f,o,c,p,v){var m=Math.cos(f),S=Math.sin(f);a.setTo(o,c,o+m,c+S);var M=d(a,p,!0);M&&v.push(new r(M.x,M.y,f,M.w))}function n(f,o){return f.z-o.z}var u=function(f,o,c){Array.isArray(c)||(c=[c]);for(var p=[],v=[],m=0;m{/** + */var r=e(61369),d=e(56362),h=e(23031),a=new h;function l(f,o,c,p,v){var m=Math.cos(f),S=Math.sin(f);a.setTo(o,c,o+m,c+S);var M=d(a,p,!0);M&&v.push(new r(M.x,M.y,f,M.w))}function n(f,o){return f.z-o.z}var u=function(f,o,c){Array.isArray(c)||(c=[c]);for(var p=[],v=[],m=0;m{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(87841),d=e(59996),h=function(a,l,n){return n===void 0&&(n=new r),d(a,l)&&(n.x=Math.max(a.x,l.x),n.y=Math.max(a.y,l.y),n.width=Math.min(a.right,l.right)-n.x,n.height=Math.min(a.bottom,l.bottom)-n.y),n};s.exports=h},52784:(s,y,e)=>{/** + */var r=e(87841),d=e(59996),h=function(a,l,n){return n===void 0&&(n=new r),d(a,l)&&(n.x=Math.max(a.x,l.x),n.y=Math.max(a.y,l.y),n.width=Math.min(a.right,l.right)-n.x,n.height=Math.min(a.bottom,l.bottom)-n.y),n};s.exports=h},52784:(s,x,e)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(60646),d=e(59996),h=function(a,l,n){if(n===void 0&&(n=[]),d(a,l)){var u=a.getLineA(),f=a.getLineB(),o=a.getLineC(),c=a.getLineD();r(u,l,n),r(f,l,n),r(o,l,n),r(c,l,n)}return n};s.exports=h},26341:(s,y,e)=>{/** + */var r=e(60646),d=e(59996),h=function(a,l,n){if(n===void 0&&(n=[]),d(a,l)){var u=a.getLineA(),f=a.getLineB(),o=a.getLineC(),c=a.getLineD();r(u,l,n),r(f,l,n),r(o,l,n),r(c,l,n)}return n};s.exports=h},26341:(s,x,e)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(89265),d=e(60646),h=function(a,l,n){if(n===void 0&&(n=[]),r(a,l)){var u=l.getLineA(),f=l.getLineB(),o=l.getLineC();d(u,a,n),d(f,a,n),d(o,a,n)}return n};s.exports=h},38720:(s,y,e)=>{/** + */var r=e(89265),d=e(60646),h=function(a,l,n){if(n===void 0&&(n=[]),r(a,l)){var u=l.getLineA(),f=l.getLineB(),o=l.getLineC();d(u,a,n),d(f,a,n),d(o,a,n)}return n};s.exports=h},38720:(s,x,e)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(4042),d=e(67636),h=function(a,l,n){if(n===void 0&&(n=[]),d(a,l)){var u=a.getLineA(),f=a.getLineB(),o=a.getLineC();r(u,l,n),r(f,l,n),r(o,l,n)}return n};s.exports=h},13882:(s,y,e)=>{/** + */var r=e(4042),d=e(67636),h=function(a,l,n){if(n===void 0&&(n=[]),d(a,l)){var u=a.getLineA(),f=a.getLineB(),o=a.getLineC();r(u,l,n),r(f,l,n),r(o,l,n)}return n};s.exports=h},13882:(s,x,e)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=e(2822),h=e(76112),a=function(l,n,u){if(u===void 0&&(u=[]),d(l,n))for(var f=l.getLineA(),o=l.getLineB(),c=l.getLineC(),p=[new r,new r,new r],v=[h(f,n,p[0]),h(o,n,p[1]),h(c,n,p[2])],m=0;m<3;m++)v[m]&&u.push(p[m]);return u};s.exports=a},75636:(s,y,e)=>{/** + */var r=e(2141),d=e(2822),h=e(76112),a=function(l,n,u){if(u===void 0&&(u=[]),d(l,n))for(var f=l.getLineA(),o=l.getLineB(),c=l.getLineC(),p=[new r,new r,new r],v=[h(f,n,p[0]),h(o,n,p[1]),h(c,n,p[2])],m=0;m<3;m++)v[m]&&u.push(p[m]);return u};s.exports=a},75636:(s,x,e)=>{/** * @author Florian Vazelle * @author Geoffrey Glaive * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(82944),d=e(13882),h=function(a,l,n){if(n===void 0&&(n=[]),r(a,l)){var u=l.getLineA(),f=l.getLineB(),o=l.getLineC();d(a,u,n),d(a,f,n),d(a,o,n)}return n};s.exports=h},80462:(s,y,e)=>{/** + */var r=e(82944),d=e(13882),h=function(a,l,n){if(n===void 0&&(n=[]),r(a,l)){var u=l.getLineA(),f=l.getLineB(),o=l.getLineC();d(a,u,n),d(a,f,n),d(a,o,n)}return n};s.exports=h},80462:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2440,16 +2440,16 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=e.x1,a=e.y1,l=e.x2,n=e.y2,u=r.x1,f=r.y1,o=r.x2,c=r.y2;if(h===l&&a===n||u===o&&f===c)return!1;var p=(c-f)*(l-h)-(o-u)*(n-a);if(p===0)return!1;var v=((o-u)*(a-f)-(c-f)*(h-u))/p,m=((l-h)*(a-f)-(n-a)*(h-u))/p;return v<0||v>1||m<0||m>1?!1:(d&&(d.x=h+v*(l-h),d.y=a+v*(n-a)),!0)};s.exports=y},92773:s=>{/** + */var x=function(e,r,d){var h=e.x1,a=e.y1,l=e.x2,n=e.y2,u=r.x1,f=r.y1,o=r.x2,c=r.y2;if(h===l&&a===n||u===o&&f===c)return!1;var p=(c-f)*(l-h)-(o-u)*(n-a);if(p===0)return!1;var v=((o-u)*(a-f)-(c-f)*(h-u))/p,m=((l-h)*(a-f)-(n-a)*(h-u))/p;return v<0||v>1||m<0||m>1?!1:(d&&(d.x=h+v*(l-h),d.y=a+v*(n-a)),!0)};s.exports=x},92773:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=e.x1,h=e.y1,a=e.x2,l=e.y2,n=r.x,u=r.y,f=r.right,o=r.bottom,c=0;if(d>=n&&d<=f&&h>=u&&h<=o||a>=n&&a<=f&&l>=u&&l<=o)return!0;if(d=n){if(c=h+(l-h)*(n-d)/(a-d),c>u&&c<=o)return!0}else if(d>f&&a<=f&&(c=h+(l-h)*(f-d)/(a-d),c>=u&&c<=o))return!0;if(h=u){if(c=d+(a-d)*(u-h)/(l-h),c>=n&&c<=f)return!0}else if(h>o&&l<=o&&(c=d+(a-d)*(o-h)/(l-h),c>=n&&c<=f))return!0;return!1};s.exports=y},16204:s=>{/** + */var x=function(e,r){var d=e.x1,h=e.y1,a=e.x2,l=e.y2,n=r.x,u=r.y,f=r.right,o=r.bottom,c=0;if(d>=n&&d<=f&&h>=u&&h<=o||a>=n&&a<=f&&l>=u&&l<=o)return!0;if(d=n){if(c=h+(l-h)*(n-d)/(a-d),c>u&&c<=o)return!0}else if(d>f&&a<=f&&(c=h+(l-h)*(f-d)/(a-d),c>=u&&c<=o))return!0;if(h=u){if(c=d+(a-d)*(u-h)/(l-h),c>=n&&c<=f)return!0}else if(h>o&&l<=o&&(c=d+(a-d)*(o-h)/(l-h),c>=n&&c<=f))return!0;return!1};s.exports=x},16204:s=>{/** * @author Richard Davey * @author Florian Mertens * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){d===void 0&&(d=1);var h=r.x1,a=r.y1,l=r.x2,n=r.y2,u=e.x,f=e.y,o=(l-h)*(l-h)+(n-a)*(n-a);if(o===0)return!1;var c=((u-h)*(l-h)+(f-a)*(n-a))/o;if(c<0)return Math.sqrt((h-u)*(h-u)+(a-f)*(a-f))<=d;if(c>=0&&c<=1){var p=((a-f)*(l-h)-(h-u)*(n-a))/o;return Math.abs(p)*Math.sqrt(o)<=d}else return Math.sqrt((l-u)*(l-u)+(n-f)*(n-f))<=d};s.exports=y},14199:(s,y,e)=>{/** + */var x=function(e,r,d){d===void 0&&(d=1);var h=r.x1,a=r.y1,l=r.x2,n=r.y2,u=e.x,f=e.y,o=(l-h)*(l-h)+(n-a)*(n-a);if(o===0)return!1;var c=((u-h)*(l-h)+(f-a)*(n-a))/o;if(c<0)return Math.sqrt((h-u)*(h-u)+(a-f)*(a-f))<=d;if(c>=0&&c<=1){var p=((a-f)*(l-h)-(h-u)*(n-a))/o;return Math.abs(p)*Math.sqrt(o)<=d}else return Math.sqrt((l-u)*(l-u)+(n-f)*(n-f))<=d};s.exports=x},14199:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2457,7 +2457,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.width<=0||e.height<=0||r.width<=0||r.height<=0?!1:!(e.rightr.right||e.y>r.bottom)};s.exports=y},89265:(s,y,e)=>{/** + */var x=function(e,r){return e.width<=0||e.height<=0||r.width<=0||r.height<=0?!1:!(e.rightr.right||e.y>r.bottom)};s.exports=x},89265:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2465,19 +2465,19 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h,a,l){return l===void 0&&(l=0),!(r>e.right+l||de.bottom+l||a{/** + */var x=function(e,r,d,h,a,l){return l===void 0&&(l=0),!(r>e.right+l||de.bottom+l||a{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(80462),d=e(10690),h=function(a,l){return a.left>l.right||a.rightl.bottom||a.bottom{/** + */var r=e(80462),d=e(10690),h=function(a,l){return a.left>l.right||a.rightl.bottom||a.bottom{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(76112),d=function(h,a){return!!(h.contains(a.x1,a.y1)||h.contains(a.x2,a.y2)||r(h.getLineA(),a)||r(h.getLineB(),a)||r(h.getLineC(),a))};s.exports=d},82944:(s,y,e)=>{/** + */var r=e(76112),d=function(h,a){return!!(h.contains(a.x1,a.y1)||h.contains(a.x2,a.y2)||r(h.getLineA(),a)||r(h.getLineB(),a)||r(h.getLineC(),a))};s.exports=d},82944:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(48653),d=e(71694),h=e(76112),a=function(l,n){if(l.left>n.right||l.rightn.bottom||l.bottom0||(m=d(n),S=r(l,m,!0),S.length>0)};s.exports=a},91865:(s,y,e)=>{/** + */var r=e(48653),d=e(71694),h=e(76112),a=function(l,n){if(l.left>n.right||l.rightn.bottom||l.bottom0||(m=d(n),S=r(l,m,!0),S.length>0)};s.exports=a},91865:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2485,15 +2485,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return Math.atan2(e.y2-e.y1,e.x2-e.x1)};s.exports=y},84993:s=>{/** + */var x=function(e){return Math.atan2(e.y2-e.y1,e.x2-e.x1)};s.exports=x},84993:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){r===void 0&&(r=1),d===void 0&&(d=[]);var h=Math.round(e.x1),a=Math.round(e.y1),l=Math.round(e.x2),n=Math.round(e.y2),u=Math.abs(l-h),f=Math.abs(n-a),o=h-f&&(p-=f,h+=o),m{/** + */var x=function(e,r,d){r===void 0&&(r=1),d===void 0&&(d=[]);var h=Math.round(e.x1),a=Math.round(e.y1),l=Math.round(e.x2),n=Math.round(e.y2),u=Math.abs(l-h),f=Math.abs(n-a),o=h-f&&(p-=f,h+=o),m{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=r-(e.x1+e.x2)/2,a=d-(e.y1+e.y2)/2;return e.x1+=h,e.y1+=a,e.x2+=h,e.y2+=a,e};s.exports=y},31116:(s,y,e)=>{/** + */var x=function(e,r,d){var h=r-(e.x1+e.x2)/2,a=d-(e.y1+e.y2)/2;return e.x1+=h,e.y1+=a,e.x2+=h,e.y2+=a,e};s.exports=x},31116:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2501,36 +2501,36 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r.setTo(e.x1,e.y1,e.x2,e.y2)};s.exports=y},59220:s=>{/** + */var x=function(e,r){return r.setTo(e.x1,e.y1,e.x2,e.y2)};s.exports=x},59220:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.x1===r.x1&&e.y1===r.y1&&e.x2===r.x2&&e.y2===r.y2};s.exports=y},78177:(s,y,e)=>{/** + */var x=function(e,r){return e.x1===r.x1&&e.y1===r.y1&&e.x2===r.x2&&e.y2===r.y2};s.exports=x},78177:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(35001),d=function(h,a,l){l===void 0&&(l=a);var n=r(h),u=h.x2-h.x1,f=h.y2-h.y1;return a&&(h.x1=h.x1-u/n*a,h.y1=h.y1-f/n*a),l&&(h.x2=h.x2+u/n*l,h.y2=h.y2+f/n*l),h};s.exports=d},26708:(s,y,e)=>{/** + */var r=e(35001),d=function(h,a,l){l===void 0&&(l=a);var n=r(h),u=h.x2-h.x1,f=h.y2-h.y1;return a&&(h.x1=h.x1-u/n*a,h.y1=h.y1-f/n*a),l&&(h.x2=h.x2+u/n*l,h.y2=h.y2+f/n*l),h};s.exports=d},26708:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(52816),d=e(6113),h=e(2141),a=function(l,n,u,f,o){f===void 0&&(f=0),o===void 0&&(o=[]);var c=[],p=l.x1,v=l.y1,m=l.x2-p,S=l.y2-v,M=d(n,o),w,C,A=u-1;for(w=0;w0){var P=c[0],b=[P];for(w=1;w=f&&(b.push(O),P=O)}var I=c[c.length-1];return r(P,I){/** + */var r=e(52816),d=e(6113),h=e(2141),a=function(l,n,u,f,o){f===void 0&&(f=0),o===void 0&&(o=[]);var c=[],p=l.x1,v=l.y1,m=l.x2-p,S=l.y2-v,M=d(n,o),w,C,A=u-1;for(w=0;w0){var P=c[0],b=[P];for(w=1;w=f&&(b.push(O),P=O)}var I=c[c.length-1];return r(P,I){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a){return a===void 0&&(a=new r),a.x=(h.x1+h.x2)/2,a.y=(h.y1+h.y2)/2,a};s.exports=d},99569:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a){return a===void 0&&(a=new r),a.x=(h.x1+h.x2)/2,a.y=(h.y1+h.y2)/2,a};s.exports=d},99569:(s,x,e)=>{/** * @author Richard Davey * @author Florian Mertens * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a,l){l===void 0&&(l=new r);var n=h.x1,u=h.y1,f=h.x2,o=h.y2,c=(f-n)*(f-n)+(o-u)*(o-u);if(c===0)return l;var p=((a.x-n)*(f-n)+(a.y-u)*(o-u))/c;return l.x=n+p*(f-n),l.y=u+p*(o-u),l};s.exports=d},34638:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a,l){l===void 0&&(l=new r);var n=h.x1,u=h.y1,f=h.x2,o=h.y2,c=(f-n)*(f-n)+(o-u)*(o-u);if(c===0)return l;var p=((a.x-n)*(f-n)+(a.y-u)*(o-u))/c;return l.x=n+p*(f-n),l.y=u+p*(o-u),l};s.exports=d},34638:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(36383),d=e(91938),h=e(2141),a=function(l,n){n===void 0&&(n=new h);var u=d(l)-r.TAU;return n.x=Math.cos(u),n.y=Math.sin(u),n};s.exports=a},13151:(s,y,e)=>{/** + */var r=e(36383),d=e(91938),h=e(2141),a=function(l,n){n===void 0&&(n=new h);var u=d(l)-r.TAU;return n.x=Math.cos(u),n.y=Math.sin(u),n};s.exports=a},13151:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a,l){return l===void 0&&(l=new r),l.x=h.x1+(h.x2-h.x1)*a,l.y=h.y1+(h.y2-h.y1)*a,l};s.exports=d},15258:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a,l){return l===void 0&&(l=new r),l.x=h.x1+(h.x2-h.x1)*a,l.y=h.y1+(h.y2-h.y1)*a,l};s.exports=d},15258:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2539,27 +2539,27 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Florian Mertens * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=e.x1,h=e.y1,a=e.x2,l=e.y2,n=(a-d)*(a-d)+(l-h)*(l-h);if(n===0)return!1;var u=((h-r.y)*(a-d)-(d-r.x)*(l-h))/n;return Math.abs(u)*Math.sqrt(n)};s.exports=y},98770:s=>{/** + */var x=function(e,r){var d=e.x1,h=e.y1,a=e.x2,l=e.y2,n=(a-d)*(a-d)+(l-h)*(l-h);if(n===0)return!1;var u=((h-r.y)*(a-d)-(d-r.x)*(l-h))/n;return Math.abs(u)*Math.sqrt(n)};s.exports=x},98770:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return Math.abs(e.y1-e.y2)};s.exports=y},35001:s=>{/** + */var x=function(e){return Math.abs(e.y1-e.y2)};s.exports=x},35001:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return Math.sqrt((e.x2-e.x1)*(e.x2-e.x1)+(e.y2-e.y1)*(e.y2-e.y1))};s.exports=y},23031:(s,y,e)=>{/** + */var x=function(e){return Math.sqrt((e.x2-e.x1)*(e.x2-e.x1)+(e.y2-e.y1)*(e.y2-e.y1))};s.exports=x},23031:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(13151),h=e(15258),a=e(23777),l=e(65822),n=e(26099),u=new r({initialize:function(o,c,p,v){o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=0),v===void 0&&(v=0),this.type=a.LINE,this.x1=o,this.y1=c,this.x2=p,this.y2=v},getPoint:function(f,o){return d(this,f,o)},getPoints:function(f,o,c){return h(this,f,o,c)},getRandomPoint:function(f){return l(this,f)},setTo:function(f,o,c,p){return f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=0),this.x1=f,this.y1=o,this.x2=c,this.y2=p,this},setFromObjects:function(f,o){return this.x1=f.x,this.y1=f.y,this.x2=o.x,this.y2=o.y,this},getPointA:function(f){return f===void 0&&(f=new n),f.set(this.x1,this.y1),f},getPointB:function(f){return f===void 0&&(f=new n),f.set(this.x2,this.y2),f},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(f){this.x1<=this.x2?this.x1=f:this.x2=f}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(f){this.x1>this.x2?this.x1=f:this.x2=f}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(f){this.y1<=this.y2?this.y1=f:this.y2=f}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(f){this.y1>this.y2?this.y1=f:this.y2=f}}});s.exports=u},64795:(s,y,e)=>{/** + */var r=e(83419),d=e(13151),h=e(15258),a=e(23777),l=e(65822),n=e(26099),u=new r({initialize:function(o,c,p,v){o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=0),v===void 0&&(v=0),this.type=a.LINE,this.x1=o,this.y1=c,this.x2=p,this.y2=v},getPoint:function(f,o){return d(this,f,o)},getPoints:function(f,o,c){return h(this,f,o,c)},getRandomPoint:function(f){return l(this,f)},setTo:function(f,o,c,p){return f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=0),this.x1=f,this.y1=o,this.x2=c,this.y2=p,this},setFromObjects:function(f,o){return this.x1=f.x,this.y1=f.y,this.x2=o.x,this.y2=o.y,this},getPointA:function(f){return f===void 0&&(f=new n),f.set(this.x1,this.y1),f},getPointB:function(f){return f===void 0&&(f=new n),f.set(this.x2,this.y2),f},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(f){this.x1<=this.x2?this.x1=f:this.x2=f}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(f){this.x1>this.x2?this.x1=f:this.x2=f}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(f){this.y1<=this.y2?this.y1=f:this.y2=f}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(f){this.y1>this.y2?this.y1=f:this.y2=f}}});s.exports=u},64795:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(36383),d=e(15994),h=e(91938),a=function(l){var n=h(l)-r.TAU;return d(n,-Math.PI,Math.PI)};s.exports=a},52616:(s,y,e)=>{/** + */var r=e(36383),d=e(15994),h=e(91938),a=function(l){var n=h(l)-r.TAU;return d(n,-Math.PI,Math.PI)};s.exports=a},52616:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(36383),d=e(91938),h=function(a){return Math.cos(d(a)-r.TAU)};s.exports=h},87231:(s,y,e)=>{/** + */var r=e(36383),d=e(91938),h=function(a){return Math.cos(d(a)-r.TAU)};s.exports=h},87231:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2567,23 +2567,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return e.x1+=r,e.y1+=d,e.x2+=r,e.y2+=d,e};s.exports=y},71165:s=>{/** + */var x=function(e,r,d){return e.x1+=r,e.y1+=d,e.x2+=r,e.y2+=d,e};s.exports=x},71165:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return-((e.x2-e.x1)/(e.y2-e.y1))};s.exports=y},65822:(s,y,e)=>{/** + */var x=function(e){return-((e.x2-e.x1)/(e.y2-e.y1))};s.exports=x},65822:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a){a===void 0&&(a=new r);var l=Math.random();return a.x=h.x1+l*(h.x2-h.x1),a.y=h.y1+l*(h.y2-h.y1),a};s.exports=d},69777:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a){a===void 0&&(a=new r);var l=Math.random();return a.x=h.x1+l*(h.x2-h.x1),a.y=h.y1+l*(h.y2-h.y1),a};s.exports=d},69777:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91938),d=e(64795),h=function(a,l){return 2*d(l)-Math.PI-r(a)};s.exports=h},39706:(s,y,e)=>{/** + */var r=e(91938),d=e(64795),h=function(a,l){return 2*d(l)-Math.PI-r(a)};s.exports=h},39706:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(64400),d=function(h,a){var l=(h.x1+h.x2)/2,n=(h.y1+h.y2)/2;return r(h,l,n,a)};s.exports=d},82585:(s,y,e)=>{/** + */var r=e(64400),d=function(h,a){var l=(h.x1+h.x2)/2,n=(h.y1+h.y2)/2;return r(h,l,n,a)};s.exports=d},82585:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2591,44 +2591,44 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){var a=Math.cos(h),l=Math.sin(h),n=e.x1-r,u=e.y1-d;return e.x1=n*a-u*l+r,e.y1=n*l+u*a+d,n=e.x2-r,u=e.y2-d,e.x2=n*a-u*l+r,e.y2=n*l+u*a+d,e};s.exports=y},62377:s=>{/** + */var x=function(e,r,d,h){var a=Math.cos(h),l=Math.sin(h),n=e.x1-r,u=e.y1-d;return e.x1=n*a-u*l+r,e.y1=n*l+u*a+d,n=e.x2-r,u=e.y2-d,e.x2=n*a-u*l+r,e.y2=n*l+u*a+d,e};s.exports=x},62377:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h,a){return e.x1=r,e.y1=d,e.x2=r+Math.cos(h)*a,e.y2=d+Math.sin(h)*a,e};s.exports=y},71366:s=>{/** + */var x=function(e,r,d,h,a){return e.x1=r,e.y1=d,e.x2=r+Math.cos(h)*a,e.y2=d+Math.sin(h)*a,e};s.exports=x},71366:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return(e.y2-e.y1)/(e.x2-e.x1)};s.exports=y},10809:s=>{/** + */var x=function(e){return(e.y2-e.y1)/(e.x2-e.x1)};s.exports=x},10809:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return Math.abs(e.x1-e.x2)};s.exports=y},2529:(s,y,e)=>{/** + */var x=function(e){return Math.abs(e.x1-e.x2)};s.exports=x},2529:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(23031);r.Angle=e(91938),r.BresenhamPoints=e(84993),r.CenterOn=e(36469),r.Clone=e(31116),r.CopyFrom=e(59944),r.Equals=e(59220),r.Extend=e(78177),r.GetEasedPoints=e(26708),r.GetMidPoint=e(32125),r.GetNearestPoint=e(99569),r.GetNormal=e(34638),r.GetPoint=e(13151),r.GetPoints=e(15258),r.GetShortestDistance=e(26408),r.Height=e(98770),r.Length=e(35001),r.NormalAngle=e(64795),r.NormalX=e(52616),r.NormalY=e(87231),r.Offset=e(89662),r.PerpSlope=e(71165),r.Random=e(65822),r.ReflectAngle=e(69777),r.Rotate=e(39706),r.RotateAroundPoint=e(82585),r.RotateAroundXY=e(64400),r.SetToAngle=e(62377),r.Slope=e(71366),r.Width=e(10809),s.exports=r},83997:(s,y,e)=>{/** + */var r=e(23031);r.Angle=e(91938),r.BresenhamPoints=e(84993),r.CenterOn=e(36469),r.Clone=e(31116),r.CopyFrom=e(59944),r.Equals=e(59220),r.Extend=e(78177),r.GetEasedPoints=e(26708),r.GetMidPoint=e(32125),r.GetNearestPoint=e(99569),r.GetNormal=e(34638),r.GetPoint=e(13151),r.GetPoints=e(15258),r.GetShortestDistance=e(26408),r.Height=e(98770),r.Length=e(35001),r.NormalAngle=e(64795),r.NormalX=e(52616),r.NormalY=e(87231),r.Offset=e(89662),r.PerpSlope=e(71165),r.Random=e(65822),r.ReflectAngle=e(69777),r.Rotate=e(39706),r.RotateAroundPoint=e(82585),r.RotateAroundXY=e(64400),r.SetToAngle=e(62377),r.Slope=e(71366),r.Width=e(10809),s.exports=r},83997:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(87841),h=e(26099);function a(n,u,f,o){var c=n-f,p=u-o,v=c*c+p*p;return Math.sqrt(v)}var l=new r({initialize:function(u,f,o){this.vertex1=u,this.vertex2=f,this.vertex3=o,this.bounds=new d,this._inCenter=new h},getInCenter:function(n){n===void 0&&(n=!0);var u=this.vertex1,f=this.vertex2,o=this.vertex3,c,p,v,m,S,M;n?(c=u.x,p=u.y,v=f.x,m=f.y,S=o.x,M=o.y):(c=u.vx,p=u.vy,v=f.vx,m=f.vy,S=o.vx,M=o.vy);var w=a(S,M,v,m),C=a(c,p,S,M),A=a(v,m,c,p),P=w+C+A;return this._inCenter.set((c*w+v*C+S*A)/P,(p*w+m*C+M*A)/P)},contains:function(n,u,f){var o=this.vertex1,c=this.vertex2,p=this.vertex3,v=o.vx,m=o.vy,S=c.vx,M=c.vy,w=p.vx,C=p.vy;if(f){var A=f.a,P=f.b,b=f.c,O=f.d,I=f.e,D=f.f;v=o.vx*A+o.vy*b+I,m=o.vx*P+o.vy*O+D,S=c.vx*A+c.vy*b+I,M=c.vx*P+c.vy*O+D,w=p.vx*A+p.vy*b+I,C=p.vx*P+p.vy*O+D}var B=w-v,G=C-m,z=S-v,X=M-m,j=n-v,Q=u-m,tt=B*B+G*G,Y=B*z+G*X,Z=B*j+G*Q,U=z*z+X*X,H=z*j+X*Q,$=tt*U-Y*Y,_=$===0?0:1/$,q=(U*Z-Y*H)*_,at=(tt*H-Y*Z)*_;return q>=0&&at>=0&&q+at<1},isCounterClockwise:function(n){var u=this.vertex1,f=this.vertex2,o=this.vertex3,c=(f.vx-u.vx)*(o.vy-u.vy)-(f.vy-u.vy)*(o.vx-u.vx);return n<=0?c>=0:c<0},load:function(n,u,f,o,c){return f=this.vertex1.load(n,u,f,o,c),f=this.vertex2.load(n,u,f,o,c),f=this.vertex3.load(n,u,f,o,c),f},transformCoordinatesLocal:function(n,u,f,o){return this.vertex1.transformCoordinatesLocal(n,u,f,o),this.vertex2.transformCoordinatesLocal(n,u,f,o),this.vertex3.transformCoordinatesLocal(n,u,f,o),this},updateBounds:function(){var n=this.vertex1,u=this.vertex2,f=this.vertex3,o=this.bounds;return o.x=Math.min(n.vx,u.vx,f.vx),o.y=Math.min(n.vy,u.vy,f.vy),o.width=Math.max(n.vx,u.vx,f.vx)-o.x,o.height=Math.max(n.vy,u.vy,f.vy)-o.y,this},isInView:function(n,u,f,o,c,p,v,m,S,M,w){this.update(o,c,p,v,m,S,M,w);var C=this.vertex1,A=this.vertex2,P=this.vertex3;if(C.ta<=0&&A.ta<=0&&P.ta<=0||u&&!this.isCounterClockwise(f))return!1;var b=this.bounds;b.x=Math.min(C.tx,A.tx,P.tx),b.y=Math.min(C.ty,A.ty,P.ty),b.width=Math.max(C.tx,A.tx,P.tx)-b.x,b.height=Math.max(C.ty,A.ty,P.ty)-b.y;var O=n.x+n.width,I=n.y+n.height;return b.width<=0||b.height<=0||n.width<=0||n.height<=0?!1:!(b.rightO||b.y>I)},scrollUV:function(n,u){return this.vertex1.scrollUV(n,u),this.vertex2.scrollUV(n,u),this.vertex3.scrollUV(n,u),this},scaleUV:function(n,u){return this.vertex1.scaleUV(n,u),this.vertex2.scaleUV(n,u),this.vertex3.scaleUV(n,u),this},setColor:function(n){return this.vertex1.color=n,this.vertex2.color=n,this.vertex3.color=n,this},update:function(n,u,f,o,c,p,v,m){return this.vertex1.update(u,f,o,c,p,v,m,n),this.vertex2.update(u,f,o,c,p,v,m,n),this.vertex3.update(u,f,o,c,p,v,m,n),this},translate:function(n,u){u===void 0&&(u=0);var f=this.vertex1,o=this.vertex2,c=this.vertex3;return f.x+=n,f.y+=u,o.x+=n,o.y+=u,c.x+=n,c.y+=u,this},x:{get:function(){return this.getInCenter().x},set:function(n){var u=this.getInCenter();this.translate(n-u.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(n){var u=this.getInCenter();this.translate(0,n-u.y)}},alpha:{get:function(){var n=this.vertex1,u=this.vertex2,f=this.vertex3;return(n.alpha+u.alpha+f.alpha)/3},set:function(n){this.vertex1.alpha=n,this.vertex2.alpha=n,this.vertex3.alpha=n}},depth:{get:function(){var n=this.vertex1,u=this.vertex2,f=this.vertex3;return(n.vz+u.vz+f.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});s.exports=l},48803:(s,y,e)=>{/** + */var r=e(83419),d=e(87841),h=e(26099);function a(n,u,f,o){var c=n-f,p=u-o,v=c*c+p*p;return Math.sqrt(v)}var l=new r({initialize:function(u,f,o){this.vertex1=u,this.vertex2=f,this.vertex3=o,this.bounds=new d,this._inCenter=new h},getInCenter:function(n){n===void 0&&(n=!0);var u=this.vertex1,f=this.vertex2,o=this.vertex3,c,p,v,m,S,M;n?(c=u.x,p=u.y,v=f.x,m=f.y,S=o.x,M=o.y):(c=u.vx,p=u.vy,v=f.vx,m=f.vy,S=o.vx,M=o.vy);var w=a(S,M,v,m),C=a(c,p,S,M),A=a(v,m,c,p),P=w+C+A;return this._inCenter.set((c*w+v*C+S*A)/P,(p*w+m*C+M*A)/P)},contains:function(n,u,f){var o=this.vertex1,c=this.vertex2,p=this.vertex3,v=o.vx,m=o.vy,S=c.vx,M=c.vy,w=p.vx,C=p.vy;if(f){var A=f.a,P=f.b,b=f.c,O=f.d,I=f.e,D=f.f;v=o.vx*A+o.vy*b+I,m=o.vx*P+o.vy*O+D,S=c.vx*A+c.vy*b+I,M=c.vx*P+c.vy*O+D,w=p.vx*A+p.vy*b+I,C=p.vx*P+p.vy*O+D}var B=w-v,G=C-m,z=S-v,X=M-m,j=n-v,Q=u-m,tt=B*B+G*G,Y=B*z+G*X,$=B*j+G*Q,U=z*z+X*X,H=z*j+X*Q,Z=tt*U-Y*Y,_=Z===0?0:1/Z,q=(U*$-Y*H)*_,at=(tt*H-Y*$)*_;return q>=0&&at>=0&&q+at<1},isCounterClockwise:function(n){var u=this.vertex1,f=this.vertex2,o=this.vertex3,c=(f.vx-u.vx)*(o.vy-u.vy)-(f.vy-u.vy)*(o.vx-u.vx);return n<=0?c>=0:c<0},load:function(n,u,f,o,c){return f=this.vertex1.load(n,u,f,o,c),f=this.vertex2.load(n,u,f,o,c),f=this.vertex3.load(n,u,f,o,c),f},transformCoordinatesLocal:function(n,u,f,o){return this.vertex1.transformCoordinatesLocal(n,u,f,o),this.vertex2.transformCoordinatesLocal(n,u,f,o),this.vertex3.transformCoordinatesLocal(n,u,f,o),this},updateBounds:function(){var n=this.vertex1,u=this.vertex2,f=this.vertex3,o=this.bounds;return o.x=Math.min(n.vx,u.vx,f.vx),o.y=Math.min(n.vy,u.vy,f.vy),o.width=Math.max(n.vx,u.vx,f.vx)-o.x,o.height=Math.max(n.vy,u.vy,f.vy)-o.y,this},isInView:function(n,u,f,o,c,p,v,m,S,M,w){this.update(o,c,p,v,m,S,M,w);var C=this.vertex1,A=this.vertex2,P=this.vertex3;if(C.ta<=0&&A.ta<=0&&P.ta<=0||u&&!this.isCounterClockwise(f))return!1;var b=this.bounds;b.x=Math.min(C.tx,A.tx,P.tx),b.y=Math.min(C.ty,A.ty,P.ty),b.width=Math.max(C.tx,A.tx,P.tx)-b.x,b.height=Math.max(C.ty,A.ty,P.ty)-b.y;var O=n.x+n.width,I=n.y+n.height;return b.width<=0||b.height<=0||n.width<=0||n.height<=0?!1:!(b.rightO||b.y>I)},scrollUV:function(n,u){return this.vertex1.scrollUV(n,u),this.vertex2.scrollUV(n,u),this.vertex3.scrollUV(n,u),this},scaleUV:function(n,u){return this.vertex1.scaleUV(n,u),this.vertex2.scaleUV(n,u),this.vertex3.scaleUV(n,u),this},setColor:function(n){return this.vertex1.color=n,this.vertex2.color=n,this.vertex3.color=n,this},update:function(n,u,f,o,c,p,v,m){return this.vertex1.update(u,f,o,c,p,v,m,n),this.vertex2.update(u,f,o,c,p,v,m,n),this.vertex3.update(u,f,o,c,p,v,m,n),this},translate:function(n,u){u===void 0&&(u=0);var f=this.vertex1,o=this.vertex2,c=this.vertex3;return f.x+=n,f.y+=u,o.x+=n,o.y+=u,c.x+=n,c.y+=u,this},x:{get:function(){return this.getInCenter().x},set:function(n){var u=this.getInCenter();this.translate(n-u.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(n){var u=this.getInCenter();this.translate(0,n-u.y)}},alpha:{get:function(){var n=this.vertex1,u=this.vertex2,f=this.vertex3;return(n.alpha+u.alpha+f.alpha)/3},set:function(n){this.vertex1.alpha=n,this.vertex2.alpha=n,this.vertex3.alpha=n}},depth:{get:function(){var n=this.vertex1,u=this.vertex2,f=this.vertex3;return(n.vz+u.vz+f.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});s.exports=l},48803:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83997),d=e(95540),h=e(37867),a=e(25836),l=e(39318),n=new a,u=new a,f=new h,o=function(c){var p=d(c,"mesh"),v=d(c,"texture",null),m=d(c,"frame"),S=d(c,"width",1),M=d(c,"height",S),w=d(c,"widthSegments",1),C=d(c,"heightSegments",w),A=d(c,"x",0),P=d(c,"y",0),b=d(c,"z",0),O=d(c,"rotateX",0),I=d(c,"rotateY",0),D=d(c,"rotateZ",0),B=d(c,"zIsUp",!0),G=d(c,"isOrtho",p?p.dirtyCache[11]:!1),z=d(c,"colors",[16777215]),X=d(c,"alphas",[1]),j=d(c,"tile",!1),Q=d(c,"flipY",!1),tt=d(c,"width",null),Y={faces:[],verts:[]};n.set(A,P,b),u.set(O,I,D),f.fromRotationXYTranslation(u,n,B);var Z;if(!v&&p)v=p.texture,m||(Z=p.frame);else if(p&&typeof v=="string")v=p.scene.sys.textures.get(v);else if(!v)return Y;Z||(Z=v.get(m)),!tt&&G&&v&&p&&(S=Z.width/p.height,M=Z.height/p.height);var U=S/2,H=M/2,$=Math.floor(w),_=Math.floor(C),q=$+1,at=_+1,ot=S/$,rt=M/_,gt=[],yt=[],Et,At,Pt=0,Vt=1,dt=0,ut=1;Z&&(Pt=Z.u0,Vt=Z.u1,Q?(dt=Z.v1,ut=Z.v0):(dt=Z.v0,ut=Z.v1));var Rt=Vt-Pt,Dt=ut-dt;for(At=0;At{/** + */var r=e(83997),d=e(95540),h=e(37867),a=e(25836),l=e(39318),n=new a,u=new a,f=new h,o=function(c){var p=d(c,"mesh"),v=d(c,"texture",null),m=d(c,"frame"),S=d(c,"width",1),M=d(c,"height",S),w=d(c,"widthSegments",1),C=d(c,"heightSegments",w),A=d(c,"x",0),P=d(c,"y",0),b=d(c,"z",0),O=d(c,"rotateX",0),I=d(c,"rotateY",0),D=d(c,"rotateZ",0),B=d(c,"zIsUp",!0),G=d(c,"isOrtho",p?p.dirtyCache[11]:!1),z=d(c,"colors",[16777215]),X=d(c,"alphas",[1]),j=d(c,"tile",!1),Q=d(c,"flipY",!1),tt=d(c,"width",null),Y={faces:[],verts:[]};n.set(A,P,b),u.set(O,I,D),f.fromRotationXYTranslation(u,n,B);var $;if(!v&&p)v=p.texture,m||($=p.frame);else if(p&&typeof v=="string")v=p.scene.sys.textures.get(v);else if(!v)return Y;$||($=v.get(m)),!tt&&G&&v&&p&&(S=$.width/p.height,M=$.height/p.height);var U=S/2,H=M/2,Z=Math.floor(w),_=Math.floor(C),q=Z+1,at=_+1,ot=S/Z,rt=M/_,gt=[],yt=[],Et,At,Pt=0,Vt=1,dt=0,ut=1;$&&(Pt=$.u0,Vt=$.u1,Q?(dt=$.v1,ut=$.v0):(dt=$.v0,ut=$.v1));var Rt=Vt-Pt,Dt=ut-dt;for(At=0;At{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83997),d=e(37867),h=e(25836),a=e(39318),l=new h,n=new h,u=new d,f=function(o,c,p,v,m,S,M,w,C,A){p===void 0&&(p=1),v===void 0&&(v=0),m===void 0&&(m=0),S===void 0&&(S=0),M===void 0&&(M=0),w===void 0&&(w=0),C===void 0&&(C=0),A===void 0&&(A=!0);var P={faces:[],verts:[]},b=o.materials;l.set(v,m,S),n.set(M,w,C),u.fromRotationXYTranslation(n,l,A);for(var O=0;O{/** + */var r=e(83997),d=e(37867),h=e(25836),a=e(39318),l=new h,n=new h,u=new d,f=function(o,c,p,v,m,S,M,w,C,A){p===void 0&&(p=1),v===void 0&&(v=0),m===void 0&&(m=0),S===void 0&&(S=0),M===void 0&&(M=0),w===void 0&&(w=0),C===void 0&&(C=0),A===void 0&&(A=!0);var P={faces:[],verts:[]},b=o.materials;l.set(v,m,S),n.set(M,w,C),u.fromRotationXYTranslation(n,l,A);for(var O=0;O{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83997),d=e(39318),h=function(a,l,n,u,f,o,c,p){if(u===void 0&&(u=!1),o===void 0&&(o=16777215),c===void 0&&(c=1),p===void 0&&(p=!1),a.length!==l.length&&!u){console.warn("GenerateVerts: vertices and uvs count not equal");return}var v={faces:[],vertices:[]},m,S,M,w,C,A,P,b,O,I,D,B=u?3:2,G=Array.isArray(o),z=Array.isArray(c);if(Array.isArray(n)&&n.length>0)for(m=0;m{/** + */var r=e(83997),d=e(39318),h=function(a,l,n,u,f,o,c,p){if(u===void 0&&(u=!1),o===void 0&&(o=16777215),c===void 0&&(c=1),p===void 0&&(p=!1),a.length!==l.length&&!u){console.warn("GenerateVerts: vertices and uvs count not equal");return}var v={faces:[],vertices:[]},m,S,M,w,C,A,P,b,O,I,D,B=u?3:2,G=Array.isArray(o),z=Array.isArray(c);if(Array.isArray(n)&&n.length>0)for(m=0;m{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=!0,e="untitled",r="",d="";function h(S){var M=S.indexOf("#");return M>-1?S.substring(0,M):S}function a(S){return S.models.length===0&&S.models.push({faces:[],name:e,textureCoords:[],vertexNormals:[],vertices:[]}),r="",S.models[S.models.length-1]}function l(S,M){var w=S.length>=2?S[1]:e;M.models.push({faces:[],name:w,textureCoords:[],vertexNormals:[],vertices:[]}),r=""}function n(S){S.length===2&&(r=S[1])}function u(S,M){var w=S.length,C=w>=2?parseFloat(S[1]):0,A=w>=3?parseFloat(S[2]):0,P=w>=4?parseFloat(S[3]):0;a(M).vertices.push({x:C,y:A,z:P})}function f(S,M){var w=S.length,C=w>=2?parseFloat(S[1]):0,A=w>=3?parseFloat(S[2]):0,P=w>=4?parseFloat(S[3]):0;isNaN(C)&&(C=0),isNaN(A)&&(A=0),isNaN(P)&&(P=0),y&&(A=1-A),a(M).textureCoords.push({u:C,v:A,w:P})}function o(S,M){var w=S.length,C=w>=2?parseFloat(S[1]):0,A=w>=3?parseFloat(S[2]):0,P=w>=4?parseFloat(S[3]):0;a(M).vertexNormals.push({x:C,y:A,z:P})}function c(S,M){var w=S.length-1;if(!(w<3)){for(var C={group:r,material:d,vertices:[]},A=0;A3)){var I=0,D=0,B=0;I=parseInt(b[0],10),O>1&&b[1]!==""&&(D=parseInt(b[1],10)),O>2&&(B=parseInt(b[2],10)),I!==0&&(I<0&&(I=a(M).vertices.length+1+I),D-=1,I-=1,B-=1,C.vertices.push({textureCoordsIndex:D,vertexIndex:I,vertexNormalIndex:B}))}}a(M).faces.push(C)}}function p(S,M){S.length>=2&&M.materialLibraries.push(S[1])}function v(S){S.length>=2&&(d=S[1])}var m=function(S,M){M===void 0&&(M=!0),y=M;var w={materials:{},materialLibraries:[],models:[]};r="",d="";for(var C=S.split(` -`),A=0;A{/** + */var x=!0,e="untitled",r="",d="";function h(S){var M=S.indexOf("#");return M>-1?S.substring(0,M):S}function a(S){return S.models.length===0&&S.models.push({faces:[],name:e,textureCoords:[],vertexNormals:[],vertices:[]}),r="",S.models[S.models.length-1]}function l(S,M){var w=S.length>=2?S[1]:e;M.models.push({faces:[],name:w,textureCoords:[],vertexNormals:[],vertices:[]}),r=""}function n(S){S.length===2&&(r=S[1])}function u(S,M){var w=S.length,C=w>=2?parseFloat(S[1]):0,A=w>=3?parseFloat(S[2]):0,P=w>=4?parseFloat(S[3]):0;a(M).vertices.push({x:C,y:A,z:P})}function f(S,M){var w=S.length,C=w>=2?parseFloat(S[1]):0,A=w>=3?parseFloat(S[2]):0,P=w>=4?parseFloat(S[3]):0;isNaN(C)&&(C=0),isNaN(A)&&(A=0),isNaN(P)&&(P=0),x&&(A=1-A),a(M).textureCoords.push({u:C,v:A,w:P})}function o(S,M){var w=S.length,C=w>=2?parseFloat(S[1]):0,A=w>=3?parseFloat(S[2]):0,P=w>=4?parseFloat(S[3]):0;a(M).vertexNormals.push({x:C,y:A,z:P})}function c(S,M){var w=S.length-1;if(!(w<3)){for(var C={group:r,material:d,vertices:[]},A=0;A3)){var I=0,D=0,B=0;I=parseInt(b[0],10),O>1&&b[1]!==""&&(D=parseInt(b[1],10)),O>2&&(B=parseInt(b[2],10)),I!==0&&(I<0&&(I=a(M).vertices.length+1+I),D-=1,I-=1,B-=1,C.vertices.push({textureCoordsIndex:D,vertexIndex:I,vertexNormalIndex:B}))}}a(M).faces.push(C)}}function p(S,M){S.length>=2&&M.materialLibraries.push(S[1])}function v(S){S.length>=2&&(d=S[1])}var m=function(S,M){M===void 0&&(M=!0),x=M;var w={materials:{},materialLibraries:[],models:[]};r="",d="";for(var C=S.split(` +`),A=0;A{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2637,11 +2637,11 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){var a,l;if(d===void 0&&h===void 0){var n=e.getInCenter();a=n.x,l=n.y}var u=Math.cos(r),f=Math.sin(r),o=e.vertex1,c=e.vertex2,p=e.vertex3,v=o.x-a,m=o.y-l;o.set(v*u-m*f+a,v*f+m*u+l),v=c.x-a,m=c.y-l,c.set(v*u-m*f+a,v*f+m*u+l),v=p.x-a,m=p.y-l,p.set(v*u-m*f+a,v*f+m*u+l)};s.exports=y},39318:(s,y,e)=>{/** + */var x=function(e,r,d,h){var a,l;if(d===void 0&&h===void 0){var n=e.getInCenter();a=n.x,l=n.y}var u=Math.cos(r),f=Math.sin(r),o=e.vertex1,c=e.vertex2,p=e.vertex3,v=o.x-a,m=o.y-l;o.set(v*u-m*f+a,v*f+m*u+l),v=c.x-a,m=c.y-l,c.set(v*u-m*f+a,v*f+m*u+l),v=p.x-a,m=p.y-l,p.set(v*u-m*f+a,v*f+m*u+l)};s.exports=x},39318:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(70554),h=e(25836),a=new r({Extends:h,initialize:function(n,u,f,o,c,p,v,m,S,M){p===void 0&&(p=16777215),v===void 0&&(v=1),m===void 0&&(m=0),S===void 0&&(S=0),M===void 0&&(M=0),h.call(this,n,u,f),this.vx=0,this.vy=0,this.vz=0,this.nx=m,this.ny=S,this.nz=M,this.u=o,this.v=c,this.color=p,this.alpha=v,this.tx=0,this.ty=0,this.ta=0,this.tu=o,this.tv=c},setUVs:function(l,n){return this.u=l,this.v=n,this.tu=l,this.tv=n,this},scrollUV:function(l,n){return this.tu+=l,this.tv+=n,this},scaleUV:function(l,n){return this.tu=this.u*l,this.tv=this.v*n,this},transformCoordinatesLocal:function(l,n,u,f){var o=this.x,c=this.y,p=this.z,v=l.val,m=o*v[0]+c*v[4]+p*v[8]+v[12],S=o*v[1]+c*v[5]+p*v[9]+v[13],M=o*v[2]+c*v[6]+p*v[10]+v[14],w=o*v[3]+c*v[7]+p*v[11]+v[15];this.vx=m/w*n,this.vy=-(S/w)*u,f<=0?this.vz=M/w:this.vz=-(M/w)},resize:function(l,n,u,f,o,c){return this.x=l,this.y=n,this.vx=this.x*u,this.vy=-this.y*f,this.vz=0,o<.5?this.vx+=u*(.5-o):o>.5&&(this.vx-=u*(o-.5)),c<.5?this.vy+=f*(.5-c):c>.5&&(this.vy-=f*(c-.5)),this},update:function(l,n,u,f,o,c,p,v){var m=this.vx*l+this.vy*u+o,S=this.vx*n+this.vy*f+c;return p&&(m=Math.round(m),S=Math.round(S)),this.tx=m,this.ty=S,this.ta=this.alpha*v,this},load:function(l,n,u,f,o){return l[++u]=this.tx,l[++u]=this.ty,l[++u]=this.tu,l[++u]=this.tv,l[++u]=f,l[++u]=o,n[++u]=d.getTintAppendFloatAlpha(this.color,this.ta),u}});s.exports=a},73090:(s,y,e)=>{/** + */var r=e(83419),d=e(70554),h=e(25836),a=new r({Extends:h,initialize:function(n,u,f,o,c,p,v,m,S,M){p===void 0&&(p=16777215),v===void 0&&(v=1),m===void 0&&(m=0),S===void 0&&(S=0),M===void 0&&(M=0),h.call(this,n,u,f),this.vx=0,this.vy=0,this.vz=0,this.nx=m,this.ny=S,this.nz=M,this.u=o,this.v=c,this.color=p,this.alpha=v,this.tx=0,this.ty=0,this.ta=0,this.tu=o,this.tv=c},setUVs:function(l,n){return this.u=l,this.v=n,this.tu=l,this.tv=n,this},scrollUV:function(l,n){return this.tu+=l,this.tv+=n,this},scaleUV:function(l,n){return this.tu=this.u*l,this.tv=this.v*n,this},transformCoordinatesLocal:function(l,n,u,f){var o=this.x,c=this.y,p=this.z,v=l.val,m=o*v[0]+c*v[4]+p*v[8]+v[12],S=o*v[1]+c*v[5]+p*v[9]+v[13],M=o*v[2]+c*v[6]+p*v[10]+v[14],w=o*v[3]+c*v[7]+p*v[11]+v[15];this.vx=m/w*n,this.vy=-(S/w)*u,f<=0?this.vz=M/w:this.vz=-(M/w)},resize:function(l,n,u,f,o,c){return this.x=l,this.y=n,this.vx=this.x*u,this.vy=-this.y*f,this.vz=0,o<.5?this.vx+=u*(.5-o):o>.5&&(this.vx-=u*(o-.5)),c<.5?this.vy+=f*(.5-c):c>.5&&(this.vy-=f*(c-.5)),this},update:function(l,n,u,f,o,c,p,v){var m=this.vx*l+this.vy*u+o,S=this.vx*n+this.vy*f+c;return p&&(m=Math.round(m),S=Math.round(S)),this.tx=m,this.ty=S,this.ta=this.alpha*v,this},load:function(l,n,u,f,o){return l[++u]=this.tx,l[++u]=this.ty,l[++u]=this.tu,l[++u]=this.tv,l[++u]=f,l[++u]=o,n[++u]=d.getTintAppendFloatAlpha(this.color,this.ta),u}});s.exports=a},73090:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2649,7 +2649,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.setTo(Math.ceil(e.x),Math.ceil(e.y))};s.exports=y},99706:(s,y,e)=>{/** + */var x=function(e){return e.setTo(Math.ceil(e.x),Math.ceil(e.y))};s.exports=x},99706:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2657,15 +2657,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r.setTo(e.x,e.y)};s.exports=y},27814:s=>{/** + */var x=function(e,r){return r.setTo(e.x,e.y)};s.exports=x},27814:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.x===r.x&&e.y===r.y};s.exports=y},73565:s=>{/** + */var x=function(e,r){return e.x===r.x&&e.y===r.y};s.exports=x},73565:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.setTo(Math.floor(e.x),Math.floor(e.y))};s.exports=y},87555:(s,y,e)=>{/** + */var x=function(e){return e.setTo(Math.floor(e.x),Math.floor(e.y))};s.exports=x},87555:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2673,15 +2673,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)};s.exports=y},44405:s=>{/** + */var x=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)};s.exports=x},44405:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.x*e.x+e.y*e.y};s.exports=y},20873:(s,y,e)=>{/** + */var x=function(e){return e.x*e.x+e.y*e.y};s.exports=x},20873:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(87841),d=function(h,a){a===void 0&&(a=new r);for(var l=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,f=Number.POSITIVE_INFINITY,o=0;ol&&(l=c.x),c.xu&&(u=c.y),c.y{/** + */var r=e(87841),d=function(h,a){a===void 0&&(a=new r);for(var l=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,f=Number.POSITIVE_INFINITY,o=0;ol&&(l=c.x),c.xu&&(u=c.y),c.y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2689,31 +2689,31 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.setTo(e.y,e.x)};s.exports=y},79432:(s,y,e)=>{/** + */var x=function(e){return e.setTo(e.y,e.x)};s.exports=x},79432:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a){return a===void 0&&(a=new r),a.setTo(-h.x,-h.y)};s.exports=d},2141:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a){return a===void 0&&(a=new r),a.setTo(-h.x,-h.y)};s.exports=d},2141:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23777),h=new r({initialize:function(l,n){l===void 0&&(l=0),n===void 0&&(n=l),this.type=d.POINT,this.x=l,this.y=n},setTo:function(a,l){return a===void 0&&(a=0),l===void 0&&(l=a),this.x=a,this.y=l,this}});s.exports=h},72930:(s,y,e)=>{/** + */var r=e(83419),d=e(23777),h=new r({initialize:function(l,n){l===void 0&&(l=0),n===void 0&&(n=l),this.type=d.POINT,this.x=l,this.y=n},setTo:function(a,l){return a===void 0&&(a=0),l===void 0&&(l=a),this.x=a,this.y=l,this}});s.exports=h},72930:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=e(44405),h=function(a,l,n){n===void 0&&(n=new r);var u=a.x*l.x+a.y*l.y,f=u/d(l);return f!==0&&(n.x=f*l.x,n.y=f*l.y),n};s.exports=h},62880:(s,y,e)=>{/** + */var r=e(2141),d=e(44405),h=function(a,l,n){n===void 0&&(n=new r);var u=a.x*l.x+a.y*l.y,f=u/d(l);return f!==0&&(n.x=f*l.x,n.y=f*l.y),n};s.exports=h},62880:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a,l){l===void 0&&(l=new r);var n=h.x*a.x+h.y*a.y;return n!==0&&(l.x=n*a.x,l.y=n*a.y),l};s.exports=d},15093:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a,l){l===void 0&&(l=new r);var n=h.x*a.x+h.y*a.y;return n!==0&&(l.x=n*a.x,l.y=n*a.y),l};s.exports=d},15093:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(28793),d=function(h,a){if(h.x!==0||h.y!==0){var l=r(h);h.x/=l,h.y/=l}return h.x*=a,h.y*=a,h};s.exports=d},43711:(s,y,e)=>{/** + */var r=e(28793),d=function(h,a){if(h.x!==0||h.y!==0){var l=r(h);h.x/=l,h.y/=l}return h.x*=a,h.y*=a,h};s.exports=d},43711:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141);r.Ceil=e(96550),r.Clone=e(99706),r.CopyFrom=e(68010),r.Equals=e(27814),r.Floor=e(73565),r.GetCentroid=e(87555),r.GetMagnitude=e(28793),r.GetMagnitudeSq=e(44405),r.GetRectangleFromPoints=e(20873),r.Interpolate=e(26152),r.Invert=e(55767),r.Negative=e(79432),r.Project=e(72930),r.ProjectUnit=e(62880),r.SetMagnitude=e(15093),s.exports=r},12306:(s,y,e)=>{/** + */var r=e(2141);r.Ceil=e(96550),r.Clone=e(99706),r.CopyFrom=e(68010),r.Equals=e(27814),r.Floor=e(73565),r.GetCentroid=e(87555),r.GetMagnitude=e(28793),r.GetMagnitudeSq=e(44405),r.GetRectangleFromPoints=e(20873),r.Interpolate=e(26152),r.Invert=e(55767),r.Negative=e(79432),r.Project=e(72930),r.ProjectUnit=e(62880),r.SetMagnitude=e(15093),s.exports=r},12306:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2721,7 +2721,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){for(var h=!1,a=-1,l=e.points.length-1;++a{/** + */var x=function(e,r,d){for(var h=!1,a=-1,l=e.points.length-1;++a{/** * @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 Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function y(Y,Z,U){U=U||2;var H=Z&&Z.length,$=H?Z[0]*U:Y.length,_=e(Y,0,$,U,!0),q=[];if(!_||_.next===_.prev)return q;var at,ot,rt,gt,yt,Et,At;if(H&&(_=u(Y,Z,_,U)),Y.length>80*U){at=rt=Y[0],ot=gt=Y[1];for(var Pt=U;Pt<$;Pt+=U)yt=Y[Pt],Et=Y[Pt+1],ytrt&&(rt=yt),Et>gt&&(gt=Et);At=Math.max(rt-at,gt-ot),At=At!==0?32767/At:0}return d(_,q,U,at,ot,At,0),q}function e(Y,Z,U,H,$){var _,q;if($===tt(Y,Z,U,H)>0)for(_=Z;_=Z;_-=H)q=X(_,Y[_],Y[_+1],q);return q&&P(q,q.next)&&(j(q),q=q.next),q}function r(Y,Z){if(!Y)return Y;Z||(Z=Y);var U=Y,H;do if(H=!1,!U.steiner&&(P(U,U.next)||A(U.prev,U,U.next)===0)){if(j(U),U=Z=U.prev,U===U.next)break;H=!0}else U=U.next;while(H||U!==Z);return Z}function d(Y,Z,U,H,$,_,q){if(Y){!q&&_&&v(Y,H,$,_);for(var at=Y,ot,rt;Y.prev!==Y.next;){if(ot=Y.prev,rt=Y.next,_?a(Y,H,$,_):h(Y)){Z.push(ot.i/U|0),Z.push(Y.i/U|0),Z.push(rt.i/U|0),j(Y),Y=rt.next,at=rt.next;continue}if(Y=rt,Y===at){q?q===1?(Y=l(r(Y),Z,U),d(Y,Z,U,H,$,_,2)):q===2&&n(Y,Z,U,H,$,_):d(r(Y),Z,U,H,$,_,1);break}}}}function h(Y){var Z=Y.prev,U=Y,H=Y.next;if(A(Z,U,H)>=0)return!1;for(var $=Z.x,_=U.x,q=H.x,at=Z.y,ot=U.y,rt=H.y,gt=$<_?$_?$>q?$:q:_>q?_:q,At=at>ot?at>rt?at:rt:ot>rt?ot:rt,Pt=H.next;Pt!==Z;){if(Pt.x>=gt&&Pt.x<=Et&&Pt.y>=yt&&Pt.y<=At&&w($,at,_,ot,q,rt,Pt.x,Pt.y)&&A(Pt.prev,Pt,Pt.next)>=0)return!1;Pt=Pt.next}return!0}function a(Y,Z,U,H){var $=Y.prev,_=Y,q=Y.next;if(A($,_,q)>=0)return!1;for(var at=$.x,ot=_.x,rt=q.x,gt=$.y,yt=_.y,Et=q.y,At=atot?at>rt?at:rt:ot>rt?ot:rt,dt=gt>yt?gt>Et?gt:Et:yt>Et?yt:Et,ut=S(At,Pt,Z,U,H),Rt=S(Vt,dt,Z,U,H),Dt=Y.prevZ,Ht=Y.nextZ;Dt&&Dt.z>=ut&&Ht&&Ht.z<=Rt;){if(Dt.x>=At&&Dt.x<=Vt&&Dt.y>=Pt&&Dt.y<=dt&&Dt!==$&&Dt!==q&&w(at,gt,ot,yt,rt,Et,Dt.x,Dt.y)&&A(Dt.prev,Dt,Dt.next)>=0||(Dt=Dt.prevZ,Ht.x>=At&&Ht.x<=Vt&&Ht.y>=Pt&&Ht.y<=dt&&Ht!==$&&Ht!==q&&w(at,gt,ot,yt,rt,Et,Ht.x,Ht.y)&&A(Ht.prev,Ht,Ht.next)>=0))return!1;Ht=Ht.nextZ}for(;Dt&&Dt.z>=ut;){if(Dt.x>=At&&Dt.x<=Vt&&Dt.y>=Pt&&Dt.y<=dt&&Dt!==$&&Dt!==q&&w(at,gt,ot,yt,rt,Et,Dt.x,Dt.y)&&A(Dt.prev,Dt,Dt.next)>=0)return!1;Dt=Dt.prevZ}for(;Ht&&Ht.z<=Rt;){if(Ht.x>=At&&Ht.x<=Vt&&Ht.y>=Pt&&Ht.y<=dt&&Ht!==$&&Ht!==q&&w(at,gt,ot,yt,rt,Et,Ht.x,Ht.y)&&A(Ht.prev,Ht,Ht.next)>=0)return!1;Ht=Ht.nextZ}return!0}function l(Y,Z,U){var H=Y;do{var $=H.prev,_=H.next.next;!P($,_)&&b($,H,H.next,_)&&B($,_)&&B(_,$)&&(Z.push($.i/U|0),Z.push(H.i/U|0),Z.push(_.i/U|0),j(H),j(H.next),H=Y=_),H=H.next}while(H!==Y);return r(H)}function n(Y,Z,U,H,$,_){var q=Y;do{for(var at=q.next.next;at!==q.prev;){if(q.i!==at.i&&C(q,at)){var ot=z(q,at);q=r(q,q.next),ot=r(ot,ot.next),d(q,Z,U,H,$,_,0),d(ot,Z,U,H,$,_,0);return}at=at.next}q=q.next}while(q!==Y)}function u(Y,Z,U,H){var $=[],_,q,at,ot,rt;for(_=0,q=Z.length;_=U.next.y&&U.next.y!==U.y){var at=U.x+($-U.y)*(U.next.x-U.x)/(U.next.y-U.y);if(at<=H&&at>_&&(_=at,q=U.x=U.x&&U.x>=rt&&H!==U.x&&w($q.x||U.x===q.x&&p(q,U)))&&(q=U,yt=Et)),U=U.next;while(U!==ot);return q}function p(Y,Z){return A(Y.prev,Y,Z.prev)<0&&A(Z.next,Y,Y.next)<0}function v(Y,Z,U,H){var $=Y;do $.z===0&&($.z=S($.x,$.y,Z,U,H)),$.prevZ=$.prev,$.nextZ=$.next,$=$.next;while($!==Y);$.prevZ.nextZ=null,$.prevZ=null,m($)}function m(Y){var Z,U,H,$,_,q,at,ot,rt=1;do{for(U=Y,Y=null,_=null,q=0;U;){for(q++,H=U,at=0,Z=0;Z0||ot>0&&H;)at!==0&&(ot===0||!H||U.z<=H.z)?($=U,U=U.nextZ,at--):($=H,H=H.nextZ,ot--),_?_.nextZ=$:Y=$,$.prevZ=_,_=$;U=H}_.nextZ=null,rt*=2}while(q>1);return Y}function S(Y,Z,U,H,$){return Y=(Y-U)*$|0,Z=(Z-H)*$|0,Y=(Y|Y<<8)&16711935,Y=(Y|Y<<4)&252645135,Y=(Y|Y<<2)&858993459,Y=(Y|Y<<1)&1431655765,Z=(Z|Z<<8)&16711935,Z=(Z|Z<<4)&252645135,Z=(Z|Z<<2)&858993459,Z=(Z|Z<<1)&1431655765,Y|Z<<1}function M(Y){var Z=Y,U=Y;do(Z.x=(Y-q)*(_-at)&&(Y-q)*(H-at)>=(U-q)*(Z-at)&&(U-q)*(_-at)>=($-q)*(H-at)}function C(Y,Z){return Y.next.i!==Z.i&&Y.prev.i!==Z.i&&!D(Y,Z)&&(B(Y,Z)&&B(Z,Y)&&G(Y,Z)&&(A(Y.prev,Y,Z.prev)||A(Y,Z.prev,Z))||P(Y,Z)&&A(Y.prev,Y,Y.next)>0&&A(Z.prev,Z,Z.next)>0)}function A(Y,Z,U){return(Z.y-Y.y)*(U.x-Z.x)-(Z.x-Y.x)*(U.y-Z.y)}function P(Y,Z){return Y.x===Z.x&&Y.y===Z.y}function b(Y,Z,U,H){var $=I(A(Y,Z,U)),_=I(A(Y,Z,H)),q=I(A(U,H,Y)),at=I(A(U,H,Z));return!!($!==_&&q!==at||$===0&&O(Y,U,Z)||_===0&&O(Y,H,Z)||q===0&&O(U,Y,H)||at===0&&O(U,Z,H))}function O(Y,Z,U){return Z.x<=Math.max(Y.x,U.x)&&Z.x>=Math.min(Y.x,U.x)&&Z.y<=Math.max(Y.y,U.y)&&Z.y>=Math.min(Y.y,U.y)}function I(Y){return Y>0?1:Y<0?-1:0}function D(Y,Z){var U=Y;do{if(U.i!==Y.i&&U.next.i!==Y.i&&U.i!==Z.i&&U.next.i!==Z.i&&b(U,U.next,Y,Z))return!0;U=U.next}while(U!==Y);return!1}function B(Y,Z){return A(Y.prev,Y,Y.next)<0?A(Y,Z,Y.next)>=0&&A(Y,Y.prev,Z)>=0:A(Y,Z,Y.prev)<0||A(Y,Y.next,Z)<0}function G(Y,Z){var U=Y,H=!1,$=(Y.x+Z.x)/2,_=(Y.y+Z.y)/2;do U.y>_!=U.next.y>_&&U.next.y!==U.y&&$<(U.next.x-U.x)*(_-U.y)/(U.next.y-U.y)+U.x&&(H=!H),U=U.next;while(U!==Y);return H}function z(Y,Z){var U=new Q(Y.i,Y.x,Y.y),H=new Q(Z.i,Z.x,Z.y),$=Y.next,_=Z.prev;return Y.next=Z,Z.prev=Y,U.next=$,$.prev=U,H.next=U,U.prev=H,_.next=H,H.prev=_,H}function X(Y,Z,U,H){var $=new Q(Y,Z,U);return H?($.next=H.next,$.prev=H,H.next.prev=$,H.next=$):($.prev=$,$.next=$),$}function j(Y){Y.next.prev=Y.prev,Y.prev.next=Y.next,Y.prevZ&&(Y.prevZ.nextZ=Y.nextZ),Y.nextZ&&(Y.nextZ.prevZ=Y.prevZ)}function Q(Y,Z,U){this.i=Y,this.x=Z,this.y=U,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}y.deviation=function(Y,Z,U,H){var $=Z&&Z.length,_=$?Z[0]*U:Y.length,q=Math.abs(tt(Y,0,_,U));if($)for(var at=0,ot=Z.length;at0&&(H+=Y[$-1].length,U.holes.push(H))}return U},s.exports=y},13829:(s,y,e)=>{/** + */function x(Y,$,U){U=U||2;var H=$&&$.length,Z=H?$[0]*U:Y.length,_=e(Y,0,Z,U,!0),q=[];if(!_||_.next===_.prev)return q;var at,ot,rt,gt,yt,Et,At;if(H&&(_=u(Y,$,_,U)),Y.length>80*U){at=rt=Y[0],ot=gt=Y[1];for(var Pt=U;Ptrt&&(rt=yt),Et>gt&&(gt=Et);At=Math.max(rt-at,gt-ot),At=At!==0?32767/At:0}return d(_,q,U,at,ot,At,0),q}function e(Y,$,U,H,Z){var _,q;if(Z===tt(Y,$,U,H)>0)for(_=$;_=$;_-=H)q=X(_,Y[_],Y[_+1],q);return q&&P(q,q.next)&&(j(q),q=q.next),q}function r(Y,$){if(!Y)return Y;$||($=Y);var U=Y,H;do if(H=!1,!U.steiner&&(P(U,U.next)||A(U.prev,U,U.next)===0)){if(j(U),U=$=U.prev,U===U.next)break;H=!0}else U=U.next;while(H||U!==$);return $}function d(Y,$,U,H,Z,_,q){if(Y){!q&&_&&v(Y,H,Z,_);for(var at=Y,ot,rt;Y.prev!==Y.next;){if(ot=Y.prev,rt=Y.next,_?a(Y,H,Z,_):h(Y)){$.push(ot.i/U|0),$.push(Y.i/U|0),$.push(rt.i/U|0),j(Y),Y=rt.next,at=rt.next;continue}if(Y=rt,Y===at){q?q===1?(Y=l(r(Y),$,U),d(Y,$,U,H,Z,_,2)):q===2&&n(Y,$,U,H,Z,_):d(r(Y),$,U,H,Z,_,1);break}}}}function h(Y){var $=Y.prev,U=Y,H=Y.next;if(A($,U,H)>=0)return!1;for(var Z=$.x,_=U.x,q=H.x,at=$.y,ot=U.y,rt=H.y,gt=Z<_?Z_?Z>q?Z:q:_>q?_:q,At=at>ot?at>rt?at:rt:ot>rt?ot:rt,Pt=H.next;Pt!==$;){if(Pt.x>=gt&&Pt.x<=Et&&Pt.y>=yt&&Pt.y<=At&&w(Z,at,_,ot,q,rt,Pt.x,Pt.y)&&A(Pt.prev,Pt,Pt.next)>=0)return!1;Pt=Pt.next}return!0}function a(Y,$,U,H){var Z=Y.prev,_=Y,q=Y.next;if(A(Z,_,q)>=0)return!1;for(var at=Z.x,ot=_.x,rt=q.x,gt=Z.y,yt=_.y,Et=q.y,At=atot?at>rt?at:rt:ot>rt?ot:rt,dt=gt>yt?gt>Et?gt:Et:yt>Et?yt:Et,ut=S(At,Pt,$,U,H),Rt=S(Vt,dt,$,U,H),Dt=Y.prevZ,Ht=Y.nextZ;Dt&&Dt.z>=ut&&Ht&&Ht.z<=Rt;){if(Dt.x>=At&&Dt.x<=Vt&&Dt.y>=Pt&&Dt.y<=dt&&Dt!==Z&&Dt!==q&&w(at,gt,ot,yt,rt,Et,Dt.x,Dt.y)&&A(Dt.prev,Dt,Dt.next)>=0||(Dt=Dt.prevZ,Ht.x>=At&&Ht.x<=Vt&&Ht.y>=Pt&&Ht.y<=dt&&Ht!==Z&&Ht!==q&&w(at,gt,ot,yt,rt,Et,Ht.x,Ht.y)&&A(Ht.prev,Ht,Ht.next)>=0))return!1;Ht=Ht.nextZ}for(;Dt&&Dt.z>=ut;){if(Dt.x>=At&&Dt.x<=Vt&&Dt.y>=Pt&&Dt.y<=dt&&Dt!==Z&&Dt!==q&&w(at,gt,ot,yt,rt,Et,Dt.x,Dt.y)&&A(Dt.prev,Dt,Dt.next)>=0)return!1;Dt=Dt.prevZ}for(;Ht&&Ht.z<=Rt;){if(Ht.x>=At&&Ht.x<=Vt&&Ht.y>=Pt&&Ht.y<=dt&&Ht!==Z&&Ht!==q&&w(at,gt,ot,yt,rt,Et,Ht.x,Ht.y)&&A(Ht.prev,Ht,Ht.next)>=0)return!1;Ht=Ht.nextZ}return!0}function l(Y,$,U){var H=Y;do{var Z=H.prev,_=H.next.next;!P(Z,_)&&b(Z,H,H.next,_)&&B(Z,_)&&B(_,Z)&&($.push(Z.i/U|0),$.push(H.i/U|0),$.push(_.i/U|0),j(H),j(H.next),H=Y=_),H=H.next}while(H!==Y);return r(H)}function n(Y,$,U,H,Z,_){var q=Y;do{for(var at=q.next.next;at!==q.prev;){if(q.i!==at.i&&C(q,at)){var ot=z(q,at);q=r(q,q.next),ot=r(ot,ot.next),d(q,$,U,H,Z,_,0),d(ot,$,U,H,Z,_,0);return}at=at.next}q=q.next}while(q!==Y)}function u(Y,$,U,H){var Z=[],_,q,at,ot,rt;for(_=0,q=$.length;_=U.next.y&&U.next.y!==U.y){var at=U.x+(Z-U.y)*(U.next.x-U.x)/(U.next.y-U.y);if(at<=H&&at>_&&(_=at,q=U.x=U.x&&U.x>=rt&&H!==U.x&&w(Zq.x||U.x===q.x&&p(q,U)))&&(q=U,yt=Et)),U=U.next;while(U!==ot);return q}function p(Y,$){return A(Y.prev,Y,$.prev)<0&&A($.next,Y,Y.next)<0}function v(Y,$,U,H){var Z=Y;do Z.z===0&&(Z.z=S(Z.x,Z.y,$,U,H)),Z.prevZ=Z.prev,Z.nextZ=Z.next,Z=Z.next;while(Z!==Y);Z.prevZ.nextZ=null,Z.prevZ=null,m(Z)}function m(Y){var $,U,H,Z,_,q,at,ot,rt=1;do{for(U=Y,Y=null,_=null,q=0;U;){for(q++,H=U,at=0,$=0;$0||ot>0&&H;)at!==0&&(ot===0||!H||U.z<=H.z)?(Z=U,U=U.nextZ,at--):(Z=H,H=H.nextZ,ot--),_?_.nextZ=Z:Y=Z,Z.prevZ=_,_=Z;U=H}_.nextZ=null,rt*=2}while(q>1);return Y}function S(Y,$,U,H,Z){return Y=(Y-U)*Z|0,$=($-H)*Z|0,Y=(Y|Y<<8)&16711935,Y=(Y|Y<<4)&252645135,Y=(Y|Y<<2)&858993459,Y=(Y|Y<<1)&1431655765,$=($|$<<8)&16711935,$=($|$<<4)&252645135,$=($|$<<2)&858993459,$=($|$<<1)&1431655765,Y|$<<1}function M(Y){var $=Y,U=Y;do($.x=(Y-q)*(_-at)&&(Y-q)*(H-at)>=(U-q)*($-at)&&(U-q)*(_-at)>=(Z-q)*(H-at)}function C(Y,$){return Y.next.i!==$.i&&Y.prev.i!==$.i&&!D(Y,$)&&(B(Y,$)&&B($,Y)&&G(Y,$)&&(A(Y.prev,Y,$.prev)||A(Y,$.prev,$))||P(Y,$)&&A(Y.prev,Y,Y.next)>0&&A($.prev,$,$.next)>0)}function A(Y,$,U){return($.y-Y.y)*(U.x-$.x)-($.x-Y.x)*(U.y-$.y)}function P(Y,$){return Y.x===$.x&&Y.y===$.y}function b(Y,$,U,H){var Z=I(A(Y,$,U)),_=I(A(Y,$,H)),q=I(A(U,H,Y)),at=I(A(U,H,$));return!!(Z!==_&&q!==at||Z===0&&O(Y,U,$)||_===0&&O(Y,H,$)||q===0&&O(U,Y,H)||at===0&&O(U,$,H))}function O(Y,$,U){return $.x<=Math.max(Y.x,U.x)&&$.x>=Math.min(Y.x,U.x)&&$.y<=Math.max(Y.y,U.y)&&$.y>=Math.min(Y.y,U.y)}function I(Y){return Y>0?1:Y<0?-1:0}function D(Y,$){var U=Y;do{if(U.i!==Y.i&&U.next.i!==Y.i&&U.i!==$.i&&U.next.i!==$.i&&b(U,U.next,Y,$))return!0;U=U.next}while(U!==Y);return!1}function B(Y,$){return A(Y.prev,Y,Y.next)<0?A(Y,$,Y.next)>=0&&A(Y,Y.prev,$)>=0:A(Y,$,Y.prev)<0||A(Y,Y.next,$)<0}function G(Y,$){var U=Y,H=!1,Z=(Y.x+$.x)/2,_=(Y.y+$.y)/2;do U.y>_!=U.next.y>_&&U.next.y!==U.y&&Z<(U.next.x-U.x)*(_-U.y)/(U.next.y-U.y)+U.x&&(H=!H),U=U.next;while(U!==Y);return H}function z(Y,$){var U=new Q(Y.i,Y.x,Y.y),H=new Q($.i,$.x,$.y),Z=Y.next,_=$.prev;return Y.next=$,$.prev=Y,U.next=Z,Z.prev=U,H.next=U,U.prev=H,_.next=H,H.prev=_,H}function X(Y,$,U,H){var Z=new Q(Y,$,U);return H?(Z.next=H.next,Z.prev=H,H.next.prev=Z,H.next=Z):(Z.prev=Z,Z.next=Z),Z}function j(Y){Y.next.prev=Y.prev,Y.prev.next=Y.next,Y.prevZ&&(Y.prevZ.nextZ=Y.nextZ),Y.nextZ&&(Y.nextZ.prevZ=Y.prevZ)}function Q(Y,$,U){this.i=Y,this.x=$,this.y=U,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}x.deviation=function(Y,$,U,H){var Z=$&&$.length,_=Z?$[0]*U:Y.length,q=Math.abs(tt(Y,0,_,U));if(Z)for(var at=0,ot=$.length;at0&&(H+=Y[Z-1].length,U.holes.push(H))}return U},s.exports=x},13829:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2737,15 +2737,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){r===void 0&&(r=[]);for(var d=0;d{/** + */var x=function(e,r){r===void 0&&(r=[]);for(var d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(35001),d=e(23031),h=e(30052),a=function(l,n,u,f){f===void 0&&(f=[]);var o=l.points,c=h(l);!n&&u>0&&(n=c/u);for(var p=0;pm+A){m+=A;continue}var P=C.getPoint((v-m)/A);f.push(P);break}return f};s.exports=a},30052:(s,y,e)=>{/** + */var r=e(35001),d=e(23031),h=e(30052),a=function(l,n,u,f){f===void 0&&(f=[]);var o=l.points,c=h(l);!n&&u>0&&(n=c/u);for(var p=0;pm+A){m+=A;continue}var P=C.getPoint((v-m)/A);f.push(P);break}return f};s.exports=a},30052:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(35001),d=e(23031),h=function(a){for(var l=a.points,n=0,u=0;u{/** + */var r=e(35001),d=e(23031),h=function(a){for(var l=a.points,n=0,u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2753,16 +2753,16 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.points.reverse(),e};s.exports=y},29524:s=>{function y(l,n){var u=l.x-n.x,f=l.y-n.y;return u*u+f*f}function e(l,n,u){var f=n.x,o=n.y,c=u.x-f,p=u.y-o;if(c!==0||p!==0){var v=((l.x-f)*c+(l.y-o)*p)/(c*c+p*p);v>1?(f=u.x,o=u.y):v>0&&(f+=c*v,o+=p*v)}return c=l.x-f,p=l.y-o,c*c+p*p}function r(l,n){for(var u=l[0],f=[u],o,c=1,p=l.length;cn&&(f.push(o),u=o);return u!==o&&f.push(o),f}function d(l,n,u,f,o){for(var c=f,p,v=n+1;vc&&(p=v,c=m)}c>f&&(p-n>1&&d(l,n,p,f,o),o.push(l[p]),u-p>1&&d(l,p,u,f,o))}function h(l,n){var u=l.length-1,f=[l[0]];return d(l,0,u,n,f),f.push(l[u]),f}var a=function(l,n,u){n===void 0&&(n=1),u===void 0&&(u=!1);var f=l.points;if(f.length>2){var o=n*n;u||(f=r(f,o)),l.setTo(h(f,o))}return l};s.exports=a},5469:s=>{/** + */var x=function(e){return e.points.reverse(),e};s.exports=x},29524:s=>{function x(l,n){var u=l.x-n.x,f=l.y-n.y;return u*u+f*f}function e(l,n,u){var f=n.x,o=n.y,c=u.x-f,p=u.y-o;if(c!==0||p!==0){var v=((l.x-f)*c+(l.y-o)*p)/(c*c+p*p);v>1?(f=u.x,o=u.y):v>0&&(f+=c*v,o+=p*v)}return c=l.x-f,p=l.y-o,c*c+p*p}function r(l,n){for(var u=l[0],f=[u],o,c=1,p=l.length;cn&&(f.push(o),u=o);return u!==o&&f.push(o),f}function d(l,n,u,f,o){for(var c=f,p,v=n+1;vc&&(p=v,c=m)}c>f&&(p-n>1&&d(l,n,p,f,o),o.push(l[p]),u-p>1&&d(l,p,u,f,o))}function h(l,n){var u=l.length-1,f=[l[0]];return d(l,0,u,n,f),f.push(l[u]),f}var a=function(l,n,u){n===void 0&&(n=1),u===void 0&&(u=!1);var f=l.points;if(f.length>2){var o=n*n;u||(f=r(f,o)),l.setTo(h(f,o))}return l};s.exports=a},5469:s=>{/** * @author Richard Davey * @author Igor Ognichenko * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(r,d){return r[0]=d[0],r[1]=d[1],r},e=function(r){var d,h=[],a=r.points;for(d=0;d0&&l.push(y([0,0],h[0])),d=0;d1&&l.push(y([0,0],h[h.length-1])),r.setTo(l)};s.exports=e},24709:s=>{/** + */var x=function(r,d){return r[0]=d[0],r[1]=d[1],r},e=function(r){var d,h=[],a=r.points;for(d=0;d0&&l.push(x([0,0],h[0])),d=0;d1&&l.push(x([0,0],h[h.length-1])),r.setTo(l)};s.exports=e},24709:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){for(var h=e.points,a=0;a{/** + */var x=function(e,r,d){for(var h=e.points,a=0;a{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2770,19 +2770,19 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.width*e.height};s.exports=y},98615:s=>{/** + */var x=function(e){return e.width*e.height};s.exports=x},98615:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.x=Math.ceil(e.x),e.y=Math.ceil(e.y),e};s.exports=y},31688:s=>{/** + */var x=function(e){return e.x=Math.ceil(e.x),e.y=Math.ceil(e.y),e};s.exports=x},31688:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.x=Math.ceil(e.x),e.y=Math.ceil(e.y),e.width=Math.ceil(e.width),e.height=Math.ceil(e.height),e};s.exports=y},67502:s=>{/** + */var x=function(e){return e.x=Math.ceil(e.x),e.y=Math.ceil(e.y),e.width=Math.ceil(e.width),e.height=Math.ceil(e.height),e};s.exports=x},67502:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return e.x=r-e.width/2,e.y=d-e.height/2,e};s.exports=y},65085:(s,y,e)=>{/** + */var x=function(e,r,d){return e.x=r-e.width/2,e.y=d-e.height/2,e};s.exports=x},65085:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2790,7 +2790,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return e.width<=0||e.height<=0?!1:e.x<=r&&e.x+e.width>=r&&e.y<=d&&e.y+e.height>=d};s.exports=y},96553:(s,y,e)=>{/** + */var x=function(e,r,d){return e.width<=0||e.height<=0?!1:e.x<=r&&e.x+e.width>=r&&e.y<=d&&e.y+e.height>=d};s.exports=x},96553:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2798,23 +2798,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r.width*r.height>e.width*e.height?!1:r.x>e.x&&r.xe.x&&r.righte.y&&r.ye.y&&r.bottom{/** + */var x=function(e,r){return r.width*r.height>e.width*e.height?!1:r.x>e.x&&r.xe.x&&r.righte.y&&r.ye.y&&r.bottom{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r.setTo(e.x,e.y,e.width,e.height)};s.exports=y},77493:s=>{/** + */var x=function(e,r){return r.setTo(e.x,e.y,e.width,e.height)};s.exports=x},77493:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r===void 0&&(r=[]),r.push({x:e.x,y:e.y}),r.push({x:e.right,y:e.y}),r.push({x:e.right,y:e.bottom}),r.push({x:e.x,y:e.bottom}),r};s.exports=y},9219:s=>{/** + */var x=function(e,r){return r===void 0&&(r=[]),r.push({x:e.x,y:e.y}),r.push({x:e.right,y:e.y}),r.push({x:e.right,y:e.bottom}),r.push({x:e.x,y:e.bottom}),r};s.exports=x},9219:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height};s.exports=y},53751:(s,y,e)=>{/** + */var x=function(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height};s.exports=x},53751:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(8249),d=function(h,a){var l=r(h);return l{/** + */var r=e(8249),d=function(h,a){var l=r(h);return l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2822,15 +2822,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.x=Math.floor(e.x),e.y=Math.floor(e.y),e};s.exports=y},83859:s=>{/** + */var x=function(e){return e.x=Math.floor(e.x),e.y=Math.floor(e.y),e};s.exports=x},83859:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height),e};s.exports=y},19217:(s,y,e)=>{/** + */var x=function(e){return e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height),e};s.exports=x},19217:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(87841),d=e(36383),h=function(a,l){if(l===void 0&&(l=new r),a.length===0)return l;for(var n=Number.MAX_VALUE,u=Number.MAX_VALUE,f=d.MIN_SAFE_INTEGER,o=d.MIN_SAFE_INTEGER,c,p,v,m=0;m{/** + */var r=e(87841),d=e(36383),h=function(a,l){if(l===void 0&&(l=new r),a.length===0)return l;for(var n=Number.MAX_VALUE,u=Number.MAX_VALUE,f=d.MIN_SAFE_INTEGER,o=d.MIN_SAFE_INTEGER,c,p,v,m=0;m{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2838,31 +2838,31 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.height===0?NaN:e.width/e.height};s.exports=y},27165:(s,y,e)=>{/** + */var x=function(e){return e.height===0?NaN:e.width/e.height};s.exports=x},27165:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a){return a===void 0&&(a=new r),a.x=h.centerX,a.y=h.centerY,a};s.exports=d},20812:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a){return a===void 0&&(a=new r),a.x=h.centerX,a.y=h.centerY,a};s.exports=d},20812:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(13019),d=e(2141),h=function(a,l,n){if(n===void 0&&(n=new d),l<=0||l>=1)return n.x=a.x,n.y=a.y,n;var u=r(a)*l;return l>.5?(u-=a.width+a.height,u<=a.width?(n.x=a.right-u,n.y=a.bottom):(n.x=a.x,n.y=a.bottom-(u-a.width))):u<=a.width?(n.x=a.x+u,n.y=a.y):(n.x=a.right,n.y=a.y+(u-a.width)),n};s.exports=h},34819:(s,y,e)=>{/** + */var r=e(13019),d=e(2141),h=function(a,l,n){if(n===void 0&&(n=new d),l<=0||l>=1)return n.x=a.x,n.y=a.y,n;var u=r(a)*l;return l>.5?(u-=a.width+a.height,u<=a.width?(n.x=a.right-u,n.y=a.bottom):(n.x=a.x,n.y=a.bottom-(u-a.width))):u<=a.width?(n.x=a.x+u,n.y=a.y):(n.x=a.right,n.y=a.y+(u-a.width)),n};s.exports=h},34819:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(20812),d=e(13019),h=function(a,l,n,u){u===void 0&&(u=[]),!l&&n>0&&(l=d(a)/n);for(var f=0;f{/** + */var r=e(20812),d=e(13019),h=function(a,l,n,u){u===void 0&&(u=[]),!l&&n>0&&(l=d(a)/n);for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a){return a===void 0&&(a=new r),a.x=h.width,a.y=h.height,a};s.exports=d},86091:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a){return a===void 0&&(a=new r),a.x=h.width,a.y=h.height,a};s.exports=d},86091:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(67502),d=function(h,a,l){var n=h.centerX,u=h.centerY;return h.setSize(h.width+a*2,h.height+l*2),r(h,n,u)};s.exports=d},53951:(s,y,e)=>{/** + */var r=e(67502),d=function(h,a,l){var n=h.centerX,u=h.centerY;return h.setSize(h.width+a*2,h.height+l*2),r(h,n,u)};s.exports=d},53951:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(87841),d=e(59996),h=function(a,l,n){return n===void 0&&(n=new r),d(a,l)?(n.x=Math.max(a.x,l.x),n.y=Math.max(a.y,l.y),n.width=Math.min(a.right,l.right)-n.x,n.height=Math.min(a.bottom,l.bottom)-n.y):n.setEmpty(),n};s.exports=h},14649:(s,y,e)=>{/** + */var r=e(87841),d=e(59996),h=function(a,l,n){return n===void 0&&(n=new r),d(a,l)?(n.x=Math.max(a.x,l.x),n.y=Math.max(a.y,l.y),n.width=Math.min(a.right,l.right)-n.x,n.height=Math.min(a.bottom,l.bottom)-n.y):n.setEmpty(),n};s.exports=h},14649:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2870,43 +2870,43 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){for(var d=e.x,h=e.right,a=e.y,l=e.bottom,n=0;n{/** + */var x=function(e,r){for(var d=e.x,h=e.right,a=e.y,l=e.bottom,n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=Math.min(e.x,r.x),h=Math.max(e.right,r.right);e.x=d,e.width=h-d;var a=Math.min(e.y,r.y),l=Math.max(e.bottom,r.bottom);return e.y=a,e.height=l-a,e};s.exports=y},92171:s=>{/** + */var x=function(e,r){var d=Math.min(e.x,r.x),h=Math.max(e.right,r.right);e.x=d,e.width=h-d;var a=Math.min(e.y,r.y),l=Math.max(e.bottom,r.bottom);return e.y=a,e.height=l-a,e};s.exports=x},92171:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=Math.min(e.x,r),a=Math.max(e.right,r);e.x=h,e.width=a-h;var l=Math.min(e.y,d),n=Math.max(e.bottom,d);return e.y=l,e.height=n-l,e};s.exports=y},42981:s=>{/** + */var x=function(e,r,d){var h=Math.min(e.x,r),a=Math.max(e.right,r);e.x=h,e.width=a-h;var l=Math.min(e.y,d),n=Math.max(e.bottom,d);return e.y=l,e.height=n-l,e};s.exports=x},42981:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return e.x+=r,e.y+=d,e};s.exports=y},46907:s=>{/** + */var x=function(e,r,d){return e.x+=r,e.y+=d,e};s.exports=x},46907:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.x+=r.x,e.y+=r.y,e};s.exports=y},60170:s=>{/** + */var x=function(e,r){return e.x+=r.x,e.y+=r.y,e};s.exports=x},60170:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.xr.x&&e.yr.y};s.exports=y},13019:s=>{/** + */var x=function(e,r){return e.xr.x&&e.yr.y};s.exports=x},13019:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return 2*(e.width+e.height)};s.exports=y},85133:(s,y,e)=>{/** + */var x=function(e){return 2*(e.width+e.height)};s.exports=x},85133:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=e(39506),h=function(a,l,n){n===void 0&&(n=new r),l=d(l);var u=Math.sin(l),f=Math.cos(l),o=f>0?a.width/2:a.width/-2,c=u>0?a.height/2:a.height/-2;return Math.abs(o*u){/** + */var r=e(2141),d=e(39506),h=function(a,l,n){n===void 0&&(n=new r),l=d(l);var u=Math.sin(l),f=Math.cos(l),o=f>0?a.width/2:a.width/-2,c=u>0?a.height/2:a.height/-2;return Math.abs(o*u){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a){return a===void 0&&(a=new r),a.x=h.x+Math.random()*h.width,a.y=h.y+Math.random()*h.height,a};s.exports=d},86470:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a){return a===void 0&&(a=new r),a.x=h.x+Math.random()*h.width,a.y=h.y+Math.random()*h.height,a};s.exports=d},86470:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(30976),d=e(70273),h=e(2141),a=function(l,n,u){if(u===void 0&&(u=new h),d(l,n))switch(r(0,3)){case 0:u.x=l.x+Math.random()*(n.right-l.x),u.y=l.y+Math.random()*(n.top-l.y);break;case 1:u.x=n.x+Math.random()*(l.right-n.x),u.y=n.bottom+Math.random()*(l.bottom-n.bottom);break;case 2:u.x=l.x+Math.random()*(n.x-l.x),u.y=n.y+Math.random()*(l.bottom-n.y);break;case 3:u.x=n.right+Math.random()*(l.right-n.right),u.y=l.y+Math.random()*(n.bottom-l.y);break}return u};s.exports=a},87841:(s,y,e)=>{/** + */var r=e(30976),d=e(70273),h=e(2141),a=function(l,n,u){if(u===void 0&&(u=new h),d(l,n))switch(r(0,3)){case 0:u.x=l.x+Math.random()*(n.right-l.x),u.y=l.y+Math.random()*(n.top-l.y);break;case 1:u.x=n.x+Math.random()*(l.right-n.x),u.y=n.bottom+Math.random()*(l.bottom-n.bottom);break;case 2:u.x=l.x+Math.random()*(n.x-l.x),u.y=n.y+Math.random()*(l.bottom-n.y);break;case 3:u.x=n.right+Math.random()*(l.right-n.right),u.y=l.y+Math.random()*(n.bottom-l.y);break}return u};s.exports=a},87841:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2914,15 +2914,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.width===r.width&&e.height===r.height};s.exports=y},31730:s=>{/** + */var x=function(e,r){return e.width===r.width&&e.height===r.height};s.exports=x},31730:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return d===void 0&&(d=r),e.width*=r,e.height*=d,e};s.exports=y},36899:(s,y,e)=>{/** + */var x=function(e,r,d){return d===void 0&&(d=r),e.width*=r,e.height*=d,e};s.exports=x},36899:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(87841),d=function(h,a,l){l===void 0&&(l=new r);var n=Math.min(h.x,a.x),u=Math.min(h.y,a.y),f=Math.max(h.right,a.right)-n,o=Math.max(h.bottom,a.bottom)-u;return l.setTo(n,u,f,o)};s.exports=d},93232:(s,y,e)=>{/** + */var r=e(87841),d=function(h,a,l){l===void 0&&(l=new r);var n=Math.min(h.x,a.x),u=Math.min(h.y,a.y),f=Math.max(h.right,a.right)-n,o=Math.max(h.bottom,a.bottom)-u;return l.setTo(n,u,f,o)};s.exports=d},93232:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2930,35 +2930,35 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r=e.x1,d=e.y1,h=e.x2,a=e.y2,l=e.x3,n=e.y3;return Math.abs(((l-r)*(a-d)-(h-r)*(n-d))/2)};s.exports=y},39208:(s,y,e)=>{/** + */var x=function(e){var r=e.x1,d=e.y1,h=e.x2,a=e.y2,l=e.x3,n=e.y3;return Math.abs(((l-r)*(a-d)-(h-r)*(n-d))/2)};s.exports=x},39208:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(16483),d=function(h,a,l){var n=l*(Math.sqrt(3)/2),u=h,f=a,o=h+l/2,c=a+n,p=h-l/2,v=a+n;return new r(u,f,o,c,p,v)};s.exports=d},39545:(s,y,e)=>{/** + */var r=e(16483),d=function(h,a,l){var n=l*(Math.sqrt(3)/2),u=h,f=a,o=h+l/2,c=a+n,p=h-l/2,v=a+n;return new r(u,f,o,c,p,v)};s.exports=d},39545:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(94811),d=e(16483),h=function(a,l,n,u,f){l===void 0&&(l=null),n===void 0&&(n=1),u===void 0&&(u=1),f===void 0&&(f=[]);for(var o=r(a,l),c,p,v,m,S,M,w,C,A,P=0;P{/** + */var r=e(94811),d=e(16483),h=function(a,l,n,u,f){l===void 0&&(l=null),n===void 0&&(n=1),u===void 0&&(u=1),f===void 0&&(f=[]);for(var o=r(a,l),c,p,v,m,S,M,w,C,A,P=0;P{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(16483),d=function(h,a,l,n){n===void 0&&(n=l);var u=h,f=a,o=h,c=a-n,p=h+l,v=a;return new r(u,f,o,c,p,v)};s.exports=d},23707:(s,y,e)=>{/** + */var r=e(16483),d=function(h,a,l,n){n===void 0&&(n=l);var u=h,f=a,o=h,c=a-n,p=h+l,v=a;return new r(u,f,o,c,p,v)};s.exports=d},23707:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(97523),d=e(13584),h=function(a,l,n,u){u===void 0&&(u=r);var f=u(a),o=l-f.x,c=n-f.y;return d(a,o,c)};s.exports=h},97523:(s,y,e)=>{/** + */var r=e(97523),d=e(13584),h=function(a,l,n,u){u===void 0&&(u=r);var f=u(a),o=l-f.x,c=n-f.y;return d(a,o,c)};s.exports=h},97523:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a){return a===void 0&&(a=new r),a.x=(h.x1+h.x2+h.x3)/3,a.y=(h.y1+h.y2+h.y3)/3,a};s.exports=d},24951:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a){return a===void 0&&(a=new r),a.x=(h.x1+h.x2+h.x3)/3,a.y=(h.y1+h.y2+h.y3)/3,a};s.exports=d},24951:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26099);function d(a,l,n,u){return a*u-l*n}var h=function(a,l){l===void 0&&(l=new r);var n=a.x3,u=a.y3,f=a.x1-n,o=a.y1-u,c=a.x2-n,p=a.y2-u,v=2*d(f,o,c,p),m=d(o,f*f+o*o,p,c*c+p*p),S=d(f,f*f+o*o,c,c*c+p*p);return l.x=n-m/v,l.y=u+S/v,l};s.exports=h},85614:(s,y,e)=>{/** + */var r=e(26099);function d(a,l,n,u){return a*u-l*n}var h=function(a,l){l===void 0&&(l=new r);var n=a.x3,u=a.y3,f=a.x1-n,o=a.y1-u,c=a.x2-n,p=a.y2-u,v=2*d(f,o,c,p),m=d(o,f*f+o*o,p,c*c+p*p),S=d(f,f*f+o*o,c,c*c+p*p);return l.x=n-m/v,l.y=u+S/v,l};s.exports=h},85614:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(96503),d=function(h,a){a===void 0&&(a=new r);var l=h.x1,n=h.y1,u=h.x2,f=h.y2,o=h.x3,c=h.y3,p=u-l,v=f-n,m=o-l,S=c-n,M=p*(l+u)+v*(n+f),w=m*(l+o)+S*(n+c),C=2*(p*(c-f)-v*(o-u)),A,P;if(Math.abs(C)<1e-6){var b=Math.min(l,u,o),O=Math.min(n,f,c);A=(Math.max(l,u,o)-b)*.5,P=(Math.max(n,f,c)-O)*.5,a.x=b+A,a.y=O+P,a.radius=Math.sqrt(A*A+P*P)}else a.x=(S*M-v*w)/C,a.y=(p*w-m*M)/C,A=a.x-l,P=a.y-n,a.radius=Math.sqrt(A*A+P*P);return a};s.exports=d},74422:(s,y,e)=>{/** + */var r=e(96503),d=function(h,a){a===void 0&&(a=new r);var l=h.x1,n=h.y1,u=h.x2,f=h.y2,o=h.x3,c=h.y3,p=u-l,v=f-n,m=o-l,S=c-n,M=p*(l+u)+v*(n+f),w=m*(l+o)+S*(n+c),C=2*(p*(c-f)-v*(o-u)),A,P;if(Math.abs(C)<1e-6){var b=Math.min(l,u,o),O=Math.min(n,f,c);A=(Math.max(l,u,o)-b)*.5,P=(Math.max(n,f,c)-O)*.5,a.x=b+A,a.y=O+P,a.radius=Math.sqrt(A*A+P*P)}else a.x=(S*M-v*w)/C,a.y=(p*w-m*M)/C,A=a.x-l,P=a.y-n,a.radius=Math.sqrt(A*A+P*P);return a};s.exports=d},74422:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2966,11 +2966,11 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=e.x3-e.x1,a=e.y3-e.y1,l=e.x2-e.x1,n=e.y2-e.y1,u=r-e.x1,f=d-e.y1,o=h*h+a*a,c=h*l+a*n,p=h*u+a*f,v=l*l+n*n,m=l*u+n*f,S=o*v-c*c,M=S===0?0:1/S,w=(v*p-c*m)*M,C=(o*m-c*p)*M;return w>=0&&C>=0&&w+C<1};s.exports=y},48653:s=>{/** + */var x=function(e,r,d){var h=e.x3-e.x1,a=e.y3-e.y1,l=e.x2-e.x1,n=e.y2-e.y1,u=r-e.x1,f=d-e.y1,o=h*h+a*a,c=h*l+a*n,p=h*u+a*f,v=l*l+n*n,m=l*u+n*f,S=o*v-c*c,M=S===0?0:1/S,w=(v*p-c*m)*M,C=(o*m-c*p)*M;return w>=0&&C>=0&&w+C<1};s.exports=x},48653:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){d===void 0&&(d=!1),h===void 0&&(h=[]);for(var a=e.x3-e.x1,l=e.y3-e.y1,n=e.x2-e.x1,u=e.y2-e.y1,f=a*a+l*l,o=a*n+l*u,c=n*n+u*u,p=f*c-o*o,v=p===0?0:1/p,m,S,M,w,C,A,P=e.x1,b=e.y1,O=0;O=0&&S>=0&&m+S<1&&(h.push({x:r[O].x,y:r[O].y}),d)));O++);return h};s.exports=y},96006:(s,y,e)=>{/** + */var x=function(e,r,d,h){d===void 0&&(d=!1),h===void 0&&(h=[]);for(var a=e.x3-e.x1,l=e.y3-e.y1,n=e.x2-e.x1,u=e.y2-e.y1,f=a*a+l*l,o=a*n+l*u,c=n*n+u*u,p=f*c-o*o,v=p===0?0:1/p,m,S,M,w,C,A,P=e.x1,b=e.y1,O=0;O=0&&S>=0&&m+S<1&&(h.push({x:r[O].x,y:r[O].y}),d)));O++);return h};s.exports=x},96006:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -2978,23 +2978,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r.setTo(e.x1,e.y1,e.x2,e.y2,e.x3,e.y3)};s.exports=y},71694:s=>{/** + */var x=function(e,r){return r.setTo(e.x1,e.y1,e.x2,e.y2,e.x3,e.y3)};s.exports=x},71694:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r===void 0&&(r=[]),r.push({x:e.x1,y:e.y1}),r.push({x:e.x2,y:e.y2}),r.push({x:e.x3,y:e.y3}),r};s.exports=y},33522:s=>{/** + */var x=function(e,r){return r===void 0&&(r=[]),r.push({x:e.x1,y:e.y1}),r.push({x:e.x2,y:e.y2}),r.push({x:e.x3,y:e.y3}),r};s.exports=x},33522:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.x1===r.x1&&e.y1===r.y1&&e.x2===r.x2&&e.y2===r.y2&&e.x3===r.x3&&e.y3===r.y3};s.exports=y},20437:(s,y,e)=>{/** + */var x=function(e,r){return e.x1===r.x1&&e.y1===r.y1&&e.x2===r.x2&&e.y2===r.y2&&e.x3===r.x3&&e.y3===r.y3};s.exports=x},20437:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=e(35001),h=function(a,l,n){n===void 0&&(n=new r);var u=a.getLineA(),f=a.getLineB(),o=a.getLineC();if(l<=0||l>=1)return n.x=u.x1,n.y=u.y1,n;var c=d(u),p=d(f),v=d(o),m=c+p+v,S=m*l,M=0;return Sc+p?(S-=c+p,M=S/v,n.x=o.x1+(o.x2-o.x1)*M,n.y=o.y1+(o.y2-o.y1)*M):(S-=c,M=S/p,n.x=f.x1+(f.x2-f.x1)*M,n.y=f.y1+(f.y2-f.y1)*M),n};s.exports=h},80672:(s,y,e)=>{/** + */var r=e(2141),d=e(35001),h=function(a,l,n){n===void 0&&(n=new r);var u=a.getLineA(),f=a.getLineB(),o=a.getLineC();if(l<=0||l>=1)return n.x=u.x1,n.y=u.y1,n;var c=d(u),p=d(f),v=d(o),m=c+p+v,S=m*l,M=0;return Sc+p?(S-=c+p,M=S/v,n.x=o.x1+(o.x2-o.x1)*M,n.y=o.y1+(o.y2-o.y1)*M):(S-=c,M=S/p,n.x=f.x1+(f.x2-f.x1)*M,n.y=f.y1+(f.y2-f.y1)*M),n};s.exports=h},80672:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(35001),d=e(2141),h=function(a,l,n,u){u===void 0&&(u=[]);var f=a.getLineA(),o=a.getLineB(),c=a.getLineC(),p=r(f),v=r(o),m=r(c),S=p+v+m;!l&&n>0&&(l=S/n);for(var M=0;Mp+v?(w-=p+v,C=w/m,A.x=c.x1+(c.x2-c.x1)*C,A.y=c.y1+(c.y2-c.y1)*C):(w-=p,C=w/v,A.x=o.x1+(o.x2-o.x1)*C,A.y=o.y1+(o.y2-o.y1)*C),u.push(A)}return u};s.exports=h},39757:(s,y,e)=>{/** + */var r=e(35001),d=e(2141),h=function(a,l,n,u){u===void 0&&(u=[]);var f=a.getLineA(),o=a.getLineB(),c=a.getLineC(),p=r(f),v=r(o),m=r(c),S=p+v+m;!l&&n>0&&(l=S/n);for(var M=0;Mp+v?(w-=p+v,C=w/m,A.x=c.x1+(c.x2-c.x1)*C,A.y=c.y1+(c.y2-c.y1)*C):(w-=p,C=w/v,A.x=o.x1+(o.x2-o.x1)*C,A.y=o.y1+(o.y2-o.y1)*C),u.push(A)}return u};s.exports=h},39757:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3002,19 +3002,19 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return e.x1+=r,e.y1+=d,e.x2+=r,e.y2+=d,e.x3+=r,e.y3+=d,e};s.exports=y},1376:(s,y,e)=>{/** + */var x=function(e,r,d){return e.x1+=r,e.y1+=d,e.x2+=r,e.y2+=d,e.x3+=r,e.y3+=d,e};s.exports=x},1376:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(35001),d=function(h){var a=h.getLineA(),l=h.getLineB(),n=h.getLineC();return r(a)+r(l)+r(n)};s.exports=d},90260:(s,y,e)=>{/** + */var r=e(35001),d=function(h){var a=h.getLineA(),l=h.getLineB(),n=h.getLineC();return r(a)+r(l)+r(n)};s.exports=d},90260:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(2141),d=function(h,a){a===void 0&&(a=new r);var l=h.x2-h.x1,n=h.y2-h.y1,u=h.x3-h.x1,f=h.y3-h.y1,o=Math.random(),c=Math.random();return o+c>=1&&(o=1-o,c=1-c),a.x=h.x1+(l*o+u*c),a.y=h.y1+(n*o+f*c),a};s.exports=d},52172:(s,y,e)=>{/** + */var r=e(2141),d=function(h,a){a===void 0&&(a=new r);var l=h.x2-h.x1,n=h.y2-h.y1,u=h.x3-h.x1,f=h.y3-h.y1,o=Math.random(),c=Math.random();return o+c>=1&&(o=1-o,c=1-c),a.x=h.x1+(l*o+u*c),a.y=h.y1+(n*o+f*c),a};s.exports=d},52172:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(99614),d=e(39757),h=function(a,l){var n=d(a);return r(a,n.x,n.y,l)};s.exports=h},49907:(s,y,e)=>{/** + */var r=e(99614),d=e(39757),h=function(a,l){var n=d(a);return r(a,n.x,n.y,l)};s.exports=h},49907:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3022,11 +3022,11 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){var a=Math.cos(h),l=Math.sin(h),n=e.x1-r,u=e.y1-d;return e.x1=n*a-u*l+r,e.y1=n*l+u*a+d,n=e.x2-r,u=e.y2-d,e.x2=n*a-u*l+r,e.y2=n*l+u*a+d,n=e.x3-r,u=e.y3-d,e.x3=n*a-u*l+r,e.y3=n*l+u*a+d,e};s.exports=y},16483:(s,y,e)=>{/** + */var x=function(e,r,d,h){var a=Math.cos(h),l=Math.sin(h),n=e.x1-r,u=e.y1-d;return e.x1=n*a-u*l+r,e.y1=n*l+u*a+d,n=e.x2-r,u=e.y2-d,e.x2=n*a-u*l+r,e.y2=n*l+u*a+d,n=e.x3-r,u=e.y3-d,e.x3=n*a-u*l+r,e.y3=n*l+u*a+d,e};s.exports=x},16483:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(10690),h=e(20437),a=e(80672),l=e(23777),n=e(23031),u=e(90260),f=new r({initialize:function(c,p,v,m,S,M){c===void 0&&(c=0),p===void 0&&(p=0),v===void 0&&(v=0),m===void 0&&(m=0),S===void 0&&(S=0),M===void 0&&(M=0),this.type=l.TRIANGLE,this.x1=c,this.y1=p,this.x2=v,this.y2=m,this.x3=S,this.y3=M},contains:function(o,c){return d(this,o,c)},getPoint:function(o,c){return h(this,o,c)},getPoints:function(o,c,p){return a(this,o,c,p)},getRandomPoint:function(o){return u(this,o)},setTo:function(o,c,p,v,m,S){return o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=0),v===void 0&&(v=0),m===void 0&&(m=0),S===void 0&&(S=0),this.x1=o,this.y1=c,this.x2=p,this.y2=v,this.x3=m,this.y3=S,this},getLineA:function(o){return o===void 0&&(o=new n),o.setTo(this.x1,this.y1,this.x2,this.y2),o},getLineB:function(o){return o===void 0&&(o=new n),o.setTo(this.x2,this.y2,this.x3,this.y3),o},getLineC:function(o){return o===void 0&&(o=new n),o.setTo(this.x3,this.y3,this.x1,this.y1),o},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(o){var c=0;this.x1<=this.x2&&this.x1<=this.x3?c=this.x1-o:this.x2<=this.x1&&this.x2<=this.x3?c=this.x2-o:c=this.x3-o,this.x1-=c,this.x2-=c,this.x3-=c}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(o){var c=0;this.x1>=this.x2&&this.x1>=this.x3?c=this.x1-o:this.x2>=this.x1&&this.x2>=this.x3?c=this.x2-o:c=this.x3-o,this.x1-=c,this.x2-=c,this.x3-=c}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(o){var c=0;this.y1<=this.y2&&this.y1<=this.y3?c=this.y1-o:this.y2<=this.y1&&this.y2<=this.y3?c=this.y2-o:c=this.y3-o,this.y1-=c,this.y2-=c,this.y3-=c}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(o){var c=0;this.y1>=this.y2&&this.y1>=this.y3?c=this.y1-o:this.y2>=this.y1&&this.y2>=this.y3?c=this.y2-o:c=this.y3-o,this.y1-=c,this.y2-=c,this.y3-=c}}});s.exports=f},84435:(s,y,e)=>{/** + */var r=e(83419),d=e(10690),h=e(20437),a=e(80672),l=e(23777),n=e(23031),u=e(90260),f=new r({initialize:function(c,p,v,m,S,M){c===void 0&&(c=0),p===void 0&&(p=0),v===void 0&&(v=0),m===void 0&&(m=0),S===void 0&&(S=0),M===void 0&&(M=0),this.type=l.TRIANGLE,this.x1=c,this.y1=p,this.x2=v,this.y2=m,this.x3=S,this.y3=M},contains:function(o,c){return d(this,o,c)},getPoint:function(o,c){return h(this,o,c)},getPoints:function(o,c,p){return a(this,o,c,p)},getRandomPoint:function(o){return u(this,o)},setTo:function(o,c,p,v,m,S){return o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p=0),v===void 0&&(v=0),m===void 0&&(m=0),S===void 0&&(S=0),this.x1=o,this.y1=c,this.x2=p,this.y2=v,this.x3=m,this.y3=S,this},getLineA:function(o){return o===void 0&&(o=new n),o.setTo(this.x1,this.y1,this.x2,this.y2),o},getLineB:function(o){return o===void 0&&(o=new n),o.setTo(this.x2,this.y2,this.x3,this.y3),o},getLineC:function(o){return o===void 0&&(o=new n),o.setTo(this.x3,this.y3,this.x1,this.y1),o},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(o){var c=0;this.x1<=this.x2&&this.x1<=this.x3?c=this.x1-o:this.x2<=this.x1&&this.x2<=this.x3?c=this.x2-o:c=this.x3-o,this.x1-=c,this.x2-=c,this.x3-=c}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(o){var c=0;this.x1>=this.x2&&this.x1>=this.x3?c=this.x1-o:this.x2>=this.x1&&this.x2>=this.x3?c=this.x2-o:c=this.x3-o,this.x1-=c,this.x2-=c,this.x3-=c}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(o){var c=0;this.y1<=this.y2&&this.y1<=this.y3?c=this.y1-o:this.y2<=this.y1&&this.y2<=this.y3?c=this.y2-o:c=this.y3-o,this.y1-=c,this.y2-=c,this.y3-=c}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(o){var c=0;this.y1>=this.y2&&this.y1>=this.y3?c=this.y1-o:this.y2>=this.y1&&this.y2>=this.y3?c=this.y2-o:c=this.y3-o,this.y1-=c,this.y2-=c,this.y3-=c}}});s.exports=f},84435:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3034,23 +3034,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return{gameObject:e,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:r,hitAreaCallback:d,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}};s.exports=y},84409:s=>{/** + */var x=function(e,r,d){return{gameObject:e,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:r,hitAreaCallback:d,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}};s.exports=x},84409:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return function(d,h,a,l){var n=e.getPixelAlpha(h,a,l.texture.key,l.frame.name);return n&&n>=r}};s.exports=y},7003:(s,y,e)=>{/** + */var x=function(e,r){return function(d,h,a,l){var n=e.getPixelAlpha(h,a,l.texture.key,l.frame.name);return n&&n>=r}};s.exports=x},7003:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(93301),h=e(50792),a=e(8214),l=e(8443),n=e(78970),u=e(85098),f=e(42515),o=e(36210),c=e(61340),p=e(85955),v=new r({initialize:function(S,M){this.game=S,this.scaleManager,this.canvas,this.config=M,this.enabled=!0,this.events=new h,this.isOver=!0,this.defaultCursor="",this.keyboard=M.inputKeyboard?new n(this):null,this.mouse=M.inputMouse?new u(this):null,this.touch=M.inputTouch?new o(this):null,this.pointers=[],this.pointersTotal=M.inputActivePointers,M.inputTouch&&this.pointersTotal===1&&(this.pointersTotal=2);for(var w=0;w<=this.pointersTotal;w++){var C=new f(this,w);C.smoothFactor=M.inputSmoothFactor,this.pointers.push(C)}this.mousePointer=M.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new c,this._tempMatrix2=new c,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],S.events.once(l.BOOT,this.boot,this)},boot:function(){var m=this.game,S=m.events;this.canvas=m.canvas,this.scaleManager=m.scale,this.events.emit(a.MANAGER_BOOT),S.on(l.PRE_RENDER,this.preRender,this),S.once(l.DESTROY,this.destroy,this)},setCanvasOver:function(m){this.isOver=!0,this.events.emit(a.GAME_OVER,m)},setCanvasOut:function(m){this.isOver=!1,this.events.emit(a.GAME_OUT,m)},preRender:function(){var m=this.game.loop.now,S=this.game.loop.delta,M=this.game.scene.getScenes(!0,!0);this.time=m,this.events.emit(a.MANAGER_UPDATE);for(var w=0;w10&&(m=10-this.pointersTotal);for(var M=0;M{/** + */var r=e(83419),d=e(93301),h=e(50792),a=e(8214),l=e(8443),n=e(78970),u=e(85098),f=e(42515),o=e(36210),c=e(61340),p=e(85955),v=new r({initialize:function(S,M){this.game=S,this.scaleManager,this.canvas,this.config=M,this.enabled=!0,this.events=new h,this.isOver=!0,this.defaultCursor="",this.keyboard=M.inputKeyboard?new n(this):null,this.mouse=M.inputMouse?new u(this):null,this.touch=M.inputTouch?new o(this):null,this.pointers=[],this.pointersTotal=M.inputActivePointers,M.inputTouch&&this.pointersTotal===1&&(this.pointersTotal=2);for(var w=0;w<=this.pointersTotal;w++){var C=new f(this,w);C.smoothFactor=M.inputSmoothFactor,this.pointers.push(C)}this.mousePointer=M.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new c,this._tempMatrix2=new c,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],S.events.once(l.BOOT,this.boot,this)},boot:function(){var m=this.game,S=m.events;this.canvas=m.canvas,this.scaleManager=m.scale,this.events.emit(a.MANAGER_BOOT),S.on(l.PRE_RENDER,this.preRender,this),S.once(l.DESTROY,this.destroy,this)},setCanvasOver:function(m){this.isOver=!0,this.events.emit(a.GAME_OVER,m)},setCanvasOut:function(m){this.isOver=!1,this.events.emit(a.GAME_OUT,m)},preRender:function(){var m=this.game.loop.now,S=this.game.loop.delta,M=this.game.scene.getScenes(!0,!0);this.time=m,this.events.emit(a.MANAGER_UPDATE);for(var w=0;w10&&(m=10-this.pointersTotal);for(var M=0;M{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(96503),d=e(87902),h=e(83419),a=e(93301),l=e(74457),n=e(84409),u=e(20339),f=e(8497),o=e(81154),c=e(8214),p=e(50792),v=e(95540),m=e(23777),S=e(89639),M=e(41212),w=e(37277),C=e(87841),A=e(37303),P=e(44594),b=e(16483),O=e(10690),I=new h({Extends:p,initialize:function(B){p.call(this),this.scene=B,this.systems=B.sys,this.settings=B.sys.settings,this.manager=B.sys.game.input,this.pluginEvents=new p,this.enabled=!0,this.displayList,this.cameras,S.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var G={cancelled:!1};this._eventContainer={stopPropagation:function(){G.cancelled=!0}},this._eventData=G,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,B.sys.events.once(P.BOOT,this.boot,this),B.sys.events.on(P.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(P.DESTROY,this.destroy,this),this.pluginEvents.emit(c.BOOT)},start:function(){var D=this.systems.events;D.on(P.TRANSITION_START,this.transitionIn,this),D.on(P.TRANSITION_OUT,this.transitionOut,this),D.on(P.TRANSITION_COMPLETE,this.transitionComplete,this),D.on(P.PRE_UPDATE,this.preUpdate,this),D.once(P.SHUTDOWN,this.shutdown,this),this.manager.events.on(c.GAME_OUT,this.onGameOut,this),this.manager.events.on(c.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(c.START)},onGameOver:function(D){this.isActive()&&this.emit(c.GAME_OVER,D.timeStamp,D)},onGameOut:function(D){this.isActive()&&this.emit(c.GAME_OUT,D.timeStamp,D)},preUpdate:function(){this.pluginEvents.emit(c.PRE_UPDATE);var D=this._pendingRemoval,B=this._pendingInsertion,G=D.length,z=B.length;if(!(G===0&&z===0)){for(var X=this._list,j=0;j-1&&(X.splice(tt,1),this.clear(Q,!0))}this._pendingRemoval.length=0,this._list=X.concat(B.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(D,B){if(!this.isActive())return!1;if(this.pluginEvents.emit(c.UPDATE,D,B),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var G,z=this.manager,X=z.pointers,j=z.pointersTotal;for(G=0;G0)if(this._pollTimer-=B,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var tt=!1;for(G=0;G0&&(tt=!0)}return tt},update:function(D,B){if(!this.isActive())return!1;for(var G=B.length,z=!1,X=0;X0&&(z=!0)}return this._updatedThisFrame=!0,z},clear:function(D,B){B===void 0&&(B=!1),this.disable(D);var G=D.input;G&&(this.removeDebug(D),this.manager.resetCursor(G),G.gameObject=void 0,G.target=void 0,G.hitArea=void 0,G.hitAreaCallback=void 0,G.callbackContext=void 0,D.input=null),B||this.queueForRemoval(D);var z=this._draggable.indexOf(D);return z>-1&&this._draggable.splice(z,1),D},disable:function(D){var B=D.input;B&&(B.enabled=!1,B.dragState=0);for(var G=this._drag,z=this._over,X=this.manager,j=0,Q;j-1&&G[j].splice(Q,1),Q=z[j].indexOf(D),Q>-1&&z[j].splice(Q,1);return this},enable:function(D,B,G,z){return z===void 0&&(z=!1),D.input?D.input.enabled=!0:this.setHitArea(D,B,G),D.input&&z&&!D.input.dropZone&&(D.input.dropZone=z),this},hitTestPointer:function(D){for(var B=this.cameras.getCamerasBelowPointer(D),G=0;G0)return D.camera=z,X}return D.camera=B[0],[]},processDownEvents:function(D){var B=0,G=this._temp,z=this._eventData,X=this._eventContainer;z.cancelled=!1;for(var j=!1,Q=0;Q0&&u(D.x,D.y,D.downX,D.downY)>=X||z>0&&B>=D.downTime+z)&&(G=!0),G)return this.setDragState(D,3),this.processDragStartList(D)},processDragStartList:function(D){if(this.getDragState(D)!==3)return 0;for(var B=this._drag[D.id],G=0;G1&&(this.sortGameObjects(G,D),this.topOnly&&G.splice(1)),this._drag[D.id]=G,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(D,3),this.processDragStartList(D)):(this.setDragState(D,2),0))},processDragMoveEvent:function(D){if(this.getDragState(D)===2&&this.processDragThresholdEvent(D,this.manager.game.loop.now),this.getDragState(D)!==4)return 0;for(var B=this._tempZones,G=this._drag[D.id],z=0;z0?(X.emit(c.GAMEOBJECT_DRAG_LEAVE,D,Q),this.emit(c.DRAG_LEAVE,D,X,Q),j.target=B[0],Q=j.target,X.emit(c.GAMEOBJECT_DRAG_ENTER,D,Q),this.emit(c.DRAG_ENTER,D,X,Q)):(X.emit(c.GAMEOBJECT_DRAG_LEAVE,D,Q),this.emit(c.DRAG_LEAVE,D,X,Q),B[0]?(j.target=B[0],Q=j.target,X.emit(c.GAMEOBJECT_DRAG_ENTER,D,Q),this.emit(c.DRAG_ENTER,D,X,Q)):j.target=null)}else!Q&&B[0]&&(j.target=B[0],Q=j.target,X.emit(c.GAMEOBJECT_DRAG_ENTER,D,Q),this.emit(c.DRAG_ENTER,D,X,Q));var Y,Z;if(!X.parentContainer)Y=D.worldX-j.dragX,Z=D.worldY-j.dragY;else{var U=D.worldX-j.dragStartXGlobal,H=D.worldY-j.dragStartYGlobal,$=X.getParentRotation(),_=U*Math.cos($)+H*Math.sin($),q=H*Math.cos($)-U*Math.sin($);_*=1/X.parentContainer.scaleX,q*=1/X.parentContainer.scaleY,Y=_+j.dragStartX,Z=q+j.dragStartY}X.emit(c.GAMEOBJECT_DRAG,D,Y,Z),this.emit(c.DRAG,D,X,Y,Z)}return G.length},processDragUpEvent:function(D){for(var B=this._drag[D.id],G=0;G0){var j=this.manager,Q=this._eventData,tt=this._eventContainer;Q.cancelled=!1;for(var Y=!1,Z=0;Z0){var X=this.manager,j=this._eventData,Q=this._eventContainer;j.cancelled=!1;var tt=!1;this.sortGameObjects(B,D);for(var Y=0;Y0){for(this.sortGameObjects(X,D),G=0;G0){for(this.sortGameObjects(j,D),G=0;G-1&&this._draggable.splice(X,1)}return this},makePixelPerfect:function(D){D===void 0&&(D=1);var B=this.systems.textures;return n(B,D)},setHitArea:function(D,B,G){if(B===void 0)return this.setHitAreaFromTexture(D);Array.isArray(D)||(D=[D]);var z=!1,X=!1,j=!1,Q=!1,tt=!1,Y=!0;if(M(B)&&Object.keys(B).length){var Z=B,U=D.some(function(at){return at.hasOwnProperty("faces")});if(!U){B=v(Z,"hitArea",null),G=v(Z,"hitAreaCallback",null),tt=v(Z,"pixelPerfect",!1);var H=v(Z,"alphaTolerance",1);tt&&(B={},G=this.makePixelPerfect(H))}z=v(Z,"draggable",!1),X=v(Z,"dropZone",!1),j=v(Z,"cursor",!1),Q=v(Z,"useHandCursor",!1),(!B||!G)&&(this.setHitAreaFromTexture(D),Y=!1)}else typeof B=="function"&&!G&&(G=B,B={});for(var $=0;${/** + */var r=e(96503),d=e(87902),h=e(83419),a=e(93301),l=e(74457),n=e(84409),u=e(20339),f=e(8497),o=e(81154),c=e(8214),p=e(50792),v=e(95540),m=e(23777),S=e(89639),M=e(41212),w=e(37277),C=e(87841),A=e(37303),P=e(44594),b=e(16483),O=e(10690),I=new h({Extends:p,initialize:function(B){p.call(this),this.scene=B,this.systems=B.sys,this.settings=B.sys.settings,this.manager=B.sys.game.input,this.pluginEvents=new p,this.enabled=!0,this.displayList,this.cameras,S.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var G={cancelled:!1};this._eventContainer={stopPropagation:function(){G.cancelled=!0}},this._eventData=G,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,B.sys.events.once(P.BOOT,this.boot,this),B.sys.events.on(P.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(P.DESTROY,this.destroy,this),this.pluginEvents.emit(c.BOOT)},start:function(){var D=this.systems.events;D.on(P.TRANSITION_START,this.transitionIn,this),D.on(P.TRANSITION_OUT,this.transitionOut,this),D.on(P.TRANSITION_COMPLETE,this.transitionComplete,this),D.on(P.PRE_UPDATE,this.preUpdate,this),D.once(P.SHUTDOWN,this.shutdown,this),this.manager.events.on(c.GAME_OUT,this.onGameOut,this),this.manager.events.on(c.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(c.START)},onGameOver:function(D){this.isActive()&&this.emit(c.GAME_OVER,D.timeStamp,D)},onGameOut:function(D){this.isActive()&&this.emit(c.GAME_OUT,D.timeStamp,D)},preUpdate:function(){this.pluginEvents.emit(c.PRE_UPDATE);var D=this._pendingRemoval,B=this._pendingInsertion,G=D.length,z=B.length;if(!(G===0&&z===0)){for(var X=this._list,j=0;j-1&&(X.splice(tt,1),this.clear(Q,!0))}this._pendingRemoval.length=0,this._list=X.concat(B.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(D,B){if(!this.isActive())return!1;if(this.pluginEvents.emit(c.UPDATE,D,B),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var G,z=this.manager,X=z.pointers,j=z.pointersTotal;for(G=0;G0)if(this._pollTimer-=B,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var tt=!1;for(G=0;G0&&(tt=!0)}return tt},update:function(D,B){if(!this.isActive())return!1;for(var G=B.length,z=!1,X=0;X0&&(z=!0)}return this._updatedThisFrame=!0,z},clear:function(D,B){B===void 0&&(B=!1),this.disable(D);var G=D.input;G&&(this.removeDebug(D),this.manager.resetCursor(G),G.gameObject=void 0,G.target=void 0,G.hitArea=void 0,G.hitAreaCallback=void 0,G.callbackContext=void 0,D.input=null),B||this.queueForRemoval(D);var z=this._draggable.indexOf(D);return z>-1&&this._draggable.splice(z,1),D},disable:function(D){var B=D.input;B&&(B.enabled=!1,B.dragState=0);for(var G=this._drag,z=this._over,X=this.manager,j=0,Q;j-1&&G[j].splice(Q,1),Q=z[j].indexOf(D),Q>-1&&z[j].splice(Q,1);return this},enable:function(D,B,G,z){return z===void 0&&(z=!1),D.input?D.input.enabled=!0:this.setHitArea(D,B,G),D.input&&z&&!D.input.dropZone&&(D.input.dropZone=z),this},hitTestPointer:function(D){for(var B=this.cameras.getCamerasBelowPointer(D),G=0;G0)return D.camera=z,X}return D.camera=B[0],[]},processDownEvents:function(D){var B=0,G=this._temp,z=this._eventData,X=this._eventContainer;z.cancelled=!1;for(var j=!1,Q=0;Q0&&u(D.x,D.y,D.downX,D.downY)>=X||z>0&&B>=D.downTime+z)&&(G=!0),G)return this.setDragState(D,3),this.processDragStartList(D)},processDragStartList:function(D){if(this.getDragState(D)!==3)return 0;for(var B=this._drag[D.id],G=0;G1&&(this.sortGameObjects(G,D),this.topOnly&&G.splice(1)),this._drag[D.id]=G,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(D,3),this.processDragStartList(D)):(this.setDragState(D,2),0))},processDragMoveEvent:function(D){if(this.getDragState(D)===2&&this.processDragThresholdEvent(D,this.manager.game.loop.now),this.getDragState(D)!==4)return 0;for(var B=this._tempZones,G=this._drag[D.id],z=0;z0?(X.emit(c.GAMEOBJECT_DRAG_LEAVE,D,Q),this.emit(c.DRAG_LEAVE,D,X,Q),j.target=B[0],Q=j.target,X.emit(c.GAMEOBJECT_DRAG_ENTER,D,Q),this.emit(c.DRAG_ENTER,D,X,Q)):(X.emit(c.GAMEOBJECT_DRAG_LEAVE,D,Q),this.emit(c.DRAG_LEAVE,D,X,Q),B[0]?(j.target=B[0],Q=j.target,X.emit(c.GAMEOBJECT_DRAG_ENTER,D,Q),this.emit(c.DRAG_ENTER,D,X,Q)):j.target=null)}else!Q&&B[0]&&(j.target=B[0],Q=j.target,X.emit(c.GAMEOBJECT_DRAG_ENTER,D,Q),this.emit(c.DRAG_ENTER,D,X,Q));var Y,$;if(!X.parentContainer)Y=D.worldX-j.dragX,$=D.worldY-j.dragY;else{var U=D.worldX-j.dragStartXGlobal,H=D.worldY-j.dragStartYGlobal,Z=X.getParentRotation(),_=U*Math.cos(Z)+H*Math.sin(Z),q=H*Math.cos(Z)-U*Math.sin(Z);_*=1/X.parentContainer.scaleX,q*=1/X.parentContainer.scaleY,Y=_+j.dragStartX,$=q+j.dragStartY}X.emit(c.GAMEOBJECT_DRAG,D,Y,$),this.emit(c.DRAG,D,X,Y,$)}return G.length},processDragUpEvent:function(D){for(var B=this._drag[D.id],G=0;G0){var j=this.manager,Q=this._eventData,tt=this._eventContainer;Q.cancelled=!1;for(var Y=!1,$=0;$0){var X=this.manager,j=this._eventData,Q=this._eventContainer;j.cancelled=!1;var tt=!1;this.sortGameObjects(B,D);for(var Y=0;Y0){for(this.sortGameObjects(X,D),G=0;G0){for(this.sortGameObjects(j,D),G=0;G-1&&this._draggable.splice(X,1)}return this},makePixelPerfect:function(D){D===void 0&&(D=1);var B=this.systems.textures;return n(B,D)},setHitArea:function(D,B,G){if(B===void 0)return this.setHitAreaFromTexture(D);Array.isArray(D)||(D=[D]);var z=!1,X=!1,j=!1,Q=!1,tt=!1,Y=!0;if(M(B)&&Object.keys(B).length){var $=B,U=D.some(function(at){return at.hasOwnProperty("faces")});if(!U){B=v($,"hitArea",null),G=v($,"hitAreaCallback",null),tt=v($,"pixelPerfect",!1);var H=v($,"alphaTolerance",1);tt&&(B={},G=this.makePixelPerfect(H))}z=v($,"draggable",!1),X=v($,"dropZone",!1),j=v($,"cursor",!1),Q=v($,"useHandCursor",!1),(!B||!G)&&(this.setHitAreaFromTexture(D),Y=!1)}else typeof B=="function"&&!G&&(G=B,B={});for(var Z=0;Z{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(35154),d={},h={};h.register=function(a,l,n,u,f){d[a]={plugin:l,mapping:n,settingsKey:u,configKey:f}},h.getPlugin=function(a){return d[a]},h.install=function(a){var l=a.scene.sys,n=l.settings.input,u=l.game.config;for(var f in d){var o=d[f].plugin,c=d[f].mapping,p=d[f].settingsKey,v=d[f].configKey;r(n,p,u[v])&&(a[c]=new o(a))}},h.remove=function(a){d.hasOwnProperty(a)&&delete d[a]},s.exports=h},42515:(s,y,e)=>{/** + */var r=e(35154),d={},h={};h.register=function(a,l,n,u,f){d[a]={plugin:l,mapping:n,settingsKey:u,configKey:f}},h.getPlugin=function(a){return d[a]},h.install=function(a){var l=a.scene.sys,n=l.settings.input,u=l.game.config;for(var f in d){var o=d[f].plugin,c=d[f].mapping,p=d[f].settingsKey,v=d[f].configKey;r(n,p,u[v])&&(a[c]=new o(a))}},h.remove=function(a){d.hasOwnProperty(a)&&delete d[a]},s.exports=h},42515:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3058,7 +3058,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};s.exports=y},7179:s=>{/** + */var x={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};s.exports=x},7179:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3242,23 +3242,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="update"},8214:(s,y,e)=>{/** + */s.exports="update"},8214:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={BOOT:e(7179),DESTROY:e(85375),DRAG_END:e(39843),DRAG_ENTER:e(23388),DRAG:e(16133),DRAG_LEAVE:e(27829),DRAG_OVER:e(53904),DRAG_START:e(56058),DROP:e(2642),GAME_OUT:e(56718),GAME_OVER:e(25936),GAMEOBJECT_DOWN:e(88171),GAMEOBJECT_DRAG_END:e(36147),GAMEOBJECT_DRAG_ENTER:e(71692),GAMEOBJECT_DRAG:e(96149),GAMEOBJECT_DRAG_LEAVE:e(81285),GAMEOBJECT_DRAG_OVER:e(74048),GAMEOBJECT_DRAG_START:e(21322),GAMEOBJECT_DROP:e(49378),GAMEOBJECT_MOVE:e(86754),GAMEOBJECT_OUT:e(86433),GAMEOBJECT_OVER:e(60709),GAMEOBJECT_POINTER_DOWN:e(24081),GAMEOBJECT_POINTER_MOVE:e(11172),GAMEOBJECT_POINTER_OUT:e(18907),GAMEOBJECT_POINTER_OVER:e(95579),GAMEOBJECT_POINTER_UP:e(35368),GAMEOBJECT_POINTER_WHEEL:e(26972),GAMEOBJECT_UP:e(47078),GAMEOBJECT_WHEEL:e(73802),MANAGER_BOOT:e(27503),MANAGER_PROCESS:e(50852),MANAGER_UPDATE:e(96438),POINTER_DOWN:e(47777),POINTER_DOWN_OUTSIDE:e(27957),POINTER_MOVE:e(19444),POINTER_OUT:e(54251),POINTER_OVER:e(18667),POINTER_UP:e(27192),POINTER_UP_OUTSIDE:e(24652),POINTER_WHEEL:e(45132),POINTERLOCK_CHANGE:e(59152),PRE_UPDATE:e(44512),SHUTDOWN:e(15757),START:e(41637),UPDATE:e(93802)}},97421:(s,y,e)=>{/** + */s.exports={BOOT:e(7179),DESTROY:e(85375),DRAG_END:e(39843),DRAG_ENTER:e(23388),DRAG:e(16133),DRAG_LEAVE:e(27829),DRAG_OVER:e(53904),DRAG_START:e(56058),DROP:e(2642),GAME_OUT:e(56718),GAME_OVER:e(25936),GAMEOBJECT_DOWN:e(88171),GAMEOBJECT_DRAG_END:e(36147),GAMEOBJECT_DRAG_ENTER:e(71692),GAMEOBJECT_DRAG:e(96149),GAMEOBJECT_DRAG_LEAVE:e(81285),GAMEOBJECT_DRAG_OVER:e(74048),GAMEOBJECT_DRAG_START:e(21322),GAMEOBJECT_DROP:e(49378),GAMEOBJECT_MOVE:e(86754),GAMEOBJECT_OUT:e(86433),GAMEOBJECT_OVER:e(60709),GAMEOBJECT_POINTER_DOWN:e(24081),GAMEOBJECT_POINTER_MOVE:e(11172),GAMEOBJECT_POINTER_OUT:e(18907),GAMEOBJECT_POINTER_OVER:e(95579),GAMEOBJECT_POINTER_UP:e(35368),GAMEOBJECT_POINTER_WHEEL:e(26972),GAMEOBJECT_UP:e(47078),GAMEOBJECT_WHEEL:e(73802),MANAGER_BOOT:e(27503),MANAGER_PROCESS:e(50852),MANAGER_UPDATE:e(96438),POINTER_DOWN:e(47777),POINTER_DOWN_OUTSIDE:e(27957),POINTER_MOVE:e(19444),POINTER_OUT:e(54251),POINTER_OVER:e(18667),POINTER_UP:e(27192),POINTER_UP_OUTSIDE:e(24652),POINTER_WHEEL:e(45132),POINTERLOCK_CHANGE:e(59152),PRE_UPDATE:e(44512),SHUTDOWN:e(15757),START:e(41637),UPDATE:e(93802)}},97421:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a,l){this.pad=a,this.events=a.events,this.index=l,this.value=0,this.threshold=.1},update:function(h){this.value=h},getValue:function(){return Math.abs(this.value){/** + */var r=e(83419),d=new r({initialize:function(a,l){this.pad=a,this.events=a.events,this.index=l,this.value=0,this.threshold=.1},update:function(h){this.value=h},getValue:function(){return Math.abs(this.value){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(92734),h=new r({initialize:function(l,n){this.pad=l,this.events=l.manager,this.index=n,this.value=0,this.threshold=1,this.pressed=!1},update:function(a){this.value=a;var l=this.pad,n=this.index;a>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(d.BUTTON_DOWN,l,this,a),this.pad.emit(d.GAMEPAD_BUTTON_DOWN,n,a,this)):this.pressed&&(this.pressed=!1,this.events.emit(d.BUTTON_UP,l,this,a),this.pad.emit(d.GAMEPAD_BUTTON_UP,n,a,this))},destroy:function(){this.pad=null,this.events=null}});s.exports=h},99125:(s,y,e)=>{/** + */var r=e(83419),d=e(92734),h=new r({initialize:function(l,n){this.pad=l,this.events=l.manager,this.index=n,this.value=0,this.threshold=1,this.pressed=!1},update:function(a){this.value=a;var l=this.pad,n=this.index;a>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(d.BUTTON_DOWN,l,this,a),this.pad.emit(d.GAMEPAD_BUTTON_DOWN,n,a,this)):this.pressed&&(this.pressed=!1,this.events.emit(d.BUTTON_UP,l,this,a),this.pad.emit(d.GAMEPAD_BUTTON_UP,n,a,this))},destroy:function(){this.pad=null,this.events=null}});s.exports=h},99125:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(97421),d=e(28884),h=e(83419),a=e(50792),l=e(26099),n=new h({Extends:a,initialize:function(f,o){a.call(this),this.manager=f,this.pad=o,this.id=o.id,this.index=o.index;for(var c=[],p=0;p=2&&(this.leftStick.set(v[0].getValue(),v[1].getValue()),p>=4&&this.rightStick.set(v[2].getValue(),v[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var u;for(u=0;u{/** + */var r=e(97421),d=e(28884),h=e(83419),a=e(50792),l=e(26099),n=new h({Extends:a,initialize:function(f,o){a.call(this),this.manager=f,this.pad=o,this.id=o.id,this.index=o.index;for(var c=[],p=0;p=2&&(this.leftStick.set(v[0].getValue(),v[1].getValue()),p>=4&&this.rightStick.set(v[2].getValue(),v[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var u;for(u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3274,7 +3274,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},64894:(s,y,e)=>{/** + */s.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},64894:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3302,23 +3302,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="up"},92734:(s,y,e)=>{/** + */s.exports="up"},92734:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={BUTTON_DOWN:e(46008),BUTTON_UP:e(7629),CONNECTED:e(42206),DISCONNECTED:e(86544),GAMEPAD_BUTTON_DOWN:e(94784),GAMEPAD_BUTTON_UP:e(14325)}},48646:(s,y,e)=>{/** + */s.exports={BUTTON_DOWN:e(46008),BUTTON_UP:e(7629),CONNECTED:e(42206),DISCONNECTED:e(86544),GAMEPAD_BUTTON_DOWN:e(94784),GAMEPAD_BUTTON_UP:e(14325)}},48646:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Axis:e(97421),Button:e(28884),Events:e(92734),Gamepad:e(99125),GamepadPlugin:e(56654),Configs:e(64894)}},14350:(s,y,e)=>{/** + */s.exports={Axis:e(97421),Button:e(28884),Events:e(92734),Gamepad:e(99125),GamepadPlugin:e(56654),Configs:e(64894)}},14350:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(93301),d=e(79291),h={CreatePixelPerfectHandler:e(84409),CreateInteractiveObject:e(74457),Events:e(8214),Gamepad:e(48646),InputManager:e(7003),InputPlugin:e(48205),InputPluginCache:e(89639),Keyboard:e(51442),Mouse:e(87078),Pointer:e(42515),Touch:e(95618)};h=d(!1,h,r),s.exports=h},78970:(s,y,e)=>{/** + */var r=e(93301),d=e(79291),h={CreatePixelPerfectHandler:e(84409),CreateInteractiveObject:e(74457),Events:e(8214),Gamepad:e(48646),InputManager:e(7003),InputPlugin:e(48205),InputPluginCache:e(89639),Keyboard:e(51442),Mouse:e(87078),Pointer:e(42515),Touch:e(95618)};h=d(!1,h,r),s.exports=h},78970:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(72905),d=e(83419),h=e(8443),a=e(8214),l=e(46032),n=e(29747),u=new d({initialize:function(o){this.manager=o,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=n,this.onKeyUp=n,o.events.once(a.MANAGER_BOOT,this.boot,this)},boot:function(){var f=this.manager.config;this.enabled=f.inputKeyboard,this.target=f.inputKeyboardEventTarget,this.addCapture(f.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(h.POST_STEP,this.postUpdate,this)},startListeners:function(){var f=this;this.onKeyDown=function(c){if(!(c.defaultPrevented||!f.enabled||!f.manager)){f.queue.push(c),f.manager.events.emit(a.MANAGER_PROCESS);var p=c.altKey||c.ctrlKey||c.shiftKey||c.metaKey;f.preventDefault&&!p&&f.captures.indexOf(c.keyCode)>-1&&c.preventDefault()}},this.onKeyUp=function(c){if(!(c.defaultPrevented||!f.enabled||!f.manager)){f.queue.push(c),f.manager.events.emit(a.MANAGER_PROCESS);var p=c.altKey||c.ctrlKey||c.shiftKey||c.metaKey;f.preventDefault&&!p&&f.captures.indexOf(c.keyCode)>-1&&c.preventDefault()}};var o=this.target;o&&(o.addEventListener("keydown",this.onKeyDown,!1),o.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var f=this.target;f.removeEventListener("keydown",this.onKeyDown,!1),f.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(f){typeof f=="string"&&(f=f.split(",")),Array.isArray(f)||(f=[f]);for(var o=this.captures,c=0;c0},removeCapture:function(f){typeof f=="string"&&(f=f.split(",")),Array.isArray(f)||(f=[f]);for(var o=this.captures,c=0;c0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(h.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});s.exports=u},28846:(s,y,e)=>{/** + */var r=e(72905),d=e(83419),h=e(8443),a=e(8214),l=e(46032),n=e(29747),u=new d({initialize:function(o){this.manager=o,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=n,this.onKeyUp=n,o.events.once(a.MANAGER_BOOT,this.boot,this)},boot:function(){var f=this.manager.config;this.enabled=f.inputKeyboard,this.target=f.inputKeyboardEventTarget,this.addCapture(f.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(h.POST_STEP,this.postUpdate,this)},startListeners:function(){var f=this;this.onKeyDown=function(c){if(!(c.defaultPrevented||!f.enabled||!f.manager)){f.queue.push(c),f.manager.events.emit(a.MANAGER_PROCESS);var p=c.altKey||c.ctrlKey||c.shiftKey||c.metaKey;f.preventDefault&&!p&&f.captures.indexOf(c.keyCode)>-1&&c.preventDefault()}},this.onKeyUp=function(c){if(!(c.defaultPrevented||!f.enabled||!f.manager)){f.queue.push(c),f.manager.events.emit(a.MANAGER_PROCESS);var p=c.altKey||c.ctrlKey||c.shiftKey||c.metaKey;f.preventDefault&&!p&&f.captures.indexOf(c.keyCode)>-1&&c.preventDefault()}};var o=this.target;o&&(o.addEventListener("keydown",this.onKeyDown,!1),o.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var f=this.target;f.removeEventListener("keydown",this.onKeyDown,!1),f.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(f){typeof f=="string"&&(f=f.split(",")),Array.isArray(f)||(f=[f]);for(var o=this.captures,c=0;c0},removeCapture:function(f){typeof f=="string"&&(f=f.split(",")),Array.isArray(f)||(f=[f]);for(var o=this.captures,c=0;c0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(h.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});s.exports=u},28846:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3326,11 +3326,11 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r.timeLastMatched=e.timeStamp,r.index++,r.index===r.size?!0:(r.current=r.keyCodes[r.index],!1)};s.exports=y},87960:(s,y,e)=>{/** + */var x=function(e,r){return r.timeLastMatched=e.timeStamp,r.index++,r.index===r.size?!0:(r.current=r.keyCodes[r.index],!1)};s.exports=x},87960:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(95922),h=e(95540),a=e(68769),l=e(92803),n=new r({initialize:function(f,o,c){if(c===void 0&&(c={}),o.length<2)return!1;this.manager=f,this.enabled=!0,this.keyCodes=[];for(var p=0;p{/** + */var r=e(83419),d=e(95922),h=e(95540),a=e(68769),l=e(92803),n=new r({initialize:function(f,o,c){if(c===void 0&&(c={}),o.length<2)return!1;this.manager=f,this.enabled=!0,this.keyCodes=[];for(var p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3338,7 +3338,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.current=e.keyCodes[0],e.index=0,e.timeLastMatched=0,e.matched=!1,e.timeMatched=0,e};s.exports=y},92612:s=>{/** + */var x=function(e){return e.current=e.keyCodes[0],e.index=0,e.timeLastMatched=0,e.matched=!1,e.timeMatched=0,e};s.exports=x},92612:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3366,11 +3366,11 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="up"},95922:(s,y,e)=>{/** + */s.exports="up"},95922:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={ANY_KEY_DOWN:e(92612),ANY_KEY_UP:e(23345),COMBO_MATCH:e(21957),DOWN:e(44743),KEY_DOWN:e(3771),KEY_UP:e(46358),UP:e(75674)}},51442:(s,y,e)=>{/** + */s.exports={ANY_KEY_DOWN:e(92612),ANY_KEY_UP:e(23345),COMBO_MATCH:e(21957),DOWN:e(44743),KEY_DOWN:e(3771),KEY_UP:e(46358),UP:e(75674)}},51442:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3378,15 +3378,15 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){r===void 0&&(r=50);var d=e.plugin.game.loop.time-e.timeDown;return e.isDown&&d{/** + */var x=function(e,r){r===void 0&&(r=50);var d=e.plugin.game.loop.time-e.timeDown;return e.isDown&&d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e._justDown?(e._justDown=!1,!0):!1};s.exports=y},38796:s=>{/** + */var x=function(e){return e._justDown?(e._justDown=!1,!0):!1};s.exports=x},38796:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e._justUp?(e._justUp=!1,!0):!1};s.exports=y},30472:(s,y,e)=>{/** + */var x=function(e){return e._justUp?(e._justUp=!1,!0):!1};s.exports=x},30472:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3394,7 +3394,7 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175};s.exports=y},74600:(s,y,e)=>{/** + */var x={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175};s.exports=x},74600:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3402,23 +3402,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){r===void 0&&(r=50);var d=e.plugin.game.loop.time-e.timeUp;return e.isUp&&d{/** + */var x=function(e,r){r===void 0&&(r=50);var d=e.plugin.game.loop.time-e.timeUp;return e.isUp&&d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(89357),h=e(8214),a=e(29747),l=new r({initialize:function(u){this.manager=u,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=a,this.onMouseDown=a,this.onMouseUp=a,this.onMouseDownWindow=a,this.onMouseUpWindow=a,this.onMouseOver=a,this.onMouseOut=a,this.onMouseWheel=a,this.pointerLockChange=a,this.isTop=!0,u.events.once(h.MANAGER_BOOT,this.boot,this)},boot:function(){var n=this.manager.config;this.enabled=n.inputMouse,this.target=n.inputMouseEventTarget,this.passive=n.inputMousePassive,this.preventDefaultDown=n.inputMousePreventDefaultDown,this.preventDefaultUp=n.inputMousePreventDefaultUp,this.preventDefaultMove=n.inputMousePreventDefaultMove,this.preventDefaultWheel=n.inputMousePreventDefaultWheel,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,n.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(n){return n.preventDefault(),!1}),this},requestPointerLock:function(){if(d.pointerLock){var n=this.target;n.requestPointerLock=n.requestPointerLock||n.mozRequestPointerLock||n.webkitRequestPointerLock,n.requestPointerLock()}},releasePointerLock:function(){d.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var n=this.target;if(n){var u=this,f=this.manager,o=f.canvas,c=window&&window.focus&&f.game.config.autoFocus;this.onMouseMove=function(v){!v.defaultPrevented&&u.enabled&&f&&f.enabled&&(f.onMouseMove(v),u.preventDefaultMove&&v.preventDefault())},this.onMouseDown=function(v){c&&window.focus(),!v.defaultPrevented&&u.enabled&&f&&f.enabled&&(f.onMouseDown(v),u.preventDefaultDown&&v.target===o&&v.preventDefault())},this.onMouseDownWindow=function(v){v.sourceCapabilities&&v.sourceCapabilities.firesTouchEvents||!v.defaultPrevented&&u.enabled&&f&&f.enabled&&v.target!==o&&f.onMouseDown(v)},this.onMouseUp=function(v){!v.defaultPrevented&&u.enabled&&f&&f.enabled&&(f.onMouseUp(v),u.preventDefaultUp&&v.target===o&&v.preventDefault())},this.onMouseUpWindow=function(v){v.sourceCapabilities&&v.sourceCapabilities.firesTouchEvents||!v.defaultPrevented&&u.enabled&&f&&f.enabled&&v.target!==o&&f.onMouseUp(v)},this.onMouseOver=function(v){!v.defaultPrevented&&u.enabled&&f&&f.enabled&&f.setCanvasOver(v)},this.onMouseOut=function(v){!v.defaultPrevented&&u.enabled&&f&&f.enabled&&f.setCanvasOut(v)},this.onMouseWheel=function(v){!v.defaultPrevented&&u.enabled&&f&&f.enabled&&f.onMouseWheel(v),u.preventDefaultWheel&&v.target===o&&v.preventDefault()};var p={passive:!0};if(n.addEventListener("mousemove",this.onMouseMove),n.addEventListener("mousedown",this.onMouseDown),n.addEventListener("mouseup",this.onMouseUp),n.addEventListener("mouseover",this.onMouseOver,p),n.addEventListener("mouseout",this.onMouseOut,p),this.preventDefaultWheel?n.addEventListener("wheel",this.onMouseWheel,{passive:!1}):n.addEventListener("wheel",this.onMouseWheel,p),window&&f.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,p),window.top.addEventListener("mouseup",this.onMouseUpWindow,p)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,p),window.addEventListener("mouseup",this.onMouseUpWindow,p),this.isTop=!1}d.pointerLock&&(this.pointerLockChange=function(v){var m=u.target;u.locked=document.pointerLockElement===m||document.mozPointerLockElement===m||document.webkitPointerLockElement===m,f.onPointerLockChange(v)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var n=this.target;n.removeEventListener("mousemove",this.onMouseMove),n.removeEventListener("mousedown",this.onMouseDown),n.removeEventListener("mouseup",this.onMouseUp),n.removeEventListener("mouseover",this.onMouseOver),n.removeEventListener("mouseout",this.onMouseOut),window&&(n=this.isTop?window.top:window,n.removeEventListener("mousedown",this.onMouseDownWindow),n.removeEventListener("mouseup",this.onMouseUpWindow)),d.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});s.exports=l},87078:(s,y,e)=>{/** + */var r=e(83419),d=e(89357),h=e(8214),a=e(29747),l=new r({initialize:function(u){this.manager=u,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=a,this.onMouseDown=a,this.onMouseUp=a,this.onMouseDownWindow=a,this.onMouseUpWindow=a,this.onMouseOver=a,this.onMouseOut=a,this.onMouseWheel=a,this.pointerLockChange=a,this.isTop=!0,u.events.once(h.MANAGER_BOOT,this.boot,this)},boot:function(){var n=this.manager.config;this.enabled=n.inputMouse,this.target=n.inputMouseEventTarget,this.passive=n.inputMousePassive,this.preventDefaultDown=n.inputMousePreventDefaultDown,this.preventDefaultUp=n.inputMousePreventDefaultUp,this.preventDefaultMove=n.inputMousePreventDefaultMove,this.preventDefaultWheel=n.inputMousePreventDefaultWheel,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,n.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(n){return n.preventDefault(),!1}),this},requestPointerLock:function(){if(d.pointerLock){var n=this.target;n.requestPointerLock=n.requestPointerLock||n.mozRequestPointerLock||n.webkitRequestPointerLock,n.requestPointerLock()}},releasePointerLock:function(){d.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var n=this.target;if(n){var u=this,f=this.manager,o=f.canvas,c=window&&window.focus&&f.game.config.autoFocus;this.onMouseMove=function(v){!v.defaultPrevented&&u.enabled&&f&&f.enabled&&(f.onMouseMove(v),u.preventDefaultMove&&v.preventDefault())},this.onMouseDown=function(v){c&&window.focus(),!v.defaultPrevented&&u.enabled&&f&&f.enabled&&(f.onMouseDown(v),u.preventDefaultDown&&v.target===o&&v.preventDefault())},this.onMouseDownWindow=function(v){v.sourceCapabilities&&v.sourceCapabilities.firesTouchEvents||!v.defaultPrevented&&u.enabled&&f&&f.enabled&&v.target!==o&&f.onMouseDown(v)},this.onMouseUp=function(v){!v.defaultPrevented&&u.enabled&&f&&f.enabled&&(f.onMouseUp(v),u.preventDefaultUp&&v.target===o&&v.preventDefault())},this.onMouseUpWindow=function(v){v.sourceCapabilities&&v.sourceCapabilities.firesTouchEvents||!v.defaultPrevented&&u.enabled&&f&&f.enabled&&v.target!==o&&f.onMouseUp(v)},this.onMouseOver=function(v){!v.defaultPrevented&&u.enabled&&f&&f.enabled&&f.setCanvasOver(v)},this.onMouseOut=function(v){!v.defaultPrevented&&u.enabled&&f&&f.enabled&&f.setCanvasOut(v)},this.onMouseWheel=function(v){!v.defaultPrevented&&u.enabled&&f&&f.enabled&&f.onMouseWheel(v),u.preventDefaultWheel&&v.target===o&&v.preventDefault()};var p={passive:!0};if(n.addEventListener("mousemove",this.onMouseMove),n.addEventListener("mousedown",this.onMouseDown),n.addEventListener("mouseup",this.onMouseUp),n.addEventListener("mouseover",this.onMouseOver,p),n.addEventListener("mouseout",this.onMouseOut,p),this.preventDefaultWheel?n.addEventListener("wheel",this.onMouseWheel,{passive:!1}):n.addEventListener("wheel",this.onMouseWheel,p),window&&f.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,p),window.top.addEventListener("mouseup",this.onMouseUpWindow,p)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,p),window.addEventListener("mouseup",this.onMouseUpWindow,p),this.isTop=!1}d.pointerLock&&(this.pointerLockChange=function(v){var m=u.target;u.locked=document.pointerLockElement===m||document.mozPointerLockElement===m||document.webkitPointerLockElement===m,f.onPointerLockChange(v)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var n=this.target;n.removeEventListener("mousemove",this.onMouseMove),n.removeEventListener("mousedown",this.onMouseDown),n.removeEventListener("mouseup",this.onMouseUp),n.removeEventListener("mouseover",this.onMouseOver),n.removeEventListener("mouseout",this.onMouseOut),window&&(n=this.isTop?window.top:window,n.removeEventListener("mousedown",this.onMouseDownWindow),n.removeEventListener("mouseup",this.onMouseUpWindow)),d.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});s.exports=l},87078:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={MouseManager:e(85098)}},36210:(s,y,e)=>{/** + */s.exports={MouseManager:e(85098)}},36210:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(8214),h=e(29747),a=new r({initialize:function(n){this.manager=n,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=h,this.onTouchStartWindow=h,this.onTouchMove=h,this.onTouchEnd=h,this.onTouchEndWindow=h,this.onTouchCancel=h,this.onTouchCancelWindow=h,this.isTop=!0,n.events.once(d.MANAGER_BOOT,this.boot,this)},boot:function(){var l=this.manager.config;this.enabled=l.inputTouch,this.target=l.inputTouchEventTarget,this.capture=l.inputTouchCapture,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,l.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(l){return l.preventDefault(),!1}),this},startListeners:function(){var l=this.target;if(l){var n=this,u=this.manager,f=u.canvas,o=window&&window.focus&&u.game.config.autoFocus;this.onTouchMove=function(m){!m.defaultPrevented&&n.enabled&&u&&u.enabled&&(u.onTouchMove(m),n.capture&&m.cancelable&&m.preventDefault())},this.onTouchStart=function(m){o&&window.focus(),!m.defaultPrevented&&n.enabled&&u&&u.enabled&&(u.onTouchStart(m),n.capture&&m.cancelable&&m.target===f&&m.preventDefault())},this.onTouchStartWindow=function(m){!m.defaultPrevented&&n.enabled&&u&&u.enabled&&m.target!==f&&u.onTouchStart(m)},this.onTouchEnd=function(m){!m.defaultPrevented&&n.enabled&&u&&u.enabled&&(u.onTouchEnd(m),n.capture&&m.cancelable&&m.target===f&&m.preventDefault())},this.onTouchEndWindow=function(m){!m.defaultPrevented&&n.enabled&&u&&u.enabled&&m.target!==f&&u.onTouchEnd(m)},this.onTouchCancel=function(m){!m.defaultPrevented&&n.enabled&&u&&u.enabled&&(u.onTouchCancel(m),n.capture&&m.preventDefault())},this.onTouchCancelWindow=function(m){!m.defaultPrevented&&n.enabled&&u&&u.enabled&&u.onTouchCancel(m)};var c=this.capture,p={passive:!0},v={passive:!1};if(l.addEventListener("touchstart",this.onTouchStart,c?v:p),l.addEventListener("touchmove",this.onTouchMove,c?v:p),l.addEventListener("touchend",this.onTouchEnd,c?v:p),l.addEventListener("touchcancel",this.onTouchCancel,c?v:p),window&&u.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,v),window.top.addEventListener("touchend",this.onTouchEndWindow,v),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,v)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,v),window.addEventListener("touchend",this.onTouchEndWindow,v),window.addEventListener("touchcancel",this.onTouchCancelWindow,v),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var l=this.target;l.removeEventListener("touchstart",this.onTouchStart),l.removeEventListener("touchmove",this.onTouchMove),l.removeEventListener("touchend",this.onTouchEnd),l.removeEventListener("touchcancel",this.onTouchCancel),window&&(l=this.isTop?window.top:window,l.removeEventListener("touchstart",this.onTouchStartWindow),l.removeEventListener("touchend",this.onTouchEndWindow),l.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});s.exports=a},95618:(s,y,e)=>{/** + */var r=e(83419),d=e(8214),h=e(29747),a=new r({initialize:function(n){this.manager=n,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=h,this.onTouchStartWindow=h,this.onTouchMove=h,this.onTouchEnd=h,this.onTouchEndWindow=h,this.onTouchCancel=h,this.onTouchCancelWindow=h,this.isTop=!0,n.events.once(d.MANAGER_BOOT,this.boot,this)},boot:function(){var l=this.manager.config;this.enabled=l.inputTouch,this.target=l.inputTouchEventTarget,this.capture=l.inputTouchCapture,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,l.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(l){return l.preventDefault(),!1}),this},startListeners:function(){var l=this.target;if(l){var n=this,u=this.manager,f=u.canvas,o=window&&window.focus&&u.game.config.autoFocus;this.onTouchMove=function(m){!m.defaultPrevented&&n.enabled&&u&&u.enabled&&(u.onTouchMove(m),n.capture&&m.cancelable&&m.preventDefault())},this.onTouchStart=function(m){o&&window.focus(),!m.defaultPrevented&&n.enabled&&u&&u.enabled&&(u.onTouchStart(m),n.capture&&m.cancelable&&m.target===f&&m.preventDefault())},this.onTouchStartWindow=function(m){!m.defaultPrevented&&n.enabled&&u&&u.enabled&&m.target!==f&&u.onTouchStart(m)},this.onTouchEnd=function(m){!m.defaultPrevented&&n.enabled&&u&&u.enabled&&(u.onTouchEnd(m),n.capture&&m.cancelable&&m.target===f&&m.preventDefault())},this.onTouchEndWindow=function(m){!m.defaultPrevented&&n.enabled&&u&&u.enabled&&m.target!==f&&u.onTouchEnd(m)},this.onTouchCancel=function(m){!m.defaultPrevented&&n.enabled&&u&&u.enabled&&(u.onTouchCancel(m),n.capture&&m.preventDefault())},this.onTouchCancelWindow=function(m){!m.defaultPrevented&&n.enabled&&u&&u.enabled&&u.onTouchCancel(m)};var c=this.capture,p={passive:!0},v={passive:!1};if(l.addEventListener("touchstart",this.onTouchStart,c?v:p),l.addEventListener("touchmove",this.onTouchMove,c?v:p),l.addEventListener("touchend",this.onTouchEnd,c?v:p),l.addEventListener("touchcancel",this.onTouchCancel,c?v:p),window&&u.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,v),window.top.addEventListener("touchend",this.onTouchEndWindow,v),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,v)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,v),window.addEventListener("touchend",this.onTouchEndWindow,v),window.addEventListener("touchcancel",this.onTouchCancelWindow,v),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var l=this.target;l.removeEventListener("touchstart",this.onTouchStart),l.removeEventListener("touchmove",this.onTouchMove),l.removeEventListener("touchend",this.onTouchEnd),l.removeEventListener("touchcancel",this.onTouchCancel),window&&(l=this.isTop?window.top:window,l.removeEventListener("touchstart",this.onTouchStartWindow),l.removeEventListener("touchend",this.onTouchEndWindow),l.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});s.exports=a},95618:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={TouchManager:e(36210)}},41299:(s,y,e)=>{/** + */s.exports={TouchManager:e(36210)}},41299:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3426,23 +3426,23 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={},e={install:function(r){for(var d in y)r[d]=y[d]},register:function(r,d){y[r]=d},destroy:function(){y={}}};s.exports=e},98356:s=>{/** + */var x={},e={install:function(r){for(var d in x)r[d]=x[d]},register:function(r,d){x[r]=d},destroy:function(){x={}}};s.exports=e},98356:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.url?e.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?e.url:r+e.url:!1};s.exports=y},74261:(s,y,e)=>{/** + */var x=function(e,r){return e.url?e.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?e.url:r+e.url:!1};s.exports=x},74261:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(35072),a=e(50792),l=e(54899),n=e(74099),u=e(95540),f=e(35154),o=e(37277),c=e(44594),p=e(92638),v=new r({Extends:a,initialize:function(S){a.call(this);var M=S.sys.game.config,w=S.sys.settings.loader;this.scene=S,this.systems=S.sys,this.cacheManager=S.sys.cache,this.textureManager=S.sys.textures,this.sceneManager=S.sys.game.scene,n.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(u(w,"baseURL",M.loaderBaseURL)),this.setPath(u(w,"path",M.loaderPath)),this.setPrefix(u(w,"prefix",M.loaderPrefix)),this.maxParallelDownloads=u(w,"maxParallelDownloads",M.loaderMaxParallelDownloads),this.xhr=p(u(w,"responseType",M.loaderResponseType),u(w,"async",M.loaderAsync),u(w,"user",M.loaderUser),u(w,"password",M.loaderPassword),u(w,"timeout",M.loaderTimeout),u(w,"withCredentials",M.loaderWithCredentials)),this.crossOrigin=u(w,"crossOrigin",M.loaderCrossOrigin),this.imageLoadType=u(w,"imageLoadType",M.loaderImageLoadType),this.localSchemes=u(w,"localScheme",M.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new h,this.inflight=new h,this.queue=new h,this._deleteQueue=new h,this.totalFailed=0,this.totalComplete=0,this.state=d.LOADER_IDLE,this.multiKeyIndex=0,S.sys.events.once(c.BOOT,this.boot,this),S.sys.events.on(c.START,this.pluginStart,this)},boot:function(){this.systems.events.once(c.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(c.SHUTDOWN,this.shutdown,this)},setBaseURL:function(m){return m===void 0&&(m=""),m!==""&&m.substr(-1)!=="/"&&(m=m.concat("/")),this.baseURL=m,this},setPath:function(m){return m===void 0&&(m=""),m!==""&&m.substr(-1)!=="/"&&(m=m.concat("/")),this.path=m,this},setPrefix:function(m){return m===void 0&&(m=""),this.prefix=m,this},setCORS:function(m){return this.crossOrigin=m,this},addFile:function(m){Array.isArray(m)||(m=[m]);for(var S=0;S0},isLoading:function(){return this.state===d.LOADER_LOADING||this.state===d.LOADER_PROCESSING},isReady:function(){return this.state===d.LOADER_IDLE||this.state===d.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(l.START,this),this.list.size===0?this.loadComplete():(this.state=d.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(l.PROGRESS,this.progress)},update:function(){this.state===d.LOADER_LOADING&&this.list.size>0&&this.inflight.size{/** + */var r=e(83419),d=e(23906),h=e(35072),a=e(50792),l=e(54899),n=e(74099),u=e(95540),f=e(35154),o=e(37277),c=e(44594),p=e(92638),v=new r({Extends:a,initialize:function(S){a.call(this);var M=S.sys.game.config,w=S.sys.settings.loader;this.scene=S,this.systems=S.sys,this.cacheManager=S.sys.cache,this.textureManager=S.sys.textures,this.sceneManager=S.sys.game.scene,n.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(u(w,"baseURL",M.loaderBaseURL)),this.setPath(u(w,"path",M.loaderPath)),this.setPrefix(u(w,"prefix",M.loaderPrefix)),this.maxParallelDownloads=u(w,"maxParallelDownloads",M.loaderMaxParallelDownloads),this.xhr=p(u(w,"responseType",M.loaderResponseType),u(w,"async",M.loaderAsync),u(w,"user",M.loaderUser),u(w,"password",M.loaderPassword),u(w,"timeout",M.loaderTimeout),u(w,"withCredentials",M.loaderWithCredentials)),this.crossOrigin=u(w,"crossOrigin",M.loaderCrossOrigin),this.imageLoadType=u(w,"imageLoadType",M.loaderImageLoadType),this.localSchemes=u(w,"localScheme",M.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new h,this.inflight=new h,this.queue=new h,this._deleteQueue=new h,this.totalFailed=0,this.totalComplete=0,this.state=d.LOADER_IDLE,this.multiKeyIndex=0,S.sys.events.once(c.BOOT,this.boot,this),S.sys.events.on(c.START,this.pluginStart,this)},boot:function(){this.systems.events.once(c.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(c.SHUTDOWN,this.shutdown,this)},setBaseURL:function(m){return m===void 0&&(m=""),m!==""&&m.substr(-1)!=="/"&&(m=m.concat("/")),this.baseURL=m,this},setPath:function(m){return m===void 0&&(m=""),m!==""&&m.substr(-1)!=="/"&&(m=m.concat("/")),this.path=m,this},setPrefix:function(m){return m===void 0&&(m=""),this.prefix=m,this},setCORS:function(m){return this.crossOrigin=m,this},addFile:function(m){Array.isArray(m)||(m=[m]);for(var S=0;S0},isLoading:function(){return this.state===d.LOADER_LOADING||this.state===d.LOADER_PROCESSING},isReady:function(){return this.state===d.LOADER_IDLE||this.state===d.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(l.START,this),this.list.size===0?this.loadComplete():(this.state=d.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(l.PROGRESS,this.progress)},update:function(){this.state===d.LOADER_LOADING&&this.list.size>0&&this.inflight.size{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(79291),d=e(92638),h=function(a,l){var n=a===void 0?d():r({},a);if(l)for(var u in l)l[u]!==void 0&&(n[u]=l[u]);return n};s.exports=h},26430:(s,y,e)=>{/** + */var r=e(79291),d=e(92638),h=function(a,l){var n=a===void 0?d():r({},a);if(l)for(var u in l)l[u]!==void 0&&(n[u]=l[u]);return n};s.exports=h},26430:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(54899),a=new r({initialize:function(n,u,f,o){var c=[];o.forEach(function(m){m&&c.push(m)}),this.loader=n,this.type=u,this.key=f;var p=this.key;n.prefix&&n.prefix!==""&&(this.key=n.prefix+p),this.multiKeyIndex=n.multiKeyIndex++,this.files=c,this.state=d.FILE_PENDING,this.complete=!1,this.pending=c.length,this.failed=0,this.config={},this.baseURL=n.baseURL,this.path=n.path,this.prefix=n.prefix;for(var v=0;v{/** + */var r=e(83419),d=e(23906),h=e(54899),a=new r({initialize:function(n,u,f,o){var c=[];o.forEach(function(m){m&&c.push(m)}),this.loader=n,this.type=u,this.key=f;var p=this.key;n.prefix&&n.prefix!==""&&(this.key=n.prefix+p),this.multiKeyIndex=n.multiKeyIndex++,this.files=c,this.state=d.FILE_PENDING,this.complete=!1,this.pending=c.length,this.failed=0,this.config={},this.baseURL=n.baseURL,this.path=n.path,this.prefix=n.prefix;for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3450,11 +3450,11 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h,a,l){return e===void 0&&(e=""),r===void 0&&(r=!0),d===void 0&&(d=""),h===void 0&&(h=""),a===void 0&&(a=0),l===void 0&&(l=!1),{responseType:e,async:r,user:d,password:h,timeout:a,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:l}};s.exports=y},23906:s=>{/** + */var x=function(e,r,d,h,a,l){return e===void 0&&(e=""),r===void 0&&(r=!0),d===void 0&&(d=""),h===void 0&&(h=""),a===void 0&&(a=0),l===void 0&&(l=!1),{responseType:e,async:r,user:d,password:h,timeout:a,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:l}};s.exports=x},23906:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20};s.exports=y},42155:s=>{/** + */var x={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20};s.exports=x},42155:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3494,152 +3494,152 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as jd,R as Du,r as Me,c * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="start"},54899:(s,y,e)=>{/** + */s.exports="start"},54899:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={ADD:e(42155),COMPLETE:e(38991),FILE_COMPLETE:e(27540),FILE_KEY_COMPLETE:e(87464),FILE_LOAD_ERROR:e(94486),FILE_LOAD:e(13035),FILE_PROGRESS:e(38144),POST_PROCESS:e(97520),PROGRESS:e(85595),START:e(55680)}},14135:(s,y,e)=>{/** + */s.exports={ADD:e(42155),COMPLETE:e(38991),FILE_COMPLETE:e(27540),FILE_KEY_COMPLETE:e(87464),FILE_LOAD_ERROR:e(94486),FILE_LOAD:e(13035),FILE_PROGRESS:e(38144),POST_PROCESS:e(97520),PROGRESS:e(85595),START:e(55680)}},14135:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(74099),h=e(518),a=e(54899),l=new r({Extends:h,initialize:function(u,f,o,c,p){h.call(this,u,f,o,c,p),this.type="animationJSON"},onProcess:function(){this.loader.once(a.POST_PROCESS,this.onLoadComplete,this),h.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});d.register("animation",function(n,u,f,o){if(Array.isArray(n))for(var c=0;c{/** + */var r=e(83419),d=e(74099),h=e(518),a=e(54899),l=new r({Extends:h,initialize:function(u,f,o,c,p){h.call(this,u,f,o,c,p),this.type="animationJSON"},onProcess:function(){this.loader.once(a.POST_PROCESS,this.onLoadComplete,this),h.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});d.register("animation",function(n,u,f,o){if(Array.isArray(n))for(var c=0;c{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(74099),h=e(95540),a=e(19550),l=e(41212),n=e(518),u=e(26430),f=new r({Extends:u,initialize:function(c,p,v,m,S,M){var w,C;if(l(p)){var A=p;p=h(A,"key"),w=new a(c,{key:p,url:h(A,"textureURL"),extension:h(A,"textureExtension","png"),normalMap:h(A,"normalMap"),xhrSettings:h(A,"textureXhrSettings")}),C=new n(c,{key:p,url:h(A,"atlasURL"),extension:h(A,"atlasExtension","json"),xhrSettings:h(A,"atlasXhrSettings")})}else w=new a(c,p,v,S),C=new n(c,p,m,M);w.linkFile?u.call(this,c,"atlasjson",p,[w,C,w.linkFile]):u.call(this,c,"atlasjson",p,[w,C])},addToCache:function(){if(this.isReadyToProcess()){var o=this.files[0],c=this.files[1],p=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(o.key,o.data,c.data,p),c.addToCache(),this.complete=!0}}});d.register("aseprite",function(o,c,p,v,m){var S;if(Array.isArray(o))for(var M=0;M{/** + */var r=e(83419),d=e(74099),h=e(95540),a=e(19550),l=e(41212),n=e(518),u=e(26430),f=new r({Extends:u,initialize:function(c,p,v,m,S,M){var w,C;if(l(p)){var A=p;p=h(A,"key"),w=new a(c,{key:p,url:h(A,"textureURL"),extension:h(A,"textureExtension","png"),normalMap:h(A,"normalMap"),xhrSettings:h(A,"textureXhrSettings")}),C=new n(c,{key:p,url:h(A,"atlasURL"),extension:h(A,"atlasExtension","json"),xhrSettings:h(A,"atlasXhrSettings")})}else w=new a(c,p,v,S),C=new n(c,p,m,M);w.linkFile?u.call(this,c,"atlasjson",p,[w,C,w.linkFile]):u.call(this,c,"atlasjson",p,[w,C])},addToCache:function(){if(this.isReadyToProcess()){var o=this.files[0],c=this.files[1],p=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(o.key,o.data,c.data,p),c.addToCache(),this.complete=!0}}});d.register("aseprite",function(o,c,p,v,m){var S;if(Array.isArray(o))for(var M=0;M{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(74099),h=e(95540),a=e(19550),l=e(41212),n=e(518),u=e(26430),f=new r({Extends:u,initialize:function(c,p,v,m,S,M){var w,C;if(l(p)){var A=p;p=h(A,"key"),w=new a(c,{key:p,url:h(A,"textureURL"),extension:h(A,"textureExtension","png"),normalMap:h(A,"normalMap"),xhrSettings:h(A,"textureXhrSettings")}),C=new n(c,{key:p,url:h(A,"atlasURL"),extension:h(A,"atlasExtension","json"),xhrSettings:h(A,"atlasXhrSettings")})}else w=new a(c,p,v,S),C=new n(c,p,m,M);w.linkFile?u.call(this,c,"atlasjson",p,[w,C,w.linkFile]):u.call(this,c,"atlasjson",p,[w,C])},addToCache:function(){if(this.isReadyToProcess()){var o=this.files[0],c=this.files[1],p=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(o.key,o.data,c.data,p),this.complete=!0}}});d.register("atlas",function(o,c,p,v,m){var S;if(Array.isArray(o))for(var M=0;M{/** + */var r=e(83419),d=e(74099),h=e(95540),a=e(19550),l=e(41212),n=e(518),u=e(26430),f=new r({Extends:u,initialize:function(c,p,v,m,S,M){var w,C;if(l(p)){var A=p;p=h(A,"key"),w=new a(c,{key:p,url:h(A,"textureURL"),extension:h(A,"textureExtension","png"),normalMap:h(A,"normalMap"),xhrSettings:h(A,"textureXhrSettings")}),C=new n(c,{key:p,url:h(A,"atlasURL"),extension:h(A,"atlasExtension","json"),xhrSettings:h(A,"atlasXhrSettings")})}else w=new a(c,p,v,S),C=new n(c,p,m,M);w.linkFile?u.call(this,c,"atlasjson",p,[w,C,w.linkFile]):u.call(this,c,"atlasjson",p,[w,C])},addToCache:function(){if(this.isReadyToProcess()){var o=this.files[0],c=this.files[1],p=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(o.key,o.data,c.data,p),this.complete=!0}}});d.register("atlas",function(o,c,p,v,m){var S;if(Array.isArray(o))for(var M=0;M{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(74099),h=e(95540),a=e(19550),l=e(41212),n=e(26430),u=e(57318),f=new r({Extends:n,initialize:function(c,p,v,m,S,M){var w,C;if(l(p)){var A=p;p=h(A,"key"),w=new a(c,{key:p,url:h(A,"textureURL"),extension:h(A,"textureExtension","png"),normalMap:h(A,"normalMap"),xhrSettings:h(A,"textureXhrSettings")}),C=new u(c,{key:p,url:h(A,"atlasURL"),extension:h(A,"atlasExtension","xml"),xhrSettings:h(A,"atlasXhrSettings")})}else w=new a(c,p,v,S),C=new u(c,p,m,M);w.linkFile?n.call(this,c,"atlasxml",p,[w,C,w.linkFile]):n.call(this,c,"atlasxml",p,[w,C])},addToCache:function(){if(this.isReadyToProcess()){var o=this.files[0],c=this.files[1],p=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(o.key,o.data,c.data,p),this.complete=!0}}});d.register("atlasXML",function(o,c,p,v,m){var S;if(Array.isArray(o))for(var M=0;M{/** + */var r=e(83419),d=e(74099),h=e(95540),a=e(19550),l=e(41212),n=e(26430),u=e(57318),f=new r({Extends:n,initialize:function(c,p,v,m,S,M){var w,C;if(l(p)){var A=p;p=h(A,"key"),w=new a(c,{key:p,url:h(A,"textureURL"),extension:h(A,"textureExtension","png"),normalMap:h(A,"normalMap"),xhrSettings:h(A,"textureXhrSettings")}),C=new u(c,{key:p,url:h(A,"atlasURL"),extension:h(A,"atlasExtension","xml"),xhrSettings:h(A,"atlasXhrSettings")})}else w=new a(c,p,v,S),C=new u(c,p,m,M);w.linkFile?n.call(this,c,"atlasxml",p,[w,C,w.linkFile]):n.call(this,c,"atlasxml",p,[w,C])},addToCache:function(){if(this.isReadyToProcess()){var o=this.files[0],c=this.files[1],p=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(o.key,o.data,c.data,p),this.complete=!0}}});d.register("atlasXML",function(o,c,p,v,m){var S;if(Array.isArray(o))for(var M=0;M{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(89749),u=e(41212),f=new r({Extends:h,initialize:function(c,p,v,m,S){if(u(p)){var M=p;p=l(M,"key"),m=l(M,"xhrSettings"),S=l(M,"context",S)}var w={type:"audio",cache:c.cacheManager.audio,extension:v.type,responseType:"arraybuffer",key:p,url:v.url,xhrSettings:m,config:{context:S}};h.call(this,c,w)},onProcess:function(){this.state=d.FILE_PROCESSING;var o=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(c){o.data=c,o.onProcessComplete()},function(c){console.error("Error decoding audio: "+o.key+" - ",c?c.message:null),o.onProcessError()}),this.config.context=null}});f.create=function(o,c,p,v,m){var S=o.systems.game,M=S.config.audio,w=S.device.audio;u(c)&&(p=l(c,"url",[]),v=l(c,"config",{}));var C=f.getAudioURL(S,p);return C?w.webAudio&&!M.disableWebAudio?new f(o,c,C,m,S.sound.context):new n(o,c,C,v):(console.warn('No audio URLs for "%s" matched this device',c),null)},f.getAudioURL=function(o,c){Array.isArray(c)||(c=[c]);for(var p=0;p{/** + */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(89749),u=e(41212),f=new r({Extends:h,initialize:function(c,p,v,m,S){if(u(p)){var M=p;p=l(M,"key"),m=l(M,"xhrSettings"),S=l(M,"context",S)}var w={type:"audio",cache:c.cacheManager.audio,extension:v.type,responseType:"arraybuffer",key:p,url:v.url,xhrSettings:m,config:{context:S}};h.call(this,c,w)},onProcess:function(){this.state=d.FILE_PROCESSING;var o=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(c){o.data=c,o.onProcessComplete()},function(c){console.error("Error decoding audio: "+o.key+" - ",c?c.message:null),o.onProcessError()}),this.config.context=null}});f.create=function(o,c,p,v,m){var S=o.systems.game,M=S.config.audio,w=S.device.audio;u(c)&&(p=l(c,"url",[]),v=l(c,"config",{}));var C=f.getAudioURL(S,p);return C?w.webAudio&&!M.disableWebAudio?new f(o,c,C,m,S.sound.context):new n(o,c,C,v):(console.warn('No audio URLs for "%s" matched this device',c),null)},f.getAudioURL=function(o,c){Array.isArray(c)||(c=[c]);for(var p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(21097),d=e(83419),h=e(74099),a=e(95540),l=e(41212),n=e(518),u=e(26430),f=new d({Extends:u,initialize:function(c,p,v,m,S,M,w){if(l(p)){var C=p;p=a(C,"key"),v=a(C,"jsonURL"),m=a(C,"audioURL"),S=a(C,"audioConfig"),M=a(C,"audioXhrSettings"),w=a(C,"jsonXhrSettings")}var A;if(!m)A=new n(c,p,v,w),u.call(this,c,"audiosprite",p,[A]),this.config.resourceLoad=!0,this.config.audioConfig=S,this.config.audioXhrSettings=M;else{var P=r.create(c,p,m,S,M);P&&(A=new n(c,p,v,w),u.call(this,c,"audiosprite",p,[P,A]),this.config.resourceLoad=!1)}},onFileComplete:function(o){var c=this.files.indexOf(o);if(c!==-1&&(this.pending--,this.config.resourceLoad&&o.type==="json"&&o.data.hasOwnProperty("resources"))){var p=o.data.resources,v=a(this.config,"audioConfig"),m=a(this.config,"audioXhrSettings"),S=r.create(this.loader,o.key,p,v,m);S&&(this.addToMultiFile(S),this.loader.addFile(S))}},addToCache:function(){if(this.isReadyToProcess()){var o=this.files[0],c=this.files[1];o.addToCache(),c.addToCache(),this.complete=!0}}});h.register("audioSprite",function(o,c,p,v,m,S){var M=this.systems.game,w=M.config.audio,C=M.device.audio;if(w&&w.noAudio||!C.webAudio&&!C.audioData)return this;var A;if(Array.isArray(o))for(var P=0;P{/** + */var r=e(21097),d=e(83419),h=e(74099),a=e(95540),l=e(41212),n=e(518),u=e(26430),f=new d({Extends:u,initialize:function(c,p,v,m,S,M,w){if(l(p)){var C=p;p=a(C,"key"),v=a(C,"jsonURL"),m=a(C,"audioURL"),S=a(C,"audioConfig"),M=a(C,"audioXhrSettings"),w=a(C,"jsonXhrSettings")}var A;if(!m)A=new n(c,p,v,w),u.call(this,c,"audiosprite",p,[A]),this.config.resourceLoad=!0,this.config.audioConfig=S,this.config.audioXhrSettings=M;else{var P=r.create(c,p,m,S,M);P&&(A=new n(c,p,v,w),u.call(this,c,"audiosprite",p,[P,A]),this.config.resourceLoad=!1)}},onFileComplete:function(o){var c=this.files.indexOf(o);if(c!==-1&&(this.pending--,this.config.resourceLoad&&o.type==="json"&&o.data.hasOwnProperty("resources"))){var p=o.data.resources,v=a(this.config,"audioConfig"),m=a(this.config,"audioXhrSettings"),S=r.create(this.loader,o.key,p,v,m);S&&(this.addToMultiFile(S),this.loader.addFile(S))}},addToCache:function(){if(this.isReadyToProcess()){var o=this.files[0],c=this.files[1];o.addToCache(),c.addToCache(),this.complete=!0}}});h.register("audioSprite",function(o,c,p,v,m,S){var M=this.systems.game,w=M.config.audio,C=M.device.audio;if(w&&w.noAudio||!C.webAudio&&!C.audioData)return this;var A;if(Array.isArray(o))for(var P=0;P{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v,m){var S="bin";if(n(c)){var M=c;c=l(M,"key"),p=l(M,"url"),v=l(M,"xhrSettings"),S=l(M,"extension",S),m=l(M,"dataType",m)}var w={type:"binary",cache:o.cacheManager.binary,extension:S,responseType:"arraybuffer",key:c,url:p,xhrSettings:v,config:{dataType:m}};h.call(this,o,w)},onProcess:function(){this.state=d.FILE_PROCESSING;var f=this.config.dataType;this.data=f?new f(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});a.register("binary",function(f,o,c,p){if(Array.isArray(f))for(var v=0;v{/** + */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v,m){var S="bin";if(n(c)){var M=c;c=l(M,"key"),p=l(M,"url"),v=l(M,"xhrSettings"),S=l(M,"extension",S),m=l(M,"dataType",m)}var w={type:"binary",cache:o.cacheManager.binary,extension:S,responseType:"arraybuffer",key:c,url:p,xhrSettings:v,config:{dataType:m}};h.call(this,o,w)},onProcess:function(){this.state=d.FILE_PROCESSING;var f=this.config.dataType;this.data=f?new f(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});a.register("binary",function(f,o,c,p){if(Array.isArray(f))for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(74099),h=e(95540),a=e(19550),l=e(41212),n=e(26430),u=e(21859),f=e(57318),o=new r({Extends:n,initialize:function(p,v,m,S,M,w){var C,A;if(l(v)){var P=v;v=h(P,"key"),C=new a(p,{key:v,url:h(P,"textureURL"),extension:h(P,"textureExtension","png"),normalMap:h(P,"normalMap"),xhrSettings:h(P,"textureXhrSettings")}),A=new f(p,{key:v,url:h(P,"fontDataURL"),extension:h(P,"fontDataExtension","xml"),xhrSettings:h(P,"fontDataXhrSettings")})}else C=new a(p,v,m,M),A=new f(p,v,S,w);C.linkFile?n.call(this,p,"bitmapfont",v,[C,A,C.linkFile]):n.call(this,p,"bitmapfont",v,[C,A])},addToCache:function(){if(this.isReadyToProcess()){var c=this.files[0],p=this.files[1];c.addToCache();var v=c.cache.get(c.key),m=u(p.data,c.cache.getFrame(c.key),0,0,v);this.loader.cacheManager.bitmapFont.add(c.key,{data:m,texture:c.key,frame:null}),this.complete=!0}}});d.register("bitmapFont",function(c,p,v,m,S){var M;if(Array.isArray(c))for(var w=0;w{/** + */var r=e(83419),d=e(74099),h=e(95540),a=e(19550),l=e(41212),n=e(26430),u=e(21859),f=e(57318),o=new r({Extends:n,initialize:function(p,v,m,S,M,w){var C,A;if(l(v)){var P=v;v=h(P,"key"),C=new a(p,{key:v,url:h(P,"textureURL"),extension:h(P,"textureExtension","png"),normalMap:h(P,"normalMap"),xhrSettings:h(P,"textureXhrSettings")}),A=new f(p,{key:v,url:h(P,"fontDataURL"),extension:h(P,"fontDataExtension","xml"),xhrSettings:h(P,"fontDataXhrSettings")})}else C=new a(p,v,m,M),A=new f(p,v,S,w);C.linkFile?n.call(this,p,"bitmapfont",v,[C,A,C.linkFile]):n.call(this,p,"bitmapfont",v,[C,A])},addToCache:function(){if(this.isReadyToProcess()){var c=this.files[0],p=this.files[1];c.addToCache();var v=c.cache.get(c.key),m=u(p.data,c.cache.getFrame(c.key),0,0,v);this.loader.cacheManager.bitmapFont.add(c.key,{data:m,texture:c.key,frame:null}),this.complete=!0}}});d.register("bitmapFont",function(c,p,v,m,S){var M;if(Array.isArray(c))for(var w=0;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v){var m="css";if(n(c)){var S=c;c=l(S,"key"),p=l(S,"url"),v=l(S,"xhrSettings"),m=l(S,"extension",m)}var M={type:"script",cache:!1,extension:m,responseType:"text",key:c,url:p,xhrSettings:v};h.call(this,o,M)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});a.register("css",function(f,o,c){if(Array.isArray(f))for(var p=0;p{/** + */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v){var m="css";if(n(c)){var S=c;c=l(S,"key"),p=l(S,"url"),v=l(S,"xhrSettings"),m=l(S,"extension",m)}var M={type:"script",cache:!1,extension:m,responseType:"text",key:c,url:p,xhrSettings:v};h.call(this,o,M)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});a.register("css",function(f,o,c){if(Array.isArray(f))for(var p=0;p{/** * @author Richard Davey * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(38734),d=e(85722),h=e(83419),a=e(74099),l=e(95540),n=e(19550),u=e(41212),f=e(518),o=e(31403),c=e(46975),p=e(59327),v=e(26430),m=e(82038),S=e(55222),M=new h({Extends:v,initialize:function(C,A,P,b){if(P.multiAtlasURL){var O=new f(C,{key:A,url:P.multiAtlasURL,xhrSettings:b,config:P});v.call(this,C,"texture",A,[O])}else{var I=P.textureURL.substr(P.textureURL.length-3);P.type||(P.type=I.toLowerCase()==="ktx"?"KTX":"PVR");var D=new d(C,{key:A,url:P.textureURL,extension:I,xhrSettings:b,config:P});if(P.atlasURL){var B=new f(C,{key:A,url:P.atlasURL,xhrSettings:b,config:P});v.call(this,C,"texture",A,[D,B])}else v.call(this,C,"texture",A,[D])}this.config=P},onFileComplete:function(w){var C=this.files.indexOf(w);if(C!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(w.type==="json"&&w.data.hasOwnProperty("textures")){var A=w.data.textures,P=this.config,b=this.loader,O=b.baseURL,I=b.path,D=b.prefix,B=l(P,"multiBaseURL",this.baseURL),G=l(P,"multiPath",this.path),z=l(P,"prefix",this.prefix),X=l(P,"textureXhrSettings");B&&b.setBaseURL(B),G&&b.setPath(G),z&&b.setPrefix(z);for(var j=0;j{/** + */var r=e(38734),d=e(85722),h=e(83419),a=e(74099),l=e(95540),n=e(19550),u=e(41212),f=e(518),o=e(31403),c=e(46975),p=e(59327),v=e(26430),m=e(82038),S=e(55222),M=new h({Extends:v,initialize:function(C,A,P,b){if(P.multiAtlasURL){var O=new f(C,{key:A,url:P.multiAtlasURL,xhrSettings:b,config:P});v.call(this,C,"texture",A,[O])}else{var I=P.textureURL.substr(P.textureURL.length-3);P.type||(P.type=I.toLowerCase()==="ktx"?"KTX":"PVR");var D=new d(C,{key:A,url:P.textureURL,extension:I,xhrSettings:b,config:P});if(P.atlasURL){var B=new f(C,{key:A,url:P.atlasURL,xhrSettings:b,config:P});v.call(this,C,"texture",A,[D,B])}else v.call(this,C,"texture",A,[D])}this.config=P},onFileComplete:function(w){var C=this.files.indexOf(w);if(C!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(w.type==="json"&&w.data.hasOwnProperty("textures")){var A=w.data.textures,P=this.config,b=this.loader,O=b.baseURL,I=b.path,D=b.prefix,B=l(P,"multiBaseURL",this.baseURL),G=l(P,"multiPath",this.path),z=l(P,"prefix",this.prefix),X=l(P,"textureXhrSettings");B&&b.setBaseURL(B),G&&b.setPath(G),z&&b.setPrefix(z);for(var j=0;j{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=e(73894),f=new r({Extends:h,initialize:function(c,p,v,m,S){var M="glsl";if(n(p)){var w=p;p=l(w,"key"),v=l(w,"url"),m=l(w,"shaderType","fragment"),S=l(w,"xhrSettings"),M=l(w,"extension",M)}else m===void 0&&(m="fragment");var C={type:"glsl",cache:c.cacheManager.shader,extension:M,responseType:"text",key:p,url:v,config:{shaderType:m},xhrSettings:S};h.call(this,c,C)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var o=this.data.split(` `),c=this.extractBlock(o,0);if(c)for(;c;){var p=this.getShaderName(c.header),v=this.getShaderType(c.header),m=this.getShaderUniforms(c.header),S=c.shader;if(this.cache.has(p)){var M=this.cache.get(p);v==="fragment"?M.fragmentSrc=S:M.vertexSrc=S,M.uniforms||(M.uniforms=m)}else v==="fragment"?this.cache.add(p,new u(p,S,"",m)):this.cache.add(p,new u(p,"",S,m));c=this.extractBlock(o,c.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new u(this.key,this.data)):this.cache.add(this.key,new u(this.key,"",this.data))},getShaderName:function(o){for(var c=0;c{/** +`),offset:m}:null}});a.register("glsl",function(o,c,p,v){if(Array.isArray(o))for(var m=0;m{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(54899),h=e(41299),a=e(95540),l=e(98356),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v){if(n(c)){var m=c;c=a(m,"key"),v=a(m,"config",v)}var S={type:"audio",cache:o.cacheManager.audio,extension:p.type,key:c,url:p.url,config:v};h.call(this,o,S),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var f=0;f{/** + */var r=e(83419),d=e(54899),h=e(41299),a=e(95540),l=e(98356),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v){if(n(c)){var m=c;c=a(m,"key"),v=a(m,"config",v)}var S={type:"audio",cache:o.cacheManager.audio,extension:p.type,key:c,url:p.url,config:v};h.call(this,o,S),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v){var m="html";if(n(c)){var S=c;c=l(S,"key"),p=l(S,"url"),v=l(S,"xhrSettings"),m=l(S,"extension",m)}var M={type:"text",cache:o.cacheManager.html,extension:m,responseType:"text",key:c,url:p,xhrSettings:v};h.call(this,o,M)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("html",function(f,o,c){if(Array.isArray(f))for(var p=0;p{/** + */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v){var m="html";if(n(c)){var S=c;c=l(S,"key"),p=l(S,"url"),v=l(S,"xhrSettings"),m=l(S,"extension",m)}var M={type:"text",cache:o.cacheManager.html,extension:m,responseType:"text",key:c,url:p,xhrSettings:v};h.call(this,o,M)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("html",function(f,o,c){if(Array.isArray(f))for(var p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v,m,S){v===void 0&&(v=512),m===void 0&&(m=512);var M="html";if(n(c)){var w=c;c=l(w,"key"),p=l(w,"url"),S=l(w,"xhrSettings"),M=l(w,"extension",M),v=l(w,"width",v),m=l(w,"height",m)}var C={type:"html",cache:o.textureManager,extension:M,responseType:"text",key:c,url:p,xhrSettings:S,config:{width:v,height:m}};h.call(this,o,C)},onProcess:function(){this.state=d.FILE_PROCESSING;var f=this.config.width,o=this.config.height,c=[];c.push(''),c.push(''),c.push(''),c.push(this.xhrLoader.responseText),c.push(""),c.push(""),c.push("");var p=[c.join(` -`)],v=this;try{var m=new window.Blob(p,{type:"image/svg+xml;charset=utf-8"})}catch{v.state=d.FILE_ERRORED,v.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){h.revokeObjectURL(v.data),v.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(v.data),v.onProcessError()},h.createObjectURL(this.data,m,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});a.register("htmlTexture",function(f,o,c,p,v){if(Array.isArray(f))for(var m=0;m{/** +`)],v=this;try{var m=new window.Blob(p,{type:"image/svg+xml;charset=utf-8"})}catch{v.state=d.FILE_ERRORED,v.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){h.revokeObjectURL(v.data),v.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(v.data),v.onProcessError()},h.createObjectURL(this.data,m,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});a.register("htmlTexture",function(f,o,c,p,v){if(Array.isArray(f))for(var m=0;m{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=e(98356),f=new r({Extends:h,initialize:function o(c,p,v,m,S){var M="png",w;if(n(p)){var C=p;p=l(C,"key"),v=l(C,"url"),w=l(C,"normalMap"),m=l(C,"xhrSettings"),M=l(C,"extension",M),S=l(C,"frameConfig")}Array.isArray(v)&&(w=v[1],v=v[0]);var A={type:"image",cache:c.textureManager,extension:M,responseType:"blob",key:p,url:v,xhrSettings:m,config:S};if(h.call(this,c,A),w){var P=new o(c,this.key,w,m,S);P.type="normalMap",this.setLink(P),c.addFile(P)}this.useImageElementLoad=c.imageLoadType==="HTMLImageElement"||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var o=this;this.data.onload=function(){h.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(o.data),o.onProcessError()},h.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var o=this.state;this.state=d.FILE_PROCESSING,o===d.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=d.FILE_LOADING,this.src=u(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var o=this;this.data.onload=function(){o.state=d.FILE_LOADED,o.loader.nextFile(o,!0)},this.data.onerror=function(){o.loader.nextFile(o,!1)},this.data.src=this.src},addToCache:function(){var o=this.linkFile;o?o.state>=d.FILE_COMPLETE&&(o.type==="spritesheet"?o.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,o.data,this.data):this.cache.addImage(this.key,this.data,o.data)):this.cache.addImage(this.key,this.data)}});a.register("image",function(o,c,p){if(Array.isArray(o))for(var v=0;v{/** + */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=e(98356),f=new r({Extends:h,initialize:function o(c,p,v,m,S){var M="png",w;if(n(p)){var C=p;p=l(C,"key"),v=l(C,"url"),w=l(C,"normalMap"),m=l(C,"xhrSettings"),M=l(C,"extension",M),S=l(C,"frameConfig")}Array.isArray(v)&&(w=v[1],v=v[0]);var A={type:"image",cache:c.textureManager,extension:M,responseType:"blob",key:p,url:v,xhrSettings:m,config:S};if(h.call(this,c,A),w){var P=new o(c,this.key,w,m,S);P.type="normalMap",this.setLink(P),c.addFile(P)}this.useImageElementLoad=c.imageLoadType==="HTMLImageElement"||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var o=this;this.data.onload=function(){h.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(o.data),o.onProcessError()},h.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var o=this.state;this.state=d.FILE_PROCESSING,o===d.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=d.FILE_LOADING,this.src=u(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var o=this;this.data.onload=function(){o.state=d.FILE_LOADED,o.loader.nextFile(o,!0)},this.data.onerror=function(){o.loader.nextFile(o,!1)},this.data.src=this.src},addToCache:function(){var o=this.linkFile;o?o.state>=d.FILE_COMPLETE&&(o.type==="spritesheet"?o.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,o.data,this.data):this.cache.addImage(this.key,this.data,o.data)):this.cache.addImage(this.key,this.data)}});a.register("image",function(o,c,p){if(Array.isArray(o))for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(35154),u=e(41212),f=new r({Extends:h,initialize:function(c,p,v,m,S){var M="json";if(u(p)){var w=p;p=l(w,"key"),v=l(w,"url"),m=l(w,"xhrSettings"),M=l(w,"extension",M),S=l(w,"dataKey",S)}var C={type:"json",cache:c.cacheManager.json,extension:M,responseType:"text",key:p,url:v,xhrSettings:m,config:S};h.call(this,c,C),u(v)&&(S?this.data=n(v,S):this.data=v,this.state=d.FILE_POPULATED)},onProcess:function(){if(this.state!==d.FILE_POPULATED){this.state=d.FILE_PROCESSING;try{var o=JSON.parse(this.xhrLoader.responseText)}catch(p){throw this.onProcessError(),p}var c=this.config;typeof c=="string"?this.data=n(o,c,o):this.data=o}this.onProcessComplete()}});a.register("json",function(o,c,p,v){if(Array.isArray(o))for(var m=0;m{/** + */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(35154),u=e(41212),f=new r({Extends:h,initialize:function(c,p,v,m,S){var M="json";if(u(p)){var w=p;p=l(w,"key"),v=l(w,"url"),m=l(w,"xhrSettings"),M=l(w,"extension",M),S=l(w,"dataKey",S)}var C={type:"json",cache:c.cacheManager.json,extension:M,responseType:"text",key:p,url:v,xhrSettings:m,config:S};h.call(this,c,C),u(v)&&(S?this.data=n(v,S):this.data=v,this.state=d.FILE_POPULATED)},onProcess:function(){if(this.state!==d.FILE_POPULATED){this.state=d.FILE_PROCESSING;try{var o=JSON.parse(this.xhrLoader.responseText)}catch(p){throw this.onProcessError(),p}var c=this.config;typeof c=="string"?this.data=n(o,c,o):this.data=o}this.onProcessComplete()}});a.register("json",function(o,c,p,v){if(Array.isArray(o))for(var m=0;m{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(74099),h=e(95540),a=e(19550),l=e(41212),n=e(518),u=e(26430),f=new r({Extends:u,initialize:function(c,p,v,m,S,M,w){if(l(p)){var C=p;p=h(C,"key"),h(C,"url",!1)?v=h(C,"url"):v=h(C,"atlasURL"),M=h(C,"xhrSettings"),m=h(C,"path"),S=h(C,"baseURL"),w=h(C,"textureXhrSettings")}var A=new n(c,p,v,M);u.call(this,c,"multiatlas",p,[A]),this.config.path=m,this.config.baseURL=S,this.config.textureXhrSettings=w},onFileComplete:function(o){var c=this.files.indexOf(o);if(c!==-1&&(this.pending--,o.type==="json"&&o.data.hasOwnProperty("textures"))){var p=o.data.textures,v=this.config,m=this.loader,S=m.baseURL,M=m.path,w=m.prefix,C=h(v,"baseURL",this.baseURL),A=h(v,"path",this.path),P=h(v,"prefix",this.prefix),b=h(v,"textureXhrSettings");m.setBaseURL(C),m.setPath(A),m.setPrefix(P);for(var O=0;O{/** + */var r=e(83419),d=e(74099),h=e(95540),a=e(19550),l=e(41212),n=e(518),u=e(26430),f=new r({Extends:u,initialize:function(c,p,v,m,S,M,w){if(l(p)){var C=p;p=h(C,"key"),h(C,"url",!1)?v=h(C,"url"):v=h(C,"atlasURL"),M=h(C,"xhrSettings"),m=h(C,"path"),S=h(C,"baseURL"),w=h(C,"textureXhrSettings")}var A=new n(c,p,v,M);u.call(this,c,"multiatlas",p,[A]),this.config.path=m,this.config.baseURL=S,this.config.textureXhrSettings=w},onFileComplete:function(o){var c=this.files.indexOf(o);if(c!==-1&&(this.pending--,o.type==="json"&&o.data.hasOwnProperty("textures"))){var p=o.data.textures,v=this.config,m=this.loader,S=m.baseURL,M=m.path,w=m.prefix,C=h(v,"baseURL",this.baseURL),A=h(v,"path",this.path),P=h(v,"prefix",this.prefix),b=h(v,"textureXhrSettings");m.setBaseURL(C),m.setPath(A),m.setPrefix(P);for(var O=0;O{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(74099),h=e(95540),a=e(41212),l=e(26430),n=e(34328),u=new r({Extends:l,initialize:function(o,c,p,v){var m="js",S=[];if(a(c)){var M=c;c=h(M,"key"),p=h(M,"url"),v=h(M,"xhrSettings"),m=h(M,"extension",m)}Array.isArray(p)||(p=[p]);for(var w=0;w{/** + */var r=e(83419),d=e(74099),h=e(95540),a=e(41212),l=e(26430),n=e(34328),u=new r({Extends:l,initialize:function(o,c,p,v){var m="js",S=[];if(a(c)){var M=c;c=h(M,"key"),p=h(M,"url"),v=h(M,"xhrSettings"),m=h(M,"extension",m)}Array.isArray(p)||(p=[p]);for(var w=0;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(74099),h=e(95540),a=e(41212),l=e(26430),n=e(85048),u=e(61485),f=e(78776),o=new r({Extends:l,initialize:function(p,v,m,S,M,w){var C,A,P=p.cacheManager.obj;if(a(v)){var b=v;v=h(b,"key"),C=new f(p,{key:v,type:"obj",cache:P,url:h(b,"url"),extension:h(b,"extension","obj"),xhrSettings:h(b,"xhrSettings"),config:{flipUV:h(b,"flipUV",M)}}),S=h(b,"matURL"),S&&(A=new f(p,{key:v,type:"mat",cache:P,url:S,extension:h(b,"matExtension","mat"),xhrSettings:h(b,"xhrSettings")}))}else C=new f(p,{key:v,url:m,type:"obj",cache:P,extension:"obj",xhrSettings:w,config:{flipUV:M}}),S&&(A=new f(p,{key:v,url:S,type:"mat",cache:P,extension:"mat",xhrSettings:w}));l.call(this,p,"obj",v,[C,A])},addToCache:function(){if(this.isReadyToProcess()){var c=this.files[0],p=this.files[1],v=n(c.data,c.config.flipUV);p&&(v.materials=u(p.data)),c.cache.add(c.key,v),this.complete=!0}}});d.register("obj",function(c,p,v,m,S){var M;if(Array.isArray(c))for(var w=0;w{/** + */var r=e(83419),d=e(74099),h=e(95540),a=e(41212),l=e(26430),n=e(85048),u=e(61485),f=e(78776),o=new r({Extends:l,initialize:function(p,v,m,S,M,w){var C,A,P=p.cacheManager.obj;if(a(v)){var b=v;v=h(b,"key"),C=new f(p,{key:v,type:"obj",cache:P,url:h(b,"url"),extension:h(b,"extension","obj"),xhrSettings:h(b,"xhrSettings"),config:{flipUV:h(b,"flipUV",M)}}),S=h(b,"matURL"),S&&(A=new f(p,{key:v,type:"mat",cache:P,url:S,extension:h(b,"matExtension","mat"),xhrSettings:h(b,"xhrSettings")}))}else C=new f(p,{key:v,url:m,type:"obj",cache:P,extension:"obj",xhrSettings:w,config:{flipUV:M}}),S&&(A=new f(p,{key:v,url:S,type:"mat",cache:P,extension:"mat",xhrSettings:w}));l.call(this,p,"obj",v,[C,A])},addToCache:function(){if(this.isReadyToProcess()){var c=this.files[0],p=this.files[1],v=n(c.data,c.config.flipUV);p&&(v.materials=u(p.data)),c.cache.add(c.key,v),this.complete=!0}}});d.register("obj",function(c,p,v,m,S){var M;if(Array.isArray(c))for(var w=0;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(74099),a=e(518),l=new r({Extends:a,initialize:function(u,f,o,c,p){a.call(this,u,f,o,c,p),this.type="packfile"},onProcess:function(){if(this.state!==d.FILE_POPULATED&&(this.state=d.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var n={};n[this.config]=this.data,this.data=n}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});h.register("pack",function(n,u,f,o){if(Array.isArray(n))for(var c=0;c{/** + */var r=e(83419),d=e(23906),h=e(74099),a=e(518),l=new r({Extends:a,initialize:function(u,f,o,c,p){a.call(this,u,f,o,c,p),this.type="packfile"},onProcess:function(){if(this.state!==d.FILE_POPULATED&&(this.state=d.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var n={};n[this.config]=this.data,this.data=n}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});h.register("pack",function(n,u,f,o){if(Array.isArray(n))for(var c=0;c{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v,m,S){var M="js";if(n(c)){var w=c;c=l(w,"key"),p=l(w,"url"),S=l(w,"xhrSettings"),M=l(w,"extension",M),v=l(w,"start"),m=l(w,"mapping")}var C={type:"plugin",cache:!1,extension:M,responseType:"text",key:c,url:p,xhrSettings:S,config:{start:v,mapping:m}};h.call(this,o,C),typeof p=="function"&&(this.data=p,this.state=d.FILE_POPULATED)},onProcess:function(){var f=this.loader.systems.plugins,o=this.config,c=l(o,"start",!1),p=l(o,"mapping",null);if(this.state===d.FILE_POPULATED)f.install(this.key,this.data,c,p);else{this.state=d.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var v=f.install(this.key,window[this.key],c,p);(c||p)&&(this.loader.systems[p]=v,this.loader.scene[p]=v)}this.onProcessComplete()}});a.register("plugin",function(f,o,c,p,v){if(Array.isArray(f))for(var m=0;m{/** + */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v,m,S){var M="js";if(n(c)){var w=c;c=l(w,"key"),p=l(w,"url"),S=l(w,"xhrSettings"),M=l(w,"extension",M),v=l(w,"start"),m=l(w,"mapping")}var C={type:"plugin",cache:!1,extension:M,responseType:"text",key:c,url:p,xhrSettings:S,config:{start:v,mapping:m}};h.call(this,o,C),typeof p=="function"&&(this.data=p,this.state=d.FILE_POPULATED)},onProcess:function(){var f=this.loader.systems.plugins,o=this.config,c=l(o,"start",!1),p=l(o,"mapping",null);if(this.state===d.FILE_POPULATED)f.install(this.key,this.data,c,p);else{this.state=d.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var v=f.install(this.key,window[this.key],c,p);(c||p)&&(this.loader.systems[p]=v,this.loader.scene[p]=v)}this.onProcessComplete()}});a.register("plugin",function(f,o,c,p,v){if(Array.isArray(f))for(var m=0;m{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v,m){var S="svg";if(n(c)){var M=c;c=l(M,"key"),p=l(M,"url"),v=l(M,"svgConfig",{}),m=l(M,"xhrSettings"),S=l(M,"extension",S)}var w={type:"svg",cache:o.textureManager,extension:S,responseType:"text",key:c,url:p,xhrSettings:m,config:{width:l(v,"width"),height:l(v,"height"),scale:l(v,"scale")}};h.call(this,o,w)},onProcess:function(){this.state=d.FILE_PROCESSING;var f=this.xhrLoader.responseText,o=[f],c=this.config.width,p=this.config.height,v=this.config.scale;t:if(c&&p||v){var m=null,S=new DOMParser;m=S.parseFromString(f,"text/xml");var M=m.getElementsByTagName("svg")[0],w=M.hasAttribute("viewBox"),C=parseFloat(M.getAttribute("width")),A=parseFloat(M.getAttribute("height"));if(!w&&C&&A)M.setAttribute("viewBox","0 0 "+C+" "+A);else if(w&&!C&&!A){var P=M.getAttribute("viewBox").split(/\s+|,/);C=P[2],A=P[3]}if(v)if(C&&A)c=C*v,p=A*v;else break t;M.setAttribute("width",c.toString()+"px"),M.setAttribute("height",p.toString()+"px"),o=[new XMLSerializer().serializeToString(M)]}try{var b=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var O=this,I=!1;this.data.onload=function(){I||h.revokeObjectURL(O.data),O.onProcessComplete()},this.data.onerror=function(){I?O.onProcessError():(I=!0,h.revokeObjectURL(O.data),O.data.src="data:image/svg+xml,"+encodeURIComponent(o.join("")))},h.createObjectURL(this.data,b,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});a.register("svg",function(f,o,c,p){if(Array.isArray(f))for(var v=0;v{/** + */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v,m){var S="svg";if(n(c)){var M=c;c=l(M,"key"),p=l(M,"url"),v=l(M,"svgConfig",{}),m=l(M,"xhrSettings"),S=l(M,"extension",S)}var w={type:"svg",cache:o.textureManager,extension:S,responseType:"text",key:c,url:p,xhrSettings:m,config:{width:l(v,"width"),height:l(v,"height"),scale:l(v,"scale")}};h.call(this,o,w)},onProcess:function(){this.state=d.FILE_PROCESSING;var f=this.xhrLoader.responseText,o=[f],c=this.config.width,p=this.config.height,v=this.config.scale;t:if(c&&p||v){var m=null,S=new DOMParser;m=S.parseFromString(f,"text/xml");var M=m.getElementsByTagName("svg")[0],w=M.hasAttribute("viewBox"),C=parseFloat(M.getAttribute("width")),A=parseFloat(M.getAttribute("height"));if(!w&&C&&A)M.setAttribute("viewBox","0 0 "+C+" "+A);else if(w&&!C&&!A){var P=M.getAttribute("viewBox").split(/\s+|,/);C=P[2],A=P[3]}if(v)if(C&&A)c=C*v,p=A*v;else break t;M.setAttribute("width",c.toString()+"px"),M.setAttribute("height",p.toString()+"px"),o=[new XMLSerializer().serializeToString(M)]}try{var b=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var O=this,I=!1;this.data.onload=function(){I||h.revokeObjectURL(O.data),O.onProcessComplete()},this.data.onerror=function(){I?O.onProcessError():(I=!0,h.revokeObjectURL(O.data),O.data.src="data:image/svg+xml,"+encodeURIComponent(o.join("")))},h.createObjectURL(this.data,b,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});a.register("svg",function(f,o,c,p){if(Array.isArray(f))for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v){var m="js";if(n(c)){var S=c;c=l(S,"key"),p=l(S,"url"),v=l(S,"xhrSettings"),m=l(S,"extension",m)}var M={type:"text",extension:m,responseType:"text",key:c,url:p,xhrSettings:v};h.call(this,o,M)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var f=this.data.concat(`(function(){ return new `+this.key+`(); -}).call(this);`),o=eval;this.loader.sceneManager.add(this.key,o(f)),this.complete=!0}});a.register("sceneFile",function(f,o,c){if(Array.isArray(f))for(var p=0;p{/** +}).call(this);`),o=eval;this.loader.sceneManager.add(this.key,o(f)),this.complete=!0}});a.register("sceneFile",function(f,o,c){if(Array.isArray(f))for(var p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v,m,S){var M="js";if(n(c)){var w=c;c=l(w,"key"),p=l(w,"url"),S=l(w,"xhrSettings"),M=l(w,"extension",M),v=l(w,"systemKey"),m=l(w,"sceneKey")}var C={type:"scenePlugin",cache:!1,extension:M,responseType:"text",key:c,url:p,xhrSettings:S,config:{systemKey:v,sceneKey:m}};h.call(this,o,C),typeof p=="function"&&(this.data=p,this.state=d.FILE_POPULATED)},onProcess:function(){var f=this.loader.systems.plugins,o=this.config,c=this.key,p=l(o,"systemKey",c),v=l(o,"sceneKey",c);this.state===d.FILE_POPULATED?f.installScenePlugin(p,this.data,v,this.loader.scene,!0):(this.state=d.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),f.installScenePlugin(p,window[this.key],v,this.loader.scene,!0)),this.onProcessComplete()}});a.register("scenePlugin",function(f,o,c,p,v){if(Array.isArray(f))for(var m=0;m{/** + */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v,m,S){var M="js";if(n(c)){var w=c;c=l(w,"key"),p=l(w,"url"),S=l(w,"xhrSettings"),M=l(w,"extension",M),v=l(w,"systemKey"),m=l(w,"sceneKey")}var C={type:"scenePlugin",cache:!1,extension:M,responseType:"text",key:c,url:p,xhrSettings:S,config:{systemKey:v,sceneKey:m}};h.call(this,o,C),typeof p=="function"&&(this.data=p,this.state=d.FILE_POPULATED)},onProcess:function(){var f=this.loader.systems.plugins,o=this.config,c=this.key,p=l(o,"systemKey",c),v=l(o,"sceneKey",c);this.state===d.FILE_POPULATED?f.installScenePlugin(p,this.data,v,this.loader.scene,!0):(this.state=d.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),f.installScenePlugin(p,window[this.key],v,this.loader.scene,!0)),this.onProcessComplete()}});a.register("scenePlugin",function(f,o,c,p,v){if(Array.isArray(f))for(var m=0;m{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v,m){var S="js";if(n(c)){var M=c;c=l(M,"key"),p=l(M,"url"),v=l(M,"type","script"),m=l(M,"xhrSettings"),S=l(M,"extension",S)}else v===void 0&&(v="script");var w={type:v,cache:!1,extension:S,responseType:"text",key:c,url:p,xhrSettings:m};h.call(this,o,w)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});a.register("script",function(f,o,c,p){if(Array.isArray(f))for(var v=0;v{/** + */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v,m){var S="js";if(n(c)){var M=c;c=l(M,"key"),p=l(M,"url"),v=l(M,"type","script"),m=l(M,"xhrSettings"),S=l(M,"extension",S)}else v===void 0&&(v="script");var w={type:v,cache:!1,extension:S,responseType:"text",key:c,url:p,xhrSettings:m};h.call(this,o,w)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});a.register("script",function(f,o,c,p){if(Array.isArray(f))for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(74099),a=e(19550),l=new r({Extends:a,initialize:function(u,f,o,c,p){a.call(this,u,f,o,p,c),this.type="spritesheet"},addToCache:function(){var n=this.linkFile;n?n.state>=d.FILE_COMPLETE&&(this.type==="normalMap"?this.cache.addSpriteSheet(this.key,n.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,n.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});h.register("spritesheet",function(n,u,f,o){if(Array.isArray(n))for(var c=0;c{/** + */var r=e(83419),d=e(23906),h=e(74099),a=e(19550),l=new r({Extends:a,initialize:function(u,f,o,c,p){a.call(this,u,f,o,p,c),this.type="spritesheet"},addToCache:function(){var n=this.linkFile;n?n.state>=d.FILE_COMPLETE&&(this.type==="normalMap"?this.cache.addSpriteSheet(this.key,n.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,n.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});h.register("spritesheet",function(n,u,f,o){if(Array.isArray(n))for(var c=0;c{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v){var m="text",S="txt",M=o.cacheManager.text;if(n(c)){var w=c;c=l(w,"key"),p=l(w,"url"),v=l(w,"xhrSettings"),S=l(w,"extension",S),m=l(w,"type",m),M=l(w,"cache",M)}var C={type:m,cache:M,extension:S,responseType:"text",key:c,url:p,xhrSettings:v};h.call(this,o,C)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",function(f,o,c){if(Array.isArray(f))for(var p=0;p{/** + */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=new r({Extends:h,initialize:function(o,c,p,v){var m="text",S="txt",M=o.cacheManager.text;if(n(c)){var w=c;c=l(w,"key"),p=l(w,"url"),v=l(w,"xhrSettings"),S=l(w,"extension",S),m=l(w,"type",m),M=l(w,"cache",M)}var C={type:m,cache:M,extension:S,responseType:"text",key:c,url:p,xhrSettings:v};h.call(this,o,C)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",function(f,o,c){if(Array.isArray(f))for(var p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=e(80341),f=new r({Extends:h,initialize:function(c,p,v,m){var S="csv";if(n(p)){var M=p;p=l(M,"key"),v=l(M,"url"),m=l(M,"xhrSettings"),S=l(M,"extension",S)}var w={type:"tilemapCSV",cache:c.cacheManager.tilemap,extension:S,responseType:"text",key:p,url:v,xhrSettings:m};h.call(this,c,w),this.tilemapFormat=u.CSV},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var o={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,o)}});a.register("tilemapCSV",function(o,c,p){if(Array.isArray(o))for(var v=0;v{/** + */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=e(80341),f=new r({Extends:h,initialize:function(c,p,v,m){var S="csv";if(n(p)){var M=p;p=l(M,"key"),v=l(M,"url"),m=l(M,"xhrSettings"),S=l(M,"extension",S)}var w={type:"tilemapCSV",cache:c.cacheManager.tilemap,extension:S,responseType:"text",key:p,url:v,xhrSettings:m};h.call(this,c,w),this.tilemapFormat=u.CSV},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var o={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,o)}});a.register("tilemapCSV",function(o,c,p){if(Array.isArray(o))for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(74099),h=e(518),a=e(80341),l=new r({Extends:h,initialize:function(u,f,o,c){h.call(this,u,f,o,c),this.type="tilemapJSON",this.cache=u.cacheManager.tilemap},addToCache:function(){var n={format:a.WELTMEISTER,data:this.data};this.cache.add(this.key,n)}});d.register("tilemapImpact",function(n,u,f){if(Array.isArray(n))for(var o=0;o{/** + */var r=e(83419),d=e(74099),h=e(518),a=e(80341),l=new r({Extends:h,initialize:function(u,f,o,c){h.call(this,u,f,o,c),this.type="tilemapJSON",this.cache=u.cacheManager.tilemap},addToCache:function(){var n={format:a.WELTMEISTER,data:this.data};this.cache.add(this.key,n)}});d.register("tilemapImpact",function(n,u,f){if(Array.isArray(n))for(var o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(74099),h=e(518),a=e(80341),l=new r({Extends:h,initialize:function(u,f,o,c){h.call(this,u,f,o,c),this.type="tilemapJSON",this.cache=u.cacheManager.tilemap},addToCache:function(){var n={format:a.TILED_JSON,data:this.data};this.cache.add(this.key,n)}});d.register("tilemapTiledJSON",function(n,u,f){if(Array.isArray(n))for(var o=0;o{/** + */var r=e(83419),d=e(74099),h=e(518),a=e(80341),l=new r({Extends:h,initialize:function(u,f,o,c){h.call(this,u,f,o,c),this.type="tilemapJSON",this.cache=u.cacheManager.tilemap},addToCache:function(){var n={format:a.TILED_JSON,data:this.data};this.cache.add(this.key,n)}});d.register("tilemapTiledJSON",function(n,u,f){if(Array.isArray(n))for(var o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(74099),h=e(95540),a=e(19550),l=e(41212),n=e(26430),u=e(78776),f=new r({Extends:n,initialize:function(c,p,v,m,S,M){var w,C;if(l(p)){var A=p;p=h(A,"key"),w=new a(c,{key:p,url:h(A,"textureURL"),extension:h(A,"textureExtension","png"),normalMap:h(A,"normalMap"),xhrSettings:h(A,"textureXhrSettings")}),C=new u(c,{key:p,url:h(A,"atlasURL"),extension:h(A,"atlasExtension","txt"),xhrSettings:h(A,"atlasXhrSettings")})}else w=new a(c,p,v,S),C=new u(c,p,m,M);w.linkFile?n.call(this,c,"unityatlas",p,[w,C,w.linkFile]):n.call(this,c,"unityatlas",p,[w,C])},addToCache:function(){if(this.isReadyToProcess()){var o=this.files[0],c=this.files[1],p=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(o.key,o.data,c.data,p),this.complete=!0}}});d.register("unityAtlas",function(o,c,p,v,m){var S;if(Array.isArray(o))for(var M=0;M{/** + */var r=e(83419),d=e(74099),h=e(95540),a=e(19550),l=e(41212),n=e(26430),u=e(78776),f=new r({Extends:n,initialize:function(c,p,v,m,S,M){var w,C;if(l(p)){var A=p;p=h(A,"key"),w=new a(c,{key:p,url:h(A,"textureURL"),extension:h(A,"textureExtension","png"),normalMap:h(A,"normalMap"),xhrSettings:h(A,"textureXhrSettings")}),C=new u(c,{key:p,url:h(A,"atlasURL"),extension:h(A,"atlasExtension","txt"),xhrSettings:h(A,"atlasXhrSettings")})}else w=new a(c,p,v,S),C=new u(c,p,m,M);w.linkFile?n.call(this,c,"unityatlas",p,[w,C,w.linkFile]):n.call(this,c,"unityatlas",p,[w,C])},addToCache:function(){if(this.isReadyToProcess()){var o=this.files[0],c=this.files[1],p=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(o.key,o.data,c.data,p),this.complete=!0}}});d.register("unityAtlas",function(o,c,p,v,m){var S;if(Array.isArray(o))for(var M=0;M{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(98356),n=e(95540),u=e(41212),f=new r({Extends:h,initialize:function(c,p,v,m){if(m===void 0&&(m=!1),u(p)){var S=p;p=n(S,"key"),v=n(S,"url",[]),m=n(S,"noAudio",!1)}var M=c.systems.game.device.video.getVideoURL(v);M||console.warn("VideoFile: No supported format for "+p);var w={type:"video",cache:c.cacheManager.video,extension:M.type,key:p,url:M.url,config:{noAudio:m}};h.call(this,c,w)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=l(this,this.loader.baseURL),this.state=d.FILE_LOADED,this.loader.nextFile(this,!0)}});a.register("video",function(o,c,p){if(Array.isArray(o))for(var v=0;v{/** + */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(98356),n=e(95540),u=e(41212),f=new r({Extends:h,initialize:function(c,p,v,m){if(m===void 0&&(m=!1),u(p)){var S=p;p=n(S,"key"),v=n(S,"url",[]),m=n(S,"noAudio",!1)}var M=c.systems.game.device.video.getVideoURL(v);M||console.warn("VideoFile: No supported format for "+p);var w={type:"video",cache:c.cacheManager.video,extension:M.type,key:p,url:M.url,config:{noAudio:m}};h.call(this,c,w)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=l(this,this.loader.baseURL),this.state=d.FILE_LOADED,this.loader.nextFile(this,!0)}});a.register("video",function(o,c,p){if(Array.isArray(o))for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=e(56836),f=new r({Extends:h,initialize:function(c,p,v,m){var S="xml";if(n(p)){var M=p;p=l(M,"key"),v=l(M,"url"),m=l(M,"xhrSettings"),S=l(M,"extension",S)}var w={type:"xml",cache:c.cacheManager.xml,extension:S,responseType:"text",key:p,url:v,xhrSettings:m};h.call(this,c,w)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=u(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});a.register("xml",function(o,c,p){if(Array.isArray(o))for(var v=0;v{/** + */var r=e(83419),d=e(23906),h=e(41299),a=e(74099),l=e(95540),n=e(41212),u=e(56836),f=new r({Extends:h,initialize:function(c,p,v,m){var S="xml";if(n(p)){var M=p;p=l(M,"key"),v=l(M,"url"),m=l(M,"xhrSettings"),S=l(M,"extension",S)}var w={type:"xml",cache:c.cacheManager.xml,extension:S,responseType:"text",key:p,url:v,xhrSettings:m};h.call(this,c,w)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=u(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});a.register("xml",function(o,c,p){if(Array.isArray(o))for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={AnimationJSONFile:e(14135),AsepriteFile:e(76272),AtlasJSONFile:e(38734),AtlasXMLFile:e(74599),AudioFile:e(21097),AudioSpriteFile:e(89524),BinaryFile:e(85722),BitmapFontFile:e(97025),CompressedTextureFile:e(69559),CSSFile:e(16024),GLSLFile:e(47931),HTML5AudioFile:e(89749),HTMLFile:e(88470),HTMLTextureFile:e(14643),ImageFile:e(19550),JSONFile:e(518),MultiAtlasFile:e(59327),MultiScriptFile:e(99297),OBJFile:e(41846),PackFile:e(58610),PluginFile:e(48988),SceneFile:e(88423),ScenePluginFile:e(56812),ScriptFile:e(34328),SpriteSheetFile:e(85035),SVGFile:e(67397),TextFile:e(78776),TilemapCSVFile:e(49477),TilemapImpactFile:e(40807),TilemapJSONFile:e(56775),UnityAtlasFile:e(25771),VideoFile:e(33720),XMLFile:e(57318)}},57777:(s,y,e)=>{/** + */s.exports={AnimationJSONFile:e(14135),AsepriteFile:e(76272),AtlasJSONFile:e(38734),AtlasXMLFile:e(74599),AudioFile:e(21097),AudioSpriteFile:e(89524),BinaryFile:e(85722),BitmapFontFile:e(97025),CompressedTextureFile:e(69559),CSSFile:e(16024),GLSLFile:e(47931),HTML5AudioFile:e(89749),HTMLFile:e(88470),HTMLTextureFile:e(14643),ImageFile:e(19550),JSONFile:e(518),MultiAtlasFile:e(59327),MultiScriptFile:e(99297),OBJFile:e(41846),PackFile:e(58610),PluginFile:e(48988),SceneFile:e(88423),ScenePluginFile:e(56812),ScriptFile:e(34328),SpriteSheetFile:e(85035),SVGFile:e(67397),TextFile:e(78776),TilemapCSVFile:e(49477),TilemapImpactFile:e(40807),TilemapJSONFile:e(56775),UnityAtlasFile:e(25771),VideoFile:e(33720),XMLFile:e(57318)}},57777:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3647,7 +3647,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){for(var r=0,d=0;d{/** + */var x=function(e){for(var r=0,d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3655,19 +3655,19 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return Math.floor(Math.random()*(r-e+1)+e)};s.exports=y},87842:s=>{/** + */var x=function(e,r){return Math.floor(Math.random()*(r-e+1)+e)};s.exports=x},87842:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h,a){var l=(h-r)*.5,n=(a-d)*.5,u=e*e,f=e*u;return(2*d-2*h+l+n)*f+(-3*d+3*h-2*l-n)*u+l*e+d};s.exports=y},26302:s=>{/** + */var x=function(e,r,d,h,a){var l=(h-r)*.5,n=(a-d)*.5,u=e*e,f=e*u;return(2*d-2*h+l+n)*f+(-3*d+3*h-2*l-n)*u+l*e+d};s.exports=x},26302:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){r===void 0&&(r=0),d===void 0&&(d=10);var h=Math.pow(d,-r);return Math.ceil(e*h)/h};s.exports=y},45319:s=>{/** + */var x=function(e,r,d){r===void 0&&(r=0),d===void 0&&(d=10);var h=Math.pow(d,-r);return Math.ceil(e*h)/h};s.exports=x},45319:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return Math.max(r,Math.min(d,e))};s.exports=y},39506:(s,y,e)=>{/** + */var x=function(e,r,d){return Math.max(r,Math.min(d,e))};s.exports=x},39506:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3675,7 +3675,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return Math.abs(e-r)};s.exports=y},38857:(s,y,e)=>{/** + */var x=function(e,r){return Math.abs(e-r)};s.exports=x},38857:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3683,15 +3683,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){if(e===0)return 1;for(var r=e;--e;)r*=e;return r};s.exports=y},99472:s=>{/** + */var x=function(e){if(e===0)return 1;for(var r=e;--e;)r*=e;return r};s.exports=x},99472:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return Math.random()*(r-e)+e};s.exports=y},77623:s=>{/** + */var x=function(e,r){return Math.random()*(r-e)+e};s.exports=x},77623:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){r===void 0&&(r=0),d===void 0&&(d=10);var h=Math.pow(d,-r);return Math.floor(e*h)/h};s.exports=y},62945:(s,y,e)=>{/** + */var x=function(e,r,d){r===void 0&&(r=0),d===void 0&&(d=10);var h=Math.pow(d,-r);return Math.floor(e*h)/h};s.exports=x},62945:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3699,51 +3699,51 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e/r/1e3};s.exports=y},78702:s=>{/** + */var x=function(e,r){return e/r/1e3};s.exports=x},78702:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e==parseFloat(e)?!(e%2):void 0};s.exports=y},94883:s=>{/** + */var x=function(e){return e==parseFloat(e)?!(e%2):void 0};s.exports=x},94883:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e===parseFloat(e)?!(e%2):void 0};s.exports=y},28915:s=>{/** + */var x=function(e){return e===parseFloat(e)?!(e%2):void 0};s.exports=x},28915:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return(r-e)*d+e};s.exports=y},94908:s=>{/** + */var x=function(e,r,d){return(r-e)*d+e};s.exports=x},94908:s=>{/** * @author Greg McLean * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return d===void 0&&(d=0),e.clone().lerp(r,d)};s.exports=y},94434:(s,y,e)=>{/** + */var x=function(e,r,d){return d===void 0&&(d=0),e.clone().lerp(r,d)};s.exports=x},94434:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a){this.val=new Float32Array(9),a?this.copy(a):this.identity()},clone:function(){return new d(this)},set:function(h){return this.copy(h)},copy:function(h){var a=this.val,l=h.val;return a[0]=l[0],a[1]=l[1],a[2]=l[2],a[3]=l[3],a[4]=l[4],a[5]=l[5],a[6]=l[6],a[7]=l[7],a[8]=l[8],this},fromMat4:function(h){var a=h.val,l=this.val;return l[0]=a[0],l[1]=a[1],l[2]=a[2],l[3]=a[4],l[4]=a[5],l[5]=a[6],l[6]=a[8],l[7]=a[9],l[8]=a[10],this},fromArray:function(h){var a=this.val;return a[0]=h[0],a[1]=h[1],a[2]=h[2],a[3]=h[3],a[4]=h[4],a[5]=h[5],a[6]=h[6],a[7]=h[7],a[8]=h[8],this},identity:function(){var h=this.val;return h[0]=1,h[1]=0,h[2]=0,h[3]=0,h[4]=1,h[5]=0,h[6]=0,h[7]=0,h[8]=1,this},transpose:function(){var h=this.val,a=h[1],l=h[2],n=h[5];return h[1]=h[3],h[2]=h[6],h[3]=a,h[5]=h[7],h[6]=l,h[7]=n,this},invert:function(){var h=this.val,a=h[0],l=h[1],n=h[2],u=h[3],f=h[4],o=h[5],c=h[6],p=h[7],v=h[8],m=v*f-o*p,S=-v*u+o*c,M=p*u-f*c,w=a*m+l*S+n*M;return w?(w=1/w,h[0]=m*w,h[1]=(-v*l+n*p)*w,h[2]=(o*l-n*f)*w,h[3]=S*w,h[4]=(v*a-n*c)*w,h[5]=(-o*a+n*u)*w,h[6]=M*w,h[7]=(-p*a+l*c)*w,h[8]=(f*a-l*u)*w,this):null},adjoint:function(){var h=this.val,a=h[0],l=h[1],n=h[2],u=h[3],f=h[4],o=h[5],c=h[6],p=h[7],v=h[8];return h[0]=f*v-o*p,h[1]=n*p-l*v,h[2]=l*o-n*f,h[3]=o*c-u*v,h[4]=a*v-n*c,h[5]=n*u-a*o,h[6]=u*p-f*c,h[7]=l*c-a*p,h[8]=a*f-l*u,this},determinant:function(){var h=this.val,a=h[0],l=h[1],n=h[2],u=h[3],f=h[4],o=h[5],c=h[6],p=h[7],v=h[8];return a*(v*f-o*p)+l*(-v*u+o*c)+n*(p*u-f*c)},multiply:function(h){var a=this.val,l=a[0],n=a[1],u=a[2],f=a[3],o=a[4],c=a[5],p=a[6],v=a[7],m=a[8],S=h.val,M=S[0],w=S[1],C=S[2],A=S[3],P=S[4],b=S[5],O=S[6],I=S[7],D=S[8];return a[0]=M*l+w*f+C*p,a[1]=M*n+w*o+C*v,a[2]=M*u+w*c+C*m,a[3]=A*l+P*f+b*p,a[4]=A*n+P*o+b*v,a[5]=A*u+P*c+b*m,a[6]=O*l+I*f+D*p,a[7]=O*n+I*o+D*v,a[8]=O*u+I*c+D*m,this},translate:function(h){var a=this.val,l=h.x,n=h.y;return a[6]=l*a[0]+n*a[3]+a[6],a[7]=l*a[1]+n*a[4]+a[7],a[8]=l*a[2]+n*a[5]+a[8],this},rotate:function(h){var a=this.val,l=a[0],n=a[1],u=a[2],f=a[3],o=a[4],c=a[5],p=Math.sin(h),v=Math.cos(h);return a[0]=v*l+p*f,a[1]=v*n+p*o,a[2]=v*u+p*c,a[3]=v*f-p*l,a[4]=v*o-p*n,a[5]=v*c-p*u,this},scale:function(h){var a=this.val,l=h.x,n=h.y;return a[0]=l*a[0],a[1]=l*a[1],a[2]=l*a[2],a[3]=n*a[3],a[4]=n*a[4],a[5]=n*a[5],this},fromQuat:function(h){var a=h.x,l=h.y,n=h.z,u=h.w,f=a+a,o=l+l,c=n+n,p=a*f,v=a*o,m=a*c,S=l*o,M=l*c,w=n*c,C=u*f,A=u*o,P=u*c,b=this.val;return b[0]=1-(S+w),b[3]=v+P,b[6]=m-A,b[1]=v-P,b[4]=1-(p+w),b[7]=M+C,b[2]=m+A,b[5]=M-C,b[8]=1-(p+S),this},normalFromMat4:function(h){var a=h.val,l=this.val,n=a[0],u=a[1],f=a[2],o=a[3],c=a[4],p=a[5],v=a[6],m=a[7],S=a[8],M=a[9],w=a[10],C=a[11],A=a[12],P=a[13],b=a[14],O=a[15],I=n*p-u*c,D=n*v-f*c,B=n*m-o*c,G=u*v-f*p,z=u*m-o*p,X=f*m-o*v,j=S*P-M*A,Q=S*b-w*A,tt=S*O-C*A,Y=M*b-w*P,Z=M*O-C*P,U=w*O-C*b,H=I*U-D*Z+B*Y+G*tt-z*Q+X*j;return H?(H=1/H,l[0]=(p*U-v*Z+m*Y)*H,l[1]=(v*tt-c*U-m*Q)*H,l[2]=(c*Z-p*tt+m*j)*H,l[3]=(f*Z-u*U-o*Y)*H,l[4]=(n*U-f*tt+o*Q)*H,l[5]=(u*tt-n*Z-o*j)*H,l[6]=(P*X-b*z+O*G)*H,l[7]=(b*B-A*X-O*D)*H,l[8]=(A*z-P*B+O*I)*H,this):null}});s.exports=d},37867:(s,y,e)=>{/** + */var r=e(83419),d=new r({initialize:function(a){this.val=new Float32Array(9),a?this.copy(a):this.identity()},clone:function(){return new d(this)},set:function(h){return this.copy(h)},copy:function(h){var a=this.val,l=h.val;return a[0]=l[0],a[1]=l[1],a[2]=l[2],a[3]=l[3],a[4]=l[4],a[5]=l[5],a[6]=l[6],a[7]=l[7],a[8]=l[8],this},fromMat4:function(h){var a=h.val,l=this.val;return l[0]=a[0],l[1]=a[1],l[2]=a[2],l[3]=a[4],l[4]=a[5],l[5]=a[6],l[6]=a[8],l[7]=a[9],l[8]=a[10],this},fromArray:function(h){var a=this.val;return a[0]=h[0],a[1]=h[1],a[2]=h[2],a[3]=h[3],a[4]=h[4],a[5]=h[5],a[6]=h[6],a[7]=h[7],a[8]=h[8],this},identity:function(){var h=this.val;return h[0]=1,h[1]=0,h[2]=0,h[3]=0,h[4]=1,h[5]=0,h[6]=0,h[7]=0,h[8]=1,this},transpose:function(){var h=this.val,a=h[1],l=h[2],n=h[5];return h[1]=h[3],h[2]=h[6],h[3]=a,h[5]=h[7],h[6]=l,h[7]=n,this},invert:function(){var h=this.val,a=h[0],l=h[1],n=h[2],u=h[3],f=h[4],o=h[5],c=h[6],p=h[7],v=h[8],m=v*f-o*p,S=-v*u+o*c,M=p*u-f*c,w=a*m+l*S+n*M;return w?(w=1/w,h[0]=m*w,h[1]=(-v*l+n*p)*w,h[2]=(o*l-n*f)*w,h[3]=S*w,h[4]=(v*a-n*c)*w,h[5]=(-o*a+n*u)*w,h[6]=M*w,h[7]=(-p*a+l*c)*w,h[8]=(f*a-l*u)*w,this):null},adjoint:function(){var h=this.val,a=h[0],l=h[1],n=h[2],u=h[3],f=h[4],o=h[5],c=h[6],p=h[7],v=h[8];return h[0]=f*v-o*p,h[1]=n*p-l*v,h[2]=l*o-n*f,h[3]=o*c-u*v,h[4]=a*v-n*c,h[5]=n*u-a*o,h[6]=u*p-f*c,h[7]=l*c-a*p,h[8]=a*f-l*u,this},determinant:function(){var h=this.val,a=h[0],l=h[1],n=h[2],u=h[3],f=h[4],o=h[5],c=h[6],p=h[7],v=h[8];return a*(v*f-o*p)+l*(-v*u+o*c)+n*(p*u-f*c)},multiply:function(h){var a=this.val,l=a[0],n=a[1],u=a[2],f=a[3],o=a[4],c=a[5],p=a[6],v=a[7],m=a[8],S=h.val,M=S[0],w=S[1],C=S[2],A=S[3],P=S[4],b=S[5],O=S[6],I=S[7],D=S[8];return a[0]=M*l+w*f+C*p,a[1]=M*n+w*o+C*v,a[2]=M*u+w*c+C*m,a[3]=A*l+P*f+b*p,a[4]=A*n+P*o+b*v,a[5]=A*u+P*c+b*m,a[6]=O*l+I*f+D*p,a[7]=O*n+I*o+D*v,a[8]=O*u+I*c+D*m,this},translate:function(h){var a=this.val,l=h.x,n=h.y;return a[6]=l*a[0]+n*a[3]+a[6],a[7]=l*a[1]+n*a[4]+a[7],a[8]=l*a[2]+n*a[5]+a[8],this},rotate:function(h){var a=this.val,l=a[0],n=a[1],u=a[2],f=a[3],o=a[4],c=a[5],p=Math.sin(h),v=Math.cos(h);return a[0]=v*l+p*f,a[1]=v*n+p*o,a[2]=v*u+p*c,a[3]=v*f-p*l,a[4]=v*o-p*n,a[5]=v*c-p*u,this},scale:function(h){var a=this.val,l=h.x,n=h.y;return a[0]=l*a[0],a[1]=l*a[1],a[2]=l*a[2],a[3]=n*a[3],a[4]=n*a[4],a[5]=n*a[5],this},fromQuat:function(h){var a=h.x,l=h.y,n=h.z,u=h.w,f=a+a,o=l+l,c=n+n,p=a*f,v=a*o,m=a*c,S=l*o,M=l*c,w=n*c,C=u*f,A=u*o,P=u*c,b=this.val;return b[0]=1-(S+w),b[3]=v+P,b[6]=m-A,b[1]=v-P,b[4]=1-(p+w),b[7]=M+C,b[2]=m+A,b[5]=M-C,b[8]=1-(p+S),this},normalFromMat4:function(h){var a=h.val,l=this.val,n=a[0],u=a[1],f=a[2],o=a[3],c=a[4],p=a[5],v=a[6],m=a[7],S=a[8],M=a[9],w=a[10],C=a[11],A=a[12],P=a[13],b=a[14],O=a[15],I=n*p-u*c,D=n*v-f*c,B=n*m-o*c,G=u*v-f*p,z=u*m-o*p,X=f*m-o*v,j=S*P-M*A,Q=S*b-w*A,tt=S*O-C*A,Y=M*b-w*P,$=M*O-C*P,U=w*O-C*b,H=I*U-D*$+B*Y+G*tt-z*Q+X*j;return H?(H=1/H,l[0]=(p*U-v*$+m*Y)*H,l[1]=(v*tt-c*U-m*Q)*H,l[2]=(c*$-p*tt+m*j)*H,l[3]=(f*$-u*U-o*Y)*H,l[4]=(n*U-f*tt+o*Q)*H,l[5]=(u*tt-n*$-o*j)*H,l[6]=(P*X-b*z+O*G)*H,l[7]=(b*B-A*X-O*D)*H,l[8]=(A*z-P*B+O*I)*H,this):null}});s.exports=d},37867:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(25836),h=1e-6,a=new r({initialize:function(p){this.val=new Float32Array(16),p?this.copy(p):this.identity()},clone:function(){return new a(this)},set:function(c){return this.copy(c)},setValues:function(c,p,v,m,S,M,w,C,A,P,b,O,I,D,B,G){var z=this.val;return z[0]=c,z[1]=p,z[2]=v,z[3]=m,z[4]=S,z[5]=M,z[6]=w,z[7]=C,z[8]=A,z[9]=P,z[10]=b,z[11]=O,z[12]=I,z[13]=D,z[14]=B,z[15]=G,this},copy:function(c){var p=c.val;return this.setValues(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15])},fromArray:function(c){return this.setValues(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(c,p,v){var m=l.fromQuat(v),S=m.val,M=p.x,w=p.y,C=p.z;return this.setValues(S[0]*M,S[1]*M,S[2]*M,0,S[4]*w,S[5]*w,S[6]*w,0,S[8]*C,S[9]*C,S[10]*C,0,c.x,c.y,c.z,1)},xyz:function(c,p,v){this.identity();var m=this.val;return m[12]=c,m[13]=p,m[14]=v,this},scaling:function(c,p,v){this.zero();var m=this.val;return m[0]=c,m[5]=p,m[10]=v,m[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 c=this.val,p=c[1],v=c[2],m=c[3],S=c[6],M=c[7],w=c[11];return c[1]=c[4],c[2]=c[8],c[3]=c[12],c[4]=p,c[6]=c[9],c[7]=c[13],c[8]=v,c[9]=S,c[11]=c[14],c[12]=m,c[13]=M,c[14]=w,this},getInverse:function(c){return this.copy(c),this.invert()},invert:function(){var c=this.val,p=c[0],v=c[1],m=c[2],S=c[3],M=c[4],w=c[5],C=c[6],A=c[7],P=c[8],b=c[9],O=c[10],I=c[11],D=c[12],B=c[13],G=c[14],z=c[15],X=p*w-v*M,j=p*C-m*M,Q=p*A-S*M,tt=v*C-m*w,Y=v*A-S*w,Z=m*A-S*C,U=P*B-b*D,H=P*G-O*D,$=P*z-I*D,_=b*G-O*B,q=b*z-I*B,at=O*z-I*G,ot=X*at-j*q+Q*_+tt*$-Y*H+Z*U;return ot?(ot=1/ot,this.setValues((w*at-C*q+A*_)*ot,(m*q-v*at-S*_)*ot,(B*Z-G*Y+z*tt)*ot,(O*Y-b*Z-I*tt)*ot,(C*$-M*at-A*H)*ot,(p*at-m*$+S*H)*ot,(G*Q-D*Z-z*j)*ot,(P*Z-O*Q+I*j)*ot,(M*q-w*$+A*U)*ot,(v*$-p*q-S*U)*ot,(D*Y-B*Q+z*X)*ot,(b*Q-P*Y-I*X)*ot,(w*H-M*_-C*U)*ot,(p*_-v*H+m*U)*ot,(B*j-D*tt-G*X)*ot,(P*tt-b*j+O*X)*ot)):this},adjoint:function(){var c=this.val,p=c[0],v=c[1],m=c[2],S=c[3],M=c[4],w=c[5],C=c[6],A=c[7],P=c[8],b=c[9],O=c[10],I=c[11],D=c[12],B=c[13],G=c[14],z=c[15];return this.setValues(w*(O*z-I*G)-b*(C*z-A*G)+B*(C*I-A*O),-(v*(O*z-I*G)-b*(m*z-S*G)+B*(m*I-S*O)),v*(C*z-A*G)-w*(m*z-S*G)+B*(m*A-S*C),-(v*(C*I-A*O)-w*(m*I-S*O)+b*(m*A-S*C)),-(M*(O*z-I*G)-P*(C*z-A*G)+D*(C*I-A*O)),p*(O*z-I*G)-P*(m*z-S*G)+D*(m*I-S*O),-(p*(C*z-A*G)-M*(m*z-S*G)+D*(m*A-S*C)),p*(C*I-A*O)-M*(m*I-S*O)+P*(m*A-S*C),M*(b*z-I*B)-P*(w*z-A*B)+D*(w*I-A*b),-(p*(b*z-I*B)-P*(v*z-S*B)+D*(v*I-S*b)),p*(w*z-A*B)-M*(v*z-S*B)+D*(v*A-S*w),-(p*(w*I-A*b)-M*(v*I-S*b)+P*(v*A-S*w)),-(M*(b*G-O*B)-P*(w*G-C*B)+D*(w*O-C*b)),p*(b*G-O*B)-P*(v*G-m*B)+D*(v*O-m*b),-(p*(w*G-C*B)-M*(v*G-m*B)+D*(v*C-m*w)),p*(w*O-C*b)-M*(v*O-m*b)+P*(v*C-m*w))},determinant:function(){var c=this.val,p=c[0],v=c[1],m=c[2],S=c[3],M=c[4],w=c[5],C=c[6],A=c[7],P=c[8],b=c[9],O=c[10],I=c[11],D=c[12],B=c[13],G=c[14],z=c[15],X=p*w-v*M,j=p*C-m*M,Q=p*A-S*M,tt=v*C-m*w,Y=v*A-S*w,Z=m*A-S*C,U=P*B-b*D,H=P*G-O*D,$=P*z-I*D,_=b*G-O*B,q=b*z-I*B,at=O*z-I*G;return X*at-j*q+Q*_+tt*$-Y*H+Z*U},multiply:function(c){var p=this.val,v=p[0],m=p[1],S=p[2],M=p[3],w=p[4],C=p[5],A=p[6],P=p[7],b=p[8],O=p[9],I=p[10],D=p[11],B=p[12],G=p[13],z=p[14],X=p[15],j=c.val,Q=j[0],tt=j[1],Y=j[2],Z=j[3];return p[0]=Q*v+tt*w+Y*b+Z*B,p[1]=Q*m+tt*C+Y*O+Z*G,p[2]=Q*S+tt*A+Y*I+Z*z,p[3]=Q*M+tt*P+Y*D+Z*X,Q=j[4],tt=j[5],Y=j[6],Z=j[7],p[4]=Q*v+tt*w+Y*b+Z*B,p[5]=Q*m+tt*C+Y*O+Z*G,p[6]=Q*S+tt*A+Y*I+Z*z,p[7]=Q*M+tt*P+Y*D+Z*X,Q=j[8],tt=j[9],Y=j[10],Z=j[11],p[8]=Q*v+tt*w+Y*b+Z*B,p[9]=Q*m+tt*C+Y*O+Z*G,p[10]=Q*S+tt*A+Y*I+Z*z,p[11]=Q*M+tt*P+Y*D+Z*X,Q=j[12],tt=j[13],Y=j[14],Z=j[15],p[12]=Q*v+tt*w+Y*b+Z*B,p[13]=Q*m+tt*C+Y*O+Z*G,p[14]=Q*S+tt*A+Y*I+Z*z,p[15]=Q*M+tt*P+Y*D+Z*X,this},multiplyLocal:function(c){var p=this.val,v=c.val;return this.setValues(p[0]*v[0]+p[1]*v[4]+p[2]*v[8]+p[3]*v[12],p[0]*v[1]+p[1]*v[5]+p[2]*v[9]+p[3]*v[13],p[0]*v[2]+p[1]*v[6]+p[2]*v[10]+p[3]*v[14],p[0]*v[3]+p[1]*v[7]+p[2]*v[11]+p[3]*v[15],p[4]*v[0]+p[5]*v[4]+p[6]*v[8]+p[7]*v[12],p[4]*v[1]+p[5]*v[5]+p[6]*v[9]+p[7]*v[13],p[4]*v[2]+p[5]*v[6]+p[6]*v[10]+p[7]*v[14],p[4]*v[3]+p[5]*v[7]+p[6]*v[11]+p[7]*v[15],p[8]*v[0]+p[9]*v[4]+p[10]*v[8]+p[11]*v[12],p[8]*v[1]+p[9]*v[5]+p[10]*v[9]+p[11]*v[13],p[8]*v[2]+p[9]*v[6]+p[10]*v[10]+p[11]*v[14],p[8]*v[3]+p[9]*v[7]+p[10]*v[11]+p[11]*v[15],p[12]*v[0]+p[13]*v[4]+p[14]*v[8]+p[15]*v[12],p[12]*v[1]+p[13]*v[5]+p[14]*v[9]+p[15]*v[13],p[12]*v[2]+p[13]*v[6]+p[14]*v[10]+p[15]*v[14],p[12]*v[3]+p[13]*v[7]+p[14]*v[11]+p[15]*v[15])},premultiply:function(c){return this.multiplyMatrices(c,this)},multiplyMatrices:function(c,p){var v=c.val,m=p.val,S=v[0],M=v[4],w=v[8],C=v[12],A=v[1],P=v[5],b=v[9],O=v[13],I=v[2],D=v[6],B=v[10],G=v[14],z=v[3],X=v[7],j=v[11],Q=v[15],tt=m[0],Y=m[4],Z=m[8],U=m[12],H=m[1],$=m[5],_=m[9],q=m[13],at=m[2],ot=m[6],rt=m[10],gt=m[14],yt=m[3],Et=m[7],At=m[11],Pt=m[15];return this.setValues(S*tt+M*H+w*at+C*yt,A*tt+P*H+b*at+O*yt,I*tt+D*H+B*at+G*yt,z*tt+X*H+j*at+Q*yt,S*Y+M*$+w*ot+C*Et,A*Y+P*$+b*ot+O*Et,I*Y+D*$+B*ot+G*Et,z*Y+X*$+j*ot+Q*Et,S*Z+M*_+w*rt+C*At,A*Z+P*_+b*rt+O*At,I*Z+D*_+B*rt+G*At,z*Z+X*_+j*rt+Q*At,S*U+M*q+w*gt+C*Pt,A*U+P*q+b*gt+O*Pt,I*U+D*q+B*gt+G*Pt,z*U+X*q+j*gt+Q*Pt)},translate:function(c){return this.translateXYZ(c.x,c.y,c.z)},translateXYZ:function(c,p,v){var m=this.val;return m[12]=m[0]*c+m[4]*p+m[8]*v+m[12],m[13]=m[1]*c+m[5]*p+m[9]*v+m[13],m[14]=m[2]*c+m[6]*p+m[10]*v+m[14],m[15]=m[3]*c+m[7]*p+m[11]*v+m[15],this},scale:function(c){return this.scaleXYZ(c.x,c.y,c.z)},scaleXYZ:function(c,p,v){var m=this.val;return m[0]=m[0]*c,m[1]=m[1]*c,m[2]=m[2]*c,m[3]=m[3]*c,m[4]=m[4]*p,m[5]=m[5]*p,m[6]=m[6]*p,m[7]=m[7]*p,m[8]=m[8]*v,m[9]=m[9]*v,m[10]=m[10]*v,m[11]=m[11]*v,this},makeRotationAxis:function(c,p){var v=Math.cos(p),m=Math.sin(p),S=1-v,M=c.x,w=c.y,C=c.z,A=S*M,P=S*w;return this.setValues(A*M+v,A*w-m*C,A*C+m*w,0,A*w+m*C,P*w+v,P*C-m*M,0,A*C-m*w,P*C+m*M,S*C*C+v,0,0,0,0,1)},rotate:function(c,p){var v=this.val,m=p.x,S=p.y,M=p.z,w=Math.sqrt(m*m+S*S+M*M);if(Math.abs(w){/** + */var r=e(83419),d=e(25836),h=1e-6,a=new r({initialize:function(p){this.val=new Float32Array(16),p?this.copy(p):this.identity()},clone:function(){return new a(this)},set:function(c){return this.copy(c)},setValues:function(c,p,v,m,S,M,w,C,A,P,b,O,I,D,B,G){var z=this.val;return z[0]=c,z[1]=p,z[2]=v,z[3]=m,z[4]=S,z[5]=M,z[6]=w,z[7]=C,z[8]=A,z[9]=P,z[10]=b,z[11]=O,z[12]=I,z[13]=D,z[14]=B,z[15]=G,this},copy:function(c){var p=c.val;return this.setValues(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15])},fromArray:function(c){return this.setValues(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(c,p,v){var m=l.fromQuat(v),S=m.val,M=p.x,w=p.y,C=p.z;return this.setValues(S[0]*M,S[1]*M,S[2]*M,0,S[4]*w,S[5]*w,S[6]*w,0,S[8]*C,S[9]*C,S[10]*C,0,c.x,c.y,c.z,1)},xyz:function(c,p,v){this.identity();var m=this.val;return m[12]=c,m[13]=p,m[14]=v,this},scaling:function(c,p,v){this.zero();var m=this.val;return m[0]=c,m[5]=p,m[10]=v,m[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 c=this.val,p=c[1],v=c[2],m=c[3],S=c[6],M=c[7],w=c[11];return c[1]=c[4],c[2]=c[8],c[3]=c[12],c[4]=p,c[6]=c[9],c[7]=c[13],c[8]=v,c[9]=S,c[11]=c[14],c[12]=m,c[13]=M,c[14]=w,this},getInverse:function(c){return this.copy(c),this.invert()},invert:function(){var c=this.val,p=c[0],v=c[1],m=c[2],S=c[3],M=c[4],w=c[5],C=c[6],A=c[7],P=c[8],b=c[9],O=c[10],I=c[11],D=c[12],B=c[13],G=c[14],z=c[15],X=p*w-v*M,j=p*C-m*M,Q=p*A-S*M,tt=v*C-m*w,Y=v*A-S*w,$=m*A-S*C,U=P*B-b*D,H=P*G-O*D,Z=P*z-I*D,_=b*G-O*B,q=b*z-I*B,at=O*z-I*G,ot=X*at-j*q+Q*_+tt*Z-Y*H+$*U;return ot?(ot=1/ot,this.setValues((w*at-C*q+A*_)*ot,(m*q-v*at-S*_)*ot,(B*$-G*Y+z*tt)*ot,(O*Y-b*$-I*tt)*ot,(C*Z-M*at-A*H)*ot,(p*at-m*Z+S*H)*ot,(G*Q-D*$-z*j)*ot,(P*$-O*Q+I*j)*ot,(M*q-w*Z+A*U)*ot,(v*Z-p*q-S*U)*ot,(D*Y-B*Q+z*X)*ot,(b*Q-P*Y-I*X)*ot,(w*H-M*_-C*U)*ot,(p*_-v*H+m*U)*ot,(B*j-D*tt-G*X)*ot,(P*tt-b*j+O*X)*ot)):this},adjoint:function(){var c=this.val,p=c[0],v=c[1],m=c[2],S=c[3],M=c[4],w=c[5],C=c[6],A=c[7],P=c[8],b=c[9],O=c[10],I=c[11],D=c[12],B=c[13],G=c[14],z=c[15];return this.setValues(w*(O*z-I*G)-b*(C*z-A*G)+B*(C*I-A*O),-(v*(O*z-I*G)-b*(m*z-S*G)+B*(m*I-S*O)),v*(C*z-A*G)-w*(m*z-S*G)+B*(m*A-S*C),-(v*(C*I-A*O)-w*(m*I-S*O)+b*(m*A-S*C)),-(M*(O*z-I*G)-P*(C*z-A*G)+D*(C*I-A*O)),p*(O*z-I*G)-P*(m*z-S*G)+D*(m*I-S*O),-(p*(C*z-A*G)-M*(m*z-S*G)+D*(m*A-S*C)),p*(C*I-A*O)-M*(m*I-S*O)+P*(m*A-S*C),M*(b*z-I*B)-P*(w*z-A*B)+D*(w*I-A*b),-(p*(b*z-I*B)-P*(v*z-S*B)+D*(v*I-S*b)),p*(w*z-A*B)-M*(v*z-S*B)+D*(v*A-S*w),-(p*(w*I-A*b)-M*(v*I-S*b)+P*(v*A-S*w)),-(M*(b*G-O*B)-P*(w*G-C*B)+D*(w*O-C*b)),p*(b*G-O*B)-P*(v*G-m*B)+D*(v*O-m*b),-(p*(w*G-C*B)-M*(v*G-m*B)+D*(v*C-m*w)),p*(w*O-C*b)-M*(v*O-m*b)+P*(v*C-m*w))},determinant:function(){var c=this.val,p=c[0],v=c[1],m=c[2],S=c[3],M=c[4],w=c[5],C=c[6],A=c[7],P=c[8],b=c[9],O=c[10],I=c[11],D=c[12],B=c[13],G=c[14],z=c[15],X=p*w-v*M,j=p*C-m*M,Q=p*A-S*M,tt=v*C-m*w,Y=v*A-S*w,$=m*A-S*C,U=P*B-b*D,H=P*G-O*D,Z=P*z-I*D,_=b*G-O*B,q=b*z-I*B,at=O*z-I*G;return X*at-j*q+Q*_+tt*Z-Y*H+$*U},multiply:function(c){var p=this.val,v=p[0],m=p[1],S=p[2],M=p[3],w=p[4],C=p[5],A=p[6],P=p[7],b=p[8],O=p[9],I=p[10],D=p[11],B=p[12],G=p[13],z=p[14],X=p[15],j=c.val,Q=j[0],tt=j[1],Y=j[2],$=j[3];return p[0]=Q*v+tt*w+Y*b+$*B,p[1]=Q*m+tt*C+Y*O+$*G,p[2]=Q*S+tt*A+Y*I+$*z,p[3]=Q*M+tt*P+Y*D+$*X,Q=j[4],tt=j[5],Y=j[6],$=j[7],p[4]=Q*v+tt*w+Y*b+$*B,p[5]=Q*m+tt*C+Y*O+$*G,p[6]=Q*S+tt*A+Y*I+$*z,p[7]=Q*M+tt*P+Y*D+$*X,Q=j[8],tt=j[9],Y=j[10],$=j[11],p[8]=Q*v+tt*w+Y*b+$*B,p[9]=Q*m+tt*C+Y*O+$*G,p[10]=Q*S+tt*A+Y*I+$*z,p[11]=Q*M+tt*P+Y*D+$*X,Q=j[12],tt=j[13],Y=j[14],$=j[15],p[12]=Q*v+tt*w+Y*b+$*B,p[13]=Q*m+tt*C+Y*O+$*G,p[14]=Q*S+tt*A+Y*I+$*z,p[15]=Q*M+tt*P+Y*D+$*X,this},multiplyLocal:function(c){var p=this.val,v=c.val;return this.setValues(p[0]*v[0]+p[1]*v[4]+p[2]*v[8]+p[3]*v[12],p[0]*v[1]+p[1]*v[5]+p[2]*v[9]+p[3]*v[13],p[0]*v[2]+p[1]*v[6]+p[2]*v[10]+p[3]*v[14],p[0]*v[3]+p[1]*v[7]+p[2]*v[11]+p[3]*v[15],p[4]*v[0]+p[5]*v[4]+p[6]*v[8]+p[7]*v[12],p[4]*v[1]+p[5]*v[5]+p[6]*v[9]+p[7]*v[13],p[4]*v[2]+p[5]*v[6]+p[6]*v[10]+p[7]*v[14],p[4]*v[3]+p[5]*v[7]+p[6]*v[11]+p[7]*v[15],p[8]*v[0]+p[9]*v[4]+p[10]*v[8]+p[11]*v[12],p[8]*v[1]+p[9]*v[5]+p[10]*v[9]+p[11]*v[13],p[8]*v[2]+p[9]*v[6]+p[10]*v[10]+p[11]*v[14],p[8]*v[3]+p[9]*v[7]+p[10]*v[11]+p[11]*v[15],p[12]*v[0]+p[13]*v[4]+p[14]*v[8]+p[15]*v[12],p[12]*v[1]+p[13]*v[5]+p[14]*v[9]+p[15]*v[13],p[12]*v[2]+p[13]*v[6]+p[14]*v[10]+p[15]*v[14],p[12]*v[3]+p[13]*v[7]+p[14]*v[11]+p[15]*v[15])},premultiply:function(c){return this.multiplyMatrices(c,this)},multiplyMatrices:function(c,p){var v=c.val,m=p.val,S=v[0],M=v[4],w=v[8],C=v[12],A=v[1],P=v[5],b=v[9],O=v[13],I=v[2],D=v[6],B=v[10],G=v[14],z=v[3],X=v[7],j=v[11],Q=v[15],tt=m[0],Y=m[4],$=m[8],U=m[12],H=m[1],Z=m[5],_=m[9],q=m[13],at=m[2],ot=m[6],rt=m[10],gt=m[14],yt=m[3],Et=m[7],At=m[11],Pt=m[15];return this.setValues(S*tt+M*H+w*at+C*yt,A*tt+P*H+b*at+O*yt,I*tt+D*H+B*at+G*yt,z*tt+X*H+j*at+Q*yt,S*Y+M*Z+w*ot+C*Et,A*Y+P*Z+b*ot+O*Et,I*Y+D*Z+B*ot+G*Et,z*Y+X*Z+j*ot+Q*Et,S*$+M*_+w*rt+C*At,A*$+P*_+b*rt+O*At,I*$+D*_+B*rt+G*At,z*$+X*_+j*rt+Q*At,S*U+M*q+w*gt+C*Pt,A*U+P*q+b*gt+O*Pt,I*U+D*q+B*gt+G*Pt,z*U+X*q+j*gt+Q*Pt)},translate:function(c){return this.translateXYZ(c.x,c.y,c.z)},translateXYZ:function(c,p,v){var m=this.val;return m[12]=m[0]*c+m[4]*p+m[8]*v+m[12],m[13]=m[1]*c+m[5]*p+m[9]*v+m[13],m[14]=m[2]*c+m[6]*p+m[10]*v+m[14],m[15]=m[3]*c+m[7]*p+m[11]*v+m[15],this},scale:function(c){return this.scaleXYZ(c.x,c.y,c.z)},scaleXYZ:function(c,p,v){var m=this.val;return m[0]=m[0]*c,m[1]=m[1]*c,m[2]=m[2]*c,m[3]=m[3]*c,m[4]=m[4]*p,m[5]=m[5]*p,m[6]=m[6]*p,m[7]=m[7]*p,m[8]=m[8]*v,m[9]=m[9]*v,m[10]=m[10]*v,m[11]=m[11]*v,this},makeRotationAxis:function(c,p){var v=Math.cos(p),m=Math.sin(p),S=1-v,M=c.x,w=c.y,C=c.z,A=S*M,P=S*w;return this.setValues(A*M+v,A*w-m*C,A*C+m*w,0,A*w+m*C,P*w+v,P*C-m*M,0,A*C-m*w,P*C+m*M,S*C*C+v,0,0,0,0,1)},rotate:function(c,p){var v=this.val,m=p.x,S=p.y,M=p.z,w=Math.sqrt(m*m+S*S+M*M);if(Math.abs(w){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return Math.min(e+r,d)};s.exports=y},50040:s=>{/** + */var x=function(e,r,d){return Math.min(e+r,d)};s.exports=x},50040:s=>{/** * @author Vladislav Forsh * @copyright 2021 RoboWhale * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r=e.length;if(r===0)return 0;e.sort(function(h,a){return h-a});var d=Math.floor(r/2);return r%2===0?(e[d]+e[d-1])/2:e[d]};s.exports=y},37204:s=>{/** + */var x=function(e){var r=e.length;if(r===0)return 0;e.sort(function(h,a){return h-a});var d=Math.floor(r/2);return r%2===0?(e[d]+e[d-1])/2:e[d]};s.exports=x},37204:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return Math.max(e-r,d)};s.exports=y},65201:s=>{/** + */var x=function(e,r,d){return Math.max(e-r,d)};s.exports=x},65201:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){d===void 0&&(d=r+1);var a=(e-r)/(d-r);return a>1?h!==void 0?(a=(h-e)/(h-d),a<0&&(a=0)):a=1:a<0&&(a=0),a};s.exports=y},15746:(s,y,e)=>{/** + */var x=function(e,r,d,h){d===void 0&&(d=r+1);var a=(e-r)/(d-r);return a>1?h!==void 0?(a=(h-e)/(h-d),a<0&&(a=0)):a=1:a<0&&(a=0),a};s.exports=x},15746:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(94434),h=e(29747),a=e(25836),l=1e-6,n=new Int8Array([1,2,0]),u=new Float32Array([0,0,0]),f=new a(1,0,0),o=new a(0,1,0),c=new a,p=new d,v=new r({initialize:function(S,M,w,C){this.onChangeCallback=h,this.set(S,M,w,C)},x:{get:function(){return this._x},set:function(m){this._x=m,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(m){this._y=m,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(m){this._z=m,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(m){this._w=m,this.onChangeCallback(this)}},copy:function(m){return this.set(m)},set:function(m,S,M,w,C){return C===void 0&&(C=!0),typeof m=="object"?(this._x=m.x||0,this._y=m.y||0,this._z=m.z||0,this._w=m.w||0):(this._x=m||0,this._y=S||0,this._z=M||0,this._w=w||0),C&&this.onChangeCallback(this),this},add:function(m){return this._x+=m.x,this._y+=m.y,this._z+=m.z,this._w+=m.w,this.onChangeCallback(this),this},subtract:function(m){return this._x-=m.x,this._y-=m.y,this._z-=m.z,this._w-=m.w,this.onChangeCallback(this),this},scale:function(m){return this._x*=m,this._y*=m,this._z*=m,this._w*=m,this.onChangeCallback(this),this},length:function(){var m=this.x,S=this.y,M=this.z,w=this.w;return Math.sqrt(m*m+S*S+M*M+w*w)},lengthSq:function(){var m=this.x,S=this.y,M=this.z,w=this.w;return m*m+S*S+M*M+w*w},normalize:function(){var m=this.x,S=this.y,M=this.z,w=this.w,C=m*m+S*S+M*M+w*w;return C>0&&(C=1/Math.sqrt(C),this._x=m*C,this._y=S*C,this._z=M*C,this._w=w*C),this.onChangeCallback(this),this},dot:function(m){return this.x*m.x+this.y*m.y+this.z*m.z+this.w*m.w},lerp:function(m,S){S===void 0&&(S=0);var M=this.x,w=this.y,C=this.z,A=this.w;return this.set(M+S*(m.x-M),w+S*(m.y-w),C+S*(m.z-C),A+S*(m.w-A))},rotationTo:function(m,S){var M=m.x*S.x+m.y*S.y+m.z*S.z;return M<-.999999?(c.copy(f).cross(m).length().999999?this.set(0,0,0,1):(c.copy(m).cross(S),this._x=c.x,this._y=c.y,this._z=c.z,this._w=1+M,this.normalize())},setAxes:function(m,S,M){var w=p.val;return w[0]=S.x,w[3]=S.y,w[6]=S.z,w[1]=M.x,w[4]=M.y,w[7]=M.z,w[2]=-m.x,w[5]=-m.y,w[8]=-m.z,this.fromMat3(p).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(m,S){S=S*.5;var M=Math.sin(S);return this.set(M*m.x,M*m.y,M*m.z,Math.cos(S))},multiply:function(m){var S=this.x,M=this.y,w=this.z,C=this.w,A=m.x,P=m.y,b=m.z,O=m.w;return this.set(S*O+C*A+M*b-w*P,M*O+C*P+w*A-S*b,w*O+C*b+S*P-M*A,C*O-S*A-M*P-w*b)},slerp:function(m,S){var M=this.x,w=this.y,C=this.z,A=this.w,P=m.x,b=m.y,O=m.z,I=m.w,D=M*P+w*b+C*O+A*I;D<0&&(D=-D,P=-P,b=-b,O=-O,I=-I);var B=1-S,G=S;if(1-D>l){var z=Math.acos(D),X=Math.sin(z);B=Math.sin((1-S)*z)/X,G=Math.sin(S*z)/X}return this.set(B*M+G*P,B*w+G*b,B*C+G*O,B*A+G*I)},invert:function(){var m=this.x,S=this.y,M=this.z,w=this.w,C=m*m+S*S+M*M+w*w,A=C?1/C:0;return this.set(-m*A,-S*A,-M*A,w*A)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(m){m*=.5;var S=this.x,M=this.y,w=this.z,C=this.w,A=Math.sin(m),P=Math.cos(m);return this.set(S*P+C*A,M*P+w*A,w*P-M*A,C*P-S*A)},rotateY:function(m){m*=.5;var S=this.x,M=this.y,w=this.z,C=this.w,A=Math.sin(m),P=Math.cos(m);return this.set(S*P-w*A,M*P+C*A,w*P+S*A,C*P-M*A)},rotateZ:function(m){m*=.5;var S=this.x,M=this.y,w=this.z,C=this.w,A=Math.sin(m),P=Math.cos(m);return this.set(S*P+M*A,M*P-S*A,w*P+C*A,C*P-w*A)},calculateW:function(){var m=this.x,S=this.y,M=this.z;return this.w=-Math.sqrt(1-m*m-S*S-M*M),this},setFromEuler:function(m,S){var M=m.x/2,w=m.y/2,C=m.z/2,A=Math.cos(M),P=Math.cos(w),b=Math.cos(C),O=Math.sin(M),I=Math.sin(w),D=Math.sin(C);switch(m.order){case"XYZ":{this.set(O*P*b+A*I*D,A*I*b-O*P*D,A*P*D+O*I*b,A*P*b-O*I*D,S);break}case"YXZ":{this.set(O*P*b+A*I*D,A*I*b-O*P*D,A*P*D-O*I*b,A*P*b+O*I*D,S);break}case"ZXY":{this.set(O*P*b-A*I*D,A*I*b+O*P*D,A*P*D+O*I*b,A*P*b-O*I*D,S);break}case"ZYX":{this.set(O*P*b-A*I*D,A*I*b+O*P*D,A*P*D-O*I*b,A*P*b+O*I*D,S);break}case"YZX":{this.set(O*P*b+A*I*D,A*I*b+O*P*D,A*P*D-O*I*b,A*P*b-O*I*D,S);break}case"XZY":{this.set(O*P*b-A*I*D,A*I*b-O*P*D,A*P*D+O*I*b,A*P*b+O*I*D,S);break}}return this},setFromRotationMatrix:function(m){var S=m.val,M=S[0],w=S[4],C=S[8],A=S[1],P=S[5],b=S[9],O=S[2],I=S[6],D=S[10],B=M+P+D,G;return B>0?(G=.5/Math.sqrt(B+1),this.set((I-b)*G,(C-O)*G,(A-w)*G,.25/G)):M>P&&M>D?(G=2*Math.sqrt(1+M-P-D),this.set(.25*G,(w+A)/G,(C+O)/G,(I-b)/G)):P>D?(G=2*Math.sqrt(1+P-M-D),this.set((w+A)/G,.25*G,(b+I)/G,(C-O)/G)):(G=2*Math.sqrt(1+D-M-P),this.set((C+O)/G,(b+I)/G,.25*G,(A-w)/G)),this},fromMat3:function(m){var S=m.val,M=S[0]+S[4]+S[8],w;if(M>0)w=Math.sqrt(M+1),this.w=.5*w,w=.5/w,this._x=(S[7]-S[5])*w,this._y=(S[2]-S[6])*w,this._z=(S[3]-S[1])*w;else{var C=0;S[4]>S[0]&&(C=1),S[8]>S[C*3+C]&&(C=2);var A=n[C],P=n[A];w=Math.sqrt(S[C*3+C]-S[A*3+A]-S[P*3+P]+1),u[C]=.5*w,w=.5/w,u[A]=(S[A*3+C]+S[C*3+A])*w,u[P]=(S[P*3+C]+S[C*3+P])*w,this._x=u[0],this._y=u[1],this._z=u[2],this._w=(S[P*3+A]-S[A*3+P])*w}return this.onChangeCallback(this),this}});s.exports=v},43396:(s,y,e)=>{/** + */var r=e(83419),d=e(94434),h=e(29747),a=e(25836),l=1e-6,n=new Int8Array([1,2,0]),u=new Float32Array([0,0,0]),f=new a(1,0,0),o=new a(0,1,0),c=new a,p=new d,v=new r({initialize:function(S,M,w,C){this.onChangeCallback=h,this.set(S,M,w,C)},x:{get:function(){return this._x},set:function(m){this._x=m,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(m){this._y=m,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(m){this._z=m,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(m){this._w=m,this.onChangeCallback(this)}},copy:function(m){return this.set(m)},set:function(m,S,M,w,C){return C===void 0&&(C=!0),typeof m=="object"?(this._x=m.x||0,this._y=m.y||0,this._z=m.z||0,this._w=m.w||0):(this._x=m||0,this._y=S||0,this._z=M||0,this._w=w||0),C&&this.onChangeCallback(this),this},add:function(m){return this._x+=m.x,this._y+=m.y,this._z+=m.z,this._w+=m.w,this.onChangeCallback(this),this},subtract:function(m){return this._x-=m.x,this._y-=m.y,this._z-=m.z,this._w-=m.w,this.onChangeCallback(this),this},scale:function(m){return this._x*=m,this._y*=m,this._z*=m,this._w*=m,this.onChangeCallback(this),this},length:function(){var m=this.x,S=this.y,M=this.z,w=this.w;return Math.sqrt(m*m+S*S+M*M+w*w)},lengthSq:function(){var m=this.x,S=this.y,M=this.z,w=this.w;return m*m+S*S+M*M+w*w},normalize:function(){var m=this.x,S=this.y,M=this.z,w=this.w,C=m*m+S*S+M*M+w*w;return C>0&&(C=1/Math.sqrt(C),this._x=m*C,this._y=S*C,this._z=M*C,this._w=w*C),this.onChangeCallback(this),this},dot:function(m){return this.x*m.x+this.y*m.y+this.z*m.z+this.w*m.w},lerp:function(m,S){S===void 0&&(S=0);var M=this.x,w=this.y,C=this.z,A=this.w;return this.set(M+S*(m.x-M),w+S*(m.y-w),C+S*(m.z-C),A+S*(m.w-A))},rotationTo:function(m,S){var M=m.x*S.x+m.y*S.y+m.z*S.z;return M<-.999999?(c.copy(f).cross(m).length().999999?this.set(0,0,0,1):(c.copy(m).cross(S),this._x=c.x,this._y=c.y,this._z=c.z,this._w=1+M,this.normalize())},setAxes:function(m,S,M){var w=p.val;return w[0]=S.x,w[3]=S.y,w[6]=S.z,w[1]=M.x,w[4]=M.y,w[7]=M.z,w[2]=-m.x,w[5]=-m.y,w[8]=-m.z,this.fromMat3(p).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(m,S){S=S*.5;var M=Math.sin(S);return this.set(M*m.x,M*m.y,M*m.z,Math.cos(S))},multiply:function(m){var S=this.x,M=this.y,w=this.z,C=this.w,A=m.x,P=m.y,b=m.z,O=m.w;return this.set(S*O+C*A+M*b-w*P,M*O+C*P+w*A-S*b,w*O+C*b+S*P-M*A,C*O-S*A-M*P-w*b)},slerp:function(m,S){var M=this.x,w=this.y,C=this.z,A=this.w,P=m.x,b=m.y,O=m.z,I=m.w,D=M*P+w*b+C*O+A*I;D<0&&(D=-D,P=-P,b=-b,O=-O,I=-I);var B=1-S,G=S;if(1-D>l){var z=Math.acos(D),X=Math.sin(z);B=Math.sin((1-S)*z)/X,G=Math.sin(S*z)/X}return this.set(B*M+G*P,B*w+G*b,B*C+G*O,B*A+G*I)},invert:function(){var m=this.x,S=this.y,M=this.z,w=this.w,C=m*m+S*S+M*M+w*w,A=C?1/C:0;return this.set(-m*A,-S*A,-M*A,w*A)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(m){m*=.5;var S=this.x,M=this.y,w=this.z,C=this.w,A=Math.sin(m),P=Math.cos(m);return this.set(S*P+C*A,M*P+w*A,w*P-M*A,C*P-S*A)},rotateY:function(m){m*=.5;var S=this.x,M=this.y,w=this.z,C=this.w,A=Math.sin(m),P=Math.cos(m);return this.set(S*P-w*A,M*P+C*A,w*P+S*A,C*P-M*A)},rotateZ:function(m){m*=.5;var S=this.x,M=this.y,w=this.z,C=this.w,A=Math.sin(m),P=Math.cos(m);return this.set(S*P+M*A,M*P-S*A,w*P+C*A,C*P-w*A)},calculateW:function(){var m=this.x,S=this.y,M=this.z;return this.w=-Math.sqrt(1-m*m-S*S-M*M),this},setFromEuler:function(m,S){var M=m.x/2,w=m.y/2,C=m.z/2,A=Math.cos(M),P=Math.cos(w),b=Math.cos(C),O=Math.sin(M),I=Math.sin(w),D=Math.sin(C);switch(m.order){case"XYZ":{this.set(O*P*b+A*I*D,A*I*b-O*P*D,A*P*D+O*I*b,A*P*b-O*I*D,S);break}case"YXZ":{this.set(O*P*b+A*I*D,A*I*b-O*P*D,A*P*D-O*I*b,A*P*b+O*I*D,S);break}case"ZXY":{this.set(O*P*b-A*I*D,A*I*b+O*P*D,A*P*D+O*I*b,A*P*b-O*I*D,S);break}case"ZYX":{this.set(O*P*b-A*I*D,A*I*b+O*P*D,A*P*D-O*I*b,A*P*b+O*I*D,S);break}case"YZX":{this.set(O*P*b+A*I*D,A*I*b+O*P*D,A*P*D-O*I*b,A*P*b-O*I*D,S);break}case"XZY":{this.set(O*P*b-A*I*D,A*I*b-O*P*D,A*P*D+O*I*b,A*P*b+O*I*D,S);break}}return this},setFromRotationMatrix:function(m){var S=m.val,M=S[0],w=S[4],C=S[8],A=S[1],P=S[5],b=S[9],O=S[2],I=S[6],D=S[10],B=M+P+D,G;return B>0?(G=.5/Math.sqrt(B+1),this.set((I-b)*G,(C-O)*G,(A-w)*G,.25/G)):M>P&&M>D?(G=2*Math.sqrt(1+M-P-D),this.set(.25*G,(w+A)/G,(C+O)/G,(I-b)/G)):P>D?(G=2*Math.sqrt(1+P-M-D),this.set((w+A)/G,.25*G,(b+I)/G,(C-O)/G)):(G=2*Math.sqrt(1+D-M-P),this.set((C+O)/G,(b+I)/G,.25*G,(A-w)/G)),this},fromMat3:function(m){var S=m.val,M=S[0]+S[4]+S[8],w;if(M>0)w=Math.sqrt(M+1),this.w=.5*w,w=.5/w,this._x=(S[7]-S[5])*w,this._y=(S[2]-S[6])*w,this._z=(S[3]-S[1])*w;else{var C=0;S[4]>S[0]&&(C=1),S[8]>S[C*3+C]&&(C=2);var A=n[C],P=n[A];w=Math.sqrt(S[C*3+C]-S[A*3+A]-S[P*3+P]+1),u[C]=.5*w,w=.5/w,u[A]=(S[A*3+C]+S[C*3+A])*w,u[P]=(S[P*3+C]+S[C*3+P])*w,this._x=u[0],this._y=u[1],this._z=u[2],this._w=(S[P*3+A]-S[A*3+P])*w}return this.onChangeCallback(this),this}});s.exports=v},43396:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3751,31 +3751,31 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){r===void 0&&(r=1);var d=Math.random()*2*Math.PI;return e.x=Math.cos(d)*r,e.y=Math.sin(d)*r,e};s.exports=y},60706:s=>{/** + */var x=function(e,r){r===void 0&&(r=1);var d=Math.random()*2*Math.PI;return e.x=Math.cos(d)*r,e.y=Math.sin(d)*r,e};s.exports=x},60706:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){r===void 0&&(r=1);var d=Math.random()*2*Math.PI,h=Math.random()*2-1,a=Math.sqrt(1-h*h)*r;return e.x=Math.cos(d)*a,e.y=Math.sin(d)*a,e.z=h*r,e};s.exports=y},67421:s=>{/** + */var x=function(e,r){r===void 0&&(r=1);var d=Math.random()*2*Math.PI,h=Math.random()*2-1,a=Math.sqrt(1-h*h)*r;return e.x=Math.cos(d)*a,e.y=Math.sin(d)*a,e.z=h*r,e};s.exports=x},67421:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r===void 0&&(r=1),e.x=(Math.random()*2-1)*r,e.y=(Math.random()*2-1)*r,e.z=(Math.random()*2-1)*r,e.w=(Math.random()*2-1)*r,e};s.exports=y},36305:s=>{/** + */var x=function(e,r){return r===void 0&&(r=1),e.x=(Math.random()*2-1)*r,e.y=(Math.random()*2-1)*r,e.z=(Math.random()*2-1)*r,e.w=(Math.random()*2-1)*r,e};s.exports=x},36305:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=e.x,h=e.y;return e.x=d*Math.cos(r)-h*Math.sin(r),e.y=d*Math.sin(r)+h*Math.cos(r),e};s.exports=y},11520:s=>{/** + */var x=function(e,r){var d=e.x,h=e.y;return e.x=d*Math.cos(r)-h*Math.sin(r),e.y=d*Math.sin(r)+h*Math.cos(r),e};s.exports=x},11520:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){var a=Math.cos(h),l=Math.sin(h),n=e.x-r,u=e.y-d;return e.x=n*a-u*l+r,e.y=n*l+u*a+d,e};s.exports=y},1163:s=>{/** + */var x=function(e,r,d,h){var a=Math.cos(h),l=Math.sin(h),n=e.x-r,u=e.y-d;return e.x=n*a-u*l+r,e.y=n*l+u*a+d,e};s.exports=x},1163:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h,a){var l=h+Math.atan2(e.y-d,e.x-r);return e.x=r+a*Math.cos(l),e.y=d+a*Math.sin(l),e};s.exports=y},70336:s=>{/** + */var x=function(e,r,d,h,a){var l=h+Math.atan2(e.y-d,e.x-r);return e.x=r+a*Math.cos(l),e.y=d+a*Math.sin(l),e};s.exports=x},70336:s=>{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h,a){return e.x=r+a*Math.cos(h),e.y=d+a*Math.sin(h),e};s.exports=y},72678:(s,y,e)=>{/** + */var x=function(e,r,d,h,a){return e.x=r+a*Math.cos(h),e.y=d+a*Math.sin(h),e};s.exports=x},72678:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3783,39 +3783,39 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e>0?Math.ceil(e):Math.floor(e)};s.exports=y},41013:s=>{/** + */var x=function(e){return e>0?Math.ceil(e):Math.floor(e)};s.exports=x},41013:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){r===void 0&&(r=0),d===void 0&&(d=10);var h=Math.pow(d,-r);return Math.round(e*h)/h};s.exports=y},16922:s=>{/** + */var x=function(e,r,d){r===void 0&&(r=0),d===void 0&&(d=10);var h=Math.pow(d,-r);return Math.round(e*h)/h};s.exports=x},16922:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){r===void 0&&(r=1),d===void 0&&(d=1),h===void 0&&(h=1),h*=Math.PI/e;for(var a=[],l=[],n=0;n{/** + */var x=function(e,r,d,h){r===void 0&&(r=1),d===void 0&&(d=1),h===void 0&&(h=1),h*=Math.PI/e;for(var a=[],l=[],n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return e<=r?0:e>=d?1:(e=(e-r)/(d-r),e*e*(3-2*e))};s.exports=y},54261:s=>{/** + */var x=function(e,r,d){return e<=r?0:e>=d?1:(e=(e-r)/(d-r),e*e*(3-2*e))};s.exports=x},54261:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return e=Math.max(0,Math.min(1,(e-r)/(d-r))),e*e*e*(e*(e*6-15)+10)};s.exports=y},44408:(s,y,e)=>{/** + */var x=function(e,r,d){return e=Math.max(0,Math.min(1,(e-r)/(d-r))),e*e*e*(e*(e*6-15)+10)};s.exports=x},44408:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26099),d=function(h,a,l,n){n===void 0&&(n=new r);var u=0,f=0,o=a*l;return h>0&&h<=o&&(h>a-1?(f=Math.floor(h/a),u=h-f*a):u=h),n.set(u,f)};s.exports=d},85955:(s,y,e)=>{/** + */var r=e(26099),d=function(h,a,l,n){n===void 0&&(n=new r);var u=0,f=0,o=a*l;return h>0&&h<=o&&(h>a-1?(f=Math.floor(h/a),u=h-f*a):u=h),n.set(u,f)};s.exports=d},85955:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26099),d=function(h,a,l,n,u,f,o,c){c===void 0&&(c=new r);var p=Math.sin(u),v=Math.cos(u),m=v*f,S=p*f,M=-p*o,w=v*o,C=1/(m*w+M*-S);return c.x=w*C*h+-M*C*a+(n*M-l*w)*C,c.y=m*C*a+-S*C*h+(-n*m+l*S)*C,c};s.exports=d},26099:(s,y,e)=>{/** + */var r=e(26099),d=function(h,a,l,n,u,f,o,c){c===void 0&&(c=new r);var p=Math.sin(u),v=Math.cos(u),m=v*f,S=p*f,M=-p*o,w=v*o,C=1/(m*w+M*-S);return c.x=w*C*h+-M*C*a+(n*M-l*w)*C,c.y=m*C*a+-S*C*h+(-n*m+l*S)*C,c};s.exports=d},26099:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(43855),h=new r({initialize:function(l,n){this.x=0,this.y=0,typeof l=="object"?(this.x=l.x||0,this.y=l.y||0):(n===void 0&&(n=l),this.x=l||0,this.y=n||0)},clone:function(){return new h(this.x,this.y)},copy:function(a){return this.x=a.x||0,this.y=a.y||0,this},setFromObject:function(a){return this.x=a.x||0,this.y=a.y||0,this},set:function(a,l){return l===void 0&&(l=a),this.x=a,this.y=l,this},setTo:function(a,l){return this.set(a,l)},setToPolar:function(a,l){return l==null&&(l=1),this.x=Math.cos(a)*l,this.y=Math.sin(a)*l,this},equals:function(a){return this.x===a.x&&this.y===a.y},fuzzyEquals:function(a,l){return d(this.x,a.x,l)&&d(this.y,a.y,l)},angle:function(){var a=Math.atan2(this.y,this.x);return a<0&&(a+=2*Math.PI),a},setAngle:function(a){return this.setToPolar(a,this.length())},add:function(a){return this.x+=a.x,this.y+=a.y,this},subtract:function(a){return this.x-=a.x,this.y-=a.y,this},multiply:function(a){return this.x*=a.x,this.y*=a.y,this},scale:function(a){return isFinite(a)?(this.x*=a,this.y*=a):(this.x=0,this.y=0),this},divide:function(a){return this.x/=a.x,this.y/=a.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(a){var l=a.x-this.x,n=a.y-this.y;return Math.sqrt(l*l+n*n)},distanceSq:function(a){var l=a.x-this.x,n=a.y-this.y;return l*l+n*n},length:function(){var a=this.x,l=this.y;return Math.sqrt(a*a+l*l)},setLength:function(a){return this.normalize().scale(a)},lengthSq:function(){var a=this.x,l=this.y;return a*a+l*l},normalize:function(){var a=this.x,l=this.y,n=a*a+l*l;return n>0&&(n=1/Math.sqrt(n),this.x=a*n,this.y=l*n),this},normalizeRightHand:function(){var a=this.x;return this.x=this.y*-1,this.y=a,this},normalizeLeftHand:function(){var a=this.x;return this.x=this.y,this.y=a*-1,this},dot:function(a){return this.x*a.x+this.y*a.y},cross:function(a){return this.x*a.y-this.y*a.x},lerp:function(a,l){l===void 0&&(l=0);var n=this.x,u=this.y;return this.x=n+l*(a.x-n),this.y=u+l*(a.y-u),this},transformMat3:function(a){var l=this.x,n=this.y,u=a.val;return this.x=u[0]*l+u[3]*n+u[6],this.y=u[1]*l+u[4]*n+u[7],this},transformMat4:function(a){var l=this.x,n=this.y,u=a.val;return this.x=u[0]*l+u[4]*n+u[12],this.y=u[1]*l+u[5]*n+u[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(a){var l=this.length();return l&&l>a&&this.scale(a/l),this},reflect:function(a){return a=a.clone().normalize(),this.subtract(a.scale(2*this.dot(a)))},mirror:function(a){return this.reflect(a).negate()},rotate:function(a){var l=Math.cos(a),n=Math.sin(a);return this.set(l*this.x-n*this.y,n*this.x+l*this.y)},project:function(a){var l=this.dot(a)/a.dot(a);return this.copy(a).scale(l)}});h.ZERO=new h,h.RIGHT=new h(1,0),h.LEFT=new h(-1,0),h.UP=new h(0,-1),h.DOWN=new h(0,1),h.ONE=new h(1,1),s.exports=h},25836:(s,y,e)=>{/** + */var r=e(83419),d=e(43855),h=new r({initialize:function(l,n){this.x=0,this.y=0,typeof l=="object"?(this.x=l.x||0,this.y=l.y||0):(n===void 0&&(n=l),this.x=l||0,this.y=n||0)},clone:function(){return new h(this.x,this.y)},copy:function(a){return this.x=a.x||0,this.y=a.y||0,this},setFromObject:function(a){return this.x=a.x||0,this.y=a.y||0,this},set:function(a,l){return l===void 0&&(l=a),this.x=a,this.y=l,this},setTo:function(a,l){return this.set(a,l)},setToPolar:function(a,l){return l==null&&(l=1),this.x=Math.cos(a)*l,this.y=Math.sin(a)*l,this},equals:function(a){return this.x===a.x&&this.y===a.y},fuzzyEquals:function(a,l){return d(this.x,a.x,l)&&d(this.y,a.y,l)},angle:function(){var a=Math.atan2(this.y,this.x);return a<0&&(a+=2*Math.PI),a},setAngle:function(a){return this.setToPolar(a,this.length())},add:function(a){return this.x+=a.x,this.y+=a.y,this},subtract:function(a){return this.x-=a.x,this.y-=a.y,this},multiply:function(a){return this.x*=a.x,this.y*=a.y,this},scale:function(a){return isFinite(a)?(this.x*=a,this.y*=a):(this.x=0,this.y=0),this},divide:function(a){return this.x/=a.x,this.y/=a.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(a){var l=a.x-this.x,n=a.y-this.y;return Math.sqrt(l*l+n*n)},distanceSq:function(a){var l=a.x-this.x,n=a.y-this.y;return l*l+n*n},length:function(){var a=this.x,l=this.y;return Math.sqrt(a*a+l*l)},setLength:function(a){return this.normalize().scale(a)},lengthSq:function(){var a=this.x,l=this.y;return a*a+l*l},normalize:function(){var a=this.x,l=this.y,n=a*a+l*l;return n>0&&(n=1/Math.sqrt(n),this.x=a*n,this.y=l*n),this},normalizeRightHand:function(){var a=this.x;return this.x=this.y*-1,this.y=a,this},normalizeLeftHand:function(){var a=this.x;return this.x=this.y,this.y=a*-1,this},dot:function(a){return this.x*a.x+this.y*a.y},cross:function(a){return this.x*a.y-this.y*a.x},lerp:function(a,l){l===void 0&&(l=0);var n=this.x,u=this.y;return this.x=n+l*(a.x-n),this.y=u+l*(a.y-u),this},transformMat3:function(a){var l=this.x,n=this.y,u=a.val;return this.x=u[0]*l+u[3]*n+u[6],this.y=u[1]*l+u[4]*n+u[7],this},transformMat4:function(a){var l=this.x,n=this.y,u=a.val;return this.x=u[0]*l+u[4]*n+u[12],this.y=u[1]*l+u[5]*n+u[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(a){var l=this.length();return l&&l>a&&this.scale(a/l),this},reflect:function(a){return a=a.clone().normalize(),this.subtract(a.scale(2*this.dot(a)))},mirror:function(a){return this.reflect(a).negate()},rotate:function(a){var l=Math.cos(a),n=Math.sin(a);return this.set(l*this.x-n*this.y,n*this.x+l*this.y)},project:function(a){var l=this.dot(a)/a.dot(a);return this.copy(a).scale(l)}});h.ZERO=new h,h.RIGHT=new h(1,0),h.LEFT=new h(-1,0),h.UP=new h(0,-1),h.DOWN=new h(0,1),h.ONE=new h(1,1),s.exports=h},25836:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a,l,n){this.x=0,this.y=0,this.z=0,typeof a=="object"?(this.x=a.x||0,this.y=a.y||0,this.z=a.z||0):(this.x=a||0,this.y=l||0,this.z=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(h){return this.x=Math.min(this.x,h.x),this.y=Math.min(this.y,h.y),this.z=Math.min(this.z,h.z),this},max:function(h){return this.x=Math.max(this.x,h.x),this.y=Math.max(this.y,h.y),this.z=Math.max(this.z,h.z),this},clone:function(){return new d(this.x,this.y,this.z)},addVectors:function(h,a){return this.x=h.x+a.x,this.y=h.y+a.y,this.z=h.z+a.z,this},crossVectors:function(h,a){var l=h.x,n=h.y,u=h.z,f=a.x,o=a.y,c=a.z;return this.x=n*c-u*o,this.y=u*f-l*c,this.z=l*o-n*f,this},equals:function(h){return this.x===h.x&&this.y===h.y&&this.z===h.z},copy:function(h){return this.x=h.x,this.y=h.y,this.z=h.z||0,this},set:function(h,a,l){return typeof h=="object"?(this.x=h.x||0,this.y=h.y||0,this.z=h.z||0):(this.x=h||0,this.y=a||0,this.z=l||0),this},setFromMatrixPosition:function(h){return this.fromArray(h.val,12)},setFromMatrixColumn:function(h,a){return this.fromArray(h.val,a*4)},fromArray:function(h,a){return a===void 0&&(a=0),this.x=h[a],this.y=h[a+1],this.z=h[a+2],this},add:function(h){return this.x+=h.x,this.y+=h.y,this.z+=h.z||0,this},addScalar:function(h){return this.x+=h,this.y+=h,this.z+=h,this},addScale:function(h,a){return this.x+=h.x*a,this.y+=h.y*a,this.z+=h.z*a||0,this},subtract:function(h){return this.x-=h.x,this.y-=h.y,this.z-=h.z||0,this},multiply:function(h){return this.x*=h.x,this.y*=h.y,this.z*=h.z||1,this},scale:function(h){return isFinite(h)?(this.x*=h,this.y*=h,this.z*=h):(this.x=0,this.y=0,this.z=0),this},divide:function(h){return this.x/=h.x,this.y/=h.y,this.z/=h.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(h){var a=h.x-this.x,l=h.y-this.y,n=h.z-this.z||0;return Math.sqrt(a*a+l*l+n*n)},distanceSq:function(h){var a=h.x-this.x,l=h.y-this.y,n=h.z-this.z||0;return a*a+l*l+n*n},length:function(){var h=this.x,a=this.y,l=this.z;return Math.sqrt(h*h+a*a+l*l)},lengthSq:function(){var h=this.x,a=this.y,l=this.z;return h*h+a*a+l*l},normalize:function(){var h=this.x,a=this.y,l=this.z,n=h*h+a*a+l*l;return n>0&&(n=1/Math.sqrt(n),this.x=h*n,this.y=a*n,this.z=l*n),this},dot:function(h){return this.x*h.x+this.y*h.y+this.z*h.z},cross:function(h){var a=this.x,l=this.y,n=this.z,u=h.x,f=h.y,o=h.z;return this.x=l*o-n*f,this.y=n*u-a*o,this.z=a*f-l*u,this},lerp:function(h,a){a===void 0&&(a=0);var l=this.x,n=this.y,u=this.z;return this.x=l+a*(h.x-l),this.y=n+a*(h.y-n),this.z=u+a*(h.z-u),this},applyMatrix3:function(h){var a=this.x,l=this.y,n=this.z,u=h.val;return this.x=u[0]*a+u[3]*l+u[6]*n,this.y=u[1]*a+u[4]*l+u[7]*n,this.z=u[2]*a+u[5]*l+u[8]*n,this},applyMatrix4:function(h){var a=this.x,l=this.y,n=this.z,u=h.val,f=1/(u[3]*a+u[7]*l+u[11]*n+u[15]);return this.x=(u[0]*a+u[4]*l+u[8]*n+u[12])*f,this.y=(u[1]*a+u[5]*l+u[9]*n+u[13])*f,this.z=(u[2]*a+u[6]*l+u[10]*n+u[14])*f,this},transformMat3:function(h){var a=this.x,l=this.y,n=this.z,u=h.val;return this.x=a*u[0]+l*u[3]+n*u[6],this.y=a*u[1]+l*u[4]+n*u[7],this.z=a*u[2]+l*u[5]+n*u[8],this},transformMat4:function(h){var a=this.x,l=this.y,n=this.z,u=h.val;return this.x=u[0]*a+u[4]*l+u[8]*n+u[12],this.y=u[1]*a+u[5]*l+u[9]*n+u[13],this.z=u[2]*a+u[6]*l+u[10]*n+u[14],this},transformCoordinates:function(h){var a=this.x,l=this.y,n=this.z,u=h.val,f=a*u[0]+l*u[4]+n*u[8]+u[12],o=a*u[1]+l*u[5]+n*u[9]+u[13],c=a*u[2]+l*u[6]+n*u[10]+u[14],p=a*u[3]+l*u[7]+n*u[11]+u[15];return this.x=f/p,this.y=o/p,this.z=c/p,this},transformQuat:function(h){var a=this.x,l=this.y,n=this.z,u=h.x,f=h.y,o=h.z,c=h.w,p=c*a+f*n-o*l,v=c*l+o*a-u*n,m=c*n+u*l-f*a,S=-u*a-f*l-o*n;return this.x=p*c+S*-u+v*-o-m*-f,this.y=v*c+S*-f+m*-u-p*-o,this.z=m*c+S*-o+p*-f-v*-u,this},project:function(h){var a=this.x,l=this.y,n=this.z,u=h.val,f=u[0],o=u[1],c=u[2],p=u[3],v=u[4],m=u[5],S=u[6],M=u[7],w=u[8],C=u[9],A=u[10],P=u[11],b=u[12],O=u[13],I=u[14],D=u[15],B=1/(a*p+l*M+n*P+D);return this.x=(a*f+l*v+n*w+b)*B,this.y=(a*o+l*m+n*C+O)*B,this.z=(a*c+l*S+n*A+I)*B,this},projectViewMatrix:function(h,a){return this.applyMatrix4(h).applyMatrix4(a)},unprojectViewMatrix:function(h,a){return this.applyMatrix4(h).applyMatrix4(a)},unproject:function(h,a){var l=h.x,n=h.y,u=h.z,f=h.w,o=this.x-l,c=f-this.y-1-n,p=this.z;return this.x=2*o/u-1,this.y=2*c/f-1,this.z=2*p-1,this.project(a)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});d.ZERO=new d,d.RIGHT=new d(1,0,0),d.LEFT=new d(-1,0,0),d.UP=new d(0,-1,0),d.DOWN=new d(0,1,0),d.FORWARD=new d(0,0,1),d.BACK=new d(0,0,-1),d.ONE=new d(1,1,1),s.exports=d},61369:(s,y,e)=>{/** + */var r=e(83419),d=new r({initialize:function(a,l,n){this.x=0,this.y=0,this.z=0,typeof a=="object"?(this.x=a.x||0,this.y=a.y||0,this.z=a.z||0):(this.x=a||0,this.y=l||0,this.z=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(h){return this.x=Math.min(this.x,h.x),this.y=Math.min(this.y,h.y),this.z=Math.min(this.z,h.z),this},max:function(h){return this.x=Math.max(this.x,h.x),this.y=Math.max(this.y,h.y),this.z=Math.max(this.z,h.z),this},clone:function(){return new d(this.x,this.y,this.z)},addVectors:function(h,a){return this.x=h.x+a.x,this.y=h.y+a.y,this.z=h.z+a.z,this},crossVectors:function(h,a){var l=h.x,n=h.y,u=h.z,f=a.x,o=a.y,c=a.z;return this.x=n*c-u*o,this.y=u*f-l*c,this.z=l*o-n*f,this},equals:function(h){return this.x===h.x&&this.y===h.y&&this.z===h.z},copy:function(h){return this.x=h.x,this.y=h.y,this.z=h.z||0,this},set:function(h,a,l){return typeof h=="object"?(this.x=h.x||0,this.y=h.y||0,this.z=h.z||0):(this.x=h||0,this.y=a||0,this.z=l||0),this},setFromMatrixPosition:function(h){return this.fromArray(h.val,12)},setFromMatrixColumn:function(h,a){return this.fromArray(h.val,a*4)},fromArray:function(h,a){return a===void 0&&(a=0),this.x=h[a],this.y=h[a+1],this.z=h[a+2],this},add:function(h){return this.x+=h.x,this.y+=h.y,this.z+=h.z||0,this},addScalar:function(h){return this.x+=h,this.y+=h,this.z+=h,this},addScale:function(h,a){return this.x+=h.x*a,this.y+=h.y*a,this.z+=h.z*a||0,this},subtract:function(h){return this.x-=h.x,this.y-=h.y,this.z-=h.z||0,this},multiply:function(h){return this.x*=h.x,this.y*=h.y,this.z*=h.z||1,this},scale:function(h){return isFinite(h)?(this.x*=h,this.y*=h,this.z*=h):(this.x=0,this.y=0,this.z=0),this},divide:function(h){return this.x/=h.x,this.y/=h.y,this.z/=h.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(h){var a=h.x-this.x,l=h.y-this.y,n=h.z-this.z||0;return Math.sqrt(a*a+l*l+n*n)},distanceSq:function(h){var a=h.x-this.x,l=h.y-this.y,n=h.z-this.z||0;return a*a+l*l+n*n},length:function(){var h=this.x,a=this.y,l=this.z;return Math.sqrt(h*h+a*a+l*l)},lengthSq:function(){var h=this.x,a=this.y,l=this.z;return h*h+a*a+l*l},normalize:function(){var h=this.x,a=this.y,l=this.z,n=h*h+a*a+l*l;return n>0&&(n=1/Math.sqrt(n),this.x=h*n,this.y=a*n,this.z=l*n),this},dot:function(h){return this.x*h.x+this.y*h.y+this.z*h.z},cross:function(h){var a=this.x,l=this.y,n=this.z,u=h.x,f=h.y,o=h.z;return this.x=l*o-n*f,this.y=n*u-a*o,this.z=a*f-l*u,this},lerp:function(h,a){a===void 0&&(a=0);var l=this.x,n=this.y,u=this.z;return this.x=l+a*(h.x-l),this.y=n+a*(h.y-n),this.z=u+a*(h.z-u),this},applyMatrix3:function(h){var a=this.x,l=this.y,n=this.z,u=h.val;return this.x=u[0]*a+u[3]*l+u[6]*n,this.y=u[1]*a+u[4]*l+u[7]*n,this.z=u[2]*a+u[5]*l+u[8]*n,this},applyMatrix4:function(h){var a=this.x,l=this.y,n=this.z,u=h.val,f=1/(u[3]*a+u[7]*l+u[11]*n+u[15]);return this.x=(u[0]*a+u[4]*l+u[8]*n+u[12])*f,this.y=(u[1]*a+u[5]*l+u[9]*n+u[13])*f,this.z=(u[2]*a+u[6]*l+u[10]*n+u[14])*f,this},transformMat3:function(h){var a=this.x,l=this.y,n=this.z,u=h.val;return this.x=a*u[0]+l*u[3]+n*u[6],this.y=a*u[1]+l*u[4]+n*u[7],this.z=a*u[2]+l*u[5]+n*u[8],this},transformMat4:function(h){var a=this.x,l=this.y,n=this.z,u=h.val;return this.x=u[0]*a+u[4]*l+u[8]*n+u[12],this.y=u[1]*a+u[5]*l+u[9]*n+u[13],this.z=u[2]*a+u[6]*l+u[10]*n+u[14],this},transformCoordinates:function(h){var a=this.x,l=this.y,n=this.z,u=h.val,f=a*u[0]+l*u[4]+n*u[8]+u[12],o=a*u[1]+l*u[5]+n*u[9]+u[13],c=a*u[2]+l*u[6]+n*u[10]+u[14],p=a*u[3]+l*u[7]+n*u[11]+u[15];return this.x=f/p,this.y=o/p,this.z=c/p,this},transformQuat:function(h){var a=this.x,l=this.y,n=this.z,u=h.x,f=h.y,o=h.z,c=h.w,p=c*a+f*n-o*l,v=c*l+o*a-u*n,m=c*n+u*l-f*a,S=-u*a-f*l-o*n;return this.x=p*c+S*-u+v*-o-m*-f,this.y=v*c+S*-f+m*-u-p*-o,this.z=m*c+S*-o+p*-f-v*-u,this},project:function(h){var a=this.x,l=this.y,n=this.z,u=h.val,f=u[0],o=u[1],c=u[2],p=u[3],v=u[4],m=u[5],S=u[6],M=u[7],w=u[8],C=u[9],A=u[10],P=u[11],b=u[12],O=u[13],I=u[14],D=u[15],B=1/(a*p+l*M+n*P+D);return this.x=(a*f+l*v+n*w+b)*B,this.y=(a*o+l*m+n*C+O)*B,this.z=(a*c+l*S+n*A+I)*B,this},projectViewMatrix:function(h,a){return this.applyMatrix4(h).applyMatrix4(a)},unprojectViewMatrix:function(h,a){return this.applyMatrix4(h).applyMatrix4(a)},unproject:function(h,a){var l=h.x,n=h.y,u=h.z,f=h.w,o=this.x-l,c=f-this.y-1-n,p=this.z;return this.x=2*o/u-1,this.y=2*c/f-1,this.z=2*p-1,this.project(a)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});d.ZERO=new d,d.RIGHT=new d(1,0,0),d.LEFT=new d(-1,0,0),d.UP=new d(0,-1,0),d.DOWN=new d(0,1,0),d.FORWARD=new d(0,0,1),d.BACK=new d(0,0,-1),d.ONE=new d(1,1,1),s.exports=d},61369:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3823,27 +3823,27 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return Math.abs(e-r)<=d};s.exports=y},15994:s=>{/** + */var x=function(e,r,d){return Math.abs(e-r)<=d};s.exports=x},15994:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=d-r;return r+((e-r)%h+h)%h};s.exports=y},31040:s=>{/** + */var x=function(e,r,d){var h=d-r;return r+((e-r)%h+h)%h};s.exports=x},31040:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){return Math.atan2(h-r,d-e)};s.exports=y},55495:s=>{/** + */var x=function(e,r,d,h){return Math.atan2(h-r,d-e)};s.exports=x},55495:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return Math.atan2(r.y-e.y,r.x-e.x)};s.exports=y},128:s=>{/** + */var x=function(e,r){return Math.atan2(r.y-e.y,r.x-e.x)};s.exports=x},128:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return Math.atan2(r.x-e.x,r.y-e.y)};s.exports=y},41273:s=>{/** + */var x=function(e,r){return Math.atan2(r.x-e.x,r.y-e.y)};s.exports=x},41273:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){return Math.atan2(d-e,h-r)};s.exports=y},1432:(s,y,e)=>{/** + */var x=function(e,r,d,h){return Math.atan2(d-e,h-r)};s.exports=x},1432:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3851,21 +3851,21 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e=e%(2*Math.PI),e>=0?e:e+2*Math.PI};s.exports=y},53993:(s,y,e)=>{/** + */var x=function(e){return e=e%(2*Math.PI),e>=0?e:e+2*Math.PI};s.exports=x},53993:(s,x,e)=>{/** * @author Richard Davey * @author @samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(99472),d=function(){return r(-Math.PI,Math.PI)};s.exports=d},86564:(s,y,e)=>{/** + */var r=e(99472),d=function(){return r(-Math.PI,Math.PI)};s.exports=d},86564:(s,x,e)=>{/** * @author Richard Davey * @author @samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(99472),d=function(){return r(-180,180)};s.exports=d},90154:(s,y,e)=>{/** + */var r=e(99472),d=function(){return r(-180,180)};s.exports=d},90154:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(12407),d=function(h){return r(h+Math.PI)};s.exports=d},48736:(s,y,e)=>{/** + */var r=e(12407),d=function(h){return r(h+Math.PI)};s.exports=d},48736:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3873,15 +3873,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=r-e;if(d===0)return 0;var h=Math.floor((d- -180)/360);return d-h*360};s.exports=y},86554:(s,y,e)=>{/** + */var x=function(e,r){var d=r-e;if(d===0)return 0;var h=Math.floor((d- -180)/360);return d-h*360};s.exports=x},86554:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(15994),d=function(h){return r(h,-Math.PI,Math.PI)};s.exports=d},30954:(s,y,e)=>{/** + */var r=e(15994),d=function(h){return r(h,-Math.PI,Math.PI)};s.exports=d},30954:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(15994),d=function(h){return r(h,-180,180)};s.exports=d},25588:(s,y,e)=>{/** + */var r=e(15994),d=function(h){return r(h,-180,180)};s.exports=d},25588:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3889,39 +3889,39 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={PI2:Math.PI*2,TAU:Math.PI*.5,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};s.exports=y},20339:s=>{/** + */var x={PI2:Math.PI*2,TAU:Math.PI*.5,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};s.exports=x},20339:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){var a=e-d,l=r-h;return Math.sqrt(a*a+l*l)};s.exports=y},52816:s=>{/** + */var x=function(e,r,d,h){var a=e-d,l=r-h;return Math.sqrt(a*a+l*l)};s.exports=x},52816:s=>{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=e.x-r.x,h=e.y-r.y;return Math.sqrt(d*d+h*h)};s.exports=y},64559:s=>{/** + */var x=function(e,r){var d=e.x-r.x,h=e.y-r.y;return Math.sqrt(d*d+h*h)};s.exports=x},64559:s=>{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=e.x-r.x,h=e.y-r.y;return d*d+h*h};s.exports=y},82340:s=>{/** + */var x=function(e,r){var d=e.x-r.x,h=e.y-r.y;return d*d+h*h};s.exports=x},82340:s=>{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){return Math.max(Math.abs(e-d),Math.abs(r-h))};s.exports=y},14390:s=>{/** + */var x=function(e,r,d,h){return Math.max(Math.abs(e-d),Math.abs(r-h))};s.exports=x},14390:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h,a){return a===void 0&&(a=2),Math.sqrt(Math.pow(d-e,a)+Math.pow(h-r,a))};s.exports=y},2243:s=>{/** + */var x=function(e,r,d,h,a){return a===void 0&&(a=2),Math.sqrt(Math.pow(d-e,a)+Math.pow(h-r,a))};s.exports=x},2243:s=>{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){return Math.abs(e-d)+Math.abs(r-h)};s.exports=y},89774:s=>{/** + */var x=function(e,r,d,h){return Math.abs(e-d)+Math.abs(r-h)};s.exports=x},89774:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){var a=e-d,l=r-h;return a*a+l*l};s.exports=y},50994:(s,y,e)=>{/** + */var x=function(e,r,d,h){var a=e-d,l=r-h;return a*a+l*l};s.exports=x},50994:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Between:e(20339),BetweenPoints:e(52816),BetweenPointsSquared:e(64559),Chebyshev:e(82340),Power:e(14390),Snake:e(2243),Squared:e(89774)}},62640:(s,y,e)=>{/** + */s.exports={Between:e(20339),BetweenPoints:e(52816),BetweenPointsSquared:e(64559),Chebyshev:e(82340),Power:e(14390),Snake:e(2243),Squared:e(89774)}},62640:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3929,15 +3929,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r===void 0&&(r=1.70158),e*e*((r+1)*e-r)};s.exports=y},50099:s=>{/** + */var x=function(e,r){return r===void 0&&(r=1.70158),e*e*((r+1)*e-r)};s.exports=x},50099:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){r===void 0&&(r=1.70158);var d=r*1.525;return(e*=2)<1?.5*(e*e*((d+1)*e-d)):.5*((e-=2)*e*((d+1)*e+d)+2)};s.exports=y},41286:s=>{/** + */var x=function(e,r){r===void 0&&(r=1.70158);var d=r*1.525;return(e*=2)<1?.5*(e*e*((d+1)*e-d)):.5*((e-=2)*e*((d+1)*e+d)+2)};s.exports=x},41286:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r===void 0&&(r=1.70158),--e*e*((r+1)*e+r)+1};s.exports=y},54178:(s,y,e)=>{/** + */var x=function(e,r){return r===void 0&&(r=1.70158),--e*e*((r+1)*e+r)+1};s.exports=x},54178:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3945,15 +3945,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e=1-e,e<.36363636363636365?1-7.5625*e*e:e<.7272727272727273?1-(7.5625*(e-=.5454545454545454)*e+.75):e<.9090909090909091?1-(7.5625*(e-=.8181818181818182)*e+.9375):1-(7.5625*(e-=.9545454545454546)*e+.984375)};s.exports=y},41788:s=>{/** + */var x=function(e){return e=1-e,e<.36363636363636365?1-7.5625*e*e:e<.7272727272727273?1-(7.5625*(e-=.5454545454545454)*e+.75):e<.9090909090909091?1-(7.5625*(e-=.8181818181818182)*e+.9375):1-(7.5625*(e-=.9545454545454546)*e+.984375)};s.exports=x},41788:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r=!1;return e<.5?(e=1-e*2,r=!0):e=e*2-1,e<.36363636363636365?e=7.5625*e*e:e<.7272727272727273?e=7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?e=7.5625*(e-=.8181818181818182)*e+.9375:e=7.5625*(e-=.9545454545454546)*e+.984375,r?(1-e)*.5:e*.5+.5};s.exports=y},69905:s=>{/** + */var x=function(e){var r=!1;return e<.5?(e=1-e*2,r=!0):e=e*2-1,e<.36363636363636365?e=7.5625*e*e:e<.7272727272727273?e=7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?e=7.5625*(e-=.8181818181818182)*e+.9375:e=7.5625*(e-=.9545454545454546)*e+.984375,r?(1-e)*.5:e*.5+.5};s.exports=x},69905:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375};s.exports=y},41521:(s,y,e)=>{/** + */var x=function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375};s.exports=x},41521:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3961,15 +3961,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return 1-Math.sqrt(1-e*e)};s.exports=y},4177:s=>{/** + */var x=function(e){return 1-Math.sqrt(1-e*e)};s.exports=x},4177:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)};s.exports=y},57512:s=>{/** + */var x=function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)};s.exports=x},57512:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return Math.sqrt(1- --e*e)};s.exports=y},79980:(s,y,e)=>{/** + */var x=function(e){return Math.sqrt(1- --e*e)};s.exports=x},79980:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3977,15 +3977,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e*e*e};s.exports=y},82820:s=>{/** + */var x=function(e){return e*e*e};s.exports=x},82820:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)};s.exports=y},35033:s=>{/** + */var x=function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)};s.exports=x},35033:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return--e*e*e+1};s.exports=y},85433:(s,y,e)=>{/** + */var x=function(e){return--e*e*e+1};s.exports=x},85433:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -3993,15 +3993,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){if(r===void 0&&(r=.1),d===void 0&&(d=.1),e===0)return 0;if(e===1)return 1;var h=d/4;return r<1?r=1:h=d*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-h)*(2*Math.PI)/d))};s.exports=y},50665:s=>{/** + */var x=function(e,r,d){if(r===void 0&&(r=.1),d===void 0&&(d=.1),e===0)return 0;if(e===1)return 1;var h=d/4;return r<1?r=1:h=d*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-h)*(2*Math.PI)/d))};s.exports=x},50665:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){if(r===void 0&&(r=.1),d===void 0&&(d=.1),e===0)return 0;if(e===1)return 1;var h=d/4;return r<1?r=1:h=d*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-h)*(2*Math.PI)/d)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-h)*(2*Math.PI)/d)*.5+1};s.exports=y},7744:s=>{/** + */var x=function(e,r,d){if(r===void 0&&(r=.1),d===void 0&&(d=.1),e===0)return 0;if(e===1)return 1;var h=d/4;return r<1?r=1:h=d*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-h)*(2*Math.PI)/d)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-h)*(2*Math.PI)/d)*.5+1};s.exports=x},7744:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){if(r===void 0&&(r=.1),d===void 0&&(d=.1),e===0)return 0;if(e===1)return 1;var h=d/4;return r<1?r=1:h=d*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-h)*(2*Math.PI)/d)+1};s.exports=y},99140:(s,y,e)=>{/** + */var x=function(e,r,d){if(r===void 0&&(r=.1),d===void 0&&(d=.1),e===0)return 0;if(e===1)return 1;var h=d/4;return r<1?r=1:h=d*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-h)*(2*Math.PI)/d)+1};s.exports=x},99140:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4009,19 +4009,19 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return Math.pow(2,10*(e-1))-.001};s.exports=y},87844:s=>{/** + */var x=function(e){return Math.pow(2,10*(e-1))-.001};s.exports=x},87844:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return(e*=2)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*(e-1)))};s.exports=y},89433:s=>{/** + */var x=function(e){return(e*=2)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*(e-1)))};s.exports=x},89433:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return 1-Math.pow(2,-10*e)};s.exports=y},48857:(s,y,e)=>{/** + */var x=function(e){return 1-Math.pow(2,-10*e)};s.exports=x},48857:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={In:e(24590),Out:e(89433),InOut:e(87844)}},48820:(s,y,e)=>{/** + */s.exports={In:e(24590),Out:e(89433),InOut:e(87844)}},48820:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4029,7 +4029,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e};s.exports=y},81596:(s,y,e)=>{/** + */var x=function(e){return e};s.exports=x},81596:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4037,15 +4037,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e*e};s.exports=y},20544:s=>{/** + */var x=function(e){return e*e};s.exports=x},20544:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)};s.exports=y},92029:s=>{/** + */var x=function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)};s.exports=x},92029:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e*(2-e)};s.exports=y},59133:(s,y,e)=>{/** + */var x=function(e){return e*(2-e)};s.exports=x},59133:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4053,15 +4053,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e*e*e*e};s.exports=y},78137:s=>{/** + */var x=function(e){return e*e*e*e};s.exports=x},78137:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)};s.exports=y},45840:s=>{/** + */var x=function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)};s.exports=x},45840:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return 1- --e*e*e*e};s.exports=y},98516:(s,y,e)=>{/** + */var x=function(e){return 1- --e*e*e*e};s.exports=x},98516:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4069,15 +4069,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e*e*e*e*e};s.exports=y},16509:s=>{/** + */var x=function(e){return e*e*e*e*e};s.exports=x},16509:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)};s.exports=y},17868:s=>{/** + */var x=function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)};s.exports=x},17868:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return--e*e*e*e*e+1};s.exports=y},35248:(s,y,e)=>{/** + */var x=function(e){return--e*e*e*e*e+1};s.exports=x},35248:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4085,15 +4085,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e===0?0:e===1?1:1-Math.cos(e*Math.PI/2)};s.exports=y},34025:s=>{/** + */var x=function(e){return e===0?0:e===1?1:1-Math.cos(e*Math.PI/2)};s.exports=x},34025:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e===0?0:e===1?1:.5*(1-Math.cos(Math.PI*e))};s.exports=y},52768:s=>{/** + */var x=function(e){return e===0?0:e===1?1:.5*(1-Math.cos(Math.PI*e))};s.exports=x},52768:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e===0?0:e===1?1:Math.sin(e*Math.PI/2)};s.exports=y},82500:(s,y,e)=>{/** + */var x=function(e){return e===0?0:e===1?1:Math.sin(e*Math.PI/2)};s.exports=x},82500:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4101,7 +4101,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r===void 0&&(r=1),e<=0?0:e>=1?1:((r*e|0)+1)*(1/r)};s.exports=y},49752:(s,y,e)=>{/** + */var x=function(e,r){return r===void 0&&(r=1),e<=0?0:e>=1?1:((r*e|0)+1)*(1/r)};s.exports=x},49752:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4109,35 +4109,35 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r===void 0&&(r=1e-4),Math.ceil(e-r)};s.exports=y},43855:s=>{/** + */var x=function(e,r){return r===void 0&&(r=1e-4),Math.ceil(e-r)};s.exports=x},43855:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return d===void 0&&(d=1e-4),Math.abs(e-r){/** + */var x=function(e,r,d){return d===void 0&&(d=1e-4),Math.abs(e-r){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r===void 0&&(r=1e-4),Math.floor(e+r)};s.exports=y},5470:s=>{/** + */var x=function(e,r){return r===void 0&&(r=1e-4),Math.floor(e+r)};s.exports=x},5470:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return d===void 0&&(d=1e-4),e>r-d};s.exports=y},94977:s=>{/** + */var x=function(e,r,d){return d===void 0&&(d=1e-4),e>r-d};s.exports=x},94977:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return d===void 0&&(d=1e-4),e{/** + */var x=function(e,r,d){return d===void 0&&(d=1e-4),e{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Ceil:e(75698),Equal:e(43855),Floor:e(25777),GreaterThan:e(5470),LessThan:e(94977)}},75508:(s,y,e)=>{/** + */s.exports={Ceil:e(75698),Equal:e(43855),Floor:e(25777),GreaterThan:e(5470),LessThan:e(94977)}},75508:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(36383),d=e(79291),h={Angle:e(25588),Distance:e(50994),Easing:e(48820),Fuzzy:e(48379),Interpolation:e(38289),Pow2:e(49001),Snap:e(73697),RandomDataGenerator:e(28453),Average:e(53307),Bernstein:e(85710),Between:e(30976),CatmullRom:e(87842),CeilTo:e(26302),Clamp:e(45319),DegToRad:e(39506),Difference:e(61241),Euler:e(38857),Factorial:e(6411),FloatBetween:e(99472),FloorTo:e(77623),FromPercent:e(62945),GetSpeed:e(38265),IsEven:e(78702),IsEvenStrict:e(94883),Linear:e(28915),LinearXY:e(94908),MaxAdd:e(86883),Median:e(50040),MinSub:e(37204),Percent:e(65201),RadToDeg:e(43396),RandomXY:e(74362),RandomXYZ:e(60706),RandomXYZW:e(67421),Rotate:e(36305),RotateAround:e(11520),RotateAroundDistance:e(1163),RotateTo:e(70336),RoundAwayFromZero:e(2284),RoundTo:e(41013),SinCosTableGenerator:e(16922),SmootherStep:e(54261),SmoothStep:e(7602),ToXY:e(44408),TransformXY:e(85955),Within:e(60417),Wrap:e(15994),Vector2:e(26099),Vector3:e(25836),Vector4:e(61369),Matrix3:e(94434),Matrix4:e(37867),Quaternion:e(15746),RotateVec3:e(72678)};h=d(!1,h,r),s.exports=h},89318:(s,y,e)=>{/** + */var r=e(36383),d=e(79291),h={Angle:e(25588),Distance:e(50994),Easing:e(48820),Fuzzy:e(48379),Interpolation:e(38289),Pow2:e(49001),Snap:e(73697),RandomDataGenerator:e(28453),Average:e(53307),Bernstein:e(85710),Between:e(30976),CatmullRom:e(87842),CeilTo:e(26302),Clamp:e(45319),DegToRad:e(39506),Difference:e(61241),Euler:e(38857),Factorial:e(6411),FloatBetween:e(99472),FloorTo:e(77623),FromPercent:e(62945),GetSpeed:e(38265),IsEven:e(78702),IsEvenStrict:e(94883),Linear:e(28915),LinearXY:e(94908),MaxAdd:e(86883),Median:e(50040),MinSub:e(37204),Percent:e(65201),RadToDeg:e(43396),RandomXY:e(74362),RandomXYZ:e(60706),RandomXYZW:e(67421),Rotate:e(36305),RotateAround:e(11520),RotateAroundDistance:e(1163),RotateTo:e(70336),RoundAwayFromZero:e(2284),RoundTo:e(41013),SinCosTableGenerator:e(16922),SmootherStep:e(54261),SmoothStep:e(7602),ToXY:e(44408),TransformXY:e(85955),Within:e(60417),Wrap:e(15994),Vector2:e(26099),Vector3:e(25836),Vector4:e(61369),Matrix3:e(94434),Matrix4:e(37867),Quaternion:e(15746),RotateVec3:e(72678)};h=d(!1,h,r),s.exports=h},89318:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(85710),d=function(h,a){for(var l=0,n=h.length-1,u=0;u<=n;u++)l+=Math.pow(1-a,n-u)*Math.pow(a,u)*h[u]*r(n,u);return l};s.exports=d},77259:(s,y,e)=>{/** + */var r=e(85710),d=function(h,a){for(var l=0,n=h.length-1,u=0;u<=n;u++)l+=Math.pow(1-a,n-u)*Math.pow(a,u)*h[u]*r(n,u);return l};s.exports=d},77259:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4145,7 +4145,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function y(a,l){var n=1-a;return n*n*n*l}function e(a,l){var n=1-a;return 3*n*n*a*l}function r(a,l){return 3*(1-a)*a*a*l}function d(a,l){return a*a*a*l}var h=function(a,l,n,u,f){return y(a,l)+e(a,n)+r(a,u)+d(a,f)};s.exports=h},28392:(s,y,e)=>{/** + */function x(a,l){var n=1-a;return n*n*n*l}function e(a,l){var n=1-a;return 3*n*n*a*l}function r(a,l){return 3*(1-a)*a*a*l}function d(a,l){return a*a*a*l}var h=function(a,l,n,u,f){return x(a,l)+e(a,n)+r(a,u)+d(a,f)};s.exports=h},28392:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4153,15 +4153,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function y(h,a){var l=1-h;return l*l*a}function e(h,a){return 2*(1-h)*h*a}function r(h,a){return h*h*a}var d=function(h,a,l,n){return y(h,a)+e(h,l)+r(h,n)};s.exports=d},47235:(s,y,e)=>{/** + */function x(h,a){var l=1-h;return l*l*a}function e(h,a){return 2*(1-h)*h*a}function r(h,a){return h*h*a}var d=function(h,a,l,n){return x(h,a)+e(h,l)+r(h,n)};s.exports=d},47235:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7602),d=function(h,a,l){return a+(l-a)*r(h,0,1)};s.exports=d},50178:(s,y,e)=>{/** + */var r=e(7602),d=function(h,a,l){return a+(l-a)*r(h,0,1)};s.exports=d},50178:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(54261),d=function(h,a,l){return a+(l-a)*r(h,0,1)};s.exports=d},38289:(s,y,e)=>{/** + */var r=e(54261),d=function(h,a,l){return a+(l-a)*r(h,0,1)};s.exports=d},38289:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4169,19 +4169,19 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r=Math.log(e)/.6931471805599453;return 1<{/** + */var x=function(e){var r=Math.log(e)/.6931471805599453;return 1<{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e>0&&(e&e-1)===0&&r>0&&(r&r-1)===0};s.exports=y},81230:s=>{/** + */var x=function(e,r){return e>0&&(e&e-1)===0&&r>0&&(r&r-1)===0};s.exports=x},81230:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e>0&&(e&e-1)===0};s.exports=y},49001:(s,y,e)=>{/** + */var x=function(e){return e>0&&(e&e-1)===0};s.exports=x},49001:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={GetNext:e(98439),IsSize:e(50030),IsValue:e(81230)}},28453:(s,y,e)=>{/** + */s.exports={GetNext:e(98439),IsSize:e(50030),IsValue:e(81230)}},28453:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4189,43 +4189,43 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){return d===void 0&&(d=0),r===0?e:(e-=d,e=r*Math.ceil(e/r),h?(d+e)/r:d+e)};s.exports=y},56583:s=>{/** + */var x=function(e,r,d,h){return d===void 0&&(d=0),r===0?e:(e-=d,e=r*Math.ceil(e/r),h?(d+e)/r:d+e)};s.exports=x},56583:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){return d===void 0&&(d=0),r===0?e:(e-=d,e=r*Math.floor(e/r),h?(d+e)/r:d+e)};s.exports=y},77720:s=>{/** + */var x=function(e,r,d,h){return d===void 0&&(d=0),r===0?e:(e-=d,e=r*Math.floor(e/r),h?(d+e)/r:d+e)};s.exports=x},77720:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){return d===void 0&&(d=0),r===0?e:(e-=d,e=r*Math.round(e/r),h?(d+e)/r:d+e)};s.exports=y},73697:(s,y,e)=>{/** + */var x=function(e,r,d,h){return d===void 0&&(d=0),r===0?e:(e-=d,e=r*Math.round(e/r),h?(d+e)/r:d+e)};s.exports=x},73697:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Ceil:e(63448),Floor:e(56583),To:e(77720)}},85454:(s,y,e)=>{/** + */s.exports={Ceil:e(63448),Floor:e(56583),To:e(77720)}},85454:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */e(63595);var r=e(8054),d=e(79291),h={Actions:e(61061),Animations:e(60421),BlendModes:e(10312),Cache:e(83388),Cameras:e(26638),Core:e(42857),Class:e(83419),Create:e(15822),Curves:e(25410),Data:e(44965),Display:e(27460),DOM:e(84902),Events:e(93055),FX:e(66064),Game:e(50127),GameObjects:e(77856),Geom:e(55738),Input:e(14350),Loader:e(57777),Math:e(75508),Physics:e(44563),Plugins:e(18922),Renderer:e(36909),Scale:e(93364),ScaleModes:e(29795),Scene:e(97482),Scenes:e(62194),Structs:e(41392),Textures:e(27458),Tilemaps:e(62501),Time:e(90291),Tweens:e(43066),Utils:e(91799)};h.Sound=e(23717),h=d(!1,h,r),s.exports=h,e.g.Phaser=h},71289:(s,y,e)=>{/** + */e(63595);var r=e(8054),d=e(79291),h={Actions:e(61061),Animations:e(60421),BlendModes:e(10312),Cache:e(83388),Cameras:e(26638),Core:e(42857),Class:e(83419),Create:e(15822),Curves:e(25410),Data:e(44965),Display:e(27460),DOM:e(84902),Events:e(93055),FX:e(66064),Game:e(50127),GameObjects:e(77856),Geom:e(55738),Input:e(14350),Loader:e(57777),Math:e(75508),Physics:e(44563),Plugins:e(18922),Renderer:e(36909),Scale:e(93364),ScaleModes:e(29795),Scene:e(97482),Scenes:e(62194),Structs:e(41392),Textures:e(27458),Tilemaps:e(62501),Time:e(90291),Tweens:e(43066),Utils:e(91799)};h.Sound=e(23717),h=d(!1,h,r),s.exports=h,e.g.Phaser=h},71289:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(92209),h=e(88571),a=new r({Extends:h,Mixins:[d.Acceleration,d.Angular,d.Bounce,d.Collision,d.Debug,d.Drag,d.Enable,d.Friction,d.Gravity,d.Immovable,d.Mass,d.Pushable,d.Size,d.Velocity],initialize:function(n,u,f,o,c){h.call(this,n,u,f,o,c),this.body=null}});s.exports=a},86689:(s,y,e)=>{/** + */var r=e(83419),d=e(92209),h=e(88571),a=new r({Extends:h,Mixins:[d.Acceleration,d.Angular,d.Bounce,d.Collision,d.Debug,d.Drag,d.Enable,d.Friction,d.Gravity,d.Immovable,d.Mass,d.Pushable,d.Size,d.Velocity],initialize:function(n,u,f,o,c){h.call(this,n,u,f,o,c),this.body=null}});s.exports=a},86689:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(39506),h=e(20339),a=e(89774),l=e(66022),n=e(95540),u=e(46975),f=e(72441),o=e(47956),c=e(37277),p=e(44594),v=e(26099),m=e(82248),S=new r({initialize:function(w){this.scene=w,this.systems=w.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,w.sys.events.once(p.BOOT,this.boot,this),w.sys.events.on(p.START,this.start,this)},boot:function(){this.world=new m(this.scene,this.config),this.add=new l(this.world),this.systems.events.once(p.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new m(this.scene,this.config),this.add=new l(this.world));var M=this.systems.events;n(this.config,"customUpdate",!1)||M.on(p.UPDATE,this.world.update,this.world),M.on(p.POST_UPDATE,this.world.postUpdate,this.world),M.once(p.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(p.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(p.UPDATE,this.world.update,this.world)},getConfig:function(){var M=this.systems.game.config.physics,w=this.systems.settings.physics,C=u(n(w,"arcade",{}),n(M,"arcade",{}));return C},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(M,w,C,A,P){return C===void 0&&(C=null),A===void 0&&(A=null),P===void 0&&(P=C),this.world.collideObjects(M,w,C,A,P,!0)},collide:function(M,w,C,A,P){return C===void 0&&(C=null),A===void 0&&(A=null),P===void 0&&(P=C),this.world.collideObjects(M,w,C,A,P,!1)},collideTiles:function(M,w,C,A,P){return this.world.collideTiles(M,w,C,A,P)},overlapTiles:function(M,w,C,A,P){return this.world.overlapTiles(M,w,C,A,P)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(M,w,C,A,P,b){A===void 0&&(A=60);var O=Math.atan2(C-M.y,w-M.x);return M.body.acceleration.setToPolar(O,A),P!==void 0&&b!==void 0&&M.body.maxVelocity.set(P,b),O},accelerateToObject:function(M,w,C,A,P){return this.accelerateTo(M,w.x,w.y,C,A,P)},closest:function(M,w){w||(w=this.world.bodies.entries);for(var C=Number.MAX_VALUE,A=null,P=M.x,b=M.y,O=w.length,I=0;IC&&(A=D,C=G)}}return A},moveTo:function(M,w,C,A,P){A===void 0&&(A=60),P===void 0&&(P=0);var b=Math.atan2(C-M.y,w-M.x);return P>0&&(A=h(M.x,M.y,w,C)/(P/1e3)),M.body.velocity.setToPolar(b,A),b},moveToObject:function(M,w,C,A){return this.moveTo(M,w.x,w.y,C,A)},velocityFromAngle:function(M,w,C){return w===void 0&&(w=60),C===void 0&&(C=new v),C.setToPolar(d(M),w)},velocityFromRotation:function(M,w,C){return w===void 0&&(w=60),C===void 0&&(C=new v),C.setToPolar(M,w)},overlapRect:function(M,w,C,A,P,b){return o(this.world,M,w,C,A,P,b)},overlapCirc:function(M,w,C,A,P){return f(this.world,M,w,C,A,P)},shutdown:function(){if(this.world){var M=this.systems.events;M.off(p.UPDATE,this.world.update,this.world),M.off(p.POST_UPDATE,this.world.postUpdate,this.world),M.off(p.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(p.START,this.start,this),this.scene=null,this.systems=null}});c.register("ArcadePhysics",S,"arcadePhysics"),s.exports=S},13759:(s,y,e)=>{/** + */var r=e(83419),d=e(39506),h=e(20339),a=e(89774),l=e(66022),n=e(95540),u=e(46975),f=e(72441),o=e(47956),c=e(37277),p=e(44594),v=e(26099),m=e(82248),S=new r({initialize:function(w){this.scene=w,this.systems=w.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,w.sys.events.once(p.BOOT,this.boot,this),w.sys.events.on(p.START,this.start,this)},boot:function(){this.world=new m(this.scene,this.config),this.add=new l(this.world),this.systems.events.once(p.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new m(this.scene,this.config),this.add=new l(this.world));var M=this.systems.events;n(this.config,"customUpdate",!1)||M.on(p.UPDATE,this.world.update,this.world),M.on(p.POST_UPDATE,this.world.postUpdate,this.world),M.once(p.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(p.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(p.UPDATE,this.world.update,this.world)},getConfig:function(){var M=this.systems.game.config.physics,w=this.systems.settings.physics,C=u(n(w,"arcade",{}),n(M,"arcade",{}));return C},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(M,w,C,A,P){return C===void 0&&(C=null),A===void 0&&(A=null),P===void 0&&(P=C),this.world.collideObjects(M,w,C,A,P,!0)},collide:function(M,w,C,A,P){return C===void 0&&(C=null),A===void 0&&(A=null),P===void 0&&(P=C),this.world.collideObjects(M,w,C,A,P,!1)},collideTiles:function(M,w,C,A,P){return this.world.collideTiles(M,w,C,A,P)},overlapTiles:function(M,w,C,A,P){return this.world.overlapTiles(M,w,C,A,P)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(M,w,C,A,P,b){A===void 0&&(A=60);var O=Math.atan2(C-M.y,w-M.x);return M.body.acceleration.setToPolar(O,A),P!==void 0&&b!==void 0&&M.body.maxVelocity.set(P,b),O},accelerateToObject:function(M,w,C,A,P){return this.accelerateTo(M,w.x,w.y,C,A,P)},closest:function(M,w){w||(w=this.world.bodies.entries);for(var C=Number.MAX_VALUE,A=null,P=M.x,b=M.y,O=w.length,I=0;IC&&(A=D,C=G)}}return A},moveTo:function(M,w,C,A,P){A===void 0&&(A=60),P===void 0&&(P=0);var b=Math.atan2(C-M.y,w-M.x);return P>0&&(A=h(M.x,M.y,w,C)/(P/1e3)),M.body.velocity.setToPolar(b,A),b},moveToObject:function(M,w,C,A){return this.moveTo(M,w.x,w.y,C,A)},velocityFromAngle:function(M,w,C){return w===void 0&&(w=60),C===void 0&&(C=new v),C.setToPolar(d(M),w)},velocityFromRotation:function(M,w,C){return w===void 0&&(w=60),C===void 0&&(C=new v),C.setToPolar(M,w)},overlapRect:function(M,w,C,A,P,b){return o(this.world,M,w,C,A,P,b)},overlapCirc:function(M,w,C,A,P){return f(this.world,M,w,C,A,P)},shutdown:function(){if(this.world){var M=this.systems.events;M.off(p.UPDATE,this.world.update,this.world),M.off(p.POST_UPDATE,this.world.postUpdate,this.world),M.off(p.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(p.START,this.start,this),this.scene=null,this.systems=null}});c.register("ArcadePhysics",S,"arcadePhysics"),s.exports=S},13759:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(92209),h=e(68287),a=new r({Extends:h,Mixins:[d.Acceleration,d.Angular,d.Bounce,d.Collision,d.Debug,d.Drag,d.Enable,d.Friction,d.Gravity,d.Immovable,d.Mass,d.Pushable,d.Size,d.Velocity],initialize:function(n,u,f,o,c){h.call(this,n,u,f,o,c),this.body=null}});s.exports=a},37742:(s,y,e)=>{/** + */var r=e(83419),d=e(92209),h=e(68287),a=new r({Extends:h,Mixins:[d.Acceleration,d.Angular,d.Bounce,d.Collision,d.Debug,d.Drag,d.Enable,d.Friction,d.Gravity,d.Immovable,d.Mass,d.Pushable,d.Size,d.Velocity],initialize:function(n,u,f,o,c){h.call(this,n,u,f,o,c),this.body=null}});s.exports=a},37742:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(78389),h=e(37747),a=e(63012),l=e(43396),n=e(87841),u=e(37303),f=e(95829),o=e(26099),c=new r({Mixins:[d],initialize:function(v,m){var S=64,M=64,w={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},C=m!==void 0;C&&m.displayWidth&&(S=m.displayWidth,M=m.displayHeight),C||(m=w),this.world=v,this.gameObject=C?m:void 0,this.isBody=!0,this.transform={x:m.x,y:m.y,rotation:m.angle,scaleX:m.scaleX,scaleY:m.scaleY,displayOriginX:m.displayOriginX,displayOriginY:m.displayOriginY},this.debugShowBody=v.defaults.debugShowBody,this.debugShowVelocity=v.defaults.debugShowVelocity,this.debugBodyColor=v.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new o,this.position=new o(m.x-m.scaleX*m.displayOriginX,m.y-m.scaleY*m.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=m.angle,this.preRotation=m.angle,this.width=S,this.height=M,this.sourceWidth=S,this.sourceHeight=M,m.frame&&(this.sourceWidth=m.frame.realWidth,this.sourceHeight=m.frame.realHeight),this.halfWidth=Math.abs(S/2),this.halfHeight=Math.abs(M/2),this.center=new o(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new o,this.newVelocity=new o,this.deltaMax=new o,this.acceleration=new o,this.allowDrag=!0,this.drag=new o,this.allowGravity=!0,this.gravity=new o,this.bounce=new o,this.worldBounce=null,this.customBoundsRectangle=v.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new o(1e4,1e4),this.maxSpeed=-1,this.friction=new o(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=h.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new o(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=f(!1),this.touching=f(!0),this.wasTouching=f(!0),this.blocked=f(!0),this.syncBounds=!1,this.physicsType=h.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=m.scaleX,this._sy=m.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new n,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var p=this.gameObject,v=this.transform;if(p.parentContainer){var m=p.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);v.x=m.tx,v.y=m.ty,v.rotation=l(m.rotation),v.scaleX=m.scaleX,v.scaleY=m.scaleY,v.displayOriginX=p.displayOriginX,v.displayOriginY=p.displayOriginY}else v.x=p.x,v.y=p.y,v.rotation=p.angle,v.scaleX=p.scaleX,v.scaleY=p.scaleY,v.displayOriginX=p.displayOriginX,v.displayOriginY=p.displayOriginY;var S=!1;if(this.syncBounds){var M=p.getBounds(this._bounds);this.width=M.width,this.height=M.height,S=!0}else{var w=Math.abs(v.scaleX),C=Math.abs(v.scaleY);(this._sx!==w||this._sy!==C)&&(this.width=this.sourceWidth*w,this.height=this.sourceHeight*C,this._sx=w,this._sy=C,S=!0)}S&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var p=this.transform;this.position.x=p.x+p.scaleX*(this.offset.x-p.displayOriginX),this.position.y=p.y+p.scaleY*(this.offset.y-p.displayOriginY),this.updateCenter()},resetFlags:function(p){p===void 0&&(p=!1);var v=this.wasTouching,m=this.touching,S=this.blocked;p?f(!0,v):(v.none=m.none,v.up=m.up,v.down=m.down,v.left=m.left,v.right=m.right),f(!0,m),f(!0,S),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(p,v){if(p&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var m=this.position;this.prev.x=m.x,this.prev.y=m.y,this.prevFrame.x=m.x,this.prevFrame.y=m.y}p&&this.update(v)},update:function(p){var v=this.prev,m=this.position,S=this.velocity;if(v.set(m.x,m.y),!this.moves){this._dx=m.x-v.x,this._dy=m.y-v.y;return}if(this.directControl){var M=this.autoFrame;S.set((m.x-M.x)/p,(m.y-M.y)/p),this.world.updateMotion(this,p),this._dx=m.x-M.x,this._dy=m.y-M.y}else this.world.updateMotion(this,p),this.newVelocity.set(S.x*p,S.y*p),m.add(this.newVelocity),this._dx=m.x-v.x,this._dy=m.y-v.y;var w=S.x,C=S.y;if(this.updateCenter(),this.angle=Math.atan2(C,w),this.speed=Math.sqrt(w*w+C*C),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var A=this.blocked;this.world.emit(a.WORLD_BOUNDS,this,A.up,A.down,A.left,A.right)}},postUpdate:function(){var p=this.position,v=p.x-this.prevFrame.x,m=p.y-this.prevFrame.y,S=this.gameObject;if(this.moves){var M=this.deltaMax.x,w=this.deltaMax.y;M!==0&&v!==0&&(v<0&&v<-M?v=-M:v>0&&v>M&&(v=M)),w!==0&&m!==0&&(m<0&&m<-w?m=-w:m>0&&m>w&&(m=w)),S&&(S.x+=v,S.y+=m)}v<0?this.facing=h.FACING_LEFT:v>0&&(this.facing=h.FACING_RIGHT),m<0?this.facing=h.FACING_UP:m>0&&(this.facing=h.FACING_DOWN),this.allowRotation&&S&&(S.angle+=this.deltaZ()),this._tx=v,this._ty=m,this.autoFrame.set(p.x,p.y)},setBoundsRectangle:function(p){return this.customBoundsRectangle=p||this.world.bounds,this},checkWorldBounds:function(){var p=this.position,v=this.velocity,m=this.blocked,S=this.customBoundsRectangle,M=this.world.checkCollision,w=this.worldBounce?-this.worldBounce.x:-this.bounce.x,C=this.worldBounce?-this.worldBounce.y:-this.bounce.y,A=!1;return p.xS.right&&M.right&&(p.x=S.right-this.width,v.x*=w,m.right=!0,A=!0),p.yS.bottom&&M.down&&(p.y=S.bottom-this.height,v.y*=C,m.down=!0,A=!0),A&&(this.blocked.none=!1,this.updateCenter()),A},setOffset:function(p,v){return v===void 0&&(v=p),this.offset.set(p,v),this},setGameObject:function(p,v){return v===void 0&&(v=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=p,p.body&&(p.body=this),this.setSize(),this.world.add(this),this.enable=v,this},setSize:function(p,v,m){m===void 0&&(m=!0);var S=this.gameObject;if(S&&(!p&&S.frame&&(p=S.frame.realWidth),!v&&S.frame&&(v=S.frame.realHeight)),this.sourceWidth=p,this.sourceHeight=v,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),m&&S&&S.getCenter){var M=(S.width-p)/2,w=(S.height-v)/2;this.offset.set(M,w)}return this.isCircle=!1,this.radius=0,this},setCircle:function(p,v,m){return v===void 0&&(v=this.offset.x),m===void 0&&(m=this.offset.y),p>0?(this.isCircle=!0,this.radius=p,this.sourceWidth=p*2,this.sourceHeight=p*2,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(v,m),this.updateCenter()):this.isCircle=!1,this},reset:function(p,v){this.stop();var m=this.gameObject;m&&(m.setPosition(p,v),this.rotation=m.angle,this.preRotation=m.angle);var S=this.position;m&&m.getTopLeft?m.getTopLeft(S):S.set(p,v),this.prev.copy(S),this.prevFrame.copy(S),this.autoFrame.copy(S),m&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(p){return p.x=this.x,p.y=this.y,p.right=this.right,p.bottom=this.bottom,p},hitTest:function(p,v){if(!this.isCircle)return u(this,p,v);if(this.radius>0&&p>=this.left&&p<=this.right&&v>=this.top&&v<=this.bottom){var m=(this.center.x-p)*(this.center.x-p),S=(this.center.y-v)*(this.center.y-v);return m+S<=this.radius*this.radius}return!1},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(p){var v=this.position,m=v.x+this.halfWidth,S=v.y+this.halfHeight;this.debugShowBody&&(p.lineStyle(p.defaultStrokeWidth,this.debugBodyColor),this.isCircle?p.strokeCircle(m,S,this.width/2):(this.checkCollision.up&&p.lineBetween(v.x,v.y,v.x+this.width,v.y),this.checkCollision.right&&p.lineBetween(v.x+this.width,v.y,v.x+this.width,v.y+this.height),this.checkCollision.down&&p.lineBetween(v.x,v.y+this.height,v.x+this.width,v.y+this.height),this.checkCollision.left&&p.lineBetween(v.x,v.y,v.x,v.y+this.height))),this.debugShowVelocity&&(p.lineStyle(p.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),p.lineBetween(m,S,m+this.velocity.x/2,S+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(p){return p===void 0&&(p=!0),this.directControl=p,this},setCollideWorldBounds:function(p,v,m,S){p===void 0&&(p=!0),this.collideWorldBounds=p;var M=v!==void 0,w=m!==void 0;return(M||w)&&(this.worldBounce||(this.worldBounce=new o),M&&(this.worldBounce.x=v),w&&(this.worldBounce.y=m)),S!==void 0&&(this.onWorldBounds=S),this},setVelocity:function(p,v){return this.velocity.set(p,v),p=this.velocity.x,v=this.velocity.y,this.speed=Math.sqrt(p*p+v*v),this},setVelocityX:function(p){return this.setVelocity(p,this.velocity.y)},setVelocityY:function(p){return this.setVelocity(this.velocity.x,p)},setMaxVelocity:function(p,v){return this.maxVelocity.set(p,v),this},setMaxVelocityX:function(p){return this.maxVelocity.x=p,this},setMaxVelocityY:function(p){return this.maxVelocity.y=p,this},setMaxSpeed:function(p){return this.maxSpeed=p,this},setSlideFactor:function(p,v){return this.slideFactor.set(p,v),this},setBounce:function(p,v){return this.bounce.set(p,v),this},setBounceX:function(p){return this.bounce.x=p,this},setBounceY:function(p){return this.bounce.y=p,this},setAcceleration:function(p,v){return this.acceleration.set(p,v),this},setAccelerationX:function(p){return this.acceleration.x=p,this},setAccelerationY:function(p){return this.acceleration.y=p,this},setAllowDrag:function(p){return p===void 0&&(p=!0),this.allowDrag=p,this},setAllowGravity:function(p){return p===void 0&&(p=!0),this.allowGravity=p,this},setAllowRotation:function(p){return p===void 0&&(p=!0),this.allowRotation=p,this},setDrag:function(p,v){return this.drag.set(p,v),this},setDamping:function(p){return this.useDamping=p,this},setDragX:function(p){return this.drag.x=p,this},setDragY:function(p){return this.drag.y=p,this},setGravity:function(p,v){return this.gravity.set(p,v),this},setGravityX:function(p){return this.gravity.x=p,this},setGravityY:function(p){return this.gravity.y=p,this},setFriction:function(p,v){return this.friction.set(p,v),this},setFrictionX:function(p){return this.friction.x=p,this},setFrictionY:function(p){return this.friction.y=p,this},setAngularVelocity:function(p){return this.angularVelocity=p,this},setAngularAcceleration:function(p){return this.angularAcceleration=p,this},setAngularDrag:function(p){return this.angularDrag=p,this},setMass:function(p){return this.mass=p,this},setImmovable:function(p){return p===void 0&&(p=!0),this.immovable=p,this},setEnable:function(p){return p===void 0&&(p=!0),this.enable=p,this},processX:function(p,v,m,S){this.x+=p,this.updateCenter(),v!==null&&(this.velocity.x=v*this.slideFactor.x);var M=this.blocked;m&&(M.left=!0,M.none=!1),S&&(M.right=!0,M.none=!1)},processY:function(p,v,m,S){this.y+=p,this.updateCenter(),v!==null&&(this.velocity.y=v*this.slideFactor.y);var M=this.blocked;m&&(M.up=!0,M.none=!1),S&&(M.down=!0,M.none=!1)},x:{get:function(){return this.position.x},set:function(p){this.position.x=p}},y:{get:function(){return this.position.y},set:function(p){this.position.y=p}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});s.exports=c},79342:(s,y,e)=>{/** + */var r=e(83419),d=e(78389),h=e(37747),a=e(63012),l=e(43396),n=e(87841),u=e(37303),f=e(95829),o=e(26099),c=new r({Mixins:[d],initialize:function(v,m){var S=64,M=64,w={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},C=m!==void 0;C&&m.displayWidth&&(S=m.displayWidth,M=m.displayHeight),C||(m=w),this.world=v,this.gameObject=C?m:void 0,this.isBody=!0,this.transform={x:m.x,y:m.y,rotation:m.angle,scaleX:m.scaleX,scaleY:m.scaleY,displayOriginX:m.displayOriginX,displayOriginY:m.displayOriginY},this.debugShowBody=v.defaults.debugShowBody,this.debugShowVelocity=v.defaults.debugShowVelocity,this.debugBodyColor=v.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new o,this.position=new o(m.x-m.scaleX*m.displayOriginX,m.y-m.scaleY*m.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=m.angle,this.preRotation=m.angle,this.width=S,this.height=M,this.sourceWidth=S,this.sourceHeight=M,m.frame&&(this.sourceWidth=m.frame.realWidth,this.sourceHeight=m.frame.realHeight),this.halfWidth=Math.abs(S/2),this.halfHeight=Math.abs(M/2),this.center=new o(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new o,this.newVelocity=new o,this.deltaMax=new o,this.acceleration=new o,this.allowDrag=!0,this.drag=new o,this.allowGravity=!0,this.gravity=new o,this.bounce=new o,this.worldBounce=null,this.customBoundsRectangle=v.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new o(1e4,1e4),this.maxSpeed=-1,this.friction=new o(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=h.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new o(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=f(!1),this.touching=f(!0),this.wasTouching=f(!0),this.blocked=f(!0),this.syncBounds=!1,this.physicsType=h.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=m.scaleX,this._sy=m.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new n,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var p=this.gameObject,v=this.transform;if(p.parentContainer){var m=p.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);v.x=m.tx,v.y=m.ty,v.rotation=l(m.rotation),v.scaleX=m.scaleX,v.scaleY=m.scaleY,v.displayOriginX=p.displayOriginX,v.displayOriginY=p.displayOriginY}else v.x=p.x,v.y=p.y,v.rotation=p.angle,v.scaleX=p.scaleX,v.scaleY=p.scaleY,v.displayOriginX=p.displayOriginX,v.displayOriginY=p.displayOriginY;var S=!1;if(this.syncBounds){var M=p.getBounds(this._bounds);this.width=M.width,this.height=M.height,S=!0}else{var w=Math.abs(v.scaleX),C=Math.abs(v.scaleY);(this._sx!==w||this._sy!==C)&&(this.width=this.sourceWidth*w,this.height=this.sourceHeight*C,this._sx=w,this._sy=C,S=!0)}S&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var p=this.transform;this.position.x=p.x+p.scaleX*(this.offset.x-p.displayOriginX),this.position.y=p.y+p.scaleY*(this.offset.y-p.displayOriginY),this.updateCenter()},resetFlags:function(p){p===void 0&&(p=!1);var v=this.wasTouching,m=this.touching,S=this.blocked;p?f(!0,v):(v.none=m.none,v.up=m.up,v.down=m.down,v.left=m.left,v.right=m.right),f(!0,m),f(!0,S),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(p,v){if(p&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var m=this.position;this.prev.x=m.x,this.prev.y=m.y,this.prevFrame.x=m.x,this.prevFrame.y=m.y}p&&this.update(v)},update:function(p){var v=this.prev,m=this.position,S=this.velocity;if(v.set(m.x,m.y),!this.moves){this._dx=m.x-v.x,this._dy=m.y-v.y;return}if(this.directControl){var M=this.autoFrame;S.set((m.x-M.x)/p,(m.y-M.y)/p),this.world.updateMotion(this,p),this._dx=m.x-M.x,this._dy=m.y-M.y}else this.world.updateMotion(this,p),this.newVelocity.set(S.x*p,S.y*p),m.add(this.newVelocity),this._dx=m.x-v.x,this._dy=m.y-v.y;var w=S.x,C=S.y;if(this.updateCenter(),this.angle=Math.atan2(C,w),this.speed=Math.sqrt(w*w+C*C),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var A=this.blocked;this.world.emit(a.WORLD_BOUNDS,this,A.up,A.down,A.left,A.right)}},postUpdate:function(){var p=this.position,v=p.x-this.prevFrame.x,m=p.y-this.prevFrame.y,S=this.gameObject;if(this.moves){var M=this.deltaMax.x,w=this.deltaMax.y;M!==0&&v!==0&&(v<0&&v<-M?v=-M:v>0&&v>M&&(v=M)),w!==0&&m!==0&&(m<0&&m<-w?m=-w:m>0&&m>w&&(m=w)),S&&(S.x+=v,S.y+=m)}v<0?this.facing=h.FACING_LEFT:v>0&&(this.facing=h.FACING_RIGHT),m<0?this.facing=h.FACING_UP:m>0&&(this.facing=h.FACING_DOWN),this.allowRotation&&S&&(S.angle+=this.deltaZ()),this._tx=v,this._ty=m,this.autoFrame.set(p.x,p.y)},setBoundsRectangle:function(p){return this.customBoundsRectangle=p||this.world.bounds,this},checkWorldBounds:function(){var p=this.position,v=this.velocity,m=this.blocked,S=this.customBoundsRectangle,M=this.world.checkCollision,w=this.worldBounce?-this.worldBounce.x:-this.bounce.x,C=this.worldBounce?-this.worldBounce.y:-this.bounce.y,A=!1;return p.xS.right&&M.right&&(p.x=S.right-this.width,v.x*=w,m.right=!0,A=!0),p.yS.bottom&&M.down&&(p.y=S.bottom-this.height,v.y*=C,m.down=!0,A=!0),A&&(this.blocked.none=!1,this.updateCenter()),A},setOffset:function(p,v){return v===void 0&&(v=p),this.offset.set(p,v),this},setGameObject:function(p,v){return v===void 0&&(v=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=p,p.body&&(p.body=this),this.setSize(),this.world.add(this),this.enable=v,this},setSize:function(p,v,m){m===void 0&&(m=!0);var S=this.gameObject;if(S&&(!p&&S.frame&&(p=S.frame.realWidth),!v&&S.frame&&(v=S.frame.realHeight)),this.sourceWidth=p,this.sourceHeight=v,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),m&&S&&S.getCenter){var M=(S.width-p)/2,w=(S.height-v)/2;this.offset.set(M,w)}return this.isCircle=!1,this.radius=0,this},setCircle:function(p,v,m){return v===void 0&&(v=this.offset.x),m===void 0&&(m=this.offset.y),p>0?(this.isCircle=!0,this.radius=p,this.sourceWidth=p*2,this.sourceHeight=p*2,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(v,m),this.updateCenter()):this.isCircle=!1,this},reset:function(p,v){this.stop();var m=this.gameObject;m&&(m.setPosition(p,v),this.rotation=m.angle,this.preRotation=m.angle);var S=this.position;m&&m.getTopLeft?m.getTopLeft(S):S.set(p,v),this.prev.copy(S),this.prevFrame.copy(S),this.autoFrame.copy(S),m&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(p){return p.x=this.x,p.y=this.y,p.right=this.right,p.bottom=this.bottom,p},hitTest:function(p,v){if(!this.isCircle)return u(this,p,v);if(this.radius>0&&p>=this.left&&p<=this.right&&v>=this.top&&v<=this.bottom){var m=(this.center.x-p)*(this.center.x-p),S=(this.center.y-v)*(this.center.y-v);return m+S<=this.radius*this.radius}return!1},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(p){var v=this.position,m=v.x+this.halfWidth,S=v.y+this.halfHeight;this.debugShowBody&&(p.lineStyle(p.defaultStrokeWidth,this.debugBodyColor),this.isCircle?p.strokeCircle(m,S,this.width/2):(this.checkCollision.up&&p.lineBetween(v.x,v.y,v.x+this.width,v.y),this.checkCollision.right&&p.lineBetween(v.x+this.width,v.y,v.x+this.width,v.y+this.height),this.checkCollision.down&&p.lineBetween(v.x,v.y+this.height,v.x+this.width,v.y+this.height),this.checkCollision.left&&p.lineBetween(v.x,v.y,v.x,v.y+this.height))),this.debugShowVelocity&&(p.lineStyle(p.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),p.lineBetween(m,S,m+this.velocity.x/2,S+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(p){return p===void 0&&(p=!0),this.directControl=p,this},setCollideWorldBounds:function(p,v,m,S){p===void 0&&(p=!0),this.collideWorldBounds=p;var M=v!==void 0,w=m!==void 0;return(M||w)&&(this.worldBounce||(this.worldBounce=new o),M&&(this.worldBounce.x=v),w&&(this.worldBounce.y=m)),S!==void 0&&(this.onWorldBounds=S),this},setVelocity:function(p,v){return this.velocity.set(p,v),p=this.velocity.x,v=this.velocity.y,this.speed=Math.sqrt(p*p+v*v),this},setVelocityX:function(p){return this.setVelocity(p,this.velocity.y)},setVelocityY:function(p){return this.setVelocity(this.velocity.x,p)},setMaxVelocity:function(p,v){return this.maxVelocity.set(p,v),this},setMaxVelocityX:function(p){return this.maxVelocity.x=p,this},setMaxVelocityY:function(p){return this.maxVelocity.y=p,this},setMaxSpeed:function(p){return this.maxSpeed=p,this},setSlideFactor:function(p,v){return this.slideFactor.set(p,v),this},setBounce:function(p,v){return this.bounce.set(p,v),this},setBounceX:function(p){return this.bounce.x=p,this},setBounceY:function(p){return this.bounce.y=p,this},setAcceleration:function(p,v){return this.acceleration.set(p,v),this},setAccelerationX:function(p){return this.acceleration.x=p,this},setAccelerationY:function(p){return this.acceleration.y=p,this},setAllowDrag:function(p){return p===void 0&&(p=!0),this.allowDrag=p,this},setAllowGravity:function(p){return p===void 0&&(p=!0),this.allowGravity=p,this},setAllowRotation:function(p){return p===void 0&&(p=!0),this.allowRotation=p,this},setDrag:function(p,v){return this.drag.set(p,v),this},setDamping:function(p){return this.useDamping=p,this},setDragX:function(p){return this.drag.x=p,this},setDragY:function(p){return this.drag.y=p,this},setGravity:function(p,v){return this.gravity.set(p,v),this},setGravityX:function(p){return this.gravity.x=p,this},setGravityY:function(p){return this.gravity.y=p,this},setFriction:function(p,v){return this.friction.set(p,v),this},setFrictionX:function(p){return this.friction.x=p,this},setFrictionY:function(p){return this.friction.y=p,this},setAngularVelocity:function(p){return this.angularVelocity=p,this},setAngularAcceleration:function(p){return this.angularAcceleration=p,this},setAngularDrag:function(p){return this.angularDrag=p,this},setMass:function(p){return this.mass=p,this},setImmovable:function(p){return p===void 0&&(p=!0),this.immovable=p,this},setEnable:function(p){return p===void 0&&(p=!0),this.enable=p,this},processX:function(p,v,m,S){this.x+=p,this.updateCenter(),v!==null&&(this.velocity.x=v*this.slideFactor.x);var M=this.blocked;m&&(M.left=!0,M.none=!1),S&&(M.right=!0,M.none=!1)},processY:function(p,v,m,S){this.y+=p,this.updateCenter(),v!==null&&(this.velocity.y=v*this.slideFactor.y);var M=this.blocked;m&&(M.up=!0,M.none=!1),S&&(M.down=!0,M.none=!1)},x:{get:function(){return this.position.x},set:function(p){this.position.x=p}},y:{get:function(){return this.position.y},set:function(p){this.position.y=p}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});s.exports=c},79342:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a,l,n,u,f,o,c){this.world=a,this.name="",this.active=!0,this.overlapOnly=l,this.object1=n,this.object2=u,this.collideCallback=f,this.processCallback=o,this.callbackContext=c},setName:function(h){return this.name=h,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});s.exports=d},66022:(s,y,e)=>{/** + */var r=e(83419),d=new r({initialize:function(a,l,n,u,f,o,c){this.world=a,this.name="",this.active=!0,this.overlapOnly=l,this.object1=n,this.object2=u,this.collideCallback=f,this.processCallback=o,this.callbackContext=c},setName:function(h){return this.name=h,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});s.exports=d},66022:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4233,15 +4233,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r=0;if(!Array.isArray(e))r=e;else for(var d=0;d{/** + */var x=function(e){var r=0;if(!Array.isArray(e))r=e;else for(var d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(37747),d=function(h,a,l,n){var u=0,f=h.deltaAbsX()+a.deltaAbsX()+n;return h._dx===0&&a._dx===0?(h.embedded=!0,a.embedded=!0):h._dx>a._dx?(u=h.right-a.x,u>f&&!l||h.checkCollision.right===!1||a.checkCollision.left===!1?u=0:(h.touching.none=!1,h.touching.right=!0,a.touching.none=!1,a.touching.left=!0,a.physicsType===r.STATIC_BODY&&!l&&(h.blocked.none=!1,h.blocked.right=!0),h.physicsType===r.STATIC_BODY&&!l&&(a.blocked.none=!1,a.blocked.left=!0))):h._dxf&&!l||h.checkCollision.left===!1||a.checkCollision.right===!1?u=0:(h.touching.none=!1,h.touching.left=!0,a.touching.none=!1,a.touching.right=!0,a.physicsType===r.STATIC_BODY&&!l&&(h.blocked.none=!1,h.blocked.left=!0),h.physicsType===r.STATIC_BODY&&!l&&(a.blocked.none=!1,a.blocked.right=!0))),h.overlapX=u,a.overlapX=u,u};s.exports=d},45170:(s,y,e)=>{/** + */var r=e(37747),d=function(h,a,l,n){var u=0,f=h.deltaAbsX()+a.deltaAbsX()+n;return h._dx===0&&a._dx===0?(h.embedded=!0,a.embedded=!0):h._dx>a._dx?(u=h.right-a.x,u>f&&!l||h.checkCollision.right===!1||a.checkCollision.left===!1?u=0:(h.touching.none=!1,h.touching.right=!0,a.touching.none=!1,a.touching.left=!0,a.physicsType===r.STATIC_BODY&&!l&&(h.blocked.none=!1,h.blocked.right=!0),h.physicsType===r.STATIC_BODY&&!l&&(a.blocked.none=!1,a.blocked.left=!0))):h._dxf&&!l||h.checkCollision.left===!1||a.checkCollision.right===!1?u=0:(h.touching.none=!1,h.touching.left=!0,a.touching.none=!1,a.touching.right=!0,a.physicsType===r.STATIC_BODY&&!l&&(h.blocked.none=!1,h.blocked.left=!0),h.physicsType===r.STATIC_BODY&&!l&&(a.blocked.none=!1,a.blocked.right=!0))),h.overlapX=u,a.overlapX=u,u};s.exports=d},45170:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(37747),d=function(h,a,l,n){var u=0,f=h.deltaAbsY()+a.deltaAbsY()+n;return h._dy===0&&a._dy===0?(h.embedded=!0,a.embedded=!0):h._dy>a._dy?(u=h.bottom-a.y,u>f&&!l||h.checkCollision.down===!1||a.checkCollision.up===!1?u=0:(h.touching.none=!1,h.touching.down=!0,a.touching.none=!1,a.touching.up=!0,a.physicsType===r.STATIC_BODY&&!l&&(h.blocked.none=!1,h.blocked.down=!0),h.physicsType===r.STATIC_BODY&&!l&&(a.blocked.none=!1,a.blocked.up=!0))):h._dyf&&!l||h.checkCollision.up===!1||a.checkCollision.down===!1?u=0:(h.touching.none=!1,h.touching.up=!0,a.touching.none=!1,a.touching.down=!0,a.physicsType===r.STATIC_BODY&&!l&&(h.blocked.none=!1,h.blocked.up=!0),h.physicsType===r.STATIC_BODY&&!l&&(a.blocked.none=!1,a.blocked.down=!0))),h.overlapY=u,a.overlapY=u,u};s.exports=d},60758:(s,y,e)=>{/** + */var r=e(37747),d=function(h,a,l,n){var u=0,f=h.deltaAbsY()+a.deltaAbsY()+n;return h._dy===0&&a._dy===0?(h.embedded=!0,a.embedded=!0):h._dy>a._dy?(u=h.bottom-a.y,u>f&&!l||h.checkCollision.down===!1||a.checkCollision.up===!1?u=0:(h.touching.none=!1,h.touching.down=!0,a.touching.none=!1,a.touching.up=!0,a.physicsType===r.STATIC_BODY&&!l&&(h.blocked.none=!1,h.blocked.down=!0),h.physicsType===r.STATIC_BODY&&!l&&(a.blocked.none=!1,a.blocked.up=!0))):h._dyf&&!l||h.checkCollision.up===!1||a.checkCollision.down===!1?u=0:(h.touching.none=!1,h.touching.up=!0,a.touching.none=!1,a.touching.down=!0,a.physicsType===r.STATIC_BODY&&!l&&(h.blocked.none=!1,h.blocked.up=!0),h.physicsType===r.STATIC_BODY&&!l&&(a.blocked.none=!1,a.blocked.down=!0))),h.overlapY=u,a.overlapY=u,u};s.exports=d},60758:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4249,15 +4249,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y,e,r,d,h,a,l,n,u,f,o,c,p,v,m,S,M,w=function(I,D,B){y=I,e=D;var G=y.velocity.x,z=e.velocity.x;return r=y.pushable,u=y._dx<0,f=y._dx>0,o=y._dx===0,m=Math.abs(y.right-e.x)<=Math.abs(e.right-y.x),l=z-G*y.bounce.x,d=e.pushable,c=e._dx<0,p=e._dx>0,v=e._dx===0,S=!m,n=G-z*e.bounce.x,M=Math.abs(B),C()},C=function(){return f&&m&&e.blocked.right?(y.processX(-M,l,!1,!0),1):u&&S&&e.blocked.left?(y.processX(M,l,!0),1):p&&S&&y.blocked.right?(e.processX(-M,n,!1,!0),2):c&&m&&y.blocked.left?(e.processX(M,n,!0),2):0},A=function(){var I=y.velocity.x,D=e.velocity.x,B=Math.sqrt(D*D*e.mass/y.mass)*(D>0?1:-1),G=Math.sqrt(I*I*y.mass/e.mass)*(I>0?1:-1),z=(B+G)*.5;return B-=z,G-=z,h=z+B*y.bounce.x,a=z+G*e.bounce.x,u&&S?P(0):c&&m?P(1):f&&m?P(2):p&&S?P(3):!1},P=function(I){if(r&&d)M*=.5,I===0||I===3?(y.processX(M,h),e.processX(-M,a)):(y.processX(-M,h),e.processX(M,a));else if(r&&!d)I===0||I===3?y.processX(M,l,!0):y.processX(-M,l,!1,!0);else if(!r&&d)I===0||I===3?e.processX(-M,n,!1,!0):e.processX(M,n,!0);else{var D=M*.5;I===0?v?(y.processX(M,0,!0),e.processX(0,null,!1,!0)):p?(y.processX(D,0,!0),e.processX(-D,0,!1,!0)):(y.processX(D,e.velocity.x,!0),e.processX(-D,null,!1,!0)):I===1?o?(y.processX(0,null,!1,!0),e.processX(M,0,!0)):f?(y.processX(-D,0,!1,!0),e.processX(D,0,!0)):(y.processX(-D,null,!1,!0),e.processX(D,y.velocity.x,!0)):I===2?v?(y.processX(-M,0,!1,!0),e.processX(0,null,!0)):c?(y.processX(-D,0,!1,!0),e.processX(D,0,!0)):(y.processX(-D,e.velocity.x,!1,!0),e.processX(D,null,!0)):I===3&&(o?(y.processX(0,null,!0),e.processX(-M,0,!1,!0)):u?(y.processX(D,0,!0),e.processX(-D,0,!1,!0)):(y.processX(D,e.velocity.y,!0),e.processX(-D,null,!1,!0)))}return!0},b=function(I){I===1?e.velocity.x=0:m?e.processX(M,n,!0):e.processX(-M,n,!1,!0),y.moves&&(e.y+=(y.y-y.prev.y)*y.friction.y,e._dy=e.y-e.prev.y)},O=function(I){I===2?y.velocity.x=0:S?y.processX(M,l,!0):y.processX(-M,l,!1,!0),e.moves&&(y.y+=(e.y-e.prev.y)*e.friction.y,y._dy=y.y-y.prev.y)};s.exports={BlockCheck:C,Check:A,Set:w,Run:P,RunImmovableBody1:b,RunImmovableBody2:O}},47962:s=>{/** + */var x,e,r,d,h,a,l,n,u,f,o,c,p,v,m,S,M,w=function(I,D,B){x=I,e=D;var G=x.velocity.x,z=e.velocity.x;return r=x.pushable,u=x._dx<0,f=x._dx>0,o=x._dx===0,m=Math.abs(x.right-e.x)<=Math.abs(e.right-x.x),l=z-G*x.bounce.x,d=e.pushable,c=e._dx<0,p=e._dx>0,v=e._dx===0,S=!m,n=G-z*e.bounce.x,M=Math.abs(B),C()},C=function(){return f&&m&&e.blocked.right?(x.processX(-M,l,!1,!0),1):u&&S&&e.blocked.left?(x.processX(M,l,!0),1):p&&S&&x.blocked.right?(e.processX(-M,n,!1,!0),2):c&&m&&x.blocked.left?(e.processX(M,n,!0),2):0},A=function(){var I=x.velocity.x,D=e.velocity.x,B=Math.sqrt(D*D*e.mass/x.mass)*(D>0?1:-1),G=Math.sqrt(I*I*x.mass/e.mass)*(I>0?1:-1),z=(B+G)*.5;return B-=z,G-=z,h=z+B*x.bounce.x,a=z+G*e.bounce.x,u&&S?P(0):c&&m?P(1):f&&m?P(2):p&&S?P(3):!1},P=function(I){if(r&&d)M*=.5,I===0||I===3?(x.processX(M,h),e.processX(-M,a)):(x.processX(-M,h),e.processX(M,a));else if(r&&!d)I===0||I===3?x.processX(M,l,!0):x.processX(-M,l,!1,!0);else if(!r&&d)I===0||I===3?e.processX(-M,n,!1,!0):e.processX(M,n,!0);else{var D=M*.5;I===0?v?(x.processX(M,0,!0),e.processX(0,null,!1,!0)):p?(x.processX(D,0,!0),e.processX(-D,0,!1,!0)):(x.processX(D,e.velocity.x,!0),e.processX(-D,null,!1,!0)):I===1?o?(x.processX(0,null,!1,!0),e.processX(M,0,!0)):f?(x.processX(-D,0,!1,!0),e.processX(D,0,!0)):(x.processX(-D,null,!1,!0),e.processX(D,x.velocity.x,!0)):I===2?v?(x.processX(-M,0,!1,!0),e.processX(0,null,!0)):c?(x.processX(-D,0,!1,!0),e.processX(D,0,!0)):(x.processX(-D,e.velocity.x,!1,!0),e.processX(D,null,!0)):I===3&&(o?(x.processX(0,null,!0),e.processX(-M,0,!1,!0)):u?(x.processX(D,0,!0),e.processX(-D,0,!1,!0)):(x.processX(D,e.velocity.y,!0),e.processX(-D,null,!1,!0)))}return!0},b=function(I){I===1?e.velocity.x=0:m?e.processX(M,n,!0):e.processX(-M,n,!1,!0),x.moves&&(e.y+=(x.y-x.prev.y)*x.friction.y,e._dy=e.y-e.prev.y)},O=function(I){I===2?x.velocity.x=0:S?x.processX(M,l,!0):x.processX(-M,l,!1,!0),e.moves&&(x.y+=(e.y-e.prev.y)*e.friction.y,x._dy=x.y-x.prev.y)};s.exports={BlockCheck:C,Check:A,Set:w,Run:P,RunImmovableBody1:b,RunImmovableBody2:O}},47962:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y,e,r,d,h,a,l,n,u,f,o,c,p,v,m,S,M,w=function(I,D,B){y=I,e=D;var G=y.velocity.y,z=e.velocity.y;return r=y.pushable,u=y._dy<0,f=y._dy>0,o=y._dy===0,m=Math.abs(y.bottom-e.y)<=Math.abs(e.bottom-y.y),l=z-G*y.bounce.y,d=e.pushable,c=e._dy<0,p=e._dy>0,v=e._dy===0,S=!m,n=G-z*e.bounce.y,M=Math.abs(B),C()},C=function(){return f&&m&&e.blocked.down?(y.processY(-M,l,!1,!0),1):u&&S&&e.blocked.up?(y.processY(M,l,!0),1):p&&S&&y.blocked.down?(e.processY(-M,n,!1,!0),2):c&&m&&y.blocked.up?(e.processY(M,n,!0),2):0},A=function(){var I=y.velocity.y,D=e.velocity.y,B=Math.sqrt(D*D*e.mass/y.mass)*(D>0?1:-1),G=Math.sqrt(I*I*y.mass/e.mass)*(I>0?1:-1),z=(B+G)*.5;return B-=z,G-=z,h=z+B*y.bounce.y,a=z+G*e.bounce.y,u&&S?P(0):c&&m?P(1):f&&m?P(2):p&&S?P(3):!1},P=function(I){if(r&&d)M*=.5,I===0||I===3?(y.processY(M,h),e.processY(-M,a)):(y.processY(-M,h),e.processY(M,a));else if(r&&!d)I===0||I===3?y.processY(M,l,!0):y.processY(-M,l,!1,!0);else if(!r&&d)I===0||I===3?e.processY(-M,n,!1,!0):e.processY(M,n,!0);else{var D=M*.5;I===0?v?(y.processY(M,0,!0),e.processY(0,null,!1,!0)):p?(y.processY(D,0,!0),e.processY(-D,0,!1,!0)):(y.processY(D,e.velocity.y,!0),e.processY(-D,null,!1,!0)):I===1?o?(y.processY(0,null,!1,!0),e.processY(M,0,!0)):f?(y.processY(-D,0,!1,!0),e.processY(D,0,!0)):(y.processY(-D,null,!1,!0),e.processY(D,y.velocity.y,!0)):I===2?v?(y.processY(-M,0,!1,!0),e.processY(0,null,!0)):c?(y.processY(-D,0,!1,!0),e.processY(D,0,!0)):(y.processY(-D,e.velocity.y,!1,!0),e.processY(D,null,!0)):I===3&&(o?(y.processY(0,null,!0),e.processY(-M,0,!1,!0)):u?(y.processY(D,0,!0),e.processY(-D,0,!1,!0)):(y.processY(D,e.velocity.y,!0),e.processY(-D,null,!1,!0)))}return!0},b=function(I){I===1?e.velocity.y=0:m?e.processY(M,n,!0):e.processY(-M,n,!1,!0),y.moves&&(e.x+=(y.x-y.prev.x)*y.friction.x,e._dx=e.x-e.prev.x)},O=function(I){I===2?y.velocity.y=0:S?y.processY(M,l,!0):y.processY(-M,l,!1,!0),e.moves&&(y.x+=(e.x-e.prev.x)*e.friction.x,y._dx=y.x-y.prev.x)};s.exports={BlockCheck:C,Check:A,Set:w,Run:P,RunImmovableBody1:b,RunImmovableBody2:O}},14087:(s,y,e)=>{/** + */var x,e,r,d,h,a,l,n,u,f,o,c,p,v,m,S,M,w=function(I,D,B){x=I,e=D;var G=x.velocity.y,z=e.velocity.y;return r=x.pushable,u=x._dy<0,f=x._dy>0,o=x._dy===0,m=Math.abs(x.bottom-e.y)<=Math.abs(e.bottom-x.y),l=z-G*x.bounce.y,d=e.pushable,c=e._dy<0,p=e._dy>0,v=e._dy===0,S=!m,n=G-z*e.bounce.y,M=Math.abs(B),C()},C=function(){return f&&m&&e.blocked.down?(x.processY(-M,l,!1,!0),1):u&&S&&e.blocked.up?(x.processY(M,l,!0),1):p&&S&&x.blocked.down?(e.processY(-M,n,!1,!0),2):c&&m&&x.blocked.up?(e.processY(M,n,!0),2):0},A=function(){var I=x.velocity.y,D=e.velocity.y,B=Math.sqrt(D*D*e.mass/x.mass)*(D>0?1:-1),G=Math.sqrt(I*I*x.mass/e.mass)*(I>0?1:-1),z=(B+G)*.5;return B-=z,G-=z,h=z+B*x.bounce.y,a=z+G*e.bounce.y,u&&S?P(0):c&&m?P(1):f&&m?P(2):p&&S?P(3):!1},P=function(I){if(r&&d)M*=.5,I===0||I===3?(x.processY(M,h),e.processY(-M,a)):(x.processY(-M,h),e.processY(M,a));else if(r&&!d)I===0||I===3?x.processY(M,l,!0):x.processY(-M,l,!1,!0);else if(!r&&d)I===0||I===3?e.processY(-M,n,!1,!0):e.processY(M,n,!0);else{var D=M*.5;I===0?v?(x.processY(M,0,!0),e.processY(0,null,!1,!0)):p?(x.processY(D,0,!0),e.processY(-D,0,!1,!0)):(x.processY(D,e.velocity.y,!0),e.processY(-D,null,!1,!0)):I===1?o?(x.processY(0,null,!1,!0),e.processY(M,0,!0)):f?(x.processY(-D,0,!1,!0),e.processY(D,0,!0)):(x.processY(-D,null,!1,!0),e.processY(D,x.velocity.y,!0)):I===2?v?(x.processY(-M,0,!1,!0),e.processY(0,null,!0)):c?(x.processY(-D,0,!1,!0),e.processY(D,0,!0)):(x.processY(-D,e.velocity.y,!1,!0),e.processY(D,null,!0)):I===3&&(o?(x.processY(0,null,!0),e.processY(-M,0,!1,!0)):u?(x.processY(D,0,!0),e.processY(-D,0,!1,!0)):(x.processY(D,e.velocity.y,!0),e.processY(-D,null,!1,!0)))}return!0},b=function(I){I===1?e.velocity.y=0:m?e.processY(M,n,!0):e.processY(-M,n,!1,!0),x.moves&&(e.x+=(x.x-x.prev.x)*x.friction.x,e._dx=e.x-e.prev.x)},O=function(I){I===2?x.velocity.y=0:S?x.processY(M,l,!0):x.processY(-M,l,!1,!0),e.moves&&(x.x+=(e.x-e.prev.x)*e.friction.x,x._dx=x.x-x.prev.x)};s.exports={BlockCheck:C,Check:A,Set:w,Run:P,RunImmovableBody1:b,RunImmovableBody2:O}},14087:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(64897),d=e(3017),h=function(a,l,n,u,f){f===void 0&&(f=r(a,l,n,u));var o=a.immovable,c=l.immovable;if(n||f===0||o&&c||a.customSeparateX||l.customSeparateX)return f!==0||a.embedded&&l.embedded;var p=d.Set(a,l,f);return!o&&!c?p>0?!0:d.Check():(o?d.RunImmovableBody1(p):c&&d.RunImmovableBody2(p),!0)};s.exports=h},89936:(s,y,e)=>{/** + */var r=e(64897),d=e(3017),h=function(a,l,n,u,f){f===void 0&&(f=r(a,l,n,u));var o=a.immovable,c=l.immovable;if(n||f===0||o&&c||a.customSeparateX||l.customSeparateX)return f!==0||a.embedded&&l.embedded;var p=d.Set(a,l,f);return!o&&!c?p>0?!0:d.Check():(o?d.RunImmovableBody1(p):c&&d.RunImmovableBody2(p),!0)};s.exports=h},89936:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4265,31 +4265,31 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r===void 0&&(r={}),r.none=e,r.up=!1,r.down=!1,r.left=!1,r.right=!1,e||(r.up=!0,r.down=!0,r.left=!0,r.right=!0),r};s.exports=y},72624:(s,y,e)=>{/** + */var x=function(e,r){return r===void 0&&(r={}),r.none=e,r.up=!1,r.down=!1,r.left=!1,r.right=!1,e||(r.up=!0,r.down=!0,r.left=!0,r.right=!0),r};s.exports=x},72624:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(87902),d=e(83419),h=e(78389),a=e(37747),l=e(37303),n=e(95829),u=e(26099),f=new d({Mixins:[h],initialize:function(c,p){var v=64,m=64,S={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},M=p!==void 0;M&&p.displayWidth&&(v=p.displayWidth,m=p.displayHeight),M||(p=S),this.world=c,this.gameObject=M?p:void 0,this.isBody=!0,this.debugShowBody=c.defaults.debugShowStaticBody,this.debugBodyColor=c.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new u,this.position=new u(p.x-v*p.originX,p.y-m*p.originY),this.width=v,this.height=m,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new u(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=u.ZERO,this.allowGravity=!1,this.gravity=u.ZERO,this.bounce=u.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=n(!1),this.touching=n(!0),this.wasTouching=n(!0),this.blocked=n(!0),this.physicsType=a.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(o,c){return o&&o!==this.gameObject&&(this.gameObject.body=null,o.body=this,this.gameObject=o),c&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var o=this.gameObject;return o.getTopLeft(this.position),this.width=o.displayWidth,this.height=o.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(o,c){return c===void 0&&(c=o),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(o,c),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(o,c,p){p===void 0&&(p=!0);var v=this.gameObject;if(v&&v.frame&&(o||(o=v.frame.realWidth),c||(c=v.frame.realHeight)),this.world.staticTree.remove(this),this.width=o,this.height=c,this.halfWidth=Math.floor(o/2),this.halfHeight=Math.floor(c/2),p&&v&&v.getCenter){var m=v.displayWidth/2,S=v.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(m-this.halfWidth,S-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(o,c,p){return c===void 0&&(c=this.offset.x),p===void 0&&(p=this.offset.y),o>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=o,this.width=o*2,this.height=o*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(c,p),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(o,c){var p=this.gameObject;o===void 0&&(o=p.x),c===void 0&&(c=p.y),this.world.staticTree.remove(this),p.setPosition(o,c),p.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(o){return o.x=this.x,o.y=this.y,o.right=this.right,o.bottom=this.bottom,o},hitTest:function(o,c){return this.isCircle?r(this,o,c):l(this,o,c)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(o){var c=this.position,p=c.x+this.halfWidth,v=c.y+this.halfHeight;this.debugShowBody&&(o.lineStyle(o.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?o.strokeCircle(p,v,this.width/2):o.strokeRect(c.x,c.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(o){return o<=0&&(o=.1),this.mass=o,this},x:{get:function(){return this.position.x},set:function(o){this.world.staticTree.remove(this),this.position.x=o,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(o){this.world.staticTree.remove(this),this.position.y=o,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});s.exports=f},71464:(s,y,e)=>{/** + */var r=e(87902),d=e(83419),h=e(78389),a=e(37747),l=e(37303),n=e(95829),u=e(26099),f=new d({Mixins:[h],initialize:function(c,p){var v=64,m=64,S={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},M=p!==void 0;M&&p.displayWidth&&(v=p.displayWidth,m=p.displayHeight),M||(p=S),this.world=c,this.gameObject=M?p:void 0,this.isBody=!0,this.debugShowBody=c.defaults.debugShowStaticBody,this.debugBodyColor=c.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new u,this.position=new u(p.x-v*p.originX,p.y-m*p.originY),this.width=v,this.height=m,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new u(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=u.ZERO,this.allowGravity=!1,this.gravity=u.ZERO,this.bounce=u.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=n(!1),this.touching=n(!0),this.wasTouching=n(!0),this.blocked=n(!0),this.physicsType=a.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(o,c){return o&&o!==this.gameObject&&(this.gameObject.body=null,o.body=this,this.gameObject=o),c&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var o=this.gameObject;return o.getTopLeft(this.position),this.width=o.displayWidth,this.height=o.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(o,c){return c===void 0&&(c=o),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(o,c),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(o,c,p){p===void 0&&(p=!0);var v=this.gameObject;if(v&&v.frame&&(o||(o=v.frame.realWidth),c||(c=v.frame.realHeight)),this.world.staticTree.remove(this),this.width=o,this.height=c,this.halfWidth=Math.floor(o/2),this.halfHeight=Math.floor(c/2),p&&v&&v.getCenter){var m=v.displayWidth/2,S=v.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(m-this.halfWidth,S-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(o,c,p){return c===void 0&&(c=this.offset.x),p===void 0&&(p=this.offset.y),o>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=o,this.width=o*2,this.height=o*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(c,p),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(o,c){var p=this.gameObject;o===void 0&&(o=p.x),c===void 0&&(c=p.y),this.world.staticTree.remove(this),p.setPosition(o,c),p.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(o){return o.x=this.x,o.y=this.y,o.right=this.right,o.bottom=this.bottom,o},hitTest:function(o,c){return this.isCircle?r(this,o,c):l(this,o,c)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(o){var c=this.position,p=c.x+this.halfWidth,v=c.y+this.halfHeight;this.debugShowBody&&(o.lineStyle(o.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?o.strokeCircle(p,v,this.width/2):o.strokeRect(c.x,c.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(o){return o<=0&&(o=.1),this.mass=o,this},x:{get:function(){return this.position.x},set:function(o){this.world.staticTree.remove(this),this.position.x=o,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(o){this.world.staticTree.remove(this),this.position.y=o,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});s.exports=f},71464:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(13759),d=e(83419),h=e(78389),a=e(37747),l=e(95540),n=e(26479),u=e(41212),f=new d({Extends:n,Mixins:[h],initialize:function(c,p,v,m){!v&&!m?m={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:r}:u(v)?(m=v,v=null,m.internalCreateCallback=this.createCallbackHandler,m.internalRemoveCallback=this.removeCallbackHandler,m.createMultipleCallback=this.createMultipleCallbackHandler,m.classType=l(m,"classType",r)):Array.isArray(v)&&u(v[0])?(m=v,v=null,m.forEach(function(S){S.internalCreateCallback=this.createCallbackHandler,S.internalRemoveCallback=this.removeCallbackHandler,S.createMultipleCallback=this.createMultipleCallbackHandler,S.classType=l(S,"classType",r)})):m={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=c,this.physicsType=a.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,n.call(this,p,v,m),this.type="StaticPhysicsGroup"},createCallbackHandler:function(o){o.body||this.world.enableBody(o,a.STATIC_BODY)},removeCallbackHandler:function(o){o.body&&this.world.disableBody(o)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var o=this.children.entries,c=0;c{/** + */var r=e(13759),d=e(83419),h=e(78389),a=e(37747),l=e(95540),n=e(26479),u=e(41212),f=new d({Extends:n,Mixins:[h],initialize:function(c,p,v,m){!v&&!m?m={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:r}:u(v)?(m=v,v=null,m.internalCreateCallback=this.createCallbackHandler,m.internalRemoveCallback=this.removeCallbackHandler,m.createMultipleCallback=this.createMultipleCallbackHandler,m.classType=l(m,"classType",r)):Array.isArray(v)&&u(v[0])?(m=v,v=null,m.forEach(function(S){S.internalCreateCallback=this.createCallbackHandler,S.internalRemoveCallback=this.removeCallbackHandler,S.createMultipleCallback=this.createMultipleCallbackHandler,S.classType=l(S,"classType",r)})):m={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=c,this.physicsType=a.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,n.call(this,p,v,m),this.type="StaticPhysicsGroup"},createCallbackHandler:function(o){o.body||this.world.enableBody(o,a.STATIC_BODY)},removeCallbackHandler:function(o){o.body&&this.world.disableBody(o)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var o=this.children.entries,c=0;c{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(55495),d=e(37742),h=e(45319),a=e(83419),l=e(79342),n=e(37747),u=e(20339),f=e(52816),o=e(50792),c=e(63012),p=e(43855),v=e(5470),m=e(94977),S=e(64897),M=e(45170),w=e(96523),C=e(35154),A=e(36383),P=e(25774),b=e(96602),O=e(87841),I=e(59542),D=e(40012),B=e(14087),G=e(89936),z=e(35072),X=e(72624),j=e(2483),Q=e(61340),tt=e(26099),Y=e(15994),Z=new a({Extends:o,initialize:function(H,$){o.call(this),this.scene=H,this.bodies=new z,this.staticBodies=new z,this.pendingDestroy=new z,this.colliders=new P,this.gravity=new tt(C($,"gravity.x",0),C($,"gravity.y",0)),this.bounds=new O(C($,"x",0),C($,"y",0),C($,"width",H.sys.scale.width),C($,"height",H.sys.scale.height)),this.checkCollision={up:C($,"checkCollision.up",!0),down:C($,"checkCollision.down",!0),left:C($,"checkCollision.left",!0),right:C($,"checkCollision.right",!0)},this.fps=C($,"fps",60),this.fixedStep=C($,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=C($,"timeScale",1),this.OVERLAP_BIAS=C($,"overlapBias",4),this.TILE_BIAS=C($,"tileBias",16),this.forceX=C($,"forceX",!1),this.isPaused=C($,"isPaused",!1),this._total=0,this.drawDebug=C($,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:C($,"debugShowBody",!0),debugShowStaticBody:C($,"debugShowStaticBody",!0),debugShowVelocity:C($,"debugShowVelocity",!0),bodyDebugColor:C($,"debugBodyColor",16711935),staticBodyDebugColor:C($,"debugStaticBodyColor",255),velocityDebugColor:C($,"debugVelocityColor",65280)},this.maxEntries=C($,"maxEntries",16),this.useTree=C($,"useTree",!0),this.tree=new I(this.maxEntries),this.staticTree=new I(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new Q,this._tempMatrix2=new Q,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(U,H){H===void 0&&(H=n.DYNAMIC_BODY),Array.isArray(U)||(U=[U]);for(var $=0;$=q;for(this.fixedStep||(_=H*.001,rt=!0,this._elapsed=0),$=0;$=q;)this._elapsed-=q,this.step(_)}},step:function(U){var H,$,_=this.bodies.entries,q=_.length;for(H=0;H0){var gt=this.tree,yt=this.staticTree;for($=rt.entries,_=$.length,U=0;U<_;U++)H=$[U],H.physicsType===n.DYNAMIC_BODY?(gt.remove(H),q.delete(H)):H.physicsType===n.STATIC_BODY&&(yt.remove(H),at.delete(H)),H.world=void 0,H.gameObject=void 0;rt.clear()}},updateMotion:function(U,H){U.allowRotation&&this.computeAngularVelocity(U,H),this.computeVelocity(U,H)},computeAngularVelocity:function(U,H){var $=U.angularVelocity,_=U.angularAcceleration,q=U.angularDrag,at=U.maxAngular;_?$+=_*H:U.allowDrag&&q&&(q*=H,v($-q,0,.1)?$-=q:m($+q,0,.1)?$+=q:$=0),$=h($,-at,at);var ot=$-U.angularVelocity;U.angularVelocity+=ot,U.rotation+=U.angularVelocity*H},computeVelocity:function(U,H){var $=U.velocity.x,_=U.acceleration.x,q=U.drag.x,at=U.maxVelocity.x,ot=U.velocity.y,rt=U.acceleration.y,gt=U.drag.y,yt=U.maxVelocity.y,Et=U.speed,At=U.maxSpeed,Pt=U.allowDrag,Vt=U.useDamping;U.allowGravity&&($+=(this.gravity.x+U.gravity.x)*H,ot+=(this.gravity.y+U.gravity.y)*H),_?$+=_*H:Pt&&q&&(Vt?(q=Math.pow(q,H),$*=q,Et=Math.sqrt($*$+ot*ot),p(Et,0,.001)&&($=0)):(q*=H,v($-q,0,.01)?$-=q:m($+q,0,.01)?$+=q:$=0)),rt?ot+=rt*H:Pt&>&&(Vt?(gt=Math.pow(gt,H),ot*=gt,Et=Math.sqrt($*$+ot*ot),p(Et,0,.001)&&(ot=0)):(gt*=H,v(ot-gt,0,.01)?ot-=gt:m(ot+gt,0,.01)?ot+=gt:ot=0)),$=h($,-at,at),ot=h(ot,-yt,yt),U.velocity.set($,ot),At>-1&&U.velocity.length()>At&&(U.velocity.normalize().scale(At),Et=At),U.speed=Et},separate:function(U,H,$,_,q){var at,ot,rt=!1,gt=!0;if(!U.enable||!H.enable||U.checkCollision.none||H.checkCollision.none||!this.intersects(U,H)||$&&$.call(_,U.gameObject,H.gameObject)===!1)return rt;if(U.isCircle||H.isCircle){var yt=this.separateCircle(U,H,q);yt.result?(rt=!0,gt=!1):(at=yt.x,ot=yt.y,gt=!0)}if(gt){var Et=!1,At=!1,Pt=this.OVERLAP_BIAS;q?(Et=B(U,H,q,Pt,at),At=G(U,H,q,Pt,ot)):this.forceX||Math.abs(this.gravity.y+U.gravity.y)Ht&&(At=u(Vt,dt,Ht,Dt)-ut):dt>Bt&&(VtHt&&(At=u(Vt,dt,Ht,Bt)-ut)),At*=-1}else At=U.halfWidth+H.halfWidth-f(at,ot);U.overlapR=At,H.overlapR=At;var re=r(at,ot),le=(At+A.EPSILON)*Math.cos(re),ge=(At+A.EPSILON)*Math.sin(re),xe={overlap:At,result:!1,x:le,y:ge};if($&&(!Pt||Pt&&At!==0))return xe.result=!0,xe;if(!Pt&&At===0||rt&>||U.customSeparateX||H.customSeparateX)return xe.x=void 0,xe.y=void 0,xe;var Pe=!U.pushable&&!H.pushable;if(Pt){var te=at.x-ot.x,Ge=at.y-ot.y,Oe=Math.sqrt(Math.pow(te,2)+Math.pow(Ge,2)),Be=(ot.x-at.x)/Oe||0,Le=(ot.y-at.y)/Oe||0,ne=2*(yt.x*Be+yt.y*Le-Et.x*Be-Et.y*Le)/(U.mass+H.mass);(rt||gt)&&(ne*=2),rt||(yt.x=yt.x-ne/U.mass*Be,yt.y=yt.y-ne/U.mass*Le,yt.multiply(U.bounce)),gt||(Et.x=Et.x+ne/H.mass*Be,Et.y=Et.y+ne/H.mass*Le,Et.multiply(H.bounce)),!rt&&!gt&&(le*=.5,ge*=.5),rt||(U.x-=le,U.y-=ge,U.updateCenter()),gt||(H.x+=le,H.y+=ge,H.updateCenter()),xe.result=!0}else!rt||U.pushable||Pe?(U.x-=le,U.y-=ge,U.updateCenter()):(!gt||H.pushable||Pe)&&(H.x+=le,H.y+=ge,H.updateCenter()),xe.x=void 0,xe.y=void 0;return xe},intersects:function(U,H){return U===H?!1:!U.isCircle&&!H.isCircle?!(U.right<=H.left||U.bottom<=H.top||U.left>=H.right||U.top>=H.bottom):U.isCircle?H.isCircle?f(U.center,H.center)<=U.halfWidth+H.halfWidth:this.circleBodyIntersects(U,H):this.circleBodyIntersects(H,U)},circleBodyIntersects:function(U,H){var $=h(U.center.x,H.left,H.right),_=h(U.center.y,H.top,H.bottom),q=(U.center.x-$)*(U.center.x-$),at=(U.center.y-_)*(U.center.y-_);return q+at<=U.halfWidth*U.halfWidth},overlap:function(U,H,$,_,q){return $===void 0&&($=null),_===void 0&&(_=null),q===void 0&&(q=$),this.collideObjects(U,H,$,_,q,!0)},collide:function(U,H,$,_,q){return $===void 0&&($=null),_===void 0&&(_=null),q===void 0&&(q=$),this.collideObjects(U,H,$,_,q,!1)},collideObjects:function(U,H,$,_,q,at){var ot,rt;U.isParent&&(U.physicsType===void 0||H===void 0||U===H)&&(U=U.children.entries),H&&H.isParent&&H.physicsType===void 0&&(H=H.children.entries);var gt=Array.isArray(U),yt=Array.isArray(H);if(this._total=0,!gt&&!yt)this.collideHandler(U,H,$,_,q,at);else if(!gt&&yt)for(ot=0;ot0},collideHandler:function(U,H,$,_,q,at){if(H===void 0&&U.isParent)return this.collideGroupVsGroup(U,U,$,_,q,at);if(!U||!H)return!1;if(U.body||U.isBody){if(H.body||H.isBody)return this.collideSpriteVsSprite(U,H,$,_,q,at);if(H.isParent)return this.collideSpriteVsGroup(U,H,$,_,q,at);if(H.isTilemap)return this.collideSpriteVsTilemapLayer(U,H,$,_,q,at)}else if(U.isParent){if(H.body||H.isBody)return this.collideSpriteVsGroup(H,U,$,_,q,at);if(H.isParent)return this.collideGroupVsGroup(U,H,$,_,q,at);if(H.isTilemap)return this.collideGroupVsTilemapLayer(U,H,$,_,q,at)}else if(U.isTilemap){if(H.body||H.isBody)return this.collideSpriteVsTilemapLayer(H,U,$,_,q,at);if(H.isParent)return this.collideGroupVsTilemapLayer(H,U,$,_,q,at)}},canCollide:function(U,H){return U&&H&&(U.collisionMask&H.collisionCategory)!==0&&(H.collisionMask&U.collisionCategory)!==0},collideSpriteVsSprite:function(U,H,$,_,q,at){var ot=U.isBody?U:U.body,rt=H.isBody?H:H.body;return this.canCollide(ot,rt)?(this.separate(ot,rt,_,q,at)&&($&&$.call(q,U,H),this._total++),!0):!1},collideSpriteVsGroup:function(U,H,$,_,q,at){var ot=U.isBody?U:U.body;if(!(H.length===0||!ot||!ot.enable||ot.checkCollision.none||!this.canCollide(ot,H))){var rt,gt,yt;if(this.useTree||H.physicsType===n.STATIC_BODY){var Et=this.treeMinMax;Et.minX=ot.left,Et.minY=ot.top,Et.maxX=ot.right,Et.maxY=ot.bottom;var At=H.physicsType===n.DYNAMIC_BODY?this.tree.search(Et):this.staticTree.search(Et);for(gt=At.length,rt=0;rt{/** + */var r=e(55495),d=e(37742),h=e(45319),a=e(83419),l=e(79342),n=e(37747),u=e(20339),f=e(52816),o=e(50792),c=e(63012),p=e(43855),v=e(5470),m=e(94977),S=e(64897),M=e(45170),w=e(96523),C=e(35154),A=e(36383),P=e(25774),b=e(96602),O=e(87841),I=e(59542),D=e(40012),B=e(14087),G=e(89936),z=e(35072),X=e(72624),j=e(2483),Q=e(61340),tt=e(26099),Y=e(15994),$=new a({Extends:o,initialize:function(H,Z){o.call(this),this.scene=H,this.bodies=new z,this.staticBodies=new z,this.pendingDestroy=new z,this.colliders=new P,this.gravity=new tt(C(Z,"gravity.x",0),C(Z,"gravity.y",0)),this.bounds=new O(C(Z,"x",0),C(Z,"y",0),C(Z,"width",H.sys.scale.width),C(Z,"height",H.sys.scale.height)),this.checkCollision={up:C(Z,"checkCollision.up",!0),down:C(Z,"checkCollision.down",!0),left:C(Z,"checkCollision.left",!0),right:C(Z,"checkCollision.right",!0)},this.fps=C(Z,"fps",60),this.fixedStep=C(Z,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=C(Z,"timeScale",1),this.OVERLAP_BIAS=C(Z,"overlapBias",4),this.TILE_BIAS=C(Z,"tileBias",16),this.forceX=C(Z,"forceX",!1),this.isPaused=C(Z,"isPaused",!1),this._total=0,this.drawDebug=C(Z,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:C(Z,"debugShowBody",!0),debugShowStaticBody:C(Z,"debugShowStaticBody",!0),debugShowVelocity:C(Z,"debugShowVelocity",!0),bodyDebugColor:C(Z,"debugBodyColor",16711935),staticBodyDebugColor:C(Z,"debugStaticBodyColor",255),velocityDebugColor:C(Z,"debugVelocityColor",65280)},this.maxEntries=C(Z,"maxEntries",16),this.useTree=C(Z,"useTree",!0),this.tree=new I(this.maxEntries),this.staticTree=new I(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new Q,this._tempMatrix2=new Q,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(U,H){H===void 0&&(H=n.DYNAMIC_BODY),Array.isArray(U)||(U=[U]);for(var Z=0;Z=q;for(this.fixedStep||(_=H*.001,rt=!0,this._elapsed=0),Z=0;Z=q;)this._elapsed-=q,this.step(_)}},step:function(U){var H,Z,_=this.bodies.entries,q=_.length;for(H=0;H0){var gt=this.tree,yt=this.staticTree;for(Z=rt.entries,_=Z.length,U=0;U<_;U++)H=Z[U],H.physicsType===n.DYNAMIC_BODY?(gt.remove(H),q.delete(H)):H.physicsType===n.STATIC_BODY&&(yt.remove(H),at.delete(H)),H.world=void 0,H.gameObject=void 0;rt.clear()}},updateMotion:function(U,H){U.allowRotation&&this.computeAngularVelocity(U,H),this.computeVelocity(U,H)},computeAngularVelocity:function(U,H){var Z=U.angularVelocity,_=U.angularAcceleration,q=U.angularDrag,at=U.maxAngular;_?Z+=_*H:U.allowDrag&&q&&(q*=H,v(Z-q,0,.1)?Z-=q:m(Z+q,0,.1)?Z+=q:Z=0),Z=h(Z,-at,at);var ot=Z-U.angularVelocity;U.angularVelocity+=ot,U.rotation+=U.angularVelocity*H},computeVelocity:function(U,H){var Z=U.velocity.x,_=U.acceleration.x,q=U.drag.x,at=U.maxVelocity.x,ot=U.velocity.y,rt=U.acceleration.y,gt=U.drag.y,yt=U.maxVelocity.y,Et=U.speed,At=U.maxSpeed,Pt=U.allowDrag,Vt=U.useDamping;U.allowGravity&&(Z+=(this.gravity.x+U.gravity.x)*H,ot+=(this.gravity.y+U.gravity.y)*H),_?Z+=_*H:Pt&&q&&(Vt?(q=Math.pow(q,H),Z*=q,Et=Math.sqrt(Z*Z+ot*ot),p(Et,0,.001)&&(Z=0)):(q*=H,v(Z-q,0,.01)?Z-=q:m(Z+q,0,.01)?Z+=q:Z=0)),rt?ot+=rt*H:Pt&>&&(Vt?(gt=Math.pow(gt,H),ot*=gt,Et=Math.sqrt(Z*Z+ot*ot),p(Et,0,.001)&&(ot=0)):(gt*=H,v(ot-gt,0,.01)?ot-=gt:m(ot+gt,0,.01)?ot+=gt:ot=0)),Z=h(Z,-at,at),ot=h(ot,-yt,yt),U.velocity.set(Z,ot),At>-1&&U.velocity.length()>At&&(U.velocity.normalize().scale(At),Et=At),U.speed=Et},separate:function(U,H,Z,_,q){var at,ot,rt=!1,gt=!0;if(!U.enable||!H.enable||U.checkCollision.none||H.checkCollision.none||!this.intersects(U,H)||Z&&Z.call(_,U.gameObject,H.gameObject)===!1)return rt;if(U.isCircle||H.isCircle){var yt=this.separateCircle(U,H,q);yt.result?(rt=!0,gt=!1):(at=yt.x,ot=yt.y,gt=!0)}if(gt){var Et=!1,At=!1,Pt=this.OVERLAP_BIAS;q?(Et=B(U,H,q,Pt,at),At=G(U,H,q,Pt,ot)):this.forceX||Math.abs(this.gravity.y+U.gravity.y)Ht&&(At=u(Vt,dt,Ht,Dt)-ut):dt>Bt&&(VtHt&&(At=u(Vt,dt,Ht,Bt)-ut)),At*=-1}else At=U.halfWidth+H.halfWidth-f(at,ot);U.overlapR=At,H.overlapR=At;var re=r(at,ot),le=(At+A.EPSILON)*Math.cos(re),ge=(At+A.EPSILON)*Math.sin(re),xe={overlap:At,result:!1,x:le,y:ge};if(Z&&(!Pt||Pt&&At!==0))return xe.result=!0,xe;if(!Pt&&At===0||rt&>||U.customSeparateX||H.customSeparateX)return xe.x=void 0,xe.y=void 0,xe;var Pe=!U.pushable&&!H.pushable;if(Pt){var te=at.x-ot.x,Ve=at.y-ot.y,De=Math.sqrt(Math.pow(te,2)+Math.pow(Ve,2)),Ue=(ot.x-at.x)/De||0,Le=(ot.y-at.y)/De||0,ne=2*(yt.x*Ue+yt.y*Le-Et.x*Ue-Et.y*Le)/(U.mass+H.mass);(rt||gt)&&(ne*=2),rt||(yt.x=yt.x-ne/U.mass*Ue,yt.y=yt.y-ne/U.mass*Le,yt.multiply(U.bounce)),gt||(Et.x=Et.x+ne/H.mass*Ue,Et.y=Et.y+ne/H.mass*Le,Et.multiply(H.bounce)),!rt&&!gt&&(le*=.5,ge*=.5),rt||(U.x-=le,U.y-=ge,U.updateCenter()),gt||(H.x+=le,H.y+=ge,H.updateCenter()),xe.result=!0}else!rt||U.pushable||Pe?(U.x-=le,U.y-=ge,U.updateCenter()):(!gt||H.pushable||Pe)&&(H.x+=le,H.y+=ge,H.updateCenter()),xe.x=void 0,xe.y=void 0;return xe},intersects:function(U,H){return U===H?!1:!U.isCircle&&!H.isCircle?!(U.right<=H.left||U.bottom<=H.top||U.left>=H.right||U.top>=H.bottom):U.isCircle?H.isCircle?f(U.center,H.center)<=U.halfWidth+H.halfWidth:this.circleBodyIntersects(U,H):this.circleBodyIntersects(H,U)},circleBodyIntersects:function(U,H){var Z=h(U.center.x,H.left,H.right),_=h(U.center.y,H.top,H.bottom),q=(U.center.x-Z)*(U.center.x-Z),at=(U.center.y-_)*(U.center.y-_);return q+at<=U.halfWidth*U.halfWidth},overlap:function(U,H,Z,_,q){return Z===void 0&&(Z=null),_===void 0&&(_=null),q===void 0&&(q=Z),this.collideObjects(U,H,Z,_,q,!0)},collide:function(U,H,Z,_,q){return Z===void 0&&(Z=null),_===void 0&&(_=null),q===void 0&&(q=Z),this.collideObjects(U,H,Z,_,q,!1)},collideObjects:function(U,H,Z,_,q,at){var ot,rt;U.isParent&&(U.physicsType===void 0||H===void 0||U===H)&&(U=U.children.entries),H&&H.isParent&&H.physicsType===void 0&&(H=H.children.entries);var gt=Array.isArray(U),yt=Array.isArray(H);if(this._total=0,!gt&&!yt)this.collideHandler(U,H,Z,_,q,at);else if(!gt&&yt)for(ot=0;ot0},collideHandler:function(U,H,Z,_,q,at){if(H===void 0&&U.isParent)return this.collideGroupVsGroup(U,U,Z,_,q,at);if(!U||!H)return!1;if(U.body||U.isBody){if(H.body||H.isBody)return this.collideSpriteVsSprite(U,H,Z,_,q,at);if(H.isParent)return this.collideSpriteVsGroup(U,H,Z,_,q,at);if(H.isTilemap)return this.collideSpriteVsTilemapLayer(U,H,Z,_,q,at)}else if(U.isParent){if(H.body||H.isBody)return this.collideSpriteVsGroup(H,U,Z,_,q,at);if(H.isParent)return this.collideGroupVsGroup(U,H,Z,_,q,at);if(H.isTilemap)return this.collideGroupVsTilemapLayer(U,H,Z,_,q,at)}else if(U.isTilemap){if(H.body||H.isBody)return this.collideSpriteVsTilemapLayer(H,U,Z,_,q,at);if(H.isParent)return this.collideGroupVsTilemapLayer(H,U,Z,_,q,at)}},canCollide:function(U,H){return U&&H&&(U.collisionMask&H.collisionCategory)!==0&&(H.collisionMask&U.collisionCategory)!==0},collideSpriteVsSprite:function(U,H,Z,_,q,at){var ot=U.isBody?U:U.body,rt=H.isBody?H:H.body;return this.canCollide(ot,rt)?(this.separate(ot,rt,_,q,at)&&(Z&&Z.call(q,U,H),this._total++),!0):!1},collideSpriteVsGroup:function(U,H,Z,_,q,at){var ot=U.isBody?U:U.body;if(!(H.length===0||!ot||!ot.enable||ot.checkCollision.none||!this.canCollide(ot,H))){var rt,gt,yt;if(this.useTree||H.physicsType===n.STATIC_BODY){var Et=this.treeMinMax;Et.minX=ot.left,Et.minY=ot.top,Et.maxX=ot.right,Et.maxY=ot.bottom;var At=H.physicsType===n.DYNAMIC_BODY?this.tree.search(Et):this.staticTree.search(Et);for(gt=At.length,rt=0;rt{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setAcceleration:function(e,r){return this.body.acceleration.set(e,r),this},setAccelerationX:function(e){return this.body.acceleration.x=e,this},setAccelerationY:function(e){return this.body.acceleration.y=e,this}};s.exports=y},59023:s=>{/** + */var x={setAcceleration:function(e,r){return this.body.acceleration.set(e,r),this},setAccelerationX:function(e){return this.body.acceleration.x=e,this},setAccelerationY:function(e){return this.body.acceleration.y=e,this}};s.exports=x},59023:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setAngularVelocity:function(e){return this.body.angularVelocity=e,this},setAngularAcceleration:function(e){return this.body.angularAcceleration=e,this},setAngularDrag:function(e){return this.body.angularDrag=e,this}};s.exports=y},62069:s=>{/** + */var x={setAngularVelocity:function(e){return this.body.angularVelocity=e,this},setAngularAcceleration:function(e){return this.body.angularAcceleration=e,this},setAngularDrag:function(e){return this.body.angularDrag=e,this}};s.exports=x},62069:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setBounce:function(e,r){return this.body.bounce.set(e,r),this},setBounceX:function(e){return this.body.bounce.x=e,this},setBounceY:function(e){return this.body.bounce.y=e,this},setCollideWorldBounds:function(e,r,d,h){return this.body.setCollideWorldBounds(e,r,d,h),this}};s.exports=y},78389:(s,y,e)=>{/** + */var x={setBounce:function(e,r){return this.body.bounce.set(e,r),this},setBounceX:function(e){return this.body.bounce.x=e,this},setBounceY:function(e){return this.body.bounce.y=e,this},setCollideWorldBounds:function(e,r,d,h){return this.body.setCollideWorldBounds(e,r,d,h),this}};s.exports=x},78389:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4297,43 +4297,43 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setDebug:function(e,r,d){return this.debugShowBody=e,this.debugShowVelocity=r,this.debugBodyColor=d,this},setDebugBodyColor:function(e){return this.body.debugBodyColor=e,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(e){this.body.debugShowBody=e}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(e){this.body.debugShowVelocity=e}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(e){this.body.debugBodyColor=e}}};s.exports=y},52819:s=>{/** + */var x={setDebug:function(e,r,d){return this.debugShowBody=e,this.debugShowVelocity=r,this.debugBodyColor=d,this},setDebugBodyColor:function(e){return this.body.debugBodyColor=e,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(e){this.body.debugShowBody=e}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(e){this.body.debugShowVelocity=e}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(e){this.body.debugBodyColor=e}}};s.exports=x},52819:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setDrag:function(e,r){return this.body.drag.set(e,r),this},setDragX:function(e){return this.body.drag.x=e,this},setDragY:function(e){return this.body.drag.y=e,this},setDamping:function(e){return this.body.useDamping=e,this}};s.exports=y},4074:s=>{/** + */var x={setDrag:function(e,r){return this.body.drag.set(e,r),this},setDragX:function(e){return this.body.drag.x=e,this},setDragY:function(e){return this.body.drag.y=e,this},setDamping:function(e){return this.body.useDamping=e,this}};s.exports=x},4074:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setDirectControl:function(e){return this.body.setDirectControl(e),this},enableBody:function(e,r,d,h,a){return e&&this.body.reset(r,d),h&&(this.body.gameObject.active=!0),a&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(e,r){return e===void 0&&(e=!1),r===void 0&&(r=!1),this.body.stop(),this.body.enable=!1,e&&(this.body.gameObject.active=!1),r&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};s.exports=y},40831:s=>{/** + */var x={setDirectControl:function(e){return this.body.setDirectControl(e),this},enableBody:function(e,r,d,h,a){return e&&this.body.reset(r,d),h&&(this.body.gameObject.active=!0),a&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(e,r){return e===void 0&&(e=!1),r===void 0&&(r=!1),this.body.stop(),this.body.enable=!1,e&&(this.body.gameObject.active=!1),r&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};s.exports=x},40831:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setFriction:function(e,r){return this.body.friction.set(e,r),this},setFrictionX:function(e){return this.body.friction.x=e,this},setFrictionY:function(e){return this.body.friction.y=e,this}};s.exports=y},26775:s=>{/** + */var x={setFriction:function(e,r){return this.body.friction.set(e,r),this},setFrictionX:function(e){return this.body.friction.x=e,this},setFrictionY:function(e){return this.body.friction.y=e,this}};s.exports=x},26775:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setGravity:function(e,r){return this.body.gravity.set(e,r),this},setGravityX:function(e){return this.body.gravity.x=e,this},setGravityY:function(e){return this.body.gravity.y=e,this}};s.exports=y},9437:s=>{/** + */var x={setGravity:function(e,r){return this.body.gravity.set(e,r),this},setGravityX:function(e){return this.body.gravity.x=e,this},setGravityY:function(e){return this.body.gravity.y=e,this}};s.exports=x},9437:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setImmovable:function(e){return e===void 0&&(e=!0),this.body.immovable=e,this}};s.exports=y},30621:s=>{/** + */var x={setImmovable:function(e){return e===void 0&&(e=!0),this.body.immovable=e,this}};s.exports=x},30621:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setMass:function(e){return this.body.mass=e,this}};s.exports=y},72441:(s,y,e)=>{var r=e(47956),d=e(96503),h=e(2044),a=e(81491),l=function(n,u,f,o,c,p){var v=r(n,u-o,f-o,2*o,2*o,c,p);if(v.length===0)return v;for(var m=new d(u,f,o),S=new d,M=[],w=0;w{var y=function(e,r,d,h,a,l,n){l===void 0&&(l=!0),n===void 0&&(n=!1);var u=[],f=[],o=e.treeMinMax;if(o.minX=r,o.minY=d,o.maxX=r+h,o.maxY=d+a,n&&(f=e.staticTree.search(o)),l&&e.useTree)u=e.tree.search(o);else if(l){var c=e.bodies,p={position:{x:r,y:d},left:r,top:d,right:r+h,bottom:d+a,isCircle:!1},v=e.intersects;c.iterate(function(m){v(m,p)&&u.push(m)})}return f.concat(u)};s.exports=y},62121:s=>{/** + */var x={setMass:function(e){return this.body.mass=e,this}};s.exports=x},72441:(s,x,e)=>{var r=e(47956),d=e(96503),h=e(2044),a=e(81491),l=function(n,u,f,o,c,p){var v=r(n,u-o,f-o,2*o,2*o,c,p);if(v.length===0)return v;for(var m=new d(u,f,o),S=new d,M=[],w=0;w{var x=function(e,r,d,h,a,l,n){l===void 0&&(l=!0),n===void 0&&(n=!1);var u=[],f=[],o=e.treeMinMax;if(o.minX=r,o.minY=d,o.maxX=r+h,o.maxY=d+a,n&&(f=e.staticTree.search(o)),l&&e.useTree)u=e.tree.search(o);else if(l){var c=e.bodies,p={position:{x:r,y:d},left:r,top:d,right:r+h,bottom:d+a,isCircle:!1},v=e.intersects;c.iterate(function(m){v(m,p)&&u.push(m)})}return f.concat(u)};s.exports=x},62121:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setPushable:function(e){return e===void 0&&(e=!0),this.body.pushable=e,this}};s.exports=y},29384:s=>{/** + */var x={setPushable:function(e){return e===void 0&&(e=!0),this.body.pushable=e,this}};s.exports=x},29384:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setOffset:function(e,r){return this.body.setOffset(e,r),this},setSize:function(e,r,d){return this.body.setSize(e,r,d),this},setBodySize:function(e,r,d){return this.body.setSize(e,r,d),this},setCircle:function(e,r,d){return this.body.setCircle(e,r,d),this}};s.exports=y},15098:s=>{/** + */var x={setOffset:function(e,r){return this.body.setOffset(e,r),this},setSize:function(e,r,d){return this.body.setSize(e,r,d),this},setBodySize:function(e,r,d){return this.body.setSize(e,r,d),this},setCircle:function(e,r,d){return this.body.setCircle(e,r,d),this}};s.exports=x},15098:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setVelocity:function(e,r){return this.body.setVelocity(e,r),this},setVelocityX:function(e){return this.body.setVelocityX(e),this},setVelocityY:function(e){return this.body.setVelocityY(e),this},setMaxVelocity:function(e,r){return this.body.maxVelocity.set(e,r),this}};s.exports=y},92209:(s,y,e)=>{/** + */var x={setVelocity:function(e,r){return this.body.setVelocity(e,r),this},setVelocityX:function(e){return this.body.setVelocityX(e),this},setVelocityY:function(e){return this.body.setVelocityY(e),this},setMaxVelocity:function(e,r){return this.body.maxVelocity.set(e,r),this}};s.exports=x},92209:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4341,7 +4341,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14};s.exports=y},20009:s=>{/** + */var x={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14};s.exports=x},20009:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4373,11 +4373,11 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="worldstep"},63012:(s,y,e)=>{/** + */s.exports="worldstep"},63012:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={COLLIDE:e(20009),OVERLAP:e(36768),PAUSE:e(60473),RESUME:e(89954),TILE_COLLIDE:e(61804),TILE_OVERLAP:e(7161),WORLD_BOUNDS:e(34689),WORLD_STEP:e(16006)}},27064:(s,y,e)=>{/** + */s.exports={COLLIDE:e(20009),OVERLAP:e(36768),PAUSE:e(60473),RESUME:e(89954),TILE_COLLIDE:e(61804),TILE_OVERLAP:e(7161),WORLD_BOUNDS:e(34689),WORLD_STEP:e(16006)}},27064:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4385,23 +4385,23 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.collisionCallback?!e.collisionCallback.call(e.collisionCallbackContext,r,e):e.layer.callbacks[e.index]?!e.layer.callbacks[e.index].callback.call(e.layer.callbacks[e.index].callbackContext,r,e):!0};s.exports=y},36294:s=>{/** + */var x=function(e,r){return e.collisionCallback?!e.collisionCallback.call(e.collisionCallbackContext,r,e):e.layer.callbacks[e.index]?!e.layer.callbacks[e.index].callback.call(e.layer.callbacks[e.index].callbackContext,r,e):!0};s.exports=x},36294:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){r<0?(e.blocked.none=!1,e.blocked.left=!0):r>0&&(e.blocked.none=!1,e.blocked.right=!0),e.position.x-=r,e.updateCenter(),e.bounce.x===0?e.velocity.x=0:e.velocity.x=-e.velocity.x*e.bounce.x};s.exports=y},67013:s=>{/** + */var x=function(e,r){r<0?(e.blocked.none=!1,e.blocked.left=!0):r>0&&(e.blocked.none=!1,e.blocked.right=!0),e.position.x-=r,e.updateCenter(),e.bounce.x===0?e.velocity.x=0:e.velocity.x=-e.velocity.x*e.bounce.x};s.exports=x},67013:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){r<0?(e.blocked.none=!1,e.blocked.up=!0):r>0&&(e.blocked.none=!1,e.blocked.down=!0),e.position.y-=r,e.updateCenter(),e.bounce.y===0?e.velocity.y=0:e.velocity.y=-e.velocity.y*e.bounce.y};s.exports=y},40012:(s,y,e)=>{/** + */var x=function(e,r){r<0?(e.blocked.none=!1,e.blocked.up=!0):r>0&&(e.blocked.none=!1,e.blocked.down=!0),e.position.y-=r,e.updateCenter(),e.bounce.y===0?e.velocity.y=0:e.velocity.y=-e.velocity.y*e.bounce.y};s.exports=x},40012:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(21329),d=e(53442),h=e(2483),a=function(l,n,u,f,o,c,p){var v=f.left,m=f.top,S=f.right,M=f.bottom,w=u.faceLeft||u.faceRight,C=u.faceTop||u.faceBottom;if(p||(w=!0,C=!0),!w&&!C)return!1;var A=0,P=0,b=0,O=1;if(n.deltaAbsX()>n.deltaAbsY()?b=-1:n.deltaAbsX(){/** + */var r=e(21329),d=e(53442),h=e(2483),a=function(l,n,u,f,o,c,p){var v=f.left,m=f.top,S=f.right,M=f.bottom,w=u.faceLeft||u.faceRight,C=u.faceTop||u.faceBottom;if(p||(w=!0,C=!0),!w&&!C)return!1;var A=0,P=0,b=0,O=1;if(n.deltaAbsX()>n.deltaAbsY()?b=-1:n.deltaAbsX(){/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(36294),d=function(h,a,l,n,u,f){var o=0,c=a.faceLeft,p=a.faceRight,v=a.collideLeft,m=a.collideRight;return f||(c=!0,p=!0,v=!0,m=!0),h.deltaX()<0&&m&&h.checkCollision.left?p&&h.x0&&v&&h.checkCollision.right&&c&&h.right>l&&(o=h.right-l,o>u&&(o=0)),o!==0&&(h.customSeparateX?h.overlapX=o:r(h,o)),o};s.exports=d},53442:(s,y,e)=>{/** + */var r=e(36294),d=function(h,a,l,n,u,f){var o=0,c=a.faceLeft,p=a.faceRight,v=a.collideLeft,m=a.collideRight;return f||(c=!0,p=!0,v=!0,m=!0),h.deltaX()<0&&m&&h.checkCollision.left?p&&h.x0&&v&&h.checkCollision.right&&c&&h.right>l&&(o=h.right-l,o>u&&(o=0)),o!==0&&(h.customSeparateX?h.overlapX=o:r(h,o)),o};s.exports=d},53442:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4409,73 +4409,73 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return!(r.right<=e.left||r.bottom<=e.top||r.position.x>=e.right||r.position.y>=e.bottom)};s.exports=y},55173:(s,y,e)=>{/** + */var x=function(e,r){return!(r.right<=e.left||r.bottom<=e.top||r.position.x>=e.right||r.position.y>=e.bottom)};s.exports=x},55173:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r={ProcessTileCallbacks:e(96602),ProcessTileSeparationX:e(36294),ProcessTileSeparationY:e(67013),SeparateTile:e(40012),TileCheckX:e(21329),TileCheckY:e(53442),TileIntersectsBody:e(2483)};s.exports=r},44563:(s,y,e)=>{/** + */var r={ProcessTileCallbacks:e(96602),ProcessTileSeparationX:e(36294),ProcessTileSeparationY:e(67013),SeparateTile:e(40012),TileCheckX:e(21329),TileCheckY:e(53442),TileIntersectsBody:e(2483)};s.exports=r},44563:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Arcade:e(27064),Matter:e(3875)}},68174:(s,y,e)=>{/** + */s.exports={Arcade:e(27064),Matter:e(3875)}},68174:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(26099),h=new r({initialize:function(){this.boundsCenter=new d,this.centerDiff=new d},parseBody:function(a){if(a=a.hasOwnProperty("body")?a.body:a,!a.hasOwnProperty("bounds")||!a.hasOwnProperty("centerOfMass"))return!1;var l=this.boundsCenter,n=this.centerDiff,u=a.bounds.max.x-a.bounds.min.x,f=a.bounds.max.y-a.bounds.min.y,o=u*a.centerOfMass.x,c=f*a.centerOfMass.y;return l.set(u/2,f/2),n.set(o-l.x,c-l.y),!0},getTopLeft:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l+u.x+f.x,n+u.y+f.y)}return!1},getTopCenter:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l+f.x,n+u.y+f.y)}return!1},getTopRight:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l-(u.x-f.x),n+u.y+f.y)}return!1},getLeftCenter:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l+u.x+f.x,n+f.y)}return!1},getCenter:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.centerDiff;return new d(l+u.x,n+u.y)}return!1},getRightCenter:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l-(u.x-f.x),n+f.y)}return!1},getBottomLeft:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l+u.x+f.x,n-(u.y-f.y))}return!1},getBottomCenter:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l+f.x,n-(u.y-f.y))}return!1},getBottomRight:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l-(u.x-f.x),n-(u.y-f.y))}return!1}});s.exports=h},19933:(s,y,e)=>{/** + */var r=e(83419),d=e(26099),h=new r({initialize:function(){this.boundsCenter=new d,this.centerDiff=new d},parseBody:function(a){if(a=a.hasOwnProperty("body")?a.body:a,!a.hasOwnProperty("bounds")||!a.hasOwnProperty("centerOfMass"))return!1;var l=this.boundsCenter,n=this.centerDiff,u=a.bounds.max.x-a.bounds.min.x,f=a.bounds.max.y-a.bounds.min.y,o=u*a.centerOfMass.x,c=f*a.centerOfMass.y;return l.set(u/2,f/2),n.set(o-l.x,c-l.y),!0},getTopLeft:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l+u.x+f.x,n+u.y+f.y)}return!1},getTopCenter:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l+f.x,n+u.y+f.y)}return!1},getTopRight:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l-(u.x-f.x),n+u.y+f.y)}return!1},getLeftCenter:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l+u.x+f.x,n+f.y)}return!1},getCenter:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.centerDiff;return new d(l+u.x,n+u.y)}return!1},getRightCenter:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l-(u.x-f.x),n+f.y)}return!1},getBottomLeft:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l+u.x+f.x,n-(u.y-f.y))}return!1},getBottomCenter:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l+f.x,n-(u.y-f.y))}return!1},getBottomRight:function(a,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(a)){var u=this.boundsCenter,f=this.centerDiff;return new d(l-(u.x-f.x),n-(u.y-f.y))}return!1}});s.exports=h},19933:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(6790);r.Body=e(22562),r.Composite=e(69351),r.World=e(4372),r.Collision=e(52284),r.Detector=e(81388),r.Pairs=e(99561),r.Pair=e(4506),r.Query=e(73296),r.Resolver=e(66272),r.Constraint=e(48140),r.Common=e(53402),r.Engine=e(48413),r.Events=e(35810),r.Sleeping=e(53614),r.Plugin=e(73832),r.Bodies=e(66280),r.Composites=e(74116),r.Axes=e(66615),r.Bounds=e(15647),r.Svg=e(74058),r.Vector=e(31725),r.Vertices=e(41598),r.World.add=r.Composite.add,r.World.remove=r.Composite.remove,r.World.addComposite=r.Composite.addComposite,r.World.addBody=r.Composite.addBody,r.World.addConstraint=r.Composite.addConstraint,r.World.clear=r.Composite.clear,s.exports=r},28137:(s,y,e)=>{/** + */var r=e(6790);r.Body=e(22562),r.Composite=e(69351),r.World=e(4372),r.Collision=e(52284),r.Detector=e(81388),r.Pairs=e(99561),r.Pair=e(4506),r.Query=e(73296),r.Resolver=e(66272),r.Constraint=e(48140),r.Common=e(53402),r.Engine=e(48413),r.Events=e(35810),r.Sleeping=e(53614),r.Plugin=e(73832),r.Bodies=e(66280),r.Composites=e(74116),r.Axes=e(66615),r.Bounds=e(15647),r.Svg=e(74058),r.Vector=e(31725),r.Vertices=e(41598),r.World.add=r.Composite.add,r.World.remove=r.Composite.remove,r.World.addComposite=r.Composite.addComposite,r.World.addBody=r.Composite.addBody,r.World.addConstraint=r.Composite.addConstraint,r.World.clear=r.Composite.clear,s.exports=r},28137:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(66280),d=e(83419),h=e(74116),a=e(48140),l=e(74058),n=e(75803),u=e(23181),f=e(34803),o=e(73834),c=e(19496),p=e(85791),v=e(98713),m=e(41598),S=new d({initialize:function(w){this.world=w,this.scene=w.scene,this.sys=w.scene.sys},rectangle:function(M,w,C,A,P){var b=r.rectangle(M,w,C,A,P);return this.world.add(b),b},trapezoid:function(M,w,C,A,P,b){var O=r.trapezoid(M,w,C,A,P,b);return this.world.add(O),O},circle:function(M,w,C,A,P){var b=r.circle(M,w,C,A,P);return this.world.add(b),b},polygon:function(M,w,C,A,P){var b=r.polygon(M,w,C,A,P);return this.world.add(b),b},fromVertices:function(M,w,C,A,P,b,O){typeof C=="string"&&(C=m.fromPath(C));var I=r.fromVertices(M,w,C,A,P,b,O);return this.world.add(I),I},fromPhysicsEditor:function(M,w,C,A,P){P===void 0&&(P=!0);var b=c.parseBody(M,w,C,A);return P&&!this.world.has(b)&&this.world.add(b),b},fromSVG:function(M,w,C,A,P,b){A===void 0&&(A=1),P===void 0&&(P={}),b===void 0&&(b=!0);for(var O=C.getElementsByTagName("path"),I=[],D=0;D{/** + */var r=e(66280),d=e(83419),h=e(74116),a=e(48140),l=e(74058),n=e(75803),u=e(23181),f=e(34803),o=e(73834),c=e(19496),p=e(85791),v=e(98713),m=e(41598),S=new d({initialize:function(w){this.world=w,this.scene=w.scene,this.sys=w.scene.sys},rectangle:function(M,w,C,A,P){var b=r.rectangle(M,w,C,A,P);return this.world.add(b),b},trapezoid:function(M,w,C,A,P,b){var O=r.trapezoid(M,w,C,A,P,b);return this.world.add(O),O},circle:function(M,w,C,A,P){var b=r.circle(M,w,C,A,P);return this.world.add(b),b},polygon:function(M,w,C,A,P){var b=r.polygon(M,w,C,A,P);return this.world.add(b),b},fromVertices:function(M,w,C,A,P,b,O){typeof C=="string"&&(C=m.fromPath(C));var I=r.fromVertices(M,w,C,A,P,b,O);return this.world.add(I),I},fromPhysicsEditor:function(M,w,C,A,P){P===void 0&&(P=!0);var b=c.parseBody(M,w,C,A);return P&&!this.world.has(b)&&this.world.add(b),b},fromSVG:function(M,w,C,A,P,b){A===void 0&&(A=1),P===void 0&&(P={}),b===void 0&&(b=!0);for(var O=C.getElementsByTagName("path"),I=[],D=0;D{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(31884),d=e(95540),h=e(26099);function a(n){return!!n.get&&typeof n.get=="function"||!!n.set&&typeof n.set=="function"}var l=function(n,u,f,o){f===void 0&&(f={}),o===void 0&&(o=!0);var c=u.x,p=u.y;u.body={temp:!0,position:{x:c,y:p}};var v=[r.Bounce,r.Collision,r.Force,r.Friction,r.Gravity,r.Mass,r.Sensor,r.SetBody,r.Sleep,r.Static,r.Transform,r.Velocity];if(v.forEach(function(S){for(var M in S)a(S[M])?Object.defineProperty(u,M,{get:S[M].get,set:S[M].set}):Object.defineProperty(u,M,{value:S[M]})}),u.world=n,u._tempVec2=new h(c,p),f.hasOwnProperty("type")&&f.type==="body")u.setExistingBody(f,o);else{var m=d(f,"shape",null);m||(m="rectangle"),f.addToWorld=o,u.setBody(m,f)}return u};s.exports=l},23181:(s,y,e)=>{/** + */var r=e(31884),d=e(95540),h=e(26099);function a(n){return!!n.get&&typeof n.get=="function"||!!n.set&&typeof n.set=="function"}var l=function(n,u,f,o){f===void 0&&(f={}),o===void 0&&(o=!0);var c=u.x,p=u.y;u.body={temp:!0,position:{x:c,y:p}};var v=[r.Bounce,r.Collision,r.Force,r.Friction,r.Gravity,r.Mass,r.Sensor,r.SetBody,r.Sleep,r.Static,r.Transform,r.Velocity];if(v.forEach(function(S){for(var M in S)a(S[M])?Object.defineProperty(u,M,{get:S[M].get,set:S[M].set}):Object.defineProperty(u,M,{value:S[M]})}),u.world=n,u._tempVec2=new h(c,p),f.hasOwnProperty("type")&&f.type==="body")u.setExistingBody(f,o);else{var m=d(f,"shape",null);m||(m="rectangle"),f.addToWorld=o,u.setBody(m,f)}return u};s.exports=l},23181:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(31884),h=e(95643),a=e(95540),l=e(88571),n=e(72699),u=e(26099),f=new r({Extends:l,Mixins:[d.Bounce,d.Collision,d.Force,d.Friction,d.Gravity,d.Mass,d.Sensor,d.SetBody,d.Sleep,d.Static,d.Transform,d.Velocity,n],initialize:function(c,p,v,m,S,M){h.call(this,c.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(m,S),this.setSizeToFrame(),this.setOrigin(),this.world=c,this._tempVec2=new u(p,v);var w=a(M,"shape",null);w?this.setBody(w,M):this.setRectangle(this.width,this.height,M),this.setPosition(p,v),this.initPipeline(),this.initPostPipeline(!0)}});s.exports=f},42045:(s,y,e)=>{/** + */var r=e(83419),d=e(31884),h=e(95643),a=e(95540),l=e(88571),n=e(72699),u=e(26099),f=new r({Extends:l,Mixins:[d.Bounce,d.Collision,d.Force,d.Friction,d.Gravity,d.Mass,d.Sensor,d.SetBody,d.Sleep,d.Static,d.Transform,d.Velocity,n],initialize:function(c,p,v,m,S,M){h.call(this,c.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(m,S),this.setSizeToFrame(),this.setOrigin(),this.world=c,this._tempVec2=new u(p,v);var w=a(M,"shape",null);w?this.setBody(w,M):this.setRectangle(this.width,this.height,M),this.setPosition(p,v),this.initPipeline(),this.initPostPipeline(!0)}});s.exports=f},42045:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(60461),d=e(66615),h=e(66280),a=e(22562),l=e(68174),n=e(15647),u=e(83419),f=e(52284),o=e(53402),c=e(69351),p=e(74116),v=e(48140),m=e(81388),S=e(20339),M=e(28137),w=e(95540),C=e(35154),A=e(18210),P=e(40178),b=e(6790),O=e(74507),I=e(46975),D=e(4506),B=e(99561),G=e(73832),z=e(37277),X=e(73296),j=e(66272),Q=e(44594),tt=e(74058),Y=e(31725),Z=e(41598),U=e(68243);o.setDecomp(e(55973));var H=new u({initialize:function(_){this.scene=_,this.systems=_.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=a,this.composite=c,this.collision=f,this.detector=m,this.pair=D,this.pairs=B,this.query=X,this.resolver=j,this.constraint=v,this.bodies=h,this.composites=p,this.axes=d,this.bounds=n,this.svg=tt,this.vector=Y,this.vertices=Z,this.verts=Z,this._tempVec2=Y.create(),C(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),C(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),C(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),j._restingThresh=C(this.config,"restingThresh",4),j._restingThreshTangent=C(this.config,"restingThreshTangent",6),j._positionDampen=C(this.config,"positionDampen",.9),j._positionWarming=C(this.config,"positionWarming",.8),j._frictionNormalMultiplier=C(this.config,"frictionNormalMultiplier",5),_.sys.events.once(Q.BOOT,this.boot,this),_.sys.events.on(Q.START,this.start,this)},boot:function(){this.world=new U(this.scene,this.config),this.add=new M(this.world),this.bodyBounds=new l,this.systems.events.once(Q.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new U(this.scene,this.config),this.add=new M(this.world));var $=this.systems.events;$.on(Q.UPDATE,this.world.update,this.world),$.on(Q.POST_UPDATE,this.world.postUpdate,this.world),$.once(Q.SHUTDOWN,this.shutdown,this)},getConfig:function(){var $=this.systems.game.config.physics,_=this.systems.settings.physics,q=I(w(_,"matter",{}),w($,"matter",{}));return q},enableAttractorPlugin:function(){return G.register(A),G.use(b,A),this},enableWrapPlugin:function(){return G.register(O),G.use(b,O),this},enableCollisionEventsPlugin:function(){return G.register(P),G.use(b,P),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function($,_){this.world.step($,_)},containsPoint:function($,_,q){$=this.getMatterBodies($);var at=Y.create(_,q),ot=X.point($,at);return ot.length>0},intersectPoint:function($,_,q){q=this.getMatterBodies(q);var at=Y.create($,_),ot=[],rt=X.point(q,at);return rt.forEach(function(gt){ot.indexOf(gt)===-1&&ot.push(gt)}),ot},intersectRect:function($,_,q,at,ot,rt){ot===void 0&&(ot=!1),rt=this.getMatterBodies(rt);var gt={min:{x:$,y:_},max:{x:$+q,y:_+at}},yt=[],Et=X.region(rt,gt,ot);return Et.forEach(function(At){yt.indexOf(At)===-1&&yt.push(At)}),yt},intersectRay:function($,_,q,at,ot,rt){ot===void 0&&(ot=1),rt=this.getMatterBodies(rt);for(var gt=[],yt=X.ray(rt,Y.create($,_),Y.create(q,at),ot),Et=0;Et{/** + */var r=e(60461),d=e(66615),h=e(66280),a=e(22562),l=e(68174),n=e(15647),u=e(83419),f=e(52284),o=e(53402),c=e(69351),p=e(74116),v=e(48140),m=e(81388),S=e(20339),M=e(28137),w=e(95540),C=e(35154),A=e(18210),P=e(40178),b=e(6790),O=e(74507),I=e(46975),D=e(4506),B=e(99561),G=e(73832),z=e(37277),X=e(73296),j=e(66272),Q=e(44594),tt=e(74058),Y=e(31725),$=e(41598),U=e(68243);o.setDecomp(e(55973));var H=new u({initialize:function(_){this.scene=_,this.systems=_.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=a,this.composite=c,this.collision=f,this.detector=m,this.pair=D,this.pairs=B,this.query=X,this.resolver=j,this.constraint=v,this.bodies=h,this.composites=p,this.axes=d,this.bounds=n,this.svg=tt,this.vector=Y,this.vertices=$,this.verts=$,this._tempVec2=Y.create(),C(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),C(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),C(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),j._restingThresh=C(this.config,"restingThresh",4),j._restingThreshTangent=C(this.config,"restingThreshTangent",6),j._positionDampen=C(this.config,"positionDampen",.9),j._positionWarming=C(this.config,"positionWarming",.8),j._frictionNormalMultiplier=C(this.config,"frictionNormalMultiplier",5),_.sys.events.once(Q.BOOT,this.boot,this),_.sys.events.on(Q.START,this.start,this)},boot:function(){this.world=new U(this.scene,this.config),this.add=new M(this.world),this.bodyBounds=new l,this.systems.events.once(Q.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new U(this.scene,this.config),this.add=new M(this.world));var Z=this.systems.events;Z.on(Q.UPDATE,this.world.update,this.world),Z.on(Q.POST_UPDATE,this.world.postUpdate,this.world),Z.once(Q.SHUTDOWN,this.shutdown,this)},getConfig:function(){var Z=this.systems.game.config.physics,_=this.systems.settings.physics,q=I(w(_,"matter",{}),w(Z,"matter",{}));return q},enableAttractorPlugin:function(){return G.register(A),G.use(b,A),this},enableWrapPlugin:function(){return G.register(O),G.use(b,O),this},enableCollisionEventsPlugin:function(){return G.register(P),G.use(b,P),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(Z,_){this.world.step(Z,_)},containsPoint:function(Z,_,q){Z=this.getMatterBodies(Z);var at=Y.create(_,q),ot=X.point(Z,at);return ot.length>0},intersectPoint:function(Z,_,q){q=this.getMatterBodies(q);var at=Y.create(Z,_),ot=[],rt=X.point(q,at);return rt.forEach(function(gt){ot.indexOf(gt)===-1&&ot.push(gt)}),ot},intersectRect:function(Z,_,q,at,ot,rt){ot===void 0&&(ot=!1),rt=this.getMatterBodies(rt);var gt={min:{x:Z,y:_},max:{x:Z+q,y:_+at}},yt=[],Et=X.region(rt,gt,ot);return Et.forEach(function(At){yt.indexOf(At)===-1&&yt.push(At)}),yt},intersectRay:function(Z,_,q,at,ot,rt){ot===void 0&&(ot=1),rt=this.getMatterBodies(rt);for(var gt=[],yt=X.ray(rt,Y.create(Z,_),Y.create(q,at),ot),Et=0;Et{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(9674),d=e(83419),h=e(31884),a=e(95643),l=e(95540),n=e(72699),u=e(68287),f=e(26099),o=new d({Extends:u,Mixins:[h.Bounce,h.Collision,h.Force,h.Friction,h.Gravity,h.Mass,h.Sensor,h.SetBody,h.Sleep,h.Static,h.Transform,h.Velocity,n],initialize:function(p,v,m,S,M,w){a.call(this,p.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r(this),this.setTexture(S,M),this.setSizeToFrame(),this.setOrigin(),this.world=p,this._tempVec2=new f(v,m);var C=l(w,"shape",null);C?this.setBody(C,w):this.setRectangle(this.width,this.height,w),this.setPosition(v,m),this.initPipeline(),this.initPostPipeline(!0)}});s.exports=o},73834:(s,y,e)=>{/** + */var r=e(9674),d=e(83419),h=e(31884),a=e(95643),l=e(95540),n=e(72699),u=e(68287),f=e(26099),o=new d({Extends:u,Mixins:[h.Bounce,h.Collision,h.Force,h.Friction,h.Gravity,h.Mass,h.Sensor,h.SetBody,h.Sleep,h.Static,h.Transform,h.Velocity,n],initialize:function(p,v,m,S,M,w){a.call(this,p.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r(this),this.setTexture(S,M),this.setSizeToFrame(),this.setOrigin(),this.world=p,this._tempVec2=new f(v,m);var C=l(w,"shape",null);C?this.setBody(C,w):this.setRectangle(this.width,this.height,w),this.setPosition(v,m),this.initPipeline(),this.initPostPipeline(!0)}});s.exports=o},73834:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(66280),d=e(22562),h=e(83419),a=e(31884),l=e(62644),n=e(50792),u=e(95540),f=e(97022),o=e(41598),c=new h({Extends:n,Mixins:[a.Bounce,a.Collision,a.Friction,a.Gravity,a.Mass,a.Sensor,a.Sleep,a.Static],initialize:function(v,m,S){n.call(this),this.tile=m,this.world=v,m.physics.matterBody&&m.physics.matterBody.destroy(),m.physics.matterBody=this;var M=u(S,"body",null),w=u(S,"addToWorld",!0);if(M)this.setBody(M,w);else{var C=m.getCollisionGroup(),A=u(C,"objects",[]);A.length>0?this.setFromTileCollision(S):this.setFromTileRectangle(S)}if(m.flipX||m.flipY){var P={x:m.getCenterX(),y:m.getCenterY()},b=m.flipX?-1:1,O=m.flipY?-1:1;d.scale(M,b,O,P)}},setFromTileRectangle:function(p){p===void 0&&(p={}),f(p,"isStatic")||(p.isStatic=!0),f(p,"addToWorld")||(p.addToWorld=!0);var v=this.tile.getBounds(),m=v.x+v.width/2,S=v.y+v.height/2,M=r.rectangle(m,S,v.width,v.height,p);return this.setBody(M,p.addToWorld),this},setFromTileCollision:function(p){p===void 0&&(p={}),f(p,"isStatic")||(p.isStatic=!0),f(p,"addToWorld")||(p.addToWorld=!0);for(var v=this.tile.tilemapLayer.scaleX,m=this.tile.tilemapLayer.scaleY,S=this.tile.getLeft(),M=this.tile.getTop(),w=this.tile.getCollisionGroup(),C=u(w,"objects",[]),A=[],P=0;P1){var tt=l(p);tt.parts=A,this.setBody(d.create(tt),tt.addToWorld)}return this},setBody:function(p,v){return v===void 0&&(v=!0),this.body&&this.removeBody(),this.body=p,this.body.gameObject=this,v&&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()}});s.exports=c},19496:(s,y,e)=>{/** + */var r=e(66280),d=e(22562),h=e(83419),a=e(31884),l=e(62644),n=e(50792),u=e(95540),f=e(97022),o=e(41598),c=new h({Extends:n,Mixins:[a.Bounce,a.Collision,a.Friction,a.Gravity,a.Mass,a.Sensor,a.Sleep,a.Static],initialize:function(v,m,S){n.call(this),this.tile=m,this.world=v,m.physics.matterBody&&m.physics.matterBody.destroy(),m.physics.matterBody=this;var M=u(S,"body",null),w=u(S,"addToWorld",!0);if(M)this.setBody(M,w);else{var C=m.getCollisionGroup(),A=u(C,"objects",[]);A.length>0?this.setFromTileCollision(S):this.setFromTileRectangle(S)}if(m.flipX||m.flipY){var P={x:m.getCenterX(),y:m.getCenterY()},b=m.flipX?-1:1,O=m.flipY?-1:1;d.scale(M,b,O,P)}},setFromTileRectangle:function(p){p===void 0&&(p={}),f(p,"isStatic")||(p.isStatic=!0),f(p,"addToWorld")||(p.addToWorld=!0);var v=this.tile.getBounds(),m=v.x+v.width/2,S=v.y+v.height/2,M=r.rectangle(m,S,v.width,v.height,p);return this.setBody(M,p.addToWorld),this},setFromTileCollision:function(p){p===void 0&&(p={}),f(p,"isStatic")||(p.isStatic=!0),f(p,"addToWorld")||(p.addToWorld=!0);for(var v=this.tile.tilemapLayer.scaleX,m=this.tile.tilemapLayer.scaleY,S=this.tile.getLeft(),M=this.tile.getTop(),w=this.tile.getCollisionGroup(),C=u(w,"objects",[]),A=[],P=0;P1){var tt=l(p);tt.parts=A,this.setBody(d.create(tt),tt.addToWorld)}return this},setBody:function(p,v){return v===void 0&&(v=!0),this.body&&this.removeBody(),this.body=p,this.body.gameObject=this,v&&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()}});s.exports=c},19496:(s,x,e)=>{/** * @author Joachim Grill * @author Richard Davey * @copyright 2018 CodeAndWeb GmbH * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(66280),d=e(22562),h=e(53402),a=e(95540),l=e(41598),n={parseBody:function(u,f,o,c){c===void 0&&(c={});for(var p=a(o,"fixtures",[]),v=[],m=0;m{/** + */var r=e(66280),d=e(22562),h=e(53402),a=e(95540),l=e(41598),n={parseBody:function(u,f,o,c){c===void 0&&(c={});for(var p=a(o,"fixtures",[]),v=[],m=0;m{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(66280),d=e(22562),h={parseBody:function(a,l,n,u){u===void 0&&(u={});var f,o=n.vertices;if(o.length===1)u.vertices=o[0],f=d.create(u),r.flagCoincidentParts(f.parts);else{for(var c=[],p=0;p{/** + */var r=e(66280),d=e(22562),h={parseBody:function(a,l,n,u){u===void 0&&(u={});var f,o=n.vertices;if(o.length===1)u.vertices=o[0],f=d.create(u),r.flagCoincidentParts(f.parts);else{for(var c=[],p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(15647),d=e(83419),h=e(69351),a=e(48140),l=e(81388),n=e(1121),u=e(8214),f=e(46975),o=e(53614),c=e(26099),p=e(41598),v=new d({initialize:function(S,M,w){w===void 0&&(w={});var C={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=S,this.world=M,this.camera=null,this.pointer=null,this.active=!0,this.position=new c,this.body=null,this.part=null,this.constraint=a.create(f(w,C)),this.world.on(n.BEFORE_UPDATE,this.update,this),S.sys.input.on(u.POINTER_DOWN,this.onDown,this),S.sys.input.on(u.POINTER_UP,this.onUp,this)},onDown:function(m){this.pointer||(this.pointer=m,this.camera=m.camera)},onUp:function(m){m===this.pointer&&(this.pointer=null)},getBody:function(m){var S=this.position,M=this.constraint;this.camera.getWorldPoint(m.x,m.y,S);for(var w=h.allBodies(this.world.localWorld),C=0;C1?1:0,A=C;A{/** + */var r=e(15647),d=e(83419),h=e(69351),a=e(48140),l=e(81388),n=e(1121),u=e(8214),f=e(46975),o=e(53614),c=e(26099),p=e(41598),v=new d({initialize:function(S,M,w){w===void 0&&(w={});var C={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=S,this.world=M,this.camera=null,this.pointer=null,this.active=!0,this.position=new c,this.body=null,this.part=null,this.constraint=a.create(f(w,C)),this.world.on(n.BEFORE_UPDATE,this.update,this),S.sys.input.on(u.POINTER_DOWN,this.onDown,this),S.sys.input.on(u.POINTER_UP,this.onUp,this)},onDown:function(m){this.pointer||(this.pointer=m,this.camera=m.camera)},onUp:function(m){m===this.pointer&&(this.pointer=null)},getBody:function(m){var S=this.position,M=this.constraint;this.camera.getWorldPoint(m.x,m.y,S);for(var w=h.allBodies(this.world.localWorld),C=0;C1?1:0,A=C;A{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(66280),d=e(22562),h=e(83419),a=e(53402),l=e(69351),n=e(48413),u=e(50792),f=e(1121),o=e(95540),c=e(35154),p=e(22562),v=e(35810),m=e(73834),S=e(4372),M=e(31725),w=new h({Extends:u,initialize:function(A,P){u.call(this),this.scene=A,this.engine=n.create(P),this.localWorld=this.engine.world;var b=c(P,"gravity",null);b?this.setGravity(b.x,b.y,b.scale):b===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=c(P,"enabled",!0),this.getDelta=c(P,"getDelta",this.update60Hz);var O=o(P,"runner",{}),I=o(O,"fps",!1),D=o(O,"fps",60),B=o(O,"delta",1e3/D),G=o(O,"deltaMin",1e3/D),z=o(O,"deltaMax",1e3/(D*.5));I||(D=1e3/B),this.runner={fps:D,deltaSampleSize:o(O,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:o(O,"isFixed",!1),delta:B,deltaMin:G,deltaMax:z},this.autoUpdate=c(P,"autoUpdate",!0);var X=c(P,"debug",!1);if(this.drawDebug=typeof X=="object"?!0:X,this.debugGraphic,this.debugConfig={showAxes:o(X,"showAxes",!1),showAngleIndicator:o(X,"showAngleIndicator",!1),angleColor:o(X,"angleColor",15208787),showBroadphase:o(X,"showBroadphase",!1),broadphaseColor:o(X,"broadphaseColor",16757760),showBounds:o(X,"showBounds",!1),boundsColor:o(X,"boundsColor",16777215),showVelocity:o(X,"showVelocity",!1),velocityColor:o(X,"velocityColor",44783),showCollisions:o(X,"showCollisions",!1),collisionColor:o(X,"collisionColor",16094476),showSeparations:o(X,"showSeparations",!1),separationColor:o(X,"separationColor",16753920),showBody:o(X,"showBody",!0),showStaticBody:o(X,"showStaticBody",!0),showInternalEdges:o(X,"showInternalEdges",!1),renderFill:o(X,"renderFill",!1),renderLine:o(X,"renderLine",!0),fillColor:o(X,"fillColor",1075465),fillOpacity:o(X,"fillOpacity",1),lineColor:o(X,"lineColor",2678297),lineOpacity:o(X,"lineOpacity",1),lineThickness:o(X,"lineThickness",1),staticFillColor:o(X,"staticFillColor",857979),staticLineColor:o(X,"staticLineColor",1255396),showSleeping:o(X,"showSleeping",!1),staticBodySleepOpacity:o(X,"staticBodySleepOpacity",.7),sleepFillColor:o(X,"sleepFillColor",4605510),sleepLineColor:o(X,"sleepLineColor",10066585),showSensors:o(X,"showSensors",!0),sensorFillColor:o(X,"sensorFillColor",857979),sensorLineColor:o(X,"sensorLineColor",1255396),showPositions:o(X,"showPositions",!0),positionSize:o(X,"positionSize",4),positionColor:o(X,"positionColor",14697178),showJoint:o(X,"showJoint",!0),jointColor:o(X,"jointColor",14737474),jointLineOpacity:o(X,"jointLineOpacity",1),jointLineThickness:o(X,"jointLineThickness",2),pinSize:o(X,"pinSize",4),pinColor:o(X,"pinColor",4382944),springColor:o(X,"springColor",14697184),anchorColor:o(X,"anchorColor",15724527),anchorSize:o(X,"anchorSize",4),showConvexHulls:o(X,"showConvexHulls",!1),hullColor:o(X,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),o(P,"setBounds",!1)){var j=P.setBounds;if(typeof j=="boolean")this.setBounds();else{var Q=o(j,"x",0),tt=o(j,"y",0),Y=o(j,"width",A.sys.scale.width),Z=o(j,"height",A.sys.scale.height),U=o(j,"thickness",64),H=o(j,"left",!0),$=o(j,"right",!0),_=o(j,"top",!0),q=o(j,"bottom",!0);this.setBounds(Q,tt,Y,Z,U,H,$,_,q)}}},setCompositeRenderStyle:function(C){var A=C.bodies,P=C.constraints,b=C.composites,O,I,D;for(O=0;O0&&(I=O[0].bodyA,D=O[0].bodyB),C.emit(f.COLLISION_START,b,I,D)}),v.on(A,"collisionActive",function(b){var O=b.pairs,I,D;O.length>0&&(I=O[0].bodyA,D=O[0].bodyB),C.emit(f.COLLISION_ACTIVE,b,I,D)}),v.on(A,"collisionEnd",function(b){var O=b.pairs,I,D;O.length>0&&(I=O[0].bodyA,D=O[0].bodyB),C.emit(f.COLLISION_END,b,I,D)})},setBounds:function(C,A,P,b,O,I,D,B,G){return C===void 0&&(C=0),A===void 0&&(A=0),P===void 0&&(P=this.scene.sys.scale.width),b===void 0&&(b=this.scene.sys.scale.height),O===void 0&&(O=64),I===void 0&&(I=!0),D===void 0&&(D=!0),B===void 0&&(B=!0),G===void 0&&(G=!0),this.updateWall(I,"left",C-O,A-O,O,b+O*2),this.updateWall(D,"right",C+P,A-O,O,b+O*2),this.updateWall(B,"top",C,A-O,P,O),this.updateWall(G,"bottom",C,A+b,P,O),this},updateWall:function(C,A,P,b,O,I){var D=this.walls[A];C?(D&&S.remove(this.localWorld,D),P+=O/2,b+=I/2,this.walls[A]=this.create(P,b,O,I,{isStatic:!0,friction:0,frictionStatic:0})):(D&&S.remove(this.localWorld,D),this.walls[A]=null)},createDebugGraphic:function(){var C=this.scene.sys.add.graphics({x:0,y:0});return C.setDepth(Number.MAX_VALUE),this.debugGraphic=C,this.drawDebug=!0,C},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(C,A,P){return C===void 0&&(C=0),A===void 0&&(A=1),P===void 0&&(P=.001),this.localWorld.gravity.x=C,this.localWorld.gravity.y=A,this.localWorld.gravity.scale=P,this},create:function(C,A,P,b,O){var I=r.rectangle(C,A,P,b,O);return S.add(this.localWorld,I),I},add:function(C){return S.add(this.localWorld,C),this},remove:function(C,A){Array.isArray(C)||(C=[C]);for(var P=0;Pb.deltaMax?b.deltaMax:A,b.delta=A),b.timeScalePrev=O.timeScale,b.frameCounter+=1,C-b.counterTimestamp>=1e3&&(b.fps=b.frameCounter*((C-b.counterTimestamp)/1e3),b.counterTimestamp=C,b.frameCounter=0),n.update(P,A)}},step:function(C){n.update(this.engine,C)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(C){var A=C.hasOwnProperty("body")?C.body:C;return l.get(this.localWorld,A.id,A.type)!==null},getAllBodies:function(){return l.allBodies(this.localWorld)},getAllConstraints:function(){return l.allConstraints(this.localWorld)},getAllComposites:function(){return l.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var C=this.debugConfig,A=this.engine,P=this.debugGraphic,b=l.allBodies(this.localWorld);this.debugGraphic.clear(),C.showBroadphase&&A.broadphase.controller&&this.renderGrid(A.broadphase,P,C.broadphaseColor,.5),C.showBounds&&this.renderBodyBounds(b,P,C.boundsColor,.5),(C.showBody||C.showStaticBody)&&this.renderBodies(b),C.showJoint&&this.renderJoints(),(C.showAxes||C.showAngleIndicator)&&this.renderBodyAxes(b,P,C.showAxes,C.angleColor,.5),C.showVelocity&&this.renderBodyVelocity(b,P,C.velocityColor,1,2),C.showSeparations&&this.renderSeparations(A.pairs.list,P,C.separationColor),C.showCollisions&&this.renderCollisions(A.pairs.list,P,C.collisionColor)}},renderGrid:function(C,A,P,b){A.lineStyle(1,P,b);for(var O=a.keys(C.buckets),I=0;I0){var X=z[0].vertex.x,j=z[0].vertex.y;z.length===2&&(X=(z[0].vertex.x+z[1].vertex.x)/2,j=(z[0].vertex.y+z[1].vertex.y)/2),G.bodyB===G.supports[0].body||G.bodyA.isStatic?A.lineBetween(X-G.normal.x*8,j-G.normal.y*8,X,j):A.lineBetween(X+G.normal.x*8,j+G.normal.y*8,X,j)}}return this},renderBodyBounds:function(C,A,P,b){A.lineStyle(1,P,b);for(var O=0;O1?1:0;G1?1:0;z1?1:0;z1&&this.renderConvexHull(Z,A,tt,$)}}},renderBody:function(C,A,P,b,O,I,D,B){b===void 0&&(b=null),O===void 0&&(O=null),I===void 0&&(I=1),D===void 0&&(D=null),B===void 0&&(B=null);for(var G=this.debugConfig,z=G.sensorFillColor,X=G.sensorLineColor,j=C.parts,Q=j.length,tt=Q>1?1:0;tt1){var D=C.vertices;A.lineStyle(b,P),A.beginPath(),A.moveTo(D[0].x,D[0].y);for(var B=1;B0&&(A.fillStyle(D),A.fillCircle(j.x,j.y,B),A.fillCircle(Q.x,Q.y,B)),this},resetCollisionIDs:function(){return d._nextCollidingGroupId=1,d._nextNonCollidingGroupId=-1,d._nextCategory=1,this},shutdown:function(){v.off(this.engine),this.removeAllListeners(),S.clear(this.localWorld,!1),n.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});s.exports=w},70410:s=>{/** + */var r=e(66280),d=e(22562),h=e(83419),a=e(53402),l=e(69351),n=e(48413),u=e(50792),f=e(1121),o=e(95540),c=e(35154),p=e(22562),v=e(35810),m=e(73834),S=e(4372),M=e(31725),w=new h({Extends:u,initialize:function(A,P){u.call(this),this.scene=A,this.engine=n.create(P),this.localWorld=this.engine.world;var b=c(P,"gravity",null);b?this.setGravity(b.x,b.y,b.scale):b===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=c(P,"enabled",!0),this.getDelta=c(P,"getDelta",this.update60Hz);var O=o(P,"runner",{}),I=o(O,"fps",!1),D=o(O,"fps",60),B=o(O,"delta",1e3/D),G=o(O,"deltaMin",1e3/D),z=o(O,"deltaMax",1e3/(D*.5));I||(D=1e3/B),this.runner={fps:D,deltaSampleSize:o(O,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:o(O,"isFixed",!1),delta:B,deltaMin:G,deltaMax:z},this.autoUpdate=c(P,"autoUpdate",!0);var X=c(P,"debug",!1);if(this.drawDebug=typeof X=="object"?!0:X,this.debugGraphic,this.debugConfig={showAxes:o(X,"showAxes",!1),showAngleIndicator:o(X,"showAngleIndicator",!1),angleColor:o(X,"angleColor",15208787),showBroadphase:o(X,"showBroadphase",!1),broadphaseColor:o(X,"broadphaseColor",16757760),showBounds:o(X,"showBounds",!1),boundsColor:o(X,"boundsColor",16777215),showVelocity:o(X,"showVelocity",!1),velocityColor:o(X,"velocityColor",44783),showCollisions:o(X,"showCollisions",!1),collisionColor:o(X,"collisionColor",16094476),showSeparations:o(X,"showSeparations",!1),separationColor:o(X,"separationColor",16753920),showBody:o(X,"showBody",!0),showStaticBody:o(X,"showStaticBody",!0),showInternalEdges:o(X,"showInternalEdges",!1),renderFill:o(X,"renderFill",!1),renderLine:o(X,"renderLine",!0),fillColor:o(X,"fillColor",1075465),fillOpacity:o(X,"fillOpacity",1),lineColor:o(X,"lineColor",2678297),lineOpacity:o(X,"lineOpacity",1),lineThickness:o(X,"lineThickness",1),staticFillColor:o(X,"staticFillColor",857979),staticLineColor:o(X,"staticLineColor",1255396),showSleeping:o(X,"showSleeping",!1),staticBodySleepOpacity:o(X,"staticBodySleepOpacity",.7),sleepFillColor:o(X,"sleepFillColor",4605510),sleepLineColor:o(X,"sleepLineColor",10066585),showSensors:o(X,"showSensors",!0),sensorFillColor:o(X,"sensorFillColor",857979),sensorLineColor:o(X,"sensorLineColor",1255396),showPositions:o(X,"showPositions",!0),positionSize:o(X,"positionSize",4),positionColor:o(X,"positionColor",14697178),showJoint:o(X,"showJoint",!0),jointColor:o(X,"jointColor",14737474),jointLineOpacity:o(X,"jointLineOpacity",1),jointLineThickness:o(X,"jointLineThickness",2),pinSize:o(X,"pinSize",4),pinColor:o(X,"pinColor",4382944),springColor:o(X,"springColor",14697184),anchorColor:o(X,"anchorColor",15724527),anchorSize:o(X,"anchorSize",4),showConvexHulls:o(X,"showConvexHulls",!1),hullColor:o(X,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),o(P,"setBounds",!1)){var j=P.setBounds;if(typeof j=="boolean")this.setBounds();else{var Q=o(j,"x",0),tt=o(j,"y",0),Y=o(j,"width",A.sys.scale.width),$=o(j,"height",A.sys.scale.height),U=o(j,"thickness",64),H=o(j,"left",!0),Z=o(j,"right",!0),_=o(j,"top",!0),q=o(j,"bottom",!0);this.setBounds(Q,tt,Y,$,U,H,Z,_,q)}}},setCompositeRenderStyle:function(C){var A=C.bodies,P=C.constraints,b=C.composites,O,I,D;for(O=0;O0&&(I=O[0].bodyA,D=O[0].bodyB),C.emit(f.COLLISION_START,b,I,D)}),v.on(A,"collisionActive",function(b){var O=b.pairs,I,D;O.length>0&&(I=O[0].bodyA,D=O[0].bodyB),C.emit(f.COLLISION_ACTIVE,b,I,D)}),v.on(A,"collisionEnd",function(b){var O=b.pairs,I,D;O.length>0&&(I=O[0].bodyA,D=O[0].bodyB),C.emit(f.COLLISION_END,b,I,D)})},setBounds:function(C,A,P,b,O,I,D,B,G){return C===void 0&&(C=0),A===void 0&&(A=0),P===void 0&&(P=this.scene.sys.scale.width),b===void 0&&(b=this.scene.sys.scale.height),O===void 0&&(O=64),I===void 0&&(I=!0),D===void 0&&(D=!0),B===void 0&&(B=!0),G===void 0&&(G=!0),this.updateWall(I,"left",C-O,A-O,O,b+O*2),this.updateWall(D,"right",C+P,A-O,O,b+O*2),this.updateWall(B,"top",C,A-O,P,O),this.updateWall(G,"bottom",C,A+b,P,O),this},updateWall:function(C,A,P,b,O,I){var D=this.walls[A];C?(D&&S.remove(this.localWorld,D),P+=O/2,b+=I/2,this.walls[A]=this.create(P,b,O,I,{isStatic:!0,friction:0,frictionStatic:0})):(D&&S.remove(this.localWorld,D),this.walls[A]=null)},createDebugGraphic:function(){var C=this.scene.sys.add.graphics({x:0,y:0});return C.setDepth(Number.MAX_VALUE),this.debugGraphic=C,this.drawDebug=!0,C},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(C,A,P){return C===void 0&&(C=0),A===void 0&&(A=1),P===void 0&&(P=.001),this.localWorld.gravity.x=C,this.localWorld.gravity.y=A,this.localWorld.gravity.scale=P,this},create:function(C,A,P,b,O){var I=r.rectangle(C,A,P,b,O);return S.add(this.localWorld,I),I},add:function(C){return S.add(this.localWorld,C),this},remove:function(C,A){Array.isArray(C)||(C=[C]);for(var P=0;Pb.deltaMax?b.deltaMax:A,b.delta=A),b.timeScalePrev=O.timeScale,b.frameCounter+=1,C-b.counterTimestamp>=1e3&&(b.fps=b.frameCounter*((C-b.counterTimestamp)/1e3),b.counterTimestamp=C,b.frameCounter=0),n.update(P,A)}},step:function(C){n.update(this.engine,C)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(C){var A=C.hasOwnProperty("body")?C.body:C;return l.get(this.localWorld,A.id,A.type)!==null},getAllBodies:function(){return l.allBodies(this.localWorld)},getAllConstraints:function(){return l.allConstraints(this.localWorld)},getAllComposites:function(){return l.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var C=this.debugConfig,A=this.engine,P=this.debugGraphic,b=l.allBodies(this.localWorld);this.debugGraphic.clear(),C.showBroadphase&&A.broadphase.controller&&this.renderGrid(A.broadphase,P,C.broadphaseColor,.5),C.showBounds&&this.renderBodyBounds(b,P,C.boundsColor,.5),(C.showBody||C.showStaticBody)&&this.renderBodies(b),C.showJoint&&this.renderJoints(),(C.showAxes||C.showAngleIndicator)&&this.renderBodyAxes(b,P,C.showAxes,C.angleColor,.5),C.showVelocity&&this.renderBodyVelocity(b,P,C.velocityColor,1,2),C.showSeparations&&this.renderSeparations(A.pairs.list,P,C.separationColor),C.showCollisions&&this.renderCollisions(A.pairs.list,P,C.collisionColor)}},renderGrid:function(C,A,P,b){A.lineStyle(1,P,b);for(var O=a.keys(C.buckets),I=0;I0){var X=z[0].vertex.x,j=z[0].vertex.y;z.length===2&&(X=(z[0].vertex.x+z[1].vertex.x)/2,j=(z[0].vertex.y+z[1].vertex.y)/2),G.bodyB===G.supports[0].body||G.bodyA.isStatic?A.lineBetween(X-G.normal.x*8,j-G.normal.y*8,X,j):A.lineBetween(X+G.normal.x*8,j+G.normal.y*8,X,j)}}return this},renderBodyBounds:function(C,A,P,b){A.lineStyle(1,P,b);for(var O=0;O1?1:0;G1?1:0;z1?1:0;z1&&this.renderConvexHull($,A,tt,Z)}}},renderBody:function(C,A,P,b,O,I,D,B){b===void 0&&(b=null),O===void 0&&(O=null),I===void 0&&(I=1),D===void 0&&(D=null),B===void 0&&(B=null);for(var G=this.debugConfig,z=G.sensorFillColor,X=G.sensorLineColor,j=C.parts,Q=j.length,tt=Q>1?1:0;tt1){var D=C.vertices;A.lineStyle(b,P),A.beginPath(),A.moveTo(D[0].x,D[0].y);for(var B=1;B0&&(A.fillStyle(D),A.fillCircle(j.x,j.y,B),A.fillCircle(Q.x,Q.y,B)),this},resetCollisionIDs:function(){return d._nextCollidingGroupId=1,d._nextNonCollidingGroupId=-1,d._nextCategory=1,this},shutdown:function(){v.off(this.engine),this.removeAllListeners(),S.clear(this.localWorld,!1),n.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});s.exports=w},70410:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setBounce:function(e){return this.body.restitution=e,this}};s.exports=y},66968:s=>{/** + */var x={setBounce:function(e){return this.body.restitution=e,this}};s.exports=x},66968:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setCollisionCategory:function(e){return this.body.collisionFilter.category=e,this},setCollisionGroup:function(e){return this.body.collisionFilter.group=e,this},setCollidesWith:function(e){var r=0;if(!Array.isArray(e))r=e;else for(var d=0;d{/** + */var x={setCollisionCategory:function(e){return this.body.collisionFilter.category=e,this},setCollisionGroup:function(e){return this.body.collisionFilter.group=e,this},setCollidesWith:function(e){var r=0;if(!Array.isArray(e))r=e;else for(var d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4483,11 +4483,11 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setFriction:function(e,r,d){return this.body.friction=e,r!==void 0&&(this.body.frictionAir=r),d!==void 0&&(this.body.frictionStatic=d),this},setFrictionAir:function(e){return this.body.frictionAir=e,this},setFrictionStatic:function(e){return this.body.frictionStatic=e,this}};s.exports=y},39858:s=>{/** + */var x={setFriction:function(e,r,d){return this.body.friction=e,r!==void 0&&(this.body.frictionAir=r),d!==void 0&&(this.body.frictionStatic=d),this},setFrictionAir:function(e){return this.body.frictionAir=e,this},setFrictionStatic:function(e){return this.body.frictionStatic=e,this}};s.exports=x},39858:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setIgnoreGravity:function(e){return this.body.ignoreGravity=e,this}};s.exports=y},37302:(s,y,e)=>{/** + */var x={setIgnoreGravity:function(e){return this.body.ignoreGravity=e,this}};s.exports=x},37302:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4495,27 +4495,27 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={setSensor:function(e){return this.body.isSensor=e,this},isSensor:function(){return this.body.isSensor}};s.exports=y},57772:(s,y,e)=>{/** + */var x={setSensor:function(e){return this.body.isSensor=e,this},isSensor:function(){return this.body.isSensor}};s.exports=x},57772:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(66280),d=e(22562),h=e(43855),a=e(95540),l=e(19496),n=e(85791),u=e(41598),f={setRectangle:function(o,c,p){return this.setBody({type:"rectangle",width:o,height:c},p)},setCircle:function(o,c){return this.setBody({type:"circle",radius:o},c)},setPolygon:function(o,c,p){return this.setBody({type:"polygon",sides:c,radius:o},p)},setTrapezoid:function(o,c,p,v){return this.setBody({type:"trapezoid",width:o,height:c,slope:p},v)},setExistingBody:function(o,c){c===void 0&&(c=!0),this.body&&this.world.remove(this.body,!0),this.body=o;for(var p=0;p{/** + */var r=e(66280),d=e(22562),h=e(43855),a=e(95540),l=e(19496),n=e(85791),u=e(41598),f={setRectangle:function(o,c,p){return this.setBody({type:"rectangle",width:o,height:c},p)},setCircle:function(o,c){return this.setBody({type:"circle",radius:o},c)},setPolygon:function(o,c,p){return this.setBody({type:"polygon",sides:c,radius:o},p)},setTrapezoid:function(o,c,p,v){return this.setBody({type:"trapezoid",width:o,height:c,slope:p},v)},setExistingBody:function(o,c){c===void 0&&(c=!0),this.body&&this.world.remove(this.body,!0),this.body=o;for(var p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(1121),d=e(53614),h=e(35810),a={setToSleep:function(){return d.set(this.body,!0),this},setAwake:function(){return d.set(this.body,!1),this},setSleepThreshold:function(l){return l===void 0&&(l=60),this.body.sleepThreshold=l,this},setSleepEvents:function(l,n){return this.setSleepStartEvent(l),this.setSleepEndEvent(n),this},setSleepStartEvent:function(l){if(l){var n=this.world;h.on(this.body,"sleepStart",function(u){n.emit(r.SLEEP_START,u,this)})}else h.off(this.body,"sleepStart");return this},setSleepEndEvent:function(l){if(l){var n=this.world;h.on(this.body,"sleepEnd",function(u){n.emit(r.SLEEP_END,u,this)})}else h.off(this.body,"sleepEnd");return this}};s.exports=a},90556:(s,y,e)=>{/** + */var r=e(1121),d=e(53614),h=e(35810),a={setToSleep:function(){return d.set(this.body,!0),this},setAwake:function(){return d.set(this.body,!1),this},setSleepThreshold:function(l){return l===void 0&&(l=60),this.body.sleepThreshold=l,this},setSleepEvents:function(l,n){return this.setSleepStartEvent(l),this.setSleepEndEvent(n),this},setSleepStartEvent:function(l){if(l){var n=this.world;h.on(this.body,"sleepStart",function(u){n.emit(r.SLEEP_START,u,this)})}else h.off(this.body,"sleepStart");return this},setSleepEndEvent:function(l){if(l){var n=this.world;h.on(this.body,"sleepEnd",function(u){n.emit(r.SLEEP_END,u,this)})}else h.off(this.body,"sleepEnd");return this}};s.exports=a},90556:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(22562),d={setStatic:function(h){return r.setStatic(this.body,h),this},isStatic:function(){return this.body.isStatic}};s.exports=d},85436:(s,y,e)=>{/** + */var r=e(22562),d={setStatic:function(h){return r.setStatic(this.body,h),this},isStatic:function(){return this.body.isStatic}};s.exports=d},85436:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(22562),d=e(36383),h=e(86554),a=e(30954),l=4,n={x:{get:function(){return this.body.position.x},set:function(u){this._tempVec2.set(u,this.y),r.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(u){this._tempVec2.set(this.x,u),r.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(u){var f=1/this._scaleX,o=1/this._scaleY;this._scaleX=u,this._scaleX===0?this.renderFlags&=~l:this.renderFlags|=l,r.scale(this.body,f,o),r.scale(this.body,u,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(u){var f=1/this._scaleX,o=1/this._scaleY;this._scaleY=u,this._scaleY===0?this.renderFlags&=~l:this.renderFlags|=l,r.scale(this.body,f,o),r.scale(this.body,this._scaleX,u)}},angle:{get:function(){return a(this.body.angle*d.RAD_TO_DEG)},set:function(u){this.rotation=a(u)*d.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(u){this._rotation=h(u),r.setAngle(this.body,this._rotation)}},setPosition:function(u,f){return u===void 0&&(u=0),f===void 0&&(f=u),this._tempVec2.set(u,f),r.setPosition(this.body,this._tempVec2),this},setRotation:function(u){return u===void 0&&(u=0),this._rotation=h(u),r.setAngle(this.body,u),this},setFixedRotation:function(){return r.setInertia(this.body,1/0),this},setAngle:function(u){return u===void 0&&(u=0),this.angle=u,r.setAngle(this.body,this.rotation),this},setScale:function(u,f,o){u===void 0&&(u=1),f===void 0&&(f=u);var c=1/this._scaleX,p=1/this._scaleY;return this._scaleX=u,this._scaleY=f,r.scale(this.body,c,p,o),r.scale(this.body,u,f,o),this}};s.exports=n},42081:(s,y,e)=>{/** + */var r=e(22562),d=e(36383),h=e(86554),a=e(30954),l=4,n={x:{get:function(){return this.body.position.x},set:function(u){this._tempVec2.set(u,this.y),r.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(u){this._tempVec2.set(this.x,u),r.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(u){var f=1/this._scaleX,o=1/this._scaleY;this._scaleX=u,this._scaleX===0?this.renderFlags&=~l:this.renderFlags|=l,r.scale(this.body,f,o),r.scale(this.body,u,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(u){var f=1/this._scaleX,o=1/this._scaleY;this._scaleY=u,this._scaleY===0?this.renderFlags&=~l:this.renderFlags|=l,r.scale(this.body,f,o),r.scale(this.body,this._scaleX,u)}},angle:{get:function(){return a(this.body.angle*d.RAD_TO_DEG)},set:function(u){this.rotation=a(u)*d.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(u){this._rotation=h(u),r.setAngle(this.body,this._rotation)}},setPosition:function(u,f){return u===void 0&&(u=0),f===void 0&&(f=u),this._tempVec2.set(u,f),r.setPosition(this.body,this._tempVec2),this},setRotation:function(u){return u===void 0&&(u=0),this._rotation=h(u),r.setAngle(this.body,u),this},setFixedRotation:function(){return r.setInertia(this.body,1/0),this},setAngle:function(u){return u===void 0&&(u=0),this.angle=u,r.setAngle(this.body,this.rotation),this},setScale:function(u,f,o){u===void 0&&(u=1),f===void 0&&(f=u);var c=1/this._scaleX,p=1/this._scaleY;return this._scaleX=u,this._scaleY=f,r.scale(this.body,c,p,o),r.scale(this.body,u,f,o),this}};s.exports=n},42081:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(22562),d={setVelocityX:function(h){return this._tempVec2.set(h,this.body.velocity.y),r.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(h){return this._tempVec2.set(this.body.velocity.x,h),r.setVelocity(this.body,this._tempVec2),this},setVelocity:function(h,a){return this._tempVec2.set(h,a),r.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return r.getVelocity(this.body)},setAngularVelocity:function(h){return r.setAngularVelocity(this.body,h),this},getAngularVelocity:function(){return r.getAngularVelocity(this.body)},setAngularSpeed:function(h){return r.setAngularSpeed(this.body,h),this},getAngularSpeed:function(){return r.getAngularSpeed(this.body)}};s.exports=d},31884:(s,y,e)=>{/** + */var r=e(22562),d={setVelocityX:function(h){return this._tempVec2.set(h,this.body.velocity.y),r.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(h){return this._tempVec2.set(this.body.velocity.x,h),r.setVelocity(this.body,this._tempVec2),this},setVelocity:function(h,a){return this._tempVec2.set(h,a),r.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return r.getVelocity(this.body)},setAngularVelocity:function(h){return r.setAngularVelocity(this.body,h),this},getAngularVelocity:function(){return r.getAngularVelocity(this.body)},setAngularSpeed:function(h){return r.setAngularSpeed(this.body,h),this},getAngularSpeed:function(){return r.getAngularSpeed(this.body)}};s.exports=d},31884:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4583,22 +4583,22 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="sleepstart"},1121:(s,y,e)=>{/** + */s.exports="sleepstart"},1121:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={AFTER_ADD:e(85608),AFTER_REMOVE:e(1213),AFTER_UPDATE:e(25968),BEFORE_ADD:e(67205),BEFORE_REMOVE:e(39438),BEFORE_UPDATE:e(44823),COLLISION_ACTIVE:e(92593),COLLISION_END:e(60128),COLLISION_START:e(76861),DRAG_END:e(92362),DRAG:e(76408),DRAG_START:e(93971),PAUSE:e(5656),RESUME:e(47861),SLEEP_END:e(79099),SLEEP_START:e(35906)}},3875:(s,y,e)=>{/** + */s.exports={AFTER_ADD:e(85608),AFTER_REMOVE:e(1213),AFTER_UPDATE:e(25968),BEFORE_ADD:e(67205),BEFORE_REMOVE:e(39438),BEFORE_UPDATE:e(44823),COLLISION_ACTIVE:e(92593),COLLISION_END:e(60128),COLLISION_START:e(76861),DRAG_END:e(92362),DRAG:e(76408),DRAG_START:e(93971),PAUSE:e(5656),RESUME:e(47861),SLEEP_END:e(79099),SLEEP_START:e(35906)}},3875:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={BodyBounds:e(68174),Components:e(31884),Events:e(1121),Factory:e(28137),MatterGameObject:e(75803),Image:e(23181),Matter:e(19933),MatterPhysics:e(42045),PolyDecomp:e(55973),Sprite:e(34803),TileBody:e(73834),PhysicsEditorParser:e(19496),PhysicsJSONParser:e(85791),PointerConstraint:e(98713),World:e(68243)}},22562:(s,y,e)=>{var r={};s.exports=r;var d=e(41598),h=e(31725),a=e(53614),l=e(53402),n=e(15647),u=e(66615);(function(){r._timeCorrection=!0,r._inertiaScale=4,r._nextCollidingGroupId=1,r._nextNonCollidingGroupId=-1,r._nextCategory=1,r._baseDelta=16.666666666666668,r.create=function(o){var c={id:l.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:{}};!o.hasOwnProperty("position")&&o.hasOwnProperty("vertices")?o.position=d.centre(o.vertices):o.hasOwnProperty("vertices")||(c.vertices=d.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var p=l.extend(c,o);return f(p,o),p.setOnCollideWith=function(v,m){return m?this.onCollideWith[v.id]=m:delete this.onCollideWith[v.id],this},p},r.nextGroup=function(o){return o?r._nextNonCollidingGroupId--:r._nextCollidingGroupId++},r.nextCategory=function(){return r._nextCategory=r._nextCategory<<1,r._nextCategory};var f=function(o,c){if(c=c||{},r.set(o,{bounds:o.bounds||n.create(o.vertices),positionPrev:o.positionPrev||h.clone(o.position),anglePrev:o.anglePrev||o.angle,vertices:o.vertices,parts:o.parts||[o],isStatic:o.isStatic,isSleeping:o.isSleeping,parent:o.parent||o}),d.rotate(o.vertices,o.angle,o.position),u.rotate(o.axes,o.angle),n.update(o.bounds,o.vertices,o.velocity),r.set(o,{axes:c.axes||o.axes,area:c.area||o.area,mass:c.mass||o.mass,inertia:c.inertia||o.inertia}),o.parts.length===1){var p=o.bounds,v=o.centerOfMass,m=o.centerOffset,S=p.max.x-p.min.x,M=p.max.y-p.min.y;v.x=-(p.min.x-o.position.x)/S,v.y=-(p.min.y-o.position.y)/M,m.x=S*v.x,m.y=M*v.y}};r.set=function(o,c,p){var v;typeof c=="string"&&(v=c,c={},c[v]=p);for(v in c)if(Object.prototype.hasOwnProperty.call(c,v))switch(p=c[v],v){case"isStatic":r.setStatic(o,p);break;case"isSleeping":a.set(o,p);break;case"mass":r.setMass(o,p);break;case"density":r.setDensity(o,p);break;case"inertia":r.setInertia(o,p);break;case"vertices":r.setVertices(o,p);break;case"position":r.setPosition(o,p);break;case"angle":r.setAngle(o,p);break;case"velocity":r.setVelocity(o,p);break;case"angularVelocity":r.setAngularVelocity(o,p);break;case"speed":r.setSpeed(o,p);break;case"angularSpeed":r.setAngularSpeed(o,p);break;case"parts":r.setParts(o,p);break;case"centre":r.setCentre(o,p);break;default:o[v]=p}},r.setStatic=function(o,c){for(var p=0;p0&&h.rotateAbout(S.position,v,o.position,S.position)}},r.setVelocity=function(o,c){var p=o.deltaTime/r._baseDelta;o.positionPrev.x=o.position.x-c.x*p,o.positionPrev.y=o.position.y-c.y*p,o.velocity.x=(o.position.x-o.positionPrev.x)/p,o.velocity.y=(o.position.y-o.positionPrev.y)/p,o.speed=h.magnitude(o.velocity)},r.getVelocity=function(o){var c=r._baseDelta/o.deltaTime;return{x:(o.position.x-o.positionPrev.x)*c,y:(o.position.y-o.positionPrev.y)*c}},r.getSpeed=function(o){return h.magnitude(r.getVelocity(o))},r.setSpeed=function(o,c){r.setVelocity(o,h.mult(h.normalise(r.getVelocity(o)),c))},r.setAngularVelocity=function(o,c){var p=o.deltaTime/r._baseDelta;o.anglePrev=o.angle-c*p,o.angularVelocity=(o.angle-o.anglePrev)/p,o.angularSpeed=Math.abs(o.angularVelocity)},r.getAngularVelocity=function(o){return(o.angle-o.anglePrev)*r._baseDelta/o.deltaTime},r.getAngularSpeed=function(o){return Math.abs(r.getAngularVelocity(o))},r.setAngularSpeed=function(o,c){r.setAngularVelocity(o,l.sign(r.getAngularVelocity(o))*c)},r.translate=function(o,c,p){r.setPosition(o,h.add(o.position,c),p)},r.rotate=function(o,c,p,v){if(!p)r.setAngle(o,o.angle+c,v);else{var m=Math.cos(c),S=Math.sin(c),M=o.position.x-p.x,w=o.position.y-p.y;r.setPosition(o,{x:p.x+(M*m-w*S),y:p.y+(M*S+w*m)},v),r.setAngle(o,o.angle+c,v)}},r.scale=function(o,c,p,v){var m=0,S=0;v=v||o.position;for(var M=o.inertia===1/0,w=0;w0&&(m+=C.area,S+=C.inertia),C.position.x=v.x+(C.position.x-v.x)*c,C.position.y=v.y+(C.position.y-v.y)*p,n.update(C.bounds,C.vertices,o.velocity)}o.parts.length>1&&(o.area=m,o.isStatic||(r.setMass(o,o.density*m),r.setInertia(o,S))),o.circleRadius&&(c===p?o.circleRadius*=c:o.circleRadius=null),M&&r.setInertia(o,1/0)},r.update=function(o,c){c=(typeof c<"u"?c:16.666666666666668)*o.timeScale;var p=c*c,v=r._timeCorrection?c/(o.deltaTime||c):1,m=1-o.frictionAir*(c/l._baseDelta),S=(o.position.x-o.positionPrev.x)*v,M=(o.position.y-o.positionPrev.y)*v;o.velocity.x=S*m+o.force.x/o.mass*p,o.velocity.y=M*m+o.force.y/o.mass*p,o.positionPrev.x=o.position.x,o.positionPrev.y=o.position.y,o.position.x+=o.velocity.x,o.position.y+=o.velocity.y,o.deltaTime=c,o.angularVelocity=(o.angle-o.anglePrev)*m*v+o.torque/o.inertia*p,o.anglePrev=o.angle,o.angle+=o.angularVelocity,o.speed=h.magnitude(o.velocity),o.angularSpeed=Math.abs(o.angularVelocity);for(var w=0;w0&&(C.position.x+=o.velocity.x,C.position.y+=o.velocity.y),o.angularVelocity!==0&&(d.rotate(C.vertices,o.angularVelocity,o.position),u.rotate(C.axes,o.angularVelocity),w>0&&h.rotateAbout(C.position,o.angularVelocity,o.position,C.position)),n.update(C.bounds,C.vertices,o.velocity)}},r.updateVelocities=function(o){var c=r._baseDelta/o.deltaTime,p=o.velocity;p.x=(o.position.x-o.positionPrev.x)*c,p.y=(o.position.y-o.positionPrev.y)*c,o.speed=Math.sqrt(p.x*p.x+p.y*p.y),o.angularVelocity=(o.angle-o.anglePrev)*c,o.angularSpeed=Math.abs(o.angularVelocity)},r.applyForce=function(o,c,p){var v={x:c.x-o.position.x,y:c.y-o.position.y};o.force.x+=p.x,o.force.y+=p.y,o.torque+=v.x*p.y-v.y*p.x},r._totalProperties=function(o){for(var c={mass:0,area:0,inertia:0,centre:{x:0,y:0}},p=o.parts.length===1?0:1;p{var r={};s.exports=r;var d=e(35810),h=e(53402),a=e(15647),l=e(22562);(function(){r.create=function(n){return h.extend({id:h.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},n)},r.setModified=function(n,u,f,o){if(d.trigger(n,"compositeModified",n),n.isModified=u,u&&n.cache&&(n.cache.allBodies=null,n.cache.allConstraints=null,n.cache.allComposites=null),f&&n.parent&&r.setModified(n.parent,u,f,o),o)for(var c=0;c{var r={};s.exports=r;var d=e(69351);(function(){r.create=d.create,r.add=d.add,r.remove=d.remove,r.clear=d.clear,r.addComposite=d.addComposite,r.addBody=d.addBody,r.addConstraint=d.addConstraint})()},52284:(s,y,e)=>{var r={};s.exports=r;var d=e(41598),h=e(4506);(function(){var a=[],l={overlap:0,axis:null},n={overlap:0,axis:null};r.create=function(u,f){return{pair:null,collided:!1,bodyA:u,bodyB:f,parentA:u.parent,parentB:f.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[]}},r.collides=function(u,f,o){if(r._overlapAxes(l,u.vertices,f.vertices,u.axes),l.overlap<=0||(r._overlapAxes(n,f.vertices,u.vertices,f.axes),n.overlap<=0))return null;var c=o&&o.table[h.id(u,f)],p;c?p=c.collision:(p=r.create(u,f),p.collided=!0,p.bodyA=u.idY?Y=D:DZ?Z=D:Dp?p=m:m{var y={};s.exports=y,function(){y.create=function(e){return{vertex:e,normalImpulse:0,tangentImpulse:0}}}()},81388:(s,y,e)=>{var r={};s.exports=r;var d=e(53402),h=e(52284);(function(){r.create=function(a){var l={bodies:[],pairs:null};return d.extend(l,a)},r.setBodies=function(a,l){a.bodies=l.slice(0)},r.clear=function(a){a.bodies=[]},r.collisions=function(a){var l=[],n=a.pairs,u=a.bodies,f=u.length,o=r.canCollide,c=h.collides,p,v;for(u.sort(r._compareBoundsX),p=0;pM)break;if(!(wI.max.y)&&!(A&&(O.isStatic||O.isSleeping))&&o(m.collisionFilter,O.collisionFilter)){var D=O.parts.length;if(b&&D===1){var B=c(m,O,n);B&&l.push(B)}else for(var G=P>1?1:0,z=D>1?1:0,X=G;XI.max.x||S.max.xI.max.y)){var B=c(j,tt,n);B&&l.push(B)}}}}}return l},r.canCollide=function(a,l){return a.group===l.group&&a.group!==0?a.group>0:(a.mask&l.category)!==0&&(l.mask&a.category)!==0},r._compareBoundsX=function(a,l){return a.bounds.min.x-l.bounds.min.x}})()},4506:(s,y,e)=>{var r={};s.exports=r;var d=e(43424);(function(){r.create=function(h,a){var l=h.bodyA,n=h.bodyB,u={id:r.id(l,n),bodyA:l,bodyB:n,collision:h,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:l.isSensor||n.isSensor,timeCreated:a,timeUpdated:a,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return r.update(u,h,a),u},r.update=function(h,a,l){var n=h.contacts,u=a.supports,f=h.activeContacts,o=a.parentA,c=a.parentB,p=o.vertices.length;h.isActive=!0,h.timeUpdated=l,h.collision=a,h.separation=a.depth,h.inverseMass=o.inverseMass+c.inverseMass,h.friction=o.frictionc.frictionStatic?o.frictionStatic:c.frictionStatic,h.restitution=o.restitution>c.restitution?o.restitution:c.restitution,h.slop=o.slop>c.slop?o.slop:c.slop,a.pair=h,f.length=0;for(var v=0;v{var r={};s.exports=r;var d=e(4506),h=e(53402);(function(){r.create=function(a){return h.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},a)},r.update=function(a,l,n){var u=a.list,f=u.length,o=a.table,c=l.length,p=a.collisionStart,v=a.collisionEnd,m=a.collisionActive,S,M,w,C;for(p.length=0,v.length=0,m.length=0,C=0;C{var r={};s.exports=r;var d=e(31725),h=e(52284),a=e(15647),l=e(66280),n=e(41598);(function(){r.collides=function(u,f){for(var o=[],c=f.length,p=u.bounds,v=h.collides,m=a.overlaps,S=0;S{var r={};s.exports=r;var d=e(41598),h=e(53402),a=e(15647);(function(){r._restingThresh=2,r._restingThreshTangent=Math.sqrt(6),r._positionDampen=.9,r._positionWarming=.8,r._frictionNormalMultiplier=5,r._frictionMaxStatic=Number.MAX_VALUE,r.preSolvePosition=function(l){var n,u,f,o=l.length;for(n=0;nDt?(w=dt>0?dt:-dt,M=P.friction*(dt>0?1:-1)*o,M<-w?M=-w:M>w&&(M=w)):(M=dt,w=m);var Ht=_*z-q*G,Bt=at*z-ot*G,re=Y/(Z+O.inverseInertia*Ht*Ht+I.inverseInertia*Bt*Bt),le=(1+P.restitution)*Vt*re;if(M*=re,Vt0&&(H.normalImpulse=0),le=H.normalImpulse-ge}if(dt<-p||dt>p)H.tangentImpulse=0;else{var xe=H.tangentImpulse;H.tangentImpulse+=M,H.tangentImpulse<-w&&(H.tangentImpulse=-w),H.tangentImpulse>w&&(H.tangentImpulse=w),M=H.tangentImpulse-xe}var Pe=G*le+X*M,te=z*le+j*M;O.isStatic||O.isSleeping||(O.positionPrev.x+=Pe*O.inverseMass,O.positionPrev.y+=te*O.inverseMass,O.anglePrev+=(_*te-q*Pe)*O.inverseInertia),I.isStatic||I.isSleeping||(I.positionPrev.x-=Pe*I.inverseMass,I.positionPrev.y-=te*I.inverseMass,I.anglePrev-=(at*te-ot*Pe)*I.inverseInertia)}}}}})()},48140:(s,y,e)=>{var r={};s.exports=r;var d=e(41598),h=e(31725),a=e(53614),l=e(15647),n=e(66615),u=e(53402);(function(){r._warming=.4,r._torqueDampen=1,r._minLength=1e-6,r.create=function(f){var o=f;o.bodyA&&!o.pointA&&(o.pointA={x:0,y:0}),o.bodyB&&!o.pointB&&(o.pointB={x:0,y:0});var c=o.bodyA?h.add(o.bodyA.position,o.pointA):o.pointA,p=o.bodyB?h.add(o.bodyB.position,o.pointB):o.pointB,v=h.magnitude(h.sub(c,p));o.length=typeof o.length<"u"?o.length:v,o.id=o.id||u.nextId(),o.label=o.label||"Constraint",o.type="constraint",o.stiffness=o.stiffness||(o.length>0?1:.7),o.damping=o.damping||0,o.angularStiffness=o.angularStiffness||0,o.angleA=o.bodyA?o.bodyA.angle:o.angleA,o.angleB=o.bodyB?o.bodyB.angle:o.angleB,o.plugin={};var m={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return o.length===0&&o.stiffness>.1?(m.type="pin",m.anchors=!1):o.stiffness<.9&&(m.type="spring"),o.render=u.extend(m,o.render),o},r.preSolveAll=function(f){for(var o=0;o=1||f.length===0,b=P?f.stiffness*o:f.stiffness*o*o,O=f.damping*o,I=h.mult(w,A*b),D=(c?c.inverseMass:0)+(p?p.inverseMass:0),B=(c?c.inverseInertia:0)+(p?p.inverseInertia:0),G=D+B,z,X,j,Q,tt;if(O>0){var Y=h.create();j=h.div(w,C),tt=h.sub(p&&h.sub(p.position,p.positionPrev)||Y,c&&h.sub(c.position,c.positionPrev)||Y),Q=h.dot(j,tt)}c&&!c.isStatic&&(X=c.inverseMass/D,c.constraintImpulse.x-=I.x*X,c.constraintImpulse.y-=I.y*X,c.position.x-=I.x*X,c.position.y-=I.y*X,O>0&&(c.positionPrev.x-=O*j.x*Q*X,c.positionPrev.y-=O*j.y*Q*X),z=h.cross(v,I)/G*r._torqueDampen*c.inverseInertia*(1-f.angularStiffness),c.constraintImpulse.angle-=z,c.angle-=z),p&&!p.isStatic&&(X=p.inverseMass/D,p.constraintImpulse.x+=I.x*X,p.constraintImpulse.y+=I.y*X,p.position.x+=I.x*X,p.position.y+=I.y*X,O>0&&(p.positionPrev.x+=O*j.x*Q*X,p.positionPrev.y+=O*j.y*Q*X),z=h.cross(m,I)/G*r._torqueDampen*p.inverseInertia*(1-f.angularStiffness),p.constraintImpulse.angle+=z,p.angle+=z)}}},r.postSolveAll=function(f){for(var o=0;o0&&(m.position.x+=p.x,m.position.y+=p.y),p.angle!==0&&(d.rotate(m.vertices,p.angle,c.position),n.rotate(m.axes,p.angle),v>0&&h.rotateAbout(m.position,p.angle,c.position,m.position)),l.update(m.bounds,m.vertices,c.velocity)}p.angle*=r._warming,p.x*=r._warming,p.y*=r._warming}}},r.pointAWorld=function(f){return{x:(f.bodyA?f.bodyA.position.x:0)+(f.pointA?f.pointA.x:0),y:(f.bodyA?f.bodyA.position.y:0)+(f.pointA?f.pointA.y:0)}},r.pointBWorld=function(f){return{x:(f.bodyB?f.bodyB.position.x:0)+(f.pointB?f.pointB.x:0),y:(f.bodyB?f.bodyB.position.y:0)+(f.pointB?f.pointB.y:0)}},r.currentLength=function(f){var o=(f.bodyA?f.bodyA.position.x:0)+(f.pointA?f.pointA.x:0),c=(f.bodyA?f.bodyA.position.y:0)+(f.pointA?f.pointA.y:0),p=(f.bodyB?f.bodyB.position.x:0)+(f.pointB?f.pointB.x:0),v=(f.bodyB?f.bodyB.position.y:0)+(f.pointB?f.pointB.y:0),m=o-p,S=c-v;return Math.sqrt(m*m+S*S)}})()},53402:(s,y,e)=>{var r={};s.exports=r,function(){r._baseDelta=16.666666666666668,r._nextId=0,r._seed=0,r._nowStartTime=+new Date,r._warnedOnce={},r._decomp=null,r.extend=function(h,a){var l,n;typeof a=="boolean"?(l=2,n=a):(l=1,n=!0);for(var u=l;u0;a--){var l=Math.floor(r.random()*(a+1)),n=h[a];h[a]=h[l],h[l]=n}return h},r.choose=function(h){return h[Math.floor(r.random()*h.length)]},r.isElement=function(h){return typeof HTMLElement<"u"?h instanceof HTMLElement:!!(h&&h.nodeType&&h.nodeName)},r.isArray=function(h){return Object.prototype.toString.call(h)==="[object Array]"},r.isFunction=function(h){return typeof h=="function"},r.isPlainObject=function(h){return typeof h=="object"&&h.constructor===Object},r.isString=function(h){return toString.call(h)==="[object String]"},r.clamp=function(h,a,l){return hl?l:h},r.sign=function(h){return h<0?-1:1},r.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-r._nowStartTime},r.random=function(h,a){return h=typeof h<"u"?h:0,a=typeof a<"u"?a:1,h+d()*(a-h)};var d=function(){return r._seed=(r._seed*9301+49297)%233280,r._seed/233280};r.colorToNumber=function(h){return h=h.replace("#",""),h.length==3&&(h=h.charAt(0)+h.charAt(0)+h.charAt(1)+h.charAt(1)+h.charAt(2)+h.charAt(2)),parseInt(h,16)},r.logLevel=1,r.log=function(){console&&r.logLevel>0&&r.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.info=function(){console&&r.logLevel>0&&r.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.warn=function(){console&&r.logLevel>0&&r.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.warnOnce=function(){var h=Array.prototype.slice.call(arguments).join(" ");r._warnedOnce[h]||(r.warn(h),r._warnedOnce[h]=!0)},r.deprecated=function(h,a,l){h[a]=r.chain(function(){r.warnOnce("🔅 deprecated 🔅",l)},h[a])},r.nextId=function(){return r._nextId++},r.indexOf=function(h,a){if(h.indexOf)return h.indexOf(a);for(var l=0;l{var r={};s.exports=r;var d=e(53614),h=e(66272),a=e(81388),l=e(99561),n=e(35810),u=e(69351),f=e(48140),o=e(53402),c=e(22562);(function(){r.create=function(p){p=p||{};var v={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}},m=o.extend(v,p);return m.world=p.world||u.create({label:"World"}),m.pairs=p.pairs||l.create(),m.detector=p.detector||a.create(),m.grid={buckets:[]},m.world.gravity=m.gravity,m.broadphase=m.grid,m.metrics={},m},r.update=function(p,v){var m=o.now(),S=p.world,M=p.detector,w=p.pairs,C=p.timing,A=C.timestamp,P;v=typeof v<"u"?v:o._baseDelta,v*=C.timeScale,C.timestamp+=v,C.lastDelta=v;var b={timestamp:C.timestamp,delta:v};n.trigger(p,"beforeUpdate",b);var O=u.allBodies(S),I=u.allConstraints(S);for(S.isModified&&(a.setBodies(M,O),u.setModified(S,!1,!1,!0)),p.enableSleeping&&d.update(O,v),r._bodiesApplyGravity(O,p.gravity),v>0&&r._bodiesUpdate(O,v),n.trigger(p,"beforeSolve",b),f.preSolveAll(O),P=0;P0&&n.trigger(p,"collisionStart",{pairs:w.collisionStart,timestamp:C.timestamp,delta:v});var B=o.clamp(20/p.positionIterations,0,1);for(h.preSolvePosition(w.list),P=0;P0&&n.trigger(p,"collisionActive",{pairs:w.collisionActive,timestamp:C.timestamp,delta:v}),w.collisionEnd.length>0&&n.trigger(p,"collisionEnd",{pairs:w.collisionEnd,timestamp:C.timestamp,delta:v}),r._bodiesClearForces(O),n.trigger(p,"afterUpdate",b),p.timing.lastElapsed=o.now()-m,p},r.merge=function(p,v){if(o.extend(p,v),v.world){p.world=v.world,r.clear(p);for(var m=u.allBodies(p.world),S=0;S{var r={};s.exports=r;var d=e(53402);(function(){r.on=function(h,a,l){for(var n=a.split(" "),u,f=0;f0){l||(l={}),n=a.split(" ");for(var p=0;p{var r={};s.exports=r;var d=e(73832),h=e(53402);(function(){r.name="matter-js",r.version="0.19.0",r.uses=[],r.used=[],r.use=function(){d.use(r,Array.prototype.slice.call(arguments))},r.before=function(a,l){return a=a.replace(/^Matter./,""),h.chainPathBefore(r,a,l)},r.after=function(a,l){return a=a.replace(/^Matter./,""),h.chainPathAfter(r,a,l)}})()},73832:(s,y,e)=>{var r={};s.exports=r;var d=e(53402);(function(){r._registry={},r.register=function(h){if(r.isPlugin(h)||d.warn("Plugin.register:",r.toString(h),"does not implement all required fields."),h.name in r._registry){var a=r._registry[h.name],l=r.versionParse(h.version).number,n=r.versionParse(a.version).number;l>n?(d.warn("Plugin.register:",r.toString(a),"was upgraded to",r.toString(h)),r._registry[h.name]=h):l-1},r.isFor=function(h,a){var l=h.for&&r.dependencyParse(h.for);return!h.for||a.name===l.name&&r.versionSatisfies(a.version,l.range)},r.use=function(h,a){if(h.uses=(h.uses||[]).concat(a||[]),h.uses.length===0){d.warn("Plugin.use:",r.toString(h),"does not specify any dependencies to install.");return}for(var l=r.dependencies(h),n=d.topologicalSort(l),u=[],f=0;f0&&!o.silent&&d.info(u.join(" "))},r.dependencies=function(h,a){var l=r.dependencyParse(h),n=l.name;if(a=a||{},!(n in a)){h=r.resolve(h)||h,a[n]=d.map(h.uses||[],function(f){r.isPlugin(f)&&r.register(f);var o=r.dependencyParse(f),c=r.resolve(f);return c&&!r.versionSatisfies(c.version,o.range)?(d.warn("Plugin.dependencies:",r.toString(c),"does not satisfy",r.toString(o),"used by",r.toString(l)+"."),c._warned=!0,h._warned=!0):c||(d.warn("Plugin.dependencies:",r.toString(f),"used by",r.toString(l),"could not be resolved."),h._warned=!0),o.name});for(var u=0;u=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;a.test(h)||d.warn("Plugin.versionParse:",h,"is not a valid version or range.");var l=a.exec(h),n=Number(l[4]),u=Number(l[5]),f=Number(l[6]);return{isRange:!!(l[1]||l[2]),version:l[3],range:h,operator:l[1]||l[2]||"",major:n,minor:u,patch:f,parts:[n,u,f],prerelease:l[7],number:n*1e8+u*1e4+f}},r.versionSatisfies=function(h,a){a=a||"*";var l=r.versionParse(a),n=r.versionParse(h);if(l.isRange){if(l.operator==="*"||h==="*")return!0;if(l.operator===">")return n.number>l.number;if(l.operator===">=")return n.number>=l.number;if(l.operator==="~")return n.major===l.major&&n.minor===l.minor&&n.patch>=l.patch;if(l.operator==="^")return l.major>0?n.major===l.major&&n.number>=l.number:l.minor>0?n.minor===l.minor&&n.patch>=l.patch:n.patch===l.patch}return h===a||h==="*"}})()},53614:(s,y,e)=>{var r={};s.exports=r;var d=e(22562),h=e(35810),a=e(53402);(function(){r._motionWakeThreshold=.18,r._motionSleepThreshold=.08,r._minBias=.9,r.update=function(l,n){for(var u=n/a._baseDelta,f=r._motionSleepThreshold,o=0;o0&&c.motion=c.sleepThreshold/u&&r.set(c,!0)):c.sleepCounter>0&&(c.sleepCounter-=1)}},r.afterCollisions=function(l){for(var n=r._motionSleepThreshold,u=0;un&&r.set(v,!1)}}}},r.set=function(l,n){var u=l.isSleeping;n?(l.isSleeping=!0,l.sleepCounter=l.sleepThreshold,l.positionImpulse.x=0,l.positionImpulse.y=0,l.positionPrev.x=l.position.x,l.positionPrev.y=l.position.y,l.anglePrev=l.angle,l.speed=0,l.angularSpeed=0,l.motion=0,u||h.trigger(l,"sleepStart")):(l.isSleeping=!1,l.sleepCounter=0,u&&h.trigger(l,"sleepEnd"))}})()},66280:(s,y,e)=>{var r={};s.exports=r;var d=e(41598),h=e(53402),a=e(22562),l=e(15647),n=e(31725);(function(){r.rectangle=function(u,f,o,c,p){p=p||{};var v={label:"Rectangle Body",position:{x:u,y:f},vertices:d.fromPath("L 0 0 L "+o+" 0 L "+o+" "+c+" L 0 "+c)};if(p.chamfer){var m=p.chamfer;v.vertices=d.chamfer(v.vertices,m.radius,m.quality,m.qualityMin,m.qualityMax),delete p.chamfer}return a.create(h.extend({},v,p))},r.trapezoid=function(u,f,o,c,p,v){v=v||{},p*=.5;var m=(1-p*2)*o,S=o*p,M=S+m,w=M+S,C;p<.5?C="L 0 0 L "+S+" "+-c+" L "+M+" "+-c+" L "+w+" 0":C="L 0 0 L "+M+" "+-c+" L "+w+" 0";var A={label:"Trapezoid Body",position:{x:u,y:f},vertices:d.fromPath(C)};if(v.chamfer){var P=v.chamfer;A.vertices=d.chamfer(A.vertices,P.radius,P.quality,P.qualityMin,P.qualityMax),delete v.chamfer}return a.create(h.extend({},A,v))},r.circle=function(u,f,o,c,p){c=c||{};var v={label:"Circle Body",circleRadius:o};p=p||25;var m=Math.ceil(Math.max(10,Math.min(p,o)));return m%2===1&&(m+=1),r.polygon(u,f,m,o,h.extend({},v,c))},r.polygon=function(u,f,o,c,p){if(p=p||{},o<3)return r.circle(u,f,c,p);for(var v=2*Math.PI/o,m="",S=v*.5,M=0;M0&&d.area(tt)1?(C=a.create(h.extend({parts:A.slice(0)},c)),a.setPosition(C,{x:u,y:f}),C):A[0]},r.flagCoincidentParts=function(u,f){f===void 0&&(f=5);for(var o=0;o{var r={};s.exports=r;var d=e(69351),h=e(48140),a=e(53402),l=e(22562),n=e(66280);(function(){r.stack=function(u,f,o,c,p,v,m){for(var S=d.create({label:"Stack"}),M=u,w=f,C,A=0,P=0;Pb&&(b=D),l.translate(I,{x:B*.5,y:D*.5}),M=I.bounds.max.x+p,d.addBody(S,I),C=I,A+=1}else M+=p}w+=b+v,M=u}return S},r.chain=function(u,f,o,c,p,v){for(var m=u.bodies,S=1;S0)for(S=0;S0&&(C=v[S-1+(m-1)*f],d.addConstraint(u,h.create(a.extend({bodyA:C,bodyB:w},p)))),c&&Sb)){C=b-C;var I=C,D=o-1-C;if(!(wD)){P===1&&l.translate(A,{x:(w+(o%2===1?1:-1))*O,y:0});var B=A?w*O:0;return m(u+B+w*p,M,w,C,A,P)}}})},r.newtonsCradle=function(u,f,o,c,p){for(var v=d.create({label:"Newtons Cradle"}),m=0;m{var r={};s.exports=r;var d=e(31725),h=e(53402);(function(){r.fromVertices=function(a){for(var l={},n=0;n{var y={};s.exports=y,function(){y.create=function(e){var r={min:{x:0,y:0},max:{x:0,y:0}};return e&&y.update(r,e),r},y.update=function(e,r,d){e.min.x=1/0,e.max.x=-1/0,e.min.y=1/0,e.max.y=-1/0;for(var h=0;he.max.x&&(e.max.x=a.x),a.xe.max.y&&(e.max.y=a.y),a.y0?e.max.x+=d.x:e.min.x+=d.x,d.y>0?e.max.y+=d.y:e.min.y+=d.y)},y.contains=function(e,r){return r.x>=e.min.x&&r.x<=e.max.x&&r.y>=e.min.y&&r.y<=e.max.y},y.overlaps=function(e,r){return e.min.x<=r.max.x&&e.max.x>=r.min.x&&e.max.y>=r.min.y&&e.min.y<=r.max.y},y.translate=function(e,r){e.min.x+=r.x,e.max.x+=r.x,e.min.y+=r.y,e.max.y+=r.y},y.shift=function(e,r){var d=e.max.x-e.min.x,h=e.max.y-e.min.y;e.min.x=r.x,e.max.x=r.x+d,e.min.y=r.y,e.max.y=r.y+h}}()},74058:(s,y,e)=>{var r={};s.exports=r,e(15647);var d=e(53402);(function(){r.pathToVertices=function(h,a){typeof window<"u"&&!("SVGPathSeg"in window)&&d.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var l,n,u,f,o,c,p,v,m,S,M=[],w,C,A=0,P=0,b=0;a=a||15;var O=function(D,B,G){var z=G%2===1&&G>1;if(!m||D!=m.x||B!=m.y){m&&z?(w=m.x,C=m.y):(w=0,C=0);var X={x:w+D,y:C+B};(z||!m)&&(m=X),M.push(X),P=w+D,b=C+B}},I=function(D){var B=D.pathSegTypeAsLetter.toUpperCase();if(B!=="Z"){switch(B){case"M":case"L":case"T":case"C":case"S":case"Q":P=D.x,b=D.y;break;case"H":P=D.x;break;case"V":b=D.y;break}O(P,b,D.pathSegType)}};for(r._svgPathToAbsolute(h),u=h.getTotalLength(),c=[],l=0;l{var y={};s.exports=y,function(){y.create=function(e,r){return{x:e||0,y:r||0}},y.clone=function(e){return{x:e.x,y:e.y}},y.magnitude=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},y.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},y.rotate=function(e,r,d){var h=Math.cos(r),a=Math.sin(r);d||(d={});var l=e.x*h-e.y*a;return d.y=e.x*a+e.y*h,d.x=l,d},y.rotateAbout=function(e,r,d,h){var a=Math.cos(r),l=Math.sin(r);h||(h={});var n=d.x+((e.x-d.x)*a-(e.y-d.y)*l);return h.y=d.y+((e.x-d.x)*l+(e.y-d.y)*a),h.x=n,h},y.normalise=function(e){var r=y.magnitude(e);return r===0?{x:0,y:0}:{x:e.x/r,y:e.y/r}},y.dot=function(e,r){return e.x*r.x+e.y*r.y},y.cross=function(e,r){return e.x*r.y-e.y*r.x},y.cross3=function(e,r,d){return(r.x-e.x)*(d.y-e.y)-(r.y-e.y)*(d.x-e.x)},y.add=function(e,r,d){return d||(d={}),d.x=e.x+r.x,d.y=e.y+r.y,d},y.sub=function(e,r,d){return d||(d={}),d.x=e.x-r.x,d.y=e.y-r.y,d},y.mult=function(e,r){return{x:e.x*r,y:e.y*r}},y.div=function(e,r){return{x:e.x/r,y:e.y/r}},y.perp=function(e,r){return r=r===!0?-1:1,{x:r*-e.y,y:r*e.x}},y.neg=function(e){return{x:-e.x,y:-e.y}},y.angle=function(e,r){return Math.atan2(r.y-e.y,r.x-e.x)},y._temp=[y.create(),y.create(),y.create(),y.create(),y.create(),y.create()]}()},41598:(s,y,e)=>{var r={};s.exports=r;var d=e(31725),h=e(53402);(function(){r.create=function(a,l){for(var n=[],u=0;u0)return!1;o=c}return!0},r.scale=function(a,l,n,u){if(l===1&&n===1)return a;u=u||r.centre(a);for(var f,o,c=0;c=0?c-1:a.length-1],v=a[c],m=a[(c+1)%a.length],S=l[c0&&(l|=2),l===3)return!1;return l!==0?!0:null},r.hull=function(a){var l=[],n=[],u,f;for(a=a.slice(0),a.sort(function(o,c){var p=o.x-c.x;return p!==0?p:o.y-c.y}),f=0;f=2&&d.cross3(n[n.length-2],n[n.length-1],u)<=0;)n.pop();n.push(u)}for(f=a.length-1;f>=0;f-=1){for(u=a[f];l.length>=2&&d.cross3(l[l.length-2],l[l.length-1],u)<=0;)l.pop();l.push(u)}return l.pop(),n.pop(),l.concat(n)}})()},18210:(s,y,e)=>{var r=e(19933),d={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.19.0",silent:!0,install:function(h){h.after("Body.create",function(){d.Body.init(this)}),h.before("Engine.update",function(a){d.Engine.update(a)})},Body:{init:function(h){h.plugin.attractors=h.plugin.attractors||[]}},Engine:{update:function(h){for(var a=r.Composite.allBodies(h.world),l=0;l0)for(var f=0;f{/** + */s.exports={BodyBounds:e(68174),Components:e(31884),Events:e(1121),Factory:e(28137),MatterGameObject:e(75803),Image:e(23181),Matter:e(19933),MatterPhysics:e(42045),PolyDecomp:e(55973),Sprite:e(34803),TileBody:e(73834),PhysicsEditorParser:e(19496),PhysicsJSONParser:e(85791),PointerConstraint:e(98713),World:e(68243)}},22562:(s,x,e)=>{var r={};s.exports=r;var d=e(41598),h=e(31725),a=e(53614),l=e(53402),n=e(15647),u=e(66615);(function(){r._timeCorrection=!0,r._inertiaScale=4,r._nextCollidingGroupId=1,r._nextNonCollidingGroupId=-1,r._nextCategory=1,r._baseDelta=16.666666666666668,r.create=function(o){var c={id:l.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:{}};!o.hasOwnProperty("position")&&o.hasOwnProperty("vertices")?o.position=d.centre(o.vertices):o.hasOwnProperty("vertices")||(c.vertices=d.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var p=l.extend(c,o);return f(p,o),p.setOnCollideWith=function(v,m){return m?this.onCollideWith[v.id]=m:delete this.onCollideWith[v.id],this},p},r.nextGroup=function(o){return o?r._nextNonCollidingGroupId--:r._nextCollidingGroupId++},r.nextCategory=function(){return r._nextCategory=r._nextCategory<<1,r._nextCategory};var f=function(o,c){if(c=c||{},r.set(o,{bounds:o.bounds||n.create(o.vertices),positionPrev:o.positionPrev||h.clone(o.position),anglePrev:o.anglePrev||o.angle,vertices:o.vertices,parts:o.parts||[o],isStatic:o.isStatic,isSleeping:o.isSleeping,parent:o.parent||o}),d.rotate(o.vertices,o.angle,o.position),u.rotate(o.axes,o.angle),n.update(o.bounds,o.vertices,o.velocity),r.set(o,{axes:c.axes||o.axes,area:c.area||o.area,mass:c.mass||o.mass,inertia:c.inertia||o.inertia}),o.parts.length===1){var p=o.bounds,v=o.centerOfMass,m=o.centerOffset,S=p.max.x-p.min.x,M=p.max.y-p.min.y;v.x=-(p.min.x-o.position.x)/S,v.y=-(p.min.y-o.position.y)/M,m.x=S*v.x,m.y=M*v.y}};r.set=function(o,c,p){var v;typeof c=="string"&&(v=c,c={},c[v]=p);for(v in c)if(Object.prototype.hasOwnProperty.call(c,v))switch(p=c[v],v){case"isStatic":r.setStatic(o,p);break;case"isSleeping":a.set(o,p);break;case"mass":r.setMass(o,p);break;case"density":r.setDensity(o,p);break;case"inertia":r.setInertia(o,p);break;case"vertices":r.setVertices(o,p);break;case"position":r.setPosition(o,p);break;case"angle":r.setAngle(o,p);break;case"velocity":r.setVelocity(o,p);break;case"angularVelocity":r.setAngularVelocity(o,p);break;case"speed":r.setSpeed(o,p);break;case"angularSpeed":r.setAngularSpeed(o,p);break;case"parts":r.setParts(o,p);break;case"centre":r.setCentre(o,p);break;default:o[v]=p}},r.setStatic=function(o,c){for(var p=0;p0&&h.rotateAbout(S.position,v,o.position,S.position)}},r.setVelocity=function(o,c){var p=o.deltaTime/r._baseDelta;o.positionPrev.x=o.position.x-c.x*p,o.positionPrev.y=o.position.y-c.y*p,o.velocity.x=(o.position.x-o.positionPrev.x)/p,o.velocity.y=(o.position.y-o.positionPrev.y)/p,o.speed=h.magnitude(o.velocity)},r.getVelocity=function(o){var c=r._baseDelta/o.deltaTime;return{x:(o.position.x-o.positionPrev.x)*c,y:(o.position.y-o.positionPrev.y)*c}},r.getSpeed=function(o){return h.magnitude(r.getVelocity(o))},r.setSpeed=function(o,c){r.setVelocity(o,h.mult(h.normalise(r.getVelocity(o)),c))},r.setAngularVelocity=function(o,c){var p=o.deltaTime/r._baseDelta;o.anglePrev=o.angle-c*p,o.angularVelocity=(o.angle-o.anglePrev)/p,o.angularSpeed=Math.abs(o.angularVelocity)},r.getAngularVelocity=function(o){return(o.angle-o.anglePrev)*r._baseDelta/o.deltaTime},r.getAngularSpeed=function(o){return Math.abs(r.getAngularVelocity(o))},r.setAngularSpeed=function(o,c){r.setAngularVelocity(o,l.sign(r.getAngularVelocity(o))*c)},r.translate=function(o,c,p){r.setPosition(o,h.add(o.position,c),p)},r.rotate=function(o,c,p,v){if(!p)r.setAngle(o,o.angle+c,v);else{var m=Math.cos(c),S=Math.sin(c),M=o.position.x-p.x,w=o.position.y-p.y;r.setPosition(o,{x:p.x+(M*m-w*S),y:p.y+(M*S+w*m)},v),r.setAngle(o,o.angle+c,v)}},r.scale=function(o,c,p,v){var m=0,S=0;v=v||o.position;for(var M=o.inertia===1/0,w=0;w0&&(m+=C.area,S+=C.inertia),C.position.x=v.x+(C.position.x-v.x)*c,C.position.y=v.y+(C.position.y-v.y)*p,n.update(C.bounds,C.vertices,o.velocity)}o.parts.length>1&&(o.area=m,o.isStatic||(r.setMass(o,o.density*m),r.setInertia(o,S))),o.circleRadius&&(c===p?o.circleRadius*=c:o.circleRadius=null),M&&r.setInertia(o,1/0)},r.update=function(o,c){c=(typeof c<"u"?c:16.666666666666668)*o.timeScale;var p=c*c,v=r._timeCorrection?c/(o.deltaTime||c):1,m=1-o.frictionAir*(c/l._baseDelta),S=(o.position.x-o.positionPrev.x)*v,M=(o.position.y-o.positionPrev.y)*v;o.velocity.x=S*m+o.force.x/o.mass*p,o.velocity.y=M*m+o.force.y/o.mass*p,o.positionPrev.x=o.position.x,o.positionPrev.y=o.position.y,o.position.x+=o.velocity.x,o.position.y+=o.velocity.y,o.deltaTime=c,o.angularVelocity=(o.angle-o.anglePrev)*m*v+o.torque/o.inertia*p,o.anglePrev=o.angle,o.angle+=o.angularVelocity,o.speed=h.magnitude(o.velocity),o.angularSpeed=Math.abs(o.angularVelocity);for(var w=0;w0&&(C.position.x+=o.velocity.x,C.position.y+=o.velocity.y),o.angularVelocity!==0&&(d.rotate(C.vertices,o.angularVelocity,o.position),u.rotate(C.axes,o.angularVelocity),w>0&&h.rotateAbout(C.position,o.angularVelocity,o.position,C.position)),n.update(C.bounds,C.vertices,o.velocity)}},r.updateVelocities=function(o){var c=r._baseDelta/o.deltaTime,p=o.velocity;p.x=(o.position.x-o.positionPrev.x)*c,p.y=(o.position.y-o.positionPrev.y)*c,o.speed=Math.sqrt(p.x*p.x+p.y*p.y),o.angularVelocity=(o.angle-o.anglePrev)*c,o.angularSpeed=Math.abs(o.angularVelocity)},r.applyForce=function(o,c,p){var v={x:c.x-o.position.x,y:c.y-o.position.y};o.force.x+=p.x,o.force.y+=p.y,o.torque+=v.x*p.y-v.y*p.x},r._totalProperties=function(o){for(var c={mass:0,area:0,inertia:0,centre:{x:0,y:0}},p=o.parts.length===1?0:1;p{var r={};s.exports=r;var d=e(35810),h=e(53402),a=e(15647),l=e(22562);(function(){r.create=function(n){return h.extend({id:h.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},n)},r.setModified=function(n,u,f,o){if(d.trigger(n,"compositeModified",n),n.isModified=u,u&&n.cache&&(n.cache.allBodies=null,n.cache.allConstraints=null,n.cache.allComposites=null),f&&n.parent&&r.setModified(n.parent,u,f,o),o)for(var c=0;c{var r={};s.exports=r;var d=e(69351);(function(){r.create=d.create,r.add=d.add,r.remove=d.remove,r.clear=d.clear,r.addComposite=d.addComposite,r.addBody=d.addBody,r.addConstraint=d.addConstraint})()},52284:(s,x,e)=>{var r={};s.exports=r;var d=e(41598),h=e(4506);(function(){var a=[],l={overlap:0,axis:null},n={overlap:0,axis:null};r.create=function(u,f){return{pair:null,collided:!1,bodyA:u,bodyB:f,parentA:u.parent,parentB:f.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[]}},r.collides=function(u,f,o){if(r._overlapAxes(l,u.vertices,f.vertices,u.axes),l.overlap<=0||(r._overlapAxes(n,f.vertices,u.vertices,f.axes),n.overlap<=0))return null;var c=o&&o.table[h.id(u,f)],p;c?p=c.collision:(p=r.create(u,f),p.collided=!0,p.bodyA=u.idY?Y=D:D$?$=D:Dp?p=m:m{var x={};s.exports=x,function(){x.create=function(e){return{vertex:e,normalImpulse:0,tangentImpulse:0}}}()},81388:(s,x,e)=>{var r={};s.exports=r;var d=e(53402),h=e(52284);(function(){r.create=function(a){var l={bodies:[],pairs:null};return d.extend(l,a)},r.setBodies=function(a,l){a.bodies=l.slice(0)},r.clear=function(a){a.bodies=[]},r.collisions=function(a){var l=[],n=a.pairs,u=a.bodies,f=u.length,o=r.canCollide,c=h.collides,p,v;for(u.sort(r._compareBoundsX),p=0;pM)break;if(!(wI.max.y)&&!(A&&(O.isStatic||O.isSleeping))&&o(m.collisionFilter,O.collisionFilter)){var D=O.parts.length;if(b&&D===1){var B=c(m,O,n);B&&l.push(B)}else for(var G=P>1?1:0,z=D>1?1:0,X=G;XI.max.x||S.max.xI.max.y)){var B=c(j,tt,n);B&&l.push(B)}}}}}return l},r.canCollide=function(a,l){return a.group===l.group&&a.group!==0?a.group>0:(a.mask&l.category)!==0&&(l.mask&a.category)!==0},r._compareBoundsX=function(a,l){return a.bounds.min.x-l.bounds.min.x}})()},4506:(s,x,e)=>{var r={};s.exports=r;var d=e(43424);(function(){r.create=function(h,a){var l=h.bodyA,n=h.bodyB,u={id:r.id(l,n),bodyA:l,bodyB:n,collision:h,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:l.isSensor||n.isSensor,timeCreated:a,timeUpdated:a,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return r.update(u,h,a),u},r.update=function(h,a,l){var n=h.contacts,u=a.supports,f=h.activeContacts,o=a.parentA,c=a.parentB,p=o.vertices.length;h.isActive=!0,h.timeUpdated=l,h.collision=a,h.separation=a.depth,h.inverseMass=o.inverseMass+c.inverseMass,h.friction=o.frictionc.frictionStatic?o.frictionStatic:c.frictionStatic,h.restitution=o.restitution>c.restitution?o.restitution:c.restitution,h.slop=o.slop>c.slop?o.slop:c.slop,a.pair=h,f.length=0;for(var v=0;v{var r={};s.exports=r;var d=e(4506),h=e(53402);(function(){r.create=function(a){return h.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},a)},r.update=function(a,l,n){var u=a.list,f=u.length,o=a.table,c=l.length,p=a.collisionStart,v=a.collisionEnd,m=a.collisionActive,S,M,w,C;for(p.length=0,v.length=0,m.length=0,C=0;C{var r={};s.exports=r;var d=e(31725),h=e(52284),a=e(15647),l=e(66280),n=e(41598);(function(){r.collides=function(u,f){for(var o=[],c=f.length,p=u.bounds,v=h.collides,m=a.overlaps,S=0;S{var r={};s.exports=r;var d=e(41598),h=e(53402),a=e(15647);(function(){r._restingThresh=2,r._restingThreshTangent=Math.sqrt(6),r._positionDampen=.9,r._positionWarming=.8,r._frictionNormalMultiplier=5,r._frictionMaxStatic=Number.MAX_VALUE,r.preSolvePosition=function(l){var n,u,f,o=l.length;for(n=0;nDt?(w=dt>0?dt:-dt,M=P.friction*(dt>0?1:-1)*o,M<-w?M=-w:M>w&&(M=w)):(M=dt,w=m);var Ht=_*z-q*G,Bt=at*z-ot*G,re=Y/($+O.inverseInertia*Ht*Ht+I.inverseInertia*Bt*Bt),le=(1+P.restitution)*Vt*re;if(M*=re,Vt0&&(H.normalImpulse=0),le=H.normalImpulse-ge}if(dt<-p||dt>p)H.tangentImpulse=0;else{var xe=H.tangentImpulse;H.tangentImpulse+=M,H.tangentImpulse<-w&&(H.tangentImpulse=-w),H.tangentImpulse>w&&(H.tangentImpulse=w),M=H.tangentImpulse-xe}var Pe=G*le+X*M,te=z*le+j*M;O.isStatic||O.isSleeping||(O.positionPrev.x+=Pe*O.inverseMass,O.positionPrev.y+=te*O.inverseMass,O.anglePrev+=(_*te-q*Pe)*O.inverseInertia),I.isStatic||I.isSleeping||(I.positionPrev.x-=Pe*I.inverseMass,I.positionPrev.y-=te*I.inverseMass,I.anglePrev-=(at*te-ot*Pe)*I.inverseInertia)}}}}})()},48140:(s,x,e)=>{var r={};s.exports=r;var d=e(41598),h=e(31725),a=e(53614),l=e(15647),n=e(66615),u=e(53402);(function(){r._warming=.4,r._torqueDampen=1,r._minLength=1e-6,r.create=function(f){var o=f;o.bodyA&&!o.pointA&&(o.pointA={x:0,y:0}),o.bodyB&&!o.pointB&&(o.pointB={x:0,y:0});var c=o.bodyA?h.add(o.bodyA.position,o.pointA):o.pointA,p=o.bodyB?h.add(o.bodyB.position,o.pointB):o.pointB,v=h.magnitude(h.sub(c,p));o.length=typeof o.length<"u"?o.length:v,o.id=o.id||u.nextId(),o.label=o.label||"Constraint",o.type="constraint",o.stiffness=o.stiffness||(o.length>0?1:.7),o.damping=o.damping||0,o.angularStiffness=o.angularStiffness||0,o.angleA=o.bodyA?o.bodyA.angle:o.angleA,o.angleB=o.bodyB?o.bodyB.angle:o.angleB,o.plugin={};var m={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return o.length===0&&o.stiffness>.1?(m.type="pin",m.anchors=!1):o.stiffness<.9&&(m.type="spring"),o.render=u.extend(m,o.render),o},r.preSolveAll=function(f){for(var o=0;o=1||f.length===0,b=P?f.stiffness*o:f.stiffness*o*o,O=f.damping*o,I=h.mult(w,A*b),D=(c?c.inverseMass:0)+(p?p.inverseMass:0),B=(c?c.inverseInertia:0)+(p?p.inverseInertia:0),G=D+B,z,X,j,Q,tt;if(O>0){var Y=h.create();j=h.div(w,C),tt=h.sub(p&&h.sub(p.position,p.positionPrev)||Y,c&&h.sub(c.position,c.positionPrev)||Y),Q=h.dot(j,tt)}c&&!c.isStatic&&(X=c.inverseMass/D,c.constraintImpulse.x-=I.x*X,c.constraintImpulse.y-=I.y*X,c.position.x-=I.x*X,c.position.y-=I.y*X,O>0&&(c.positionPrev.x-=O*j.x*Q*X,c.positionPrev.y-=O*j.y*Q*X),z=h.cross(v,I)/G*r._torqueDampen*c.inverseInertia*(1-f.angularStiffness),c.constraintImpulse.angle-=z,c.angle-=z),p&&!p.isStatic&&(X=p.inverseMass/D,p.constraintImpulse.x+=I.x*X,p.constraintImpulse.y+=I.y*X,p.position.x+=I.x*X,p.position.y+=I.y*X,O>0&&(p.positionPrev.x+=O*j.x*Q*X,p.positionPrev.y+=O*j.y*Q*X),z=h.cross(m,I)/G*r._torqueDampen*p.inverseInertia*(1-f.angularStiffness),p.constraintImpulse.angle+=z,p.angle+=z)}}},r.postSolveAll=function(f){for(var o=0;o0&&(m.position.x+=p.x,m.position.y+=p.y),p.angle!==0&&(d.rotate(m.vertices,p.angle,c.position),n.rotate(m.axes,p.angle),v>0&&h.rotateAbout(m.position,p.angle,c.position,m.position)),l.update(m.bounds,m.vertices,c.velocity)}p.angle*=r._warming,p.x*=r._warming,p.y*=r._warming}}},r.pointAWorld=function(f){return{x:(f.bodyA?f.bodyA.position.x:0)+(f.pointA?f.pointA.x:0),y:(f.bodyA?f.bodyA.position.y:0)+(f.pointA?f.pointA.y:0)}},r.pointBWorld=function(f){return{x:(f.bodyB?f.bodyB.position.x:0)+(f.pointB?f.pointB.x:0),y:(f.bodyB?f.bodyB.position.y:0)+(f.pointB?f.pointB.y:0)}},r.currentLength=function(f){var o=(f.bodyA?f.bodyA.position.x:0)+(f.pointA?f.pointA.x:0),c=(f.bodyA?f.bodyA.position.y:0)+(f.pointA?f.pointA.y:0),p=(f.bodyB?f.bodyB.position.x:0)+(f.pointB?f.pointB.x:0),v=(f.bodyB?f.bodyB.position.y:0)+(f.pointB?f.pointB.y:0),m=o-p,S=c-v;return Math.sqrt(m*m+S*S)}})()},53402:(s,x,e)=>{var r={};s.exports=r,function(){r._baseDelta=16.666666666666668,r._nextId=0,r._seed=0,r._nowStartTime=+new Date,r._warnedOnce={},r._decomp=null,r.extend=function(h,a){var l,n;typeof a=="boolean"?(l=2,n=a):(l=1,n=!0);for(var u=l;u0;a--){var l=Math.floor(r.random()*(a+1)),n=h[a];h[a]=h[l],h[l]=n}return h},r.choose=function(h){return h[Math.floor(r.random()*h.length)]},r.isElement=function(h){return typeof HTMLElement<"u"?h instanceof HTMLElement:!!(h&&h.nodeType&&h.nodeName)},r.isArray=function(h){return Object.prototype.toString.call(h)==="[object Array]"},r.isFunction=function(h){return typeof h=="function"},r.isPlainObject=function(h){return typeof h=="object"&&h.constructor===Object},r.isString=function(h){return toString.call(h)==="[object String]"},r.clamp=function(h,a,l){return hl?l:h},r.sign=function(h){return h<0?-1:1},r.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-r._nowStartTime},r.random=function(h,a){return h=typeof h<"u"?h:0,a=typeof a<"u"?a:1,h+d()*(a-h)};var d=function(){return r._seed=(r._seed*9301+49297)%233280,r._seed/233280};r.colorToNumber=function(h){return h=h.replace("#",""),h.length==3&&(h=h.charAt(0)+h.charAt(0)+h.charAt(1)+h.charAt(1)+h.charAt(2)+h.charAt(2)),parseInt(h,16)},r.logLevel=1,r.log=function(){console&&r.logLevel>0&&r.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.info=function(){console&&r.logLevel>0&&r.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.warn=function(){console&&r.logLevel>0&&r.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.warnOnce=function(){var h=Array.prototype.slice.call(arguments).join(" ");r._warnedOnce[h]||(r.warn(h),r._warnedOnce[h]=!0)},r.deprecated=function(h,a,l){h[a]=r.chain(function(){r.warnOnce("🔅 deprecated 🔅",l)},h[a])},r.nextId=function(){return r._nextId++},r.indexOf=function(h,a){if(h.indexOf)return h.indexOf(a);for(var l=0;l{var r={};s.exports=r;var d=e(53614),h=e(66272),a=e(81388),l=e(99561),n=e(35810),u=e(69351),f=e(48140),o=e(53402),c=e(22562);(function(){r.create=function(p){p=p||{};var v={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}},m=o.extend(v,p);return m.world=p.world||u.create({label:"World"}),m.pairs=p.pairs||l.create(),m.detector=p.detector||a.create(),m.grid={buckets:[]},m.world.gravity=m.gravity,m.broadphase=m.grid,m.metrics={},m},r.update=function(p,v){var m=o.now(),S=p.world,M=p.detector,w=p.pairs,C=p.timing,A=C.timestamp,P;v=typeof v<"u"?v:o._baseDelta,v*=C.timeScale,C.timestamp+=v,C.lastDelta=v;var b={timestamp:C.timestamp,delta:v};n.trigger(p,"beforeUpdate",b);var O=u.allBodies(S),I=u.allConstraints(S);for(S.isModified&&(a.setBodies(M,O),u.setModified(S,!1,!1,!0)),p.enableSleeping&&d.update(O,v),r._bodiesApplyGravity(O,p.gravity),v>0&&r._bodiesUpdate(O,v),n.trigger(p,"beforeSolve",b),f.preSolveAll(O),P=0;P0&&n.trigger(p,"collisionStart",{pairs:w.collisionStart,timestamp:C.timestamp,delta:v});var B=o.clamp(20/p.positionIterations,0,1);for(h.preSolvePosition(w.list),P=0;P0&&n.trigger(p,"collisionActive",{pairs:w.collisionActive,timestamp:C.timestamp,delta:v}),w.collisionEnd.length>0&&n.trigger(p,"collisionEnd",{pairs:w.collisionEnd,timestamp:C.timestamp,delta:v}),r._bodiesClearForces(O),n.trigger(p,"afterUpdate",b),p.timing.lastElapsed=o.now()-m,p},r.merge=function(p,v){if(o.extend(p,v),v.world){p.world=v.world,r.clear(p);for(var m=u.allBodies(p.world),S=0;S{var r={};s.exports=r;var d=e(53402);(function(){r.on=function(h,a,l){for(var n=a.split(" "),u,f=0;f0){l||(l={}),n=a.split(" ");for(var p=0;p{var r={};s.exports=r;var d=e(73832),h=e(53402);(function(){r.name="matter-js",r.version="0.19.0",r.uses=[],r.used=[],r.use=function(){d.use(r,Array.prototype.slice.call(arguments))},r.before=function(a,l){return a=a.replace(/^Matter./,""),h.chainPathBefore(r,a,l)},r.after=function(a,l){return a=a.replace(/^Matter./,""),h.chainPathAfter(r,a,l)}})()},73832:(s,x,e)=>{var r={};s.exports=r;var d=e(53402);(function(){r._registry={},r.register=function(h){if(r.isPlugin(h)||d.warn("Plugin.register:",r.toString(h),"does not implement all required fields."),h.name in r._registry){var a=r._registry[h.name],l=r.versionParse(h.version).number,n=r.versionParse(a.version).number;l>n?(d.warn("Plugin.register:",r.toString(a),"was upgraded to",r.toString(h)),r._registry[h.name]=h):l-1},r.isFor=function(h,a){var l=h.for&&r.dependencyParse(h.for);return!h.for||a.name===l.name&&r.versionSatisfies(a.version,l.range)},r.use=function(h,a){if(h.uses=(h.uses||[]).concat(a||[]),h.uses.length===0){d.warn("Plugin.use:",r.toString(h),"does not specify any dependencies to install.");return}for(var l=r.dependencies(h),n=d.topologicalSort(l),u=[],f=0;f0&&!o.silent&&d.info(u.join(" "))},r.dependencies=function(h,a){var l=r.dependencyParse(h),n=l.name;if(a=a||{},!(n in a)){h=r.resolve(h)||h,a[n]=d.map(h.uses||[],function(f){r.isPlugin(f)&&r.register(f);var o=r.dependencyParse(f),c=r.resolve(f);return c&&!r.versionSatisfies(c.version,o.range)?(d.warn("Plugin.dependencies:",r.toString(c),"does not satisfy",r.toString(o),"used by",r.toString(l)+"."),c._warned=!0,h._warned=!0):c||(d.warn("Plugin.dependencies:",r.toString(f),"used by",r.toString(l),"could not be resolved."),h._warned=!0),o.name});for(var u=0;u=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;a.test(h)||d.warn("Plugin.versionParse:",h,"is not a valid version or range.");var l=a.exec(h),n=Number(l[4]),u=Number(l[5]),f=Number(l[6]);return{isRange:!!(l[1]||l[2]),version:l[3],range:h,operator:l[1]||l[2]||"",major:n,minor:u,patch:f,parts:[n,u,f],prerelease:l[7],number:n*1e8+u*1e4+f}},r.versionSatisfies=function(h,a){a=a||"*";var l=r.versionParse(a),n=r.versionParse(h);if(l.isRange){if(l.operator==="*"||h==="*")return!0;if(l.operator===">")return n.number>l.number;if(l.operator===">=")return n.number>=l.number;if(l.operator==="~")return n.major===l.major&&n.minor===l.minor&&n.patch>=l.patch;if(l.operator==="^")return l.major>0?n.major===l.major&&n.number>=l.number:l.minor>0?n.minor===l.minor&&n.patch>=l.patch:n.patch===l.patch}return h===a||h==="*"}})()},53614:(s,x,e)=>{var r={};s.exports=r;var d=e(22562),h=e(35810),a=e(53402);(function(){r._motionWakeThreshold=.18,r._motionSleepThreshold=.08,r._minBias=.9,r.update=function(l,n){for(var u=n/a._baseDelta,f=r._motionSleepThreshold,o=0;o0&&c.motion=c.sleepThreshold/u&&r.set(c,!0)):c.sleepCounter>0&&(c.sleepCounter-=1)}},r.afterCollisions=function(l){for(var n=r._motionSleepThreshold,u=0;un&&r.set(v,!1)}}}},r.set=function(l,n){var u=l.isSleeping;n?(l.isSleeping=!0,l.sleepCounter=l.sleepThreshold,l.positionImpulse.x=0,l.positionImpulse.y=0,l.positionPrev.x=l.position.x,l.positionPrev.y=l.position.y,l.anglePrev=l.angle,l.speed=0,l.angularSpeed=0,l.motion=0,u||h.trigger(l,"sleepStart")):(l.isSleeping=!1,l.sleepCounter=0,u&&h.trigger(l,"sleepEnd"))}})()},66280:(s,x,e)=>{var r={};s.exports=r;var d=e(41598),h=e(53402),a=e(22562),l=e(15647),n=e(31725);(function(){r.rectangle=function(u,f,o,c,p){p=p||{};var v={label:"Rectangle Body",position:{x:u,y:f},vertices:d.fromPath("L 0 0 L "+o+" 0 L "+o+" "+c+" L 0 "+c)};if(p.chamfer){var m=p.chamfer;v.vertices=d.chamfer(v.vertices,m.radius,m.quality,m.qualityMin,m.qualityMax),delete p.chamfer}return a.create(h.extend({},v,p))},r.trapezoid=function(u,f,o,c,p,v){v=v||{},p*=.5;var m=(1-p*2)*o,S=o*p,M=S+m,w=M+S,C;p<.5?C="L 0 0 L "+S+" "+-c+" L "+M+" "+-c+" L "+w+" 0":C="L 0 0 L "+M+" "+-c+" L "+w+" 0";var A={label:"Trapezoid Body",position:{x:u,y:f},vertices:d.fromPath(C)};if(v.chamfer){var P=v.chamfer;A.vertices=d.chamfer(A.vertices,P.radius,P.quality,P.qualityMin,P.qualityMax),delete v.chamfer}return a.create(h.extend({},A,v))},r.circle=function(u,f,o,c,p){c=c||{};var v={label:"Circle Body",circleRadius:o};p=p||25;var m=Math.ceil(Math.max(10,Math.min(p,o)));return m%2===1&&(m+=1),r.polygon(u,f,m,o,h.extend({},v,c))},r.polygon=function(u,f,o,c,p){if(p=p||{},o<3)return r.circle(u,f,c,p);for(var v=2*Math.PI/o,m="",S=v*.5,M=0;M0&&d.area(tt)1?(C=a.create(h.extend({parts:A.slice(0)},c)),a.setPosition(C,{x:u,y:f}),C):A[0]},r.flagCoincidentParts=function(u,f){f===void 0&&(f=5);for(var o=0;o{var r={};s.exports=r;var d=e(69351),h=e(48140),a=e(53402),l=e(22562),n=e(66280);(function(){r.stack=function(u,f,o,c,p,v,m){for(var S=d.create({label:"Stack"}),M=u,w=f,C,A=0,P=0;Pb&&(b=D),l.translate(I,{x:B*.5,y:D*.5}),M=I.bounds.max.x+p,d.addBody(S,I),C=I,A+=1}else M+=p}w+=b+v,M=u}return S},r.chain=function(u,f,o,c,p,v){for(var m=u.bodies,S=1;S0)for(S=0;S0&&(C=v[S-1+(m-1)*f],d.addConstraint(u,h.create(a.extend({bodyA:C,bodyB:w},p)))),c&&Sb)){C=b-C;var I=C,D=o-1-C;if(!(wD)){P===1&&l.translate(A,{x:(w+(o%2===1?1:-1))*O,y:0});var B=A?w*O:0;return m(u+B+w*p,M,w,C,A,P)}}})},r.newtonsCradle=function(u,f,o,c,p){for(var v=d.create({label:"Newtons Cradle"}),m=0;m{var r={};s.exports=r;var d=e(31725),h=e(53402);(function(){r.fromVertices=function(a){for(var l={},n=0;n{var x={};s.exports=x,function(){x.create=function(e){var r={min:{x:0,y:0},max:{x:0,y:0}};return e&&x.update(r,e),r},x.update=function(e,r,d){e.min.x=1/0,e.max.x=-1/0,e.min.y=1/0,e.max.y=-1/0;for(var h=0;he.max.x&&(e.max.x=a.x),a.xe.max.y&&(e.max.y=a.y),a.y0?e.max.x+=d.x:e.min.x+=d.x,d.y>0?e.max.y+=d.y:e.min.y+=d.y)},x.contains=function(e,r){return r.x>=e.min.x&&r.x<=e.max.x&&r.y>=e.min.y&&r.y<=e.max.y},x.overlaps=function(e,r){return e.min.x<=r.max.x&&e.max.x>=r.min.x&&e.max.y>=r.min.y&&e.min.y<=r.max.y},x.translate=function(e,r){e.min.x+=r.x,e.max.x+=r.x,e.min.y+=r.y,e.max.y+=r.y},x.shift=function(e,r){var d=e.max.x-e.min.x,h=e.max.y-e.min.y;e.min.x=r.x,e.max.x=r.x+d,e.min.y=r.y,e.max.y=r.y+h}}()},74058:(s,x,e)=>{var r={};s.exports=r,e(15647);var d=e(53402);(function(){r.pathToVertices=function(h,a){typeof window<"u"&&!("SVGPathSeg"in window)&&d.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var l,n,u,f,o,c,p,v,m,S,M=[],w,C,A=0,P=0,b=0;a=a||15;var O=function(D,B,G){var z=G%2===1&&G>1;if(!m||D!=m.x||B!=m.y){m&&z?(w=m.x,C=m.y):(w=0,C=0);var X={x:w+D,y:C+B};(z||!m)&&(m=X),M.push(X),P=w+D,b=C+B}},I=function(D){var B=D.pathSegTypeAsLetter.toUpperCase();if(B!=="Z"){switch(B){case"M":case"L":case"T":case"C":case"S":case"Q":P=D.x,b=D.y;break;case"H":P=D.x;break;case"V":b=D.y;break}O(P,b,D.pathSegType)}};for(r._svgPathToAbsolute(h),u=h.getTotalLength(),c=[],l=0;l{var x={};s.exports=x,function(){x.create=function(e,r){return{x:e||0,y:r||0}},x.clone=function(e){return{x:e.x,y:e.y}},x.magnitude=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},x.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},x.rotate=function(e,r,d){var h=Math.cos(r),a=Math.sin(r);d||(d={});var l=e.x*h-e.y*a;return d.y=e.x*a+e.y*h,d.x=l,d},x.rotateAbout=function(e,r,d,h){var a=Math.cos(r),l=Math.sin(r);h||(h={});var n=d.x+((e.x-d.x)*a-(e.y-d.y)*l);return h.y=d.y+((e.x-d.x)*l+(e.y-d.y)*a),h.x=n,h},x.normalise=function(e){var r=x.magnitude(e);return r===0?{x:0,y:0}:{x:e.x/r,y:e.y/r}},x.dot=function(e,r){return e.x*r.x+e.y*r.y},x.cross=function(e,r){return e.x*r.y-e.y*r.x},x.cross3=function(e,r,d){return(r.x-e.x)*(d.y-e.y)-(r.y-e.y)*(d.x-e.x)},x.add=function(e,r,d){return d||(d={}),d.x=e.x+r.x,d.y=e.y+r.y,d},x.sub=function(e,r,d){return d||(d={}),d.x=e.x-r.x,d.y=e.y-r.y,d},x.mult=function(e,r){return{x:e.x*r,y:e.y*r}},x.div=function(e,r){return{x:e.x/r,y:e.y/r}},x.perp=function(e,r){return r=r===!0?-1:1,{x:r*-e.y,y:r*e.x}},x.neg=function(e){return{x:-e.x,y:-e.y}},x.angle=function(e,r){return Math.atan2(r.y-e.y,r.x-e.x)},x._temp=[x.create(),x.create(),x.create(),x.create(),x.create(),x.create()]}()},41598:(s,x,e)=>{var r={};s.exports=r;var d=e(31725),h=e(53402);(function(){r.create=function(a,l){for(var n=[],u=0;u0)return!1;o=c}return!0},r.scale=function(a,l,n,u){if(l===1&&n===1)return a;u=u||r.centre(a);for(var f,o,c=0;c=0?c-1:a.length-1],v=a[c],m=a[(c+1)%a.length],S=l[c0&&(l|=2),l===3)return!1;return l!==0?!0:null},r.hull=function(a){var l=[],n=[],u,f;for(a=a.slice(0),a.sort(function(o,c){var p=o.x-c.x;return p!==0?p:o.y-c.y}),f=0;f=2&&d.cross3(n[n.length-2],n[n.length-1],u)<=0;)n.pop();n.push(u)}for(f=a.length-1;f>=0;f-=1){for(u=a[f];l.length>=2&&d.cross3(l[l.length-2],l[l.length-1],u)<=0;)l.pop();l.push(u)}return l.pop(),n.pop(),l.concat(n)}})()},18210:(s,x,e)=>{var r=e(19933),d={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.19.0",silent:!0,install:function(h){h.after("Body.create",function(){d.Body.init(this)}),h.before("Engine.update",function(a){d.Engine.update(a)})},Body:{init:function(h){h.plugin.attractors=h.plugin.attractors||[]}},Engine:{update:function(h){for(var a=r.Composite.allBodies(h.world),l=0;l0)for(var f=0;f{/** * @author @dxu https://github.com/dxu/matter-collision-events * @author Richard Davey * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.19.0",silent:!0,install:function(e){e.after("Engine.create",function(){e.Events.on(this,"collisionStart",function(r){r.pairs.map(function(d){var h=d.bodyA,a=d.bodyB;h.gameObject&&h.gameObject.emit("collide",h,a,d),a.gameObject&&a.gameObject.emit("collide",a,h,d),e.Events.trigger(h,"onCollide",{pair:d}),e.Events.trigger(a,"onCollide",{pair:d}),h.onCollideCallback&&h.onCollideCallback(d),a.onCollideCallback&&a.onCollideCallback(d),h.onCollideWith[a.id]&&h.onCollideWith[a.id](a,d),a.onCollideWith[h.id]&&a.onCollideWith[h.id](h,d)})}),e.Events.on(this,"collisionActive",function(r){r.pairs.map(function(d){var h=d.bodyA,a=d.bodyB;h.gameObject&&h.gameObject.emit("collideActive",h,a,d),a.gameObject&&a.gameObject.emit("collideActive",a,h,d),e.Events.trigger(h,"onCollideActive",{pair:d}),e.Events.trigger(a,"onCollideActive",{pair:d}),h.onCollideActiveCallback&&h.onCollideActiveCallback(d),a.onCollideActiveCallback&&a.onCollideActiveCallback(d)})}),e.Events.on(this,"collisionEnd",function(r){r.pairs.map(function(d){var h=d.bodyA,a=d.bodyB;h.gameObject&&h.gameObject.emit("collideEnd",h,a,d),a.gameObject&&a.gameObject.emit("collideEnd",a,h,d),e.Events.trigger(h,"onCollideEnd",{pair:d}),e.Events.trigger(a,"onCollideEnd",{pair:d}),h.onCollideEndCallback&&h.onCollideEndCallback(d),a.onCollideEndCallback&&a.onCollideEndCallback(d)})})})}};s.exports=y},74507:(s,y,e)=>{var r=e(19933),d={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.19.0",silent:!0,install:function(h){h.after("Engine.update",function(){d.Engine.update(this)})},Engine:{update:function(h){for(var a=h.world,l=r.Composite.allBodies(a),n=r.Composite.allComposites(a),u=0;ua.max.x?l=a.min.x-h.max.x:h.max.xa.max.y?n=a.min.y-h.max.y:h.max.y{/** + */var x={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.19.0",silent:!0,install:function(e){e.after("Engine.create",function(){e.Events.on(this,"collisionStart",function(r){r.pairs.map(function(d){var h=d.bodyA,a=d.bodyB;h.gameObject&&h.gameObject.emit("collide",h,a,d),a.gameObject&&a.gameObject.emit("collide",a,h,d),e.Events.trigger(h,"onCollide",{pair:d}),e.Events.trigger(a,"onCollide",{pair:d}),h.onCollideCallback&&h.onCollideCallback(d),a.onCollideCallback&&a.onCollideCallback(d),h.onCollideWith[a.id]&&h.onCollideWith[a.id](a,d),a.onCollideWith[h.id]&&a.onCollideWith[h.id](h,d)})}),e.Events.on(this,"collisionActive",function(r){r.pairs.map(function(d){var h=d.bodyA,a=d.bodyB;h.gameObject&&h.gameObject.emit("collideActive",h,a,d),a.gameObject&&a.gameObject.emit("collideActive",a,h,d),e.Events.trigger(h,"onCollideActive",{pair:d}),e.Events.trigger(a,"onCollideActive",{pair:d}),h.onCollideActiveCallback&&h.onCollideActiveCallback(d),a.onCollideActiveCallback&&a.onCollideActiveCallback(d)})}),e.Events.on(this,"collisionEnd",function(r){r.pairs.map(function(d){var h=d.bodyA,a=d.bodyB;h.gameObject&&h.gameObject.emit("collideEnd",h,a,d),a.gameObject&&a.gameObject.emit("collideEnd",a,h,d),e.Events.trigger(h,"onCollideEnd",{pair:d}),e.Events.trigger(a,"onCollideEnd",{pair:d}),h.onCollideEndCallback&&h.onCollideEndCallback(d),a.onCollideEndCallback&&a.onCollideEndCallback(d)})})})}};s.exports=x},74507:(s,x,e)=>{var r=e(19933),d={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.19.0",silent:!0,install:function(h){h.after("Engine.update",function(){d.Engine.update(this)})},Engine:{update:function(h){for(var a=h.world,l=r.Composite.allBodies(a),n=r.Composite.allComposites(a),u=0;ua.max.x?l=a.min.x-h.max.x:h.max.xa.max.y?n=a.min.y-h.max.y:h.max.y{/** * @author Stefan Hedman (http://steffe.se) * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={decomp:I,quickDecomp:z,isSimple:B,removeCollinearPoints:X,removeDuplicatePoints:j,makeCCW:m};function y(Y,Z,U){U=U||0;var H=[0,0],$,_,q,at,ot,rt,gt;return $=Y[1][1]-Y[0][1],_=Y[0][0]-Y[1][0],q=$*Y[0][0]+_*Y[0][1],at=Z[1][1]-Z[0][1],ot=Z[0][0]-Z[1][0],rt=at*Z[0][0]+ot*Z[0][1],gt=$*ot-at*_,Q(gt,0,U)||(H[0]=(ot*q-_*rt)/gt,H[1]=($*rt-at*q)/gt),H}function e(Y,Z,U,H){var $=Z[0]-Y[0],_=Z[1]-Y[1],q=H[0]-U[0],at=H[1]-U[1];if(q*_-at*$===0)return!1;var ot=($*(U[1]-Y[1])+_*(Y[0]-U[0]))/(q*_-at*$),rt=(q*(Y[1]-U[1])+at*(U[0]-Y[0]))/(at*$-q*_);return ot>=0&&ot<=1&&rt>=0&&rt<=1}function r(Y,Z,U){return(Z[0]-Y[0])*(U[1]-Y[1])-(U[0]-Y[0])*(Z[1]-Y[1])}function d(Y,Z,U){return r(Y,Z,U)>0}function h(Y,Z,U){return r(Y,Z,U)>=0}function a(Y,Z,U){return r(Y,Z,U)<0}function l(Y,Z,U){return r(Y,Z,U)<=0}var n=[],u=[];function f(Y,Z,U,H){if(H){var $=n,_=u;$[0]=Z[0]-Y[0],$[1]=Z[1]-Y[1],_[0]=U[0]-Z[0],_[1]=U[1]-Z[1];var q=$[0]*_[0]+$[1]*_[1],at=Math.sqrt($[0]*$[0]+$[1]*$[1]),ot=Math.sqrt(_[0]*_[0]+_[1]*_[1]),rt=Math.acos(q/(at*ot));return rtU[Z][0])&&(Z=H);return d(c(Y,Z-1),c(Y,Z),c(Y,Z+1))?!1:(S(Y),!0)}function S(Y){for(var Z=[],U=Y.length,H=0;H!==U;H++)Z.push(Y.pop());for(var H=0;H!==U;H++)Y[H]=Z[H]}function M(Y,Z){return a(c(Y,Z-1),c(Y,Z),c(Y,Z+1))}var w=[],C=[];function A(Y,Z,U){var H,$,_=w,q=C;if(h(c(Y,Z+1),c(Y,Z),c(Y,U))&&l(c(Y,Z-1),c(Y,Z),c(Y,U)))return!1;$=o(c(Y,Z),c(Y,U));for(var at=0;at!==Y.length;++at)if(!((at+1)%Y.length===Z||at===Z)&&h(c(Y,Z),c(Y,U),c(Y,at+1))&&l(c(Y,Z),c(Y,U),c(Y,at))&&(_[0]=c(Y,Z),_[1]=c(Y,U),q[0]=c(Y,at),q[1]=c(Y,at+1),H=y(_,q),o(c(Y,Z),H)<$))return!1;return!0}function P(Y,Z,U){for(var H=0;H!==Y.length;++H)if(!(H===Z||H===U||(H+1)%Y.length===Z||(H+1)%Y.length===U)&&e(c(Y,Z),c(Y,U),c(Y,H),c(Y,H+1)))return!1;return!0}function b(Y,Z,U,H){var $=H||[];if(p($),Z0?D(Y,Z):[Y]}function D(Y,Z){if(Z.length===0)return[Y];if(Z instanceof Array&&Z.length&&Z[0]instanceof Array&&Z[0].length===2&&Z[0][0]instanceof Array){for(var U=[Y],H=0;H_)return console.warn("quickDecomp: max level ("+_+") reached."),Z;for(var Bt=0;BtPt&&(Pt+=Y.length),At=Number.MAX_VALUE,Pt3&&H>=0;--H)f(c(Y,H-1),c(Y,H),c(Y,H+1),Z)&&(Y.splice(H%Y.length,1),U++);return U}function j(Y,Z){for(var U=Y.length-1;U>=1;--U)for(var H=Y[U],$=U-1;$>=0;--$)if(tt(H,Y[$],Z)){Y.splice(U,1);continue}}function Q(Y,Z,U){return U=U||0,Math.abs(Y-Z)<=U}function tt(Y,Z,U){return Q(Y[0],Z[0],U)&&Q(Y[1],Z[1],U)}},52018:(s,y,e)=>{/** + */s.exports={decomp:I,quickDecomp:z,isSimple:B,removeCollinearPoints:X,removeDuplicatePoints:j,makeCCW:m};function x(Y,$,U){U=U||0;var H=[0,0],Z,_,q,at,ot,rt,gt;return Z=Y[1][1]-Y[0][1],_=Y[0][0]-Y[1][0],q=Z*Y[0][0]+_*Y[0][1],at=$[1][1]-$[0][1],ot=$[0][0]-$[1][0],rt=at*$[0][0]+ot*$[0][1],gt=Z*ot-at*_,Q(gt,0,U)||(H[0]=(ot*q-_*rt)/gt,H[1]=(Z*rt-at*q)/gt),H}function e(Y,$,U,H){var Z=$[0]-Y[0],_=$[1]-Y[1],q=H[0]-U[0],at=H[1]-U[1];if(q*_-at*Z===0)return!1;var ot=(Z*(U[1]-Y[1])+_*(Y[0]-U[0]))/(q*_-at*Z),rt=(q*(Y[1]-U[1])+at*(U[0]-Y[0]))/(at*Z-q*_);return ot>=0&&ot<=1&&rt>=0&&rt<=1}function r(Y,$,U){return($[0]-Y[0])*(U[1]-Y[1])-(U[0]-Y[0])*($[1]-Y[1])}function d(Y,$,U){return r(Y,$,U)>0}function h(Y,$,U){return r(Y,$,U)>=0}function a(Y,$,U){return r(Y,$,U)<0}function l(Y,$,U){return r(Y,$,U)<=0}var n=[],u=[];function f(Y,$,U,H){if(H){var Z=n,_=u;Z[0]=$[0]-Y[0],Z[1]=$[1]-Y[1],_[0]=U[0]-$[0],_[1]=U[1]-$[1];var q=Z[0]*_[0]+Z[1]*_[1],at=Math.sqrt(Z[0]*Z[0]+Z[1]*Z[1]),ot=Math.sqrt(_[0]*_[0]+_[1]*_[1]),rt=Math.acos(q/(at*ot));return rtU[$][0])&&($=H);return d(c(Y,$-1),c(Y,$),c(Y,$+1))?!1:(S(Y),!0)}function S(Y){for(var $=[],U=Y.length,H=0;H!==U;H++)$.push(Y.pop());for(var H=0;H!==U;H++)Y[H]=$[H]}function M(Y,$){return a(c(Y,$-1),c(Y,$),c(Y,$+1))}var w=[],C=[];function A(Y,$,U){var H,Z,_=w,q=C;if(h(c(Y,$+1),c(Y,$),c(Y,U))&&l(c(Y,$-1),c(Y,$),c(Y,U)))return!1;Z=o(c(Y,$),c(Y,U));for(var at=0;at!==Y.length;++at)if(!((at+1)%Y.length===$||at===$)&&h(c(Y,$),c(Y,U),c(Y,at+1))&&l(c(Y,$),c(Y,U),c(Y,at))&&(_[0]=c(Y,$),_[1]=c(Y,U),q[0]=c(Y,at),q[1]=c(Y,at+1),H=x(_,q),o(c(Y,$),H)0?D(Y,$):[Y]}function D(Y,$){if($.length===0)return[Y];if($ instanceof Array&&$.length&&$[0]instanceof Array&&$[0].length===2&&$[0][0]instanceof Array){for(var U=[Y],H=0;H<$.length;H++)for(var Z=$[H],_=0;__)return console.warn("quickDecomp: max level ("+_+") reached."),$;for(var Bt=0;BtPt&&(Pt+=Y.length),At=Number.MAX_VALUE,Pt3&&H>=0;--H)f(c(Y,H-1),c(Y,H),c(Y,H+1),$)&&(Y.splice(H%Y.length,1),U++);return U}function j(Y,$){for(var U=Y.length-1;U>=1;--U)for(var H=Y[U],Z=U-1;Z>=0;--Z)if(tt(H,Y[Z],$)){Y.splice(U,1);continue}}function Q(Y,$,U){return U=U||0,Math.abs(Y-$)<=U}function tt(Y,$,U){return Q(Y[0],$[0],U)&&Q(Y[1],$[1],U)}},52018:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} @@ -4606,23 +4606,23 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};s.exports=y},37277:s=>{/** + */var x={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};s.exports=x},37277:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={},e={},r={};r.register=function(d,h,a,l){l===void 0&&(l=!1),y[d]={plugin:h,mapping:a,custom:l}},r.registerCustom=function(d,h,a,l){e[d]={plugin:h,mapping:a,data:l}},r.hasCore=function(d){return y.hasOwnProperty(d)},r.hasCustom=function(d){return e.hasOwnProperty(d)},r.getCore=function(d){return y[d]},r.getCustom=function(d){return e[d]},r.getCustomClass=function(d){return e.hasOwnProperty(d)?e[d].plugin:null},r.remove=function(d){y.hasOwnProperty(d)&&delete y[d]},r.removeCustom=function(d){e.hasOwnProperty(d)&&delete e[d]},r.destroyCorePlugins=function(){for(var d in y)y.hasOwnProperty(d)&&delete y[d]},r.destroyCustomPlugins=function(){for(var d in e)e.hasOwnProperty(d)&&delete e[d]},s.exports=r},77332:(s,y,e)=>{/** + */var x={},e={},r={};r.register=function(d,h,a,l){l===void 0&&(l=!1),x[d]={plugin:h,mapping:a,custom:l}},r.registerCustom=function(d,h,a,l){e[d]={plugin:h,mapping:a,data:l}},r.hasCore=function(d){return x.hasOwnProperty(d)},r.hasCustom=function(d){return e.hasOwnProperty(d)},r.getCore=function(d){return x[d]},r.getCustom=function(d){return e[d]},r.getCustomClass=function(d){return e.hasOwnProperty(d)?e[d].plugin:null},r.remove=function(d){x.hasOwnProperty(d)&&delete x[d]},r.removeCustom=function(d){e.hasOwnProperty(d)&&delete e[d]},r.destroyCorePlugins=function(){for(var d in x)x.hasOwnProperty(d)&&delete x[d]},r.destroyCustomPlugins=function(){for(var d in e)e.hasOwnProperty(d)&&delete e[d]},s.exports=r},77332:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(8443),h=e(50792),a=e(74099),l=e(44603),n=e(39429),u=e(95540),f=e(37277),o=e(72905),c=new r({Extends:h,initialize:function(v){h.call(this),this.game=v,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],v.isBooted?this.boot():v.events.once(d.BOOT,this.boot,this)},boot:function(){var p,v,m,S,M,w,C,A=this.game.config,P=A.installGlobalPlugins;for(P=P.concat(this._pendingGlobal),p=0;p{/** + */var r=e(83419),d=e(8443),h=e(50792),a=e(74099),l=e(44603),n=e(39429),u=e(95540),f=e(37277),o=e(72905),c=new r({Extends:h,initialize:function(v){h.call(this),this.game=v,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],v.isBooted?this.boot():v.events.once(d.BOOT,this.boot,this)},boot:function(){var p,v,m,S,M,w,C,A=this.game.config,P=A.installGlobalPlugins;for(P=P.concat(this._pendingGlobal),p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} -*/var r=e(52018),d=e(83419),h=e(44594),a=new d({Extends:r,initialize:function(n,u,f){r.call(this,u),this.scene=n,this.systems=n.sys,this.pluginKey=f,n.sys.events.once(h.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});s.exports=a},18922:(s,y,e)=>{/** +*/var r=e(52018),d=e(83419),h=e(44594),a=new d({Extends:r,initialize:function(n,u,f){r.call(this,u),this.scene=n,this.systems=n.sys,this.pluginKey=f,n.sys.events.once(h.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});s.exports=a},18922:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={BasePlugin:e(52018),DefaultPlugins:e(42363),PluginCache:e(37277),PluginManager:e(77332),ScenePlugin:e(45145)}},63595:()=>{HTMLVideoElement&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(s){const y=performance.now(),e=this.getVideoPlaybackQuality(),r=this.mozPresentedFrames||this.mozPaintedFrames||e.totalVideoFrames-e.droppedVideoFrames,d=(h,a)=>{const l=this.getVideoPlaybackQuality(),n=this.mozPresentedFrames||this.mozPaintedFrames||l.totalVideoFrames-l.droppedVideoFrames;if(n>r){const u=this.mozFrameDelay||l.totalFrameDelay-e.totalFrameDelay||0,f=a-h;s(a,{presentationTime:a+u*1e3,expectedDisplayTime:a+f,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+f/1e3,presentedFrames:n,processingDuration:u}),delete this._rvfcpolyfillmap[y]}else this._rvfcpolyfillmap[y]=requestAnimationFrame(u=>d(a,u))};return this._rvfcpolyfillmap[y]=requestAnimationFrame(h=>d(y,h)),y},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(s){cancelAnimationFrame(this._rvfcpolyfillmap[s]),delete this._rvfcpolyfillmap[s]})},10312:s=>{/** + */s.exports={BasePlugin:e(52018),DefaultPlugins:e(42363),PluginCache:e(37277),PluginManager:e(77332),ScenePlugin:e(45145)}},63595:()=>{HTMLVideoElement&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(s){const x=performance.now(),e=this.getVideoPlaybackQuality(),r=this.mozPresentedFrames||this.mozPaintedFrames||e.totalVideoFrames-e.droppedVideoFrames,d=(h,a)=>{const l=this.getVideoPlaybackQuality(),n=this.mozPresentedFrames||this.mozPaintedFrames||l.totalVideoFrames-l.droppedVideoFrames;if(n>r){const u=this.mozFrameDelay||l.totalFrameDelay-e.totalFrameDelay||0,f=a-h;s(a,{presentationTime:a+u*1e3,expectedDisplayTime:a+f,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+f/1e3,presentedFrames:n,processingDuration:u}),delete this._rvfcpolyfillmap[x]}else this._rvfcpolyfillmap[x]=requestAnimationFrame(u=>d(a,u))};return this._rvfcpolyfillmap[x]=requestAnimationFrame(h=>d(x,h)),x},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(s){cancelAnimationFrame(this._rvfcpolyfillmap[s]),delete this._rvfcpolyfillmap[s]})},10312:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4630,20 +4630,20 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={DEFAULT:0,LINEAR:0,NEAREST:1};s.exports=y},68627:(s,y,e)=>{/** + */var x={DEFAULT:0,LINEAR:0,NEAREST:1};s.exports=x},68627:(s,x,e)=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(19715),d=e(32880),h=e(83419),a=e(8054),l=e(50792),n=e(92503),u=e(56373),f=e(97480),o=e(69442),c=e(61340),p=new h({Extends:l,initialize:function(m){l.call(this);var S=m.config;this.config={clearBeforeRender:S.clearBeforeRender,backgroundColor:S.backgroundColor,antialias:S.antialias,roundPixels:S.roundPixels},this.game=m,this.type=a.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=m.canvas;var M={alpha:m.config.transparent,desynchronized:m.config.desynchronized,willReadFrequently:!1};this.gameContext=S.context?S.context:this.gameCanvas.getContext("2d",M),this.currentContext=this.gameContext,this.antialias=m.config.antialias,this.blendModes=u(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new c,this._tempMatrix2=new c,this._tempMatrix3=new c,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(o.READY,this.boot,this)},boot:function(){var v=this.game,m=v.scale.baseSize;this.width=m.width,this.height=m.height,this.isBooted=!0,v.scale.on(f.RESIZE,this.onResize,this),this.resize(m.width,m.height)},onResize:function(v,m){(m.width!==this.width||m.height!==this.height)&&this.resize(m.width,m.height)},resize:function(v,m){this.width=v,this.height=m,this.emit(n.RESIZE,v,m)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(v){return this.currentContext.globalCompositeOperation=v,this},setContext:function(v){return this.currentContext=v||this.gameContext,this},setAlpha:function(v){return this.currentContext.globalAlpha=v,this},preRender:function(){var v=this.gameContext,m=this.config,S=this.width,M=this.height;v.globalAlpha=1,v.globalCompositeOperation="source-over",v.setTransform(1,0,0,1,0,0),m.clearBeforeRender&&(v.clearRect(0,0,S,M),m.transparent||(v.fillStyle=m.backgroundColor.rgba,v.fillRect(0,0,S,M))),v.save(),this.drawCount=0,this.emit(n.PRE_RENDER)},render:function(v,m,S){var M=m.length;this.emit(n.RENDER,v,S);var w=S.x,C=S.y,A=S.width,P=S.height,b=S.renderToTexture?S.context:v.sys.context;b.save(),this.game.scene.customViewports&&(b.beginPath(),b.rect(w,C,A,P),b.clip()),S.emit(r.PRE_RENDER,S),this.currentContext=b;var O=S.mask;O&&O.preRenderCanvas(this,null,S._maskCamera),S.transparent||(b.fillStyle=S.backgroundColor.rgba,b.fillRect(w,C,A,P)),b.globalAlpha=S.alpha,b.globalCompositeOperation="source-over",this.drawCount+=M,S.renderToTexture&&S.emit(r.PRE_RENDER,S),S.matrix.copyToContext(b);for(var I=0;I=0?Q=-(Q+D):Q<0&&(Q=Math.abs(Q)-D)),v.flipY&&(tt>=0?tt=-(tt+B):tt<0&&(tt=Math.abs(tt)-B))}var Z=1,U=1;v.flipX&&(G||(Q+=-m.realWidth+X*2),Z=-1),v.flipY&&(G||(tt+=-m.realHeight+j*2),U=-1);var H=v.x,$=v.y;P.applyITRS(H,$,v.rotation,v.scaleX*Z,v.scaleY*U),A.copyFrom(S.matrix),M?(A.multiplyWithOffset(M,-S.scrollX*v.scrollFactorX,-S.scrollY*v.scrollFactorY),P.e=H,P.f=$):(P.e-=S.scrollX*v.scrollFactorX,P.f-=S.scrollY*v.scrollFactorY),A.multiply(P),S.roundPixels&&(A.e=Math.round(A.e),A.f=Math.round(A.f)),C.save(),A.setToContext(C),C.globalCompositeOperation=this.blendModes[v.blendMode],C.globalAlpha=w,C.imageSmoothingEnabled=!m.source.scaleMode,v.mask&&v.mask.preRenderCanvas(this,v,S),D>0&&B>0&&(S.roundPixels?C.drawImage(m.source.image,O,I,D,B,Math.round(Q),Math.round(tt),Math.round(D/z),Math.round(B/z)):C.drawImage(m.source.image,O,I,D,B,Q,tt,D/z,B/z)),v.mask&&v.mask.postRenderCanvas(this,v,S),C.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});s.exports=p},55830:(s,y,e)=>{/** + */var r=e(19715),d=e(32880),h=e(83419),a=e(8054),l=e(50792),n=e(92503),u=e(56373),f=e(97480),o=e(69442),c=e(61340),p=new h({Extends:l,initialize:function(m){l.call(this);var S=m.config;this.config={clearBeforeRender:S.clearBeforeRender,backgroundColor:S.backgroundColor,antialias:S.antialias,roundPixels:S.roundPixels},this.game=m,this.type=a.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=m.canvas;var M={alpha:m.config.transparent,desynchronized:m.config.desynchronized,willReadFrequently:!1};this.gameContext=S.context?S.context:this.gameCanvas.getContext("2d",M),this.currentContext=this.gameContext,this.antialias=m.config.antialias,this.blendModes=u(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new c,this._tempMatrix2=new c,this._tempMatrix3=new c,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(o.READY,this.boot,this)},boot:function(){var v=this.game,m=v.scale.baseSize;this.width=m.width,this.height=m.height,this.isBooted=!0,v.scale.on(f.RESIZE,this.onResize,this),this.resize(m.width,m.height)},onResize:function(v,m){(m.width!==this.width||m.height!==this.height)&&this.resize(m.width,m.height)},resize:function(v,m){this.width=v,this.height=m,this.emit(n.RESIZE,v,m)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(v){return this.currentContext.globalCompositeOperation=v,this},setContext:function(v){return this.currentContext=v||this.gameContext,this},setAlpha:function(v){return this.currentContext.globalAlpha=v,this},preRender:function(){var v=this.gameContext,m=this.config,S=this.width,M=this.height;v.globalAlpha=1,v.globalCompositeOperation="source-over",v.setTransform(1,0,0,1,0,0),m.clearBeforeRender&&(v.clearRect(0,0,S,M),m.transparent||(v.fillStyle=m.backgroundColor.rgba,v.fillRect(0,0,S,M))),v.save(),this.drawCount=0,this.emit(n.PRE_RENDER)},render:function(v,m,S){var M=m.length;this.emit(n.RENDER,v,S);var w=S.x,C=S.y,A=S.width,P=S.height,b=S.renderToTexture?S.context:v.sys.context;b.save(),this.game.scene.customViewports&&(b.beginPath(),b.rect(w,C,A,P),b.clip()),S.emit(r.PRE_RENDER,S),this.currentContext=b;var O=S.mask;O&&O.preRenderCanvas(this,null,S._maskCamera),S.transparent||(b.fillStyle=S.backgroundColor.rgba,b.fillRect(w,C,A,P)),b.globalAlpha=S.alpha,b.globalCompositeOperation="source-over",this.drawCount+=M,S.renderToTexture&&S.emit(r.PRE_RENDER,S),S.matrix.copyToContext(b);for(var I=0;I=0?Q=-(Q+D):Q<0&&(Q=Math.abs(Q)-D)),v.flipY&&(tt>=0?tt=-(tt+B):tt<0&&(tt=Math.abs(tt)-B))}var $=1,U=1;v.flipX&&(G||(Q+=-m.realWidth+X*2),$=-1),v.flipY&&(G||(tt+=-m.realHeight+j*2),U=-1);var H=v.x,Z=v.y;P.applyITRS(H,Z,v.rotation,v.scaleX*$,v.scaleY*U),A.copyFrom(S.matrix),M?(A.multiplyWithOffset(M,-S.scrollX*v.scrollFactorX,-S.scrollY*v.scrollFactorY),P.e=H,P.f=Z):(P.e-=S.scrollX*v.scrollFactorX,P.f-=S.scrollY*v.scrollFactorY),A.multiply(P),S.roundPixels&&(A.e=Math.round(A.e),A.f=Math.round(A.f)),C.save(),A.setToContext(C),C.globalCompositeOperation=this.blendModes[v.blendMode],C.globalAlpha=w,C.imageSmoothingEnabled=!m.source.scaleMode,v.mask&&v.mask.preRenderCanvas(this,v,S),D>0&&B>0&&(S.roundPixels?C.drawImage(m.source.image,O,I,D,B,Math.round(Q),Math.round(tt),Math.round(D/z),Math.round(B/z)):C.drawImage(m.source.image,O,I,D,B,Q,tt,D/z,B/z)),v.mask&&v.mask.postRenderCanvas(this,v,S),C.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});s.exports=p},55830:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={CanvasRenderer:e(68627),GetBlendModes:e(56373),SetTransform:e(20926)}},56373:(s,y,e)=>{/** + */s.exports={CanvasRenderer:e(68627),GetBlendModes:e(56373),SetTransform:e(20926)}},56373:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(10312),d=e(89289),h=function(){var a=[],l=d.supportNewBlendModes,n="source-over";return a[r.NORMAL]=n,a[r.ADD]="lighter",a[r.MULTIPLY]=l?"multiply":n,a[r.SCREEN]=l?"screen":n,a[r.OVERLAY]=l?"overlay":n,a[r.DARKEN]=l?"darken":n,a[r.LIGHTEN]=l?"lighten":n,a[r.COLOR_DODGE]=l?"color-dodge":n,a[r.COLOR_BURN]=l?"color-burn":n,a[r.HARD_LIGHT]=l?"hard-light":n,a[r.SOFT_LIGHT]=l?"soft-light":n,a[r.DIFFERENCE]=l?"difference":n,a[r.EXCLUSION]=l?"exclusion":n,a[r.HUE]=l?"hue":n,a[r.SATURATION]=l?"saturation":n,a[r.COLOR]=l?"color":n,a[r.LUMINOSITY]=l?"luminosity":n,a[r.ERASE]="destination-out",a[r.SOURCE_IN]="source-in",a[r.SOURCE_OUT]="source-out",a[r.SOURCE_ATOP]="source-atop",a[r.DESTINATION_OVER]="destination-over",a[r.DESTINATION_IN]="destination-in",a[r.DESTINATION_OUT]="destination-out",a[r.DESTINATION_ATOP]="destination-atop",a[r.LIGHTER]="lighter",a[r.COPY]="copy",a[r.XOR]="xor",a};s.exports=h},20926:(s,y,e)=>{/** + */var r=e(10312),d=e(89289),h=function(){var a=[],l=d.supportNewBlendModes,n="source-over";return a[r.NORMAL]=n,a[r.ADD]="lighter",a[r.MULTIPLY]=l?"multiply":n,a[r.SCREEN]=l?"screen":n,a[r.OVERLAY]=l?"overlay":n,a[r.DARKEN]=l?"darken":n,a[r.LIGHTEN]=l?"lighten":n,a[r.COLOR_DODGE]=l?"color-dodge":n,a[r.COLOR_BURN]=l?"color-burn":n,a[r.HARD_LIGHT]=l?"hard-light":n,a[r.SOFT_LIGHT]=l?"soft-light":n,a[r.DIFFERENCE]=l?"difference":n,a[r.EXCLUSION]=l?"exclusion":n,a[r.HUE]=l?"hue":n,a[r.SATURATION]=l?"saturation":n,a[r.COLOR]=l?"color":n,a[r.LUMINOSITY]=l?"luminosity":n,a[r.ERASE]="destination-out",a[r.SOURCE_IN]="source-in",a[r.SOURCE_OUT]="source-out",a[r.SOURCE_ATOP]="source-atop",a[r.DESTINATION_OVER]="destination-over",a[r.DESTINATION_IN]="destination-in",a[r.DESTINATION_OUT]="destination-out",a[r.DESTINATION_ATOP]="destination-atop",a[r.LIGHTER]="lighter",a[r.COPY]="copy",a[r.XOR]="xor",a};s.exports=h},20926:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4671,31 +4671,31 @@ return new `+this.key+`(); * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="restorewebgl"},92503:(s,y,e)=>{/** + */s.exports="restorewebgl"},92503:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={LOSE_WEBGL:e(63899),POST_RENDER:e(6119),PRE_RENDER:e(48070),RENDER:e(15640),RESIZE:e(8912),RESTORE_WEBGL:e(87124)}},36909:(s,y,e)=>{/** + */s.exports={LOSE_WEBGL:e(63899),POST_RENDER:e(6119),PRE_RENDER:e(48070),RENDER:e(15640),RESIZE:e(8912),RESTORE_WEBGL:e(87124)}},36909:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Events:e(92503),Snapshot:e(89966)},s.exports.Canvas=e(55830),s.exports.WebGL=e(4159)},32880:(s,y,e)=>{/** + */s.exports={Events:e(92503),Snapshot:e(89966)},s.exports.Canvas=e(55830),s.exports.WebGL=e(4159)},32880:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(27919),d=e(40987),h=e(95540),a=function(l,n){var u=h(n,"callback"),f=h(n,"type","image/png"),o=h(n,"encoder",.92),c=Math.abs(Math.round(h(n,"x",0))),p=Math.abs(Math.round(h(n,"y",0))),v=Math.floor(h(n,"width",l.width)),m=Math.floor(h(n,"height",l.height)),S=h(n,"getPixel",!1);if(S){var M=l.getContext("2d",{willReadFrequently:!1}),w=M.getImageData(c,p,1,1),C=w.data;u.call(null,new d(C[0],C[1],C[2],C[3]))}else if(c!==0||p!==0||v!==l.width||m!==l.height){var A=r.createWebGL(this,v,m),P=A.getContext("2d",{willReadFrequently:!0});v>0&&m>0&&P.drawImage(l,c,p,v,m,0,0,v,m);var b=new Image;b.onerror=function(){u.call(null),r.remove(A)},b.onload=function(){u.call(null,b),r.remove(A)},b.src=A.toDataURL(f,o)}else{var O=new Image;O.onerror=function(){u.call(null)},O.onload=function(){u.call(null,O)},O.src=l.toDataURL(f,o)}};s.exports=a},88815:(s,y,e)=>{/** + */var r=e(27919),d=e(40987),h=e(95540),a=function(l,n){var u=h(n,"callback"),f=h(n,"type","image/png"),o=h(n,"encoder",.92),c=Math.abs(Math.round(h(n,"x",0))),p=Math.abs(Math.round(h(n,"y",0))),v=Math.floor(h(n,"width",l.width)),m=Math.floor(h(n,"height",l.height)),S=h(n,"getPixel",!1);if(S){var M=l.getContext("2d",{willReadFrequently:!1}),w=M.getImageData(c,p,1,1),C=w.data;u.call(null,new d(C[0],C[1],C[2],C[3]))}else if(c!==0||p!==0||v!==l.width||m!==l.height){var A=r.createWebGL(this,v,m),P=A.getContext("2d",{willReadFrequently:!0});v>0&&m>0&&P.drawImage(l,c,p,v,m,0,0,v,m);var b=new Image;b.onerror=function(){u.call(null),r.remove(A)},b.onload=function(){u.call(null,b),r.remove(A)},b.src=A.toDataURL(f,o)}else{var O=new Image;O.onerror=function(){u.call(null)},O.onload=function(){u.call(null,O)},O.src=l.toDataURL(f,o)}};s.exports=a},88815:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(27919),d=e(40987),h=e(95540),a=function(l,n){var u=l,f=h(n,"callback"),o=h(n,"type","image/png"),c=h(n,"encoder",.92),p=Math.abs(Math.round(h(n,"x",0))),v=Math.abs(Math.round(h(n,"y",0))),m=h(n,"getPixel",!1),S=h(n,"isFramebuffer",!1),M=S?h(n,"bufferWidth",1):u.drawingBufferWidth,w=S?h(n,"bufferHeight",1):u.drawingBufferHeight;if(m){var C=new Uint8Array(4),A=S?v:w-v;u.readPixels(p,A,1,1,u.RGBA,u.UNSIGNED_BYTE,C),f.call(null,new d(C[0],C[1],C[2],C[3]))}else{var P=Math.floor(h(n,"width",M)),b=Math.floor(h(n,"height",w)),O=P*b*4,I=new Uint8Array(O);u.readPixels(p,w-v-b,P,b,u.RGBA,u.UNSIGNED_BYTE,I);for(var D=r.createWebGL(this,P,b),B=D.getContext("2d",{willReadFrequently:!0}),G=B.getImageData(0,0,P,b),z=G.data,X=0;X{/** + */var r=e(27919),d=e(40987),h=e(95540),a=function(l,n){var u=l,f=h(n,"callback"),o=h(n,"type","image/png"),c=h(n,"encoder",.92),p=Math.abs(Math.round(h(n,"x",0))),v=Math.abs(Math.round(h(n,"y",0))),m=h(n,"getPixel",!1),S=h(n,"isFramebuffer",!1),M=S?h(n,"bufferWidth",1):u.drawingBufferWidth,w=S?h(n,"bufferHeight",1):u.drawingBufferHeight;if(m){var C=new Uint8Array(4),A=S?v:w-v;u.readPixels(p,A,1,1,u.RGBA,u.UNSIGNED_BYTE,C),f.call(null,new d(C[0],C[1],C[2],C[3]))}else{var P=Math.floor(h(n,"width",M)),b=Math.floor(h(n,"height",w)),O=P*b*4,I=new Uint8Array(O);u.readPixels(p,w-v-b,P,b,u.RGBA,u.UNSIGNED_BYTE,I);for(var D=r.createWebGL(this,P,b),B=D.getContext("2d",{willReadFrequently:!0}),G=B.getImageData(0,0,P,b),z=G.data,X=0;X{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Canvas:e(32880),WebGL:e(88815)}},7530:(s,y,e)=>{/** + */s.exports={Canvas:e(32880),WebGL:e(88815)}},7530:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(36060),h=e(90330),a=e(82264),l=e(95540),n=e(32302),u=e(63448),f=e(31302),o=e(58918),c=e(14811),p=e(92651),v=e(96569),m=e(56527),S=e(57516),M=e(43439),w=e(81041),C=e(12385),A=e(7589),P=e(95428),b=e(72905),O=new r({initialize:function(D){this.game=D.game,this.renderer=D,this.classes=new h([[d.UTILITY_PIPELINE,A],[d.MULTI_PIPELINE,S],[d.BITMAPMASK_PIPELINE,f],[d.SINGLE_PIPELINE,C],[d.ROPE_PIPELINE,w],[d.LIGHT_PIPELINE,v],[d.POINTLIGHT_PIPELINE,M],[d.MOBILE_PIPELINE,m]]),this.postPipelineClasses=new h,this.pipelines=new h,this.postPipelineInstances=[],this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(I,D,B){var G=this.renderer,z=this.renderTargets;this.frameInc=Math.floor(l(I,"frameInc",32));var X=G.width,j=G.height,Q=this.game.config.disablePreFX,tt=this.game.config.disablePostFX;if(tt||this.postPipelineClasses.setAll([[String(c.BARREL),o.Barrel],[String(c.BLOOM),o.Bloom],[String(c.BLUR),o.Blur],[String(c.BOKEH),o.Bokeh],[String(c.CIRCLE),o.Circle],[String(c.COLOR_MATRIX),o.ColorMatrix],[String(c.DISPLACEMENT),o.Displacement],[String(c.GLOW),o.Glow],[String(c.GRADIENT),o.Gradient],[String(c.PIXELATE),o.Pixelate],[String(c.SHADOW),o.Shadow],[String(c.SHINE),o.Shine],[String(c.VIGNETTE),o.Vignette],[String(c.WIPE),o.Wipe]]),!Q){this.classes.set(d.FX_PIPELINE,p);for(var Y=Math.min(X,j),Z=Math.ceil(Y/this.frameInc),U=1;U=0;B--){var G=D[B];G.active&&G.preBatch(I)}}},postBatch:function(I){if(I.hasPostPipeline){this.flush();for(var D=I.postPipelines,B=0;B=0;B--){var G=D[B];G.active&&G.preBatch(I)}}},postBatchCamera:function(I){if(I.hasPostPipeline){this.flush();for(var D=I.postPipelines,B=0;Bthis.maxDimension)return this.targetIndex=D.length-B,D[this.targetIndex];var G=(u(I,this.frameInc,0,!0)-1)*B;return this.targetIndex=G,D[G]},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}});s.exports=O},32302:(s,y,e)=>{/** + */var r=e(83419),d=e(36060),h=e(90330),a=e(82264),l=e(95540),n=e(32302),u=e(63448),f=e(31302),o=e(58918),c=e(14811),p=e(92651),v=e(96569),m=e(56527),S=e(57516),M=e(43439),w=e(81041),C=e(12385),A=e(7589),P=e(95428),b=e(72905),O=new r({initialize:function(D){this.game=D.game,this.renderer=D,this.classes=new h([[d.UTILITY_PIPELINE,A],[d.MULTI_PIPELINE,S],[d.BITMAPMASK_PIPELINE,f],[d.SINGLE_PIPELINE,C],[d.ROPE_PIPELINE,w],[d.LIGHT_PIPELINE,v],[d.POINTLIGHT_PIPELINE,M],[d.MOBILE_PIPELINE,m]]),this.postPipelineClasses=new h,this.pipelines=new h,this.postPipelineInstances=[],this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(I,D,B){var G=this.renderer,z=this.renderTargets;this.frameInc=Math.floor(l(I,"frameInc",32));var X=G.width,j=G.height,Q=this.game.config.disablePreFX,tt=this.game.config.disablePostFX;if(tt||this.postPipelineClasses.setAll([[String(c.BARREL),o.Barrel],[String(c.BLOOM),o.Bloom],[String(c.BLUR),o.Blur],[String(c.BOKEH),o.Bokeh],[String(c.CIRCLE),o.Circle],[String(c.COLOR_MATRIX),o.ColorMatrix],[String(c.DISPLACEMENT),o.Displacement],[String(c.GLOW),o.Glow],[String(c.GRADIENT),o.Gradient],[String(c.PIXELATE),o.Pixelate],[String(c.SHADOW),o.Shadow],[String(c.SHINE),o.Shine],[String(c.VIGNETTE),o.Vignette],[String(c.WIPE),o.Wipe]]),!Q){this.classes.set(d.FX_PIPELINE,p);for(var Y=Math.min(X,j),$=Math.ceil(Y/this.frameInc),U=1;U<$;U++){var H=U*this.frameInc;z.push(new n(G,H,H)),z.push(new n(G,H,H)),z.push(new n(G,H,H)),this.maxDimension=H}z.push(new n(G,X,j,1,0,!0,!0)),z.push(new n(G,X,j,1,0,!0,!0)),z.push(new n(G,X,j,1,0,!0,!0))}var Z,_,q=this,at=this.game;if(this.classes.each(function(rt,gt){Z=q.add(rt,new gt({game:at})),rt===d.UTILITY_PIPELINE&&(q.UTILITY_PIPELINE=Z,q.fullFrame1=Z.fullFrame1,q.fullFrame2=Z.fullFrame2,q.halfFrame1=Z.halfFrame1,q.halfFrame2=Z.halfFrame2)}),this.MULTI_PIPELINE=this.get(d.MULTI_PIPELINE),this.BITMAPMASK_PIPELINE=this.get(d.BITMAPMASK_PIPELINE),this.MOBILE_PIPELINE=this.get(d.MOBILE_PIPELINE),Q||(this.FX_PIPELINE=this.get(d.FX_PIPELINE)),I)for(_ in I){var ot=I[_];Z=new ot(at),Z.name=_,Z.isPostFX?this.postPipelineClasses.set(_,ot):this.has(_)||(this.classes.set(_,ot),this.add(_,Z))}this.default=this.get(D),B&&!a.os.desktop&&(this.default=this.MOBILE_PIPELINE)},setDefaultPipeline:function(I){var D=this.get(I);return D&&(this.default=D),D},add:function(I,D){if(D.isPostFX){console.warn(I+" is a Post Pipeline. Use `addPostPipeline` instead");return}var B=this.pipelines,G=this.renderer;return B.has(I)?console.warn("Pipeline exists: "+I):(D.name=I,D.manager=this,B.set(I,D)),D.hasBooted||D.boot(),G.width!==0&&G.height!==0&&!D.isPreFX&&D.resize(G.width,G.height),D},addPostPipeline:function(I,D){this.postPipelineClasses.has(I)||this.postPipelineClasses.set(I,D)},flush:function(){this.current&&this.current.flush()},has:function(I){var D=this.pipelines;return typeof I=="string"?D.has(I):!!D.contains(I)},get:function(I){var D=this.pipelines;if(typeof I=="string")return D.get(I);if(D.contains(I))return I},getPostPipeline:function(I,D,B){var G=this.postPipelineClasses,z,X="",j=typeof I;if(j==="string"||j==="number"?(z=G.get(I),X=I):j==="function"?(G.contains(I)&&(z=I),X=I.name):j==="object"&&(z=G.get(I.name),X=I.name),z){var Q=new z(this.game,B);return Q.name=X,D&&(Q.gameObject=D),this.postPipelineInstances.push(Q),Q}},removePostPipeline:function(I){b(this.postPipelineInstances,I)},remove:function(I,D,B){D===void 0&&(D=!0),B===void 0&&(B=!0),this.pipelines.delete(I),D&&this.classes.delete(I),B&&this.postPipelineClasses.delete(I)},set:function(I,D,B){if(!I.isPostFX)return this.isCurrent(I,B)||(this.flush(),this.current&&this.current.unbind(),this.current=I,I.bind(B)),I.updateProjectionMatrix(),I.onBind(D),I},preBatch:function(I){if(I.hasPostPipeline){this.flush();for(var D=I.postPipelines,B=D.length-1;B>=0;B--){var G=D[B];G.active&&G.preBatch(I)}}},postBatch:function(I){if(I.hasPostPipeline){this.flush();for(var D=I.postPipelines,B=0;B=0;B--){var G=D[B];G.active&&G.preBatch(I)}}},postBatchCamera:function(I){if(I.hasPostPipeline){this.flush();for(var D=I.postPipelines,B=0;Bthis.maxDimension)return this.targetIndex=D.length-B,D[this.targetIndex];var G=(u(I,this.frameInc,0,!0)-1)*B;return this.targetIndex=G,D[G]},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}});s.exports=O},32302:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4705,21 +4705,21 @@ return new `+this.key+`(); * @author Matthew Groves <@doormat> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={getTintFromFloats:function(y,e,r,d){var h=(y*255|0)&255,a=(e*255|0)&255,l=(r*255|0)&255,n=(d*255|0)&255;return(n<<24|h<<16|a<<8|l)>>>0},getTintAppendFloatAlpha:function(y,e){var r=(e*255|0)&255;return(r<<24|y)>>>0},getTintAppendFloatAlphaAndSwap:function(y,e){var r=(y>>16|0)&255,d=(y>>8|0)&255,h=(y|0)&255,a=(e*255|0)&255;return(a<<24|h<<16|d<<8|r)>>>0},getFloatsFromUintRGB:function(y){var e=(y>>16|0)&255,r=(y>>8|0)&255,d=(y|0)&255;return[e/255,r/255,d/255]},checkShaderMax:function(y,e){var r=Math.min(16,y.getParameter(y.MAX_TEXTURE_IMAGE_UNITS));return!e||e===-1?r:Math.min(r,e)},parseFragmentShaderMaxTextures:function(y,e){if(!y)return"";for(var r="",d=0;d0&&(r+=` + */s.exports={getTintFromFloats:function(x,e,r,d){var h=(x*255|0)&255,a=(e*255|0)&255,l=(r*255|0)&255,n=(d*255|0)&255;return(n<<24|h<<16|a<<8|l)>>>0},getTintAppendFloatAlpha:function(x,e){var r=(e*255|0)&255;return(r<<24|x)>>>0},getTintAppendFloatAlphaAndSwap:function(x,e){var r=(x>>16|0)&255,d=(x>>8|0)&255,h=(x|0)&255,a=(e*255|0)&255;return(a<<24|h<<16|d<<8|r)>>>0},getFloatsFromUintRGB:function(x){var e=(x>>16|0)&255,r=(x>>8|0)&255,d=(x|0)&255;return[e/255,r/255,d/255]},checkShaderMax:function(x,e){var r=Math.min(16,x.getParameter(x.MAX_TEXTURE_IMAGE_UNITS));return!e||e===-1?r:Math.min(r,e)},parseFragmentShaderMaxTextures:function(x,e){if(!x)return"";for(var r="",d=0;d0&&(r+=` else `),d{/** + }`;return x=x.replace(/%count%/gi,e.toString()),x.replace(/%forloop%/gi,r)},setGlowQuality:function(x,e,r,d){return r===void 0&&(r=e.config.glowFXQuality),d===void 0&&(d=e.config.glowFXDistance),x=x.replace(/__SIZE__/gi,(1/r/d).toFixed(7)),x=x.replace(/__DIST__/gi,d.toFixed(0)+".0"),x}}},29100:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var r=e(83419),d=e(62644),h=e(50792),a=e(77085),l=e(95540),n=e(37867),u=e(92503),f=e(32302),o=e(70554),c=e(38683),p=new r({Extends:h,initialize:function(m){h.call(this);var S=m.game,M=S.renderer,w=M.gl;this.name=l(m,"name","WebGLPipeline"),this.game=S,this.renderer=M,this.manager,this.gl=w,this.view=S.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=l(m,"topology",w.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=l(m,"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=m,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=l(m,"resizeUniform","")},boot:function(){var v,m=this.gl,S=this.config,M=this.renderer;this.isPostFX||(this.projectionMatrix=new n().identity());var w=this.renderTargets,C=l(S,"renderTarget",!1);typeof C=="boolean"&&C&&(C=1);var A=M.width,P=M.height;if(typeof C=="number")for(v=0;vX&&(X=z[v].vertexSize);var j=l(S,"batchSize",M.config.batchSize);this.vertexCapacity=j*6;var Q=new ArrayBuffer(this.vertexCapacity*X);this.vertexData=Q,this.bytes=new Uint8Array(Q),this.vertexViewF32=new Float32Array(Q),this.vertexViewU32=new Uint32Array(Q);var tt=l(S,"vertices",null);for(tt?(this.vertexViewF32.set(tt),this.vertexBuffer=M.createVertexBuffer(Q,m.STATIC_DRAW)):this.vertexBuffer=M.createVertexBuffer(Q.byteLength,m.DYNAMIC_DRAW),this.setVertexBuffer(),v=z.length-1;v>=0;v--)z[v].rebind();this.hasBooted=!0,M.on(u.RESIZE,this.resize,this),M.on(u.PRE_RENDER,this.onPreRender,this),M.on(u.RENDER,this.onRender,this),M.on(u.POST_RENDER,this.onPostRender,this),this.emit(a.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(v,m,S){var M=this.renderer;if(v!==this.currentShader||M.currentProgram!==this.currentShader.program){this.flush();var w=this.setVertexBuffer(S);w&&!m&&(m=!0),v.bind(m,!1),this.currentShader=v}return this},getShaderByName:function(v){for(var m=this.shaders,S=0;S-1&&(z=Y.substring(20))}X&&j&&B.push(new c(this,z,X,j,d(Q)))}this.shaders=B}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(v){return this.currentBatch={start:this.vertexCount,count:0,texture:[v],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=v,this.batch.push(this.currentBatch),0},addTextureToBatch:function(v){var m=this.currentBatch;m&&(m.texture.push(v),m.unit++,m.maxUnit++)},pushBatch:function(v){if(!this.currentBatch||this.forceZero&&v!==this.currentTexture)return this.createBatch(v);if(v===this.currentTexture)return this.currentUnit;var m=this.currentBatch,S=m.texture.indexOf(v);return S===-1?m.texture.length===this.renderer.maxTextures?this.createBatch(v):(m.unit++,m.maxUnit++,m.texture.push(v),this.currentUnit=m.unit,this.currentTexture=v,m.unit):(this.currentUnit=S,this.currentTexture=v,S)},setGameObject:function(v,m){return m===void 0&&(m=v.frame),this.pushBatch(m.source.glTexture)},shouldFlush:function(v){return v===void 0&&(v=0),this.vertexCount+v>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(v,m){(v!==this.width||m!==this.height)&&this.flush(),this.width=v,this.height=m;for(var S=this.renderTargets,M=0;M=0;S--){var M=m[S].rebind();(!v||M===v)&&(this.currentShader=M)}return this.activeTextures.length=0,this.emit(a.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var v=this.shaders,m=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,m&&this.setVertexBuffer();for(var S=0;S0){this.emit(a.BEFORE_FLUSH,this,v),this.onBeforeFlush(v);var m=this.gl,S=this.vertexCount,M=this.currentShader.vertexSize,w=this.topology;if(this.active){this.setVertexBuffer(),S===this.vertexCapacity?m.bufferData(m.ARRAY_BUFFER,this.vertexData,m.DYNAMIC_DRAW):m.bufferSubData(m.ARRAY_BUFFER,0,this.bytes.subarray(0,S*M));var C,A,P,b=this.batch,O=this.activeTextures;if(this.forceZero)for(O[0]||m.activeTexture(m.TEXTURE0),C=0;C{/** +`),Y=tt[0].trim();Y.indexOf("#define SHADER_NAME")>-1&&(z=Y.substring(20))}X&&j&&B.push(new c(this,z,X,j,d(Q)))}this.shaders=B}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(v){return this.currentBatch={start:this.vertexCount,count:0,texture:[v],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=v,this.batch.push(this.currentBatch),0},addTextureToBatch:function(v){var m=this.currentBatch;m&&(m.texture.push(v),m.unit++,m.maxUnit++)},pushBatch:function(v){if(!this.currentBatch||this.forceZero&&v!==this.currentTexture)return this.createBatch(v);if(v===this.currentTexture)return this.currentUnit;var m=this.currentBatch,S=m.texture.indexOf(v);return S===-1?m.texture.length===this.renderer.maxTextures?this.createBatch(v):(m.unit++,m.maxUnit++,m.texture.push(v),this.currentUnit=m.unit,this.currentTexture=v,m.unit):(this.currentUnit=S,this.currentTexture=v,S)},setGameObject:function(v,m){return m===void 0&&(m=v.frame),this.pushBatch(m.source.glTexture)},shouldFlush:function(v){return v===void 0&&(v=0),this.vertexCount+v>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(v,m){(v!==this.width||m!==this.height)&&this.flush(),this.width=v,this.height=m;for(var S=this.renderTargets,M=0;M=0;S--){var M=m[S].rebind();(!v||M===v)&&(this.currentShader=M)}return this.activeTextures.length=0,this.emit(a.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var v=this.shaders,m=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,m&&this.setVertexBuffer();for(var S=0;S0){this.emit(a.BEFORE_FLUSH,this,v),this.onBeforeFlush(v);var m=this.gl,S=this.vertexCount,M=this.currentShader.vertexSize,w=this.topology;if(this.active){this.setVertexBuffer(),S===this.vertexCapacity?m.bufferData(m.ARRAY_BUFFER,this.vertexData,m.DYNAMIC_DRAW):m.bufferSubData(m.ARRAY_BUFFER,0,this.bytes.subarray(0,S*M));var C,A,P,b=this.batch,O=this.activeTextures;if(this.forceZero)for(O[0]||m.activeTexture(m.TEXTURE0),C=0;C{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(95428),d=e(72905),h=e(19715),a=e(83419),l=e(8054),n=e(50792),u=e(92503),f=e(50030),o=e(37867),c=e(29747),p=e(7530),v=e(32302),m=e(97480),S=e(69442),M=e(70554),w=e(88815),C=e(26128),A=e(1482),P=e(82751),b=e(84387),O=e(93567),I=e(57183),D=new a({Extends:n,initialize:function(G){n.call(this);var z=G.config,X={alpha:z.transparent,desynchronized:z.desynchronized,depth:!0,antialias:z.antialiasGL,premultipliedAlpha:z.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:z.failIfMajorPerformanceCaveat,powerPreference:z.powerPreference,preserveDrawingBuffer:z.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:z.clearBeforeRender,antialias:z.antialias,backgroundColor:z.backgroundColor,contextCreation:X,roundPixels:z.roundPixels,maxTextures:z.maxTextures,maxTextureSize:z.maxTextureSize,batchSize:z.batchSize,maxLights:z.maxLights,mipmapFilter:z.mipmapFilter},this.game=G,this.type=l.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=G.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=c,this.contextRestoredHandler=c,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(B){var G,z=this.game,X=this.canvas,j=B.backgroundColor;if(z.config.context?G=z.config.context:G=X.getContext("webgl",B.contextCreation)||X.getContext("experimental-webgl",B.contextCreation),!G||G.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=G;var Q=this,tt=function(){var U=G.getSupportedExtensions();Q.supportedExtensions=U;var H="ANGLE_instanced_arrays";Q.instancedArraysExtension=U.indexOf(H)>-1?G.getExtension(H):null;var $="OES_vertex_array_object";Q.vaoExtension=U.indexOf($)>-1?G.getExtension($):null};tt(),this.contextLostHandler=function(U){Q.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),Q.emit(u.LOSE_WEBGL,Q),U.preventDefault()},X.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.contextRestoredHandler=function(U){if(G.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}Q.currentProgram=null,Q.currentFramebuffer=null,Q.setBlendMode(l.BlendModes.NORMAL),G.disable(G.BLEND),G.disable(G.DEPTH_TEST),G.enable(G.CULL_FACE),Q.compression=Q.getCompressedTextures();var H=function($){$.createResource()};r(Q.glTextureWrappers,H),r(Q.glBufferWrappers,H),r(Q.glFramebufferWrappers,H),r(Q.glProgramWrappers,H),r(Q.glAttribLocationWrappers,H),r(Q.glUniformLocationWrappers,H),Q.createTemporaryTextures(),Q.pipelines.restoreContext(),Q.resize(Q.game.scale.baseSize.width,Q.game.scale.baseSize.height),tt(),Q.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),Q.emit(u.RESTORE_WEBGL,Q),U.preventDefault()},X.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),z.context=G;for(var Y=0;Y<=27;Y++)this.blendModes.push({func:[G.ONE,G.ONE_MINUS_SRC_ALPHA],equation:G.FUNC_ADD});this.blendModes[1].func=[G.ONE,G.DST_ALPHA],this.blendModes[2].func=[G.DST_COLOR,G.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[G.ONE,G.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[G.ZERO,G.ONE_MINUS_SRC_ALPHA],equation:G.FUNC_REVERSE_SUBTRACT},this.glFormats=[G.BYTE,G.SHORT,G.UNSIGNED_BYTE,G.UNSIGNED_SHORT,G.FLOAT],this.glFuncMap={mat2:{func:G.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:G.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:G.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:G.uniform1f,length:1},"1fv":{func:G.uniform1fv,length:1},"1i":{func:G.uniform1i,length:1},"1iv":{func:G.uniform1iv,length:1},"2f":{func:G.uniform2f,length:2},"2fv":{func:G.uniform2fv,length:1},"2i":{func:G.uniform2i,length:2},"2iv":{func:G.uniform2iv,length:1},"3f":{func:G.uniform3f,length:3},"3fv":{func:G.uniform3fv,length:1},"3i":{func:G.uniform3i,length:3},"3iv":{func:G.uniform3iv,length:1},"4f":{func:G.uniform4f,length:4},"4fv":{func:G.uniform4fv,length:1},"4i":{func:G.uniform4i,length:4},"4iv":{func:G.uniform4iv,length:1}},(!B.maxTextures||B.maxTextures===-1)&&(B.maxTextures=G.getParameter(G.MAX_TEXTURE_IMAGE_UNITS)),B.maxTextureSize||(B.maxTextureSize=G.getParameter(G.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),G.disable(G.DEPTH_TEST),G.disable(G.CULL_FACE),G.enable(G.BLEND),G.clearColor(j.redGL,j.greenGL,j.blueGL,j.alphaGL);var Z=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return Z.indexOf(B.mipmapFilter)!==-1&&(this.mipmapFilter=G[B.mipmapFilter]),this.maxTextures=M.checkShaderMax(G,B.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new p(this),this.setBlendMode(l.BlendModes.NORMAL),this.projectionMatrix=new o().identity(),z.textures.once(S.READY,this.boot,this),this},boot:function(){var B=this.game,G=this.pipelines,z=B.scale.baseSize,X=z.width,j=z.height;this.width=X,this.height=j,this.isBooted=!0,this.renderTarget=new v(this,X,j,1,0,!0,!0),this.maskTarget=new v(this,X,j,1,0,!0,!0),this.maskSource=new v(this,X,j,1,0,!0,!0);var Q=B.config;G.boot(Q.pipeline,Q.defaultPipeline,Q.autoMobilePipeline),this.blankTexture=B.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=B.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=B.textures.getFrame("__WHITE").glTexture;var tt=this.gl;tt.bindFramebuffer(tt.FRAMEBUFFER,null),tt.enable(tt.SCISSOR_TEST),B.scale.on(m.RESIZE,this.onResize,this),this.resize(X,j)},createTemporaryTextures:function(){for(var B=this.gl,G=0;G0&&X>0;if(tt&&Y){var Z=tt[0],U=tt[1],H=tt[2],$=tt[3];Y=Z!==B||U!==G||H!==z||$!==X}Y&&(this.flush(),Q.scissor(B,j-G-X,z,X))},resetScissor:function(){var B=this.gl;B.enable(B.SCISSOR_TEST);var G=this.currentScissor;if(G){var z=G[0],X=G[1],j=G[2],Q=G[3];j>0&&Q>0&&B.scissor(z,this.drawingBufferHeight-X-Q,j,Q)}},popScissor:function(){var B=this.scissorStack;B.pop();var G=B[B.length-1];G&&this.setScissor(G[0],G[1],G[2],G[3]),this.currentScissor=G},hasActiveStencilMask:function(){var B=this.currentMask.mask,G=this.currentCameraMask.mask;return B&&B.isStencil||G&&G.isStencil},resetViewport:function(){var B=this.gl;B.viewport(0,0,this.width,this.height),this.drawingBufferHeight=B.drawingBufferHeight},setBlendMode:function(B,G){G===void 0&&(G=!1);var z=this.gl,X=this.blendModes[B];return G||B!==l.BlendModes.SKIP_CHECK&&this.currentBlendMode!==B?(this.flush(),z.enable(z.BLEND),z.blendEquation(X.equation),X.func.length>2?z.blendFuncSeparate(X.func[0],X.func[1],X.func[2],X.func[3]):z.blendFunc(X.func[0],X.func[1]),this.currentBlendMode=B,!0):!1},addBlendMode:function(B,G){var z=this.blendModes.push({func:B,equation:G});return z-1},updateBlendMode:function(B,G,z){return this.blendModes[B]&&(this.blendModes[B].func=G,z&&(this.blendModes[B].equation=z)),this},removeBlendMode:function(B){return B>17&&this.blendModes[B]&&this.blendModes.splice(B,1),this},pushFramebuffer:function(B,G,z,X,j){return B===this.currentFramebuffer?this:(this.fboStack.push(B),this.setFramebuffer(B,G,z,X,j))},setFramebuffer:function(B,G,z,X,j){if(G===void 0&&(G=!1),z===void 0&&(z=!0),X===void 0&&(X=null),j===void 0&&(j=!1),B===this.currentFramebuffer)return this;var Q=this.gl,tt=this.width,Y=this.height;return B&&B.renderTexture&&z?(tt=B.renderTexture.width,Y=B.renderTexture.height):this.flush(),B?Q.bindFramebuffer(Q.FRAMEBUFFER,B.webGLFramebuffer):Q.bindFramebuffer(Q.FRAMEBUFFER,null),z&&Q.viewport(0,0,tt,Y),X&&Q.framebufferTexture2D(Q.FRAMEBUFFER,Q.COLOR_ATTACHMENT0,Q.TEXTURE_2D,X.webGLTexture,0),j&&(Q.clearColor(0,0,0,0),Q.clear(Q.COLOR_BUFFER_BIT)),G&&(B?(this.drawingBufferHeight=Y,this.pushScissor(0,0,tt,Y)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=B,this},popFramebuffer:function(B,G){B===void 0&&(B=!1),G===void 0&&(G=!0);var z=this.fboStack;z.pop();var X=z[z.length-1];return X||(X=null),this.setFramebuffer(X,B,G),X},restoreFramebuffer:function(B,G){B===void 0&&(B=!1),G===void 0&&(G=!0);var z=this.fboStack,X=z[z.length-1];X||(X=null),this.currentFramebuffer=null,this.setFramebuffer(X,B,G)},setProgram:function(B){return B!==this.currentProgram?(this.flush(),this.gl.useProgram(B.webGLProgram),this.currentProgram=B,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(B,G,z,X,j){j===void 0&&(j=!1);var Q=this.gl,tt=Q.NEAREST,Y=Q.NEAREST,Z=Q.CLAMP_TO_EDGE,U=null;G=B?B.width:G,z=B?B.height:z;var H=f(G,z);if(H&&!j&&(Z=Q.REPEAT),X===l.ScaleModes.LINEAR&&this.config.antialias){var $=B&&B.compressed,_=!$&&H||$&&B.mipmaps.length>1;tt=this.mipmapFilter&&_?this.mipmapFilter:Q.LINEAR,Y=Q.LINEAR}return!B&&typeof G=="number"&&typeof z=="number"?U=this.createTexture2D(0,tt,Y,Z,Z,Q.RGBA,null,G,z):U=this.createTexture2D(0,tt,Y,Z,Z,Q.RGBA,B),U},createTexture2D:function(B,G,z,X,j,Q,tt,Y,Z,U,H,$){typeof Y!="number"&&(Y=tt?tt.width:1),typeof Z!="number"&&(Z=tt?tt.height:1);var _=new P(this.gl,B,G,z,X,j,Q,tt,Y,Z,U,H,$);return this.glTextureWrappers.push(_),_},createFramebuffer:function(B,G,z,X){this.currentFramebuffer=null;var j=new b(this.gl,B,G,z,X);return this.glFramebufferWrappers.push(j),j},beginBitmapMask:function(B,G){var z=this.gl;z&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==B&&(this.currentMask.mask=B,this.currentMask.camera=G))},drawBitmapMask:function(B,G,z){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),B.renderWebGL(this,B,G),this.maskSource.unbind(!0),this.maskTarget.unbind();var X=this.gl,j=this.getCurrentStencilMask();j?(X.enable(X.STENCIL_TEST),j.mask.applyStencil(this,j.camera,!0)):this.currentMask.mask=null,this.pipelines.set(z),X.activeTexture(X.TEXTURE0),X.bindTexture(X.TEXTURE_2D,this.maskTarget.texture.webGLTexture),X.activeTexture(X.TEXTURE1),X.bindTexture(X.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(B,G){var z=new A(this.gl,B,G);return this.glProgramWrappers.push(z),z},createVertexBuffer:function(B,G){var z=this.gl,X=new C(z,B,z.ARRAY_BUFFER,G);return this.glBufferWrappers.push(X),X},createAttribLocation:function(B,G){var z=new O(this.gl,B,G);return this.glAttribLocationWrappers.push(z),z},createUniformLocation:function(B,G){var z=new I(this.gl,B,G);return this.glUniformLocationWrappers.push(z),z},createIndexBuffer:function(B,G){var z=this.gl,X=new C(z,B,z.ELEMENT_ARRAY_BUFFER,G);return this.glBufferWrappers.push(X),X},deleteTexture:function(B){if(B)return d(this.glTextureWrappers,B),B.destroy(),this},deleteFramebuffer:function(B){return B?(d(this.fboStack,B),d(this.glFramebufferWrappers,B),B.destroy(),this):this},deleteProgram:function(B){return B&&(d(this.glProgramWrappers,B),B.destroy()),this},deleteAttribLocation:function(B){return B&&(d(this.glAttribLocationWrappers,B),B.destroy()),this},deleteUniformLocation:function(B){return B&&(d(this.glUniformLocationWrappers,B),B.destroy()),this},deleteBuffer:function(B){return B?(d(this.glBufferWrappers,B),B.destroy(),this):this},preRenderCamera:function(B){var G=B.x,z=B.y,X=B.width,j=B.height,Q=B.backgroundColor;if(B.emit(h.PRE_RENDER,B),this.pipelines.preBatchCamera(B),this.pushScissor(G,z,X,j),B.mask&&(this.currentCameraMask.mask=B.mask,this.currentCameraMask.camera=B._maskCamera,B.mask.preRenderWebGL(this,B,B._maskCamera)),Q.alphaGL>0){var tt=this.pipelines.setMulti();tt.drawFillRect(G,z,X,j,M.getTintFromFloats(Q.blueGL,Q.greenGL,Q.redGL,1),Q.alphaGL)}},getCurrentStencilMask:function(){var B=null,G=this.maskStack,z=this.currentCameraMask;return G.length>0?B=G[G.length-1]:z.mask&&z.mask.isStencil&&(B=z),B},postRenderCamera:function(B){var G=B.flashEffect,z=B.fadeEffect;if(G.isRunning||z.isRunning||z.isComplete){var X=this.pipelines.setMulti();G.postRenderWebGL(X,M.getTintFromFloats),z.postRenderWebGL(X,M.getTintFromFloats)}B.dirty=!1,this.popScissor(),B.mask&&(this.currentCameraMask.mask=null,B.mask.postRenderWebGL(this,B._maskCamera)),this.pipelines.postBatchCamera(B),B.emit(h.POST_RENDER,B)},preRender:function(){if(!this.contextLost){var B=this.gl;if(B.bindFramebuffer(B.FRAMEBUFFER,null),this.config.clearBeforeRender){var G=this.config.backgroundColor;B.clearColor(G.redGL,G.greenGL,G.blueGL,G.alphaGL),B.clear(B.COLOR_BUFFER_BIT|B.DEPTH_BUFFER_BIT|B.STENCIL_BUFFER_BIT)}B.enable(B.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&B.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(u.PRE_RENDER)}},render:function(B,G,z){if(!this.contextLost){var X=G.length;if(this.emit(u.RENDER,B,z),this.preRenderCamera(z),X===0){this.setBlendMode(l.BlendModes.NORMAL),this.postRenderCamera(z);return}this.currentType="";for(var j=this.currentMask,Q=0;Q{/** + */var r=e(95428),d=e(72905),h=e(19715),a=e(83419),l=e(8054),n=e(50792),u=e(92503),f=e(50030),o=e(37867),c=e(29747),p=e(7530),v=e(32302),m=e(97480),S=e(69442),M=e(70554),w=e(88815),C=e(26128),A=e(1482),P=e(82751),b=e(84387),O=e(93567),I=e(57183),D=new a({Extends:n,initialize:function(G){n.call(this);var z=G.config,X={alpha:z.transparent,desynchronized:z.desynchronized,depth:!0,antialias:z.antialiasGL,premultipliedAlpha:z.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:z.failIfMajorPerformanceCaveat,powerPreference:z.powerPreference,preserveDrawingBuffer:z.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:z.clearBeforeRender,antialias:z.antialias,backgroundColor:z.backgroundColor,contextCreation:X,roundPixels:z.roundPixels,maxTextures:z.maxTextures,maxTextureSize:z.maxTextureSize,batchSize:z.batchSize,maxLights:z.maxLights,mipmapFilter:z.mipmapFilter},this.game=G,this.type=l.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=G.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=c,this.contextRestoredHandler=c,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(B){var G,z=this.game,X=this.canvas,j=B.backgroundColor;if(z.config.context?G=z.config.context:G=X.getContext("webgl",B.contextCreation)||X.getContext("experimental-webgl",B.contextCreation),!G||G.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=G;var Q=this,tt=function(){var U=G.getSupportedExtensions();Q.supportedExtensions=U;var H="ANGLE_instanced_arrays";Q.instancedArraysExtension=U.indexOf(H)>-1?G.getExtension(H):null;var Z="OES_vertex_array_object";Q.vaoExtension=U.indexOf(Z)>-1?G.getExtension(Z):null};tt(),this.contextLostHandler=function(U){Q.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),Q.emit(u.LOSE_WEBGL,Q),U.preventDefault()},X.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.contextRestoredHandler=function(U){if(G.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}Q.currentProgram=null,Q.currentFramebuffer=null,Q.setBlendMode(l.BlendModes.NORMAL),G.disable(G.BLEND),G.disable(G.DEPTH_TEST),G.enable(G.CULL_FACE),Q.compression=Q.getCompressedTextures();var H=function(Z){Z.createResource()};r(Q.glTextureWrappers,H),r(Q.glBufferWrappers,H),r(Q.glFramebufferWrappers,H),r(Q.glProgramWrappers,H),r(Q.glAttribLocationWrappers,H),r(Q.glUniformLocationWrappers,H),Q.createTemporaryTextures(),Q.pipelines.restoreContext(),Q.resize(Q.game.scale.baseSize.width,Q.game.scale.baseSize.height),tt(),Q.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),Q.emit(u.RESTORE_WEBGL,Q),U.preventDefault()},X.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),z.context=G;for(var Y=0;Y<=27;Y++)this.blendModes.push({func:[G.ONE,G.ONE_MINUS_SRC_ALPHA],equation:G.FUNC_ADD});this.blendModes[1].func=[G.ONE,G.DST_ALPHA],this.blendModes[2].func=[G.DST_COLOR,G.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[G.ONE,G.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[G.ZERO,G.ONE_MINUS_SRC_ALPHA],equation:G.FUNC_REVERSE_SUBTRACT},this.glFormats=[G.BYTE,G.SHORT,G.UNSIGNED_BYTE,G.UNSIGNED_SHORT,G.FLOAT],this.glFuncMap={mat2:{func:G.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:G.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:G.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:G.uniform1f,length:1},"1fv":{func:G.uniform1fv,length:1},"1i":{func:G.uniform1i,length:1},"1iv":{func:G.uniform1iv,length:1},"2f":{func:G.uniform2f,length:2},"2fv":{func:G.uniform2fv,length:1},"2i":{func:G.uniform2i,length:2},"2iv":{func:G.uniform2iv,length:1},"3f":{func:G.uniform3f,length:3},"3fv":{func:G.uniform3fv,length:1},"3i":{func:G.uniform3i,length:3},"3iv":{func:G.uniform3iv,length:1},"4f":{func:G.uniform4f,length:4},"4fv":{func:G.uniform4fv,length:1},"4i":{func:G.uniform4i,length:4},"4iv":{func:G.uniform4iv,length:1}},(!B.maxTextures||B.maxTextures===-1)&&(B.maxTextures=G.getParameter(G.MAX_TEXTURE_IMAGE_UNITS)),B.maxTextureSize||(B.maxTextureSize=G.getParameter(G.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),G.disable(G.DEPTH_TEST),G.disable(G.CULL_FACE),G.enable(G.BLEND),G.clearColor(j.redGL,j.greenGL,j.blueGL,j.alphaGL);var $=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return $.indexOf(B.mipmapFilter)!==-1&&(this.mipmapFilter=G[B.mipmapFilter]),this.maxTextures=M.checkShaderMax(G,B.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new p(this),this.setBlendMode(l.BlendModes.NORMAL),this.projectionMatrix=new o().identity(),z.textures.once(S.READY,this.boot,this),this},boot:function(){var B=this.game,G=this.pipelines,z=B.scale.baseSize,X=z.width,j=z.height;this.width=X,this.height=j,this.isBooted=!0,this.renderTarget=new v(this,X,j,1,0,!0,!0),this.maskTarget=new v(this,X,j,1,0,!0,!0),this.maskSource=new v(this,X,j,1,0,!0,!0);var Q=B.config;G.boot(Q.pipeline,Q.defaultPipeline,Q.autoMobilePipeline),this.blankTexture=B.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=B.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=B.textures.getFrame("__WHITE").glTexture;var tt=this.gl;tt.bindFramebuffer(tt.FRAMEBUFFER,null),tt.enable(tt.SCISSOR_TEST),B.scale.on(m.RESIZE,this.onResize,this),this.resize(X,j)},createTemporaryTextures:function(){for(var B=this.gl,G=0;G0&&X>0;if(tt&&Y){var $=tt[0],U=tt[1],H=tt[2],Z=tt[3];Y=$!==B||U!==G||H!==z||Z!==X}Y&&(this.flush(),Q.scissor(B,j-G-X,z,X))},resetScissor:function(){var B=this.gl;B.enable(B.SCISSOR_TEST);var G=this.currentScissor;if(G){var z=G[0],X=G[1],j=G[2],Q=G[3];j>0&&Q>0&&B.scissor(z,this.drawingBufferHeight-X-Q,j,Q)}},popScissor:function(){var B=this.scissorStack;B.pop();var G=B[B.length-1];G&&this.setScissor(G[0],G[1],G[2],G[3]),this.currentScissor=G},hasActiveStencilMask:function(){var B=this.currentMask.mask,G=this.currentCameraMask.mask;return B&&B.isStencil||G&&G.isStencil},resetViewport:function(){var B=this.gl;B.viewport(0,0,this.width,this.height),this.drawingBufferHeight=B.drawingBufferHeight},setBlendMode:function(B,G){G===void 0&&(G=!1);var z=this.gl,X=this.blendModes[B];return G||B!==l.BlendModes.SKIP_CHECK&&this.currentBlendMode!==B?(this.flush(),z.enable(z.BLEND),z.blendEquation(X.equation),X.func.length>2?z.blendFuncSeparate(X.func[0],X.func[1],X.func[2],X.func[3]):z.blendFunc(X.func[0],X.func[1]),this.currentBlendMode=B,!0):!1},addBlendMode:function(B,G){var z=this.blendModes.push({func:B,equation:G});return z-1},updateBlendMode:function(B,G,z){return this.blendModes[B]&&(this.blendModes[B].func=G,z&&(this.blendModes[B].equation=z)),this},removeBlendMode:function(B){return B>17&&this.blendModes[B]&&this.blendModes.splice(B,1),this},pushFramebuffer:function(B,G,z,X,j){return B===this.currentFramebuffer?this:(this.fboStack.push(B),this.setFramebuffer(B,G,z,X,j))},setFramebuffer:function(B,G,z,X,j){if(G===void 0&&(G=!1),z===void 0&&(z=!0),X===void 0&&(X=null),j===void 0&&(j=!1),B===this.currentFramebuffer)return this;var Q=this.gl,tt=this.width,Y=this.height;return B&&B.renderTexture&&z?(tt=B.renderTexture.width,Y=B.renderTexture.height):this.flush(),B?Q.bindFramebuffer(Q.FRAMEBUFFER,B.webGLFramebuffer):Q.bindFramebuffer(Q.FRAMEBUFFER,null),z&&Q.viewport(0,0,tt,Y),X&&Q.framebufferTexture2D(Q.FRAMEBUFFER,Q.COLOR_ATTACHMENT0,Q.TEXTURE_2D,X.webGLTexture,0),j&&(Q.clearColor(0,0,0,0),Q.clear(Q.COLOR_BUFFER_BIT)),G&&(B?(this.drawingBufferHeight=Y,this.pushScissor(0,0,tt,Y)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=B,this},popFramebuffer:function(B,G){B===void 0&&(B=!1),G===void 0&&(G=!0);var z=this.fboStack;z.pop();var X=z[z.length-1];return X||(X=null),this.setFramebuffer(X,B,G),X},restoreFramebuffer:function(B,G){B===void 0&&(B=!1),G===void 0&&(G=!0);var z=this.fboStack,X=z[z.length-1];X||(X=null),this.currentFramebuffer=null,this.setFramebuffer(X,B,G)},setProgram:function(B){return B!==this.currentProgram?(this.flush(),this.gl.useProgram(B.webGLProgram),this.currentProgram=B,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(B,G,z,X,j){j===void 0&&(j=!1);var Q=this.gl,tt=Q.NEAREST,Y=Q.NEAREST,$=Q.CLAMP_TO_EDGE,U=null;G=B?B.width:G,z=B?B.height:z;var H=f(G,z);if(H&&!j&&($=Q.REPEAT),X===l.ScaleModes.LINEAR&&this.config.antialias){var Z=B&&B.compressed,_=!Z&&H||Z&&B.mipmaps.length>1;tt=this.mipmapFilter&&_?this.mipmapFilter:Q.LINEAR,Y=Q.LINEAR}return!B&&typeof G=="number"&&typeof z=="number"?U=this.createTexture2D(0,tt,Y,$,$,Q.RGBA,null,G,z):U=this.createTexture2D(0,tt,Y,$,$,Q.RGBA,B),U},createTexture2D:function(B,G,z,X,j,Q,tt,Y,$,U,H,Z){typeof Y!="number"&&(Y=tt?tt.width:1),typeof $!="number"&&($=tt?tt.height:1);var _=new P(this.gl,B,G,z,X,j,Q,tt,Y,$,U,H,Z);return this.glTextureWrappers.push(_),_},createFramebuffer:function(B,G,z,X){this.currentFramebuffer=null;var j=new b(this.gl,B,G,z,X);return this.glFramebufferWrappers.push(j),j},beginBitmapMask:function(B,G){var z=this.gl;z&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==B&&(this.currentMask.mask=B,this.currentMask.camera=G))},drawBitmapMask:function(B,G,z){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),B.renderWebGL(this,B,G),this.maskSource.unbind(!0),this.maskTarget.unbind();var X=this.gl,j=this.getCurrentStencilMask();j?(X.enable(X.STENCIL_TEST),j.mask.applyStencil(this,j.camera,!0)):this.currentMask.mask=null,this.pipelines.set(z),X.activeTexture(X.TEXTURE0),X.bindTexture(X.TEXTURE_2D,this.maskTarget.texture.webGLTexture),X.activeTexture(X.TEXTURE1),X.bindTexture(X.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(B,G){var z=new A(this.gl,B,G);return this.glProgramWrappers.push(z),z},createVertexBuffer:function(B,G){var z=this.gl,X=new C(z,B,z.ARRAY_BUFFER,G);return this.glBufferWrappers.push(X),X},createAttribLocation:function(B,G){var z=new O(this.gl,B,G);return this.glAttribLocationWrappers.push(z),z},createUniformLocation:function(B,G){var z=new I(this.gl,B,G);return this.glUniformLocationWrappers.push(z),z},createIndexBuffer:function(B,G){var z=this.gl,X=new C(z,B,z.ELEMENT_ARRAY_BUFFER,G);return this.glBufferWrappers.push(X),X},deleteTexture:function(B){if(B)return d(this.glTextureWrappers,B),B.destroy(),this},deleteFramebuffer:function(B){return B?(d(this.fboStack,B),d(this.glFramebufferWrappers,B),B.destroy(),this):this},deleteProgram:function(B){return B&&(d(this.glProgramWrappers,B),B.destroy()),this},deleteAttribLocation:function(B){return B&&(d(this.glAttribLocationWrappers,B),B.destroy()),this},deleteUniformLocation:function(B){return B&&(d(this.glUniformLocationWrappers,B),B.destroy()),this},deleteBuffer:function(B){return B?(d(this.glBufferWrappers,B),B.destroy(),this):this},preRenderCamera:function(B){var G=B.x,z=B.y,X=B.width,j=B.height,Q=B.backgroundColor;if(B.emit(h.PRE_RENDER,B),this.pipelines.preBatchCamera(B),this.pushScissor(G,z,X,j),B.mask&&(this.currentCameraMask.mask=B.mask,this.currentCameraMask.camera=B._maskCamera,B.mask.preRenderWebGL(this,B,B._maskCamera)),Q.alphaGL>0){var tt=this.pipelines.setMulti();tt.drawFillRect(G,z,X,j,M.getTintFromFloats(Q.blueGL,Q.greenGL,Q.redGL,1),Q.alphaGL)}},getCurrentStencilMask:function(){var B=null,G=this.maskStack,z=this.currentCameraMask;return G.length>0?B=G[G.length-1]:z.mask&&z.mask.isStencil&&(B=z),B},postRenderCamera:function(B){var G=B.flashEffect,z=B.fadeEffect;if(G.isRunning||z.isRunning||z.isComplete){var X=this.pipelines.setMulti();G.postRenderWebGL(X,M.getTintFromFloats),z.postRenderWebGL(X,M.getTintFromFloats)}B.dirty=!1,this.popScissor(),B.mask&&(this.currentCameraMask.mask=null,B.mask.postRenderWebGL(this,B._maskCamera)),this.pipelines.postBatchCamera(B),B.emit(h.POST_RENDER,B)},preRender:function(){if(!this.contextLost){var B=this.gl;if(B.bindFramebuffer(B.FRAMEBUFFER,null),this.config.clearBeforeRender){var G=this.config.backgroundColor;B.clearColor(G.redGL,G.greenGL,G.blueGL,G.alphaGL),B.clear(B.COLOR_BUFFER_BIT|B.DEPTH_BUFFER_BIT|B.STENCIL_BUFFER_BIT)}B.enable(B.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&B.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(u.PRE_RENDER)}},render:function(B,G,z){if(!this.contextLost){var X=G.length;if(this.emit(u.RENDER,B,z),this.preRenderCamera(z),X===0){this.setBlendMode(l.BlendModes.NORMAL),this.postRenderCamera(z);return}this.currentType="";for(var j=this.currentMask,Q=0;Q{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4727,54 +4727,54 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}};s.exports=y},4159:(s,y,e)=>{/** + */var x={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}};s.exports=x},4159:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(14500),d=e(79291),h={PipelineManager:e(7530),Pipelines:e(96615),RenderTarget:e(32302),Utils:e(70554),WebGLPipeline:e(29100),WebGLRenderer:e(74797),WebGLShader:e(38683),Wrappers:e(9503)};h=d(!1,h,r),s.exports=h},31302:(s,y,e)=>{/** + */var r=e(14500),d=e(79291),h={PipelineManager:e(7530),Pipelines:e(96615),RenderTarget:e(32302),Utils:e(70554),WebGLPipeline:e(29100),WebGLRenderer:e(74797),WebGLShader:e(38683),Wrappers:e(9503)};h=d(!1,h,r),s.exports=h},31302:(s,x,e)=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(95540),h=e(78908),a=e(85191),l=e(14500),n=e(29100),u=new r({Extends:n,initialize:function(o){o.fragShader=d(o,"fragShader",h),o.vertShader=d(o,"vertShader",a),o.batchSize=d(o,"batchSize",1),o.vertices=d(o,"vertices",[-1,1,-1,-7,7,1]),o.attributes=d(o,"attributes",[{name:"inPosition",size:2,type:l.FLOAT}]),n.call(this,o)},boot:function(){n.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(f,o){n.prototype.resize.call(this,f,o),this.set2f("uResolution",f,o)},beginMask:function(f,o,c){this.renderer.beginBitmapMask(f,c)},endMask:function(f,o,c){var p=this.gl,v=this.renderer,m=f.bitmapMask;m&&p&&(v.drawBitmapMask(m,o,this),c&&this.set2f("uResolution",c.width,c.height),this.set1i("uInvertMaskAlpha",f.invertAlpha),p.drawArrays(this.topology,0,3),c&&this.set2f("uResolution",this.width,this.height),p.bindTexture(p.TEXTURE_2D,null))}});s.exports=u},92651:(s,y,e)=>{/** + */var r=e(83419),d=e(95540),h=e(78908),a=e(85191),l=e(14500),n=e(29100),u=new r({Extends:n,initialize:function(o){o.fragShader=d(o,"fragShader",h),o.vertShader=d(o,"vertShader",a),o.batchSize=d(o,"batchSize",1),o.vertices=d(o,"vertices",[-1,1,-1,-7,7,1]),o.attributes=d(o,"attributes",[{name:"inPosition",size:2,type:l.FLOAT}]),n.call(this,o)},boot:function(){n.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(f,o){n.prototype.resize.call(this,f,o),this.set2f("uResolution",f,o)},beginMask:function(f,o,c){this.renderer.beginBitmapMask(f,c)},endMask:function(f,o,c){var p=this.gl,v=this.renderer,m=f.bitmapMask;m&&p&&(v.drawBitmapMask(m,o,this),c&&this.set2f("uResolution",c.width,c.height),this.set1i("uInvertMaskAlpha",f.invertAlpha),p.drawArrays(this.topology,0,3),c&&this.set2f("uResolution",this.width,this.height),p.bindTexture(p.TEXTURE_2D,null))}});s.exports=u},92651:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(58918),h=e(14811),a=e(95540),l=e(43558),n=e(89350),u=e(70554),f=new r({Extends:l,initialize:function(c){c.shaders=[u.setGlowQuality(n.FXGlowFrag,c.game),n.FXShadowFrag,n.FXPixelateFrag,n.FXVignetteFrag,n.FXShineFrag,n.FXBlurLowFrag,n.FXBlurMedFrag,n.FXBlurHighFrag,n.FXGradientFrag,n.FXBloomFrag,n.ColorMatrixFrag,n.FXCircleFrag,n.FXBarrelFrag,n.FXDisplacementFrag,n.FXWipeFrag,n.FXBokehFrag],l.call(this,c);var p=this.game;this.glow=new d.Glow(p),this.shadow=new d.Shadow(p),this.pixelate=new d.Pixelate(p),this.vignette=new d.Vignette(p),this.shine=new d.Shine(p),this.gradient=new d.Gradient(p),this.circle=new d.Circle(p),this.barrel=new d.Barrel(p),this.wipe=new d.Wipe(p),this.bokeh=new d.Bokeh(p);var v=[];v[h.GLOW]=this.onGlow,v[h.SHADOW]=this.onShadow,v[h.PIXELATE]=this.onPixelate,v[h.VIGNETTE]=this.onVignette,v[h.SHINE]=this.onShine,v[h.BLUR]=this.onBlur,v[h.GRADIENT]=this.onGradient,v[h.BLOOM]=this.onBloom,v[h.COLOR_MATRIX]=this.onColorMatrix,v[h.CIRCLE]=this.onCircle,v[h.BARREL]=this.onBarrel,v[h.DISPLACEMENT]=this.onDisplacement,v[h.WIPE]=this.onWipe,v[h.BOKEH]=this.onBokeh,this.fxHandlers=v,this.source,this.target,this.swap},onDraw:function(o,c,p){this.source=o,this.target=c,this.swap=p;var v=o.width,m=o.height,S=this.tempSprite,M=this.fxHandlers;if(S&&S.preFX)for(var w=S.preFX.list,C=0;C{/** + */var r=e(83419),d=e(58918),h=e(14811),a=e(95540),l=e(43558),n=e(89350),u=e(70554),f=new r({Extends:l,initialize:function(c){c.shaders=[u.setGlowQuality(n.FXGlowFrag,c.game),n.FXShadowFrag,n.FXPixelateFrag,n.FXVignetteFrag,n.FXShineFrag,n.FXBlurLowFrag,n.FXBlurMedFrag,n.FXBlurHighFrag,n.FXGradientFrag,n.FXBloomFrag,n.ColorMatrixFrag,n.FXCircleFrag,n.FXBarrelFrag,n.FXDisplacementFrag,n.FXWipeFrag,n.FXBokehFrag],l.call(this,c);var p=this.game;this.glow=new d.Glow(p),this.shadow=new d.Shadow(p),this.pixelate=new d.Pixelate(p),this.vignette=new d.Vignette(p),this.shine=new d.Shine(p),this.gradient=new d.Gradient(p),this.circle=new d.Circle(p),this.barrel=new d.Barrel(p),this.wipe=new d.Wipe(p),this.bokeh=new d.Bokeh(p);var v=[];v[h.GLOW]=this.onGlow,v[h.SHADOW]=this.onShadow,v[h.PIXELATE]=this.onPixelate,v[h.VIGNETTE]=this.onVignette,v[h.SHINE]=this.onShine,v[h.BLUR]=this.onBlur,v[h.GRADIENT]=this.onGradient,v[h.BLOOM]=this.onBloom,v[h.COLOR_MATRIX]=this.onColorMatrix,v[h.CIRCLE]=this.onCircle,v[h.BARREL]=this.onBarrel,v[h.DISPLACEMENT]=this.onDisplacement,v[h.WIPE]=this.onWipe,v[h.BOKEH]=this.onBokeh,this.fxHandlers=v,this.source,this.target,this.swap},onDraw:function(o,c,p){this.source=o,this.target=c,this.swap=p;var v=o.width,m=o.height,S=this.tempSprite,M=this.fxHandlers;if(S&&S.preFX)for(var w=S.preFX.list,C=0;C{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(95540),h=e(31063),a=e(57516),l=e(61340),n=e(26099),u=e(29100),f=new r({Extends:a,initialize:function(c){var p=d(c,"fragShader",h);c.fragShader=p.replace("%LIGHT_COUNT%",c.game.renderer.config.maxLights),a.call(this,c),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new n,this._tempMatrix=new l,this._tempMatrix2=new l},boot:function(){u.prototype.boot.call(this)},onRender:function(o,c){var p=o.sys.lights;if(this.lightsActive=!1,!(!p||!p.active)){var v=p.getLights(c),m=v.length;this.lightsActive=!0;var S,M=this.renderer,w=M.height,C=c.matrix,A=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",c.x,c.y,c.rotation,c.zoom),this.set3f("uAmbientLightColor",p.ambientColor.r,p.ambientColor.g,p.ambientColor.b),this.set1i("uLightCount",m),S=0;S0&&this.flush();var c=this.inverseRotationMatrix;if(o){var p=-o,v=Math.cos(p),m=Math.sin(p);c[1]=m,c[3]=-m,c[0]=c[4]=v}else c[0]=c[4]=1,c[1]=c[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,c),this.currentNormalMapRotation=o}},setTexture2D:function(o,c){var p=this.renderer;o===void 0&&(o=p.whiteTexture);var v=this.getNormalMap(c);this.isNewNormalMap(o,v)&&(this.flush(),this.createBatch(o),this.addTextureToBatch(v),this.currentNormalMap=v);var m=0;if(c&&c.parentContainer){var S=c.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);m=S.rotationNormalized}else c&&(m=c.rotation);return this.setNormalMapRotation(m),0},setGameObject:function(o,c){c===void 0&&(c=o.frame);var p=c.glTexture,v=this.getNormalMap(o);if(this.isNewNormalMap(p,v)&&(this.flush(),this.createBatch(p),this.addTextureToBatch(v),this.currentNormalMap=v),o.parentContainer){var m=o.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(m.rotationNormalized)}else this.setNormalMapRotation(o.rotation);return 0},isNewNormalMap:function(o,c){return this.currentTexture!==o||this.currentNormalMap!==c},getNormalMap:function(o){var c;if(o)o.displayTexture?c=o.displayTexture.dataSource[o.displayFrame.sourceIndex]:o.texture?c=o.texture.dataSource[o.frame.sourceIndex]:o.tileset&&(Array.isArray(o.tileset)?c=o.tileset[0].image.dataSource[0]:c=o.tileset.image.dataSource[0]);else return this.renderer.normalTexture;return c?c.glTexture:this.renderer.normalTexture},batchSprite:function(o,c,p){this.lightsActive&&a.prototype.batchSprite.call(this,o,c,p)},batchTexture:function(o,c,p,v,m,S,M,w,C,A,P,b,O,I,D,B,G,z,X,j,Q,tt,Y,Z,U,H,$,_,q,at,ot,rt){this.lightsActive&&a.prototype.batchTexture.call(this,o,c,p,v,m,S,M,w,C,A,P,b,O,I,D,B,G,z,X,j,Q,tt,Y,Z,U,H,$,_,q,at,ot,rt)},batchTextureFrame:function(o,c,p,v,m,S,M){this.lightsActive&&a.prototype.batchTextureFrame.call(this,o,c,p,v,m,S,M)}});s.exports=f},56527:(s,y,e)=>{/** + */var r=e(83419),d=e(95540),h=e(31063),a=e(57516),l=e(61340),n=e(26099),u=e(29100),f=new r({Extends:a,initialize:function(c){var p=d(c,"fragShader",h);c.fragShader=p.replace("%LIGHT_COUNT%",c.game.renderer.config.maxLights),a.call(this,c),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new n,this._tempMatrix=new l,this._tempMatrix2=new l},boot:function(){u.prototype.boot.call(this)},onRender:function(o,c){var p=o.sys.lights;if(this.lightsActive=!1,!(!p||!p.active)){var v=p.getLights(c),m=v.length;this.lightsActive=!0;var S,M=this.renderer,w=M.height,C=c.matrix,A=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",c.x,c.y,c.rotation,c.zoom),this.set3f("uAmbientLightColor",p.ambientColor.r,p.ambientColor.g,p.ambientColor.b),this.set1i("uLightCount",m),S=0;S0&&this.flush();var c=this.inverseRotationMatrix;if(o){var p=-o,v=Math.cos(p),m=Math.sin(p);c[1]=m,c[3]=-m,c[0]=c[4]=v}else c[0]=c[4]=1,c[1]=c[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,c),this.currentNormalMapRotation=o}},setTexture2D:function(o,c){var p=this.renderer;o===void 0&&(o=p.whiteTexture);var v=this.getNormalMap(c);this.isNewNormalMap(o,v)&&(this.flush(),this.createBatch(o),this.addTextureToBatch(v),this.currentNormalMap=v);var m=0;if(c&&c.parentContainer){var S=c.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);m=S.rotationNormalized}else c&&(m=c.rotation);return this.setNormalMapRotation(m),0},setGameObject:function(o,c){c===void 0&&(c=o.frame);var p=c.glTexture,v=this.getNormalMap(o);if(this.isNewNormalMap(p,v)&&(this.flush(),this.createBatch(p),this.addTextureToBatch(v),this.currentNormalMap=v),o.parentContainer){var m=o.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(m.rotationNormalized)}else this.setNormalMapRotation(o.rotation);return 0},isNewNormalMap:function(o,c){return this.currentTexture!==o||this.currentNormalMap!==c},getNormalMap:function(o){var c;if(o)o.displayTexture?c=o.displayTexture.dataSource[o.displayFrame.sourceIndex]:o.texture?c=o.texture.dataSource[o.frame.sourceIndex]:o.tileset&&(Array.isArray(o.tileset)?c=o.tileset[0].image.dataSource[0]:c=o.tileset.image.dataSource[0]);else return this.renderer.normalTexture;return c?c.glTexture:this.renderer.normalTexture},batchSprite:function(o,c,p){this.lightsActive&&a.prototype.batchSprite.call(this,o,c,p)},batchTexture:function(o,c,p,v,m,S,M,w,C,A,P,b,O,I,D,B,G,z,X,j,Q,tt,Y,$,U,H,Z,_,q,at,ot,rt){this.lightsActive&&a.prototype.batchTexture.call(this,o,c,p,v,m,S,M,w,C,A,P,b,O,I,D,B,G,z,X,j,Q,tt,Y,$,U,H,Z,_,q,at,ot,rt)},batchTextureFrame:function(o,c,p,v,m,S,M){this.lightsActive&&a.prototype.batchTextureFrame.call(this,o,c,p,v,m,S,M)}});s.exports=f},56527:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(95540),h=e(57516),a=e(45561),l=e(60722),n=e(14500),u=e(29100),f=new r({Extends:h,initialize:function(c){c.fragShader=d(c,"fragShader",a),c.vertShader=d(c,"vertShader",l),c.attributes=d(c,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:n.UNSIGNED_BYTE,normalized:!0}]),c.forceZero=!0,c.resizeUniform="uResolution",h.call(this,c)},boot:function(){u.prototype.boot.call(this);var o=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",o.width,o.height),this.set1i("uRoundPixels",o.config.roundPixels)}});s.exports=f},57516:(s,y,e)=>{/** + */var r=e(83419),d=e(95540),h=e(57516),a=e(45561),l=e(60722),n=e(14500),u=e(29100),f=new r({Extends:h,initialize:function(c){c.fragShader=d(c,"fragShader",a),c.vertShader=d(c,"vertShader",l),c.attributes=d(c,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:n.UNSIGNED_BYTE,normalized:!0}]),c.forceZero=!0,c.resizeUniform="uResolution",h.call(this,c)},boot:function(){u.prototype.boot.call(this);var o=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",o.width,o.height),this.set1i("uRoundPixels",o.config.roundPixels)}});s.exports=f},57516:(s,x,e)=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(94811),h=e(95540),a=e(98840),l=e(44667),n=e(61340),u=e(70554),f=e(14500),o=e(29100),c=new r({Extends:o,initialize:function(v){var m=v.game.renderer,S=h(v,"fragShader",a);v.fragShader=u.parseFragmentShaderMaxTextures(S,m.maxTextures),v.vertShader=h(v,"vertShader",l),v.attributes=h(v,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:f.UNSIGNED_BYTE,normalized:!0}]),v.resizeUniform="uResolution",o.call(this,v),this._tempMatrix1=new n,this._tempMatrix2=new n,this._tempMatrix3=new n,this.calcMatrix=new n,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(){o.prototype.boot.call(this);var p=this.renderer;this.set1iv("uMainSampler",p.textureIndexes),this.set2f("uResolution",p.width,p.height),this.set1i("uRoundPixels",p.config.roundPixels)},batchSprite:function(p,v,m){this.manager.set(this,p);var S=this._tempMatrix1,M=this._tempMatrix2,w=this._tempMatrix3,C=p.frame,A=C.glTexture,P=C.u0,b=C.v0,O=C.u1,I=C.v1,D=C.x,B=C.y,G=C.cutWidth,z=C.cutHeight,X=C.customPivot,j=p.displayOriginX,Q=p.displayOriginY,tt=-j+D,Y=-Q+B;if(p.isCropped){var Z=p._crop;(Z.flipX!==p.flipX||Z.flipY!==p.flipY)&&C.updateCropUVs(Z,p.flipX,p.flipY),P=Z.u0,b=Z.v0,O=Z.u1,I=Z.v1,G=Z.width,z=Z.height,D=Z.x,B=Z.y,tt=-j+D,Y=-Q+B}var U=1,H=1;p.flipX&&(X||(tt+=-C.realWidth+j*2),U=-1),p.flipY&&(X||(Y+=-C.realHeight+Q*2),H=-1);var $=p.x,_=p.y;M.applyITRS($,_,p.rotation,p.scaleX*U,p.scaleY*H),S.copyFrom(v.matrix),m?(S.multiplyWithOffset(m,-v.scrollX*p.scrollFactorX,-v.scrollY*p.scrollFactorY),M.e=$,M.f=_):(M.e-=v.scrollX*p.scrollFactorX,M.f-=v.scrollY*p.scrollFactorY),S.multiply(M,w);var q=w.setQuad(tt,Y,tt+G,Y+z),at=u.getTintAppendFloatAlpha,ot=v.alpha,rt=at(p.tintTopLeft,ot*p._alphaTL),gt=at(p.tintTopRight,ot*p._alphaTR),yt=at(p.tintBottomLeft,ot*p._alphaBL),Et=at(p.tintBottomRight,ot*p._alphaBR);this.shouldFlush(6)&&this.flush();var At=this.setGameObject(p,C);this.manager.preBatch(p),this.currentShader.set1i("uRoundPixels",v.roundPixels),this.batchQuad(p,q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7],P,b,O,I,rt,gt,yt,Et,p.tintFill,A,At),this.manager.postBatch(p)},batchTexture:function(p,v,m,S,M,w,C,A,P,b,O,I,D,B,G,z,X,j,Q,tt,Y,Z,U,H,$,_,q,at,ot,rt,gt,yt,Et){Et===void 0&&(Et=!1),this.manager.set(this,p);var At=this._tempMatrix1,Pt=this._tempMatrix2,Vt=this._tempMatrix3,dt=j/m+q,ut=Q/S+at,Rt=(j+tt)/m+q,Dt=(Q+Y)/S+at,Ht=C,Bt=A,re=-z,le=-X;if(p.isCropped){var ge=p._crop,xe=ge.width,Pe=ge.height;Ht=xe,Bt=Pe,C=xe,A=Pe,j=ge.x,Q=ge.y;var te=j,Ge=Q;I&&(te=tt-ge.x-xe),D&&(Ge=Y-ge.y-Pe),dt=te/m+q,ut=Ge/S+at,Rt=(te+xe)/m+q,Dt=(Ge+Pe)/S+at,re=-z+j,le=-X+Q}D=D^(!gt&&v.isRenderTexture?1:0),I&&(Ht*=-1,re+=C),D&&(Bt*=-1,le+=A),Pt.applyITRS(M,w,O,P,b),At.copyFrom(ot.matrix),rt?(At.multiplyWithOffset(rt,-ot.scrollX*B,-ot.scrollY*G),Pt.e=M,Pt.f=w):(Pt.e-=ot.scrollX*B,Pt.f-=ot.scrollY*G),At.multiply(Pt,Vt);var Oe=Vt.setQuad(re,le,re+Ht,le+Bt);yt==null&&(yt=this.setTexture2D(v)),p&&!Et&&this.manager.preBatch(p),this.currentShader.set1i("uRoundPixels",ot.roundPixels),this.batchQuad(p,Oe[0],Oe[1],Oe[2],Oe[3],Oe[4],Oe[5],Oe[6],Oe[7],dt,ut,Rt,Dt,Z,U,H,$,_,v,yt),p&&!Et&&this.manager.postBatch(p)},batchTextureFrame:function(p,v,m,S,M,w,C){this.manager.set(this);var A=this._tempMatrix1.copyFrom(w),P=this._tempMatrix2;C?A.multiply(C,P):P=A;var b=P.setQuad(v,m,v+p.width,m+p.height),O=this.setTexture2D(p.source.glTexture);S=u.getTintAppendFloatAlpha(S,M),this.batchQuad(null,b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],p.u0,p.v0,p.u1,p.v1,S,S,S,S,0,p.glTexture,O)},batchFillRect:function(p,v,m,S,M,w){this.renderer.pipelines.set(this);var C=this.calcMatrix;w&&w.multiply(M,C);var A=C.setQuad(p,v,p+m,v+S),P=this.fillTint;this.batchQuad(null,A[0],A[1],A[2],A[3],A[4],A[5],A[6],A[7],0,0,1,1,P.TL,P.TR,P.BL,P.BR,2)},batchFillTriangle:function(p,v,m,S,M,w,C,A){this.renderer.pipelines.set(this);var P=this.calcMatrix;A&&A.multiply(C,P);var b=P.getX(p,v),O=P.getY(p,v),I=P.getX(m,S),D=P.getY(m,S),B=P.getX(M,w),G=P.getY(M,w),z=this.fillTint;this.currentShader.set1i("uRoundPixels",!1),this.batchTri(null,b,O,I,D,B,G,0,0,1,1,z.TL,z.TR,z.BL,2)},batchStrokeTriangle:function(p,v,m,S,M,w,C,A,P){var b=this.tempTriangle;b[0].x=p,b[0].y=v,b[0].width=C,b[1].x=m,b[1].y=S,b[1].width=C,b[2].x=M,b[2].y=w,b[2].width=C,b[3].x=p,b[3].y=v,b[3].width=C,this.batchStrokePath(b,C,!1,A,P)},batchFillPath:function(p,v,m){this.renderer.pipelines.set(this);var S=this.calcMatrix;m&&m.multiply(v,S);for(var M=p.length,w=this.polygonCache,C,A,P=this.fillTint.TL,b=this.fillTint.TR,O=this.fillTint.BL,I=0;I0&&Ht[4]?this.batchQuad(null,At,Pt,rt,gt,Ht[0],Ht[1],Ht[2],Ht[3],0,0,1,1,dt,ut,Rt,Dt,2):(Bt[0]=At,Bt[1]=Pt,Bt[2]=rt,Bt[3]=gt,Bt[4]=1),P&&Bt[4]?this.batchQuad(null,at,ot,yt,Et,Bt[0],Bt[1],Bt[2],Bt[3],0,0,1,1,dt,ut,Rt,Dt,2):(Ht[0]=at,Ht[1]=ot,Ht[2]=yt,Ht[3]=Et,Ht[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,o.prototype.destroy.call(this),this}});s.exports=c},43439:(s,y,e)=>{/** + */var r=e(83419),d=e(94811),h=e(95540),a=e(98840),l=e(44667),n=e(61340),u=e(70554),f=e(14500),o=e(29100),c=new r({Extends:o,initialize:function(v){var m=v.game.renderer,S=h(v,"fragShader",a);v.fragShader=u.parseFragmentShaderMaxTextures(S,m.maxTextures),v.vertShader=h(v,"vertShader",l),v.attributes=h(v,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:f.UNSIGNED_BYTE,normalized:!0}]),v.resizeUniform="uResolution",o.call(this,v),this._tempMatrix1=new n,this._tempMatrix2=new n,this._tempMatrix3=new n,this.calcMatrix=new n,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(){o.prototype.boot.call(this);var p=this.renderer;this.set1iv("uMainSampler",p.textureIndexes),this.set2f("uResolution",p.width,p.height),this.set1i("uRoundPixels",p.config.roundPixels)},batchSprite:function(p,v,m){this.manager.set(this,p);var S=this._tempMatrix1,M=this._tempMatrix2,w=this._tempMatrix3,C=p.frame,A=C.glTexture,P=C.u0,b=C.v0,O=C.u1,I=C.v1,D=C.x,B=C.y,G=C.cutWidth,z=C.cutHeight,X=C.customPivot,j=p.displayOriginX,Q=p.displayOriginY,tt=-j+D,Y=-Q+B;if(p.isCropped){var $=p._crop;($.flipX!==p.flipX||$.flipY!==p.flipY)&&C.updateCropUVs($,p.flipX,p.flipY),P=$.u0,b=$.v0,O=$.u1,I=$.v1,G=$.width,z=$.height,D=$.x,B=$.y,tt=-j+D,Y=-Q+B}var U=1,H=1;p.flipX&&(X||(tt+=-C.realWidth+j*2),U=-1),p.flipY&&(X||(Y+=-C.realHeight+Q*2),H=-1);var Z=p.x,_=p.y;M.applyITRS(Z,_,p.rotation,p.scaleX*U,p.scaleY*H),S.copyFrom(v.matrix),m?(S.multiplyWithOffset(m,-v.scrollX*p.scrollFactorX,-v.scrollY*p.scrollFactorY),M.e=Z,M.f=_):(M.e-=v.scrollX*p.scrollFactorX,M.f-=v.scrollY*p.scrollFactorY),S.multiply(M,w);var q=w.setQuad(tt,Y,tt+G,Y+z),at=u.getTintAppendFloatAlpha,ot=v.alpha,rt=at(p.tintTopLeft,ot*p._alphaTL),gt=at(p.tintTopRight,ot*p._alphaTR),yt=at(p.tintBottomLeft,ot*p._alphaBL),Et=at(p.tintBottomRight,ot*p._alphaBR);this.shouldFlush(6)&&this.flush();var At=this.setGameObject(p,C);this.manager.preBatch(p),this.currentShader.set1i("uRoundPixels",v.roundPixels),this.batchQuad(p,q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7],P,b,O,I,rt,gt,yt,Et,p.tintFill,A,At),this.manager.postBatch(p)},batchTexture:function(p,v,m,S,M,w,C,A,P,b,O,I,D,B,G,z,X,j,Q,tt,Y,$,U,H,Z,_,q,at,ot,rt,gt,yt,Et){Et===void 0&&(Et=!1),this.manager.set(this,p);var At=this._tempMatrix1,Pt=this._tempMatrix2,Vt=this._tempMatrix3,dt=j/m+q,ut=Q/S+at,Rt=(j+tt)/m+q,Dt=(Q+Y)/S+at,Ht=C,Bt=A,re=-z,le=-X;if(p.isCropped){var ge=p._crop,xe=ge.width,Pe=ge.height;Ht=xe,Bt=Pe,C=xe,A=Pe,j=ge.x,Q=ge.y;var te=j,Ve=Q;I&&(te=tt-ge.x-xe),D&&(Ve=Y-ge.y-Pe),dt=te/m+q,ut=Ve/S+at,Rt=(te+xe)/m+q,Dt=(Ve+Pe)/S+at,re=-z+j,le=-X+Q}D=D^(!gt&&v.isRenderTexture?1:0),I&&(Ht*=-1,re+=C),D&&(Bt*=-1,le+=A),Pt.applyITRS(M,w,O,P,b),At.copyFrom(ot.matrix),rt?(At.multiplyWithOffset(rt,-ot.scrollX*B,-ot.scrollY*G),Pt.e=M,Pt.f=w):(Pt.e-=ot.scrollX*B,Pt.f-=ot.scrollY*G),At.multiply(Pt,Vt);var De=Vt.setQuad(re,le,re+Ht,le+Bt);yt==null&&(yt=this.setTexture2D(v)),p&&!Et&&this.manager.preBatch(p),this.currentShader.set1i("uRoundPixels",ot.roundPixels),this.batchQuad(p,De[0],De[1],De[2],De[3],De[4],De[5],De[6],De[7],dt,ut,Rt,Dt,$,U,H,Z,_,v,yt),p&&!Et&&this.manager.postBatch(p)},batchTextureFrame:function(p,v,m,S,M,w,C){this.manager.set(this);var A=this._tempMatrix1.copyFrom(w),P=this._tempMatrix2;C?A.multiply(C,P):P=A;var b=P.setQuad(v,m,v+p.width,m+p.height),O=this.setTexture2D(p.source.glTexture);S=u.getTintAppendFloatAlpha(S,M),this.batchQuad(null,b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],p.u0,p.v0,p.u1,p.v1,S,S,S,S,0,p.glTexture,O)},batchFillRect:function(p,v,m,S,M,w){this.renderer.pipelines.set(this);var C=this.calcMatrix;w&&w.multiply(M,C);var A=C.setQuad(p,v,p+m,v+S),P=this.fillTint;this.batchQuad(null,A[0],A[1],A[2],A[3],A[4],A[5],A[6],A[7],0,0,1,1,P.TL,P.TR,P.BL,P.BR,2)},batchFillTriangle:function(p,v,m,S,M,w,C,A){this.renderer.pipelines.set(this);var P=this.calcMatrix;A&&A.multiply(C,P);var b=P.getX(p,v),O=P.getY(p,v),I=P.getX(m,S),D=P.getY(m,S),B=P.getX(M,w),G=P.getY(M,w),z=this.fillTint;this.currentShader.set1i("uRoundPixels",!1),this.batchTri(null,b,O,I,D,B,G,0,0,1,1,z.TL,z.TR,z.BL,2)},batchStrokeTriangle:function(p,v,m,S,M,w,C,A,P){var b=this.tempTriangle;b[0].x=p,b[0].y=v,b[0].width=C,b[1].x=m,b[1].y=S,b[1].width=C,b[2].x=M,b[2].y=w,b[2].width=C,b[3].x=p,b[3].y=v,b[3].width=C,this.batchStrokePath(b,C,!1,A,P)},batchFillPath:function(p,v,m){this.renderer.pipelines.set(this);var S=this.calcMatrix;m&&m.multiply(v,S);for(var M=p.length,w=this.polygonCache,C,A,P=this.fillTint.TL,b=this.fillTint.TR,O=this.fillTint.BL,I=0;I0&&Ht[4]?this.batchQuad(null,At,Pt,rt,gt,Ht[0],Ht[1],Ht[2],Ht[3],0,0,1,1,dt,ut,Rt,Dt,2):(Bt[0]=At,Bt[1]=Pt,Bt[2]=rt,Bt[3]=gt,Bt[4]=1),P&&Bt[4]?this.batchQuad(null,at,ot,yt,Et,Bt[0],Bt[1],Bt[2],Bt[3],0,0,1,1,dt,ut,Rt,Dt,2):(Ht[0]=at,Ht[1]=ot,Ht[2]=yt,Ht[3]=Et,Ht[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,o.prototype.destroy.call(this),this}});s.exports=c},43439:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(95540),h=e(4127),a=e(89924),l=e(29100),n=new r({Extends:l,initialize:function(f){f.vertShader=d(f,"vertShader",a),f.fragShader=d(f,"fragShader",h),f.attributes=d(f,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),l.call(this,f)},onRender:function(u,f){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",f.zoom)},batchPointLight:function(u,f,o,c,p,v,m,S,M,w,C,A){var P=u.color,b=u.intensity,O=u.radius,I=u.attenuation,D=P.r*b,B=P.g*b,G=P.b*b,z=f.alpha*u.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(o,c,C,A,O,I,D,B,G,z),this.batchLightVert(p,v,C,A,O,I,D,B,G,z),this.batchLightVert(m,S,C,A,O,I,D,B,G,z),this.batchLightVert(o,c,C,A,O,I,D,B,G,z),this.batchLightVert(m,S,C,A,O,I,D,B,G,z),this.batchLightVert(M,w,C,A,O,I,D,B,G,z),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(u,f,o,c,p,v,m,S,M,w){var C=this.vertexViewF32,A=this.vertexCount*this.currentShader.vertexComponentCount-1;C[++A]=u,C[++A]=f,C[++A]=o,C[++A]=c,C[++A]=p,C[++A]=v,C[++A]=m,C[++A]=S,C[++A]=M,C[++A]=w,this.vertexCount++}});s.exports=n},84057:(s,y,e)=>{/** + */var r=e(83419),d=e(95540),h=e(4127),a=e(89924),l=e(29100),n=new r({Extends:l,initialize:function(f){f.vertShader=d(f,"vertShader",a),f.fragShader=d(f,"fragShader",h),f.attributes=d(f,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),l.call(this,f)},onRender:function(u,f){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",f.zoom)},batchPointLight:function(u,f,o,c,p,v,m,S,M,w,C,A){var P=u.color,b=u.intensity,O=u.radius,I=u.attenuation,D=P.r*b,B=P.g*b,G=P.b*b,z=f.alpha*u.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(o,c,C,A,O,I,D,B,G,z),this.batchLightVert(p,v,C,A,O,I,D,B,G,z),this.batchLightVert(m,S,C,A,O,I,D,B,G,z),this.batchLightVert(o,c,C,A,O,I,D,B,G,z),this.batchLightVert(m,S,C,A,O,I,D,B,G,z),this.batchLightVert(M,w,C,A,O,I,D,B,G,z),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(u,f,o,c,p,v,m,S,M,w){var C=this.vertexViewF32,A=this.vertexCount*this.currentShader.vertexComponentCount-1;C[++A]=u,C[++A]=f,C[++A]=o,C[++A]=c,C[++A]=p,C[++A]=v,C[++A]=m,C[++A]=S,C[++A]=M,C[++A]=w,this.vertexCount++}});s.exports=n},84057:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(89422),h=e(95540),a=e(27681),l=e(49627),n=e(29100),u=new r({Extends:n,initialize:function(o){o.renderTarget=h(o,"renderTarget",1),o.fragShader=h(o,"fragShader",a),o.vertShader=h(o,"vertShader",l),o.attributes=h(o,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),o.batchSize=1,o.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],n.call(this,o),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new d,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){n.prototype.boot.call(this);var f=this.manager.UTILITY_PIPELINE;this.fullFrame1=f.fullFrame1,this.fullFrame2=f.fullFrame2,this.halfFrame1=f.halfFrame1,this.halfFrame2=f.halfFrame2;var o=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",o.width,o.height),this.set1i("uRoundPixels",o.config.roundPixels);for(var c=this.renderTargets,p=0;p{/** + */var r=e(83419),d=e(89422),h=e(95540),a=e(27681),l=e(49627),n=e(29100),u=new r({Extends:n,initialize:function(o){o.renderTarget=h(o,"renderTarget",1),o.fragShader=h(o,"fragShader",a),o.vertShader=h(o,"vertShader",l),o.attributes=h(o,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),o.batchSize=1,o.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],n.call(this,o),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new d,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){n.prototype.boot.call(this);var f=this.manager.UTILITY_PIPELINE;this.fullFrame1=f.fullFrame1,this.fullFrame2=f.fullFrame2,this.halfFrame1=f.halfFrame1,this.halfFrame2=f.halfFrame2;var o=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",o.width,o.height),this.set1i("uRoundPixels",o.config.roundPixels);for(var c=this.renderTargets,p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(10312),d=e(67502),h=e(83419),a=e(96293),l=e(95540),n=e(57516),u=e(27681),f=e(87841),o=e(32302),c=e(45561),p=e(60722),v=e(29100),m=new h({Extends:n,initialize:function(M){var w=l(M,"fragShader",u),C=l(M,"vertShader",p),A=l(M,"drawShader",u),P=[{name:"DrawSprite",fragShader:c,vertShader:p},{name:"CopySprite",fragShader:w,vertShader:C},{name:"DrawGame",fragShader:A,vertShader:p},{name:"ColorMatrix",fragShader:a}],b=l(M,"shaders",[]);M.shaders=P.concat(b),M.vertShader||(M.vertShader=C),M.batchSize=1,n.call(this,M),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new f,this.targetBounds=new f,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){v.prototype.boot.call(this);var S=this.shaders,M=this.renderer;this.drawSpriteShader=S[0],this.copyShader=S[1],this.gameShader=S[2],this.colorMatrixShader=S[3],this.fsTarget=new o(M,M.width,M.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var w=new ArrayBuffer(168);this.quadVertexData=w,this.quadVertexViewF32=new Float32Array(w),this.quadVertexBuffer=M.createVertexBuffer(w,this.gl.STATIC_DRAW),this.onResize(M.width,M.height),this.currentShader=this.copyShader,this.set2f("uResolution",M.width,M.height),this.set1i("uRoundPixels",M.config.roundPixels)},onResize:function(S,M){var w=this.quadVertexViewF32;w[1]=M,w[22]=M,w[14]=S,w[28]=S,w[35]=S,w[36]=M},batchQuad:function(S,M,w,C,A,P,b,O,I,D,B,G,z,X,j,Q,tt,Y,Z){var U=Math.min(M,C,P,O),H=Math.min(w,A,b,I),$=Math.max(M,C,P,O),_=Math.max(w,A,b,I),q=$-U,at=_-H,ot=this.spriteBounds.setTo(U,H,q,at),rt=S?S.preFX.padding:0,gt=q+rt*2,yt=at+rt*2,Et=Math.abs(Math.max(gt,yt)),At=this.manager.getRenderTarget(Et),Pt=this.targetBounds.setTo(0,0,At.width,At.height);d(Pt,ot.centerX,ot.centerY),this.tempSprite=S;var Vt=this.gl,dt=this.renderer;dt.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",dt.width,dt.height),this.set1i("uRoundPixels",dt.config.roundPixels),this.flipProjectionMatrix(!0),S&&(this.onDrawSprite(S,At),S.preFX.onFX(this));var ut=this.fsTarget;return this.flush(),Vt.viewport(0,0,dt.width,dt.height),Vt.bindFramebuffer(Vt.FRAMEBUFFER,ut.framebuffer.webGLFramebuffer),Vt.framebufferTexture2D(Vt.FRAMEBUFFER,Vt.COLOR_ATTACHMENT0,Vt.TEXTURE_2D,ut.texture.webGLTexture,0),Vt.clearColor(0,0,0,0),Vt.clear(Vt.COLOR_BUFFER_BIT),this.setTexture2D(Z),this.batchVert(M,w,D,B,0,Y,X),this.batchVert(C,A,D,z,0,Y,Q),this.batchVert(P,b,G,z,0,Y,tt),this.batchVert(M,w,D,B,0,Y,X),this.batchVert(P,b,G,z,0,Y,tt),this.batchVert(O,I,G,B,0,Y,j),this.flush(),this.flipProjectionMatrix(!1),Vt.activeTexture(Vt.TEXTURE0),Vt.bindTexture(Vt.TEXTURE_2D,At.texture.webGLTexture),Vt.copyTexSubImage2D(Vt.TEXTURE_2D,0,0,0,Pt.x,Pt.y,Pt.width,Pt.height),Vt.bindFramebuffer(Vt.FRAMEBUFFER,null),Vt.bindTexture(Vt.TEXTURE_2D,null),this.onBatch(S),this.currentShader=this.copyShader,this.onDraw(At,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(S,M,w,C,A,P,b){w===void 0&&(w=!0),C===void 0&&(C=!0),A===void 0&&(A=!1),b===void 0&&(b=this.copyShader);var O=this.gl,I=this.tempSprite;P&&(b=this.colorMatrixShader),this.currentShader=b;var D=this.setVertexBuffer(this.quadVertexBuffer);b.bind(D,!1);var B=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",B.width,B.height),this.set1i("uRoundPixels",B.config.roundPixels),I.preFX.onFXCopy(this),this.onCopySprite(S,M,I),P&&(this.set1fv("uColorMatrix",P.getData()),this.set1f("uAlpha",P.alpha)),O.activeTexture(O.TEXTURE0),O.bindTexture(O.TEXTURE_2D,S.texture.webGLTexture),S.height>M.height)O.viewport(0,0,S.width,S.height),this.setTargetUVs(S,M);else{var G=M.height-S.height;O.viewport(0,G,S.width,S.height),this.resetUVs()}if(O.bindFramebuffer(O.FRAMEBUFFER,M.framebuffer.webGLFramebuffer),O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,M.texture.webGLTexture,0),w&&(O.clearColor(0,0,0,+!C),O.clear(O.COLOR_BUFFER_BIT)),A){var z=this.renderer.currentBlendMode;this.renderer.setBlendMode(r.ERASE)}O.bufferData(O.ARRAY_BUFFER,this.quadVertexData,O.STATIC_DRAW),O.drawArrays(O.TRIANGLES,0,6),A&&this.renderer.setBlendMode(z),O.bindFramebuffer(O.FRAMEBUFFER,null)},copy:function(S,M){var w=this.gl;this.set1i("uMainSampler",0),w.activeTexture(w.TEXTURE0),w.bindTexture(w.TEXTURE_2D,S.texture.webGLTexture),w.viewport(0,0,S.width,S.height),this.setUVs(0,0,0,1,1,1,1,0),w.bindFramebuffer(w.FRAMEBUFFER,M.framebuffer.webGLFramebuffer),w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_2D,M.texture.webGLTexture,0),w.clearColor(0,0,0,0),w.clear(w.COLOR_BUFFER_BIT),w.bufferData(w.ARRAY_BUFFER,this.quadVertexData,w.STATIC_DRAW),w.drawArrays(w.TRIANGLES,0,6),w.bindFramebuffer(w.FRAMEBUFFER,null)},blendFrames:function(S,M,w,C,A){this.manager.blendFrames(S,M,w,C,A)},blendFramesAdditive:function(S,M,w,C,A){this.manager.blendFramesAdditive(S,M,w,C,A)},drawToGame:function(S){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(S)},copyToGame:function(S){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(S)},bindAndDraw:function(S){var M=this.gl,w=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(S.texture);var C=this._tempMatrix1.loadIdentity(),A=this.targetBounds.x,P=this.targetBounds.y,b=A+S.width,O=P+S.height,I=C.getX(A,P),D=C.getX(A,O),B=C.getX(b,O),G=C.getX(b,P),z=C.getY(A,P),X=C.getY(A,O),j=C.getY(b,O),Q=C.getY(b,P),tt=16777215;this.batchVert(I,z,0,0,0,0,tt),this.batchVert(D,X,0,1,0,0,tt),this.batchVert(B,j,1,1,0,0,tt),this.batchVert(I,z,0,0,0,0,tt),this.batchVert(B,j,1,1,0,0,tt),this.batchVert(G,Q,1,0,0,0,tt),w.restoreFramebuffer(!1,!0),w.currentFramebuffer||M.viewport(0,0,w.width,w.height),w.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(S){this.drawToGame(S)},setUVs:function(S,M,w,C,A,P,b,O){var I=this.quadVertexViewF32;I[2]=S,I[3]=M,I[9]=w,I[10]=C,I[16]=A,I[17]=P,I[23]=S,I[24]=M,I[30]=A,I[31]=P,I[37]=b,I[38]=O},setTargetUVs:function(S,M){var w=M.height/S.height;w>.5?w=.5-(w-.5):w=.5+(.5-w),this.setUVs(0,w,0,1+w,1,1+w,1,w)},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,n.prototype.destroy.call(this),this}});s.exports=m},81041:(s,y,e)=>{/** + */var r=e(10312),d=e(67502),h=e(83419),a=e(96293),l=e(95540),n=e(57516),u=e(27681),f=e(87841),o=e(32302),c=e(45561),p=e(60722),v=e(29100),m=new h({Extends:n,initialize:function(M){var w=l(M,"fragShader",u),C=l(M,"vertShader",p),A=l(M,"drawShader",u),P=[{name:"DrawSprite",fragShader:c,vertShader:p},{name:"CopySprite",fragShader:w,vertShader:C},{name:"DrawGame",fragShader:A,vertShader:p},{name:"ColorMatrix",fragShader:a}],b=l(M,"shaders",[]);M.shaders=P.concat(b),M.vertShader||(M.vertShader=C),M.batchSize=1,n.call(this,M),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new f,this.targetBounds=new f,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){v.prototype.boot.call(this);var S=this.shaders,M=this.renderer;this.drawSpriteShader=S[0],this.copyShader=S[1],this.gameShader=S[2],this.colorMatrixShader=S[3],this.fsTarget=new o(M,M.width,M.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var w=new ArrayBuffer(168);this.quadVertexData=w,this.quadVertexViewF32=new Float32Array(w),this.quadVertexBuffer=M.createVertexBuffer(w,this.gl.STATIC_DRAW),this.onResize(M.width,M.height),this.currentShader=this.copyShader,this.set2f("uResolution",M.width,M.height),this.set1i("uRoundPixels",M.config.roundPixels)},onResize:function(S,M){var w=this.quadVertexViewF32;w[1]=M,w[22]=M,w[14]=S,w[28]=S,w[35]=S,w[36]=M},batchQuad:function(S,M,w,C,A,P,b,O,I,D,B,G,z,X,j,Q,tt,Y,$){var U=Math.min(M,C,P,O),H=Math.min(w,A,b,I),Z=Math.max(M,C,P,O),_=Math.max(w,A,b,I),q=Z-U,at=_-H,ot=this.spriteBounds.setTo(U,H,q,at),rt=S?S.preFX.padding:0,gt=q+rt*2,yt=at+rt*2,Et=Math.abs(Math.max(gt,yt)),At=this.manager.getRenderTarget(Et),Pt=this.targetBounds.setTo(0,0,At.width,At.height);d(Pt,ot.centerX,ot.centerY),this.tempSprite=S;var Vt=this.gl,dt=this.renderer;dt.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",dt.width,dt.height),this.set1i("uRoundPixels",dt.config.roundPixels),this.flipProjectionMatrix(!0),S&&(this.onDrawSprite(S,At),S.preFX.onFX(this));var ut=this.fsTarget;return this.flush(),Vt.viewport(0,0,dt.width,dt.height),Vt.bindFramebuffer(Vt.FRAMEBUFFER,ut.framebuffer.webGLFramebuffer),Vt.framebufferTexture2D(Vt.FRAMEBUFFER,Vt.COLOR_ATTACHMENT0,Vt.TEXTURE_2D,ut.texture.webGLTexture,0),Vt.clearColor(0,0,0,0),Vt.clear(Vt.COLOR_BUFFER_BIT),this.setTexture2D($),this.batchVert(M,w,D,B,0,Y,X),this.batchVert(C,A,D,z,0,Y,Q),this.batchVert(P,b,G,z,0,Y,tt),this.batchVert(M,w,D,B,0,Y,X),this.batchVert(P,b,G,z,0,Y,tt),this.batchVert(O,I,G,B,0,Y,j),this.flush(),this.flipProjectionMatrix(!1),Vt.activeTexture(Vt.TEXTURE0),Vt.bindTexture(Vt.TEXTURE_2D,At.texture.webGLTexture),Vt.copyTexSubImage2D(Vt.TEXTURE_2D,0,0,0,Pt.x,Pt.y,Pt.width,Pt.height),Vt.bindFramebuffer(Vt.FRAMEBUFFER,null),Vt.bindTexture(Vt.TEXTURE_2D,null),this.onBatch(S),this.currentShader=this.copyShader,this.onDraw(At,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(S,M,w,C,A,P,b){w===void 0&&(w=!0),C===void 0&&(C=!0),A===void 0&&(A=!1),b===void 0&&(b=this.copyShader);var O=this.gl,I=this.tempSprite;P&&(b=this.colorMatrixShader),this.currentShader=b;var D=this.setVertexBuffer(this.quadVertexBuffer);b.bind(D,!1);var B=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",B.width,B.height),this.set1i("uRoundPixels",B.config.roundPixels),I.preFX.onFXCopy(this),this.onCopySprite(S,M,I),P&&(this.set1fv("uColorMatrix",P.getData()),this.set1f("uAlpha",P.alpha)),O.activeTexture(O.TEXTURE0),O.bindTexture(O.TEXTURE_2D,S.texture.webGLTexture),S.height>M.height)O.viewport(0,0,S.width,S.height),this.setTargetUVs(S,M);else{var G=M.height-S.height;O.viewport(0,G,S.width,S.height),this.resetUVs()}if(O.bindFramebuffer(O.FRAMEBUFFER,M.framebuffer.webGLFramebuffer),O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,M.texture.webGLTexture,0),w&&(O.clearColor(0,0,0,+!C),O.clear(O.COLOR_BUFFER_BIT)),A){var z=this.renderer.currentBlendMode;this.renderer.setBlendMode(r.ERASE)}O.bufferData(O.ARRAY_BUFFER,this.quadVertexData,O.STATIC_DRAW),O.drawArrays(O.TRIANGLES,0,6),A&&this.renderer.setBlendMode(z),O.bindFramebuffer(O.FRAMEBUFFER,null)},copy:function(S,M){var w=this.gl;this.set1i("uMainSampler",0),w.activeTexture(w.TEXTURE0),w.bindTexture(w.TEXTURE_2D,S.texture.webGLTexture),w.viewport(0,0,S.width,S.height),this.setUVs(0,0,0,1,1,1,1,0),w.bindFramebuffer(w.FRAMEBUFFER,M.framebuffer.webGLFramebuffer),w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_2D,M.texture.webGLTexture,0),w.clearColor(0,0,0,0),w.clear(w.COLOR_BUFFER_BIT),w.bufferData(w.ARRAY_BUFFER,this.quadVertexData,w.STATIC_DRAW),w.drawArrays(w.TRIANGLES,0,6),w.bindFramebuffer(w.FRAMEBUFFER,null)},blendFrames:function(S,M,w,C,A){this.manager.blendFrames(S,M,w,C,A)},blendFramesAdditive:function(S,M,w,C,A){this.manager.blendFramesAdditive(S,M,w,C,A)},drawToGame:function(S){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(S)},copyToGame:function(S){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(S)},bindAndDraw:function(S){var M=this.gl,w=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(S.texture);var C=this._tempMatrix1.loadIdentity(),A=this.targetBounds.x,P=this.targetBounds.y,b=A+S.width,O=P+S.height,I=C.getX(A,P),D=C.getX(A,O),B=C.getX(b,O),G=C.getX(b,P),z=C.getY(A,P),X=C.getY(A,O),j=C.getY(b,O),Q=C.getY(b,P),tt=16777215;this.batchVert(I,z,0,0,0,0,tt),this.batchVert(D,X,0,1,0,0,tt),this.batchVert(B,j,1,1,0,0,tt),this.batchVert(I,z,0,0,0,0,tt),this.batchVert(B,j,1,1,0,0,tt),this.batchVert(G,Q,1,0,0,0,tt),w.restoreFramebuffer(!1,!0),w.currentFramebuffer||M.viewport(0,0,w.width,w.height),w.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(S){this.drawToGame(S)},setUVs:function(S,M,w,C,A,P,b,O){var I=this.quadVertexViewF32;I[2]=S,I[3]=M,I[9]=w,I[10]=C,I[16]=A,I[17]=P,I[23]=S,I[24]=M,I[30]=A,I[31]=P,I[37]=b,I[38]=O},setTargetUVs:function(S,M){var w=M.height/S.height;w>.5?w=.5-(w-.5):w=.5+(.5-w),this.setUVs(0,w,0,1+w,1,1+w,1,w)},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,n.prototype.destroy.call(this),this}});s.exports=m},81041:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(95540),h=e(57516),a=new r({Extends:h,initialize:function(n){n.topology=5,n.batchSize=d(n,"batchSize",256),h.call(this,n)}});s.exports=a},12385:(s,y,e)=>{/** + */var r=e(83419),d=e(95540),h=e(57516),a=new r({Extends:h,initialize:function(n){n.topology=5,n.batchSize=d(n,"batchSize",256),h.call(this,n)}});s.exports=a},12385:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(95540),h=e(57516),a=e(45561),l=e(60722),n=e(29100),u=new r({Extends:h,initialize:function(o){o.fragShader=d(o,"fragShader",a),o.vertShader=d(o,"vertShader",l),o.forceZero=!0,h.call(this,o)},boot:function(){n.prototype.boot.call(this);var f=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",f.width,f.height),this.set1i("uRoundPixels",f.config.roundPixels)}});s.exports=u},7589:(s,y,e)=>{/** + */var r=e(83419),d=e(95540),h=e(57516),a=e(45561),l=e(60722),n=e(29100),u=new r({Extends:h,initialize:function(o){o.fragShader=d(o,"fragShader",a),o.vertShader=d(o,"vertShader",l),o.forceZero=!0,h.call(this,o)},boot:function(){n.prototype.boot.call(this);var f=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",f.width,f.height),this.set1i("uRoundPixels",f.config.roundPixels)}});s.exports=u},7589:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4782,7 +4782,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline",FX_PIPELINE:"FxPipeline"};s.exports=y},84817:s=>{/** + */var x={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline",FX_PIPELINE:"FxPipeline"};s.exports=x},84817:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4810,71 +4810,71 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="pipelineresize"},77085:(s,y,e)=>{/** + */s.exports="pipelineresize"},77085:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={AFTER_FLUSH:e(84817),BEFORE_FLUSH:e(36712),BIND:e(40285),BOOT:e(65918),DESTROY:e(92852),REBIND:e(56072),RESIZE:e(57566)}},54812:(s,y,e)=>{/** + */s.exports={AFTER_FLUSH:e(84817),BEFORE_FLUSH:e(36712),BIND:e(40285),BOOT:e(65918),DESTROY:e(92852),REBIND:e(56072),RESIZE:e(57566)}},54812:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(99155),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.amount=1},onPreRender:function(l,n){l=this.getController(l),this.set1f("amount",l.amount,n)}});s.exports=a},67329:(s,y,e)=>{/** + */var r=e(83419),d=e(99155),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.amount=1},onPreRender:function(l,n){l=this.getController(l),this.set1f("amount",l.amount,n)}});s.exports=a},67329:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(24400),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(l){l=this.getController(l),this.set1f("strength",l.blurStrength),this.set3fv("color",l.glcolor)},onDraw:function(l){var n=this.getController(),u=this.fullFrame1,f=this.fullFrame2;this.copyFrame(l,f);for(var o=2/l.width*n.offsetX,c=2/l.height*n.offsetY,p=0;p{/** + */var r=e(83419),d=e(24400),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(l){l=this.getController(l),this.set1f("strength",l.blurStrength),this.set3fv("color",l.glcolor)},onDraw:function(l){var n=this.getController(),u=this.fullFrame1,f=this.fullFrame2;this.copyFrame(l,f);for(var o=2/l.width*n.offsetX,c=2/l.height*n.offsetY,p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(41514),h=e(51078),a=e(94328),l=e(84057),n=new r({Extends:l,initialize:function(f){l.call(this,{game:f,shaders:[{name:"Gaussian5",fragShader:d},{name:"Gaussian9",fragShader:h},{name:"Gaussian13",fragShader:a}]}),this.activeShader=this.shaders[0],this.x=2,this.y=2,this.steps=4,this.strength=1,this.glcolor=[1,1,1]},setQualityLow:function(){return this.activeShader=this.shaders[0],this},setQualityMedium:function(){return this.activeShader=this.shaders[1],this},setQualityHigh:function(){return this.activeShader=this.shaders[2],this},onDraw:function(u){var f=this.getController(),o=this.gl,c=this.fullFrame1,p=o.getParameter(o.FRAMEBUFFER_BINDING);this.bind(this.shaders[f.quality]),o.activeTexture(o.TEXTURE0),o.viewport(0,0,u.width,u.height),this.set1i("uMainSampler",0),this.set2f("resolution",u.width,u.height),this.set1f("strength",f.strength),this.set3fv("color",f.glcolor);for(var v=0;v{/** + */var r=e(83419),d=e(41514),h=e(51078),a=e(94328),l=e(84057),n=new r({Extends:l,initialize:function(f){l.call(this,{game:f,shaders:[{name:"Gaussian5",fragShader:d},{name:"Gaussian9",fragShader:h},{name:"Gaussian13",fragShader:a}]}),this.activeShader=this.shaders[0],this.x=2,this.y=2,this.steps=4,this.strength=1,this.glcolor=[1,1,1]},setQualityLow:function(){return this.activeShader=this.shaders[0],this},setQualityMedium:function(){return this.activeShader=this.shaders[1],this},setQualityHigh:function(){return this.activeShader=this.shaders[2],this},onDraw:function(u){var f=this.getController(),o=this.gl,c=this.fullFrame1,p=o.getParameter(o.FRAMEBUFFER_BINDING);this.bind(this.shaders[f.quality]),o.activeTexture(o.TEXTURE0),o.viewport(0,0,u.width,u.height),this.set1i("uMainSampler",0),this.set2f("resolution",u.width,u.height),this.set1f("strength",f.strength),this.set3fv("color",f.glcolor);for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(90610),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(l,n,u,f){l=this.getController(l),this.set1f("radius",l.radius,n),this.set1f("amount",l.amount,n),this.set1f("contrast",l.contrast,n),this.set1f("strength",l.strength,n),this.set2f("blur",l.blurX,l.blurY,n),this.setBoolean("isTiltShift",l.isTiltShift,n),u&&f&&this.set2f("resolution",u,f,n)},onDraw:function(l){this.set2f("resolution",l.width,l.height),this.bindAndDraw(l)}});s.exports=a},89428:(s,y,e)=>{/** + */var r=e(83419),d=e(90610),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(l,n,u,f){l=this.getController(l),this.set1f("radius",l.radius,n),this.set1f("amount",l.amount,n),this.set1f("contrast",l.contrast,n),this.set1f("strength",l.strength,n),this.set2f("blur",l.blurX,l.blurY,n),this.setBoolean("isTiltShift",l.isTiltShift,n),u&&f&&this.set2f("resolution",u,f,n)},onDraw:function(l){this.set2f("resolution",l.width,l.height),this.bindAndDraw(l)}});s.exports=a},89428:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(91899),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(l,n,u,f){l=this.getController(l),this.set1f("scale",l.scale,n),this.set1f("feather",l.feather,n),this.set1f("thickness",l.thickness,n),this.set3fv("color",l.glcolor,n),this.set4fv("backgroundColor",l.glcolor2,n),u&&f&&this.set2f("resolution",u,f,n)},onDraw:function(l){this.set2f("resolution",l.width,l.height),this.bindAndDraw(l)}});s.exports=a},88904:(s,y,e)=>{/** + */var r=e(83419),d=e(91899),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(l,n,u,f){l=this.getController(l),this.set1f("scale",l.scale,n),this.set1f("feather",l.feather,n),this.set1f("thickness",l.thickness,n),this.set3fv("color",l.glcolor,n),this.set4fv("backgroundColor",l.glcolor2,n),u&&f&&this.set2f("resolution",u,f,n)},onDraw:function(l){this.set2f("resolution",l.width,l.height),this.bindAndDraw(l)}});s.exports=a},88904:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(84057),h=new r({Extends:d,initialize:function(l){d.call(this,{game:l})},onDraw:function(a){var l=this.fullFrame1;this.controller?this.manager.drawFrame(a,l,!0,this.controller):this.drawFrame(a,l),this.copyToGame(l)}});s.exports=h},63563:(s,y,e)=>{/** + */var r=e(83419),d=e(84057),h=new r({Extends:d,initialize:function(l){d.call(this,{game:l})},onDraw:function(a){var l=this.fullFrame1;this.controller?this.manager.drawFrame(a,l,!0,this.controller):this.drawFrame(a,l),this.copyToGame(l)}});s.exports=h},63563:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(47838),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(l){var n=this.game.textures.getFrame(l);n&&(this.glTexture=n.glTexture)},onDraw:function(l){var n=this.getController(),u=this.fullFrame1;this.bind(),this.set1i("uMainSampler",0),this.set1i("uDisplacementSampler",1),this.set2f("amount",n.x,n.y),this.bindTexture(n.glTexture,1),this.copySprite(l,u),this.copyToGame(u)}});s.exports=a},94045:(s,y,e)=>{/** + */var r=e(83419),d=e(47838),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(l){var n=this.game.textures.getFrame(l);n&&(this.glTexture=n.glTexture)},onDraw:function(l){var n=this.getController(),u=this.fullFrame1;this.bind(),this.set1i("uMainSampler",0),this.set1i("uDisplacementSampler",1),this.set2f("amount",n.x,n.y),this.bindTexture(n.glTexture,1),this.copySprite(l,u),this.copyToGame(u)}});s.exports=a},94045:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(95540),h=e(98656),a=e(84057),l=e(70554),n=new r({Extends:a,initialize:function(f,o){var c=d(o,"quality",.1),p=d(o,"distance",10);a.call(this,{game:f,fragShader:l.setGlowQuality(h,f,c,p)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(u,f,o,c){u=this.getController(u),this.set1f("outerStrength",u.outerStrength,f),this.set1f("innerStrength",u.innerStrength,f),this.set4fv("glowColor",u.glcolor,f),this.setBoolean("knockout",u.knockout,f),o&&c&&this.set2f("resolution",o,c,f)},onDraw:function(u){this.set2f("resolution",u.width,u.height),this.bindAndDraw(u)}});s.exports=n},74088:(s,y,e)=>{/** + */var r=e(83419),d=e(95540),h=e(98656),a=e(84057),l=e(70554),n=new r({Extends:a,initialize:function(f,o){var c=d(o,"quality",.1),p=d(o,"distance",10);a.call(this,{game:f,fragShader:l.setGlowQuality(h,f,c,p)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(u,f,o,c){u=this.getController(u),this.set1f("outerStrength",u.outerStrength,f),this.set1f("innerStrength",u.innerStrength,f),this.set4fv("glowColor",u.glcolor,f),this.setBoolean("knockout",u.knockout,f),o&&c&&this.set2f("resolution",o,c,f)},onDraw:function(u){this.set2f("resolution",u.width,u.height),this.bindAndDraw(u)}});s.exports=n},74088:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(70463),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.alpha=.2,this.size=0,this.fromX=0,this.fromY=0,this.toX=0,this.toY=1,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0]},onPreRender:function(l,n){l=this.getController(l),this.set1f("alpha",l.alpha,n),this.set1i("size",l.size,n),this.set3fv("color1",l.glcolor1,n),this.set3fv("color2",l.glcolor2,n),this.set2f("positionFrom",l.fromX,l.fromY,n),this.set2f("positionTo",l.toX,l.toY,n)}});s.exports=a},99636:(s,y,e)=>{/** + */var r=e(83419),d=e(70463),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.alpha=.2,this.size=0,this.fromX=0,this.fromY=0,this.toX=0,this.toY=1,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0]},onPreRender:function(l,n){l=this.getController(l),this.set1f("alpha",l.alpha,n),this.set1i("size",l.size,n),this.set3fv("color1",l.glcolor1,n),this.set3fv("color2",l.glcolor2,n),this.set2f("positionFrom",l.fromX,l.fromY,n),this.set2f("positionTo",l.toX,l.toY,n)}});s.exports=a},99636:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(50831),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.amount=1},onPreRender:function(l,n,u,f){l=this.getController(l),this.set1f("amount",l.amount,n),u&&f&&this.set2f("resolution",u,f,n)},onDraw:function(l){this.set2f("resolution",l.width,l.height),this.bindAndDraw(l)}});s.exports=a},34700:(s,y,e)=>{/** + */var r=e(83419),d=e(50831),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.amount=1},onPreRender:function(l,n,u,f){l=this.getController(l),this.set1f("amount",l.amount,n),u&&f&&this.set2f("resolution",u,f,n)},onDraw:function(l){this.set2f("resolution",l.width,l.height),this.bindAndDraw(l)}});s.exports=a},34700:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(92595),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.x=0,this.y=0,this.decay=.1,this.power=1,this.glcolor=[0,0,0,1],this.samples=6,this.intensity=1},onPreRender:function(l,n){l=this.getController(l);var u=l.samples;this.set1i("samples",u,n),this.set1f("intensity",l.intensity,n),this.set1f("decay",l.decay,n),this.set1f("power",l.power/u,n),this.set2f("lightPosition",l.x,l.y,n),this.set4fv("color",l.glcolor,n)}});s.exports=a},91157:(s,y,e)=>{/** + */var r=e(83419),d=e(92595),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.x=0,this.y=0,this.decay=.1,this.power=1,this.glcolor=[0,0,0,1],this.samples=6,this.intensity=1},onPreRender:function(l,n){l=this.getController(l);var u=l.samples;this.set1i("samples",u,n),this.set1f("intensity",l.intensity,n),this.set1f("decay",l.decay,n),this.set1f("power",l.power/u,n),this.set2f("lightPosition",l.x,l.y,n),this.set4fv("color",l.glcolor,n)}});s.exports=a},91157:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(72464),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(l,n,u,f){l=this.getController(l),this.setTime("time",n),this.set1f("speed",l.speed,n),this.set1f("lineWidth",l.lineWidth,n),this.set1f("gradient",l.gradient,n),this.setBoolean("reveal",l.reveal,n),u&&f&&this.set2f("resolution",u,f,n)},onDraw:function(l){this.set2f("resolution",l.width,l.height),this.bindAndDraw(l)}});s.exports=a},27797:(s,y,e)=>{/** + */var r=e(83419),d=e(72464),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(l,n,u,f){l=this.getController(l),this.setTime("time",n),this.set1f("speed",l.speed,n),this.set1f("lineWidth",l.lineWidth,n),this.set1f("gradient",l.gradient,n),this.setBoolean("reveal",l.reveal,n),u&&f&&this.set2f("resolution",u,f,n)},onDraw:function(l){this.set2f("resolution",l.width,l.height),this.bindAndDraw(l)}});s.exports=a},27797:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(39249),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(l,n){l=this.getController(l),this.set1f("radius",l.radius,n),this.set1f("strength",l.strength,n),this.set2f("position",l.x,l.y,n)}});s.exports=a},67603:(s,y,e)=>{/** + */var r=e(83419),d=e(39249),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(l,n){l=this.getController(l),this.set1f("radius",l.radius,n),this.set1f("strength",l.strength,n),this.set2f("position",l.x,l.y,n)}});s.exports=a},67603:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(2878),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(l,n){l=this.getController(l);var u=l.progress,f=l.wipeWidth,o=l.direction,c=l.axis;this.set4f("config",u,f,o,c,n),this.setBoolean("reveal",l.reveal,n)}});s.exports=a},58918:(s,y,e)=>{/** + */var r=e(83419),d=e(2878),h=e(84057),a=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:d}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(l,n){l=this.getController(l);var u=l.progress,f=l.wipeWidth,o=l.direction,c=l.axis;this.set4f("config",u,f,o,c,n),this.setBoolean("reveal",l.reveal,n)}});s.exports=a},58918:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r={Barrel:e(54812),Bloom:e(67329),Blur:e(8861),Bokeh:e(51051),Circle:e(89428),ColorMatrix:e(88904),Displacement:e(63563),Glow:e(94045),Gradient:e(74088),Pixelate:e(99636),Shadow:e(34700),Shine:e(91157),Vignette:e(27797),Wipe:e(67603)};s.exports=r},96615:(s,y,e)=>{/** + */var r={Barrel:e(54812),Bloom:e(67329),Blur:e(8861),Bokeh:e(51051),Circle:e(89428),ColorMatrix:e(88904),Displacement:e(63563),Glow:e(94045),Gradient:e(74088),Pixelate:e(99636),Shadow:e(34700),Shine:e(91157),Vignette:e(27797),Wipe:e(67603)};s.exports=r},96615:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4912,40 +4912,40 @@ return new `+this.key+`(); `)},49627:s=>{s.exports=["#define SHADER_NAME PHASER_QUAD_VS","precision mediump float;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outFragCoord;","varying vec2 outTexCoord;","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;"," gl_Position = vec4(inPosition, 0, 1);","}"].join(` `)},45561:s=>{s.exports=["#define SHADER_NAME PHASER_SINGLE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(` `)},60722:s=>{s.exports=["#define SHADER_NAME PHASER_SINGLE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform int uRoundPixels;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," if (uRoundPixels == 1)"," {"," gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.0 - 1.0;"," }"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` -`)},89350:(s,y,e)=>{/** +`)},89350:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={AddBlendFrag:e(35407),BitmapMaskFrag:e(78908),BitmapMaskVert:e(85191),ColorMatrixFrag:e(96293),CopyFrag:e(36682),FXBarrelFrag:e(99155),FXBloomFrag:e(24400),FXBlurHighFrag:e(94328),FXBlurLowFrag:e(41514),FXBlurMedFrag:e(51078),FXBokehFrag:e(90610),FXCircleFrag:e(91899),FXDisplacementFrag:e(47838),FXGlowFrag:e(98656),FXGradientFrag:e(70463),FXPixelateFrag:e(50831),FXShadowFrag:e(92595),FXShineFrag:e(72464),FXVignetteFrag:e(39249),FXWipeFrag:e(2878),LightFrag:e(31063),LinearBlendFrag:e(48247),MeshFrag:e(41214),MeshVert:e(39653),MobileFrag:e(62143),MobileVert:e(47940),MultiFrag:e(98840),MultiVert:e(44667),PointLightFrag:e(4127),PointLightVert:e(89924),PostFXFrag:e(27681),QuadVert:e(49627),SingleFrag:e(45561),SingleVert:e(60722)}},93567:(s,y,e)=>{/** + */s.exports={AddBlendFrag:e(35407),BitmapMaskFrag:e(78908),BitmapMaskVert:e(85191),ColorMatrixFrag:e(96293),CopyFrag:e(36682),FXBarrelFrag:e(99155),FXBloomFrag:e(24400),FXBlurHighFrag:e(94328),FXBlurLowFrag:e(41514),FXBlurMedFrag:e(51078),FXBokehFrag:e(90610),FXCircleFrag:e(91899),FXDisplacementFrag:e(47838),FXGlowFrag:e(98656),FXGradientFrag:e(70463),FXPixelateFrag:e(50831),FXShadowFrag:e(92595),FXShineFrag:e(72464),FXVignetteFrag:e(39249),FXWipeFrag:e(2878),LightFrag:e(31063),LinearBlendFrag:e(48247),MeshFrag:e(41214),MeshVert:e(39653),MobileFrag:e(62143),MobileVert:e(47940),MultiFrag:e(98840),MultiVert:e(44667),PointLightFrag:e(4127),PointLightVert:e(89924),PostFXFrag:e(27681),QuadVert:e(49627),SingleFrag:e(45561),SingleVert:e(60722)}},93567:(s,x,e)=>{/** * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a,l,n){this.webGLAttribLocation=-1,this.gl=a,this.program=l,this.name=n,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLAttribLocation=-1;return}var h=this.gl;h.isContextLost()||(this.webGLAttribLocation=h.getAttribLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});s.exports=d},26128:(s,y,e)=>{/** + */var r=e(83419),d=new r({initialize:function(a,l,n){this.webGLAttribLocation=-1,this.gl=a,this.program=l,this.name=n,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLAttribLocation=-1;return}var h=this.gl;h.isContextLost()||(this.webGLAttribLocation=h.getAttribLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});s.exports=d},26128:(s,x,e)=>{/** * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a,l,n,u){this.webGLBuffer=null,this.gl=a,this.initialDataOrSize=l,this.bufferType=n,this.bufferUsage=u,this.createResource()},createResource:function(){if(this.initialDataOrSize!==null){var h=this.gl;if(!h.isContextLost()){var a=this.bufferType,l=h.createBuffer();this.webGLBuffer=l,h.bindBuffer(a,this.webGLBuffer),h.bufferData(a,this.initialDataOrSize,this.bufferUsage),h.bindBuffer(a,null)}}},destroy:function(){var h=this.gl;h.isContextLost()||h.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});s.exports=d},84387:(s,y,e)=>{/** + */var r=e(83419),d=new r({initialize:function(a,l,n,u){this.webGLBuffer=null,this.gl=a,this.initialDataOrSize=l,this.bufferType=n,this.bufferUsage=u,this.createResource()},createResource:function(){if(this.initialDataOrSize!==null){var h=this.gl;if(!h.isContextLost()){var a=this.bufferType,l=h.createBuffer();this.webGLBuffer=l,h.bindBuffer(a,this.webGLBuffer),h.bufferData(a,this.initialDataOrSize,this.bufferUsage),h.bindBuffer(a,null)}}},destroy:function(){var h=this.gl;h.isContextLost()||h.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});s.exports=d},84387:(s,x,e)=>{/** * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},h=new r({initialize:function(l,n,u,f,o){this.webGLFramebuffer=null,this.gl=l,this.width=n,this.height=u,this.renderTexture=f,this.addDepthStencilBuffer=!!o,this.createResource()},createResource:function(){var a=this.gl;if(!a.isContextLost()){var l=this.renderTexture,n=0,u=a.createFramebuffer();if(this.webGLFramebuffer=u,a.bindFramebuffer(a.FRAMEBUFFER,u),l.isRenderTexture=!0,l.isAlphaPremultiplied=!1,a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,l.webGLTexture,0),n=a.checkFramebufferStatus(a.FRAMEBUFFER),n!==a.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(d[n]||n));if(this.addDepthStencilBuffer){var f=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,f),a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,this.width,this.height),a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,f)}a.bindFramebuffer(a.FRAMEBUFFER,null)}},destroy:function(){if(this.webGLFramebuffer!==null){var a=this.gl;if(!a.isContextLost()){a.bindFramebuffer(a.FRAMEBUFFER,this.webGLFramebuffer);var l=a.getFramebufferAttachmentParameter(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);l!==null&&(a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,null,0),a.deleteTexture(l));var n=a.getFramebufferAttachmentParameter(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);n!==null&&a.deleteRenderbuffer(n),a.bindFramebuffer(a.FRAMEBUFFER,null),a.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});s.exports=h},1482:(s,y,e)=>{/** + */var r=e(83419),d={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},h=new r({initialize:function(l,n,u,f,o){this.webGLFramebuffer=null,this.gl=l,this.width=n,this.height=u,this.renderTexture=f,this.addDepthStencilBuffer=!!o,this.createResource()},createResource:function(){var a=this.gl;if(!a.isContextLost()){var l=this.renderTexture,n=0,u=a.createFramebuffer();if(this.webGLFramebuffer=u,a.bindFramebuffer(a.FRAMEBUFFER,u),l.isRenderTexture=!0,l.isAlphaPremultiplied=!1,a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,l.webGLTexture,0),n=a.checkFramebufferStatus(a.FRAMEBUFFER),n!==a.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(d[n]||n));if(this.addDepthStencilBuffer){var f=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,f),a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,this.width,this.height),a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,f)}a.bindFramebuffer(a.FRAMEBUFFER,null)}},destroy:function(){if(this.webGLFramebuffer!==null){var a=this.gl;if(!a.isContextLost()){a.bindFramebuffer(a.FRAMEBUFFER,this.webGLFramebuffer);var l=a.getFramebufferAttachmentParameter(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);l!==null&&(a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,null,0),a.deleteTexture(l));var n=a.getFramebufferAttachmentParameter(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);n!==null&&a.deleteRenderbuffer(n),a.bindFramebuffer(a.FRAMEBUFFER,null),a.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});s.exports=h},1482:(s,x,e)=>{/** * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var r=e(83419),d=new r({initialize:function(a,l,n){this.webGLProgram=null,this.gl=a,this.vertexSource=l,this.fragmentSource=n,this.createResource()},createResource:function(){var h=this.gl;if(!h.isContextLost()){var a=h.createProgram(),l=h.createShader(h.VERTEX_SHADER),n=h.createShader(h.FRAGMENT_SHADER);h.shaderSource(l,this.vertexSource),h.shaderSource(n,this.fragmentSource),h.compileShader(l),h.compileShader(n);var u=`Shader failed: -`;if(!h.getShaderParameter(l,h.COMPILE_STATUS))throw new Error("Vertex "+u+h.getShaderInfoLog(l));if(!h.getShaderParameter(n,h.COMPILE_STATUS))throw new Error("Fragment "+u+h.getShaderInfoLog(n));if(h.attachShader(a,l),h.attachShader(a,n),h.linkProgram(a),!h.getProgramParameter(a,h.LINK_STATUS))throw new Error("Link "+u+h.getProgramInfoLog(a));h.useProgram(a),this.webGLProgram=a}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});s.exports=d},82751:(s,y,e)=>{/** +`;if(!h.getShaderParameter(l,h.COMPILE_STATUS))throw new Error("Vertex "+u+h.getShaderInfoLog(l));if(!h.getShaderParameter(n,h.COMPILE_STATUS))throw new Error("Fragment "+u+h.getShaderInfoLog(n));if(h.attachShader(a,l),h.attachShader(a,n),h.linkProgram(a),!h.getProgramParameter(a,h.LINK_STATUS))throw new Error("Link "+u+h.getProgramInfoLog(a));h.useProgram(a),this.webGLProgram=a}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});s.exports=d},82751:(s,x,e)=>{/** * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(50030),h=new r({initialize:function(l,n,u,f,o,c,p,v,m,S,M,w,C){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=l,this.mipLevel=n,this.minFilter=u,this.magFilter=f,this.wrapT=o,this.wrapS=c,this.format=p,this.pixels=v,this.width=m,this.height=S,this.pma=M??!0,this.forceSize=!!w,this.flipY=!!C,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var a=this.gl;if(!a.isContextLost()){if(this.pixels instanceof h){this.webGLTexture=this.pixels.webGLTexture;return}var l=a.createTexture();l.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=l,this._processTexture()}},update:function(a,l,n,u,f,o,c,p,v){if(!(l===0||n===0)){this.pixels=a,this.width=l,this.height=n,this.flipY=u,this.wrapS=f,this.wrapT=o,this.minFilter=c,this.magFilter=p,this.format=v;var m=this.gl;m.isContextLost()||this._processTexture()}},_processTexture:function(){var a=this.gl;a.activeTexture(a.TEXTURE0);var l=a.getParameter(a.TEXTURE_BINDING_2D);a.bindTexture(a.TEXTURE_2D,this.webGLTexture),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,this.minFilter),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,this.magFilter),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,this.wrapS),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,this.wrapT),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,this.flipY);var n=this.pixels,u=this.mipLevel,f=this.width,o=this.height,c=this.format,p=!1;if(n==null)a.texImage2D(a.TEXTURE_2D,u,c,f,o,0,c,a.UNSIGNED_BYTE,null),p=d(f,o);else if(n.compressed){f=n.width,o=n.height,p=n.generateMipmap;for(var v=0;v{/** + */var r=e(83419),d=e(50030),h=new r({initialize:function(l,n,u,f,o,c,p,v,m,S,M,w,C){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=l,this.mipLevel=n,this.minFilter=u,this.magFilter=f,this.wrapT=o,this.wrapS=c,this.format=p,this.pixels=v,this.width=m,this.height=S,this.pma=M??!0,this.forceSize=!!w,this.flipY=!!C,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var a=this.gl;if(!a.isContextLost()){if(this.pixels instanceof h){this.webGLTexture=this.pixels.webGLTexture;return}var l=a.createTexture();l.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=l,this._processTexture()}},update:function(a,l,n,u,f,o,c,p,v){if(!(l===0||n===0)){this.pixels=a,this.width=l,this.height=n,this.flipY=u,this.wrapS=f,this.wrapT=o,this.minFilter=c,this.magFilter=p,this.format=v;var m=this.gl;m.isContextLost()||this._processTexture()}},_processTexture:function(){var a=this.gl;a.activeTexture(a.TEXTURE0);var l=a.getParameter(a.TEXTURE_BINDING_2D);a.bindTexture(a.TEXTURE_2D,this.webGLTexture),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,this.minFilter),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,this.magFilter),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,this.wrapS),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,this.wrapT),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,this.flipY);var n=this.pixels,u=this.mipLevel,f=this.width,o=this.height,c=this.format,p=!1;if(n==null)a.texImage2D(a.TEXTURE_2D,u,c,f,o,0,c,a.UNSIGNED_BYTE,null),p=d(f,o);else if(n.compressed){f=n.width,o=n.height,p=n.generateMipmap;for(var v=0;v{/** * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a,l,n){this.webGLUniformLocation=null,this.gl=a,this.program=l,this.name=n,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLUniformLocation=null;return}var h=this.gl;h.isContextLost()||(this.webGLUniformLocation=h.getUniformLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});s.exports=d},9503:(s,y,e)=>{/** + */var r=e(83419),d=new r({initialize:function(a,l,n){this.webGLUniformLocation=null,this.gl=a,this.program=l,this.name=n,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLUniformLocation=null;return}var h=this.gl;h.isContextLost()||(this.webGLUniformLocation=h.getUniformLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});s.exports=d},9503:(s,x,e)=>{/** * @author Benjamin D. Richards * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r={WebGLAttribLocationWrapper:e(93567),WebGLBufferWrapper:e(26128),WebGLProgramWrapper:e(1482),WebGLTextureWrapper:e(82751),WebGLFramebufferWrapper:e(84387),WebGLUniformLocationWrapper:e(57183)};s.exports=r},76531:(s,y,e)=>{/** + */var r={WebGLAttribLocationWrapper:e(93567),WebGLBufferWrapper:e(26128),WebGLProgramWrapper:e(1482),WebGLTextureWrapper:e(82751),WebGLFramebufferWrapper:e(84387),WebGLUniformLocationWrapper:e(57183)};s.exports=r},76531:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4965,7 +4965,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(s,y,e)=>{/** + */s.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -4993,19 +4993,19 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="resize"},97480:(s,y,e)=>{/** + */s.exports="resize"},97480:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={ENTER_FULLSCREEN:e(56139),FULLSCREEN_FAILED:e(2336),FULLSCREEN_UNSUPPORTED:e(47412),LEAVE_FULLSCREEN:e(51452),ORIENTATION_CHANGE:e(20666),RESIZE:e(47945)}},93364:(s,y,e)=>{/** + */s.exports={ENTER_FULLSCREEN:e(56139),FULLSCREEN_FAILED:e(2336),FULLSCREEN_UNSUPPORTED:e(47412),LEAVE_FULLSCREEN:e(51452),ORIENTATION_CHANGE:e(20666),RESIZE:e(47945)}},93364:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(79291),d=e(13560),h={Center:e(64743),Events:e(97480),Orientation:e(39218),ScaleManager:e(76531),ScaleModes:e(81050),Zoom:e(80805)};h=r(!1,h,d.CENTER),h=r(!1,h,d.ORIENTATION),h=r(!1,h,d.SCALE_MODE),h=r(!1,h,d.ZOOM),s.exports=h},27397:(s,y,e)=>{/** + */var r=e(79291),d=e(13560),h={Center:e(64743),Events:e(97480),Orientation:e(39218),ScaleManager:e(76531),ScaleModes:e(81050),Zoom:e(80805)};h=r(!1,h,d.CENTER),h=r(!1,h,d.ORIENTATION),h=r(!1,h,d.SCALE_MODE),h=r(!1,h,d.ZOOM),s.exports=h},27397:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(95540),d=e(35355),h=function(a){var l=a.game.config.defaultPhysicsSystem,n=r(a.settings,"physics",!1);if(!(!l&&!n)){var u=[];if(l&&u.push(d(l+"Physics")),n)for(var f in n)f=d(f.concat("Physics")),u.indexOf(f)===-1&&u.push(f);return u}};s.exports=h},52106:(s,y,e)=>{/** + */var r=e(95540),d=e(35355),h=function(a){var l=a.game.config.defaultPhysicsSystem,n=r(a.settings,"physics",!1);if(!(!l&&!n)){var u=[];if(l&&u.push(d(l+"Physics")),n)for(var f in n)f=d(f.concat("Physics")),u.indexOf(f)===-1&&u.push(f);return u}};s.exports=h},52106:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5013,24 +5013,24 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"};s.exports=y},97482:(s,y,e)=>{/** + */var x={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"};s.exports=x},97482:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(2368),h=new r({initialize:function(l){this.sys=new d(this,l),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});s.exports=h},60903:(s,y,e)=>{/** + */var r=e(83419),d=e(2368),h=new r({initialize:function(l){this.sys=new d(this,l),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});s.exports=h},60903:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var r=e(83419),d=e(89993),h=e(44594),a=e(8443),l=e(35154),n=e(54899),u=e(29747),f=e(97482),o=e(2368),c=new r({initialize:function(v,m){if(this.game=v,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,m){Array.isArray(m)||(m=[m]);for(var S=0;S-1&&(delete this.keys[S],this.scenes.splice(m,1),this._start.indexOf(S)>-1&&(m=this._start.indexOf(S),this._start.splice(m,1)),v.sys.destroy())}return this},bootScene:function(p){var v=p.sys,m=v.settings;v.sceneUpdate=u,p.init&&(p.init.call(p,m.data),m.status=d.INIT,m.isTransition&&v.events.emit(h.TRANSITION_INIT,m.transitionFrom,m.transitionDuration));var S;v.load&&(S=v.load,S.reset()),S&&p.preload?(p.preload.call(p),m.status=d.LOADING,S.once(n.COMPLETE,this.loadComplete,this),S.start()):this.create(p)},loadComplete:function(p){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(p.scene)},payloadComplete:function(p){this.bootScene(p.scene)},update:function(p,v){this.processQueue(),this.isProcessing=!0;for(var m=this.scenes.length-1;m>=0;m--){var S=this.scenes[m].sys;S.settings.status>d.START&&S.settings.status<=d.RUNNING&&S.step(p,v),S.scenePlugin&&S.scenePlugin._target&&S.scenePlugin.step(p,v)}},render:function(p){for(var v=0;v=d.LOADING&&m.settings.status=d.START&&M<=d.CREATING)return this;if(M>=d.RUNNING&&M<=d.SLEEPING)S.shutdown(),S.sceneUpdate=u,S.start(v);else{S.sceneUpdate=u,S.start(v);var w;if(S.load&&(w=S.load),w&&S.settings.hasOwnProperty("pack")&&(w.reset(),w.addPack({payload:S.settings.pack})))return S.settings.status=d.LOADING,w.once(n.COMPLETE,this.payloadComplete,this),w.start(),this}return this.bootScene(m),this},stop:function(p,v){var m=this.getScene(p);if(m&&!m.sys.isTransitioning()&&m.sys.settings.status!==d.SHUTDOWN){var S=m.sys.load;S&&(S.off(n.COMPLETE,this.loadComplete,this),S.off(n.COMPLETE,this.payloadComplete,this)),m.sys.shutdown(v)}return this},switch:function(p,v){var m=this.getScene(p),S=this.getScene(v);return m&&S&&m!==S&&(this.sleep(p),this.isSleeping(v)?this.wake(v):this.start(v)),this},getAt:function(p){return this.scenes[p]},getIndex:function(p){var v=this.getScene(p);return this.scenes.indexOf(v)},bringToTop:function(p){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:p,keyB:null});else{var v=this.getIndex(p);if(v!==-1&&v0){var m=this.getScene(p);this.scenes.splice(v,1),this.scenes.unshift(m)}}return this},moveDown:function(p){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:p,keyB:null});else{var v=this.getIndex(p);if(v>0){var m=v-1,S=this.getScene(p),M=this.getAt(m);this.scenes[v]=M,this.scenes[m]=S}}return this},moveUp:function(p){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:p,keyB:null});else{var v=this.getIndex(p);if(vm),0,M)}}return this},moveBelow:function(p,v){if(p===v)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:p,keyB:v});else{var m=this.getIndex(p),S=this.getIndex(v);if(m!==-1&&S!==-1&&S>m){var M=this.getAt(S);this.scenes.splice(S,1),m===0?this.scenes.unshift(M):this.scenes.splice(m-(S{/** +`))},destroy:function(){for(var p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(45319),d=e(83419),h=e(44594),a=e(95540),l=e(37277),n=new d({initialize:function(f){this.scene=f,this.systems=f.sys,this.settings=f.sys.settings,this.key=f.sys.settings.key,this.manager=f.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,f.sys.events.once(h.BOOT,this.boot,this),f.sys.events.on(h.START,this.pluginStart,this)},boot:function(){this.systems.events.once(h.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(h.SHUTDOWN,this.shutdown,this)},start:function(u,f){return u===void 0&&(u=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",u,f),this},restart:function(u){var f=this.key;return this.manager.queueOp("stop",f),this.manager.queueOp("start",f,u),this},transition:function(u){u===void 0&&(u={});var f=a(u,"target",!1),o=this.manager.getScene(f);if(!f||!this.checkValidTransition(o))return!1;var c=a(u,"duration",1e3);this._elapsed=0,this._target=o,this._duration=c,this._willSleep=a(u,"sleep",!1),this._willRemove=a(u,"remove",!1);var p=a(u,"onUpdate",null);p&&(this._onUpdate=p,this._onUpdateScope=a(u,"onUpdateScope",this.scene));var v=a(u,"allowInput",!1);this.settings.transitionAllowInput=v;var m=o.sys.settings;m.isTransition=!0,m.transitionFrom=this.scene,m.transitionDuration=c,m.transitionAllowInput=v,a(u,"moveAbove",!1)?this.manager.moveAbove(this.key,f):a(u,"moveBelow",!1)&&this.manager.moveBelow(this.key,f),o.sys.isSleeping()?o.sys.wake(a(u,"data")):this.manager.start(f,a(u,"data"));var S=a(u,"onStart",null),M=a(u,"onStartScope",this.scene);return S&&S.call(M,this.scene,o,c),this.systems.events.emit(h.TRANSITION_OUT,o,c),!0},checkValidTransition:function(u){return!(!u||u.sys.isActive()||u.sys.isTransitioning()||u===this.scene||this.systems.isTransitioning())},step:function(u,f){this._elapsed+=f,this.transitionProgress=r(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var u=this._target.sys,f=this._target.sys.settings;u.events.emit(h.TRANSITION_COMPLETE,this.scene),f.isTransition=!1,f.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(u,f,o,c){return this.manager.add(u,f,o,c)},launch:function(u,f){return u&&u!==this.key&&this.manager.queueOp("start",u,f),this},run:function(u,f){return u&&u!==this.key&&this.manager.queueOp("run",u,f),this},pause:function(u,f){return u===void 0&&(u=this.key),this.manager.queueOp("pause",u,f),this},resume:function(u,f){return u===void 0&&(u=this.key),this.manager.queueOp("resume",u,f),this},sleep:function(u,f){return u===void 0&&(u=this.key),this.manager.queueOp("sleep",u,f),this},wake:function(u,f){return u===void 0&&(u=this.key),this.manager.queueOp("wake",u,f),this},switch:function(u){return u!==this.key&&this.manager.queueOp("switch",this.key,u),this},stop:function(u,f){return u===void 0&&(u=this.key),this.manager.queueOp("stop",u,f),this},setActive:function(u,f,o){f===void 0&&(f=this.key);var c=this.manager.getScene(f);return c&&c.sys.setActive(u,o),this},setVisible:function(u,f){f===void 0&&(f=this.key);var o=this.manager.getScene(f);return o&&o.sys.setVisible(u),this},isSleeping:function(u){return u===void 0&&(u=this.key),this.manager.isSleeping(u)},isActive:function(u){return u===void 0&&(u=this.key),this.manager.isActive(u)},isPaused:function(u){return u===void 0&&(u=this.key),this.manager.isPaused(u)},isVisible:function(u){return u===void 0&&(u=this.key),this.manager.isVisible(u)},swapPosition:function(u,f){return f===void 0&&(f=this.key),u!==f&&this.manager.swapPosition(u,f),this},moveAbove:function(u,f){return f===void 0&&(f=this.key),u!==f&&this.manager.moveAbove(u,f),this},moveBelow:function(u,f){return f===void 0&&(f=this.key),u!==f&&this.manager.moveBelow(u,f),this},remove:function(u){return u===void 0&&(u=this.key),this.manager.remove(u),this},moveUp:function(u){return u===void 0&&(u=this.key),this.manager.moveUp(u),this},moveDown:function(u){return u===void 0&&(u=this.key),this.manager.moveDown(u),this},bringToTop:function(u){return u===void 0&&(u=this.key),this.manager.bringToTop(u),this},sendToBack:function(u){return u===void 0&&(u=this.key),this.manager.sendToBack(u),this},get:function(u){return this.manager.getScene(u)},getStatus:function(u){var f=this.manager.getScene(u);if(f)return f.sys.getStatus()},getIndex:function(u){return u===void 0&&(u=this.key),this.manager.getIndex(u)},shutdown:function(){var u=this.systems.events;u.off(h.SHUTDOWN,this.shutdown,this),u.off(h.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});l.register("ScenePlugin",n,"scenePlugin"),s.exports=n},55681:(s,y,e)=>{/** + */var r=e(45319),d=e(83419),h=e(44594),a=e(95540),l=e(37277),n=new d({initialize:function(f){this.scene=f,this.systems=f.sys,this.settings=f.sys.settings,this.key=f.sys.settings.key,this.manager=f.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,f.sys.events.once(h.BOOT,this.boot,this),f.sys.events.on(h.START,this.pluginStart,this)},boot:function(){this.systems.events.once(h.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(h.SHUTDOWN,this.shutdown,this)},start:function(u,f){return u===void 0&&(u=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",u,f),this},restart:function(u){var f=this.key;return this.manager.queueOp("stop",f),this.manager.queueOp("start",f,u),this},transition:function(u){u===void 0&&(u={});var f=a(u,"target",!1),o=this.manager.getScene(f);if(!f||!this.checkValidTransition(o))return!1;var c=a(u,"duration",1e3);this._elapsed=0,this._target=o,this._duration=c,this._willSleep=a(u,"sleep",!1),this._willRemove=a(u,"remove",!1);var p=a(u,"onUpdate",null);p&&(this._onUpdate=p,this._onUpdateScope=a(u,"onUpdateScope",this.scene));var v=a(u,"allowInput",!1);this.settings.transitionAllowInput=v;var m=o.sys.settings;m.isTransition=!0,m.transitionFrom=this.scene,m.transitionDuration=c,m.transitionAllowInput=v,a(u,"moveAbove",!1)?this.manager.moveAbove(this.key,f):a(u,"moveBelow",!1)&&this.manager.moveBelow(this.key,f),o.sys.isSleeping()?o.sys.wake(a(u,"data")):this.manager.start(f,a(u,"data"));var S=a(u,"onStart",null),M=a(u,"onStartScope",this.scene);return S&&S.call(M,this.scene,o,c),this.systems.events.emit(h.TRANSITION_OUT,o,c),!0},checkValidTransition:function(u){return!(!u||u.sys.isActive()||u.sys.isTransitioning()||u===this.scene||this.systems.isTransitioning())},step:function(u,f){this._elapsed+=f,this.transitionProgress=r(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var u=this._target.sys,f=this._target.sys.settings;u.events.emit(h.TRANSITION_COMPLETE,this.scene),f.isTransition=!1,f.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(u,f,o,c){return this.manager.add(u,f,o,c)},launch:function(u,f){return u&&u!==this.key&&this.manager.queueOp("start",u,f),this},run:function(u,f){return u&&u!==this.key&&this.manager.queueOp("run",u,f),this},pause:function(u,f){return u===void 0&&(u=this.key),this.manager.queueOp("pause",u,f),this},resume:function(u,f){return u===void 0&&(u=this.key),this.manager.queueOp("resume",u,f),this},sleep:function(u,f){return u===void 0&&(u=this.key),this.manager.queueOp("sleep",u,f),this},wake:function(u,f){return u===void 0&&(u=this.key),this.manager.queueOp("wake",u,f),this},switch:function(u){return u!==this.key&&this.manager.queueOp("switch",this.key,u),this},stop:function(u,f){return u===void 0&&(u=this.key),this.manager.queueOp("stop",u,f),this},setActive:function(u,f,o){f===void 0&&(f=this.key);var c=this.manager.getScene(f);return c&&c.sys.setActive(u,o),this},setVisible:function(u,f){f===void 0&&(f=this.key);var o=this.manager.getScene(f);return o&&o.sys.setVisible(u),this},isSleeping:function(u){return u===void 0&&(u=this.key),this.manager.isSleeping(u)},isActive:function(u){return u===void 0&&(u=this.key),this.manager.isActive(u)},isPaused:function(u){return u===void 0&&(u=this.key),this.manager.isPaused(u)},isVisible:function(u){return u===void 0&&(u=this.key),this.manager.isVisible(u)},swapPosition:function(u,f){return f===void 0&&(f=this.key),u!==f&&this.manager.swapPosition(u,f),this},moveAbove:function(u,f){return f===void 0&&(f=this.key),u!==f&&this.manager.moveAbove(u,f),this},moveBelow:function(u,f){return f===void 0&&(f=this.key),u!==f&&this.manager.moveBelow(u,f),this},remove:function(u){return u===void 0&&(u=this.key),this.manager.remove(u),this},moveUp:function(u){return u===void 0&&(u=this.key),this.manager.moveUp(u),this},moveDown:function(u){return u===void 0&&(u=this.key),this.manager.moveDown(u),this},bringToTop:function(u){return u===void 0&&(u=this.key),this.manager.bringToTop(u),this},sendToBack:function(u){return u===void 0&&(u=this.key),this.manager.sendToBack(u),this},get:function(u){return this.manager.getScene(u)},getStatus:function(u){var f=this.manager.getScene(u);if(f)return f.sys.getStatus()},getIndex:function(u){return u===void 0&&(u=this.key),this.manager.getIndex(u)},shutdown:function(){var u=this.systems.events;u.off(h.SHUTDOWN,this.shutdown,this),u.off(h.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});l.register("ScenePlugin",n,"scenePlugin"),s.exports=n},55681:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(89993),d=e(35154),h=e(46975),a=e(87033),l={create:function(n){return typeof n=="string"?n={key:n}:n===void 0&&(n={}),{status:r.PENDING,key:d(n,"key",""),active:d(n,"active",!1),visible:d(n,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:d(n,"pack",!1),cameras:d(n,"cameras",null),map:d(n,"map",h(a,d(n,"mapAdd",{}))),physics:d(n,"physics",{}),loader:d(n,"loader",{}),plugins:d(n,"plugins",!1),input:d(n,"input",{})}}};s.exports=l},2368:(s,y,e)=>{/** + */var r=e(89993),d=e(35154),h=e(46975),a=e(87033),l={create:function(n){return typeof n=="string"?n={key:n}:n===void 0&&(n={}),{status:r.PENDING,key:d(n,"key",""),active:d(n,"active",!1),visible:d(n,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:d(n,"pack",!1),cameras:d(n,"cameras",null),map:d(n,"map",h(a,d(n,"mapAdd",{}))),physics:d(n,"physics",{}),loader:d(n,"loader",{}),plugins:d(n,"plugins",!1),input:d(n,"input",{})}}};s.exports=l},2368:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5038,7 +5038,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};s.exports=y},69830:s=>{/** + */var x={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};s.exports=x},69830:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5126,25 +5126,25 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="wake"},44594:(s,y,e)=>{/** + */s.exports="wake"},44594:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={ADDED_TO_SCENE:e(69830),BOOT:e(7919),CREATE:e(46763),DESTROY:e(11763),PAUSE:e(71555),POST_UPDATE:e(36735),PRE_RENDER:e(3809),PRE_UPDATE:e(90716),READY:e(58262),REMOVED_FROM_SCENE:e(91633),RENDER:e(10319),RESUME:e(87132),SHUTDOWN:e(81961),SLEEP:e(90194),START:e(6265),TRANSITION_COMPLETE:e(33178),TRANSITION_INIT:e(43063),TRANSITION_OUT:e(11259),TRANSITION_START:e(61611),TRANSITION_WAKE:e(45209),UPDATE:e(22966),WAKE:e(21747)}},62194:(s,y,e)=>{/** + */s.exports={ADDED_TO_SCENE:e(69830),BOOT:e(7919),CREATE:e(46763),DESTROY:e(11763),PAUSE:e(71555),POST_UPDATE:e(36735),PRE_RENDER:e(3809),PRE_UPDATE:e(90716),READY:e(58262),REMOVED_FROM_SCENE:e(91633),RENDER:e(10319),RESUME:e(87132),SHUTDOWN:e(81961),SLEEP:e(90194),START:e(6265),TRANSITION_COMPLETE:e(33178),TRANSITION_INIT:e(43063),TRANSITION_OUT:e(11259),TRANSITION_START:e(61611),TRANSITION_WAKE:e(45209),UPDATE:e(22966),WAKE:e(21747)}},62194:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(89993),d=e(79291),h={Events:e(44594),GetPhysicsPlugins:e(27397),GetScenePlugins:e(52106),SceneManager:e(60903),ScenePlugin:e(52209),Settings:e(55681),Systems:e(2368)};h=d(!1,h,r),s.exports=h},30341:(s,y,e)=>{/** + */var r=e(89993),d=e(79291),h={Events:e(44594),GetPhysicsPlugins:e(27397),GetScenePlugins:e(52106),SceneManager:e(60903),ScenePlugin:e(52209),Settings:e(55681),Systems:e(2368)};h=d(!1,h,r),s.exports=h},30341:(s,x,e)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(50792),h=e(14463),a=e(79291),l=e(29747),n=new r({Extends:d,initialize:function(f,o,c){d.call(this),this.manager=f,this.key=o,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=a(this.config,c),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(u){return!u||!u.name||typeof u.name!="string"?!1:this.markers[u.name]?(console.error("addMarker "+u.name+" already exists in Sound"),!1):(u=a(!0,{name:"",start:0,duration:this.totalDuration-(u.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},u),this.markers[u.name]=u,!0)},updateMarker:function(u){return!u||!u.name||typeof u.name!="string"?!1:this.markers[u.name]?(this.markers[u.name]=a(!0,this.markers[u.name],u),!0):(console.warn("Audio Marker: "+u.name+" missing in Sound: "+this.key),!1)},removeMarker:function(u){var f=this.markers[u];return f?(this.markers[u]=null,f):null},play:function(u,f){if(u===void 0&&(u=""),typeof u=="object"&&(f=u,u=""),typeof u!="string")return!1;if(!u)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[u])return console.warn("Marker: "+u+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[u],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=a(this.currentConfig,f),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return this.isPaused||!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!this.isPaused||this.isPlaying?!1:(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!this.isPaused&&!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:l,calculateRate:function(){var u=1.0005777895065548,f=this.currentConfig.detune+this.manager.detune,o=Math.pow(u,f);this.totalRate=this.currentConfig.rate*this.manager.rate*o},destroy:function(){this.pendingRemove||(this.stop(),this.emit(h.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});s.exports=n},85034:(s,y,e)=>{/** + */var r=e(83419),d=e(50792),h=e(14463),a=e(79291),l=e(29747),n=new r({Extends:d,initialize:function(f,o,c){d.call(this),this.manager=f,this.key=o,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=a(this.config,c),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(u){return!u||!u.name||typeof u.name!="string"?!1:this.markers[u.name]?(console.error("addMarker "+u.name+" already exists in Sound"),!1):(u=a(!0,{name:"",start:0,duration:this.totalDuration-(u.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},u),this.markers[u.name]=u,!0)},updateMarker:function(u){return!u||!u.name||typeof u.name!="string"?!1:this.markers[u.name]?(this.markers[u.name]=a(!0,this.markers[u.name],u),!0):(console.warn("Audio Marker: "+u.name+" missing in Sound: "+this.key),!1)},removeMarker:function(u){var f=this.markers[u];return f?(this.markers[u]=null,f):null},play:function(u,f){if(u===void 0&&(u=""),typeof u=="object"&&(f=u,u=""),typeof u!="string")return!1;if(!u)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[u])return console.warn("Marker: "+u+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[u],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=a(this.currentConfig,f),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return this.isPaused||!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!this.isPaused||this.isPlaying?!1:(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!this.isPaused&&!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:l,calculateRate:function(){var u=1.0005777895065548,f=this.currentConfig.detune+this.manager.detune,o=Math.pow(u,f);this.totalRate=this.currentConfig.rate*this.manager.rate*o},destroy:function(){this.pendingRemove||(this.stop(),this.emit(h.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});s.exports=n},85034:(s,x,e)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(41786),h=e(50792),a=e(14463),l=e(8443),n=e(46710),u=e(58731),f=e(29747),o=e(26099),c=new r({Extends:h,initialize:function(v){h.call(this),this.game=v,this.jsonCache=v.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new o,v.events.on(l.BLUR,this.onGameBlur,this),v.events.on(l.FOCUS,this.onGameFocus,this),v.events.on(l.PRE_STEP,this.update,this),v.events.once(l.DESTROY,this.destroy,this)},add:f,addAudioSprite:function(p,v){v===void 0&&(v={});var m=this.add(p,v);m.spritemap=this.jsonCache.get(p).spritemap;for(var S in m.spritemap)if(m.spritemap.hasOwnProperty(S)){var M=d(v),w=m.spritemap[S];M.loop=w.hasOwnProperty("loop")?w.loop:!1,m.addMarker({name:S,start:w.start,duration:w.end-w.start,config:M})}return m},get:function(p){return u(this.sounds,"key",p)},getAll:function(p){return p?n(this.sounds,"key",p):n(this.sounds)},getAllPlaying:function(){return n(this.sounds,"isPlaying",!0)},play:function(p,v){var m=this.add(p);return m.once(a.COMPLETE,m.destroy,m),v?v.name?(m.addMarker(v),m.play(v.name)):m.play(v):m.play()},playAudioSprite:function(p,v,m){var S=this.addAudioSprite(p);return S.once(a.COMPLETE,S.destroy,S),S.play(v,m)},remove:function(p){var v=this.sounds.indexOf(p);return v!==-1?(p.destroy(),this.sounds.splice(v,1),!0):!1},removeAll:function(){this.sounds.forEach(function(p){p.destroy()}),this.sounds.length=0},removeByKey:function(p){for(var v=0,m=this.sounds.length-1;m>=0;m--){var S=this.sounds[m];S.key===p&&(S.destroy(),this.sounds.splice(m,1),v++)}return v},pauseAll:function(){this.forEachActiveSound(function(p){p.pause()}),this.emit(a.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(p){p.resume()}),this.emit(a.RESUME_ALL,this)},setListenerPosition:f,stopAll:function(){this.forEachActiveSound(function(p){p.stop()}),this.emit(a.STOP_ALL,this)},stopByKey:function(p){var v=0;return this.getAll(p).forEach(function(m){m.stop()&&v++}),v},unlock:f,onBlur:f,onFocus:f,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(p,v){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(a.UNLOCKED,this));for(var m=this.sounds.length-1;m>=0;m--)this.sounds[m].pendingRemove&&this.sounds.splice(m,1);this.sounds.forEach(function(S){S.update(p,v)})},destroy:function(){this.game.events.off(l.BLUR,this.onGameBlur,this),this.game.events.off(l.FOCUS,this.onGameFocus,this),this.game.events.off(l.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(p,v){var m=this;this.sounds.forEach(function(S,M){S&&!S.pendingRemove&&p.call(v||m,S,M,m.sounds)})},setRate:function(p){return this.rate=p,this},rate:{get:function(){return this._rate},set:function(p){this._rate=p,this.forEachActiveSound(function(v){v.calculateRate()}),this.emit(a.GLOBAL_RATE,this,p)}},setDetune:function(p){return this.detune=p,this},detune:{get:function(){return this._detune},set:function(p){this._detune=p,this.forEachActiveSound(function(v){v.calculateRate()}),this.emit(a.GLOBAL_DETUNE,this,p)}}});s.exports=c},14747:(s,y,e)=>{/** + */var r=e(83419),d=e(41786),h=e(50792),a=e(14463),l=e(8443),n=e(46710),u=e(58731),f=e(29747),o=e(26099),c=new r({Extends:h,initialize:function(v){h.call(this),this.game=v,this.jsonCache=v.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new o,v.events.on(l.BLUR,this.onGameBlur,this),v.events.on(l.FOCUS,this.onGameFocus,this),v.events.on(l.PRE_STEP,this.update,this),v.events.once(l.DESTROY,this.destroy,this)},add:f,addAudioSprite:function(p,v){v===void 0&&(v={});var m=this.add(p,v);m.spritemap=this.jsonCache.get(p).spritemap;for(var S in m.spritemap)if(m.spritemap.hasOwnProperty(S)){var M=d(v),w=m.spritemap[S];M.loop=w.hasOwnProperty("loop")?w.loop:!1,m.addMarker({name:S,start:w.start,duration:w.end-w.start,config:M})}return m},get:function(p){return u(this.sounds,"key",p)},getAll:function(p){return p?n(this.sounds,"key",p):n(this.sounds)},getAllPlaying:function(){return n(this.sounds,"isPlaying",!0)},play:function(p,v){var m=this.add(p);return m.once(a.COMPLETE,m.destroy,m),v?v.name?(m.addMarker(v),m.play(v.name)):m.play(v):m.play()},playAudioSprite:function(p,v,m){var S=this.addAudioSprite(p);return S.once(a.COMPLETE,S.destroy,S),S.play(v,m)},remove:function(p){var v=this.sounds.indexOf(p);return v!==-1?(p.destroy(),this.sounds.splice(v,1),!0):!1},removeAll:function(){this.sounds.forEach(function(p){p.destroy()}),this.sounds.length=0},removeByKey:function(p){for(var v=0,m=this.sounds.length-1;m>=0;m--){var S=this.sounds[m];S.key===p&&(S.destroy(),this.sounds.splice(m,1),v++)}return v},pauseAll:function(){this.forEachActiveSound(function(p){p.pause()}),this.emit(a.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(p){p.resume()}),this.emit(a.RESUME_ALL,this)},setListenerPosition:f,stopAll:function(){this.forEachActiveSound(function(p){p.stop()}),this.emit(a.STOP_ALL,this)},stopByKey:function(p){var v=0;return this.getAll(p).forEach(function(m){m.stop()&&v++}),v},unlock:f,onBlur:f,onFocus:f,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(p,v){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(a.UNLOCKED,this));for(var m=this.sounds.length-1;m>=0;m--)this.sounds[m].pendingRemove&&this.sounds.splice(m,1);this.sounds.forEach(function(S){S.update(p,v)})},destroy:function(){this.game.events.off(l.BLUR,this.onGameBlur,this),this.game.events.off(l.FOCUS,this.onGameFocus,this),this.game.events.off(l.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(p,v){var m=this;this.sounds.forEach(function(S,M){S&&!S.pendingRemove&&p.call(v||m,S,M,m.sounds)})},setRate:function(p){return this.rate=p,this},rate:{get:function(){return this._rate},set:function(p){this._rate=p,this.forEachActiveSound(function(v){v.calculateRate()}),this.emit(a.GLOBAL_RATE,this,p)}},setDetune:function(p){return this.detune=p,this},detune:{get:function(){return this._detune},set:function(p){this._detune=p,this.forEachActiveSound(function(v){v.calculateRate()}),this.emit(a.GLOBAL_DETUNE,this,p)}}});s.exports=c},14747:(s,x,e)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. @@ -5245,67 +5245,67 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="volume"},14463:(s,y,e)=>{/** + */s.exports="volume"},14463:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={COMPLETE:e(19723),DECODED:e(57506),DECODED_ALL:e(98882),DESTROY:e(73146),DETUNE:e(11305),GLOBAL_DETUNE:e(40577),GLOBAL_MUTE:e(30333),GLOBAL_RATE:e(20394),GLOBAL_VOLUME:e(21802),LOOP:e(99190),LOOPED:e(1299),MUTE:e(97125),PAN:e(89259),PAUSE_ALL:e(79986),PAUSE:e(17586),PLAY:e(19618),RATE:e(42306),RESUME_ALL:e(10387),RESUME:e(48959),SEEK:e(9960),STOP_ALL:e(19180),STOP:e(98328),UNLOCKED:e(50401),VOLUME:e(52498)}},64895:(s,y,e)=>{/** + */s.exports={COMPLETE:e(19723),DECODED:e(57506),DECODED_ALL:e(98882),DESTROY:e(73146),DETUNE:e(11305),GLOBAL_DETUNE:e(40577),GLOBAL_MUTE:e(30333),GLOBAL_RATE:e(20394),GLOBAL_VOLUME:e(21802),LOOP:e(99190),LOOPED:e(1299),MUTE:e(97125),PAN:e(89259),PAUSE_ALL:e(79986),PAUSE:e(17586),PLAY:e(19618),RATE:e(42306),RESUME_ALL:e(10387),RESUME:e(48959),SEEK:e(9960),STOP_ALL:e(19180),STOP:e(98328),UNLOCKED:e(50401),VOLUME:e(52498)}},64895:(s,x,e)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(30341),d=e(83419),h=e(14463),a=e(45319),l=new d({Extends:r,initialize:function(u,f,o){if(o===void 0&&(o={}),this.tags=u.game.cache.audio.get(f),!this.tags)throw new Error('No cached audio asset with key "'+f);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,r.call(this,u,f,o)},play:function(n,u){return this.manager.isLocked(this,"play",[n,u])||!r.prototype.play.call(this,n,u)||!this.pickAndPlayAudioTag()?!1:(this.emit(h.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!r.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(h.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!r.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(h.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!r.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(h.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var n=this.currentConfig.seek,u=this.currentConfig.delay,f=(this.currentMarker?this.currentMarker.start:0)+n;return this.previousTime=f,this.audio.currentTime=f,this.applyConfig(),u===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+u*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var n=0;n0){this.startTime=f-this.manager.loopEndOffset?(this.audio.currentTime=u+Math.max(0,o-f),o=this.audio.currentTime):o=f){this.reset(),this.stopAndReleaseAudioTag(),this.emit(h.COMPLETE,this);return}this.previousTime=o}},destroy:function(){r.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=a(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){r.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(n){this.currentConfig.mute=n,!this.manager.isLocked(this,"mute",n)&&(this.updateMute(),this.emit(h.MUTE,this,n))}},setMute:function(n){return this.mute=n,this},volume:{get:function(){return this.currentConfig.volume},set:function(n){this.currentConfig.volume=n,!this.manager.isLocked(this,"volume",n)&&(this.updateVolume(),this.emit(h.VOLUME,this,n))}},setVolume:function(n){return this.volume=n,this},rate:{get:function(){return this.currentConfig.rate},set:function(n){this.currentConfig.rate=n,!this.manager.isLocked(this,h.RATE,n)&&(this.calculateRate(),this.emit(h.RATE,this,n))}},setRate:function(n){return this.rate=n,this},detune:{get:function(){return this.currentConfig.detune},set:function(n){this.currentConfig.detune=n,!this.manager.isLocked(this,h.DETUNE,n)&&(this.calculateRate(),this.emit(h.DETUNE,this,n))}},setDetune:function(n){return this.detune=n,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(n){this.manager.isLocked(this,"seek",n)||this.startTime>0||(this.isPlaying||this.isPaused)&&(n=Math.min(Math.max(0,n),this.duration),this.isPlaying?(this.previousTime=n,this.audio.currentTime=n):this.isPaused&&(this.currentConfig.seek=n),this.emit(h.SEEK,this,n))}},setSeek:function(n){return this.seek=n,this},loop:{get:function(){return this.currentConfig.loop},set:function(n){this.currentConfig.loop=n,!this.manager.isLocked(this,"loop",n)&&(this.audio&&(this.audio.loop=n),this.emit(h.LOOP,this,n))}},setLoop:function(n){return this.loop=n,this},pan:{get:function(){return this.currentConfig.pan},set:function(n){this.currentConfig.pan=n,this.emit(h.PAN,this,n)}},setPan:function(n){return this.pan=n,this}});s.exports=l},33684:(s,y,e)=>{/** + */var r=e(30341),d=e(83419),h=e(14463),a=e(45319),l=new d({Extends:r,initialize:function(u,f,o){if(o===void 0&&(o={}),this.tags=u.game.cache.audio.get(f),!this.tags)throw new Error('No cached audio asset with key "'+f);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,r.call(this,u,f,o)},play:function(n,u){return this.manager.isLocked(this,"play",[n,u])||!r.prototype.play.call(this,n,u)||!this.pickAndPlayAudioTag()?!1:(this.emit(h.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!r.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(h.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!r.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(h.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!r.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(h.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var n=this.currentConfig.seek,u=this.currentConfig.delay,f=(this.currentMarker?this.currentMarker.start:0)+n;return this.previousTime=f,this.audio.currentTime=f,this.applyConfig(),u===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+u*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var n=0;n0){this.startTime=f-this.manager.loopEndOffset?(this.audio.currentTime=u+Math.max(0,o-f),o=this.audio.currentTime):o=f){this.reset(),this.stopAndReleaseAudioTag(),this.emit(h.COMPLETE,this);return}this.previousTime=o}},destroy:function(){r.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=a(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){r.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(n){this.currentConfig.mute=n,!this.manager.isLocked(this,"mute",n)&&(this.updateMute(),this.emit(h.MUTE,this,n))}},setMute:function(n){return this.mute=n,this},volume:{get:function(){return this.currentConfig.volume},set:function(n){this.currentConfig.volume=n,!this.manager.isLocked(this,"volume",n)&&(this.updateVolume(),this.emit(h.VOLUME,this,n))}},setVolume:function(n){return this.volume=n,this},rate:{get:function(){return this.currentConfig.rate},set:function(n){this.currentConfig.rate=n,!this.manager.isLocked(this,h.RATE,n)&&(this.calculateRate(),this.emit(h.RATE,this,n))}},setRate:function(n){return this.rate=n,this},detune:{get:function(){return this.currentConfig.detune},set:function(n){this.currentConfig.detune=n,!this.manager.isLocked(this,h.DETUNE,n)&&(this.calculateRate(),this.emit(h.DETUNE,this,n))}},setDetune:function(n){return this.detune=n,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(n){this.manager.isLocked(this,"seek",n)||this.startTime>0||(this.isPlaying||this.isPaused)&&(n=Math.min(Math.max(0,n),this.duration),this.isPlaying?(this.previousTime=n,this.audio.currentTime=n):this.isPaused&&(this.currentConfig.seek=n),this.emit(h.SEEK,this,n))}},setSeek:function(n){return this.seek=n,this},loop:{get:function(){return this.currentConfig.loop},set:function(n){this.currentConfig.loop=n,!this.manager.isLocked(this,"loop",n)&&(this.audio&&(this.audio.loop=n),this.emit(h.LOOP,this,n))}},setLoop:function(n){return this.loop=n,this},pan:{get:function(){return this.currentConfig.pan},set:function(n){this.currentConfig.pan=n,this.emit(h.PAN,this,n)}},setPan:function(n){return this.pan=n,this}});s.exports=l},33684:(s,x,e)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(85034),d=e(83419),h=e(14463),a=e(64895),l=new d({Extends:r,initialize:function(u){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,r.call(this,u)},add:function(n,u){var f=new a(this,n,u);return this.sounds.push(f),f},unlock:function(){this.locked=!1;var n=this;if(this.game.cache.audio.entries.each(function(c,p){for(var v=0;v{/** + */var r=e(85034),d=e(83419),h=e(14463),a=e(64895),l=new d({Extends:r,initialize:function(u){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,r.call(this,u)},add:function(n,u){var f=new a(this,n,u);return this.sounds.push(f),f},unlock:function(){this.locked=!1;var n=this;if(this.game.cache.audio.entries.each(function(c,p){for(var v=0;v{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={SoundManagerCreator:e(14747),Events:e(14463),BaseSound:e(30341),BaseSoundManager:e(85034),WebAudioSound:e(71741),WebAudioSoundManager:e(57490),HTML5AudioSound:e(64895),HTML5AudioSoundManager:e(33684),NoAudioSound:e(4603),NoAudioSoundManager:e(25960)}},4603:(s,y,e)=>{/** + */s.exports={SoundManagerCreator:e(14747),Events:e(14463),BaseSound:e(30341),BaseSoundManager:e(85034),WebAudioSound:e(71741),WebAudioSoundManager:e(57490),HTML5AudioSound:e(64895),HTML5AudioSoundManager:e(33684),NoAudioSound:e(4603),NoAudioSoundManager:e(25960)}},4603:(s,x,e)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(30341),d=e(83419),h=e(50792),a=e(79291),l=e(29747),n=function(){return!1},u=function(){return null},f=function(){return this},o=new d({Extends:h,initialize:function(p,v,m){m===void 0&&(m={}),h.call(this),this.manager=p,this.key=v,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=a({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},m),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:n,updateMarker:n,removeMarker:u,play:n,pause:n,resume:n,stop:n,setMute:f,setVolume:f,setRate:f,setDetune:f,setSeek:f,setLoop:f,setPan:f,applyConfig:u,resetConfig:u,update:l,calculateRate:u,destroy:function(){r.prototype.destroy.call(this)}});s.exports=o},25960:(s,y,e)=>{/** + */var r=e(30341),d=e(83419),h=e(50792),a=e(79291),l=e(29747),n=function(){return!1},u=function(){return null},f=function(){return this},o=new d({Extends:h,initialize:function(p,v,m){m===void 0&&(m={}),h.call(this),this.manager=p,this.key=v,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=a({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},m),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:n,updateMarker:n,removeMarker:u,play:n,pause:n,resume:n,stop:n,setMute:f,setVolume:f,setRate:f,setDetune:f,setSeek:f,setLoop:f,setPan:f,applyConfig:u,resetConfig:u,update:l,calculateRate:u,destroy:function(){r.prototype.destroy.call(this)}});s.exports=o},25960:(s,x,e)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(85034),d=e(83419),h=e(50792),a=e(4603),l=e(29747),n=new d({Extends:h,initialize:function(f){h.call(this),this.game=f,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(u,f){var o=new a(this,u,f);return this.sounds.push(o),o},addAudioSprite:function(u,f){var o=this.add(u,f);return o.spritemap={},o},get:function(u){return r.prototype.get.call(this,u)},getAll:function(u){return r.prototype.getAll.call(this,u)},play:function(u,f){return!1},playAudioSprite:function(u,f,o){return!1},remove:function(u){return r.prototype.remove.call(this,u)},removeAll:function(){return r.prototype.removeAll.call(this)},removeByKey:function(u){return r.prototype.removeByKey.call(this,u)},stopByKey:function(u){return r.prototype.stopByKey.call(this,u)},onBlur:l,onFocus:l,onGameBlur:l,onGameFocus:l,pauseAll:l,resumeAll:l,stopAll:l,update:l,setRate:l,setDetune:l,setMute:l,setVolume:l,unlock:l,forEachActiveSound:function(u,f){r.prototype.forEachActiveSound.call(this,u,f)},destroy:function(){r.prototype.destroy.call(this)}});s.exports=n},71741:(s,y,e)=>{/** + */var r=e(85034),d=e(83419),h=e(50792),a=e(4603),l=e(29747),n=new d({Extends:h,initialize:function(f){h.call(this),this.game=f,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(u,f){var o=new a(this,u,f);return this.sounds.push(o),o},addAudioSprite:function(u,f){var o=this.add(u,f);return o.spritemap={},o},get:function(u){return r.prototype.get.call(this,u)},getAll:function(u){return r.prototype.getAll.call(this,u)},play:function(u,f){return!1},playAudioSprite:function(u,f,o){return!1},remove:function(u){return r.prototype.remove.call(this,u)},removeAll:function(){return r.prototype.removeAll.call(this)},removeByKey:function(u){return r.prototype.removeByKey.call(this,u)},stopByKey:function(u){return r.prototype.stopByKey.call(this,u)},onBlur:l,onFocus:l,onGameBlur:l,onGameFocus:l,pauseAll:l,resumeAll:l,stopAll:l,update:l,setRate:l,setDetune:l,setMute:l,setVolume:l,unlock:l,forEachActiveSound:function(u,f){r.prototype.forEachActiveSound.call(this,u,f)},destroy:function(){r.prototype.destroy.call(this)}});s.exports=n},71741:(s,x,e)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(30341),d=e(83419),h=e(14463),a=e(95540),l=new d({Extends:r,initialize:function(u,f,o){if(o===void 0&&(o={}),this.audioBuffer=u.game.cache.audio.get(f),!this.audioBuffer)throw new Error('Audio key "'+f+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=u.context.createGain(),this.volumeNode=u.context.createGain(),this.pannerNode=null,this.spatialNode=null,this.spatialSource=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),u.context.createPanner&&(this.spatialNode=u.context.createPanner(),this.volumeNode.connect(this.spatialNode)),u.context.createStereoPanner?(this.pannerNode=u.context.createStereoPanner(),u.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(u.destination)):u.context.createPanner?this.spatialNode.connect(u.destination):this.volumeNode.connect(u.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,r.call(this,u,f,o)},play:function(n,u){return r.prototype.play.call(this,n,u)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(h.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime{/** + */var r=e(30341),d=e(83419),h=e(14463),a=e(95540),l=new d({Extends:r,initialize:function(u,f,o){if(o===void 0&&(o={}),this.audioBuffer=u.game.cache.audio.get(f),!this.audioBuffer)throw new Error('Audio key "'+f+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=u.context.createGain(),this.volumeNode=u.context.createGain(),this.pannerNode=null,this.spatialNode=null,this.spatialSource=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),u.context.createPanner&&(this.spatialNode=u.context.createPanner(),this.volumeNode.connect(this.spatialNode)),u.context.createStereoPanner?(this.pannerNode=u.context.createStereoPanner(),u.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(u.destination)):u.context.createPanner?this.spatialNode.connect(u.destination):this.volumeNode.connect(u.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,r.call(this,u,f,o)},play:function(n,u){return r.prototype.play.call(this,n,u)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(h.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(53134),d=e(85034),h=e(83419),a=e(14463),l=e(8443),n=e(71741),u=e(95540),f=new h({Extends:d,initialize:function(c){this.context=this.createAudioContext(c),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),d.call(this,c),this.locked&&c.isBooted?this.unlock():c.events.once(l.BOOT,this.unlock,this)},createAudioContext:function(o){var c=o.config.audio;if(c.context)return c.context.resume(),c.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(o){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=o,this.masterMuteNode=o.createGain(),this.masterVolumeNode=o.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(o.destination),this.destination=this.masterMuteNode,this},add:function(o,c){var p=new n(this,o,c);return this.sounds.push(p),p},decodeAudio:function(o,c){var p;Array.isArray(o)?p=o:p=[{key:o,data:c}];for(var v=this.game.cache.audio,m=p.length,S=0;S{/** + */var r=e(53134),d=e(85034),h=e(83419),a=e(14463),l=e(8443),n=e(71741),u=e(95540),f=new h({Extends:d,initialize:function(c){this.context=this.createAudioContext(c),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),d.call(this,c),this.locked&&c.isBooted?this.unlock():c.events.once(l.BOOT,this.unlock,this)},createAudioContext:function(o){var c=o.config.audio;if(c.context)return c.context.resume(),c.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(o){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=o,this.masterMuteNode=o.createGain(),this.masterVolumeNode=o.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(o.destination),this.destination=this.masterMuteNode,this},add:function(o,c){var p=new n(this,o,c);return this.sounds.push(p),p},decodeAudio:function(o,c){var p;Array.isArray(o)?p=o:p=[{key:o,data:c}];for(var v=this.game.cache.audio,m=p.length,S=0;S{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(37105),d=e(83419),h=e(29747),a=e(19186),l=new d({initialize:function(u){this.parent=u,this.list=[],this.position=0,this.addCallback=h,this.removeCallback=h,this._sortKey=""},add:function(n,u){return u?r.Add(this.list,n):r.Add(this.list,n,0,this.addCallback,this)},addAt:function(n,u,f){return f?r.AddAt(this.list,n,u):r.AddAt(this.list,n,u,0,this.addCallback,this)},getAt:function(n){return this.list[n]},getIndex:function(n){return this.list.indexOf(n)},sort:function(n,u){return n?(u===void 0&&(u=function(f,o){return f[n]-o[n]}),a(this.list,u),this):this},getByName:function(n){return r.GetFirst(this.list,"name",n)},getRandom:function(n,u){return r.GetRandom(this.list,n,u)},getFirst:function(n,u,f,o){return r.GetFirst(this.list,n,u,f,o)},getAll:function(n,u,f,o){return r.GetAll(this.list,n,u,f,o)},count:function(n,u){return r.CountAllMatching(this.list,n,u)},swap:function(n,u){r.Swap(this.list,n,u)},moveTo:function(n,u){return r.MoveTo(this.list,n,u)},moveAbove:function(n,u){return r.MoveAbove(this.list,n,u)},moveBelow:function(n,u){return r.MoveBelow(this.list,n,u)},remove:function(n,u){return u?r.Remove(this.list,n):r.Remove(this.list,n,this.removeCallback,this)},removeAt:function(n,u){return u?r.RemoveAt(this.list,n):r.RemoveAt(this.list,n,this.removeCallback,this)},removeBetween:function(n,u,f){return f?r.RemoveBetween(this.list,n,u):r.RemoveBetween(this.list,n,u,this.removeCallback,this)},removeAll:function(n){for(var u=this.list.length;u--;)this.remove(this.list[u],n);return this},bringToTop:function(n){return r.BringToTop(this.list,n)},sendToBack:function(n){return r.SendToBack(this.list,n)},moveUp:function(n){return r.MoveUp(this.list,n),n},moveDown:function(n){return r.MoveDown(this.list,n),n},reverse:function(){return this.list.reverse(),this},shuffle:function(){return r.Shuffle(this.list),this},replace:function(n,u){return r.Replace(this.list,n,u)},exists:function(n){return this.list.indexOf(n)>-1},setAll:function(n,u,f,o){return r.SetAll(this.list,n,u,f,o),this},each:function(n,u){for(var f=[null],o=2;o0?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}}});s.exports=l},90330:(s,y,e)=>{/** + */var r=e(37105),d=e(83419),h=e(29747),a=e(19186),l=new d({initialize:function(u){this.parent=u,this.list=[],this.position=0,this.addCallback=h,this.removeCallback=h,this._sortKey=""},add:function(n,u){return u?r.Add(this.list,n):r.Add(this.list,n,0,this.addCallback,this)},addAt:function(n,u,f){return f?r.AddAt(this.list,n,u):r.AddAt(this.list,n,u,0,this.addCallback,this)},getAt:function(n){return this.list[n]},getIndex:function(n){return this.list.indexOf(n)},sort:function(n,u){return n?(u===void 0&&(u=function(f,o){return f[n]-o[n]}),a(this.list,u),this):this},getByName:function(n){return r.GetFirst(this.list,"name",n)},getRandom:function(n,u){return r.GetRandom(this.list,n,u)},getFirst:function(n,u,f,o){return r.GetFirst(this.list,n,u,f,o)},getAll:function(n,u,f,o){return r.GetAll(this.list,n,u,f,o)},count:function(n,u){return r.CountAllMatching(this.list,n,u)},swap:function(n,u){r.Swap(this.list,n,u)},moveTo:function(n,u){return r.MoveTo(this.list,n,u)},moveAbove:function(n,u){return r.MoveAbove(this.list,n,u)},moveBelow:function(n,u){return r.MoveBelow(this.list,n,u)},remove:function(n,u){return u?r.Remove(this.list,n):r.Remove(this.list,n,this.removeCallback,this)},removeAt:function(n,u){return u?r.RemoveAt(this.list,n):r.RemoveAt(this.list,n,this.removeCallback,this)},removeBetween:function(n,u,f){return f?r.RemoveBetween(this.list,n,u):r.RemoveBetween(this.list,n,u,this.removeCallback,this)},removeAll:function(n){for(var u=this.list.length;u--;)this.remove(this.list[u],n);return this},bringToTop:function(n){return r.BringToTop(this.list,n)},sendToBack:function(n){return r.SendToBack(this.list,n)},moveUp:function(n){return r.MoveUp(this.list,n),n},moveDown:function(n){return r.MoveDown(this.list,n),n},reverse:function(){return this.list.reverse(),this},shuffle:function(){return r.Shuffle(this.list),this},replace:function(n,u){return r.Replace(this.list,n,u)},exists:function(n){return this.list.indexOf(n)>-1},setAll:function(n,u,f,o){return r.SetAll(this.list,n,u,f,o),this},each:function(n,u){for(var f=[null],o=2;o0?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}}});s.exports=l},90330:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a){this.entries={},this.size=0,this.setAll(a)},setAll:function(h){if(Array.isArray(h))for(var a=0;a{/** + */var r=e(83419),d=new r({initialize:function(a){this.entries={},this.size=0,this.setAll(a)},setAll:function(h){if(Array.isArray(h))for(var a=0;a{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(50792),h=e(82348),a=new r({Extends:d,initialize:function(){d.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(l){return this._active.indexOf(l)>-1},isPending:function(l){return this._toProcess>0&&this._pending.indexOf(l)>-1},isDestroying:function(l){return this._destroy.indexOf(l)>-1},add:function(l){return this.checkQueue&&this.isActive(l)&&!this.isDestroying(l)||this.isPending(l)||(this._pending.push(l),this._toProcess++),l},remove:function(l){if(this.isPending(l)){var n=this._pending,u=n.indexOf(l);u!==-1&&n.splice(u,1)}else this.isActive(l)&&(this._destroy.push(l),this._toProcess++);return l},removeAll:function(){for(var l=this._active,n=this._destroy,u=l.length;u--;)n.push(l[u]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var l=this._destroy,n=this._active,u,f;for(u=0;u{/** + */var r=e(83419),d=e(50792),h=e(82348),a=new r({Extends:d,initialize:function(){d.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(l){return this._active.indexOf(l)>-1},isPending:function(l){return this._toProcess>0&&this._pending.indexOf(l)>-1},isDestroying:function(l){return this._destroy.indexOf(l)>-1},add:function(l){return this.checkQueue&&this.isActive(l)&&!this.isDestroying(l)||this.isPending(l)||(this._pending.push(l),this._toProcess++),l},remove:function(l){if(this.isPending(l)){var n=this._pending,u=n.indexOf(l);u!==-1&&n.splice(u,1)}else this.isActive(l)&&(this._destroy.push(l),this._toProcess++);return l},removeAll:function(){for(var l=this._active,n=this._destroy,u=l.length;u--;)n.push(l[u]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var l=this._destroy,n=this._active,u,f;for(u=0;u{/** * @author Vladimir Agafonkin * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(43886);function d(C){if(!(this instanceof d))return new d(C);this._maxEntries=Math.max(4,C||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}d.prototype={all:function(){return this._all(this.data,[])},search:function(C){var A=this.data,P=[],b=this.toBBox;if(!S(C,A))return P;for(var O=[],I,D,B,G;A;){for(I=0,D=A.children.length;I=0&&I[A].children.length>this._maxEntries;)this._split(I,A),A--;this._adjustParentBBoxes(O,I,A)},_split:function(C,A){var P=C[A],b=P.children.length,O=this._minEntries;this._chooseSplitAxis(P,O,b);var I=this._chooseSplitIndex(P,O,b),D=M(P.children.splice(I,P.children.length-I));D.height=P.height,D.leaf=P.leaf,a(P,this.toBBox),a(D,this.toBBox),A?C[A-1].children.push(D):this._splitRoot(P,D)},_splitRoot:function(C,A){this.data=M([C,A]),this.data.height=C.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(C,A,P){var b,O,I,D,B,G,z,X;for(G=z=1/0,b=A;b<=P-A;b++)O=l(C,0,b,this.toBBox),I=l(C,b,P,this.toBBox),D=v(O,I),B=o(O)+o(I),D=A;G--)z=C.children[G],n(D,C.leaf?O(z):z),B+=c(D);return B},_adjustParentBBoxes:function(C,A,P){for(var b=P;b>=0;b--)n(A[b],C)},_condense:function(C){for(var A=C.length-1,P;A>=0;A--)C[A].children.length===0?A>0?(P=C[A-1].children,P.splice(P.indexOf(C[A]),1)):this.clear():a(C[A],this.toBBox)},compareMinX:function(C,A){return C.left-A.left},compareMinY:function(C,A){return C.top-A.top},toBBox:function(C){return{minX:C.left,minY:C.top,maxX:C.right,maxY:C.bottom}}};function h(C,A,P){if(!P)return A.indexOf(C);for(var b=0;b=C.minX&&A.maxY>=C.minY}function M(C){return{children:C,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function w(C,A,P,b,O){for(var I=[A,P],D;I.length;)P=I.pop(),A=I.pop(),!(P-A<=b)&&(D=A+Math.ceil((P-A)/b/2)*b,r(C,D,A,P,O),I.push(A,D,D,P))}s.exports=d},35072:(s,y,e)=>{/** + */var r=e(43886);function d(C){if(!(this instanceof d))return new d(C);this._maxEntries=Math.max(4,C||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}d.prototype={all:function(){return this._all(this.data,[])},search:function(C){var A=this.data,P=[],b=this.toBBox;if(!S(C,A))return P;for(var O=[],I,D,B,G;A;){for(I=0,D=A.children.length;I=0&&I[A].children.length>this._maxEntries;)this._split(I,A),A--;this._adjustParentBBoxes(O,I,A)},_split:function(C,A){var P=C[A],b=P.children.length,O=this._minEntries;this._chooseSplitAxis(P,O,b);var I=this._chooseSplitIndex(P,O,b),D=M(P.children.splice(I,P.children.length-I));D.height=P.height,D.leaf=P.leaf,a(P,this.toBBox),a(D,this.toBBox),A?C[A-1].children.push(D):this._splitRoot(P,D)},_splitRoot:function(C,A){this.data=M([C,A]),this.data.height=C.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(C,A,P){var b,O,I,D,B,G,z,X;for(G=z=1/0,b=A;b<=P-A;b++)O=l(C,0,b,this.toBBox),I=l(C,b,P,this.toBBox),D=v(O,I),B=o(O)+o(I),D=A;G--)z=C.children[G],n(D,C.leaf?O(z):z),B+=c(D);return B},_adjustParentBBoxes:function(C,A,P){for(var b=P;b>=0;b--)n(A[b],C)},_condense:function(C){for(var A=C.length-1,P;A>=0;A--)C[A].children.length===0?A>0?(P=C[A-1].children,P.splice(P.indexOf(C[A]),1)):this.clear():a(C[A],this.toBBox)},compareMinX:function(C,A){return C.left-A.left},compareMinY:function(C,A){return C.top-A.top},toBBox:function(C){return{minX:C.left,minY:C.top,maxX:C.right,maxY:C.bottom}}};function h(C,A,P){if(!P)return A.indexOf(C);for(var b=0;b=C.minX&&A.maxY>=C.minY}function M(C){return{children:C,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function w(C,A,P,b,O){for(var I=[A,P],D;I.length;)P=I.pop(),A=I.pop(),!(P-A<=b)&&(D=A+Math.ceil((P-A)/b/2)*b,r(C,D,A,P,O),I.push(A,D,D,P))}s.exports=d},35072:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a){if(this.entries=[],Array.isArray(a))for(var l=0;l-1&&this.entries.splice(a,1),this},dump:function(){console.group("Set");for(var h=0;h-1},union:function(h){var a=new d;return h.entries.forEach(function(l){a.set(l)}),this.entries.forEach(function(l){a.set(l)}),a},intersect:function(h){var a=new d;return this.entries.forEach(function(l){h.contains(l)&&a.set(l)}),a},difference:function(h){var a=new d;return this.entries.forEach(function(l){h.contains(l)||a.set(l)}),a},size:{get:function(){return this.entries.length},set:function(h){return h{/** + */var r=e(83419),d=new r({initialize:function(a){if(this.entries=[],Array.isArray(a))for(var l=0;l-1&&this.entries.splice(a,1),this},dump:function(){console.group("Set");for(var h=0;h-1},union:function(h){var a=new d;return h.entries.forEach(function(l){a.set(l)}),this.entries.forEach(function(l){a.set(l)}),a},intersect:function(h){var a=new d;return this.entries.forEach(function(l){h.contains(l)&&a.set(l)}),a},difference:function(h){var a=new d;return this.entries.forEach(function(l){h.contains(l)||a.set(l)}),a},size:{get:function(){return this.entries.length},set:function(h){return h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5317,35 +5317,35 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="remove"},82348:(s,y,e)=>{/** + */s.exports="remove"},82348:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={PROCESS_QUEUE_ADD:e(15238),PROCESS_QUEUE_REMOVE:e(56187)}},41392:(s,y,e)=>{/** + */s.exports={PROCESS_QUEUE_ADD:e(15238),PROCESS_QUEUE_REMOVE:e(56187)}},41392:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Events:e(82348),List:e(73162),Map:e(90330),ProcessQueue:e(25774),RTree:e(59542),Set:e(35072),Size:e(86555)}},57382:(s,y,e)=>{/** + */s.exports={Events:e(82348),List:e(73162),Map:e(90330),ProcessQueue:e(25774),RTree:e(59542),Set:e(35072),Size:e(86555)}},57382:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(45319),h=e(40987),a=e(8054),l=e(50030),n=e(79237),u=new r({Extends:n,initialize:function(o,c,p,v,m){n.call(this,o,c,p,v,m),this.add("__BASE",0,0,0,v,m),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=v,this.height=m,this.imageData=this.context.getImageData(0,0,v,m),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===a.WEBGL&&this.refresh(),this},draw:function(f,o,c,p){return p===void 0&&(p=!0),this.context.drawImage(c,f,o),p&&this.update(),this},drawFrame:function(f,o,c,p,v){c===void 0&&(c=0),p===void 0&&(p=0),v===void 0&&(v=!0);var m=this.manager.getFrame(f,o);if(m){var S=m.canvasData,M=m.cutWidth,w=m.cutHeight,C=m.source.resolution;this.context.drawImage(m.source.image,S.x,S.y,M,w,c,p,M/C,w/C),v&&this.update()}return this},setPixel:function(f,o,c,p,v,m){m===void 0&&(m=255),f=Math.abs(Math.floor(f)),o=Math.abs(Math.floor(o));var S=this.getIndex(f,o);if(S>-1){var M=this.context.getImageData(f,o,1,1);M.data[0]=c,M.data[1]=p,M.data[2]=v,M.data[3]=m,this.context.putImageData(M,f,o)}return this},putData:function(f,o,c,p,v,m,S){return p===void 0&&(p=0),v===void 0&&(v=0),m===void 0&&(m=f.width),S===void 0&&(S=f.height),this.context.putImageData(f,o,c,p,v,m,S),this},getData:function(f,o,c,p){f=d(Math.floor(f),0,this.width-1),o=d(Math.floor(o),0,this.height-1),c=d(c,1,this.width-f),p=d(p,1,this.height-o);var v=this.context.getImageData(f,o,c,p);return v},getPixel:function(f,o,c){c||(c=new h);var p=this.getIndex(f,o);if(p>-1){var v=this.data,m=v[p+0],S=v[p+1],M=v[p+2],w=v[p+3];c.setTo(m,S,M,w)}return c},getPixels:function(f,o,c,p){f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=this.width),p===void 0&&(p=c),f=Math.abs(Math.round(f)),o=Math.abs(Math.round(o));for(var v=d(f,0,this.width),m=d(f+c,0,this.width),S=d(o,0,this.height),M=d(o+p,0,this.height),w=new h,C=[],A=S;A{/** + */var r=e(83419),d=e(45319),h=e(40987),a=e(8054),l=e(50030),n=e(79237),u=new r({Extends:n,initialize:function(o,c,p,v,m){n.call(this,o,c,p,v,m),this.add("__BASE",0,0,0,v,m),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=v,this.height=m,this.imageData=this.context.getImageData(0,0,v,m),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===a.WEBGL&&this.refresh(),this},draw:function(f,o,c,p){return p===void 0&&(p=!0),this.context.drawImage(c,f,o),p&&this.update(),this},drawFrame:function(f,o,c,p,v){c===void 0&&(c=0),p===void 0&&(p=0),v===void 0&&(v=!0);var m=this.manager.getFrame(f,o);if(m){var S=m.canvasData,M=m.cutWidth,w=m.cutHeight,C=m.source.resolution;this.context.drawImage(m.source.image,S.x,S.y,M,w,c,p,M/C,w/C),v&&this.update()}return this},setPixel:function(f,o,c,p,v,m){m===void 0&&(m=255),f=Math.abs(Math.floor(f)),o=Math.abs(Math.floor(o));var S=this.getIndex(f,o);if(S>-1){var M=this.context.getImageData(f,o,1,1);M.data[0]=c,M.data[1]=p,M.data[2]=v,M.data[3]=m,this.context.putImageData(M,f,o)}return this},putData:function(f,o,c,p,v,m,S){return p===void 0&&(p=0),v===void 0&&(v=0),m===void 0&&(m=f.width),S===void 0&&(S=f.height),this.context.putImageData(f,o,c,p,v,m,S),this},getData:function(f,o,c,p){f=d(Math.floor(f),0,this.width-1),o=d(Math.floor(o),0,this.height-1),c=d(c,1,this.width-f),p=d(p,1,this.height-o);var v=this.context.getImageData(f,o,c,p);return v},getPixel:function(f,o,c){c||(c=new h);var p=this.getIndex(f,o);if(p>-1){var v=this.data,m=v[p+0],S=v[p+1],M=v[p+2],w=v[p+3];c.setTo(m,S,M,w)}return c},getPixels:function(f,o,c,p){f===void 0&&(f=0),o===void 0&&(o=0),c===void 0&&(c=this.width),p===void 0&&(p=c),f=Math.abs(Math.round(f)),o=Math.abs(Math.round(o));for(var v=d(f,0,this.width),m=d(f+c,0,this.width),S=d(o,0,this.height),M=d(o+p,0,this.height),w=new h,C=[],A=S;A{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(10312),d=e(71911),h=e(27919),a=e(83419),l=e(8054),n=e(4327),u=e(95540),f=e(36060),o=e(32302),c=e(79237),p=e(70554),v=new a({Extends:c,initialize:function(S,M,w,C){w===void 0&&(w=256),C===void 0&&(C=256),this.type="DynamicTexture";var A=S.game.renderer,P=A&&A.type===l.CANVAS,b=P?h.create2D(this,w,C):[this];c.call(this,S,M,b,w,C),this.add("__BASE",0,0,0,w,C),this.renderer=A,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=P?b:null,this.context=P?b.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new d(0,0,w,C).setScene(S.game.scene.systemScene,!1),this.renderTarget=P?null:new o(A,w,C,1,0,!1,!0,!0,!1),this.pipeline=P?null:A.pipelines.get(f.SINGLE_PIPELINE),this.setSize(w,C)},setSize:function(m,S){S===void 0&&(S=m);var M=this.get(),w=M.source;if(m!==this.width||S!==this.height){this.canvas&&(this.canvas.width=m,this.canvas.height=S);var C=this.renderTarget;C&&(C.willResize(m,S)&&C.resize(m,S),C.texture!==w.glTexture&&this.renderer.deleteTexture(w.glTexture),this.setFromRenderTarget()),this.camera.setSize(m,S),w.width=m,w.height=S,M.setSize(m,S),this.width=m,this.height=S}else{var A=this.getSourceImage();M.cutX+m>A.width&&(m=A.width-M.cutX),M.cutY+S>A.height&&(S=A.height-M.cutY),M.setSize(m,S,M.cutX,M.cutY)}return this},setFromRenderTarget:function(){var m=this.get(),S=m.source,M=this.renderTarget;return S.isRenderTexture=!0,S.isGLTexture=!0,S.glTexture=M.texture,this},setIsSpriteTexture:function(m){return this.isSpriteTexture=m,this},fill:function(m,S,M,w,C,A){var P=this.camera,b=this.renderer;S===void 0&&(S=1),M===void 0&&(M=0),w===void 0&&(w=0),C===void 0&&(C=this.width),A===void 0&&(A=this.height);var O=m>>16&255,I=m>>8&255,D=m&255,B=this.renderTarget;if(P.preRender(),B){B.bind(!0);var G=this.pipeline.manager.set(this.pipeline),z=b.width/B.width,X=b.height/B.height,j=B.height-(w+A);G.drawFillRect(M*z,j*X,C*z,A*X,p.getTintFromFloats(D/255,I/255,O/255,1),S),B.unbind(!0)}else{var Q=this.context;b.setContext(Q),Q.globalCompositeOperation="source-over",Q.fillStyle="rgba("+O+","+I+","+D+","+S+")",Q.fillRect(M,w,C,A),b.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var m=this.context,S=this.renderTarget;S?S.clear():m&&(m.save(),m.setTransform(1,0,0,1,0,0),m.clearRect(0,0,this.width,this.height),m.restore()),this.dirty=!1}return this},stamp:function(m,S,M,w,C){M===void 0&&(M=0),w===void 0&&(w=0);var A=u(C,"alpha",1),P=u(C,"tint",16777215),b=u(C,"angle",0),O=u(C,"rotation",0),I=u(C,"scale",1),D=u(C,"scaleX",I),B=u(C,"scaleY",I),G=u(C,"originX",.5),z=u(C,"originY",.5),X=u(C,"blendMode",0),j=u(C,"erase",!1),Q=u(C,"skipBatch",!1),tt=this.manager.resetStamp(A,P);return tt.setAngle(0),b!==0?tt.setAngle(b):O!==0&&tt.setRotation(O),tt.setScale(D,B),tt.setTexture(m,S),tt.setOrigin(G,z),tt.setBlendMode(X),j&&(this._eraseMode=!0),Q?this.batchGameObject(tt,M,w):this.draw(tt,M,w),j&&(this._eraseMode=!1),this},erase:function(m,S,M){return this._eraseMode=!0,this.draw(m,S,M),this._eraseMode=!1,this},draw:function(m,S,M,w,C){return this.beginDraw(),this.batchDraw(m,S,M,w,C),this.endDraw(),this},drawFrame:function(m,S,M,w,C,A){return this.beginDraw(),this.batchDrawFrame(m,S,M,w,C,A),this.endDraw(),this},repeat:function(m,S,M,w,C,A,P,b,O){if(M===void 0&&(M=0),w===void 0&&(w=0),C===void 0&&(C=this.width),A===void 0&&(A=this.height),P===void 0&&(P=1),b===void 0&&(b=16777215),O===void 0&&(O=!1),m instanceof n?S=m:S=this.manager.getFrame(m,S),!S)return this;var I=this.manager.resetStamp(P,b);I.setFrame(S),I.setOrigin(0);var D=S.width,B=S.height;C=Math.floor(C),A=Math.floor(A);var G=Math.ceil(C/D),z=Math.ceil(A/B),X=G*D-C,j=z*B-A;X>0&&(X=D-X),j>0&&(j=B-j),M<0&&(G+=Math.ceil(Math.abs(M)/D)),w<0&&(z+=Math.ceil(Math.abs(w)/B));var Q=M,tt=w,Y=!1,Z=this.manager.stampCrop.setTo(0,0,D,B);O||this.beginDraw();for(var U=0;U0&&H===G-1&&(Y=!0,Z.width=X),j>0&&U===z-1&&(Y=!0,Z.height=j),Y&&I.setCrop(Z),this.batchGameObject(I,Q,tt),I.isCropped=!1,Z.setTo(0,0,D,B),Q+=D}Q=M,tt+=B}return O||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var m=this.camera,S=this.renderer,M=this.renderTarget;m.preRender(),M?S.beginCapture(M.width,M.height):S.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(m,S,M,w,C){return Array.isArray(m)||(m=[m]),this.batchList(m,S,M,w,C),this},batchDrawFrame:function(m,S,M,w,C,A){M===void 0&&(M=0),w===void 0&&(w=0),C===void 0&&(C=1),A===void 0&&(A=16777215);var P=this.manager.getFrame(m,S);return P&&(this.renderTarget?this.pipeline.batchTextureFrame(P,M,w,A,C,this.camera.matrix,null):this.batchTextureFrame(P,M,w,C,A)),this},endDraw:function(m){if(m===void 0&&(m=this._eraseMode),this.isDrawing){var S=this.renderer,M=this.renderTarget;if(M){var w=S.endCapture(),C=S.pipelines.setUtility();C.blitFrame(w,M,1,!1,!1,m,this.isSpriteTexture),S.resetScissor(),S.resetViewport()}else S.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(m,S,M,w,C){var A=m.length;if(A!==0)for(var P=0;P0&&O.height>0&&b.drawImage(I,O.x,O.y,O.width,O.height,S,M,O.width,O.height),b.restore()}},snapshotArea:function(m,S,M,w,C,A,P){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,C,!1,m,S,M,w,A,P):this.renderer.snapshotCanvas(this.canvas,C,!1,m,S,M,w,A,P),this},snapshot:function(m,S,M){return this.snapshotArea(0,0,this.width,this.height,m,S,M)},snapshotPixel:function(m,S,M){return this.snapshotArea(m,S,1,1,M,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(m,S,M,w){var C=this.manager.resetStamp();C.setTexture(this),C.setOrigin(0),C.renderWebGL(m,C,M,w)},renderCanvas:function(){},destroy:function(){var m=this.manager.stamp;m&&m.texture===this&&this.manager.resetStamp(),c.prototype.destroy.call(this),h.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});s.exports=v},4327:(s,y,e)=>{/** + */var r=e(10312),d=e(71911),h=e(27919),a=e(83419),l=e(8054),n=e(4327),u=e(95540),f=e(36060),o=e(32302),c=e(79237),p=e(70554),v=new a({Extends:c,initialize:function(S,M,w,C){w===void 0&&(w=256),C===void 0&&(C=256),this.type="DynamicTexture";var A=S.game.renderer,P=A&&A.type===l.CANVAS,b=P?h.create2D(this,w,C):[this];c.call(this,S,M,b,w,C),this.add("__BASE",0,0,0,w,C),this.renderer=A,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=P?b:null,this.context=P?b.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new d(0,0,w,C).setScene(S.game.scene.systemScene,!1),this.renderTarget=P?null:new o(A,w,C,1,0,!1,!0,!0,!1),this.pipeline=P?null:A.pipelines.get(f.SINGLE_PIPELINE),this.setSize(w,C)},setSize:function(m,S){S===void 0&&(S=m);var M=this.get(),w=M.source;if(m!==this.width||S!==this.height){this.canvas&&(this.canvas.width=m,this.canvas.height=S);var C=this.renderTarget;C&&(C.willResize(m,S)&&C.resize(m,S),C.texture!==w.glTexture&&this.renderer.deleteTexture(w.glTexture),this.setFromRenderTarget()),this.camera.setSize(m,S),w.width=m,w.height=S,M.setSize(m,S),this.width=m,this.height=S}else{var A=this.getSourceImage();M.cutX+m>A.width&&(m=A.width-M.cutX),M.cutY+S>A.height&&(S=A.height-M.cutY),M.setSize(m,S,M.cutX,M.cutY)}return this},setFromRenderTarget:function(){var m=this.get(),S=m.source,M=this.renderTarget;return S.isRenderTexture=!0,S.isGLTexture=!0,S.glTexture=M.texture,this},setIsSpriteTexture:function(m){return this.isSpriteTexture=m,this},fill:function(m,S,M,w,C,A){var P=this.camera,b=this.renderer;S===void 0&&(S=1),M===void 0&&(M=0),w===void 0&&(w=0),C===void 0&&(C=this.width),A===void 0&&(A=this.height);var O=m>>16&255,I=m>>8&255,D=m&255,B=this.renderTarget;if(P.preRender(),B){B.bind(!0);var G=this.pipeline.manager.set(this.pipeline),z=b.width/B.width,X=b.height/B.height,j=B.height-(w+A);G.drawFillRect(M*z,j*X,C*z,A*X,p.getTintFromFloats(D/255,I/255,O/255,1),S),B.unbind(!0)}else{var Q=this.context;b.setContext(Q),Q.globalCompositeOperation="source-over",Q.fillStyle="rgba("+O+","+I+","+D+","+S+")",Q.fillRect(M,w,C,A),b.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var m=this.context,S=this.renderTarget;S?S.clear():m&&(m.save(),m.setTransform(1,0,0,1,0,0),m.clearRect(0,0,this.width,this.height),m.restore()),this.dirty=!1}return this},stamp:function(m,S,M,w,C){M===void 0&&(M=0),w===void 0&&(w=0);var A=u(C,"alpha",1),P=u(C,"tint",16777215),b=u(C,"angle",0),O=u(C,"rotation",0),I=u(C,"scale",1),D=u(C,"scaleX",I),B=u(C,"scaleY",I),G=u(C,"originX",.5),z=u(C,"originY",.5),X=u(C,"blendMode",0),j=u(C,"erase",!1),Q=u(C,"skipBatch",!1),tt=this.manager.resetStamp(A,P);return tt.setAngle(0),b!==0?tt.setAngle(b):O!==0&&tt.setRotation(O),tt.setScale(D,B),tt.setTexture(m,S),tt.setOrigin(G,z),tt.setBlendMode(X),j&&(this._eraseMode=!0),Q?this.batchGameObject(tt,M,w):this.draw(tt,M,w),j&&(this._eraseMode=!1),this},erase:function(m,S,M){return this._eraseMode=!0,this.draw(m,S,M),this._eraseMode=!1,this},draw:function(m,S,M,w,C){return this.beginDraw(),this.batchDraw(m,S,M,w,C),this.endDraw(),this},drawFrame:function(m,S,M,w,C,A){return this.beginDraw(),this.batchDrawFrame(m,S,M,w,C,A),this.endDraw(),this},repeat:function(m,S,M,w,C,A,P,b,O){if(M===void 0&&(M=0),w===void 0&&(w=0),C===void 0&&(C=this.width),A===void 0&&(A=this.height),P===void 0&&(P=1),b===void 0&&(b=16777215),O===void 0&&(O=!1),m instanceof n?S=m:S=this.manager.getFrame(m,S),!S)return this;var I=this.manager.resetStamp(P,b);I.setFrame(S),I.setOrigin(0);var D=S.width,B=S.height;C=Math.floor(C),A=Math.floor(A);var G=Math.ceil(C/D),z=Math.ceil(A/B),X=G*D-C,j=z*B-A;X>0&&(X=D-X),j>0&&(j=B-j),M<0&&(G+=Math.ceil(Math.abs(M)/D)),w<0&&(z+=Math.ceil(Math.abs(w)/B));var Q=M,tt=w,Y=!1,$=this.manager.stampCrop.setTo(0,0,D,B);O||this.beginDraw();for(var U=0;U0&&H===G-1&&(Y=!0,$.width=X),j>0&&U===z-1&&(Y=!0,$.height=j),Y&&I.setCrop($),this.batchGameObject(I,Q,tt),I.isCropped=!1,$.setTo(0,0,D,B),Q+=D}Q=M,tt+=B}return O||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var m=this.camera,S=this.renderer,M=this.renderTarget;m.preRender(),M?S.beginCapture(M.width,M.height):S.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(m,S,M,w,C){return Array.isArray(m)||(m=[m]),this.batchList(m,S,M,w,C),this},batchDrawFrame:function(m,S,M,w,C,A){M===void 0&&(M=0),w===void 0&&(w=0),C===void 0&&(C=1),A===void 0&&(A=16777215);var P=this.manager.getFrame(m,S);return P&&(this.renderTarget?this.pipeline.batchTextureFrame(P,M,w,A,C,this.camera.matrix,null):this.batchTextureFrame(P,M,w,C,A)),this},endDraw:function(m){if(m===void 0&&(m=this._eraseMode),this.isDrawing){var S=this.renderer,M=this.renderTarget;if(M){var w=S.endCapture(),C=S.pipelines.setUtility();C.blitFrame(w,M,1,!1,!1,m,this.isSpriteTexture),S.resetScissor(),S.resetViewport()}else S.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(m,S,M,w,C){var A=m.length;if(A!==0)for(var P=0;P0&&O.height>0&&b.drawImage(I,O.x,O.y,O.width,O.height,S,M,O.width,O.height),b.restore()}},snapshotArea:function(m,S,M,w,C,A,P){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,C,!1,m,S,M,w,A,P):this.renderer.snapshotCanvas(this.canvas,C,!1,m,S,M,w,A,P),this},snapshot:function(m,S,M){return this.snapshotArea(0,0,this.width,this.height,m,S,M)},snapshotPixel:function(m,S,M){return this.snapshotArea(m,S,1,1,M,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(m,S,M,w){var C=this.manager.resetStamp();C.setTexture(this),C.setOrigin(0),C.renderWebGL(m,C,M,w)},renderCanvas:function(){},destroy:function(){var m=this.manager.stamp;m&&m.texture===this&&this.manager.resetStamp(),c.prototype.destroy.call(this),h.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});s.exports=v},4327:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(45319),h=e(79291),a=new r({initialize:function(n,u,f,o,c,p,v){this.texture=n,this.name=u,this.source=n.source[f],this.sourceIndex=f,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(p,v,o,c)},setSize:function(l,n,u,f){u===void 0&&(u=0),f===void 0&&(f=0),this.cutX=u,this.cutY=f,this.cutWidth=l,this.cutHeight=n,this.width=l,this.height=n,this.halfWidth=Math.floor(l*.5),this.halfHeight=Math.floor(n*.5),this.centerX=Math.floor(l/2),this.centerY=Math.floor(n/2);var o=this.data,c=o.cut;c.x=u,c.y=f,c.w=l,c.h=n,c.r=u+l,c.b=f+n,o.sourceSize.w=l,o.sourceSize.h=n,o.spriteSourceSize.w=l,o.spriteSourceSize.h=n,o.radius=.5*Math.sqrt(l*l+n*n);var p=o.drawImage;return p.x=u,p.y=f,p.width=l,p.height=n,this.updateUVs()},setTrim:function(l,n,u,f,o,c){var p=this.data,v=p.spriteSourceSize;return p.trim=!0,p.sourceSize.w=l,p.sourceSize.h=n,v.x=u,v.y=f,v.w=o,v.h=c,v.r=u+o,v.b=f+c,this.x=u,this.y=f,this.width=o,this.height=c,this.halfWidth=o*.5,this.halfHeight=c*.5,this.centerX=Math.floor(o/2),this.centerY=Math.floor(c/2),this.updateUVs()},setScale9:function(l,n,u,f){var o=this.data;return o.scale9=!0,o.is3Slice=n===0&&f===this.height,o.scale9Borders.x=l,o.scale9Borders.y=n,o.scale9Borders.w=u,o.scale9Borders.h=f,this},setCropUVs:function(l,n,u,f,o,c,p){var v=this.cutX,m=this.cutY,S=this.cutWidth,M=this.cutHeight,w=this.realWidth,C=this.realHeight;n=d(n,0,w),u=d(u,0,C),f=d(f,0,w-n),o=d(o,0,C-u);var A=v+n,P=m+u,b=f,O=o,I=this.data;if(I.trim){var D=I.spriteSourceSize;f=d(f,0,S-n),o=d(o,0,M-u);var B=n+f,G=u+o,z=!(D.rB||D.y>G);if(z){var X=Math.max(D.x,n),j=Math.max(D.y,u),Q=Math.min(D.r,B)-X,tt=Math.min(D.b,G)-j;b=Q,O=tt,c?A=v+(S-(X-D.x)-Q):A=v+(X-D.x),p?P=m+(M-(j-D.y)-tt):P=m+(j-D.y),n=X,u=j,f=Q,o=tt}else A=0,P=0,b=0,O=0}else c&&(A=v+(S-n-f)),p&&(P=m+(M-u-o));var Y=this.source.width,Z=this.source.height;return l.u0=Math.max(0,A/Y),l.v0=Math.max(0,P/Z),l.u1=Math.min(1,(A+b)/Y),l.v1=Math.min(1,(P+O)/Z),l.x=n,l.y=u,l.cx=A,l.cy=P,l.cw=b,l.ch=O,l.width=f,l.height=o,l.flipX=c,l.flipY=p,l},updateCropUVs:function(l,n,u){return this.setCropUVs(l,l.x,l.y,l.width,l.height,n,u)},setUVs:function(l,n,u,f,o,c){var p=this.data.drawImage;return p.width=l,p.height=n,this.u0=u,this.v0=f,this.u1=o,this.v1=c,this},updateUVs:function(){var l=this.cutX,n=this.cutY,u=this.cutWidth,f=this.cutHeight,o=this.data.drawImage;o.width=u,o.height=f;var c=this.source.width,p=this.source.height;return this.u0=l/c,this.v0=n/p,this.u1=(l+u)/c,this.v1=(n+f)/p,this},updateUVsInverted:function(){var l=this.source.width,n=this.source.height;return this.u0=(this.cutX+this.cutHeight)/l,this.v0=this.cutY/n,this.u1=this.cutX/l,this.v1=(this.cutY+this.cutWidth)/n,this},clone:function(){var l=new a(this.texture,this.name,this.sourceIndex);return l.cutX=this.cutX,l.cutY=this.cutY,l.cutWidth=this.cutWidth,l.cutHeight=this.cutHeight,l.x=this.x,l.y=this.y,l.width=this.width,l.height=this.height,l.halfWidth=this.halfWidth,l.halfHeight=this.halfHeight,l.centerX=this.centerX,l.centerY=this.centerY,l.rotated=this.rotated,l.data=h(!0,l.data,this.data),l.updateUVs(),l},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}}});s.exports=a},79237:(s,y,e)=>{/** + */var r=e(83419),d=e(45319),h=e(79291),a=new r({initialize:function(n,u,f,o,c,p,v){this.texture=n,this.name=u,this.source=n.source[f],this.sourceIndex=f,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(p,v,o,c)},setSize:function(l,n,u,f){u===void 0&&(u=0),f===void 0&&(f=0),this.cutX=u,this.cutY=f,this.cutWidth=l,this.cutHeight=n,this.width=l,this.height=n,this.halfWidth=Math.floor(l*.5),this.halfHeight=Math.floor(n*.5),this.centerX=Math.floor(l/2),this.centerY=Math.floor(n/2);var o=this.data,c=o.cut;c.x=u,c.y=f,c.w=l,c.h=n,c.r=u+l,c.b=f+n,o.sourceSize.w=l,o.sourceSize.h=n,o.spriteSourceSize.w=l,o.spriteSourceSize.h=n,o.radius=.5*Math.sqrt(l*l+n*n);var p=o.drawImage;return p.x=u,p.y=f,p.width=l,p.height=n,this.updateUVs()},setTrim:function(l,n,u,f,o,c){var p=this.data,v=p.spriteSourceSize;return p.trim=!0,p.sourceSize.w=l,p.sourceSize.h=n,v.x=u,v.y=f,v.w=o,v.h=c,v.r=u+o,v.b=f+c,this.x=u,this.y=f,this.width=o,this.height=c,this.halfWidth=o*.5,this.halfHeight=c*.5,this.centerX=Math.floor(o/2),this.centerY=Math.floor(c/2),this.updateUVs()},setScale9:function(l,n,u,f){var o=this.data;return o.scale9=!0,o.is3Slice=n===0&&f===this.height,o.scale9Borders.x=l,o.scale9Borders.y=n,o.scale9Borders.w=u,o.scale9Borders.h=f,this},setCropUVs:function(l,n,u,f,o,c,p){var v=this.cutX,m=this.cutY,S=this.cutWidth,M=this.cutHeight,w=this.realWidth,C=this.realHeight;n=d(n,0,w),u=d(u,0,C),f=d(f,0,w-n),o=d(o,0,C-u);var A=v+n,P=m+u,b=f,O=o,I=this.data;if(I.trim){var D=I.spriteSourceSize;f=d(f,0,S-n),o=d(o,0,M-u);var B=n+f,G=u+o,z=!(D.rB||D.y>G);if(z){var X=Math.max(D.x,n),j=Math.max(D.y,u),Q=Math.min(D.r,B)-X,tt=Math.min(D.b,G)-j;b=Q,O=tt,c?A=v+(S-(X-D.x)-Q):A=v+(X-D.x),p?P=m+(M-(j-D.y)-tt):P=m+(j-D.y),n=X,u=j,f=Q,o=tt}else A=0,P=0,b=0,O=0}else c&&(A=v+(S-n-f)),p&&(P=m+(M-u-o));var Y=this.source.width,$=this.source.height;return l.u0=Math.max(0,A/Y),l.v0=Math.max(0,P/$),l.u1=Math.min(1,(A+b)/Y),l.v1=Math.min(1,(P+O)/$),l.x=n,l.y=u,l.cx=A,l.cy=P,l.cw=b,l.ch=O,l.width=f,l.height=o,l.flipX=c,l.flipY=p,l},updateCropUVs:function(l,n,u){return this.setCropUVs(l,l.x,l.y,l.width,l.height,n,u)},setUVs:function(l,n,u,f,o,c){var p=this.data.drawImage;return p.width=l,p.height=n,this.u0=u,this.v0=f,this.u1=o,this.v1=c,this},updateUVs:function(){var l=this.cutX,n=this.cutY,u=this.cutWidth,f=this.cutHeight,o=this.data.drawImage;o.width=u,o.height=f;var c=this.source.width,p=this.source.height;return this.u0=l/c,this.v0=n/p,this.u1=(l+u)/c,this.v1=(n+f)/p,this},updateUVsInverted:function(){var l=this.source.width,n=this.source.height;return this.u0=(this.cutX+this.cutHeight)/l,this.v0=this.cutY/n,this.u1=this.cutX/l,this.v1=(this.cutY+this.cutWidth)/n,this},clone:function(){var l=new a(this.texture,this.name,this.sourceIndex);return l.cutX=this.cutX,l.cutY=this.cutY,l.cutWidth=this.cutWidth,l.cutHeight=this.cutHeight,l.x=this.x,l.y=this.y,l.width=this.width,l.height=this.height,l.halfWidth=this.halfWidth,l.halfHeight=this.halfHeight,l.centerX=this.centerX,l.centerY=this.centerY,l.rotated=this.rotated,l.data=h(!0,l.data,this.data),l.updateUVs(),l},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}}});s.exports=a},79237:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(4327),h=e(11876),a='Texture "%s" has no frame "%s"',l=new r({initialize:function(u,f,o,c,p){Array.isArray(o)||(o=[o]),this.manager=u,this.key=f,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var v=0;vc&&(c=m.cutX+m.cutWidth),m.cutY+m.cutHeight>p&&(p=m.cutY+m.cutHeight)}return{x:f,y:o,width:c-f,height:p-o}},getFrameNames:function(n){n===void 0&&(n=!1);var u=Object.keys(this.frames);if(!n){var f=u.indexOf("__BASE");f!==-1&&u.splice(f,1)}return u},getSourceImage:function(n){(n==null||this.frameTotal===1)&&(n="__BASE");var u=this.frames[n];return u?u.source.image:(console.warn(a,this.key,n),this.frames.__BASE.source.image)},getDataSourceImage:function(n){(n==null||this.frameTotal===1)&&(n="__BASE");var u=this.frames[n],f;return u?f=u.sourceIndex:(console.warn(a,this.key,n),f=this.frames.__BASE.sourceIndex),this.dataSource[f].image},setDataSource:function(n){Array.isArray(n)||(n=[n]);for(var u=0;u{/** + */var r=e(83419),d=e(4327),h=e(11876),a='Texture "%s" has no frame "%s"',l=new r({initialize:function(u,f,o,c,p){Array.isArray(o)||(o=[o]),this.manager=u,this.key=f,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var v=0;vc&&(c=m.cutX+m.cutWidth),m.cutY+m.cutHeight>p&&(p=m.cutY+m.cutHeight)}return{x:f,y:o,width:c-f,height:p-o}},getFrameNames:function(n){n===void 0&&(n=!1);var u=Object.keys(this.frames);if(!n){var f=u.indexOf("__BASE");f!==-1&&u.splice(f,1)}return u},getSourceImage:function(n){(n==null||this.frameTotal===1)&&(n="__BASE");var u=this.frames[n];return u?u.source.image:(console.warn(a,this.key,n),this.frames.__BASE.source.image)},getDataSourceImage:function(n){(n==null||this.frameTotal===1)&&(n="__BASE");var u=this.frames[n],f;return u?f=u.sourceIndex:(console.warn(a,this.key,n),f=this.frames.__BASE.sourceIndex),this.dataSource[f].image},setDataSource:function(n){Array.isArray(n)||(n=[n]);for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(27919),d=e(57382),h=e(83419),a=e(40987),l=e(8054),n=e(81320),u=e(50792),f=e(69442),o=e(4327),c=e(8443),p=e(99584),v=e(35154),m=e(88571),S=e(41212),M=e(61309),w=e(87841),C=e(79237),A=new h({Extends:u,initialize:function(b){u.call(this),this.game=b,this.name="TextureManager",this.list={},this._tempCanvas=r.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new w,this.silentWarnings=!1,b.events.once(c.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(f.LOAD,this.updatePending,this),this.on(f.ERROR,this.updatePending,this);var P=this.game.config;this.addBase64("__DEFAULT",P.defaultImage),this.addBase64("__MISSING",P.missingImage),this.addBase64("__WHITE",P.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(c.DESTROY,this.destroy,this),this.game.events.once(c.SYSTEM_READY,function(b){this.stamp=new m(b).setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(f.LOAD),this.off(f.ERROR),this.emit(f.READY))},checkKey:function(P){return this.exists(P)?(this.silentWarnings||console.error("Texture key already in use: "+P),!1):!0},remove:function(P){if(typeof P=="string")if(this.exists(P))P=this.get(P);else return this.silentWarnings||console.warn("No texture found matching key: "+P),this;var b=P.key;return this.list.hasOwnProperty(b)&&(P.destroy(),this.emit(f.REMOVE,b),this.emit(f.REMOVE_KEY+b)),this},removeKey:function(P){return this.list.hasOwnProperty(P)&&delete this.list[P],this},addBase64:function(P,b){if(this.checkKey(P)){var O=this,I=new Image;I.onerror=function(){O.emit(f.ERROR,P)},I.onload=function(){var D=O.create(P,I);M.Image(D,0),O.emit(f.ADD,P,D),O.emit(f.ADD_KEY+P,D),O.emit(f.LOAD,P,D)},I.src=b}return this},getBase64:function(P,b,O,I){O===void 0&&(O="image/png"),I===void 0&&(I=.92);var D="",B=this.getFrame(P,b);if(B&&(B.source.isRenderTexture||B.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(B){var G=B.canvasData,z=r.create2D(this,G.width,G.height),X=z.getContext("2d",{willReadFrequently:!0});G.width>0&&G.height>0&&X.drawImage(B.source.image,G.x,G.y,G.width,G.height,0,0,G.width,G.height),D=z.toDataURL(O,I),r.remove(z)}return D},addImage:function(P,b,O){var I=null;return this.checkKey(P)&&(I=this.create(P,b),M.Image(I,0),O&&I.setDataSource(O),this.emit(f.ADD,P,I),this.emit(f.ADD_KEY+P,I)),I},addGLTexture:function(P,b){var O=null;if(this.checkKey(P)){var I=b.width,D=b.height;O=this.create(P,b,I,D),O.add("__BASE",0,0,0,I,D),this.emit(f.ADD,P,O),this.emit(f.ADD_KEY+P,O)}return O},addCompressedTexture:function(P,b,O){var I=null;if(this.checkKey(P)){if(I=this.create(P,b),I.add("__BASE",0,0,0,b.width,b.height),O){var D=function(G,z,X){Array.isArray(X.textures)||Array.isArray(X.frames)?M.JSONArray(G,z,X):M.JSONHash(G,z,X)};if(Array.isArray(O))for(var B=0;B=B.x&&P=B.y&&b=B.x&&P=B.y&&b{/** + */var r=e(27919),d=e(57382),h=e(83419),a=e(40987),l=e(8054),n=e(81320),u=e(50792),f=e(69442),o=e(4327),c=e(8443),p=e(99584),v=e(35154),m=e(88571),S=e(41212),M=e(61309),w=e(87841),C=e(79237),A=new h({Extends:u,initialize:function(b){u.call(this),this.game=b,this.name="TextureManager",this.list={},this._tempCanvas=r.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new w,this.silentWarnings=!1,b.events.once(c.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(f.LOAD,this.updatePending,this),this.on(f.ERROR,this.updatePending,this);var P=this.game.config;this.addBase64("__DEFAULT",P.defaultImage),this.addBase64("__MISSING",P.missingImage),this.addBase64("__WHITE",P.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(c.DESTROY,this.destroy,this),this.game.events.once(c.SYSTEM_READY,function(b){this.stamp=new m(b).setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(f.LOAD),this.off(f.ERROR),this.emit(f.READY))},checkKey:function(P){return this.exists(P)?(this.silentWarnings||console.error("Texture key already in use: "+P),!1):!0},remove:function(P){if(typeof P=="string")if(this.exists(P))P=this.get(P);else return this.silentWarnings||console.warn("No texture found matching key: "+P),this;var b=P.key;return this.list.hasOwnProperty(b)&&(P.destroy(),this.emit(f.REMOVE,b),this.emit(f.REMOVE_KEY+b)),this},removeKey:function(P){return this.list.hasOwnProperty(P)&&delete this.list[P],this},addBase64:function(P,b){if(this.checkKey(P)){var O=this,I=new Image;I.onerror=function(){O.emit(f.ERROR,P)},I.onload=function(){var D=O.create(P,I);M.Image(D,0),O.emit(f.ADD,P,D),O.emit(f.ADD_KEY+P,D),O.emit(f.LOAD,P,D)},I.src=b}return this},getBase64:function(P,b,O,I){O===void 0&&(O="image/png"),I===void 0&&(I=.92);var D="",B=this.getFrame(P,b);if(B&&(B.source.isRenderTexture||B.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(B){var G=B.canvasData,z=r.create2D(this,G.width,G.height),X=z.getContext("2d",{willReadFrequently:!0});G.width>0&&G.height>0&&X.drawImage(B.source.image,G.x,G.y,G.width,G.height,0,0,G.width,G.height),D=z.toDataURL(O,I),r.remove(z)}return D},addImage:function(P,b,O){var I=null;return this.checkKey(P)&&(I=this.create(P,b),M.Image(I,0),O&&I.setDataSource(O),this.emit(f.ADD,P,I),this.emit(f.ADD_KEY+P,I)),I},addGLTexture:function(P,b){var O=null;if(this.checkKey(P)){var I=b.width,D=b.height;O=this.create(P,b,I,D),O.add("__BASE",0,0,0,I,D),this.emit(f.ADD,P,O),this.emit(f.ADD_KEY+P,O)}return O},addCompressedTexture:function(P,b,O){var I=null;if(this.checkKey(P)){if(I=this.create(P,b),I.add("__BASE",0,0,0,b.width,b.height),O){var D=function(G,z,X){Array.isArray(X.textures)||Array.isArray(X.frames)?M.JSONArray(G,z,X):M.JSONHash(G,z,X)};if(Array.isArray(O))for(var B=0;B=B.x&&P=B.y&&b=B.x&&P=B.y&&b{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5353,7 +5353,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={LINEAR:0,NEAREST:1};s.exports=y},44538:s=>{/** + */var x={LINEAR:0,NEAREST:1};s.exports=x},44538:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5381,11 +5381,11 @@ return new `+this.key+`(); * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="removetexture-"},69442:(s,y,e)=>{/** + */s.exports="removetexture-"},69442:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={ADD:e(44538),ADD_KEY:e(63486),ERROR:e(94851),LOAD:e(29099),READY:e(8678),REMOVE:e(86415),REMOVE_KEY:e(30879)}},27458:(s,y,e)=>{/** + */s.exports={ADD:e(44538),ADD_KEY:e(63486),ERROR:e(94851),LOAD:e(29099),READY:e(8678),REMOVE:e(86415),REMOVE_KEY:e(30879)}},27458:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5393,19 +5393,19 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){if(!d.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var h=e.source[r];e.add("__BASE",r,0,0,h.width,h.height);for(var a=d.getElementsByTagName("SubTexture"),l,n=0;n{/** + */var x=function(e,r,d){if(!d.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var h=e.source[r];e.add("__BASE",r,0,0,h.width,h.height);for(var a=d.getElementsByTagName("SubTexture"),l,n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=e.source[r];return e.add("__BASE",r,0,0,d.width,d.height),e};s.exports=y},4832:s=>{/** + */var x=function(e,r){var d=e.source[r];return e.add("__BASE",r,0,0,d.width,d.height),e};s.exports=x},4832:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=e.source[r];return e.add("__BASE",r,0,0,d.width,d.height),e};s.exports=y},78566:(s,y,e)=>{/** + */var x=function(e,r){var d=e.source[r];return e.add("__BASE",r,0,0,d.width,d.height),e};s.exports=x},78566:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(41786),d=function(h,a,l){if(!l.frames&&!l.textures){console.warn("Invalid Texture Atlas JSON Array");return}var n=h.source[a];h.add("__BASE",a,0,0,n.width,n.height);for(var u=Array.isArray(l.textures)?l.textures[a].frames:l.frames,f,o=0;o{/** + */var r=e(41786),d=function(h,a,l){if(!l.frames&&!l.textures){console.warn("Invalid Texture Atlas JSON Array");return}var n=h.source[a];h.add("__BASE",a,0,0,n.width,n.height);for(var u=Array.isArray(l.textures)?l.textures[a].frames:l.frames,f,o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5413,28 +5413,28 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r=[171,75,84,88,32,49,49,187,13,10,26,10],d,h=new Uint8Array(e,0,12);for(d=0;d>1),w=Math.max(1,w>>1),S+=C}return{mipmaps:m,width:o,height:c,internalFormat:f,compressed:!0,generateMipmap:!1}};s.exports=y},82038:s=>{/** + */var x=function(e){var r=[171,75,84,88,32,49,49,187,13,10,26,10],d,h=new Uint8Array(e,0,12);for(d=0;d>1),w=Math.max(1,w>>1),S+=C}return{mipmaps:m,width:o,height:c,internalFormat:f,compressed:!0,generateMipmap:!1}};s.exports=x},82038:s=>{/** * @author Richard Davey * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function y(b,O,I,D,B,G,z){return z===void 0&&(z=16),Math.floor((b+I)/B)*Math.floor((O+D)/G)*z}function e(b,O){return b=Math.max(b,16),O=Math.max(O,8),b*O/4}function r(b,O){return b=Math.max(b,8),O=Math.max(O,8),b*O/2}function d(b,O){return Math.ceil(b/4)*Math.ceil(O/4)*16}function h(b,O){return y(b,O,3,3,4,4,8)}function a(b,O){return y(b,O,3,3,4,4)}function l(b,O){return y(b,O,4,3,5,4)}function n(b,O){return y(b,O,4,4,5,5)}function u(b,O){return y(b,O,5,4,6,5)}function f(b,O){return y(b,O,5,5,6,6)}function o(b,O){return y(b,O,7,4,8,5)}function c(b,O){return y(b,O,7,5,8,6)}function p(b,O){return y(b,O,7,7,8,8)}function v(b,O){return y(b,O,9,4,10,5)}function m(b,O){return y(b,O,9,5,10,6)}function S(b,O){return y(b,O,9,7,10,8)}function M(b,O){return y(b,O,9,9,10,10)}function w(b,O){return y(b,O,11,9,12,10)}function C(b,O){return y(b,O,11,11,12,12)}var A={0:{sizeFunc:e,glFormat:[35841]},1:{sizeFunc:e,glFormat:[35843]},2:{sizeFunc:r,glFormat:[35840]},3:{sizeFunc:r,glFormat:[35842]},6:{sizeFunc:h,glFormat:[36196]},7:{sizeFunc:h,glFormat:[33776,35916]},8:{sizeFunc:a,glFormat:[33777,35917]},9:{sizeFunc:a,glFormat:[33778,35918]},11:{sizeFunc:a,glFormat:[33779,35919]},14:{sizeFunc:d,glFormat:[36494,36495]},15:{sizeFunc:d,glFormat:[36492,36493]},22:{sizeFunc:h,glFormat:[37492,37493]},23:{sizeFunc:a,glFormat:[37496,37497]},24:{sizeFunc:h,glFormat:[37494,37495]},25:{sizeFunc:h,glFormat:[37488]},26:{sizeFunc:a,glFormat:[37490]},27:{sizeFunc:a,glFormat:[37808,37840]},28:{sizeFunc:l,glFormat:[37809,37841]},29:{sizeFunc:n,glFormat:[37810,37842]},30:{sizeFunc:u,glFormat:[37811,37843]},31:{sizeFunc:f,glFormat:[37812,37844]},32:{sizeFunc:o,glFormat:[37813,37845]},33:{sizeFunc:c,glFormat:[37814,37846]},34:{sizeFunc:p,glFormat:[37815,37847]},35:{sizeFunc:v,glFormat:[37816,37848]},36:{sizeFunc:m,glFormat:[37817,37849]},37:{sizeFunc:S,glFormat:[37818,37850]},38:{sizeFunc:M,glFormat:[37819,37851]},39:{sizeFunc:w,glFormat:[37820,37852]},40:{sizeFunc:C,glFormat:[37821,37853]}},P=function(b){for(var O=new Uint32Array(b,0,13),I=O[0],D=I===55727696,B=D?O[2]:O[3],G=O[4],z=A[B].glFormat[G],X=A[B].sizeFunc,j=O[11],Q=O[7],tt=O[6],Y=52+O[12],Z=new Uint8Array(b,Y),U=new Array(j),H=0,$=Q,_=tt,q=0;q>1),_=Math.max(1,_>>1),H+=at}return{mipmaps:U,width:Q,height:tt,internalFormat:z,compressed:!0,generateMipmap:!1}};s.exports=P},75549:(s,y,e)=>{/** + */function x(b,O,I,D,B,G,z){return z===void 0&&(z=16),Math.floor((b+I)/B)*Math.floor((O+D)/G)*z}function e(b,O){return b=Math.max(b,16),O=Math.max(O,8),b*O/4}function r(b,O){return b=Math.max(b,8),O=Math.max(O,8),b*O/2}function d(b,O){return Math.ceil(b/4)*Math.ceil(O/4)*16}function h(b,O){return x(b,O,3,3,4,4,8)}function a(b,O){return x(b,O,3,3,4,4)}function l(b,O){return x(b,O,4,3,5,4)}function n(b,O){return x(b,O,4,4,5,5)}function u(b,O){return x(b,O,5,4,6,5)}function f(b,O){return x(b,O,5,5,6,6)}function o(b,O){return x(b,O,7,4,8,5)}function c(b,O){return x(b,O,7,5,8,6)}function p(b,O){return x(b,O,7,7,8,8)}function v(b,O){return x(b,O,9,4,10,5)}function m(b,O){return x(b,O,9,5,10,6)}function S(b,O){return x(b,O,9,7,10,8)}function M(b,O){return x(b,O,9,9,10,10)}function w(b,O){return x(b,O,11,9,12,10)}function C(b,O){return x(b,O,11,11,12,12)}var A={0:{sizeFunc:e,glFormat:[35841]},1:{sizeFunc:e,glFormat:[35843]},2:{sizeFunc:r,glFormat:[35840]},3:{sizeFunc:r,glFormat:[35842]},6:{sizeFunc:h,glFormat:[36196]},7:{sizeFunc:h,glFormat:[33776,35916]},8:{sizeFunc:a,glFormat:[33777,35917]},9:{sizeFunc:a,glFormat:[33778,35918]},11:{sizeFunc:a,glFormat:[33779,35919]},14:{sizeFunc:d,glFormat:[36494,36495]},15:{sizeFunc:d,glFormat:[36492,36493]},22:{sizeFunc:h,glFormat:[37492,37493]},23:{sizeFunc:a,glFormat:[37496,37497]},24:{sizeFunc:h,glFormat:[37494,37495]},25:{sizeFunc:h,glFormat:[37488]},26:{sizeFunc:a,glFormat:[37490]},27:{sizeFunc:a,glFormat:[37808,37840]},28:{sizeFunc:l,glFormat:[37809,37841]},29:{sizeFunc:n,glFormat:[37810,37842]},30:{sizeFunc:u,glFormat:[37811,37843]},31:{sizeFunc:f,glFormat:[37812,37844]},32:{sizeFunc:o,glFormat:[37813,37845]},33:{sizeFunc:c,glFormat:[37814,37846]},34:{sizeFunc:p,glFormat:[37815,37847]},35:{sizeFunc:v,glFormat:[37816,37848]},36:{sizeFunc:m,glFormat:[37817,37849]},37:{sizeFunc:S,glFormat:[37818,37850]},38:{sizeFunc:M,glFormat:[37819,37851]},39:{sizeFunc:w,glFormat:[37820,37852]},40:{sizeFunc:C,glFormat:[37821,37853]}},P=function(b){for(var O=new Uint32Array(b,0,13),I=O[0],D=I===55727696,B=D?O[2]:O[3],G=O[4],z=A[B].glFormat[G],X=A[B].sizeFunc,j=O[11],Q=O[7],tt=O[6],Y=52+O[12],$=new Uint8Array(b,Y),U=new Array(j),H=0,Z=Q,_=tt,q=0;q>1),_=Math.max(1,_>>1),H+=at}return{mipmaps:U,width:Q,height:tt,internalFormat:z,compressed:!0,generateMipmap:!1}};s.exports=P},75549:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(95540),d=function(h,a,l,n,u,f,o){var c=r(o,"frameWidth",null),p=r(o,"frameHeight",c);if(c===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var v=h.source[a];h.add("__BASE",a,0,0,v.width,v.height);var m=r(o,"startFrame",0),S=r(o,"endFrame",-1),M=r(o,"margin",0),w=r(o,"spacing",0),C=Math.floor((u-M+w)/(c+w)),A=Math.floor((f-M+w)/(p+w)),P=C*A;P===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",h.key),(m>P||m<-P)&&(m=0),m<0&&(m=P+m),(S===-1||S>P||Su&&(I=z-u),X>f&&(D=X-f),G>=m&&G<=S&&(h.add(B,a,l+b,n+O,c-I,p-D),B++),b+=c+w,b+c>u&&(b=M,O+=p+w)}return h};s.exports=d},47534:(s,y,e)=>{/** + */var r=e(95540),d=function(h,a,l,n,u,f,o){var c=r(o,"frameWidth",null),p=r(o,"frameHeight",c);if(c===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var v=h.source[a];h.add("__BASE",a,0,0,v.width,v.height);var m=r(o,"startFrame",0),S=r(o,"endFrame",-1),M=r(o,"margin",0),w=r(o,"spacing",0),C=Math.floor((u-M+w)/(c+w)),A=Math.floor((f-M+w)/(p+w)),P=C*A;P===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",h.key),(m>P||m<-P)&&(m=0),m<0&&(m=P+m),(S===-1||S>P||Su&&(I=z-u),X>f&&(D=X-f),G>=m&&G<=S&&(h.add(B,a,l+b,n+O,c-I,p-D),B++),b+=c+w,b+c>u&&(b=M,O+=p+w)}return h};s.exports=d},47534:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(95540),d=function(h,a,l){var n=r(l,"frameWidth",null),u=r(l,"frameHeight",n);if(!n)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var f=h.source[0];h.add("__BASE",0,0,0,f.width,f.height),r(l,"startFrame",0),r(l,"endFrame",-1);for(var o=r(l,"margin",0),c=r(l,"spacing",0),p=a.cutX,v=a.cutY,m=a.cutWidth,S=a.cutHeight,M=a.realWidth,w=a.realHeight,C=Math.floor((M-o+c)/(n+c)),A=Math.floor((w-o+c)/(u+c)),P=a.x,b=n-P,O=n-(M-m-P),I=a.y,D=u-I,B=u-(w-S-I),G,z=o,X=o,j=0,Q=0,tt=0;tt{/** + */var r=e(95540),d=function(h,a,l){var n=r(l,"frameWidth",null),u=r(l,"frameHeight",n);if(!n)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var f=h.source[0];h.add("__BASE",0,0,0,f.width,f.height),r(l,"startFrame",0),r(l,"endFrame",-1);for(var o=r(l,"margin",0),c=r(l,"spacing",0),p=a.cutX,v=a.cutY,m=a.cutWidth,S=a.cutHeight,M=a.realWidth,w=a.realHeight,C=Math.floor((M-o+c)/(n+c)),A=Math.floor((w-o+c)/(u+c)),P=a.x,b=n-P,O=n-(M-m-P),I=a.y,D=u-I,B=u-(w-S-I),G,z=o,X=o,j=0,Q=0,tt=0;tt{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=0,e=function(d,h,a,l){var n=y-l.y-l.height;d.add(a,h,l.x,n,l.width,l.height)},r=function(d,h,a){var l=d.source[h];d.add("__BASE",h,0,0,l.width,l.height),y=l.height;for(var n=a.split(` -`),u=/^[ ]*(- )*(\w+)+[: ]+(.*)/,f="",o="",c={x:0,y:0,width:0,height:0},p=0;p{/** + */var x=0,e=function(d,h,a,l){var n=x-l.y-l.height;d.add(a,h,l.x,n,l.width,l.height)},r=function(d,h,a){var l=d.source[h];d.add("__BASE",h,0,0,l.width,l.height),x=l.height;for(var n=a.split(` +`),u=/^[ ]*(- )*(\w+)+[: ]+(.*)/,f="",o="",c={x:0,y:0,width:0,height:0},p=0;p{/** * @author Ben Richards * @copyright 2024 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(50030),d=function(f){for(var o=f.mipmaps,c=1;c{/** + */var r=e(50030),d=function(f){for(var o=f.mipmaps,c=1;c{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5442,87 +5442,87 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(s,y,e)=>{/** + */s.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a,l,n,u,f,o,c){(n===void 0||n<=0)&&(n=32),(u===void 0||u<=0)&&(u=32),f===void 0&&(f=0),o===void 0&&(o=0),this.name=a,this.firstgid=l|0,this.imageWidth=n|0,this.imageHeight=u|0,this.imageMargin=f|0,this.imageSpacing=o|0,this.properties=c||{},this.images=[],this.total=0},containsImageIndex:function(h){return h>=this.firstgid&&h{/** + */var r=e(83419),d=new r({initialize:function(a,l,n,u,f,o,c){(n===void 0||n<=0)&&(n=32),(u===void 0||u<=0)&&(u=32),f===void 0&&(f=0),o===void 0&&(o=0),this.name=a,this.firstgid=l|0,this.imageWidth=n|0,this.imageHeight=u|0,this.imageMargin=f|0,this.imageSpacing=o|0,this.properties=c||{},this.images=[],this.total=0},containsImageIndex:function(h){return h>=this.firstgid&&h{/** * @author Richard Davey * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=new r({initialize:function(a){if(this.gids=[],a!==void 0)for(var l=0;l{/** + */var r=e(83419),d=new r({initialize:function(a){if(this.gids=[],a!==void 0)for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(80341),d=e(87010),h=e(46177),a=e(49075),l=function(n,u,f,o,c,p,v,m){f===void 0&&(f=32),o===void 0&&(o=32),c===void 0&&(c=10),p===void 0&&(p=10),m===void 0&&(m=!1);var S=null;if(Array.isArray(v)){var M=u!==void 0?u:"map";S=h(M,r.ARRAY_2D,v,f,o,m)}else if(u!==void 0){var w=n.cache.tilemap.get(u);w?S=h(u,w.format,w.data,f,o,m):console.warn("No map data found for key "+u)}return S===null&&(S=new d({tileWidth:f,tileHeight:o,width:c,height:p})),new a(n,S)};s.exports=l},23029:(s,y,e)=>{/** + */var r=e(80341),d=e(87010),h=e(46177),a=e(49075),l=function(n,u,f,o,c,p,v,m){f===void 0&&(f=32),o===void 0&&(o=32),c===void 0&&(c=10),p===void 0&&(p=10),m===void 0&&(m=!1);var S=null;if(Array.isArray(v)){var M=u!==void 0?u:"map";S=h(M,r.ARRAY_2D,v,f,o,m)}else if(u!==void 0){var w=n.cache.tilemap.get(u);w?S=h(u,w.format,w.data,f,o,m):console.warn("No map data found for key "+u)}return S===null&&(S=new d({tileWidth:f,tileHeight:o,width:c,height:p})),new a(n,S)};s.exports=l},23029:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(31401),h=e(91907),a=e(62644),l=e(93232),n=new r({Mixins:[d.AlphaSingle,d.Flip,d.Visible],initialize:function(f,o,c,p,v,m,S,M){this.layer=f,this.index=o,this.x=c,this.y=p,this.width=v,this.height=m,this.right,this.bottom,this.baseWidth=S!==void 0?S:v,this.baseHeight=M!==void 0?M:m,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.tintFill=!1,this.physics={}},containsPoint:function(u,f){return!(uthis.right||f>this.bottom)},copy:function(u){return this.index=u.index,this.alpha=u.alpha,this.properties=a(u.properties),this.visible=u.visible,this.setFlip(u.flipX,u.flipY),this.tint=u.tint,this.rotation=u.rotation,this.collideUp=u.collideUp,this.collideDown=u.collideDown,this.collideLeft=u.collideLeft,this.collideRight=u.collideRight,this.collisionCallback=u.collisionCallback,this.collisionCallbackContext=u.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(u){var f=this.tilemapLayer;if(f){var o=f.tileToWorldXY(this.x,this.y,void 0,u);return o.x}return this.x*this.baseWidth},getRight:function(u){var f=this.tilemapLayer;return f?this.getLeft(u)+this.width*f.scaleX:this.getLeft(u)+this.width},getTop:function(u){var f=this.tilemapLayer;if(f){var o=f.tileToWorldXY(this.x,this.y,void 0,u);return o.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(u){var f=this.tilemapLayer;return f?this.getTop(u)+this.height*f.scaleY:this.getTop(u)+this.height},getBounds:function(u,f){return f===void 0&&(f=new l),f.x=this.getLeft(u),f.y=this.getTop(u),f.width=this.getRight(u)-f.x,f.height=this.getBottom(u)-f.y,f},getCenterX:function(u){return(this.getLeft(u)+this.getRight(u))/2},getCenterY:function(u){return(this.getTop(u)+this.getBottom(u))/2},intersects:function(u,f,o,c){return!(o<=this.pixelX||c<=this.pixelY||u>=this.right||f>=this.bottom)},isInteresting:function(u,f){return u&&f?this.canCollide||this.hasInterestingFace:u?this.collides:f?this.hasInterestingFace:!1},resetCollision:function(u){if(u===void 0&&(u=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,u){var f=this.tilemapLayer;f&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(u,f,o,c,p){if(f===void 0&&(f=u),o===void 0&&(o=u),c===void 0&&(c=u),p===void 0&&(p=!0),this.collideLeft=u,this.collideRight=f,this.collideUp=o,this.collideDown=c,this.faceLeft=u,this.faceRight=f,this.faceTop=o,this.faceBottom=c,p){var v=this.tilemapLayer;v&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(u,f){return u===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=u,this.collisionCallbackContext=f),this},setSize:function(u,f,o,c){return u!==void 0&&(this.width=u),f!==void 0&&(this.height=f),o!==void 0&&(this.baseWidth=o),c!==void 0&&(this.baseHeight=c),this.updatePixelXY(),this},updatePixelXY:function(){var u=this.layer.orientation;if(u===h.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(u===h.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(u===h.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(u===h.HEXAGONAL){var f=this.layer.staggerAxis,o=this.layer.staggerIndex,c=this.layer.hexSideLength,p,v;f==="y"?(v=(this.baseHeight-c)/2+c,o==="odd"?this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.pixelX=this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*v):f==="x"&&(p=(this.baseWidth-c)/2+c,this.pixelX=this.x*p,o==="odd"?this.pixelY=this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.pixelY=this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback!==void 0}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var u=this.layer.tilemapLayer;if(u){var f=u.gidMap[this.index];if(f)return f}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var u=this.tilemapLayer;return u?u.tilemap:null}}});s.exports=n},49075:(s,y,e)=>{/** + */var r=e(83419),d=e(31401),h=e(91907),a=e(62644),l=e(93232),n=new r({Mixins:[d.AlphaSingle,d.Flip,d.Visible],initialize:function(f,o,c,p,v,m,S,M){this.layer=f,this.index=o,this.x=c,this.y=p,this.width=v,this.height=m,this.right,this.bottom,this.baseWidth=S!==void 0?S:v,this.baseHeight=M!==void 0?M:m,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.tintFill=!1,this.physics={}},containsPoint:function(u,f){return!(uthis.right||f>this.bottom)},copy:function(u){return this.index=u.index,this.alpha=u.alpha,this.properties=a(u.properties),this.visible=u.visible,this.setFlip(u.flipX,u.flipY),this.tint=u.tint,this.rotation=u.rotation,this.collideUp=u.collideUp,this.collideDown=u.collideDown,this.collideLeft=u.collideLeft,this.collideRight=u.collideRight,this.collisionCallback=u.collisionCallback,this.collisionCallbackContext=u.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(u){var f=this.tilemapLayer;if(f){var o=f.tileToWorldXY(this.x,this.y,void 0,u);return o.x}return this.x*this.baseWidth},getRight:function(u){var f=this.tilemapLayer;return f?this.getLeft(u)+this.width*f.scaleX:this.getLeft(u)+this.width},getTop:function(u){var f=this.tilemapLayer;if(f){var o=f.tileToWorldXY(this.x,this.y,void 0,u);return o.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(u){var f=this.tilemapLayer;return f?this.getTop(u)+this.height*f.scaleY:this.getTop(u)+this.height},getBounds:function(u,f){return f===void 0&&(f=new l),f.x=this.getLeft(u),f.y=this.getTop(u),f.width=this.getRight(u)-f.x,f.height=this.getBottom(u)-f.y,f},getCenterX:function(u){return(this.getLeft(u)+this.getRight(u))/2},getCenterY:function(u){return(this.getTop(u)+this.getBottom(u))/2},intersects:function(u,f,o,c){return!(o<=this.pixelX||c<=this.pixelY||u>=this.right||f>=this.bottom)},isInteresting:function(u,f){return u&&f?this.canCollide||this.hasInterestingFace:u?this.collides:f?this.hasInterestingFace:!1},resetCollision:function(u){if(u===void 0&&(u=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,u){var f=this.tilemapLayer;f&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(u,f,o,c,p){if(f===void 0&&(f=u),o===void 0&&(o=u),c===void 0&&(c=u),p===void 0&&(p=!0),this.collideLeft=u,this.collideRight=f,this.collideUp=o,this.collideDown=c,this.faceLeft=u,this.faceRight=f,this.faceTop=o,this.faceBottom=c,p){var v=this.tilemapLayer;v&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(u,f){return u===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=u,this.collisionCallbackContext=f),this},setSize:function(u,f,o,c){return u!==void 0&&(this.width=u),f!==void 0&&(this.height=f),o!==void 0&&(this.baseWidth=o),c!==void 0&&(this.baseHeight=c),this.updatePixelXY(),this},updatePixelXY:function(){var u=this.layer.orientation;if(u===h.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(u===h.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(u===h.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(u===h.HEXAGONAL){var f=this.layer.staggerAxis,o=this.layer.staggerIndex,c=this.layer.hexSideLength,p,v;f==="y"?(v=(this.baseHeight-c)/2+c,o==="odd"?this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.pixelX=this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*v):f==="x"&&(p=(this.baseWidth-c)/2+c,this.pixelX=this.x*p,o==="odd"?this.pixelY=this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.pixelY=this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback!==void 0}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var u=this.layer.tilemapLayer;if(u){var f=u.gidMap[this.index];if(f)return f}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var u=this.tilemapLayer;return u?u.tilemap:null}}});s.exports=n},49075:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(84101),d=e(83419),h=e(39506),a=e(80341),l=e(95540),n=e(14977),u=e(27462),f=e(91907),o=e(36305),c=e(19133),p=e(68287),v=e(23029),m=e(81086),S=e(20442),M=e(33629),w=new d({initialize:function(A,P){this.scene=A,this.tileWidth=P.tileWidth,this.tileHeight=P.tileHeight,this.width=P.width,this.height=P.height,this.orientation=P.orientation,this.renderOrder=P.renderOrder,this.format=P.format,this.version=P.version,this.properties=P.properties,this.widthInPixels=P.widthInPixels,this.heightInPixels=P.heightInPixels,this.imageCollections=P.imageCollections,this.images=P.images,this.layers=P.layers,this.tiles=P.tiles,this.tilesets=P.tilesets,this.objects=P.objects,this.currentLayerIndex=0,this.hexSideLength=P.hexSideLength;var b=this.orientation;this._convert={WorldToTileXY:m.GetWorldToTileXYFunction(b),WorldToTileX:m.GetWorldToTileXFunction(b),WorldToTileY:m.GetWorldToTileYFunction(b),TileToWorldXY:m.GetTileToWorldXYFunction(b),TileToWorldX:m.GetTileToWorldXFunction(b),TileToWorldY:m.GetTileToWorldYFunction(b),GetTileCorners:m.GetTileCornersFunction(b)}},setRenderOrder:function(C){var A=["right-down","left-down","right-up","left-up"];return typeof C=="number"&&(C=A[C]),A.indexOf(C)>-1&&(this.renderOrder=C),this},addTilesetImage:function(C,A,P,b,O,I,D,B){if(C===void 0)return null;A==null&&(A=C);var G=this.scene.sys.textures;if(!G.exists(A))return console.warn('Texture key "%s" not found',A),null;var z=G.get(A),X=this.getTilesetIndex(C);if(X===null&&this.format===a.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',C,this.tilesets),null;var j=this.tilesets[X];return j?(j.setTileSize(P,b),j.setSpacing(O,I),j.setImage(z),j):(P===void 0&&(P=this.tileWidth),b===void 0&&(b=this.tileHeight),O===void 0&&(O=0),I===void 0&&(I=0),D===void 0&&(D=0),B===void 0&&(B={x:0,y:0}),j=new M(C,D,P,b,O,I,void 0,void 0,B),j.setImage(z),this.tilesets.push(j),this.tiles=r(this),j)},copy:function(C,A,P,b,O,I,D,B){return B=this.getLayer(B),B!==null?(m.Copy(C,A,P,b,O,I,D,B),this):null},createBlankLayer:function(C,A,P,b,O,I,D,B){P===void 0&&(P=0),b===void 0&&(b=0),O===void 0&&(O=this.width),I===void 0&&(I=this.height),D===void 0&&(D=this.tileWidth),B===void 0&&(B=this.tileHeight);var G=this.getLayerIndex(C);if(G!==null)return console.warn("Invalid Tilemap Layer ID: "+C),null;for(var z=new n({name:C,tileWidth:D,tileHeight:B,width:O,height:I,orientation:this.orientation}),X,j=0;j-1&&this.putTileAt(A,I.x,I.y,P,I.tilemapLayer)}return b},removeTileAt:function(C,A,P,b,O){return P===void 0&&(P=!0),b===void 0&&(b=!0),O=this.getLayer(O),O===null?null:m.RemoveTileAt(C,A,P,b,O)},removeTileAtWorldXY:function(C,A,P,b,O,I){return P===void 0&&(P=!0),b===void 0&&(b=!0),I=this.getLayer(I),I===null?null:m.RemoveTileAtWorldXY(C,A,P,b,O,I)},renderDebug:function(C,A,P){return P=this.getLayer(P),P===null?null:(this.orientation===f.ORTHOGONAL&&m.RenderDebug(C,A,P),this)},renderDebugFull:function(C,A){for(var P=this.layers,b=0;b{/** + */var r=e(84101),d=e(83419),h=e(39506),a=e(80341),l=e(95540),n=e(14977),u=e(27462),f=e(91907),o=e(36305),c=e(19133),p=e(68287),v=e(23029),m=e(81086),S=e(20442),M=e(33629),w=new d({initialize:function(A,P){this.scene=A,this.tileWidth=P.tileWidth,this.tileHeight=P.tileHeight,this.width=P.width,this.height=P.height,this.orientation=P.orientation,this.renderOrder=P.renderOrder,this.format=P.format,this.version=P.version,this.properties=P.properties,this.widthInPixels=P.widthInPixels,this.heightInPixels=P.heightInPixels,this.imageCollections=P.imageCollections,this.images=P.images,this.layers=P.layers,this.tiles=P.tiles,this.tilesets=P.tilesets,this.objects=P.objects,this.currentLayerIndex=0,this.hexSideLength=P.hexSideLength;var b=this.orientation;this._convert={WorldToTileXY:m.GetWorldToTileXYFunction(b),WorldToTileX:m.GetWorldToTileXFunction(b),WorldToTileY:m.GetWorldToTileYFunction(b),TileToWorldXY:m.GetTileToWorldXYFunction(b),TileToWorldX:m.GetTileToWorldXFunction(b),TileToWorldY:m.GetTileToWorldYFunction(b),GetTileCorners:m.GetTileCornersFunction(b)}},setRenderOrder:function(C){var A=["right-down","left-down","right-up","left-up"];return typeof C=="number"&&(C=A[C]),A.indexOf(C)>-1&&(this.renderOrder=C),this},addTilesetImage:function(C,A,P,b,O,I,D,B){if(C===void 0)return null;A==null&&(A=C);var G=this.scene.sys.textures;if(!G.exists(A))return console.warn('Texture key "%s" not found',A),null;var z=G.get(A),X=this.getTilesetIndex(C);if(X===null&&this.format===a.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',C,this.tilesets),null;var j=this.tilesets[X];return j?(j.setTileSize(P,b),j.setSpacing(O,I),j.setImage(z),j):(P===void 0&&(P=this.tileWidth),b===void 0&&(b=this.tileHeight),O===void 0&&(O=0),I===void 0&&(I=0),D===void 0&&(D=0),B===void 0&&(B={x:0,y:0}),j=new M(C,D,P,b,O,I,void 0,void 0,B),j.setImage(z),this.tilesets.push(j),this.tiles=r(this),j)},copy:function(C,A,P,b,O,I,D,B){return B=this.getLayer(B),B!==null?(m.Copy(C,A,P,b,O,I,D,B),this):null},createBlankLayer:function(C,A,P,b,O,I,D,B){P===void 0&&(P=0),b===void 0&&(b=0),O===void 0&&(O=this.width),I===void 0&&(I=this.height),D===void 0&&(D=this.tileWidth),B===void 0&&(B=this.tileHeight);var G=this.getLayerIndex(C);if(G!==null)return console.warn("Invalid Tilemap Layer ID: "+C),null;for(var z=new n({name:C,tileWidth:D,tileHeight:B,width:O,height:I,orientation:this.orientation}),X,j=0;j-1&&this.putTileAt(A,I.x,I.y,P,I.tilemapLayer)}return b},removeTileAt:function(C,A,P,b,O){return P===void 0&&(P=!0),b===void 0&&(b=!0),O=this.getLayer(O),O===null?null:m.RemoveTileAt(C,A,P,b,O)},removeTileAtWorldXY:function(C,A,P,b,O,I){return P===void 0&&(P=!0),b===void 0&&(b=!0),I=this.getLayer(I),I===null?null:m.RemoveTileAtWorldXY(C,A,P,b,O,I)},renderDebug:function(C,A,P){return P=this.getLayer(P),P===null?null:(this.orientation===f.ORTHOGONAL&&m.RenderDebug(C,A,P),this)},renderDebugFull:function(C,A){for(var P=this.layers,b=0;b{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(44603),d=e(31989);r.register("tilemap",function(h){var a=h!==void 0?h:{};return d(this.scene,a.key,a.tileWidth,a.tileHeight,a.width,a.height,a.data,a.insertNull)})},46029:(s,y,e)=>{/** + */var r=e(44603),d=e(31989);r.register("tilemap",function(h){var a=h!==void 0?h:{};return d(this.scene,a.key,a.tileWidth,a.tileHeight,a.width,a.height,a.data,a.insertNull)})},46029:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(39429),d=e(31989);r.register("tilemap",function(h,a,l,n,u,f,o){return h===null&&(h=void 0),a===null&&(a=void 0),l===null&&(l=void 0),n===null&&(n=void 0),u===null&&(u=void 0),d(this.scene,h,a,l,n,u,f,o)})},20442:(s,y,e)=>{/** + */var r=e(39429),d=e(31989);r.register("tilemap",function(h,a,l,n,u,f,o){return h===null&&(h=void 0),a===null&&(a=void 0),l===null&&(l=void 0),n===null&&(n=void 0),u===null&&(u=void 0),d(this.scene,h,a,l,n,u,f,o)})},20442:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(78389),h=e(31401),a=e(95643),l=e(81086),n=e(19218),u=e(26099),f=new r({Extends:a,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.Transform,h.Visible,h.ScrollFactor,d,n],initialize:function(c,p,v,m,S,M){a.call(this,c,"TilemapLayer"),this.isTilemap=!0,this.tilemap=p,this.layerIndex=v,this.layer=p.layers[v],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=l.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new u,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(m),this.setAlpha(this.layer.alpha),this.setPosition(S,M),this.setOrigin(0,0),this.setSize(p.tileWidth*this.layer.width,p.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(o){var c=[],p=[],v=this.tilemap;Array.isArray(o)||(o=[o]);for(var m=0;m=0&&o<4&&(this._renderOrder=o),this},calculateFacesAt:function(o,c){return l.CalculateFacesAt(o,c,this.layer),this},calculateFacesWithin:function(o,c,p,v){return l.CalculateFacesWithin(o,c,p,v,this.layer),this},createFromTiles:function(o,c,p,v,m){return l.CreateFromTiles(o,c,p,v,m,this.layer)},cull:function(o){return this.cullCallback(this.layer,o,this.culledTiles,this._renderOrder)},copy:function(o,c,p,v,m,S,M){return l.Copy(o,c,p,v,m,S,M,this.layer),this},fill:function(o,c,p,v,m,S){return l.Fill(o,c,p,v,m,S,this.layer),this},filterTiles:function(o,c,p,v,m,S,M){return l.FilterTiles(o,c,p,v,m,S,M,this.layer)},findByIndex:function(o,c,p){return l.FindByIndex(o,c,p,this.layer)},findTile:function(o,c,p,v,m,S,M){return l.FindTile(o,c,p,v,m,S,M,this.layer)},forEachTile:function(o,c,p,v,m,S,M){return l.ForEachTile(o,c,p,v,m,S,M,this.layer),this},setTint:function(o,c,p,v,m,S){o===void 0&&(o=16777215);var M=function(w){w.tint=o,w.tintFill=!1};return this.forEachTile(M,this,c,p,v,m,S)},setTintFill:function(o,c,p,v,m,S){o===void 0&&(o=16777215);var M=function(w){w.tint=o,w.tintFill=!0};return this.forEachTile(M,this,c,p,v,m,S)},getTileAt:function(o,c,p){return l.GetTileAt(o,c,p,this.layer)},getTileAtWorldXY:function(o,c,p,v){return l.GetTileAtWorldXY(o,c,p,v,this.layer)},getIsoTileAtWorldXY:function(o,c,p,v,m){p===void 0&&(p=!0);var S=this.tempVec;return l.IsometricWorldToTileXY(o,c,!0,S,m,this.layer,p),this.getTileAt(S.x,S.y,v)},getTilesWithin:function(o,c,p,v,m){return l.GetTilesWithin(o,c,p,v,m,this.layer)},getTilesWithinShape:function(o,c,p){return l.GetTilesWithinShape(o,c,p,this.layer)},getTilesWithinWorldXY:function(o,c,p,v,m,S){return l.GetTilesWithinWorldXY(o,c,p,v,m,S,this.layer)},hasTileAt:function(o,c){return l.HasTileAt(o,c,this.layer)},hasTileAtWorldXY:function(o,c,p){return l.HasTileAtWorldXY(o,c,p,this.layer)},putTileAt:function(o,c,p,v){return l.PutTileAt(o,c,p,v,this.layer)},putTileAtWorldXY:function(o,c,p,v,m){return l.PutTileAtWorldXY(o,c,p,v,m,this.layer)},putTilesAt:function(o,c,p,v){return l.PutTilesAt(o,c,p,v,this.layer),this},randomize:function(o,c,p,v,m){return l.Randomize(o,c,p,v,m,this.layer),this},removeTileAt:function(o,c,p,v){return l.RemoveTileAt(o,c,p,v,this.layer)},removeTileAtWorldXY:function(o,c,p,v,m){return l.RemoveTileAtWorldXY(o,c,p,v,m,this.layer)},renderDebug:function(o,c){return l.RenderDebug(o,c,this.layer),this},replaceByIndex:function(o,c,p,v,m,S){return l.ReplaceByIndex(o,c,p,v,m,S,this.layer),this},setSkipCull:function(o){return o===void 0&&(o=!0),this.skipCull=o,this},setCullPadding:function(o,c){return o===void 0&&(o=1),c===void 0&&(c=1),this.cullPaddingX=o,this.cullPaddingY=c,this},setCollision:function(o,c,p,v){return l.SetCollision(o,c,p,this.layer,v),this},setCollisionBetween:function(o,c,p,v){return l.SetCollisionBetween(o,c,p,v,this.layer),this},setCollisionByProperty:function(o,c,p){return l.SetCollisionByProperty(o,c,p,this.layer),this},setCollisionByExclusion:function(o,c,p){return l.SetCollisionByExclusion(o,c,p,this.layer),this},setCollisionFromCollisionGroup:function(o,c){return l.SetCollisionFromCollisionGroup(o,c,this.layer),this},setTileIndexCallback:function(o,c,p){return l.SetTileIndexCallback(o,c,p,this.layer),this},setTileLocationCallback:function(o,c,p,v,m,S){return l.SetTileLocationCallback(o,c,p,v,m,S,this.layer),this},shuffle:function(o,c,p,v){return l.Shuffle(o,c,p,v,this.layer),this},swapByIndex:function(o,c,p,v,m,S){return l.SwapByIndex(o,c,p,v,m,S,this.layer),this},tileToWorldX:function(o,c){return this.tilemap.tileToWorldX(o,c,this)},tileToWorldY:function(o,c){return this.tilemap.tileToWorldY(o,c,this)},tileToWorldXY:function(o,c,p,v){return this.tilemap.tileToWorldXY(o,c,p,v,this)},getTileCorners:function(o,c,p){return this.tilemap.getTileCorners(o,c,p,this)},weightedRandomize:function(o,c,p,v,m){return l.WeightedRandomize(c,p,v,m,o,this.layer),this},worldToTileX:function(o,c,p){return this.tilemap.worldToTileX(o,c,p,this)},worldToTileY:function(o,c,p){return this.tilemap.worldToTileY(o,c,p,this)},worldToTileXY:function(o,c,p,v,m){return this.tilemap.worldToTileXY(o,c,p,v,m,this)},destroy:function(o){o===void 0&&(o=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),o&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],a.prototype.destroy.call(this))}});s.exports=f},16153:(s,y,e)=>{/** + */var r=e(83419),d=e(78389),h=e(31401),a=e(95643),l=e(81086),n=e(19218),u=e(26099),f=new r({Extends:a,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.Transform,h.Visible,h.ScrollFactor,d,n],initialize:function(c,p,v,m,S,M){a.call(this,c,"TilemapLayer"),this.isTilemap=!0,this.tilemap=p,this.layerIndex=v,this.layer=p.layers[v],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=l.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new u,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(m),this.setAlpha(this.layer.alpha),this.setPosition(S,M),this.setOrigin(0,0),this.setSize(p.tileWidth*this.layer.width,p.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(o){var c=[],p=[],v=this.tilemap;Array.isArray(o)||(o=[o]);for(var m=0;m=0&&o<4&&(this._renderOrder=o),this},calculateFacesAt:function(o,c){return l.CalculateFacesAt(o,c,this.layer),this},calculateFacesWithin:function(o,c,p,v){return l.CalculateFacesWithin(o,c,p,v,this.layer),this},createFromTiles:function(o,c,p,v,m){return l.CreateFromTiles(o,c,p,v,m,this.layer)},cull:function(o){return this.cullCallback(this.layer,o,this.culledTiles,this._renderOrder)},copy:function(o,c,p,v,m,S,M){return l.Copy(o,c,p,v,m,S,M,this.layer),this},fill:function(o,c,p,v,m,S){return l.Fill(o,c,p,v,m,S,this.layer),this},filterTiles:function(o,c,p,v,m,S,M){return l.FilterTiles(o,c,p,v,m,S,M,this.layer)},findByIndex:function(o,c,p){return l.FindByIndex(o,c,p,this.layer)},findTile:function(o,c,p,v,m,S,M){return l.FindTile(o,c,p,v,m,S,M,this.layer)},forEachTile:function(o,c,p,v,m,S,M){return l.ForEachTile(o,c,p,v,m,S,M,this.layer),this},setTint:function(o,c,p,v,m,S){o===void 0&&(o=16777215);var M=function(w){w.tint=o,w.tintFill=!1};return this.forEachTile(M,this,c,p,v,m,S)},setTintFill:function(o,c,p,v,m,S){o===void 0&&(o=16777215);var M=function(w){w.tint=o,w.tintFill=!0};return this.forEachTile(M,this,c,p,v,m,S)},getTileAt:function(o,c,p){return l.GetTileAt(o,c,p,this.layer)},getTileAtWorldXY:function(o,c,p,v){return l.GetTileAtWorldXY(o,c,p,v,this.layer)},getIsoTileAtWorldXY:function(o,c,p,v,m){p===void 0&&(p=!0);var S=this.tempVec;return l.IsometricWorldToTileXY(o,c,!0,S,m,this.layer,p),this.getTileAt(S.x,S.y,v)},getTilesWithin:function(o,c,p,v,m){return l.GetTilesWithin(o,c,p,v,m,this.layer)},getTilesWithinShape:function(o,c,p){return l.GetTilesWithinShape(o,c,p,this.layer)},getTilesWithinWorldXY:function(o,c,p,v,m,S){return l.GetTilesWithinWorldXY(o,c,p,v,m,S,this.layer)},hasTileAt:function(o,c){return l.HasTileAt(o,c,this.layer)},hasTileAtWorldXY:function(o,c,p){return l.HasTileAtWorldXY(o,c,p,this.layer)},putTileAt:function(o,c,p,v){return l.PutTileAt(o,c,p,v,this.layer)},putTileAtWorldXY:function(o,c,p,v,m){return l.PutTileAtWorldXY(o,c,p,v,m,this.layer)},putTilesAt:function(o,c,p,v){return l.PutTilesAt(o,c,p,v,this.layer),this},randomize:function(o,c,p,v,m){return l.Randomize(o,c,p,v,m,this.layer),this},removeTileAt:function(o,c,p,v){return l.RemoveTileAt(o,c,p,v,this.layer)},removeTileAtWorldXY:function(o,c,p,v,m){return l.RemoveTileAtWorldXY(o,c,p,v,m,this.layer)},renderDebug:function(o,c){return l.RenderDebug(o,c,this.layer),this},replaceByIndex:function(o,c,p,v,m,S){return l.ReplaceByIndex(o,c,p,v,m,S,this.layer),this},setSkipCull:function(o){return o===void 0&&(o=!0),this.skipCull=o,this},setCullPadding:function(o,c){return o===void 0&&(o=1),c===void 0&&(c=1),this.cullPaddingX=o,this.cullPaddingY=c,this},setCollision:function(o,c,p,v){return l.SetCollision(o,c,p,this.layer,v),this},setCollisionBetween:function(o,c,p,v){return l.SetCollisionBetween(o,c,p,v,this.layer),this},setCollisionByProperty:function(o,c,p){return l.SetCollisionByProperty(o,c,p,this.layer),this},setCollisionByExclusion:function(o,c,p){return l.SetCollisionByExclusion(o,c,p,this.layer),this},setCollisionFromCollisionGroup:function(o,c){return l.SetCollisionFromCollisionGroup(o,c,this.layer),this},setTileIndexCallback:function(o,c,p){return l.SetTileIndexCallback(o,c,p,this.layer),this},setTileLocationCallback:function(o,c,p,v,m,S){return l.SetTileLocationCallback(o,c,p,v,m,S,this.layer),this},shuffle:function(o,c,p,v){return l.Shuffle(o,c,p,v,this.layer),this},swapByIndex:function(o,c,p,v,m,S){return l.SwapByIndex(o,c,p,v,m,S,this.layer),this},tileToWorldX:function(o,c){return this.tilemap.tileToWorldX(o,c,this)},tileToWorldY:function(o,c){return this.tilemap.tileToWorldY(o,c,this)},tileToWorldXY:function(o,c,p,v){return this.tilemap.tileToWorldXY(o,c,p,v,this)},getTileCorners:function(o,c,p){return this.tilemap.getTileCorners(o,c,p,this)},weightedRandomize:function(o,c,p,v,m){return l.WeightedRandomize(c,p,v,m,o,this.layer),this},worldToTileX:function(o,c,p){return this.tilemap.worldToTileX(o,c,p,this)},worldToTileY:function(o,c,p){return this.tilemap.worldToTileY(o,c,p,this)},worldToTileXY:function(o,c,p,v,m){return this.tilemap.worldToTileXY(o,c,p,v,m,this)},destroy:function(o){o===void 0&&(o=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),o&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],a.prototype.destroy.call(this))}});s.exports=f},16153:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(61340),d=new r,h=new r,a=new r,l=function(n,u,f,o){var c=u.cull(f),p=c.length,v=f.alpha*u.alpha;if(!(p===0||v<=0)){var m=d,S=h,M=a;S.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY),m.copyFrom(f.matrix);var w=n.currentContext,C=u.gidMap;w.save(),o?(m.multiplyWithOffset(o,-f.scrollX*u.scrollFactorX,-f.scrollY*u.scrollFactorY),S.e=u.x,S.f=u.y,m.multiply(S,M),M.copyToContext(w)):(S.e-=f.scrollX*u.scrollFactorX,S.f-=f.scrollY*u.scrollFactorY,S.copyToContext(w)),(!n.antialias||u.scaleX>1||u.scaleY>1)&&(w.imageSmoothingEnabled=!1);for(var A=0;A{/** + */var r=e(61340),d=new r,h=new r,a=new r,l=function(n,u,f,o){var c=u.cull(f),p=c.length,v=f.alpha*u.alpha;if(!(p===0||v<=0)){var m=d,S=h,M=a;S.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY),m.copyFrom(f.matrix);var w=n.currentContext,C=u.gidMap;w.save(),o?(m.multiplyWithOffset(o,-f.scrollX*u.scrollFactorX,-f.scrollY*u.scrollFactorY),S.e=u.x,S.f=u.y,m.multiply(S,M),M.copyToContext(w)):(S.e-=f.scrollX*u.scrollFactorX,S.f-=f.scrollY*u.scrollFactorY,S.copyToContext(w)),(!n.antialias||u.scaleX>1||u.scaleY>1)&&(w.imageSmoothingEnabled=!1);for(var A=0;A{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(29747),d=r,h=r;d=e(99558),h=e(16153),s.exports={renderWebGL:d,renderCanvas:h}},99558:(s,y,e)=>{/** + */var r=e(29747),d=r,h=r;d=e(99558),h=e(16153),s.exports={renderWebGL:d,renderCanvas:h}},99558:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(70554),d=function(h,a,l){var n=a.cull(l),u=n.length,f=l.alpha*a.alpha;if(!(u===0||f<=0)){var o=a.gidMap,c=h.pipelines.set(a.pipeline,a),p=r.getTintAppendFloatAlpha,v=a.scrollFactorX,m=a.scrollFactorY,S=a.x,M=a.y,w=a.scaleX,C=a.scaleY;h.pipelines.preBatch(a);for(var A=0;A{/** + */var r=e(70554),d=function(h,a,l){var n=a.cull(l),u=n.length,f=l.alpha*a.alpha;if(!(u===0||f<=0)){var o=a.gidMap,c=h.pipelines.set(a.pipeline,a),p=r.getTintAppendFloatAlpha,v=a.scrollFactorX,m=a.scrollFactorY,S=a.x,M=a.y,w=a.scaleX,C=a.scaleY;h.pipelines.preBatch(a);for(var A=0;A{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(26099),h=new r({initialize:function(l,n,u,f,o,c,p,v,m){(u===void 0||u<=0)&&(u=32),(f===void 0||f<=0)&&(f=32),o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p={}),v===void 0&&(v={}),this.name=l,this.firstgid=n,this.tileWidth=u,this.tileHeight=f,this.tileMargin=o,this.tileSpacing=c,this.tileProperties=p,this.tileData=v,this.tileOffset=new d,m!==void 0&&this.tileOffset.set(m.x,m.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(a){return this.containsTileIndex(a)?this.tileProperties[a-this.firstgid]:null},getTileData:function(a){return this.containsTileIndex(a)?this.tileData[a-this.firstgid]:null},getTileCollisionGroup:function(a){var l=this.getTileData(a);return l&&l.objectgroup?l.objectgroup:null},containsTileIndex:function(a){return a>=this.firstgid&&an.width||l.height>n.height?this.updateTileData(l.width,l.height):this.updateTileData(n.width,n.height,n.x,n.y),this},setTileSize:function(a,l){return a!==void 0&&(this.tileWidth=a),l!==void 0&&(this.tileHeight=l),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(a,l){return a!==void 0&&(this.tileMargin=a),l!==void 0&&(this.tileSpacing=l),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(a,l,n,u){n===void 0&&(n=0),u===void 0&&(u=0);var f=(l-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),o=(a-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(f%1!==0||o%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),f=Math.floor(f),o=Math.floor(o),this.rows=f,this.columns=o,this.total=f*o,this.texCoordinates.length=0;for(var c=this.tileMargin+n,p=this.tileMargin+u,v=0;v{/** + */var r=e(83419),d=e(26099),h=new r({initialize:function(l,n,u,f,o,c,p,v,m){(u===void 0||u<=0)&&(u=32),(f===void 0||f<=0)&&(f=32),o===void 0&&(o=0),c===void 0&&(c=0),p===void 0&&(p={}),v===void 0&&(v={}),this.name=l,this.firstgid=n,this.tileWidth=u,this.tileHeight=f,this.tileMargin=o,this.tileSpacing=c,this.tileProperties=p,this.tileData=v,this.tileOffset=new d,m!==void 0&&this.tileOffset.set(m.x,m.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(a){return this.containsTileIndex(a)?this.tileProperties[a-this.firstgid]:null},getTileData:function(a){return this.containsTileIndex(a)?this.tileData[a-this.firstgid]:null},getTileCollisionGroup:function(a){var l=this.getTileData(a);return l&&l.objectgroup?l.objectgroup:null},containsTileIndex:function(a){return a>=this.firstgid&&an.width||l.height>n.height?this.updateTileData(l.width,l.height):this.updateTileData(n.width,n.height,n.x,n.y),this},setTileSize:function(a,l){return a!==void 0&&(this.tileWidth=a),l!==void 0&&(this.tileHeight=l),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(a,l){return a!==void 0&&(this.tileMargin=a),l!==void 0&&(this.tileSpacing=l),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(a,l,n,u){n===void 0&&(n=0),u===void 0&&(u=0);var f=(l-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),o=(a-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(f%1!==0||o%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),f=Math.floor(f),o=Math.floor(o),this.rows=f,this.columns=o,this.total=f*o,this.texCoordinates.length=0;for(var c=this.tileMargin+n,p=this.tileMargin+u,v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7423),d=function(h,a,l){var n=r(h,a,!0,l),u=r(h,a-1,!0,l),f=r(h,a+1,!0,l),o=r(h-1,a,!0,l),c=r(h+1,a,!0,l),p=n&&n.collides;return p&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),u&&u.collides&&(p&&(n.faceTop=!1),u.faceBottom=!p),f&&f.collides&&(p&&(n.faceBottom=!1),f.faceTop=!p),o&&o.collides&&(p&&(n.faceLeft=!1),o.faceRight=!p),c&&c.collides&&(p&&(n.faceRight=!1),c.faceLeft=!p),n&&!n.collides&&n.resetFaces(),n};s.exports=d},42573:(s,y,e)=>{/** + */var r=e(7423),d=function(h,a,l){var n=r(h,a,!0,l),u=r(h,a-1,!0,l),f=r(h,a+1,!0,l),o=r(h-1,a,!0,l),c=r(h+1,a,!0,l),p=n&&n.collides;return p&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),u&&u.collides&&(p&&(n.faceTop=!1),u.faceBottom=!p),f&&f.collides&&(p&&(n.faceBottom=!1),f.faceTop=!p),o&&o.collides&&(p&&(n.faceLeft=!1),o.faceRight=!p),c&&c.collides&&(p&&(n.faceRight=!1),c.faceLeft=!p),n&&!n.collides&&n.resetFaces(),n};s.exports=d},42573:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7423),d=e(7386),h=function(a,l,n,u,f){for(var o=null,c=null,p=null,v=null,m=d(a,l,n,u,null,f),S=0;S{/** + */var r=e(7423),d=e(7386),h=function(a,l,n,u,f){for(var o=null,c=null,p=null,v=null,m=d(a,l,n,u,null,f),S=0;S{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26099),d=new r,h=function(a,l,n,u){var f=n.tilemapLayer,o=f.cullPaddingX,c=f.cullPaddingY,p=f.tilemap.tileToWorldXY(a,l,d,u,f);return p.x>u.worldView.x+f.scaleX*n.tileWidth*(-o-.5)&&p.xu.worldView.y+f.scaleY*n.tileHeight*(-c-1)&&p.y{/** + */var r=e(26099),d=new r,h=function(a,l,n,u){var f=n.tilemapLayer,o=f.cullPaddingX,c=f.cullPaddingY,p=f.tilemap.tileToWorldXY(a,l,d,u,f);return p.x>u.worldView.x+f.scaleX*n.tileWidth*(-o-.5)&&p.xu.worldView.y+f.scaleY*n.tileHeight*(-c-1)&&p.y{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(42573),d=e(7386),h=e(62991),a=e(23029),l=function(n,u,f,o,c,p,v,m){v===void 0&&(v=!0);var S=d(n,u,f,o,null,m),M=[];S.forEach(function(I){var D=new a(I.layer,I.index,I.x,I.y,I.width,I.height,I.baseWidth,I.baseHeight);D.copy(I),M.push(D)});for(var w=c-n,C=p-u,A=0;A{/** + */var r=e(42573),d=e(7386),h=e(62991),a=e(23029),l=function(n,u,f,o,c,p,v,m){v===void 0&&(v=!0);var S=d(n,u,f,o,null,m),M=[];S.forEach(function(I){var D=new a(I.layer,I.index,I.x,I.y,I.width,I.height,I.baseWidth,I.baseHeight);D.copy(I),M.push(D)});for(var w=c-n,C=p-u,A=0;A{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(62644),d=e(7386),h=e(27987),a=function(l,n,u,f,o,c){u||(u={}),Array.isArray(l)||(l=[l]);var p=c.tilemapLayer;f||(f=p.scene),o||(o=f.cameras.main);var v=c.width,m=c.height,S=d(0,0,v,m,null,c),M=[],w,C=function(O,I,D){for(var B=0;B{/** + */var r=e(62644),d=e(7386),h=e(27987),a=function(l,n,u,f,o,c){u||(u={}),Array.isArray(l)||(l=[l]);var p=c.tilemapLayer;f||(f=p.scene),o||(o=f.cameras.main);var v=c.width,m=c.height,S=d(0,0,v,m,null,c),M=[],w,C=function(O,I,D){for(var B=0;B{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(87841),d=e(63448),h=e(56583),a=new r,l=function(n,u){var f=n.tilemapLayer.tilemap,o=n.tilemapLayer,c=Math.floor(f.tileWidth*o.scaleX),p=Math.floor(f.tileHeight*o.scaleY),v=h(u.worldView.x-o.x,c,0,!0)-o.cullPaddingX,m=d(u.worldView.right-o.x,c,0,!0)+o.cullPaddingX,S=h(u.worldView.y-o.y,p,0,!0)-o.cullPaddingY,M=d(u.worldView.bottom-o.y,p,0,!0)+o.cullPaddingY;return a.setTo(v,S,m-v,M-S)};s.exports=l},30003:(s,y,e)=>{/** + */var r=e(87841),d=e(63448),h=e(56583),a=new r,l=function(n,u){var f=n.tilemapLayer.tilemap,o=n.tilemapLayer,c=Math.floor(f.tileWidth*o.scaleX),p=Math.floor(f.tileHeight*o.scaleY),v=h(u.worldView.x-o.x,c,0,!0)-o.cullPaddingX,m=d(u.worldView.right-o.x,c,0,!0)+o.cullPaddingX,S=h(u.worldView.y-o.y,p,0,!0)-o.cullPaddingY,M=d(u.worldView.bottom-o.y,p,0,!0)+o.cullPaddingY;return a.setTo(v,S,m-v,M-S)};s.exports=l},30003:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(19545),d=e(32483),h=function(a,l,n,u){n===void 0&&(n=[]),u===void 0&&(u=0),n.length=0;var f=a.tilemapLayer,o=r(a,l);return(f.skipCull||f.scrollFactorX!==1||f.scrollFactorY!==1)&&(o.left=0,o.right=a.width,o.top=0,o.bottom=a.height),d(a,o,u,n),n};s.exports=h},35137:(s,y,e)=>{/** + */var r=e(19545),d=e(32483),h=function(a,l,n,u){n===void 0&&(n=[]),u===void 0&&(u=0),n.length=0;var f=a.tilemapLayer,o=r(a,l);return(f.skipCull||f.scrollFactorX!==1||f.scrollFactorY!==1)&&(o.left=0,o.right=a.width,o.top=0,o.bottom=a.height),d(a,o,u,n),n};s.exports=h},35137:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7386),d=e(42573),h=e(20576),a=function(l,n,u,f,o,c,p){for(var v=p.collideIndexes.indexOf(l)!==-1,m=r(n,u,f,o,null,p),S=0;S{/** + */var r=e(7386),d=e(42573),h=e(20576),a=function(l,n,u,f,o,c,p){for(var v=p.collideIndexes.indexOf(l)!==-1,m=r(n,u,f,o,null,p),S=0;S{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5530,95 +5530,95 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){r===void 0&&(r=0),d===void 0&&(d=!1);var a=0,l,n,u;if(d){for(n=h.height-1;n>=0;n--)for(l=h.width-1;l>=0;l--)if(u=h.data[n][l],u&&u.index===e){if(a===r)return u;a+=1}}else for(n=0;n{/** + */var x=function(e,r,d,h){r===void 0&&(r=0),d===void 0&&(d=!1);var a=0,l,n,u;if(d){for(n=h.height-1;n>=0;n--)for(l=h.width-1;l>=0;l--)if(u=h.data[n][l],u&&u.index===e){if(a===r)return u;a+=1}}else for(n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7386),d=function(h,a,l,n,u,f,o,c){var p=r(l,n,u,f,o,c);return p.find(h,a)||null};s.exports=d},97560:(s,y,e)=>{/** + */var r=e(7386),d=function(h,a,l,n,u,f,o,c){var p=r(l,n,u,f,o,c);return p.find(h,a)||null};s.exports=d},97560:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7386),d=function(h,a,l,n,u,f,o,c){var p=r(l,n,u,f,o,c);p.forEach(h,a)};s.exports=d},43305:(s,y,e)=>{/** + */var r=e(7386),d=function(h,a,l,n,u,f,o,c){var p=r(l,n,u,f,o,c);p.forEach(h,a)};s.exports=d},43305:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91907),d=e(30003),h=e(9474),a=e(14018),l=e(29747),n=e(54503),u=function(f){return f===r.ORTHOGONAL?d:f===r.HEXAGONAL?h:f===r.STAGGERED?n:f===r.ISOMETRIC?a:l};s.exports=u},7423:(s,y,e)=>{/** + */var r=e(91907),d=e(30003),h=e(9474),a=e(14018),l=e(29747),n=e(54503),u=function(f){return f===r.ORTHOGONAL?d:f===r.HEXAGONAL?h:f===r.STAGGERED?n:f===r.ISOMETRIC?a:l};s.exports=u},7423:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(62991),d=function(h,a,l,n){if(l===void 0&&(l=!1),r(h,a,n)){var u=n.data[a][h]||null;return u?u.index===-1?l?u:null:u:null}else return null};s.exports=d},60540:(s,y,e)=>{/** + */var r=e(62991),d=function(h,a,l,n){if(l===void 0&&(l=!1),r(h,a,n)){var u=n.data[a][h]||null;return u?u.index===-1?l?u:null:u:null}else return null};s.exports=d},60540:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7423),d=e(26099),h=new d,a=function(l,n,u,f,o){return o.tilemapLayer.worldToTileXY(l,n,!0,h,f),r(h.x,h.y,u,o)};s.exports=a},55826:(s,y,e)=>{/** + */var r=e(7423),d=e(26099),h=new d,a=function(l,n,u,f,o){return o.tilemapLayer.worldToTileXY(l,n,!0,h,f),r(h.x,h.y,u,o)};s.exports=a},55826:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26099),d=function(h,a,l,n){var u=n.baseTileWidth,f=n.baseTileHeight,o=n.tilemapLayer,c=0,p=0;o&&(l||(l=o.scene.cameras.main),c=o.x+l.scrollX*(1-o.scrollFactorX),p=o.y+l.scrollY*(1-o.scrollFactorY),u*=o.scaleX,f*=o.scaleY);var v=c+h*u,m=p+a*f;return[new r(v,m),new r(v+u,m),new r(v+u,m+f),new r(v,m+f)]};s.exports=d},11758:(s,y,e)=>{/** + */var r=e(26099),d=function(h,a,l,n){var u=n.baseTileWidth,f=n.baseTileHeight,o=n.tilemapLayer,c=0,p=0;o&&(l||(l=o.scene.cameras.main),c=o.x+l.scrollX*(1-o.scrollFactorX),p=o.y+l.scrollY*(1-o.scrollFactorY),u*=o.scaleX,f*=o.scaleY);var v=c+h*u,m=p+a*f;return[new r(v,m),new r(v+u,m),new r(v+u,m+f),new r(v,m+f)]};s.exports=d},11758:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91907),d=e(27229),h=e(29747),a=e(55826),l=function(n){return n===r.ORTHOGONAL?a:n===r.ISOMETRIC?h:n===r.HEXAGONAL?d:(n===r.STAGGERED,h)};s.exports=l},39167:(s,y,e)=>{/** + */var r=e(91907),d=e(27229),h=e(29747),a=e(55826),l=function(n){return n===r.ORTHOGONAL?a:n===r.ISOMETRIC?h:n===r.HEXAGONAL?d:(n===r.STAGGERED,h)};s.exports=l},39167:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91907),d=e(29747),h=e(97281),a=function(l){return l===r.ORTHOGONAL?h:d};s.exports=a},62e3:(s,y,e)=>{/** + */var r=e(91907),d=e(29747),h=e(97281),a=function(l){return l===r.ORTHOGONAL?h:d};s.exports=a},62e3:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91907),d=e(19951),h=e(14127),a=e(29747),l=e(97202),n=e(70326),u=function(f){return f===r.ORTHOGONAL?n:f===r.ISOMETRIC?h:f===r.HEXAGONAL?d:f===r.STAGGERED?l:a};s.exports=u},5984:(s,y,e)=>{/** + */var r=e(91907),d=e(19951),h=e(14127),a=e(29747),l=e(97202),n=e(70326),u=function(f){return f===r.ORTHOGONAL?n:f===r.ISOMETRIC?h:f===r.HEXAGONAL?d:f===r.STAGGERED?l:a};s.exports=u},5984:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91907),d=e(29747),h=e(28054),a=e(29650),l=function(n){return n===r.ORTHOGONAL?a:n===r.STAGGERED?h:d};s.exports=l},7386:(s,y,e)=>{/** + */var r=e(91907),d=e(29747),h=e(28054),a=e(29650),l=function(n){return n===r.ORTHOGONAL?a:n===r.STAGGERED?h:d};s.exports=l},7386:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(95540),d=function(h,a,l,n,u,f){h===void 0&&(h=0),a===void 0&&(a=0),l===void 0&&(l=f.width),n===void 0&&(n=f.height),u||(u={});var o=r(u,"isNotEmpty",!1),c=r(u,"isColliding",!1),p=r(u,"hasInterestingFace",!1);h<0&&(l+=h,h=0),a<0&&(n+=a,a=0),h+l>f.width&&(l=Math.max(f.width-h,0)),a+n>f.height&&(n=Math.max(f.height-a,0));for(var v=[],m=a;m{/** + */var r=e(95540),d=function(h,a,l,n,u,f){h===void 0&&(h=0),a===void 0&&(a=0),l===void 0&&(l=f.width),n===void 0&&(n=f.height),u||(u={});var o=r(u,"isNotEmpty",!1),c=r(u,"isColliding",!1),p=r(u,"hasInterestingFace",!1);h<0&&(l+=h,h=0),a<0&&(n+=a,a=0),h+l>f.width&&(l=Math.max(f.width-h,0)),a+n>f.height&&(n=Math.max(f.height-a,0));for(var v=[],m=a;m{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(55738),d=e(7386),h=e(91865),a=e(29747),l=e(26099),n=function(p,v){return h.RectangleToTriangle(v,p)},u=new l,f=new l,o=new l,c=function(p,v,m,S){if(p===void 0)return[];var M=a;p instanceof r.Circle?M=h.CircleToRectangle:p instanceof r.Rectangle?M=h.RectangleToRectangle:p instanceof r.Triangle?M=n:p instanceof r.Line&&(M=h.LineToRectangle),S.tilemapLayer.worldToTileXY(p.left,p.top,!0,f,m);var w=f.x,C=f.y;S.tilemapLayer.worldToTileXY(p.right,p.bottom,!1,o,m);var A=Math.ceil(o.x),P=Math.ceil(o.y),b=Math.max(A-w,1),O=Math.max(P-C,1),I=d(w,C,b,O,v,S),D=S.tileWidth,B=S.tileHeight;S.tilemapLayer&&(D*=S.tilemapLayer.scaleX,B*=S.tilemapLayer.scaleY);for(var G=[],z=new r.Rectangle(0,0,D,B),X=0;X{/** + */var r=e(55738),d=e(7386),h=e(91865),a=e(29747),l=e(26099),n=function(p,v){return h.RectangleToTriangle(v,p)},u=new l,f=new l,o=new l,c=function(p,v,m,S){if(p===void 0)return[];var M=a;p instanceof r.Circle?M=h.CircleToRectangle:p instanceof r.Rectangle?M=h.RectangleToRectangle:p instanceof r.Triangle?M=n:p instanceof r.Line&&(M=h.LineToRectangle),S.tilemapLayer.worldToTileXY(p.left,p.top,!0,f,m);var w=f.x,C=f.y;S.tilemapLayer.worldToTileXY(p.right,p.bottom,!1,o,m);var A=Math.ceil(o.x),P=Math.ceil(o.y),b=Math.max(A-w,1),O=Math.max(P-C,1),I=d(w,C,b,O,v,S),D=S.tileWidth,B=S.tileHeight;S.tilemapLayer&&(D*=S.tilemapLayer.scaleX,B*=S.tilemapLayer.scaleY);for(var G=[],z=new r.Rectangle(0,0,D,B),X=0;X{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7386),d=e(26099),h=new d,a=new d,l=function(n,u,f,o,c,p,v){var m=v.tilemapLayer.tilemap._convert.WorldToTileXY;m(n,u,!0,h,p,v);var S=h.x,M=h.y;m(n+f,u+o,!1,a,p,v);var w=Math.ceil(a.x),C=Math.ceil(a.y);return r(S,M,w-S,C-M,c,v)};s.exports=l},96113:(s,y,e)=>{/** + */var r=e(7386),d=e(26099),h=new d,a=new d,l=function(n,u,f,o,c,p,v){var m=v.tilemapLayer.tilemap._convert.WorldToTileXY;m(n,u,!0,h,p,v);var S=h.x,M=h.y;m(n+f,u+o,!1,a,p,v);var w=Math.ceil(a.x),C=Math.ceil(a.y);return r(S,M,w-S,C-M,c,v)};s.exports=l},96113:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91907),d=e(20242),h=e(10095),a=function(l){return l===r.ORTHOGONAL?h:d};s.exports=a},16926:(s,y,e)=>{/** + */var r=e(91907),d=e(20242),h=e(10095),a=function(l){return l===r.ORTHOGONAL?h:d};s.exports=a},16926:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91907),d=e(86625),h=e(96897),a=e(29747),l=e(15108),n=e(85896),u=function(f){return f===r.ORTHOGONAL?n:f===r.ISOMETRIC?h:f===r.HEXAGONAL?d:f===r.STAGGERED?l:a};s.exports=u},55762:(s,y,e)=>{/** + */var r=e(91907),d=e(86625),h=e(96897),a=e(29747),l=e(15108),n=e(85896),u=function(f){return f===r.ORTHOGONAL?n:f===r.ISOMETRIC?h:f===r.HEXAGONAL?d:f===r.STAGGERED?l:a};s.exports=u},55762:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91907),d=e(20242),h=e(51900),a=e(63288),l=function(n){return n===r.ORTHOGONAL?a:n===r.STAGGERED?h:d};s.exports=l},45091:(s,y,e)=>{/** + */var r=e(91907),d=e(20242),h=e(51900),a=e(63288),l=function(n){return n===r.ORTHOGONAL?a:n===r.STAGGERED?h:d};s.exports=l},45091:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(62991),d=function(h,a,l){if(r(h,a,l)){var n=l.data[a][h];return n!==null&&n.index>-1}else return!1};s.exports=d},24152:(s,y,e)=>{/** + */var r=e(62991),d=function(h,a,l){if(r(h,a,l)){var n=l.data[a][h];return n!==null&&n.index>-1}else return!1};s.exports=d},24152:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(45091),d=e(26099),h=new d,a=function(l,n,u,f){f.tilemapLayer.worldToTileXY(l,n,!0,h,u);var o=h.x,c=h.y;return r(o,c,f)};s.exports=a},90454:(s,y,e)=>{/** + */var r=e(45091),d=e(26099),h=new d,a=function(l,n,u,f){f.tilemapLayer.worldToTileXY(l,n,!0,h,u);var o=h.x,c=h.y;return r(o,c,f)};s.exports=a},90454:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(63448),d=e(56583),h=function(a,l){var n=a.tilemapLayer.tilemap,u=a.tilemapLayer,f=Math.floor(n.tileWidth*u.scaleX),o=Math.floor(n.tileHeight*u.scaleY),c=a.hexSideLength,p,v,m,S;if(a.staggerAxis==="y"){var M=(o-c)/2+c;p=d(l.worldView.x-u.x,f,0,!0)-u.cullPaddingX,v=r(l.worldView.right-u.x,f,0,!0)+u.cullPaddingX,m=d(l.worldView.y-u.y,M,0,!0)-u.cullPaddingY,S=r(l.worldView.bottom-u.y,M,0,!0)+u.cullPaddingY}else{var w=(f-c)/2+c;p=d(l.worldView.x-u.x,w,0,!0)-u.cullPaddingX,v=r(l.worldView.right-u.x,w,0,!0)+u.cullPaddingX,m=d(l.worldView.y-u.y,o,0,!0)-u.cullPaddingY,S=r(l.worldView.bottom-u.y,o,0,!0)+u.cullPaddingY}return{left:p,right:v,top:m,bottom:S}};s.exports=h},9474:(s,y,e)=>{/** + */var r=e(63448),d=e(56583),h=function(a,l){var n=a.tilemapLayer.tilemap,u=a.tilemapLayer,f=Math.floor(n.tileWidth*u.scaleX),o=Math.floor(n.tileHeight*u.scaleY),c=a.hexSideLength,p,v,m,S;if(a.staggerAxis==="y"){var M=(o-c)/2+c;p=d(l.worldView.x-u.x,f,0,!0)-u.cullPaddingX,v=r(l.worldView.right-u.x,f,0,!0)+u.cullPaddingX,m=d(l.worldView.y-u.y,M,0,!0)-u.cullPaddingY,S=r(l.worldView.bottom-u.y,M,0,!0)+u.cullPaddingY}else{var w=(f-c)/2+c;p=d(l.worldView.x-u.x,w,0,!0)-u.cullPaddingX,v=r(l.worldView.right-u.x,w,0,!0)+u.cullPaddingX,m=d(l.worldView.y-u.y,o,0,!0)-u.cullPaddingY,S=r(l.worldView.bottom-u.y,o,0,!0)+u.cullPaddingY}return{left:p,right:v,top:m,bottom:S}};s.exports=h},9474:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(90454),d=e(32483),h=function(a,l,n,u){n===void 0&&(n=[]),u===void 0&&(u=0),n.length=0;var f=a.tilemapLayer,o=r(a,l);return f.skipCull&&f.scrollFactorX===1&&f.scrollFactorY===1&&(o.left=0,o.right=a.width,o.top=0,o.bottom=a.height),d(a,o,u,n),n};s.exports=h},27229:(s,y,e)=>{/** + */var r=e(90454),d=e(32483),h=function(a,l,n,u){n===void 0&&(n=[]),u===void 0&&(u=0),n.length=0;var f=a.tilemapLayer,o=r(a,l);return f.skipCull&&f.scrollFactorX===1&&f.scrollFactorY===1&&(o.left=0,o.right=a.width,o.top=0,o.bottom=a.height),d(a,o,u,n),n};s.exports=h},27229:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(19951),d=e(26099),h=new d,a=function(l,n,u,f){var o=f.baseTileWidth,c=f.baseTileHeight,p=f.tilemapLayer;p&&(o*=p.scaleX,c*=p.scaleY);var v=r(l,n,h,u,f),m=[],S=.5773502691896257,M,w;f.staggerAxis==="y"?(M=S*o,w=c/2):(M=o/2,w=S*c);for(var C=0;C<6;C++){var A=2*Math.PI*(.5-C)/6;m.push(new d(v.x+M*Math.cos(A),v.y+w*Math.sin(A)))}return m};s.exports=a},19951:(s,y,e)=>{/** + */var r=e(19951),d=e(26099),h=new d,a=function(l,n,u,f){var o=f.baseTileWidth,c=f.baseTileHeight,p=f.tilemapLayer;p&&(o*=p.scaleX,c*=p.scaleY);var v=r(l,n,h,u,f),m=[],S=.5773502691896257,M,w;f.staggerAxis==="y"?(M=S*o,w=c/2):(M=o/2,w=S*c);for(var C=0;C<6;C++){var A=2*Math.PI*(.5-C)/6;m.push(new d(v.x+M*Math.cos(A),v.y+w*Math.sin(A)))}return m};s.exports=a},19951:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26099),d=function(h,a,l,n,u){l||(l=new r);var f=u.baseTileWidth,o=u.baseTileHeight,c=u.tilemapLayer,p=0,v=0;c&&(n||(n=c.scene.cameras.main),p=c.x+n.scrollX*(1-c.scrollFactorX),v=c.y+n.scrollY*(1-c.scrollFactorY),f*=c.scaleX,o*=c.scaleY);var m=f/2,S=o/2,M,w;return u.staggerAxis==="y"?(M=p+f*h+f,w=v+1.5*a*S+S,a%2===0&&(this.staggerIndex==="odd"?M-=m:M+=m)):this.staggerAxis==="x"&&this.staggerIndex==="odd"&&(M=p+1.5*h*m+m,w=v+o*h+o,h%2===0&&(this.staggerIndex==="odd"?w-=S:w+=S)),l.set(M,w)};s.exports=d},86625:(s,y,e)=>{/** + */var r=e(26099),d=function(h,a,l,n,u){l||(l=new r);var f=u.baseTileWidth,o=u.baseTileHeight,c=u.tilemapLayer,p=0,v=0;c&&(n||(n=c.scene.cameras.main),p=c.x+n.scrollX*(1-c.scrollFactorX),v=c.y+n.scrollY*(1-c.scrollFactorY),f*=c.scaleX,o*=c.scaleY);var m=f/2,S=o/2,M,w;return u.staggerAxis==="y"?(M=p+f*h+f,w=v+1.5*a*S+S,a%2===0&&(this.staggerIndex==="odd"?M-=m:M+=m)):this.staggerAxis==="x"&&this.staggerIndex==="odd"&&(M=p+1.5*h*m+m,w=v+o*h+o,h%2===0&&(this.staggerIndex==="odd"?w-=S:w+=S)),l.set(M,w)};s.exports=d},86625:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5626,47 +5626,47 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return e>=0&&e=0&&r{/** + */var x=function(e,r,d){return e>=0&&e=0&&r{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(33528),d=function(h,a,l,n){l===void 0&&(l=[]),n===void 0&&(n=0),l.length=0;var u=h.tilemapLayer,f=h.data,o=h.width,c=h.height,p=u.skipCull,v=0,m=o,S=0,M=c,w,C,A;if(n===0)for(C=S;C=v;w--)A=f[C][w],!(!A||A.index===-1||!A.visible||A.alpha===0)&&(!p&&!r(w,C,h,a)||l.push(A));else if(n===2)for(C=M;C>=S;C--)for(w=v;w=S;C--)for(w=m;w>=v;w--)A=f[C][w],!(!A||A.index===-1||!A.visible||A.alpha===0)&&(!p&&!r(w,C,h,a)||l.push(A));return u.tilesDrawn=l.length,u.tilesTotal=o*c,l};s.exports=d},14127:(s,y,e)=>{/** + */var r=e(33528),d=function(h,a,l,n){l===void 0&&(l=[]),n===void 0&&(n=0),l.length=0;var u=h.tilemapLayer,f=h.data,o=h.width,c=h.height,p=u.skipCull,v=0,m=o,S=0,M=c,w,C,A;if(n===0)for(C=S;C=v;w--)A=f[C][w],!(!A||A.index===-1||!A.visible||A.alpha===0)&&(!p&&!r(w,C,h,a)||l.push(A));else if(n===2)for(C=M;C>=S;C--)for(w=v;w=S;C--)for(w=m;w>=v;w--)A=f[C][w],!(!A||A.index===-1||!A.visible||A.alpha===0)&&(!p&&!r(w,C,h,a)||l.push(A));return u.tilesDrawn=l.length,u.tilesTotal=o*c,l};s.exports=d},14127:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26099),d=function(h,a,l,n,u){l||(l=new r);var f=u.baseTileWidth,o=u.baseTileHeight,c=u.tilemapLayer,p=0,v=0;c&&(n||(n=c.scene.cameras.main),p=c.x+n.scrollX*(1-c.scrollFactorX),f*=c.scaleX,v=c.y+n.scrollY*(1-c.scrollFactorY),o*=c.scaleY);var m=p+(h-a)*(f/2),S=v+(h+a)*(o/2);return l.set(m,S)};s.exports=d},96897:(s,y,e)=>{/** + */var r=e(26099),d=function(h,a,l,n,u){l||(l=new r);var f=u.baseTileWidth,o=u.baseTileHeight,c=u.tilemapLayer,p=0,v=0;c&&(n||(n=c.scene.cameras.main),p=c.x+n.scrollX*(1-c.scrollFactorX),f*=c.scaleX,v=c.y+n.scrollY*(1-c.scrollFactorY),o*=c.scaleY);var m=p+(h-a)*(f/2),S=v+(h+a)*(o/2);return l.set(m,S)};s.exports=d},96897:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26099),d=function(h,a,l,n,u,f,o){n||(n=new r);var c=f.baseTileWidth,p=f.baseTileHeight,v=f.tilemapLayer;v&&(u||(u=v.scene.cameras.main),a=a-(v.y+u.scrollY*(1-v.scrollFactorY)),p*=v.scaleY,h=h-(v.x+u.scrollX*(1-v.scrollFactorX)),c*=v.scaleX);var m=c/2,S=p/2;h=h-m,o||(a=a-p);var M=.5*(h/m+a/S),w=.5*(-h/m+a/S);return l&&(M=Math.floor(M),w=Math.floor(w)),n.set(M,w)};s.exports=d},71558:(s,y,e)=>{/** + */var r=e(26099),d=function(h,a,l,n,u,f,o){n||(n=new r);var c=f.baseTileWidth,p=f.baseTileHeight,v=f.tilemapLayer;v&&(u||(u=v.scene.cameras.main),a=a-(v.y+u.scrollY*(1-v.scrollFactorY)),p*=v.scaleY,h=h-(v.x+u.scrollX*(1-v.scrollFactorX)),c*=v.scaleX);var m=c/2,S=p/2;h=h-m,o||(a=a-p);var M=.5*(h/m+a/S),w=.5*(-h/m+a/S);return l&&(M=Math.floor(M),w=Math.floor(w)),n.set(M,w)};s.exports=d},71558:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(23029),d=e(62991),h=e(72023),a=e(20576),l=function(n,u,f,o,c){if(o===void 0&&(o=!0),!d(u,f,c))return null;var p,v=c.data[f][u],m=v&&v.collides;n instanceof r?(c.data[f][u]===null&&(c.data[f][u]=new r(c,n.index,u,f,c.tileWidth,c.tileHeight)),c.data[f][u].copy(n)):(p=n,c.data[f][u]===null?c.data[f][u]=new r(c,p,u,f,c.tileWidth,c.tileHeight):c.data[f][u].index=p);var S=c.data[f][u],M=c.collideIndexes.indexOf(S.index)!==-1;if(p=n instanceof r?n.index:n,p===-1)S.width=c.tileWidth,S.height=c.tileHeight;else{var w=c.tilemapLayer.tilemap,C=w.tiles,A=C[p][2],P=w.tilesets[A];S.width=P.tileWidth,S.height=P.tileHeight}return a(S,M),o&&m!==S.collides&&h(u,f,c),S};s.exports=l},26303:(s,y,e)=>{/** + */var r=e(23029),d=e(62991),h=e(72023),a=e(20576),l=function(n,u,f,o,c){if(o===void 0&&(o=!0),!d(u,f,c))return null;var p,v=c.data[f][u],m=v&&v.collides;n instanceof r?(c.data[f][u]===null&&(c.data[f][u]=new r(c,n.index,u,f,c.tileWidth,c.tileHeight)),c.data[f][u].copy(n)):(p=n,c.data[f][u]===null?c.data[f][u]=new r(c,p,u,f,c.tileWidth,c.tileHeight):c.data[f][u].index=p);var S=c.data[f][u],M=c.collideIndexes.indexOf(S.index)!==-1;if(p=n instanceof r?n.index:n,p===-1)S.width=c.tileWidth,S.height=c.tileHeight;else{var w=c.tilemapLayer.tilemap,C=w.tiles,A=C[p][2],P=w.tilesets[A];S.width=P.tileWidth,S.height=P.tileHeight}return a(S,M),o&&m!==S.collides&&h(u,f,c),S};s.exports=l},26303:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(71558),d=e(26099),h=new d,a=function(l,n,u,f,o,c){return c.tilemapLayer.worldToTileXY(n,u,!0,h,o,c),r(l,h.x,h.y,f,c)};s.exports=a},14051:(s,y,e)=>{/** + */var r=e(71558),d=e(26099),h=new d,a=function(l,n,u,f,o,c){return c.tilemapLayer.worldToTileXY(n,u,!0,h,o,c),r(l,h.x,h.y,f,c)};s.exports=a},14051:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(42573),d=e(71558),h=function(a,l,n,u,f){if(u===void 0&&(u=!0),!Array.isArray(a))return null;Array.isArray(a[0])||(a=[a]);for(var o=a.length,c=a[0].length,p=0;p{/** + */var r=e(42573),d=e(71558),h=function(a,l,n,u,f){if(u===void 0&&(u=!0),!Array.isArray(a))return null;Array.isArray(a[0])||(a=[a]);for(var o=a.length,c=a[0].length,p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7386),d=e(26546),h=function(a,l,n,u,f,o){var c,p=r(a,l,n,u,{},o);if(!f)for(f=[],c=0;c{/** + */var r=e(7386),d=e(26546),h=function(a,l,n,u,f,o){var c,p=r(a,l,n,u,{},o);if(!f)for(f=[],c=0;c{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(23029),d=e(62991),h=e(72023),a=function(l,n,u,f,o){if(u===void 0&&(u=!0),f===void 0&&(f=!0),!d(l,n,o))return null;var c=o.data[n][l];if(c)o.data[n][l]=u?null:new r(o,-1,l,n,o.tileWidth,o.tileHeight);else return null;return f&&c&&c.collides&&h(l,n,o),c};s.exports=a},94178:(s,y,e)=>{/** + */var r=e(23029),d=e(62991),h=e(72023),a=function(l,n,u,f,o){if(u===void 0&&(u=!0),f===void 0&&(f=!0),!d(l,n,o))return null;var c=o.data[n][l];if(c)o.data[n][l]=u?null:new r(o,-1,l,n,o.tileWidth,o.tileHeight);else return null;return f&&c&&c.collides&&h(l,n,o),c};s.exports=a},94178:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(63557),d=e(26099),h=new d,a=function(l,n,u,f,o,c){return c.tilemapLayer.worldToTileXY(l,n,!0,h,o,c),r(h.x,h.y,u,f,c)};s.exports=a},15533:(s,y,e)=>{/** + */var r=e(63557),d=e(26099),h=new d,a=function(l,n,u,f,o,c){return c.tilemapLayer.worldToTileXY(l,n,!0,h,o,c),r(h.x,h.y,u,f,c)};s.exports=a},15533:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7386),d=e(3956),h=new d(105,210,231,150),a=new d(243,134,48,200),l=new d(40,39,37,150),n=function(u,f,o){f===void 0&&(f={});var c=f.tileColor!==void 0?f.tileColor:h,p=f.collidingTileColor!==void 0?f.collidingTileColor:a,v=f.faceColor!==void 0?f.faceColor:l,m=r(0,0,o.width,o.height,null,o);u.translateCanvas(o.tilemapLayer.x,o.tilemapLayer.y),u.scaleCanvas(o.tilemapLayer.scaleX,o.tilemapLayer.scaleY);for(var S=0;S{/** + */var r=e(7386),d=e(3956),h=new d(105,210,231,150),a=new d(243,134,48,200),l=new d(40,39,37,150),n=function(u,f,o){f===void 0&&(f={});var c=f.tileColor!==void 0?f.tileColor:h,p=f.collidingTileColor!==void 0?f.collidingTileColor:a,v=f.faceColor!==void 0?f.faceColor:l,m=r(0,0,o.width,o.height,null,o);u.translateCanvas(o.tilemapLayer.x,o.tilemapLayer.y),u.scaleCanvas(o.tilemapLayer.scaleX,o.tilemapLayer.scaleY);for(var S=0;S{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5674,23 +5674,23 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){var a=e.data,l=e.width,n=e.height,u=e.tilemapLayer,f=Math.max(0,r.left),o=Math.min(l,r.right),c=Math.max(0,r.top),p=Math.min(n,r.bottom),v,m,S;if(d===0)for(m=c;m=f;v--)S=a[m][v],!(!S||S.index===-1||!S.visible||S.alpha===0)&&h.push(S);else if(d===2)for(m=p;m>=c;m--)for(v=f;a[m]&&v=c;m--)for(v=o;a[m]&&v>=f;v--)S=a[m][v],!(!S||S.index===-1||!S.visible||S.alpha===0)&&h.push(S);return u.tilesDrawn=h.length,u.tilesTotal=l*n,h};s.exports=y},57068:(s,y,e)=>{/** + */var x=function(e,r,d,h){var a=e.data,l=e.width,n=e.height,u=e.tilemapLayer,f=Math.max(0,r.left),o=Math.min(l,r.right),c=Math.max(0,r.top),p=Math.min(n,r.bottom),v,m,S;if(d===0)for(m=c;m=f;v--)S=a[m][v],!(!S||S.index===-1||!S.visible||S.alpha===0)&&h.push(S);else if(d===2)for(m=p;m>=c;m--)for(v=f;a[m]&&v=c;m--)for(v=o;a[m]&&v>=f;v--)S=a[m][v],!(!S||S.index===-1||!S.visible||S.alpha===0)&&h.push(S);return u.tilesDrawn=h.length,u.tilesTotal=l*n,h};s.exports=x},57068:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(20576),d=e(42573),h=e(9589),a=function(l,n,u,f,o){n===void 0&&(n=!0),u===void 0&&(u=!0),o===void 0&&(o=!0),Array.isArray(l)||(l=[l]);for(var c=0;c{/** + */var r=e(20576),d=e(42573),h=e(9589),a=function(l,n,u,f,o){n===void 0&&(n=!0),u===void 0&&(u=!0),o===void 0&&(o=!0),Array.isArray(l)||(l=[l]);for(var c=0;c{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(20576),d=e(42573),h=e(9589),a=function(l,n,u,f,o,c){if(u===void 0&&(u=!0),f===void 0&&(f=!0),c===void 0&&(c=!0),!(l>n)){for(var p=l;p<=n;p++)h(p,u,o);if(c)for(var v=0;v=l&&S.index<=n&&r(S,u)}f&&d(0,0,o.width,o.height,o)}};s.exports=a},75661:(s,y,e)=>{/** + */var r=e(20576),d=e(42573),h=e(9589),a=function(l,n,u,f,o,c){if(u===void 0&&(u=!0),f===void 0&&(f=!0),c===void 0&&(c=!0),!(l>n)){for(var p=l;p<=n;p++)h(p,u,o);if(c)for(var v=0;v=l&&S.index<=n&&r(S,u)}f&&d(0,0,o.width,o.height,o)}};s.exports=a},75661:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(20576),d=e(42573),h=e(9589),a=function(l,n,u,f){n===void 0&&(n=!0),u===void 0&&(u=!0),Array.isArray(l)||(l=[l]);for(var o=0;o{/** + */var r=e(20576),d=e(42573),h=e(9589),a=function(l,n,u,f){n===void 0&&(n=!0),u===void 0&&(u=!0),Array.isArray(l)||(l=[l]);for(var o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(20576),d=e(42573),h=e(97022),a=function(l,n,u,f){n===void 0&&(n=!0),u===void 0&&(u=!0);for(var o=0;o{/** + */var r=e(20576),d=e(42573),h=e(97022),a=function(l,n,u,f){n===void 0&&(n=!0),u===void 0&&(u=!0);for(var o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5698,31 +5698,31 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=d.collideIndexes.indexOf(e);r&&h===-1?d.collideIndexes.push(e):!r&&h!==-1&&d.collideIndexes.splice(h,1)};s.exports=y},20576:s=>{/** + */var x=function(e,r,d){var h=d.collideIndexes.indexOf(e);r&&h===-1?d.collideIndexes.push(e):!r&&h!==-1&&d.collideIndexes.splice(h,1)};s.exports=x},20576:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){r?e.setCollision(!0,!0,!0,!0,!1):e.resetCollision(!1)};s.exports=y},79583:s=>{/** + */var x=function(e,r){r?e.setCollision(!0,!0,!0,!0,!1):e.resetCollision(!1)};s.exports=x},79583:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){if(typeof e=="number")h.callbacks[e]=r!==null?{callback:r,callbackContext:d}:void 0;else for(var a=0,l=e.length;a{/** + */var x=function(e,r,d,h){if(typeof e=="number")h.callbacks[e]=r!==null?{callback:r,callbackContext:d}:void 0;else for(var a=0,l=e.length;a{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7386),d=function(h,a,l,n,u,f,o){for(var c=r(h,a,l,n,null,o),p=0;p{/** + */var r=e(7386),d=function(h,a,l,n,u,f,o){for(var c=r(h,a,l,n,null,o),p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7386),d=e(33680),h=function(a,l,n,u,f){var o=r(a,l,n,u,null,f),c=o.map(function(v){return v.index});d(c);for(var p=0;p{/** + */var r=e(7386),d=e(33680),h=function(a,l,n,u,f){var o=r(a,l,n,u,null,f),c=o.map(function(v){return v.index});d(c);for(var p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(63448),d=e(56583),h=function(a,l){var n=a.tilemapLayer.tilemap,u=a.tilemapLayer,f=Math.floor(n.tileWidth*u.scaleX),o=Math.floor(n.tileHeight*u.scaleY),c=d(l.worldView.x-u.x,f,0,!0)-u.cullPaddingX,p=r(l.worldView.right-u.x,f,0,!0)+u.cullPaddingX,v=d(l.worldView.y-u.y,o/2,0,!0)-u.cullPaddingY,m=r(l.worldView.bottom-u.y,o/2,0,!0)+u.cullPaddingY;return{left:c,right:p,top:v,bottom:m}};s.exports=h},54503:(s,y,e)=>{/** + */var r=e(63448),d=e(56583),h=function(a,l){var n=a.tilemapLayer.tilemap,u=a.tilemapLayer,f=Math.floor(n.tileWidth*u.scaleX),o=Math.floor(n.tileHeight*u.scaleY),c=d(l.worldView.x-u.x,f,0,!0)-u.cullPaddingX,p=r(l.worldView.right-u.x,f,0,!0)+u.cullPaddingX,v=d(l.worldView.y-u.y,o/2,0,!0)-u.cullPaddingY,m=r(l.worldView.bottom-u.y,o/2,0,!0)+u.cullPaddingY;return{left:c,right:p,top:v,bottom:m}};s.exports=h},54503:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(61325),d=e(32483),h=function(a,l,n,u){n===void 0&&(n=[]),u===void 0&&(u=0),n.length=0;var f=a.tilemapLayer,o=r(a,l);return f.skipCull&&f.scrollFactorX===1&&f.scrollFactorY===1&&(o.left=0,o.right=a.width,o.top=0,o.bottom=a.height),d(a,o,u,n),n};s.exports=h},97202:(s,y,e)=>{/** + */var r=e(61325),d=e(32483),h=function(a,l,n,u){n===void 0&&(n=[]),u===void 0&&(u=0),n.length=0;var f=a.tilemapLayer,o=r(a,l);return f.skipCull&&f.scrollFactorX===1&&f.scrollFactorY===1&&(o.left=0,o.right=a.width,o.top=0,o.bottom=a.height),d(a,o,u,n),n};s.exports=h},97202:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5730,7 +5730,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=d.baseTileHeight,a=d.tilemapLayer,l=0;return a&&(r===void 0&&(r=a.scene.cameras.main),l=a.y+r.scrollY*(1-a.scrollFactorY),h*=a.scaleY),l+e*(h/2)+h};s.exports=y},15108:(s,y,e)=>{/** + */var x=function(e,r,d){var h=d.baseTileHeight,a=d.tilemapLayer,l=0;return a&&(r===void 0&&(r=a.scene.cameras.main),l=a.y+r.scrollY*(1-a.scrollFactorY),h*=a.scaleY),l+e*(h/2)+h};s.exports=x},15108:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5738,7 +5738,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){var a=h.baseTileHeight,l=h.tilemapLayer;return l&&(d||(d=l.scene.cameras.main),e=e-(l.y+d.scrollY*(1-l.scrollFactorY)),a*=l.scaleY),r?Math.floor(e/(a/2)):e/(a/2)};s.exports=y},86560:(s,y,e)=>{/** + */var x=function(e,r,d,h){var a=h.baseTileHeight,l=h.tilemapLayer;return l&&(d||(d=l.scene.cameras.main),e=e-(l.y+d.scrollY*(1-l.scrollFactorY)),a*=l.scaleY),r?Math.floor(e/(a/2)):e/(a/2)};s.exports=x},86560:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5746,7 +5746,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=d.baseTileWidth,a=d.tilemapLayer,l=0;return a&&(r||(r=a.scene.cameras.main),l=a.x+r.scrollX*(1-a.scrollFactorX),h*=a.scaleX),l+e*h};s.exports=y},70326:(s,y,e)=>{/** + */var x=function(e,r,d){var h=d.baseTileWidth,a=d.tilemapLayer,l=0;return a&&(r||(r=a.scene.cameras.main),l=a.x+r.scrollX*(1-a.scrollFactorX),h*=a.scaleX),l+e*h};s.exports=x},70326:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5754,23 +5754,23 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=d.baseTileHeight,a=d.tilemapLayer,l=0;return a&&(r||(r=a.scene.cameras.main),l=a.y+r.scrollY*(1-a.scrollFactorY),h*=a.scaleY),l+e*h};s.exports=y},77366:(s,y,e)=>{/** + */var x=function(e,r,d){var h=d.baseTileHeight,a=d.tilemapLayer,l=0;return a&&(r||(r=a.scene.cameras.main),l=a.y+r.scrollY*(1-a.scrollFactorY),h*=a.scaleY),l+e*h};s.exports=x},77366:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(7386),d=e(75508),h=function(a,l,n,u,f,o){if(f){var c,p=r(a,l,n,u,null,o),v=0;for(c=0;c{/** + */var r=e(7386),d=e(75508),h=function(a,l,n,u,f,o){if(f){var c,p=r(a,l,n,u,null,o),v=0;for(c=0;c{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(85896),d=e(26099),h=new d,a=function(l,n,u,f){return r(l,0,n,h,u,f),h.x};s.exports=a},85896:(s,y,e)=>{/** + */var r=e(85896),d=e(26099),h=new d,a=function(l,n,u,f){return r(l,0,n,h,u,f),h.x};s.exports=a},85896:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(26099),d=function(h,a,l,n,u,f){l===void 0&&(l=!0),n||(n=new r);var o=f.baseTileWidth,c=f.baseTileHeight,p=f.tilemapLayer;p&&(u||(u=p.scene.cameras.main),h=h-(p.x+u.scrollX*(1-p.scrollFactorX)),a=a-(p.y+u.scrollY*(1-p.scrollFactorY)),o*=p.scaleX,c*=p.scaleY);var v=h/o,m=a/c;return l&&(v=Math.floor(v),m=Math.floor(m)),n.set(v,m)};s.exports=d},63288:(s,y,e)=>{/** + */var r=e(26099),d=function(h,a,l,n,u,f){l===void 0&&(l=!0),n||(n=new r);var o=f.baseTileWidth,c=f.baseTileHeight,p=f.tilemapLayer;p&&(u||(u=p.scene.cameras.main),h=h-(p.x+u.scrollX*(1-p.scrollFactorX)),a=a-(p.y+u.scrollY*(1-p.scrollFactorY)),o*=p.scaleX,c*=p.scaleY);var v=h/o,m=a/c;return l&&(v=Math.floor(v),m=Math.floor(m)),n.set(v,m)};s.exports=d},63288:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(85896),d=e(26099),h=new d,a=function(l,n,u,f){return r(0,l,n,h,u,f),h.y};s.exports=a},81086:(s,y,e)=>{/** + */var r=e(85896),d=e(26099),h=new d,a=function(l,n,u,f){return r(0,l,n,h,u,f),h.y};s.exports=a},81086:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5778,64 +5778,64 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(s,y,e)=>{/** + */s.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r={ORIENTATION:e(91907)};s.exports=r},62501:(s,y,e)=>{/** + */var r={ORIENTATION:e(91907)};s.exports=r},62501:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(79291),d=e(21829),h={Components:e(81086),Parsers:e(57442),Formats:e(80341),ImageCollection:e(16536),ParseToTilemap:e(31989),Tile:e(23029),Tilemap:e(49075),TilemapCreator:e(45939),TilemapFactory:e(46029),Tileset:e(33629),TilemapLayer:e(20442),Orientation:e(91907),LayerData:e(14977),MapData:e(87010),ObjectLayer:e(48700)};h=r(!1,h,d.ORIENTATION),s.exports=h},14977:(s,y,e)=>{/** + */var r=e(79291),d=e(21829),h={Components:e(81086),Parsers:e(57442),Formats:e(80341),ImageCollection:e(16536),ParseToTilemap:e(31989),Tile:e(23029),Tilemap:e(49075),TilemapCreator:e(45939),TilemapFactory:e(46029),Tileset:e(33629),TilemapLayer:e(20442),Orientation:e(91907),LayerData:e(14977),MapData:e(87010),ObjectLayer:e(48700)};h=r(!1,h,d.ORIENTATION),s.exports=h},14977:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(91907),h=e(95540),a=new r({initialize:function(n){n===void 0&&(n={}),this.name=h(n,"name","layer"),this.id=h(n,"id",0),this.x=h(n,"x",0),this.y=h(n,"y",0),this.width=h(n,"width",0),this.height=h(n,"height",0),this.tileWidth=h(n,"tileWidth",0),this.tileHeight=h(n,"tileHeight",0),this.baseTileWidth=h(n,"baseTileWidth",this.tileWidth),this.baseTileHeight=h(n,"baseTileHeight",this.tileHeight),this.orientation=h(n,"orientation",d.ORTHOGONAL),this.widthInPixels=h(n,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=h(n,"heightInPixels",this.height*this.baseTileHeight),this.alpha=h(n,"alpha",1),this.visible=h(n,"visible",!0),this.properties=h(n,"properties",[]),this.indexes=h(n,"indexes",[]),this.collideIndexes=h(n,"collideIndexes",[]),this.callbacks=h(n,"callbacks",[]),this.bodies=h(n,"bodies",[]),this.data=h(n,"data",[]),this.tilemapLayer=h(n,"tilemapLayer",null),this.hexSideLength=h(n,"hexSideLength",0),this.staggerAxis=h(n,"staggerAxis","y"),this.staggerIndex=h(n,"staggerIndex","odd")}});s.exports=a},87010:(s,y,e)=>{/** + */var r=e(83419),d=e(91907),h=e(95540),a=new r({initialize:function(n){n===void 0&&(n={}),this.name=h(n,"name","layer"),this.id=h(n,"id",0),this.x=h(n,"x",0),this.y=h(n,"y",0),this.width=h(n,"width",0),this.height=h(n,"height",0),this.tileWidth=h(n,"tileWidth",0),this.tileHeight=h(n,"tileHeight",0),this.baseTileWidth=h(n,"baseTileWidth",this.tileWidth),this.baseTileHeight=h(n,"baseTileHeight",this.tileHeight),this.orientation=h(n,"orientation",d.ORTHOGONAL),this.widthInPixels=h(n,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=h(n,"heightInPixels",this.height*this.baseTileHeight),this.alpha=h(n,"alpha",1),this.visible=h(n,"visible",!0),this.properties=h(n,"properties",[]),this.indexes=h(n,"indexes",[]),this.collideIndexes=h(n,"collideIndexes",[]),this.callbacks=h(n,"callbacks",[]),this.bodies=h(n,"bodies",[]),this.data=h(n,"data",[]),this.tilemapLayer=h(n,"tilemapLayer",null),this.hexSideLength=h(n,"hexSideLength",0),this.staggerAxis=h(n,"staggerAxis","y"),this.staggerIndex=h(n,"staggerIndex","odd")}});s.exports=a},87010:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(91907),h=e(95540),a=new r({initialize:function(n){n===void 0&&(n={}),this.name=h(n,"name","map"),this.width=h(n,"width",0),this.height=h(n,"height",0),this.infinite=h(n,"infinite",!1),this.tileWidth=h(n,"tileWidth",0),this.tileHeight=h(n,"tileHeight",0),this.widthInPixels=h(n,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=h(n,"heightInPixels",this.height*this.tileHeight),this.format=h(n,"format",null),this.orientation=h(n,"orientation",d.ORTHOGONAL),this.renderOrder=h(n,"renderOrder","right-down"),this.version=h(n,"version","1"),this.properties=h(n,"properties",{}),this.layers=h(n,"layers",[]),this.images=h(n,"images",[]),this.objects=h(n,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=h(n,"collision",{}),this.tilesets=h(n,"tilesets",[]),this.imageCollections=h(n,"imageCollections",[]),this.tiles=h(n,"tiles",[]),this.hexSideLength=h(n,"hexSideLength",0),this.staggerAxis=h(n,"staggerAxis","y"),this.staggerIndex=h(n,"staggerIndex","odd")}});s.exports=a},48700:(s,y,e)=>{/** + */var r=e(83419),d=e(91907),h=e(95540),a=new r({initialize:function(n){n===void 0&&(n={}),this.name=h(n,"name","map"),this.width=h(n,"width",0),this.height=h(n,"height",0),this.infinite=h(n,"infinite",!1),this.tileWidth=h(n,"tileWidth",0),this.tileHeight=h(n,"tileHeight",0),this.widthInPixels=h(n,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=h(n,"heightInPixels",this.height*this.tileHeight),this.format=h(n,"format",null),this.orientation=h(n,"orientation",d.ORTHOGONAL),this.renderOrder=h(n,"renderOrder","right-down"),this.version=h(n,"version","1"),this.properties=h(n,"properties",{}),this.layers=h(n,"layers",[]),this.images=h(n,"images",[]),this.objects=h(n,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=h(n,"collision",{}),this.tilesets=h(n,"tilesets",[]),this.imageCollections=h(n,"imageCollections",[]),this.tiles=h(n,"tiles",[]),this.hexSideLength=h(n,"hexSideLength",0),this.staggerAxis=h(n,"staggerAxis","y"),this.staggerIndex=h(n,"staggerIndex","odd")}});s.exports=a},48700:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(95540),h=new r({initialize:function(l){l===void 0&&(l={}),this.name=d(l,"name","object layer"),this.id=d(l,"id",0),this.opacity=d(l,"opacity",1),this.properties=d(l,"properties",{}),this.propertyTypes=d(l,"propertytypes",{}),this.type=d(l,"type","objectgroup"),this.visible=d(l,"visible",!0),this.objects=d(l,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});s.exports=h},6641:(s,y,e)=>{/** + */var r=e(83419),d=e(95540),h=new r({initialize:function(l){l===void 0&&(l={}),this.name=d(l,"name","object layer"),this.id=d(l,"id",0),this.opacity=d(l,"opacity",1),this.properties=d(l,"properties",{}),this.propertyTypes=d(l,"propertytypes",{}),this.type=d(l,"type","objectgroup"),this.visible=d(l,"visible",!0),this.objects=d(l,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});s.exports=h},6641:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(91907),d=function(h){return h=h.toLowerCase(),h==="isometric"?r.ISOMETRIC:h==="staggered"?r.STAGGERED:h==="hexagonal"?r.HEXAGONAL:r.ORTHOGONAL};s.exports=d},46177:(s,y,e)=>{/** + */var r=e(91907),d=function(h){return h=h.toLowerCase(),h==="isometric"?r.ISOMETRIC:h==="staggered"?r.STAGGERED:h==="hexagonal"?r.HEXAGONAL:r.ORTHOGONAL};s.exports=d},46177:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(80341),d=e(2342),h=e(82593),a=e(46594),l=e(87021),n=function(u,f,o,c,p,v){var m;switch(f){case r.ARRAY_2D:m=d(u,o,c,p,v);break;case r.CSV:m=h(u,o,c,p,v);break;case r.TILED_JSON:m=a(u,o,v);break;case r.WELTMEISTER:m=l(u,o,v);break;default:console.warn("Unrecognized tilemap data format: "+f),m=null}return m};s.exports=n},2342:(s,y,e)=>{/** + */var r=e(80341),d=e(2342),h=e(82593),a=e(46594),l=e(87021),n=function(u,f,o,c,p,v){var m;switch(f){case r.ARRAY_2D:m=d(u,o,c,p,v);break;case r.CSV:m=h(u,o,c,p,v);break;case r.TILED_JSON:m=a(u,o,v);break;case r.WELTMEISTER:m=l(u,o,v);break;default:console.warn("Unrecognized tilemap data format: "+f),m=null}return m};s.exports=n},2342:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(80341),d=e(14977),h=e(87010),a=e(23029),l=function(n,u,f,o,c){for(var p=new d({tileWidth:f,tileHeight:o}),v=new h({name:n,tileWidth:f,tileHeight:o,format:r.ARRAY_2D,layers:[p]}),m=[],S=u.length,M=0,w=0;w{/** + */var r=e(80341),d=e(14977),h=e(87010),a=e(23029),l=function(n,u,f,o,c){for(var p=new d({tileWidth:f,tileHeight:o}),v=new h({name:n,tileWidth:f,tileHeight:o,format:r.ARRAY_2D,layers:[p]}),m=[],S=u.length,M=0,w=0;w{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var r=e(80341),d=e(2342),h=function(a,l,n,u,f){var o=l.trim().split(` -`).map(function(p){return p.split(",")}),c=d(a,o,n,u,f);return c.format=r.CSV,c};s.exports=h},6656:(s,y,e)=>{/** +`).map(function(p){return p.split(",")}),c=d(a,o,n,u,f);return c.format=r.CSV,c};s.exports=h},6656:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(14977),d=e(23029),h=function(a,l){for(var n=[],u=0;u-1?M=new d(o,S,m,v,f.tilesize,f.tilesize):M=l?null:new d(o,-1,m,v,f.tilesize,f.tilesize),c.push(M)}p.push(c),c=[]}o.data=p,n.push(o)}return n};s.exports=h},96483:(s,y,e)=>{/** + */var r=e(14977),d=e(23029),h=function(a,l){for(var n=[],u=0;u-1?M=new d(o,S,m,v,f.tilesize,f.tilesize):M=l?null:new d(o,-1,m,v,f.tilesize,f.tilesize),c.push(M)}p.push(c),c=[]}o.data=p,n.push(o)}return n};s.exports=h},96483:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(33629),d=function(h){for(var a=[],l=[],n=0;n{/** + */var r=e(33629),d=function(h){for(var a=[],l=[],n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(80341),d=e(87010),h=e(6656),a=e(96483),l=function(n,u,f){if(u.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+n),null;for(var o=0,c=0,p=0;po&&(o=u.layer[p].width),u.layer[p].height>c&&(c=u.layer[p].height);var v=new d({width:o,height:c,name:n,tileWidth:u.layer[0].tilesize,tileHeight:u.layer[0].tilesize,format:r.WELTMEISTER});return v.layers=h(u,f),v.tilesets=a(u),v};s.exports=l},52833:(s,y,e)=>{/** + */var r=e(80341),d=e(87010),h=e(6656),a=e(96483),l=function(n,u,f){if(u.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+n),null;for(var o=0,c=0,p=0;po&&(o=u.layer[p].width),u.layer[p].height>c&&(c=u.layer[p].height);var v=new d({width:o,height:c,name:n,tileWidth:u.layer[0].tilesize,tileHeight:u.layer[0].tilesize,format:r.WELTMEISTER});return v.layers=h(u,f),v.tilesets=a(u),v};s.exports=l},52833:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={ParseTileLayers:e(6656),ParseTilesets:e(96483),ParseWeltmeister:e(87021)}},57442:(s,y,e)=>{/** + */s.exports={ParseTileLayers:e(6656),ParseTilesets:e(96483),ParseWeltmeister:e(87021)}},57442:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={FromOrientationString:e(6641),Parse:e(46177),Parse2DArray:e(2342),ParseCSV:e(82593),Impact:e(52833),Tiled:e(96761)}},51233:(s,y,e)=>{/** + */s.exports={FromOrientationString:e(6641),Parse:e(46177),Parse2DArray:e(2342),ParseCSV:e(82593),Impact:e(52833),Tiled:e(96761)}},51233:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5843,11 +5843,11 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){for(var r=window.atob(e),d=r.length,h=new Array(d/4),a=0;a>>0;return h};s.exports=y},84101:(s,y,e)=>{/** + */var x=function(e){for(var r=window.atob(e),d=r.length,h=new Array(d/4),a=0;a>>0;return h};s.exports=x},84101:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(33629),d=function(h){var a,l,n=[];for(a=0;a{/** + */var r=e(33629),d=function(h){var a,l,n=[];for(a=0;a{/** * @author Seth Berrier * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5855,27 +5855,27 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=2147483648,e=1073741824,r=536870912,d=function(h){var a=!!(h&y),l=!!(h&e),n=!!(h&r);h=h&~(y|e|r);var u=0,f=!1;return a&&l&&n?(u=Math.PI/2,f=!0):a&&l&&!n?(u=Math.PI,f=!1):a&&!l&&n?(u=Math.PI/2,f=!1):a&&!l&&!n?(u=0,f=!0):!a&&l&&n?(u=3*Math.PI/2,f=!1):!a&&l&&!n?(u=Math.PI,f=!0):!a&&!l&&n?(u=3*Math.PI/2,f=!0):!a&&!l&&!n&&(u=0,f=!1),{gid:h,flippedHorizontal:a,flippedVertical:l,flippedAntiDiagonal:n,rotation:u,flipped:f}};s.exports=d},12635:(s,y,e)=>{/** + */var x=2147483648,e=1073741824,r=536870912,d=function(h){var a=!!(h&x),l=!!(h&e),n=!!(h&r);h=h&~(x|e|r);var u=0,f=!1;return a&&l&&n?(u=Math.PI/2,f=!0):a&&l&&!n?(u=Math.PI,f=!1):a&&!l&&n?(u=Math.PI/2,f=!1):a&&!l&&!n?(u=0,f=!0):!a&&l&&n?(u=3*Math.PI/2,f=!1):!a&&l&&!n?(u=Math.PI,f=!0):!a&&!l&&n?(u=3*Math.PI/2,f=!0):!a&&!l&&!n&&(u=0,f=!1),{gid:h,flippedHorizontal:a,flippedVertical:l,flippedAntiDiagonal:n,rotation:u,flipped:f}};s.exports=d},12635:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(95540),d=e(79677),h=function(a){for(var l=[],n=[],u=d(a);u.i0;){if(u.i>=u.layers.length){if(n.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}u=n.pop();continue}var f=u.layers[u.i];if(u.i++,f.type!=="imagelayer"){if(f.type==="group"){var o=d(a,f,u);n.push(u),u=o}continue}var c=r(f,"offsetx",0)+r(f,"startx",0),p=r(f,"offsety",0)+r(f,"starty",0);l.push({name:u.name+f.name,image:f.image,x:u.x+c+f.x,y:u.y+p+f.y,alpha:u.opacity*f.opacity,visible:u.visible&&f.visible,properties:r(f,"properties",{})})}return l};s.exports=h},46594:(s,y,e)=>{/** + */var r=e(95540),d=e(79677),h=function(a){for(var l=[],n=[],u=d(a);u.i0;){if(u.i>=u.layers.length){if(n.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}u=n.pop();continue}var f=u.layers[u.i];if(u.i++,f.type!=="imagelayer"){if(f.type==="group"){var o=d(a,f,u);n.push(u),u=o}continue}var c=r(f,"offsetx",0)+r(f,"startx",0),p=r(f,"offsety",0)+r(f,"starty",0);l.push({name:u.name+f.name,image:f.image,x:u.x+c+f.x,y:u.y+p+f.y,alpha:u.opacity*f.opacity,visible:u.visible&&f.visible,properties:r(f,"properties",{})})}return l};s.exports=h},46594:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(51233),d=e(84101),h=e(91907),a=e(62644),l=e(80341),n=e(6641),u=e(87010),f=e(12635),o=e(22611),c=e(28200),p=e(24619),v=function(m,S,M){var w=a(S),C=new u({width:w.width,height:w.height,name:m,tileWidth:w.tilewidth,tileHeight:w.tileheight,orientation:n(w.orientation),format:l.TILED_JSON,version:w.version,properties:w.properties,renderOrder:w.renderorder,infinite:w.infinite});C.orientation===h.HEXAGONAL&&(C.hexSideLength=w.hexsidelength,C.staggerAxis=w.staggeraxis,C.staggerIndex=w.staggerindex),C.layers=c(w,M),C.images=f(w);var A=p(w);return C.tilesets=A.tilesets,C.imageCollections=A.imageCollections,C.objects=o(w),C.tiles=d(C),r(C),C};s.exports=v},52205:(s,y,e)=>{/** + */var r=e(51233),d=e(84101),h=e(91907),a=e(62644),l=e(80341),n=e(6641),u=e(87010),f=e(12635),o=e(22611),c=e(28200),p=e(24619),v=function(m,S,M){var w=a(S),C=new u({width:w.width,height:w.height,name:m,tileWidth:w.tilewidth,tileHeight:w.tileheight,orientation:n(w.orientation),format:l.TILED_JSON,version:w.version,properties:w.properties,renderOrder:w.renderorder,infinite:w.infinite});C.orientation===h.HEXAGONAL&&(C.hexSideLength=w.hexsidelength,C.staggerAxis=w.staggeraxis,C.staggerIndex=w.staggerindex),C.layers=c(w,M),C.images=f(w);var A=p(w);return C.tilesets=A.tilesets,C.imageCollections=A.imageCollections,C.objects=o(w),C.tiles=d(C),r(C),C};s.exports=v},52205:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(18254),d=e(29920),h=function(n){return{x:n.x,y:n.y}},a=["id","name","type","rotation","properties","visible","x","y","width","height"],l=function(n,u,f){u===void 0&&(u=0),f===void 0&&(f=0);var o=r(n,a);if(o.x+=u,o.y+=f,n.gid){var c=d(n.gid);o.gid=c.gid,o.flippedHorizontal=c.flippedHorizontal,o.flippedVertical=c.flippedVertical,o.flippedAntiDiagonal=c.flippedAntiDiagonal}else n.polyline?o.polyline=n.polyline.map(h):n.polygon?o.polygon=n.polygon.map(h):n.ellipse?o.ellipse=n.ellipse:n.text?o.text=n.text:n.point?o.point=!0:o.rectangle=!0;return o};s.exports=l},22611:(s,y,e)=>{/** + */var r=e(18254),d=e(29920),h=function(n){return{x:n.x,y:n.y}},a=["id","name","type","rotation","properties","visible","x","y","width","height"],l=function(n,u,f){u===void 0&&(u=0),f===void 0&&(f=0);var o=r(n,a);if(o.x+=u,o.y+=f,n.gid){var c=d(n.gid);o.gid=c.gid,o.flippedHorizontal=c.flippedHorizontal,o.flippedVertical=c.flippedVertical,o.flippedAntiDiagonal=c.flippedAntiDiagonal}else n.polyline?o.polyline=n.polyline.map(h):n.polygon?o.polygon=n.polygon.map(h):n.ellipse?o.ellipse=n.ellipse:n.text?o.text=n.text:n.point?o.point=!0:o.rectangle=!0;return o};s.exports=l},22611:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(95540),d=e(52205),h=e(48700),a=e(79677),l=function(n){for(var u=[],f=[],o=a(n);o.i0;){if(o.i>=o.layers.length){if(f.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}o=f.pop();continue}var c=o.layers[o.i];if(o.i++,c.opacity*=o.opacity,c.visible=o.visible&&c.visible,c.type!=="objectgroup"){if(c.type==="group"){var p=a(n,c,o);f.push(o),o=p}continue}c.name=o.name+c.name;for(var v=o.x+r(c,"startx",0)+r(c,"offsetx",0),m=o.y+r(c,"starty",0)+r(c,"offsety",0),S=[],M=0;M{/** + */var r=e(95540),d=e(52205),h=e(48700),a=e(79677),l=function(n){for(var u=[],f=[],o=a(n);o.i0;){if(o.i>=o.layers.length){if(f.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}o=f.pop();continue}var c=o.layers[o.i];if(o.i++,c.opacity*=o.opacity,c.visible=o.visible&&c.visible,c.type!=="objectgroup"){if(c.type==="group"){var p=a(n,c,o);f.push(o),o=p}continue}c.name=o.name+c.name;for(var v=o.x+r(c,"startx",0)+r(c,"offsetx",0),m=o.y+r(c,"starty",0)+r(c,"offsety",0),S=[],M=0;M{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(41868),d=e(91907),h=e(79677),a=e(6641),l=e(95540),n=e(14977),u=e(29920),f=e(23029),o=function(c,p){for(var v=l(c,"infinite",!1),m=[],S=[],M=h(c);M.i0;){if(M.i>=M.layers.length){if(S.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}M=S.pop();continue}var w=M.layers[M.i];if(M.i++,w.type!=="tilelayer"){if(w.type==="group"){var C=h(c,w,M);S.push(M),M=C}continue}if(w.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+w.name+"'");continue}else if(w.encoding&&w.encoding==="base64"){if(w.chunks)for(var A=0;A0?(O=new f(P,b.gid,$,_,c.tilewidth,c.tileheight),O.rotation=b.rotation,O.flipX=b.flipped,D[_][$]=O):(I=p?null:new f(P,-1,$,_,c.tilewidth,c.tileheight),D[_][$]=I),B++,B===Q.width&&(Z++,B=0)}}else{P=new n({name:M.name+w.name,id:w.id,x:M.x+l(w,"offsetx",0)+w.x,y:M.y+l(w,"offsety",0)+w.y,width:w.width,height:w.height,tileWidth:c.tilewidth,tileHeight:c.tileheight,alpha:M.opacity*w.opacity,visible:M.visible&&w.visible,properties:l(w,"properties",[]),orientation:a(c.orientation)}),P.orientation===d.HEXAGONAL&&(P.hexSideLength=c.hexsidelength,P.staggerAxis=c.staggeraxis,P.staggerIndex=c.staggerindex);for(var q=[],at=0,ot=w.data.length;at0?(O=new f(P,b.gid,B,D.length,c.tilewidth,c.tileheight),O.rotation=b.rotation,O.flipX=b.flipped,q.push(O)):(I=p?null:new f(P,-1,B,D.length,c.tilewidth,c.tileheight),q.push(I)),B++,B===w.width&&(D.push(q),B=0,q=[])}P.data=D,m.push(P)}return m};s.exports=o},24619:(s,y,e)=>{/** + */var r=e(41868),d=e(91907),h=e(79677),a=e(6641),l=e(95540),n=e(14977),u=e(29920),f=e(23029),o=function(c,p){for(var v=l(c,"infinite",!1),m=[],S=[],M=h(c);M.i0;){if(M.i>=M.layers.length){if(S.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}M=S.pop();continue}var w=M.layers[M.i];if(M.i++,w.type!=="tilelayer"){if(w.type==="group"){var C=h(c,w,M);S.push(M),M=C}continue}if(w.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+w.name+"'");continue}else if(w.encoding&&w.encoding==="base64"){if(w.chunks)for(var A=0;A0?(O=new f(P,b.gid,Z,_,c.tilewidth,c.tileheight),O.rotation=b.rotation,O.flipX=b.flipped,D[_][Z]=O):(I=p?null:new f(P,-1,Z,_,c.tilewidth,c.tileheight),D[_][Z]=I),B++,B===Q.width&&($++,B=0)}}else{P=new n({name:M.name+w.name,id:w.id,x:M.x+l(w,"offsetx",0)+w.x,y:M.y+l(w,"offsety",0)+w.y,width:w.width,height:w.height,tileWidth:c.tilewidth,tileHeight:c.tileheight,alpha:M.opacity*w.opacity,visible:M.visible&&w.visible,properties:l(w,"properties",[]),orientation:a(c.orientation)}),P.orientation===d.HEXAGONAL&&(P.hexSideLength=c.hexsidelength,P.staggerAxis=c.staggeraxis,P.staggerIndex=c.staggerindex);for(var q=[],at=0,ot=w.data.length;at0?(O=new f(P,b.gid,B,D.length,c.tilewidth,c.tileheight),O.rotation=b.rotation,O.flipX=b.flipped,q.push(O)):(I=p?null:new f(P,-1,B,D.length,c.tilewidth,c.tileheight),q.push(I)),B++,B===w.width&&(D.push(q),B=0,q=[])}P.data=D,m.push(P)}return m};s.exports=o},24619:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5883,19 +5883,19 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){for(var d=0;d0){var l={},n={},u,f,o;if(Array.isArray(h.edgecolors))for(u=0;u{/** + */var x=function(e,r){for(var d=0;d0){var l={},n={},u,f,o;if(Array.isArray(h.edgecolors))for(u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={AssignTileProperties:e(51233),Base64Decode:e(41868),BuildTilesetIndex:e(84101),CreateGroupLayer:e(79677),ParseGID:e(29920),ParseImageLayers:e(12635),ParseJSONTiled:e(46594),ParseObject:e(52205),ParseObjectLayers:e(22611),ParseTileLayers:e(28200),ParseTilesets:e(24619)}},33385:(s,y,e)=>{/** + */s.exports={AssignTileProperties:e(51233),Base64Decode:e(41868),BuildTilesetIndex:e(84101),CreateGroupLayer:e(79677),ParseGID:e(29920),ParseImageLayers:e(12635),ParseJSONTiled:e(46594),ParseObject:e(52205),ParseObjectLayers:e(22611),ParseTileLayers:e(28200),ParseTilesets:e(24619)}},33385:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(37277),h=e(44594),a=e(94880),l=e(72905),n=new r({initialize:function(f){this.scene=f,this.systems=f.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],f.sys.events.once(h.BOOT,this.boot,this),f.sys.events.on(h.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(h.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var u=this.systems.events;u.on(h.PRE_UPDATE,this.preUpdate,this),u.on(h.UPDATE,this.update,this),u.once(h.SHUTDOWN,this.shutdown,this)},addEvent:function(u){var f;return u instanceof a?(f=u,this.removeEvent(f),f.elapsed=f.startAt,f.hasDispatched=!1,f.repeatCount=f.repeat===-1||f.loop?999999999999:f.repeat):f=new a(u),this._pendingInsertion.push(f),f},delayedCall:function(u,f,o,c){return this.addEvent({delay:u,callback:f,args:o,callbackScope:c})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(u){Array.isArray(u)||(u=[u]);for(var f=0;f-1&&this._active.splice(p,1),c.destroy()}for(o=0;o=c.delay)){var p=c.elapsed-c.delay;if(c.elapsed=c.delay,!c.hasDispatched&&c.callback&&(c.hasDispatched=!0,c.callback.apply(c.callbackScope,c.args)),c.repeatCount>0){if(c.repeatCount--,p>=c.delay)for(;p>=c.delay&&c.repeatCount>0;)c.callback&&c.callback.apply(c.callbackScope,c.args),p-=c.delay,c.repeatCount--;c.elapsed=p,c.hasDispatched=!1}else c.hasDispatched&&this._pendingRemoval.push(c)}}}},shutdown:function(){var u;for(u=0;u{/** + */var r=e(83419),d=e(37277),h=e(44594),a=e(94880),l=e(72905),n=new r({initialize:function(f){this.scene=f,this.systems=f.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],f.sys.events.once(h.BOOT,this.boot,this),f.sys.events.on(h.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(h.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var u=this.systems.events;u.on(h.PRE_UPDATE,this.preUpdate,this),u.on(h.UPDATE,this.update,this),u.once(h.SHUTDOWN,this.shutdown,this)},addEvent:function(u){var f;return u instanceof a?(f=u,this.removeEvent(f),f.elapsed=f.startAt,f.hasDispatched=!1,f.repeatCount=f.repeat===-1||f.loop?999999999999:f.repeat):f=new a(u),this._pendingInsertion.push(f),f},delayedCall:function(u,f,o,c){return this.addEvent({delay:u,callback:f,args:o,callbackScope:c})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(u){Array.isArray(u)||(u=[u]);for(var f=0;f-1&&this._active.splice(p,1),c.destroy()}for(o=0;o=c.delay)){var p=c.elapsed-c.delay;if(c.elapsed=c.delay,!c.hasDispatched&&c.callback&&(c.hasDispatched=!0,c.callback.apply(c.callbackScope,c.args)),c.repeatCount>0){if(c.repeatCount--,p>=c.delay)for(;p>=c.delay&&c.repeatCount>0;)c.callback&&c.callback.apply(c.callbackScope,c.args),p-=c.delay,c.repeatCount--;c.elapsed=p,c.hasDispatched=!1}else c.hasDispatched&&this._pendingRemoval.push(c)}}}},shutdown:function(){var u;for(u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(50792),h=e(39429),a=e(95540),l=e(44594),n=e(89809),u=new r({Extends:d,initialize:function(o,c){d.call(this),this.scene=o,this.systems=o.sys,this.elapsed=0,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var p=this.systems.events;p.on(l.PRE_UPDATE,this.preUpdate,this),p.on(l.UPDATE,this.update,this),p.once(l.SHUTDOWN,this.destroy,this),c&&this.add(c)},preUpdate:function(f,o){this.paused||(this.elapsed+=o)},update:function(){if(!(this.paused||this.complete)){var f,o=this.events,c=!1,p=this.systems,v;for(f=0;f=o.length&&(this.loop!==0&&(this.loop===-1||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(n.COMPLETE,this)}},play:function(f){return f===void 0&&(f=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,f&&this.reset(),this},pause:function(){return this.paused=!0,this},repeat:function(f){return(f===void 0||f===!0)&&(f=-1),f===!1&&(f=0),this.loop=f,this},resume:function(){return this.paused=!1,this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(f){f===void 0&&(f=!1),this.elapsed=0,f||(this.iteration=0);for(var o=0;o0&&(c=o[o.length-1].time);for(var p=0;p{/** + */var r=e(83419),d=e(50792),h=e(39429),a=e(95540),l=e(44594),n=e(89809),u=new r({Extends:d,initialize:function(o,c){d.call(this),this.scene=o,this.systems=o.sys,this.elapsed=0,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var p=this.systems.events;p.on(l.PRE_UPDATE,this.preUpdate,this),p.on(l.UPDATE,this.update,this),p.once(l.SHUTDOWN,this.destroy,this),c&&this.add(c)},preUpdate:function(f,o){this.paused||(this.elapsed+=o)},update:function(){if(!(this.paused||this.complete)){var f,o=this.events,c=!1,p=this.systems,v;for(f=0;f=o.length&&(this.loop!==0&&(this.loop===-1||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(n.COMPLETE,this)}},play:function(f){return f===void 0&&(f=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,f&&this.reset(),this},pause:function(){return this.paused=!0,this},repeat:function(f){return(f===void 0||f===!0)&&(f=-1),f===!1&&(f=0),this.loop=f,this},resume:function(){return this.paused=!1,this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(f){f===void 0&&(f=!1),this.elapsed=0,f||(this.iteration=0);for(var o=0;o0&&(c=o[o.length-1].time);for(var p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5903,15 +5903,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="complete"},89809:(s,y,e)=>{/** + */s.exports="complete"},89809:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={COMPLETE:e(35945)}},90291:(s,y,e)=>{/** + */s.exports={COMPLETE:e(35945)}},90291:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Clock:e(33385),Events:e(89809),Timeline:e(96120),TimerEvent:e(94880)}},40382:(s,y,e)=>{/** + */s.exports={Clock:e(33385),Events:e(89809),Timeline:e(96120),TimerEvent:e(94880)}},40382:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5919,11 +5919,11 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){return e&&e.hasOwnProperty(r)?e[r]:d};s.exports=y},6113:(s,y,e)=>{/** + */var x=function(e,r,d){return e&&e.hasOwnProperty(r)?e[r]:d};s.exports=x},6113:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(62640),d=e(35355),h=function(a,l){var n=r.Power0;if(typeof a=="string")if(r.hasOwnProperty(a))n=r[a];else{var u="";if(a.indexOf(".")){u=a.substring(a.indexOf(".")+1);var f=u.toLowerCase();f==="in"?u="easeIn":f==="out"?u="easeOut":f==="inout"&&(u="easeInOut")}a=d(a.substring(0,a.indexOf(".")+1)+u),r.hasOwnProperty(a)&&(n=r[a])}else typeof a=="function"&&(n=a);if(!l)return n;var o=l.slice(0);return o.unshift(0),function(c){return o[0]=c,n.apply(this,o)}};s.exports=h},91389:(s,y,e)=>{/** + */var r=e(62640),d=e(35355),h=function(a,l){var n=r.Power0;if(typeof a=="string")if(r.hasOwnProperty(a))n=r[a];else{var u="";if(a.indexOf(".")){u=a.substring(a.indexOf(".")+1);var f=u.toLowerCase();f==="in"?u="easeIn":f==="out"?u="easeOut":f==="inout"&&(u="easeInOut")}a=d(a.substring(0,a.indexOf(".")+1)+u),r.hasOwnProperty(a)&&(n=r[a])}else typeof a=="function"&&(n=a);if(!l)return n;var o=l.slice(0);return o.unshift(0),function(c){return o[0]=c,n.apply(this,o)}};s.exports=h},91389:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -5931,35 +5931,35 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h;if(e.hasOwnProperty(r)){var a=typeof e[r];a==="function"?h=function(l,n,u,f,o,c){return e[r](l,n,u,f,o,c)}:h=function(){return e[r]}}else typeof d=="function"?h=d:h=function(){return d};return h};s.exports=y},82985:(s,y,e)=>{/** + */var x=function(e,r,d){var h;if(e.hasOwnProperty(r)){var a=typeof e[r];a==="function"?h=function(l,n,u,f,o,c){return e[r](l,n,u,f,o,c)}:h=function(){return e[r]}}else typeof d=="function"?h=d:h=function(){return d};return h};s.exports=x},82985:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(81076),d=function(h){var a,l=[];if(h.hasOwnProperty("props"))for(a in h.props)a.substring(0,1)!=="_"&&l.push({key:a,value:h.props[a]});else for(a in h)r.indexOf(a)===-1&&a.substring(0,1)!=="_"&&l.push({key:a,value:h[a]});return l};s.exports=d},62329:(s,y,e)=>{/** + */var r=e(81076),d=function(h){var a,l=[];if(h.hasOwnProperty("props"))for(a in h.props)a.substring(0,1)!=="_"&&l.push({key:a,value:h.props[a]});else for(a in h)r.indexOf(a)===-1&&a.substring(0,1)!=="_"&&l.push({key:a,value:h[a]});return l};s.exports=d},62329:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(35154),d=function(h){var a=r(h,"targets",null);return a===null||(typeof a=="function"&&(a=a.call()),Array.isArray(a)||(a=[a])),a};s.exports=d},17777:(s,y,e)=>{/** + */var r=e(35154),d=function(h){var a=r(h,"targets",null);return a===null||(typeof a=="function"&&(a=a.call()),Array.isArray(a)||(a=[a])),a};s.exports=d},17777:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(30976),d=e(99472);function h(f){return!!f.getActive&&typeof f.getActive=="function"}function a(f){return!!f.getStart&&typeof f.getStart=="function"}function l(f){return!!f.getEnd&&typeof f.getEnd=="function"}function n(f){return a(f)||l(f)||h(f)}var u=function(f,o){var c,p=function(Q,tt,Y){return Y},v=function(Q,tt,Y){return Y},m=null,S=typeof o;if(S==="number")p=function(){return o};else if(Array.isArray(o))v=function(){return o[0]},p=function(){return o[o.length-1]};else if(S==="string"){var M=o.toLowerCase(),w=M.substring(0,6)==="random",C=M.substring(0,3)==="int";if(w||C){var A=M.indexOf("("),P=M.indexOf(")"),b=M.indexOf(",");if(A&&P&&b){var O=parseFloat(M.substring(A+1,b)),I=parseFloat(M.substring(b+1,P));w?p=function(){return d(O,I)}:p=function(){return r(O,I)}}else throw new Error("invalid random() format")}else{M=M[0];var D=parseFloat(o.substr(2));switch(M){case"+":p=function(Q,tt,Y){return Y+D};break;case"-":p=function(Q,tt,Y){return Y-D};break;case"*":p=function(Q,tt,Y){return Y*D};break;case"/":p=function(Q,tt,Y){return Y/D};break;default:p=function(){return parseFloat(o)}}}}else if(S==="function")p=o;else if(S==="object")if(n(o))h(o)&&(m=o.getActive),l(o)&&(p=o.getEnd),a(o)&&(v=o.getStart);else if(o.hasOwnProperty("value"))c=u(f,o.value);else{var B=o.hasOwnProperty("to"),G=o.hasOwnProperty("from"),z=o.hasOwnProperty("start");if(B&&(G||z)){if(c=u(f,o.to),z){var X=u(f,o.start);c.getActive=X.getEnd}if(G){var j=u(f,o.from);c.getStart=j.getEnd}}}return c||(c={getActive:m,getEnd:p,getStart:v}),c};s.exports=u},88032:(s,y,e)=>{/** + */var r=e(30976),d=e(99472);function h(f){return!!f.getActive&&typeof f.getActive=="function"}function a(f){return!!f.getStart&&typeof f.getStart=="function"}function l(f){return!!f.getEnd&&typeof f.getEnd=="function"}function n(f){return a(f)||l(f)||h(f)}var u=function(f,o){var c,p=function(Q,tt,Y){return Y},v=function(Q,tt,Y){return Y},m=null,S=typeof o;if(S==="number")p=function(){return o};else if(Array.isArray(o))v=function(){return o[0]},p=function(){return o[o.length-1]};else if(S==="string"){var M=o.toLowerCase(),w=M.substring(0,6)==="random",C=M.substring(0,3)==="int";if(w||C){var A=M.indexOf("("),P=M.indexOf(")"),b=M.indexOf(",");if(A&&P&&b){var O=parseFloat(M.substring(A+1,b)),I=parseFloat(M.substring(b+1,P));w?p=function(){return d(O,I)}:p=function(){return r(O,I)}}else throw new Error("invalid random() format")}else{M=M[0];var D=parseFloat(o.substr(2));switch(M){case"+":p=function(Q,tt,Y){return Y+D};break;case"-":p=function(Q,tt,Y){return Y-D};break;case"*":p=function(Q,tt,Y){return Y*D};break;case"/":p=function(Q,tt,Y){return Y/D};break;default:p=function(){return parseFloat(o)}}}}else if(S==="function")p=o;else if(S==="object")if(n(o))h(o)&&(m=o.getActive),l(o)&&(p=o.getEnd),a(o)&&(v=o.getStart);else if(o.hasOwnProperty("value"))c=u(f,o.value);else{var B=o.hasOwnProperty("to"),G=o.hasOwnProperty("from"),z=o.hasOwnProperty("start");if(B&&(G||z)){if(c=u(f,o.to),z){var X=u(f,o.start);c.getActive=X.getEnd}if(G){var j=u(f,o.from);c.getStart=j.getEnd}}}return c||(c={getActive:m,getEnd:p,getStart:v}),c};s.exports=u},88032:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(70402),d=e(69902),h=e(23568),a=e(57355),l=e(6113),n=e(55292),u=e(35154),f=e(17777),o=e(269),c=e(86081),p=function(v,m,S){if(m instanceof c)return m.parent=v,m;S===void 0?S=d:S=o(d,S);var M=u(m,"from",0),w=u(m,"to",1),C=[{value:M}],A=u(m,"delay",S.delay),P=u(m,"easeParams",S.easeParams),b=u(m,"ease",S.ease),O=f("value",w),I=new c(v,C),D=I.add(0,"value",O.getEnd,O.getStart,O.getActive,l(u(m,"ease",b),u(m,"easeParams",P)),n(m,"delay",A),u(m,"duration",S.duration),a(m,"yoyo",S.yoyo),u(m,"hold",S.hold),u(m,"repeat",S.repeat),u(m,"repeatDelay",S.repeatDelay),!1,!1);D.start=M,D.current=M,I.completeDelay=h(m,"completeDelay",0),I.loop=Math.round(h(m,"loop",0)),I.loopDelay=Math.round(h(m,"loopDelay",0)),I.paused=a(m,"paused",!1),I.persist=a(m,"persist",!1),I.callbackScope=u(m,"callbackScope",I);for(var B=r.TYPES,G=0;G{/** + */var r=e(70402),d=e(69902),h=e(23568),a=e(57355),l=e(6113),n=e(55292),u=e(35154),f=e(17777),o=e(269),c=e(86081),p=function(v,m,S){if(m instanceof c)return m.parent=v,m;S===void 0?S=d:S=o(d,S);var M=u(m,"from",0),w=u(m,"to",1),C=[{value:M}],A=u(m,"delay",S.delay),P=u(m,"easeParams",S.easeParams),b=u(m,"ease",S.ease),O=f("value",w),I=new c(v,C),D=I.add(0,"value",O.getEnd,O.getStart,O.getActive,l(u(m,"ease",b),u(m,"easeParams",P)),n(m,"delay",A),u(m,"duration",S.duration),a(m,"yoyo",S.yoyo),u(m,"hold",S.hold),u(m,"repeat",S.repeat),u(m,"repeatDelay",S.repeatDelay),!1,!1);D.start=M,D.current=M,I.completeDelay=h(m,"completeDelay",0),I.loop=Math.round(h(m,"loop",0)),I.loopDelay=Math.round(h(m,"loopDelay",0)),I.paused=a(m,"paused",!1),I.persist=a(m,"persist",!1),I.callbackScope=u(m,"callbackScope",I);for(var B=r.TYPES,G=0;G{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(6113),d=e(35154),h=e(36383),a=function(l,n){n===void 0&&(n={});var u,f=d(n,"start",0),o=d(n,"ease",null),c=d(n,"grid",null),p=d(n,"from",0),v=p==="first",m=p==="center",S=p==="last",M=typeof p=="number",w=Array.isArray(l),C=parseFloat(w?l[0]:l),A=w?parseFloat(l[1]):0,P=Math.max(C,A);if(w&&(f+=C),c){var b=c[0],O=c[1],I=0,D=0,B=0,G=0,z=[];S?(I=b-1,D=O-1):M?(I=p%b,D=Math.floor(p/b)):m&&(I=(b-1)/2,D=(O-1)/2);for(var X=h.MIN_SAFE_INTEGER,j=0;jX&&(X=tt),z[j][Q]=tt}}}var Y=o?r(o):null;return c?u=function(Z,U,H,$){var _=0,q=$%b,at=Math.floor($/b);q>=0&&q=0&&at{/** + */var r=e(6113),d=e(35154),h=e(36383),a=function(l,n){n===void 0&&(n={});var u,f=d(n,"start",0),o=d(n,"ease",null),c=d(n,"grid",null),p=d(n,"from",0),v=p==="first",m=p==="center",S=p==="last",M=typeof p=="number",w=Array.isArray(l),C=parseFloat(w?l[0]:l),A=w?parseFloat(l[1]):0,P=Math.max(C,A);if(w&&(f+=C),c){var b=c[0],O=c[1],I=0,D=0,B=0,G=0,z=[];S?(I=b-1,D=O-1):M?(I=p%b,D=Math.floor(p/b)):m&&(I=(b-1)/2,D=(O-1)/2);for(var X=h.MIN_SAFE_INTEGER,j=0;jX&&(X=tt),z[j][Q]=tt}}}var Y=o?r(o):null;return c?u=function($,U,H,Z){var _=0,q=Z%b,at=Math.floor(Z/b);q>=0&&q=0&&at{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(70402),d=e(69902),h=e(23568),a=e(57355),l=e(6113),n=e(91389),u=e(55292),f=e(82985),o=e(62329),c=e(35154),p=e(17777),v=e(269),m=e(86081),S=function(M,w,C){if(w instanceof m)return w.parent=M,w;C===void 0?C=d:C=v(d,C);var A=o(w);!A&&C.targets&&(A=C.targets);for(var P=f(w),b=c(w,"delay",C.delay),O=c(w,"duration",C.duration),I=c(w,"easeParams",C.easeParams),D=c(w,"ease",C.ease),B=c(w,"hold",C.hold),G=c(w,"repeat",C.repeat),z=c(w,"repeatDelay",C.repeatDelay),X=a(w,"yoyo",C.yoyo),j=a(w,"flipX",C.flipX),Q=a(w,"flipY",C.flipY),tt=c(w,"interpolation",C.interpolation),Y=function(yt,Et,At,Pt){if(At==="texture"){var Vt=Pt,dt=void 0;Array.isArray(Pt)?(Vt=Pt[0],dt=Pt[1]):Pt.hasOwnProperty("value")?(Vt=Pt.value,Array.isArray(Pt.value)?(Vt=Pt.value[0],dt=Pt.value[1]):typeof Pt.value=="string"&&(Vt=Pt.value)):typeof Pt=="string"&&(Vt=Pt),yt.addFrame(Et,Vt,dt,u(Pt,"delay",b),c(Pt,"duration",O),c(Pt,"hold",B),c(Pt,"repeat",G),c(Pt,"repeatDelay",z),a(Pt,"flipX",j),a(Pt,"flipY",Q))}else{var ut=p(At,Pt),Rt=n(c(Pt,"interpolation",tt));yt.add(Et,At,ut.getEnd,ut.getStart,ut.getActive,l(c(Pt,"ease",D),c(Pt,"easeParams",I)),u(Pt,"delay",b),c(Pt,"duration",O),a(Pt,"yoyo",X),c(Pt,"hold",B),c(Pt,"repeat",G),c(Pt,"repeatDelay",z),a(Pt,"flipX",j),a(Pt,"flipY",Q),Rt,Rt?Pt:null)}},Z=new m(M,A),U=0;U{/** + */var r=e(70402),d=e(69902),h=e(23568),a=e(57355),l=e(6113),n=e(91389),u=e(55292),f=e(82985),o=e(62329),c=e(35154),p=e(17777),v=e(269),m=e(86081),S=function(M,w,C){if(w instanceof m)return w.parent=M,w;C===void 0?C=d:C=v(d,C);var A=o(w);!A&&C.targets&&(A=C.targets);for(var P=f(w),b=c(w,"delay",C.delay),O=c(w,"duration",C.duration),I=c(w,"easeParams",C.easeParams),D=c(w,"ease",C.ease),B=c(w,"hold",C.hold),G=c(w,"repeat",C.repeat),z=c(w,"repeatDelay",C.repeatDelay),X=a(w,"yoyo",C.yoyo),j=a(w,"flipX",C.flipX),Q=a(w,"flipY",C.flipY),tt=c(w,"interpolation",C.interpolation),Y=function(yt,Et,At,Pt){if(At==="texture"){var Vt=Pt,dt=void 0;Array.isArray(Pt)?(Vt=Pt[0],dt=Pt[1]):Pt.hasOwnProperty("value")?(Vt=Pt.value,Array.isArray(Pt.value)?(Vt=Pt.value[0],dt=Pt.value[1]):typeof Pt.value=="string"&&(Vt=Pt.value)):typeof Pt=="string"&&(Vt=Pt),yt.addFrame(Et,Vt,dt,u(Pt,"delay",b),c(Pt,"duration",O),c(Pt,"hold",B),c(Pt,"repeat",G),c(Pt,"repeatDelay",z),a(Pt,"flipX",j),a(Pt,"flipY",Q))}else{var ut=p(At,Pt),Rt=n(c(Pt,"interpolation",tt));yt.add(Et,At,ut.getEnd,ut.getStart,ut.getActive,l(c(Pt,"ease",D),c(Pt,"easeParams",I)),u(Pt,"delay",b),c(Pt,"duration",O),a(Pt,"yoyo",X),c(Pt,"hold",B),c(Pt,"repeat",G),c(Pt,"repeatDelay",z),a(Pt,"flipX",j),a(Pt,"flipY",Q),Rt,Rt?Pt:null)}},$=new m(M,A),U=0;U{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(70402),d=e(23568),h=e(57355),a=e(62329),l=e(35154),n=e(8357),u=e(43960),f=function(o,c){if(c instanceof u)return c.parent=o,c;var p=new u(o);p.startDelay=l(c,"delay",0),p.completeDelay=d(c,"completeDelay",0),p.loop=Math.round(d(c,"loop",l(c,"repeat",0))),p.loopDelay=Math.round(d(c,"loopDelay",l(c,"repeatDelay",0))),p.paused=h(c,"paused",!1),p.persist=h(c,"persist",!1),p.callbackScope=l(c,"callbackScope",p);var v,m=r.TYPES;for(v=0;v{/** + */var r=e(70402),d=e(23568),h=e(57355),a=e(62329),l=e(35154),n=e(8357),u=e(43960),f=function(o,c){if(c instanceof u)return c.parent=o,c;var p=new u(o);p.startDelay=l(c,"delay",0),p.completeDelay=d(c,"completeDelay",0),p.loop=Math.round(d(c,"loop",l(c,"repeat",0))),p.loopDelay=Math.round(d(c,"loopDelay",l(c,"repeatDelay",0))),p.paused=h(c,"paused",!1),p.persist=h(c,"persist",!1),p.callbackScope=l(c,"callbackScope",p);var v,m=r.TYPES;for(v=0;v{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6003,19 +6003,19 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports="yoyo"},842:(s,y,e)=>{/** + */s.exports="yoyo"},842:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={TWEEN_ACTIVE:e(73685),TWEEN_COMPLETE:e(98540),TWEEN_LOOP:e(67233),TWEEN_PAUSE:e(2859),TWEEN_RESUME:e(25764),TWEEN_REPEAT:e(98336),TWEEN_START:e(32193),TWEEN_STOP:e(84371),TWEEN_UPDATE:e(70766),TWEEN_YOYO:e(55659)}},43066:(s,y,e)=>{/** + */s.exports={TWEEN_ACTIVE:e(73685),TWEEN_COMPLETE:e(98540),TWEEN_LOOP:e(67233),TWEEN_PAUSE:e(2859),TWEEN_RESUME:e(25764),TWEEN_REPEAT:e(98336),TWEEN_START:e(32193),TWEEN_STOP:e(84371),TWEEN_UPDATE:e(70766),TWEEN_YOYO:e(55659)}},43066:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r={States:e(86353),Builders:e(30231),Events:e(842),TweenManager:e(40382),Tween:e(86081),TweenData:e(48177),TweenFrameData:e(42220),BaseTween:e(70402),TweenChain:e(43960)};s.exports=r},70402:(s,y,e)=>{/** + */var r={States:e(86353),Builders:e(30231),Events:e(842),TweenManager:e(40382),Tween:e(86081),TweenData:e(48177),TweenFrameData:e(42220),BaseTween:e(70402),TweenChain:e(43960)};s.exports=r},70402:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(83419),d=e(50792),h=e(842),a=e(86353),l=new r({Extends:d,initialize:function(u){d.call(this),this.parent=u,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=a.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(n){return this.timeScale=n,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(h.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(h.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(h.TWEEN_COMPLETE,"onComplete")},complete:function(n){return n===void 0&&(n=0),n?(this.setCompleteDelayState(),this.countdown=n):this.onCompleteHandler(),this},completeAfterLoop:function(n){return n===void 0&&(n=0),this.loopCounter>n&&(this.loopCounter=n),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return this.parent&&!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(h.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(n){this.countdown-=n,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(h.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(n){return this.countdown-=n,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(h.TWEEN_START,"onStart"),n=0),n},updateCompleteDelay:function(n){this.countdown-=n,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(n,u,f){return f===void 0&&(f=[]),this.callbacks.hasOwnProperty(n)&&(this.callbacks[n]={func:u,params:f}),this},setPendingState:function(){this.state=a.PENDING},setActiveState:function(){this.state=a.ACTIVE},setLoopDelayState:function(){this.state=a.LOOP_DELAY},setCompleteDelayState:function(){this.state=a.COMPLETE_DELAY},setStartDelayState:function(){this.state=a.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=a.PENDING_REMOVE},setRemovedState:function(){this.state=a.REMOVED},setFinishedState:function(){this.state=a.FINISHED},setDestroyedState:function(){this.state=a.DESTROYED},isPending:function(){return this.state===a.PENDING},isActive:function(){return this.state===a.ACTIVE},isLoopDelayed:function(){return this.state===a.LOOP_DELAY},isCompleteDelayed:function(){return this.state===a.COMPLETE_DELAY},isStartDelayed:function(){return this.state===a.START_DELAY},isPendingRemove:function(){return this.state===a.PENDING_REMOVE},isRemoved:function(){return this.state===a.REMOVED},isFinished:function(){return this.state===a.FINISHED},isDestroyed:function(){return this.state===a.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(n){n.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});l.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],s.exports=l},95042:(s,y,e)=>{/** + */var r=e(83419),d=e(50792),h=e(842),a=e(86353),l=new r({Extends:d,initialize:function(u){d.call(this),this.parent=u,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=a.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(n){return this.timeScale=n,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(h.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(h.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(h.TWEEN_COMPLETE,"onComplete")},complete:function(n){return n===void 0&&(n=0),n?(this.setCompleteDelayState(),this.countdown=n):this.onCompleteHandler(),this},completeAfterLoop:function(n){return n===void 0&&(n=0),this.loopCounter>n&&(this.loopCounter=n),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return this.parent&&!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(h.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(n){this.countdown-=n,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(h.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(n){return this.countdown-=n,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(h.TWEEN_START,"onStart"),n=0),n},updateCompleteDelay:function(n){this.countdown-=n,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(n,u,f){return f===void 0&&(f=[]),this.callbacks.hasOwnProperty(n)&&(this.callbacks[n]={func:u,params:f}),this},setPendingState:function(){this.state=a.PENDING},setActiveState:function(){this.state=a.ACTIVE},setLoopDelayState:function(){this.state=a.LOOP_DELAY},setCompleteDelayState:function(){this.state=a.COMPLETE_DELAY},setStartDelayState:function(){this.state=a.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=a.PENDING_REMOVE},setRemovedState:function(){this.state=a.REMOVED},setFinishedState:function(){this.state=a.FINISHED},setDestroyedState:function(){this.state=a.DESTROYED},isPending:function(){return this.state===a.PENDING},isActive:function(){return this.state===a.ACTIVE},isLoopDelayed:function(){return this.state===a.LOOP_DELAY},isCompleteDelayed:function(){return this.state===a.COMPLETE_DELAY},isStartDelayed:function(){return this.state===a.START_DELAY},isPendingRemove:function(){return this.state===a.PENDING_REMOVE},isRemoved:function(){return this.state===a.REMOVED},isFinished:function(){return this.state===a.FINISHED},isDestroyed:function(){return this.state===a.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(n){n.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});l.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],s.exports=l},95042:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6023,23 +6023,23 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null};s.exports=y},81076:s=>{/** + */var x={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null};s.exports=x},81076:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},86081:(s,y,e)=>{/** + */s.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},86081:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(70402),d=e(83419),h=e(842),a=e(44603),l=e(39429),n=e(36383),u=e(86353),f=e(48177),o=e(42220),c=new d({Extends:r,initialize:function(v,m){r.call(this,v),this.targets=m,this.totalTargets=m.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(p,v,m,S,M,w,C,A,P,b,O,I,D,B,G,z){var X=new f(this,p,v,m,S,M,w,C,A,P,b,O,I,D,B,G,z);return this.totalData=this.data.push(X),X},addFrame:function(p,v,m,S,M,w,C,A,P,b){var O=new o(this,p,v,m,S,M,w,C,A,P,b);return this.totalData=this.data.push(O),O},getValue:function(p){p===void 0&&(p=0);var v=null;return this.data&&(v=this.data[p].current),v},hasTarget:function(p){return this.targets&&this.targets.indexOf(p)!==-1},updateTo:function(p,v,m){if(m===void 0&&(m=!1),p!=="texture")for(var S=0;S0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(h.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,r.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(p,v,m){if(p===void 0&&(p=0),v===void 0&&(v=16.6),m===void 0&&(m=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;m||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive");var S=this.paused;if(this.paused=!1,p>0){for(var M=Math.floor(p/v),w=p-M*v,C=0;C0&&this.update(w)}return this.paused=S,this.isSeeking=!1,this},initTweenData:function(p){p===void 0&&(p=!1),this.duration=0,this.startDelay=n.MAX_SAFE_INTEGER;for(var v=this.data,m=0;m0?this.totalDuration=S+M+(S+C)*w:this.totalDuration=S+M},reset:function(p){return p===void 0&&(p=!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=u.MAX),p||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive")),this},update:function(p){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(p*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(p),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(p),!1;this.hasStarted||(this.startDelay-=p,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(h.TWEEN_START,"onStart"),p=0));var v=!1;if(this.isActive())for(var m=this.data,S=0;S{/** + */var r=e(70402),d=e(83419),h=e(842),a=e(44603),l=e(39429),n=e(36383),u=e(86353),f=e(48177),o=e(42220),c=new d({Extends:r,initialize:function(v,m){r.call(this,v),this.targets=m,this.totalTargets=m.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(p,v,m,S,M,w,C,A,P,b,O,I,D,B,G,z){var X=new f(this,p,v,m,S,M,w,C,A,P,b,O,I,D,B,G,z);return this.totalData=this.data.push(X),X},addFrame:function(p,v,m,S,M,w,C,A,P,b){var O=new o(this,p,v,m,S,M,w,C,A,P,b);return this.totalData=this.data.push(O),O},getValue:function(p){p===void 0&&(p=0);var v=null;return this.data&&(v=this.data[p].current),v},hasTarget:function(p){return this.targets&&this.targets.indexOf(p)!==-1},updateTo:function(p,v,m){if(m===void 0&&(m=!1),p!=="texture")for(var S=0;S0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(h.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,r.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(p,v,m){if(p===void 0&&(p=0),v===void 0&&(v=16.6),m===void 0&&(m=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;m||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive");var S=this.paused;if(this.paused=!1,p>0){for(var M=Math.floor(p/v),w=p-M*v,C=0;C0&&this.update(w)}return this.paused=S,this.isSeeking=!1,this},initTweenData:function(p){p===void 0&&(p=!1),this.duration=0,this.startDelay=n.MAX_SAFE_INTEGER;for(var v=this.data,m=0;m0?this.totalDuration=S+M+(S+C)*w:this.totalDuration=S+M},reset:function(p){return p===void 0&&(p=!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=u.MAX),p||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive")),this},update:function(p){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(p*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(p),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(p),!1;this.hasStarted||(this.startDelay-=p,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(h.TWEEN_START,"onStart"),p=0));var v=!1;if(this.isActive())for(var m=this.data,S=0;S{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(72905),d=e(70402),h=e(83419),a=e(842),l=e(44603),n=e(39429),u=e(86353),f=new h({Extends:d,initialize:function(c){d.call(this,c),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?u.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(a.TWEEN_ACTIVE,"onActive"),this},add:function(o){var c=this.parent.create(o);Array.isArray(c)||(c=[c]);for(var p=this.data,v=0;v0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(a.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var o=this.data,c=this.totalData,p=0;p{/** + */var r=e(72905),d=e(70402),h=e(83419),a=e(842),l=e(44603),n=e(39429),u=e(86353),f=new h({Extends:d,initialize:function(c){d.call(this,c),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?u.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(a.TWEEN_ACTIVE,"onActive"),this},add:function(o){var c=this.parent.create(o);Array.isArray(c)||(c=[c]);for(var p=this.data,v=0;v0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(a.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var o=this.data,c=this.totalData,p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(95042),d=e(45319),h=e(83419),a=e(842),l=new h({Extends:r,initialize:function(u,f,o,c,p,v,m,S,M,w,C,A,P,b,O,I,D){r.call(this,u,f,S,M,w,C,A,P,b,O),this.key=o,this.getActiveValue=v,this.getEndValue=c,this.getStartValue=p,this.ease=m,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=I,this.interpolationData=D},reset:function(n){r.prototype.reset.call(this);var u=this.tween.targets[this.targetIndex],f=this.key;n&&(u[f]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(u[f]=this.getActiveValue(u,f,0))},update:function(n){var u=this.tween,f=u.totalTargets,o=this.targetIndex,c=u.targets[o],p=this.key;if(!c)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=n,this.elapsed<=0&&(this.elapsed=0,n=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(a.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(c,p,c[p],o,f,u),this.end=this.getEndValue(c,p,this.start,o,f,u),this.current=this.start,c[p]=this.start,this.setPlayingForwardState(),!0;var v=this.isPlayingForward(),m=this.isPlayingBackward();if(v||m){var S=this.elapsed,M=this.duration,w=0,C=!1;S+=n,S>=M?(w=S-M,S=M,C=!0):S<0&&(S=0);var A=d(S/M,0,1);if(this.elapsed=S,this.progress=A,this.previous=this.current,C)v?(this.current=this.end,c[p]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(w)):(this.current=this.start,c[p]=this.start,this.setStateFromStart(w));else{v||(A=1-A);var P=this.ease(A);this.interpolation?this.current=this.interpolation(this.interpolationData,P):this.current=this.start+(this.end-this.start)*P,c[p]=this.current}this.dispatchEvent(a.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(n,u){var f=this.tween;if(!f.isSeeking){var o=f.targets[this.targetIndex],c=this.key,p=this.current,v=this.previous;f.emit(n,f,c,o,p,v);var m=f.callbacks[u];m&&m.func.apply(f.callbackScope,[f,o,c,p,v].concat(m.params))}},destroy:function(){r.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});s.exports=l},42220:(s,y,e)=>{/** + */var r=e(95042),d=e(45319),h=e(83419),a=e(842),l=new h({Extends:r,initialize:function(u,f,o,c,p,v,m,S,M,w,C,A,P,b,O,I,D){r.call(this,u,f,S,M,w,C,A,P,b,O),this.key=o,this.getActiveValue=v,this.getEndValue=c,this.getStartValue=p,this.ease=m,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=I,this.interpolationData=D},reset:function(n){r.prototype.reset.call(this);var u=this.tween.targets[this.targetIndex],f=this.key;n&&(u[f]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(u[f]=this.getActiveValue(u,f,0))},update:function(n){var u=this.tween,f=u.totalTargets,o=this.targetIndex,c=u.targets[o],p=this.key;if(!c)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=n,this.elapsed<=0&&(this.elapsed=0,n=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(a.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(c,p,c[p],o,f,u),this.end=this.getEndValue(c,p,this.start,o,f,u),this.current=this.start,c[p]=this.start,this.setPlayingForwardState(),!0;var v=this.isPlayingForward(),m=this.isPlayingBackward();if(v||m){var S=this.elapsed,M=this.duration,w=0,C=!1;S+=n,S>=M?(w=S-M,S=M,C=!0):S<0&&(S=0);var A=d(S/M,0,1);if(this.elapsed=S,this.progress=A,this.previous=this.current,C)v?(this.current=this.end,c[p]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(w)):(this.current=this.start,c[p]=this.start,this.setStateFromStart(w));else{v||(A=1-A);var P=this.ease(A);this.interpolation?this.current=this.interpolation(this.interpolationData,P):this.current=this.start+(this.end-this.start)*P,c[p]=this.current}this.dispatchEvent(a.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(n,u){var f=this.tween;if(!f.isSeeking){var o=f.targets[this.targetIndex],c=this.key,p=this.current,v=this.previous;f.emit(n,f,c,o,p,v);var m=f.callbacks[u];m&&m.func.apply(f.callbackScope,[f,o,c,p,v].concat(m.params))}},destroy:function(){r.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});s.exports=l},42220:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6047,31 +6047,31 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999};s.exports=y},83419:s=>{/** + */var x={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999};s.exports=x},83419:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function y(l){return!!l.get&&typeof l.get=="function"||!!l.set&&typeof l.set=="function"}function e(l,n,u){var f=u?l[n]:Object.getOwnPropertyDescriptor(l,n);return!u&&f.value&&typeof f.value=="object"&&(f=f.value),f&&y(f)?(typeof f.enumerable>"u"&&(f.enumerable=!0),typeof f.configurable>"u"&&(f.configurable=!0),f):!1}function r(l,n){var u=Object.getOwnPropertyDescriptor(l,n);return u?(u.value&&typeof u.value=="object"&&(u=u.value),u.configurable===!1):!1}function d(l,n,u,f){for(var o in n)if(n.hasOwnProperty(o)){var c=e(n,o,u);if(c!==!1){var p=f||l;if(r(p.prototype,o)){if(a.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(l.prototype,o,c)}else l.prototype[o]=n[o]}}function h(l,n){if(n){Array.isArray(n)||(n=[n]);for(var u=0;u{/** + */function x(l){return!!l.get&&typeof l.get=="function"||!!l.set&&typeof l.set=="function"}function e(l,n,u){var f=u?l[n]:Object.getOwnPropertyDescriptor(l,n);return!u&&f.value&&typeof f.value=="object"&&(f=f.value),f&&x(f)?(typeof f.enumerable>"u"&&(f.enumerable=!0),typeof f.configurable>"u"&&(f.configurable=!0),f):!1}function r(l,n){var u=Object.getOwnPropertyDescriptor(l,n);return u?(u.value&&typeof u.value=="object"&&(u=u.value),u.configurable===!1):!1}function d(l,n,u,f){for(var o in n)if(n.hasOwnProperty(o)){var c=e(n,o,u);if(c!==!1){var p=f||l;if(r(p.prototype,o)){if(a.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(l.prototype,o,c)}else l.prototype[o]=n[o]}}function h(l,n){if(n){Array.isArray(n)||(n=[n]);for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(){};s.exports=y},20242:s=>{/** + */var x=function(){};s.exports=x},20242:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(){return null};s.exports=y},71146:s=>{/** + */var x=function(){return null};s.exports=x},71146:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h,a){if(a===void 0&&(a=e),d>0){var l=d-e.length;if(l<=0)return null}if(!Array.isArray(r))return e.indexOf(r)===-1?(e.push(r),h&&h.call(a,r),r):null;for(var n=r.length-1;n>=0;)e.indexOf(r[n])!==-1&&r.splice(n,1),n--;if(n=r.length,n===0)return null;d>0&&n>l&&(r.splice(l),n=l);for(var u=0;u{/** + */var x=function(e,r,d,h,a){if(a===void 0&&(a=e),d>0){var l=d-e.length;if(l<=0)return null}if(!Array.isArray(r))return e.indexOf(r)===-1?(e.push(r),h&&h.call(a,r),r):null;for(var n=r.length-1;n>=0;)e.indexOf(r[n])!==-1&&r.splice(n,1),n--;if(n=r.length,n===0)return null;d>0&&n>l&&(r.splice(l),n=l);for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h,a,l){if(d===void 0&&(d=0),l===void 0&&(l=e),h>0){var n=h-e.length;if(n<=0)return null}if(!Array.isArray(r))return e.indexOf(r)===-1?(e.splice(d,0,r),a&&a.call(l,r),r):null;for(var u=r.length-1;u>=0;)e.indexOf(r[u])!==-1&&r.pop(),u--;if(u=r.length,u===0)return null;h>0&&u>n&&(r.splice(n),u=n);for(var f=u-1;f>=0;f--){var o=r[f];e.splice(d,0,o),a&&a.call(l,o)}return r};s.exports=y},66905:s=>{/** + */var x=function(e,r,d,h,a,l){if(d===void 0&&(d=0),l===void 0&&(l=e),h>0){var n=h-e.length;if(n<=0)return null}if(!Array.isArray(r))return e.indexOf(r)===-1?(e.splice(d,0,r),a&&a.call(l,r),r):null;for(var u=r.length-1;u>=0;)e.indexOf(r[u])!==-1&&r.pop(),u--;if(u=r.length,u===0)return null;h>0&&u>n&&(r.splice(n),u=n);for(var f=u-1;f>=0;f--){var o=r[f];e.splice(d,0,o),a&&a.call(l,o)}return r};s.exports=x},66905:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=e.indexOf(r);return d!==-1&&d{/** + */var x=function(e,r){var d=e.indexOf(r);return d!==-1&&d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6079,7 +6079,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h,a=[null];for(h=3;h{/** + */var x=function(e,r,d){var h,a=[null];for(h=3;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6087,15 +6087,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){if(r.length){if(r.length===1)return r[0]}else return NaN;var h=1,a,l;if(d){if(er.length&&(h=r.length),d?(a=r[h-1][d],l=r[h][d],l-e<=e-a?r[h]:r[h-1]):(a=r[h-1],l=r[h],l-e<=e-a?l:a)};s.exports=y},43491:s=>{/** + */var x=function(e,r,d){if(r.length){if(r.length===1)return r[0]}else return NaN;var h=1,a,l;if(d){if(er.length&&(h=r.length),d?(a=r[h-1][d],l=r[h][d],l-e<=e-a?r[h]:r[h-1]):(a=r[h-1],l=r[h],l-e<=e-a?l:a)};s.exports=x},43491:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){r===void 0&&(r=[]);for(var d=0;d{/** + */var x=function(e,r){r===void 0&&(r=[]);for(var d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(82011),d=function(h,a,l,n,u){n===void 0&&(n=0),u===void 0&&(u=h.length);var f=[];if(r(h,n,u))for(var o=n;o{/** + */var r=e(82011),d=function(h,a,l,n,u){n===void 0&&(n=0),u===void 0&&(u=h.length);var f=[];if(r(h,n,u))for(var o=n;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6103,31 +6103,31 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){r===void 0&&(r=0),d===void 0&&(d=e.length);var h=r+Math.floor(Math.random()*d);return e[h]===void 0?null:e[h]};s.exports=y},85835:s=>{/** + */var x=function(e,r,d){r===void 0&&(r=0),d===void 0&&(d=e.length);var h=r+Math.floor(Math.random()*d);return e[h]===void 0?null:e[h]};s.exports=x},85835:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){if(r===d)return e;var h=e.indexOf(r),a=e.indexOf(d);if(h<0||a<0)throw new Error("Supplied items must be elements of the same array");return h>a||(e.splice(h,1),a===e.length-1?e.push(r):e.splice(a,0,r)),e};s.exports=y},83371:s=>{/** + */var x=function(e,r,d){if(r===d)return e;var h=e.indexOf(r),a=e.indexOf(d);if(h<0||a<0)throw new Error("Supplied items must be elements of the same array");return h>a||(e.splice(h,1),a===e.length-1?e.push(r):e.splice(a,0,r)),e};s.exports=x},83371:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){if(r===d)return e;var h=e.indexOf(r),a=e.indexOf(d);if(h<0||a<0)throw new Error("Supplied items must be elements of the same array");return h{/** + */var x=function(e,r,d){if(r===d)return e;var h=e.indexOf(r),a=e.indexOf(d);if(h<0||a<0)throw new Error("Supplied items must be elements of the same array");return h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=e.indexOf(r);if(d>0){var h=e[d-1],a=e.indexOf(h);e[d]=h,e[a]=r}return e};s.exports=y},69693:s=>{/** + */var x=function(e,r){var d=e.indexOf(r);if(d>0){var h=e[d-1],a=e.indexOf(h);e[d]=h,e[a]=r}return e};s.exports=x},69693:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=e.indexOf(r);if(h===-1||d<0||d>=e.length)throw new Error("Supplied index out of bounds");return h!==d&&(e.splice(h,1),e.splice(d,0,r)),r};s.exports=y},40853:s=>{/** + */var x=function(e,r,d){var h=e.indexOf(r);if(h===-1||d<0||d>=e.length)throw new Error("Supplied index out of bounds");return h!==d&&(e.splice(h,1),e.splice(d,0,r)),r};s.exports=x},40853:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=e.indexOf(r);if(d!==-1&&d{/** + */var x=function(e,r){var d=e.indexOf(r);if(d!==-1&&d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){var a=[],l,n=!1;if((d||h)&&(n=!0,d||(d=""),h||(h="")),r=r;l--)n?a.push(d+l.toString()+h):a.push(l);else for(l=e;l<=r;l++)n?a.push(d+l.toString()+h):a.push(l);return a};s.exports=y},593:(s,y,e)=>{/** + */var x=function(e,r,d,h){var a=[],l,n=!1;if((d||h)&&(n=!0,d||(d=""),h||(h="")),r=r;l--)n?a.push(d+l.toString()+h):a.push(l);else for(l=e;l<=r;l++)n?a.push(d+l.toString()+h):a.push(l);return a};s.exports=x},593:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6135,23 +6135,23 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function y(d,h,a){var l=d[h];d[h]=d[a],d[a]=l}function e(d,h){return dh?1:0}var r=function(d,h,a,l,n){for(a===void 0&&(a=0),l===void 0&&(l=d.length-1),n===void 0&&(n=e);l>a;){if(l-a>600){var u=l-a+1,f=h-a+1,o=Math.log(u),c=.5*Math.exp(2*o/3),p=.5*Math.sqrt(o*c*(u-c)/u)*(f-u/2<0?-1:1),v=Math.max(a,Math.floor(h-f*c/u+p)),m=Math.min(l,Math.floor(h+(u-f)*c/u+p));r(d,h,v,m,n)}var S=d[h],M=a,w=l;for(y(d,a,h),n(d[l],S)>0&&y(d,a,l);M0;)w--}n(d[a],S)===0?y(d,a,w):(w++,y(d,w,l)),w<=h&&(a=w+1),h<=w&&(l=w-1)}};s.exports=r},88492:(s,y,e)=>{/** + */function x(d,h,a){var l=d[h];d[h]=d[a],d[a]=l}function e(d,h){return dh?1:0}var r=function(d,h,a,l,n){for(a===void 0&&(a=0),l===void 0&&(l=d.length-1),n===void 0&&(n=e);l>a;){if(l-a>600){var u=l-a+1,f=h-a+1,o=Math.log(u),c=.5*Math.exp(2*o/3),p=.5*Math.sqrt(o*c*(u-c)/u)*(f-u/2<0?-1:1),v=Math.max(a,Math.floor(h-f*c/u+p)),m=Math.min(l,Math.floor(h+(u-f)*c/u+p));r(d,h,v,m,n)}var S=d[h],M=a,w=l;for(x(d,a,h),n(d[l],S)>0&&x(d,a,l);M0;)w--}n(d[a],S)===0?x(d,a,w):(w++,x(d,w,l)),w<=h&&(a=w+1),h<=w&&(l=w-1)}};s.exports=r},88492:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(35154),d=e(33680),h=function(l,n,u){for(var f=[],o=0;o{/** + */var r=e(35154),d=e(33680),h=function(l,n,u){for(var f=[],o=0;o{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(19133),d=function(h,a,l,n){n===void 0&&(n=h);var u;if(!Array.isArray(a))return u=h.indexOf(a),u!==-1?(r(h,u),l&&l.call(n,a),a):null;for(var f=a.length-1,o=[];f>=0;){var c=a[f];u=h.indexOf(c),u!==-1&&(r(h,u),o.push(c),l&&l.call(n,c)),f--}return o};s.exports=d},60248:(s,y,e)=>{/** + */var r=e(19133),d=function(h,a,l,n){n===void 0&&(n=h);var u;if(!Array.isArray(a))return u=h.indexOf(a),u!==-1?(r(h,u),l&&l.call(n,a),a):null;for(var f=a.length-1,o=[];f>=0;){var c=a[f];u=h.indexOf(c),u!==-1&&(r(h,u),o.push(c),l&&l.call(n,c)),f--}return o};s.exports=d},60248:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(19133),d=function(h,a,l,n){if(n===void 0&&(n=h),a<0||a>h.length-1)throw new Error("Index out of bounds");var u=r(h,a);return l&&l.call(n,u),u};s.exports=d},81409:(s,y,e)=>{/** + */var r=e(19133),d=function(h,a,l,n){if(n===void 0&&(n=h),a<0||a>h.length-1)throw new Error("Index out of bounds");var u=r(h,a);return l&&l.call(n,u),u};s.exports=d},81409:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(82011),d=function(h,a,l,n,u){if(a===void 0&&(a=0),l===void 0&&(l=h.length),u===void 0&&(u=h),r(h,a,l)){var f=l-a,o=h.splice(a,f);if(n)for(var c=0;c{/** + */var r=e(82011),d=function(h,a,l,n,u){if(a===void 0&&(a=0),l===void 0&&(l=h.length),u===void 0&&(u=h),r(h,a,l)){var f=l-a,o=h.splice(a,f);if(n)for(var c=0;c{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6159,23 +6159,23 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=e.indexOf(r),a=e.indexOf(d);return h!==-1&&a===-1?(e[h]=d,!0):!1};s.exports=y},86003:s=>{/** + */var x=function(e,r,d){var h=e.indexOf(r),a=e.indexOf(d);return h!==-1&&a===-1?(e[h]=d,!0):!1};s.exports=x},86003:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){r===void 0&&(r=1);for(var d=null,h=0;h{/** + */var x=function(e,r){r===void 0&&(r=1);for(var d=null,h=0;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){r===void 0&&(r=1);for(var d=null,h=0;h{/** + */var x=function(e,r){r===void 0&&(r=1);for(var d=null,h=0;h{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){var a=e.length;if(r<0||r>a||r>=d||d>a){if(h)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};s.exports=y},89545:s=>{/** + */var x=function(e,r,d,h){var a=e.length;if(r<0||r>a||r>=d||d>a){if(h)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};s.exports=x},89545:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){var d=e.indexOf(r);return d!==-1&&d>0&&(e.splice(d,1),e.unshift(r)),r};s.exports=y},17810:(s,y,e)=>{/** + */var x=function(e,r){var d=e.indexOf(r);return d!==-1&&d>0&&(e.splice(d,1),e.unshift(r)),r};s.exports=x},17810:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6183,15 +6183,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){for(var r=e.length-1;r>0;r--){var d=Math.floor(Math.random()*(r+1)),h=e[r];e[r]=e[d],e[d]=h}return e};s.exports=y},90126:s=>{/** + */var x=function(e){for(var r=e.length-1;r>0;r--){var d=Math.floor(Math.random()*(r+1)),h=e[r];e[r]=e[d],e[d]=h}return e};s.exports=x},90126:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r=/\D/g;return e.sort(function(d,h){return parseInt(d.replace(r,""),10)-parseInt(h.replace(r,""),10)}),e};s.exports=y},19133:s=>{/** + */var x=function(e){var r=/\D/g;return e.sort(function(d,h){return parseInt(d.replace(r,""),10)-parseInt(h.replace(r,""),10)}),e};s.exports=x},19133:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){if(!(r>=e.length)){for(var d=e.length-1,h=e[r],a=r;a{/** + */var x=function(e,r){if(!(r>=e.length)){for(var d=e.length-1,h=e[r],a=r;a{/** * @author Richard Davey * @author Angry Bytes (and contributors) * @copyright 2013-2024 Phaser Studio Inc. @@ -6200,7 +6200,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){if(r===d)return e;var h=e.indexOf(r),a=e.indexOf(d);if(h<0||a<0)throw new Error("Supplied items must be elements of the same array");return e[h]=d,e[a]=r,e};s.exports=y},37105:(s,y,e)=>{/** + */var x=function(e,r,d){if(r===d)return e;var h=e.indexOf(r),a=e.indexOf(d);if(h<0||a<0)throw new Error("Supplied items must be elements of the same array");return e[h]=d,e[a]=r,e};s.exports=x},37105:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6208,7 +6208,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){if(!Array.isArray(e)||!Array.isArray(e[0]))return!1;for(var r=e[0].length,d=1;d{/** + */var x=function(e){if(!Array.isArray(e)||!Array.isArray(e[0]))return!1;for(var r=e[0].length,d=1;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6218,27 +6218,27 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.reverse()};s.exports=y},21224:s=>{/** + */var x=function(e){return e.reverse()};s.exports=x},21224:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){for(var r=0;r{/** + */var x=function(e){for(var r=0;r{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(37829),d=function(h){return r(h,180)};s.exports=d},44657:(s,y,e)=>{/** + */var r=e(37829),d=function(h){return r(h,180)};s.exports=d},44657:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(37829),d=function(h,a){a===void 0&&(a=1);for(var l=0;l{/** + */var r=e(37829),d=function(h,a){a===void 0&&(a=1);for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(86922),d=e(2429),h=function(a,l){if(l===void 0&&(l=90),!r(a))return null;if(typeof l!="string"&&(l=(l%360+360)%360),l===90||l===-270||l==="rotateLeft")a=d(a),a.reverse();else if(l===-90||l===270||l==="rotateRight")a.reverse(),a=d(a);else if(Math.abs(l)===180||l==="rotate180"){for(var n=0;n{/** + */var r=e(86922),d=e(2429),h=function(a,l){if(l===void 0&&(l=90),!r(a))return null;if(typeof l!="string"&&(l=(l%360+360)%360),l===90||l===-270||l==="rotateLeft")a=d(a),a.reverse();else if(l===-90||l===270||l==="rotateRight")a.reverse(),a=d(a);else if(Math.abs(l)===180||l==="rotate180"){for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(37829),d=function(h,a){a===void 0&&(a=1);for(var l=0;l{/** + */var r=e(37829),d=function(h,a){a===void 0&&(a=1);for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6246,7 +6246,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){for(var r=e.length,d=e[0].length,h=new Array(d),a=0;a-1;l--)h[a][l]=e[l][a]}return h};s.exports=y},54915:(s,y,e)=>{/** + */var x=function(e){for(var r=e.length,d=e[0].length,h=new Array(d),a=0;a-1;l--)h[a][l]=e[l][a]}return h};s.exports=x},54915:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6255,16 +6255,16 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=function(r,d){for(var h=new Uint8Array(r),a=h.length,l=d?"data:"+d+";base64,":"",n=0;n>2],l+=y[(h[n]&3)<<4|h[n+1]>>4],l+=y[(h[n+1]&15)<<2|h[n+2]>>6],l+=y[h[n+2]&63];return a%3===2?l=l.substring(0,l.length-1)+"=":a%3===1&&(l=l.substring(0,l.length-2)+"=="),l};s.exports=e},53134:s=>{/** + */var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=function(r,d){for(var h=new Uint8Array(r),a=h.length,l=d?"data:"+d+";base64,":"",n=0;n>2],l+=x[(h[n]&3)<<4|h[n+1]>>4],l+=x[(h[n+1]&15)<<2|h[n+2]>>6],l+=x[h[n+2]&63];return a%3===2?l=l.substring(0,l.length-1)+"=":a%3===1&&(l=l.substring(0,l.length-2)+"=="),l};s.exports=e},53134:s=>{/** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */for(var y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Uint8Array(256),r=0;r>4,v[n++]=(f&15)<<4|o>>2,v[n++]=(o&3)<<6|c&63;return p};s.exports=d},65839:(s,y,e)=>{/** + */for(var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Uint8Array(256),r=0;r>4,v[n++]=(f&15)<<4|o>>2,v[n++]=(o&3)<<6|c&63;return p};s.exports=d},65839:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={ArrayBufferToBase64:e(71334),Base64ToArrayBuffer:e(53134)}},91799:(s,y,e)=>{/** + */s.exports={ArrayBufferToBase64:e(71334),Base64ToArrayBuffer:e(53134)}},91799:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6272,15 +6272,15 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r={};for(var d in e)Array.isArray(e[d])?r[d]=e[d].slice(0):r[d]=e[d];return r};s.exports=y},62644:s=>{/** + */var x=function(e){var r={};for(var d in e)Array.isArray(e[d])?r[d]=e[d].slice(0):r[d]=e[d];return r};s.exports=x},62644:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){var r,d,h;if(typeof e!="object"||e===null)return e;r=Array.isArray(e)?[]:{};for(h in e)d=e[h],r[h]=y(d);return r};s.exports=y},79291:(s,y,e)=>{/** + */var x=function(e){var r,d,h;if(typeof e!="object"||e===null)return e;r=Array.isArray(e)?[]:{};for(h in e)d=e[h],r[h]=x(d);return r};s.exports=x},79291:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(41212),d=function(){var h,a,l,n,u,f,o=arguments[0]||{},c=1,p=arguments.length,v=!1;for(typeof o=="boolean"&&(v=o,o=arguments[1]||{},c=2),p===c&&(o=this,--c);c{/** + */var r=e(41212),d=function(){var h,a,l,n,u,f,o=arguments[0]||{},c=1,p=arguments.length,v=!1;for(typeof o=="boolean"&&(v=o,o=arguments[1]||{},c=2),p===c&&(o=this,--c);c{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6288,7 +6288,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){var h=typeof e;return!e||h==="number"||h==="string"?d:e.hasOwnProperty(r)&&e[r]!==void 0?e[r]:d};s.exports=y},82840:(s,y,e)=>{/** + */var x=function(e,r,d){var h=typeof e;return!e||h==="number"||h==="string"?d:e.hasOwnProperty(r)&&e[r]!==void 0?e[r]:d};s.exports=x},82840:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6296,31 +6296,31 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){if(!e&&!h||typeof e=="number")return d;if(e&&e.hasOwnProperty(r))return e[r];if(h&&h.hasOwnProperty(r))return h[r];if(r.indexOf(".")!==-1){for(var a=r.split("."),l=e,n=h,u=d,f=d,o=!0,c=!0,p=0;p{/** + */var x=function(e,r,d,h){if(!e&&!h||typeof e=="number")return d;if(e&&e.hasOwnProperty(r))return e[r];if(h&&h.hasOwnProperty(r))return h[r];if(r.indexOf(".")!==-1){for(var a=r.split("."),l=e,n=h,u=d,f=d,o=!0,c=!0,p=0;p{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){for(var d=0;d{/** + */var x=function(e,r){for(var d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){for(var d=0;d{/** + */var x=function(e,r){for(var d=0;d{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.hasOwnProperty(r)};s.exports=y},41212:s=>{/** + */var x=function(e,r){return e.hasOwnProperty(r)};s.exports=x},41212:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){if(!e||typeof e!="object"||e.nodeType||e===e.window)return!1;try{if(e.constructor&&!{}.hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};s.exports=y},46975:(s,y,e)=>{/** + */var x=function(e){if(!e||typeof e!="object"||e.nodeType||e===e.window)return!1;try{if(e.constructor&&!{}.hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};s.exports=x},46975:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(41786),d=function(h,a){var l=r(h);for(var n in a)l.hasOwnProperty(n)||(l[n]=a[n]);return l};s.exports=d},269:(s,y,e)=>{/** + */var r=e(41786),d=function(h,a){var l=r(h);for(var n in a)l.hasOwnProperty(n)||(l[n]=a[n]);return l};s.exports=d},269:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var r=e(41786),d=function(h,a){var l=r(h);for(var n in a)l.hasOwnProperty(n)&&(l[n]=a[n]);return l};s.exports=d},18254:(s,y,e)=>{/** + */var r=e(41786),d=function(h,a){var l=r(h);for(var n in a)l.hasOwnProperty(n)&&(l[n]=a[n]);return l};s.exports=d},18254:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6328,7 +6328,7 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d){if(!e||typeof e=="number")return!1;if(e.hasOwnProperty(r))return e[r]=d,!0;if(r.indexOf(".")!==-1){for(var h=r.split("."),a=e,l=e,n=0;n{/** + */var x=function(e,r,d){if(!e||typeof e=="number")return!1;if(e.hasOwnProperty(r))return e[r]=d,!0;if(r.indexOf(".")!==-1){for(var h=r.split("."),a=e,l=e,n=0;n{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6336,36 +6336,36 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return e.replace(/%([0-9]+)/g,function(d,h){return r[Number(h)-1]})};s.exports=y},41836:s=>{/** + */var x=function(e,r){return e.replace(/%([0-9]+)/g,function(d,h){return r[Number(h)-1]})};s.exports=x},41836:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r,d,h){r===void 0&&(r=0),d===void 0&&(d=" "),h===void 0&&(h=3),e=e.toString();var a=0;if(r+1>=e.length)switch(h){case 1:e=new Array(r+1-e.length).join(d)+e;break;case 3:var l=Math.ceil((a=r-e.length)/2),n=a-l;e=new Array(n+1).join(d)+e+new Array(l+1).join(d);break;default:e=e+new Array(r+1-e.length).join(d);break}return e};s.exports=y},33628:s=>{/** + */var x=function(e,r,d,h){r===void 0&&(r=0),d===void 0&&(d=" "),h===void 0&&(h=3),e=e.toString();var a=0;if(r+1>=e.length)switch(h){case 1:e=new Array(r+1-e.length).join(d)+e;break;case 3:var l=Math.ceil((a=r-e.length)/2),n=a-l;e=new Array(n+1).join(d)+e+new Array(l+1).join(d);break;default:e=e+new Array(r+1-e.length).join(d);break}return e};s.exports=x},33628:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e,r){return r===0?e.slice(1):e.slice(0,r-1)+e.slice(r)};s.exports=y},27671:s=>{/** + */var x=function(e,r){return r===0?e.slice(1):e.slice(0,r-1)+e.slice(r)};s.exports=x},27671:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e.split("").reverse().join("")};s.exports=y},45650:s=>{/** + */var x=function(e){return e.split("").reverse().join("")};s.exports=x},45650:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var r=Math.random()*16|0,d=e==="x"?r:r&3|8;return d.toString(16)})};s.exports=y},35355:s=>{/** + */var x=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var r=Math.random()*16|0,d=e==="x"?r:r&3|8;return d.toString(16)})};s.exports=x},35355:s=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var y=function(e){return e&&e[0].toUpperCase()+e.slice(1)};s.exports=y},31749:(s,y,e)=>{/** + */var x=function(e){return e&&e[0].toUpperCase()+e.slice(1)};s.exports=x},31749:(s,x,e)=>{/** * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Format:e(27902),Pad:e(41836),RemoveAt:e(33628),Reverse:e(27671),UppercaseFirst:e(35355),UUID:e(45650)}}},x={};function T(s){var y=x[s];if(y!==void 0)return y.exports;var e=x[s]={exports:{}};return i[s](e,e.exports,T),e.exports}T.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var E=T(85454);return E})())})(XM);var qm=XM.exports;const zf=jd(qm);var NF=Object.create,kx=Object.defineProperty,BF=Object.defineProperties,UF=Object.getOwnPropertyDescriptor,zF=Object.getOwnPropertyDescriptors,GF=Object.getOwnPropertyNames,tT=Object.getOwnPropertySymbols,VF=Object.getPrototypeOf,YM=Object.prototype.hasOwnProperty,HF=Object.prototype.propertyIsEnumerable,eT=(g,t,i)=>t in g?kx(g,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):g[t]=i,Pn=(g,t)=>{for(var i in t||(t={}))YM.call(t,i)&&eT(g,i,t[i]);if(tT)for(var i of tT(t))HF.call(t,i)&&eT(g,i,t[i]);return g},gh=(g,t)=>BF(g,zF(t)),ai=(g,t)=>()=>(t||g((t={exports:{}}).exports,t),t.exports),WF=(g,t,i,x)=>{if(t&&typeof t=="object"||typeof t=="function")for(let T of GF(t))!YM.call(g,T)&&T!==i&&kx(g,T,{get:()=>t[T],enumerable:!(x=UF(t,T))||x.enumerable});return g},kM=(g,t,i)=>(i=g!=null?NF(VF(g)):{},WF(t||!g||!g.__esModule?kx(i,"default",{value:g,enumerable:!0}):i,g)),tg=ai(g=>{var t=function(E,s){return Es?1:0},i=function(E,s){return Es?-1:0};function x(E){return function(s,y){return E(y,s)}}function T(E){return E===2?function(s,y){return s[0]y[0]?1:s[1]y[1]?1:0}:function(s,y){for(var e=0;ey[e])return 1;e++}return 0}}g.DEFAULT_COMPARATOR=t,g.DEFAULT_REVERSE_COMPARATOR=i,g.reverseComparator=x,g.createTupleComparator=T}),XF=ai(g=>{g.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",g.SYMBOL_SUPPORT=typeof Symbol<"u"}),Gn=ai((g,t)=>{var i=XF(),x=i.ARRAY_BUFFER_SUPPORT,T=i.SYMBOL_SUPPORT;t.exports=function(E,s){var y,e,r,d,h;if(!E)throw new Error("obliterator/forEach: invalid iterable.");if(typeof s!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(E)||x&&ArrayBuffer.isView(E)||typeof E=="string"||E.toString()==="[object Arguments]"){for(r=0,d=E.length;r{var i=tg(),x=Gn(),T=i.DEFAULT_COMPARATOR,E=i.reverseComparator;function s(u){if(this.clear(),this.comparator=u||T,typeof this.comparator!="function")throw new Error("mnemonist/FibonacciHeap.constructor: given comparator should be a function.")}s.prototype.clear=function(){this.root=null,this.min=null,this.size=0};function y(u){return{item:u,degree:0}}function e(u,f){u.root?(f.right=u.root.right,f.left=u.root,u.root.right.left=f,u.root.right=f):u.root=f}s.prototype.push=function(u){var f=y(u);return f.left=f,f.right=f,e(this,f),(!this.min||this.comparator(f.item,this.min.item)<=0)&&(this.min=f),++this.size},s.prototype.peek=function(){return this.min?this.min.item:void 0};function r(u){for(var f=[],o=u,c=!1;!(o===u&&c);)o===u&&(c=!0),f.push(o),o=o.right;return f}function d(u,f){u.root===f&&(u.root=f.right),f.left.right=f.right,f.right.left=f.left}function h(u,f){u.child?(f.right=u.child.right,f.left=u.child,u.child.right.left=f,u.child.right=f):u.child=f}function a(u,f,o){d(u,f),f.left=f,f.right=f,h(o,f),o.degree++,f.parent=o}function l(u){var f=new Array(u.size),o=r(u.root),c,p,v,m,S,M;for(c=0,p=o.length;c0&&(M=v,v=m,m=M),a(u,m,v),f[S]=null,S++;f[S]=v}for(c=0;c{var t=Math.pow(2,8)-1,i=Math.pow(2,16)-1,x=Math.pow(2,32)-1,T=Math.pow(2,7)-1,E=Math.pow(2,15)-1,s=Math.pow(2,31)-1;g.getPointerArray=function(e){var r=e-1;if(r<=t)return Uint8Array;if(r<=i)return Uint16Array;if(r<=x)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},g.getSignedPointerArray=function(e){var r=e-1;return r<=T?Int8Array:r<=E?Int16Array:r<=s?Int32Array:Float64Array},g.getNumberType=function(e){return e===(e|0)?Math.sign(e)===-1?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var y={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};g.getMinimalRepresentation=function(e,r){var d=null,h=0,a,l,n,u,f;for(u=0,f=e.length;uh&&(h=a,d=l);return d},g.isTypedArray=function(e){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(e)},g.concat=function(){var e=0,r,d,h;for(r=0,h=arguments.length;r{var t=Gn(),i=Ns();function x(y){return Array.isArray(y)||i.isTypedArray(y)}function T(y){if(typeof y.length=="number")return y.length;if(typeof y.size=="number")return y.size}function E(y){var e=T(y),r=typeof e=="number"?new Array(e):[],d=0;return t(y,function(h){r[d++]=h}),r}function s(y){var e=T(y),r=typeof e=="number"?i.getPointerArray(e):Array,d=typeof e=="number"?new Array(e):[],h=typeof e=="number"?new r(e):[],a=0;return t(y,function(l){d[a]=l,h[a]=a++}),[d,h]}g.isArrayLike=x,g.guessLength=T,g.toArray=E,g.toArrayWithIndices=s}),Kx=ai((g,t)=>{var i=Gn(),x=tg(),T=aa(),E=x.DEFAULT_COMPARATOR,s=x.reverseComparator;function y(p,v,m,S){for(var M=v[S],w,C;S>m;){if(w=S-1>>1,C=v[w],p(M,C)<0){v[S]=C,S=w;continue}break}v[S]=M}function e(p,v,m){for(var S=v.length,M=m,w=v[m],C=2*m+1,A;C=0&&(C=A),v[m]=v[C],m=C,C=2*m+1;v[m]=w,y(p,v,M,m)}function r(p,v,m){v.push(m),y(p,v,0,v.length-1)}function d(p,v){var m=v.pop();if(v.length!==0){var S=v[0];return v[0]=m,e(p,v,0),S}return m}function h(p,v,m){if(v.length===0)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var S=v[0];return v[0]=m,e(p,v,0),S}function a(p,v,m){var S;return v.length!==0&&p(v[0],m)<0&&(S=v[0],v[0]=m,m=S,e(p,v,0)),m}function l(p,v){for(var m=v.length,S=m>>1,M=S;--M>=0;)e(p,v,M)}function n(p,v){for(var m=v.length,S=0,M=new Array(m);S=m.length)return m.slice().sort(p);for(P=m.slice(0,v),l(S,P),M=v,w=m.length;M0&&h(S,P,m[M]);return P.sort(p)}var b=T.guessLength(m);return b!==null&&b0&&h(S,P,O)),M++}),P.length>M&&(P.length=M),P.sort(p)}function f(p,v,m){arguments.length===2&&(m=v,v=p,p=E);var S=s(p),M,w,C,A=-1/0,P;if(v===1){if(T.isArrayLike(m)){for(M=0,w=m.length;M0)&&(A=C);return P=new m.constructor(1),P[0]=A,P}return i(m,function(O){(A===-1/0||p(O,A)>0)&&(A=O)}),[A]}if(T.isArrayLike(m)){if(v>=m.length)return m.slice().sort(S);for(P=m.slice(0,v),l(p,P),M=v,w=m.length;M0&&h(p,P,m[M]);return P.sort(S)}var b=T.guessLength(m);return b!==null&&b0&&h(p,P,O)),M++}),P.length>M&&(P.length=M),P.sort(S)}function o(p){if(this.clear(),this.comparator=p||E,typeof this.comparator!="function")throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}o.prototype.clear=function(){this.items=[],this.size=0},o.prototype.push=function(p){return r(this.comparator,this.items,p),++this.size},o.prototype.peek=function(){return this.items[0]},o.prototype.pop=function(){return this.size!==0&&this.size--,d(this.comparator,this.items)},o.prototype.replace=function(p){return h(this.comparator,this.items,p)},o.prototype.pushpop=function(p){return a(this.comparator,this.items,p)},o.prototype.consume=function(){return this.size=0,n(this.comparator,this.items)},o.prototype.toArray=function(){return n(this.comparator,this.items.slice())},o.prototype.inspect=function(){var p=this.toArray();return Object.defineProperty(p,"constructor",{value:o,enumerable:!1}),p},typeof Symbol<"u"&&(o.prototype[Symbol.for("nodejs.util.inspect.custom")]=o.prototype.inspect);function c(p){if(this.clear(),this.comparator=p||E,typeof this.comparator!="function")throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=s(this.comparator)}c.prototype=o.prototype,o.from=function(p,v){var m=new o(v),S;return T.isArrayLike(p)?S=p.slice():S=T.toArray(p),l(m.comparator,S),m.items=S,m.size=S.length,m},c.from=function(p,v){var m=new c(v),S;return T.isArrayLike(p)?S=p.slice():S=T.toArray(p),l(m.comparator,S),m.items=S,m.size=S.length,m},o.siftUp=e,o.siftDown=y,o.push=r,o.pop=d,o.replace=h,o.pushpop=a,o.heapify=l,o.consume=n,o.nsmallest=u,o.nlargest=f,o.MinHeap=o,o.MaxHeap=c,t.exports=o}),YF=ai((g,t)=>{var i="";function x(r,d,h){for(var a=d.length,l=[],n=a,u=-1,f,o=0,c;n--;)u=Math.max(r[d[n]+h],u);for(c=u>>24&&32||u>>16&&24||u>>8&&16||8;o>o&15].push(d[n]);for(f=0;f<16;f++)for(u=l[f].length;u--;)d[++n]=l[f][u]}}function T(r,d,h,a){return r[h]-r[a]||(h%3===2?r[h+1]-r[a+1]||d[h+2]-d[a+2]:d[h+1]-d[a+1])}function E(r,d){var h=[],a=[],l=2*d/3|0,n=d-l,u=l+1>>1,f=l,o=0,c,p=[],v=[];if(d===1)return[0];for(;f--;)h[f]=(f*3>>1)+1;for(f=3;f--;)x(r,h,f);for(o=a[(h[0]/3|0)+(h[0]%3===1?0:u)]=1,f=1;fthis.firstLength&&n>this.firstLength)){for(d=Math.min(this.length-l,this.length-n),a=0;ar.length&&(r=this.text.slice(l,l+d))}return r},e.prototype.toString=function(){return this.array.join(",")},e.prototype.toJSON=function(){return this.array},e.prototype.inspect=function(){for(var r=new Array(this.length),d=0;d{var i=Gn();function x(r){this.size=0,this.items=new Map,this.inverse=r}function T(){this.size=0,this.items=new Map,this.inverse=new x(this)}function E(){this.size=0,this.items.clear(),this.inverse.items.clear()}T.prototype.clear=E,x.prototype.clear=E;function s(r,d){if(this.items.has(r)){var h=this.items.get(r);if(h===d)return this;this.inverse.items.delete(h)}if(this.inverse.items.has(d)){var a=this.inverse.items.get(d);if(a===r)return this;this.items.delete(a)}return this.items.set(r,d),this.inverse.items.set(d,r),this.size=this.items.size,this.inverse.size=this.inverse.items.size,this}T.prototype.set=s,x.prototype.set=s;function y(r){if(this.items.has(r)){var d=this.items.get(r);return this.items.delete(r),this.inverse.items.delete(d),this.size=this.items.size,this.inverse.size=this.inverse.items.size,!0}return!1}T.prototype.delete=y,x.prototype.delete=y;var e=["has","get","forEach","keys","values","entries"];e.forEach(function(r){T.prototype[r]=x.prototype[r]=function(){return Map.prototype[r].apply(this.items,arguments)}}),typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.entries,x.prototype[Symbol.iterator]=x.prototype.entries),T.prototype.inspect=function(){var r={left:this.items,right:this.inverse.items};return Object.defineProperty(r,"constructor",{value:T,enumerable:!1}),r},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),x.prototype.inspect=function(){var r={left:this.inverse.items,right:this.items};return Object.defineProperty(r,"constructor",{value:x,enumerable:!1}),r},typeof Symbol<"u"&&(x.prototype[Symbol.for("nodejs.util.inspect.custom")]=x.prototype.inspect),T.from=function(r){var d=new T;return i(r,function(h,a){d.set(a,h)}),d},t.exports=T}),Hr=ai((g,t)=>{function i(x){if(typeof x!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=x}typeof Symbol<"u"&&(i.prototype[Symbol.iterator]=function(){return this}),i.of=function(){var x=arguments,T=x.length,E=0;return new i(function(){return E>=T?{done:!0}:{done:!1,value:x[E++]}})},i.empty=function(){var x=new i(function(){return{done:!0}});return x},i.fromSequence=function(x){var T=0,E=x.length;return new i(function(){return T>=E?{done:!0}:{done:!1,value:x[T++]}})},i.is=function(x){return x instanceof i?!0:typeof x=="object"&&x!==null&&typeof x.next=="function"},t.exports=i}),jM=ai(g=>{function t(s){return s|=s>>1,s|=s>>2,s|=s>>4,s|=s>>8,s|=s>>16,s&~(s>>1)}g.msb32=t;function i(s){return s|=s>>1,s|=s>>2,s|=s>>4,s&~(s>>1)}g.msb8=i,g.test=function(s,y){return s>>y&1},g.criticalBit8=function(s,y){return i(s^y)},g.criticalBit8Mask=function(s,y){return~i(s^y)>>>0&255},g.testCriticalBit8=function(s,y){return 1+(s|y)>>8},g.criticalBit32Mask=function(s,y){return~t(s^y)>>>0&4294967295},g.popcount=function(s){return s-=s>>1&1431655765,s=(s&858993459)+(s>>2&858993459),s=s+(s>>4)&252645135,s+=s>>8,s+=s>>16,s&127};var x=new Uint8Array(Math.pow(2,8));for(T=0,E=x.length;T>8&255]+x[s>>16&255]+x[s>>24&255]}}),jF=ai((g,t)=>{var i=Hr(),x=jM();function T(E){this.length=E,this.clear()}T.prototype.clear=function(){this.size=0,this.array=new Uint32Array(Math.ceil(this.length/32))},T.prototype.set=function(E,s){var y=E>>5,e=E&31,r=this.array[y],d;return s===0||s===!1?d=this.array[y]&=~(1<>>0,d>r?this.size++:d>5,y=E&31,e=this.array[s],r;return r=this.array[s]&=~(1<>5,y=E&31,e=this.array[s],r=this.array[s]^=1<>>0,r>e?this.size++:r>5,y=E&31;return this.array[s]>>y&1},T.prototype.test=function(E){return!!this.get(E)},T.prototype.rank=function(E){if(this.size===0)return 0;for(var s=E>>5,y=E&31,e=0,r=0;r=this.length)return-1;for(var s,y=32,e=0,r=0,d=0,h=this.array.length;d>a&1,r===E)return e}},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=this.length,e,r,d=32,h=0,a=this.array.length;h>l&1,E.call(s,r,h*32+l)}},T.prototype.values=function(){var E=this.length,s=!1,y,e,r=this.array,d=r.length,h=0,a=-1,l=32;return new i(function n(){if(!s){if(h>=d)return{done:!0};h===d-1&&(l=E%32||32),y=r[h++],s=!0,a=-1}return a++,a>=l?(s=!1,n()):(e=y>>a&1,{value:e})})},T.prototype.entries=function(){var E=this.length,s=!1,y,e,r=this.array,d,h=r.length,a=0,l=-1,n=32;return new i(function u(){if(!s){if(a>=h)return{done:!0};a===h-1&&(n=E%32||32),y=r[a++],s=!0,l=-1}return l++,d=~-a*32+l,l>=n?(s=!1,u()):(e=y>>l&1,{value:[d,e]})})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=new Uint8Array(this.length);return this.forEach(function(s,y){E[y]=s}),Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.prototype.toJSON=function(){return Array.from(this.array)},t.exports=T}),KF=ai((g,t)=>{var i=Hr(),x=jM(),T=function(y){return Math.max(1,Math.ceil(y*1.5))};function E(y){return new Uint32Array(Math.ceil(y/32))}function s(y){var e=y||0,r=T;typeof y=="object"&&(e=y.initialLength||y.initialCapacity||0,r=y.policy||r),this.size=0,this.length=e,this.capacity=Math.ceil(this.length/32)*32,this.policy=r,this.array=E(this.capacity)}s.prototype.set=function(y,e){if(this.length>5,d=y&31,h=this.array[r],a;return e===0||e===!1?a=this.array[r]&=~(1<>>0,a>h?this.size++:a>5,r=y&31,d=this.array[e],h;return h=this.array[e]&=~(1<>5,r=y&31,d=this.array[e],h=this.array[e]^=1<>>0,h>d?this.size++:hthis.array.length?(this.array=new Uint32Array(d),this.array.set(r,0)):this.array=r.slice(0,d),this.capacity=y,this)},s.prototype.grow=function(y){var e;if(typeof y=="number"){if(this.capacity>=y)return this;for(e=this.capacity;e>5,d=e&31;return this.array[r]|=1<>5,r=y&31;return this.array[e]>>r&1}},s.prototype.get=function(y){if(!(this.length>5,r=y&31;return this.array[e]>>r&1}},s.prototype.test=function(y){return this.length>5,r=y&31,d=0,h=0;h=this.length)return-1;for(var e,r=32,d=0,h=0,a=0,l=this.array.length;a>n&1,h===y)return d}},s.prototype.forEach=function(y,e){e=arguments.length>1?e:this;for(var r=this.length,d,h,a=32,l=0,n=this.array.length;l>u&1,y.call(e,h,l*32+u)}},s.prototype.values=function(){var y=this.length,e=!1,r,d,h=this.array,a=h.length,l=0,n=-1,u=32;return new i(function f(){if(!e){if(l>=a)return{done:!0};l===a-1&&(u=y%32||32),r=h[l++],e=!0,n=-1}return n++,n>=u?(e=!1,f()):(d=r>>n&1,{value:d})})},s.prototype.entries=function(){var y=this.length,e=!1,r,d,h=this.array,a,l=h.length,n=0,u=-1,f=32;return new i(function o(){if(!e){if(n>=l)return{done:!0};n===l-1&&(f=y%32||32),r=h[n++],e=!0,u=-1}return u++,a=~-n*32+u,u>=f?(e=!1,o()):(d=r>>u&1,{value:[a,d]})})},typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=s.prototype.values),s.prototype.inspect=function(){var y=new Uint8Array(this.length);return this.forEach(function(e,r){y[r]=e}),Object.defineProperty(y,"constructor",{value:s,enumerable:!1}),y},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect),s.prototype.toJSON=function(){return Array.from(this.array.slice(0,(this.length>>5)+1))},t.exports=s}),ZF=ai((g,t)=>{function i(E,s){return(E&65535)*s+(((E>>>16)*s&65535)<<16)&4294967295}function x(E,s){return(E&65535)+(s>>>16)+(((E>>>16)+s&65535)<<16)&4294967295}function T(E,s){return E<>>32-s}t.exports=function(E,s){var y=3432918353,e=461845907,r=15,d=13,h=5,a=1801774676,l=E,n,u,f;for(u=0,f=s.length-4;u<=f;u+=4)n=s[u]|s[u+1]<<8|s[u+2]<<16|s[u+3]<<24,n=i(n,y),n=T(n,r),n=i(n,e),l^=n,l=T(l,d),l=i(l,h),l=x(l,a);switch(n=0,s.length&3){case 3:n^=s[u+2]<<16;case 2:n^=s[u+1]<<8;case 1:n^=s[u],n=i(n,y),n=T(n,r),n=i(n,e),l^=n}return l^=s.length,l^=l>>>16,l=i(l,2246822507),l^=l>>>13,l=i(l,3266489909),l^=l>>>16,l>>>0}}),$F=ai((g,t)=>{var i=ZF(),x=Gn(),T=Math.LN2*Math.LN2,E={errorRate:.005};function s(r){var d=new Uint16Array(r.length),h,a;for(h=0,a=r.length;h>3]|=n}return this},e.prototype.test=function(r){for(var d=s(r),h=0,a=this.hashFunctions;h>3]&1<<(7&l)))return!1}return!0},e.prototype.toJSON=function(){return this.data},e.from=function(r,d){if(!d&&(d=r.length||r.size,typeof d!="number"))throw new Error("BloomFilter.from: could not infer the filter's capacity. Try passing it as second argument.");var h=new e(d);return x(r,function(a){h.add(a)}),h},t.exports=e}),JF=ai((g,t)=>{var i=Gn();function x(T){if(typeof T!="function")throw new Error("mnemonist/BKTree.constructor: given `distance` should be a function.");this.distance=T,this.clear()}x.prototype.add=function(T){if(!this.root)return this.root={item:T,children:{}},this.size++,this;for(var E=this.root,s;s=this.distance(T,E.item),!!E.children[s];)E=E.children[s];return E.children[s]={item:T,children:{}},this.size++,this},x.prototype.search=function(T,E){if(!this.root)return[];for(var s=[],y=[this.root],e,r,d,h,a;y.length;)for(e=y.pop(),d=this.distance(E,e.item),d<=T&&s.push({item:e.item,distance:d}),h=d-T,a=d+T+1;h{var i=aa(),x=Hr();function T(E,s){if(arguments.length<2)throw new Error("mnemonist/fixed-deque: expecting an Array class and a capacity.");if(typeof s!="number"||s<=0)throw new Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=E,this.capacity=s,this.items=new E(this.capacity),this.clear()}T.prototype.clear=function(){this.start=0,this.size=0},T.prototype.push=function(E){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.push: deque capacity ("+this.capacity+") exceeded!");var s=this.start+this.size;return s>=this.capacity&&(s-=this.capacity),this.items[s]=E,++this.size},T.prototype.unshift=function(E){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.unshift: deque capacity ("+this.capacity+") exceeded!");var s=this.start-1;return this.start===0&&(s=this.capacity-1),this.items[s]=E,this.start=s,++this.size},T.prototype.pop=function(){if(this.size!==0){this.size--;var E=this.start+this.size;return E>=this.capacity&&(E-=this.capacity),this.items[E]}},T.prototype.shift=function(){if(this.size!==0){var E=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[E]}},T.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},T.prototype.peekLast=function(){if(this.size!==0){var E=this.start+this.size-1;return E>=this.capacity&&(E-=this.capacity),this.items[E]}},T.prototype.get=function(E){if(!(this.size===0||E>=this.capacity))return E=this.start+E,E>=this.capacity&&(E-=this.capacity),this.items[E]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=this.capacity,e=this.size,r=this.start,d=0;d=y)return{done:!0};var d=E[e];return e++,r++,e===s&&(e=0),{value:d,done:!1}})},T.prototype.entries=function(){var E=this.items,s=this.capacity,y=this.size,e=this.start,r=0;return new x(function(){if(r>=y)return{done:!0};var d=E[e];return e++,e===s&&(e=0),{value:[r++,d],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=this.toArray();return E.type=this.ArrayClass.name,E.capacity=this.capacity,Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E,s,y){if(arguments.length<3&&(y=i.guessLength(E),typeof y!="number"))throw new Error("mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.");var e=new T(s,y);if(i.isArrayLike(E)){var r,d;for(r=0,d=E.length;r{var i=aa(),x=KM();function T(s,y){if(arguments.length<2)throw new Error("mnemonist/circular-buffer: expecting an Array class and a capacity.");if(typeof y!="number"||y<=0)throw new Error("mnemonist/circular-buffer: `capacity` should be a positive number.");this.ArrayClass=s,this.capacity=y,this.items=new s(this.capacity),this.clear()}function E(s){T.prototype[s]=x.prototype[s]}Object.keys(x.prototype).forEach(E),typeof Symbol<"u"&&Object.getOwnPropertySymbols(x.prototype).forEach(E),T.prototype.push=function(s){var y=this.start+this.size;return y>=this.capacity&&(y-=this.capacity),this.items[y]=s,this.size===this.capacity?(y++,y>=this.capacity?this.start=0:this.start=y,this.size):++this.size},T.prototype.unshift=function(s){var y=this.start-1;return this.start===0&&(y=this.capacity-1),this.items[y]=s,this.size===this.capacity?(this.start=y,this.size):(this.start=y,++this.size)},T.from=function(s,y,e){if(arguments.length<3&&(e=i.guessLength(s),typeof e!="number"))throw new Error("mnemonist/circular-buffer.from: could not guess iterable length. Please provide desired capacity as last argument.");var r=new T(y,e);if(i.isArrayLike(s)){var d,h;for(d=0,h=s.length;d{function i(x){if(typeof x!="function")throw new Error("mnemonist/DefaultMap.constructor: expecting a function.");this.items=new Map,this.factory=x,this.size=0}i.prototype.clear=function(){this.items.clear(),this.size=0},i.prototype.get=function(x){var T=this.items.get(x);return typeof T>"u"&&(T=this.factory(x,this.size),this.items.set(x,T),this.size++),T},i.prototype.peek=function(x){return this.items.get(x)},i.prototype.set=function(x,T){return this.items.set(x,T),this.size=this.items.size,this},i.prototype.has=function(x){return this.items.has(x)},i.prototype.delete=function(x){var T=this.items.delete(x);return this.size=this.items.size,T},i.prototype.forEach=function(x,T){T=arguments.length>1?T:this,this.items.forEach(x,T)},i.prototype.entries=function(){return this.items.entries()},i.prototype.keys=function(){return this.items.keys()},i.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(i.prototype[Symbol.iterator]=i.prototype.entries),i.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(i.prototype[Symbol.for("nodejs.util.inspect.custom")]=i.prototype.inspect),i.autoIncrement=function(){var x=0;return function(){return x++}},t.exports=i}),qF=ai((g,t)=>{function i(x){if(typeof x!="function")throw new Error("mnemonist/DefaultWeakMap.constructor: expecting a function.");this.items=new WeakMap,this.factory=x}i.prototype.clear=function(){this.items=new WeakMap},i.prototype.get=function(x){var T=this.items.get(x);return typeof T>"u"&&(T=this.factory(x),this.items.set(x,T)),T},i.prototype.peek=function(x){return this.items.get(x)},i.prototype.set=function(x,T){return this.items.set(x,T),this},i.prototype.has=function(x){return this.items.has(x)},i.prototype.delete=function(x){return this.items.delete(x)},i.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(i.prototype[Symbol.for("nodejs.util.inspect.custom")]=i.prototype.inspect),t.exports=i}),tO=ai((g,t)=>{var i=Ns();function x(T){var E=i.getPointerArray(T),s=i.getPointerArray(Math.log2(T));this.size=T,this.dimension=T,this.parents=new E(T),this.ranks=new s(T);for(var y=0;yr?this.parents[y]=s:(this.parents[y]=s,this.ranks[s]++),this},x.prototype.connected=function(T,E){var s=this.find(T);return s===this.find(E)},x.prototype.mapping=function(){for(var T=i.getPointerArray(this.dimension),E={},s=new T(this.size),y=0,e,r=0,d=this.parents.length;r"u"?(s[r]=y,E[e]=y++):s[r]=E[e];return s},x.prototype.compile=function(){for(var T={},E=new Array(this.dimension),s=0,y,e=0,r=this.parents.length;e"u"?(E[s]=[e],T[y]=s++):E[T[y]].push(e);return E},x.prototype.inspect=function(){var T=this.compile();return Object.defineProperty(T,"constructor",{value:x,enumerable:!1}),T},typeof Symbol<"u"&&(x.prototype[Symbol.for("nodejs.util.inspect.custom")]=x.prototype.inspect),t.exports=x}),Zx=ai((g,t)=>{var i=tg(),x=Kx(),T=i.DEFAULT_COMPARATOR,E=i.reverseComparator;function s(r,d,h,a){for(var l=h,n=a,u=d[a],f=2*a+1,o;f=0&&(f=o),d[a]=d[f],a=f,f=2*a+1;d[a]=u,x.siftDown(r,d,n,a)}function y(r,d,h,a){for(var l=a,n=l,u=new r(a),f,o;n>0;)f=h[--n],n!==0&&(o=h[0],h[0]=f,s(d,h,--a,0),f=o),u[n]=f;return u}function e(r,d,h){if(arguments.length===2&&(h=d,d=null),this.ArrayClass=r,this.capacity=h,this.items=new r(h),this.clear(),this.comparator=d||T,typeof h!="number"&&h<=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=E(this.comparator)}e.prototype.clear=function(){this.size=0},e.prototype.push=function(r){return this.size0&&x.replace(this.comparator,this.items,r),this.size},e.prototype.peek=function(){return this.items[0]},e.prototype.consume=function(){var r=y(this.ArrayClass,this.comparator,this.items,this.size);return this.size=0,r},e.prototype.toArray=function(){return y(this.ArrayClass,this.comparator,this.items.slice(0,this.size),this.size)},e.prototype.inspect=function(){var r=this.toArray();return Object.defineProperty(r,"constructor",{value:e,enumerable:!1}),r},typeof Symbol<"u"&&(e.prototype[Symbol.for("nodejs.util.inspect.custom")]=e.prototype.inspect),t.exports=e}),eO=ai((g,t)=>{var i=Gn(),x=function(E){return E};function T(E){if(this.items=new Map,this.clear(),Array.isArray(E)?(this.writeHashFunction=E[0],this.readHashFunction=E[1]):(this.writeHashFunction=E,this.readHashFunction=E),this.writeHashFunction||(this.writeHashFunction=x),this.readHashFunction||(this.readHashFunction=x),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.")}T.prototype.clear=function(){this.items.clear(),this.size=0},T.prototype.add=function(E){var s=this.writeHashFunction(E);return this.items.set(s,E),this.size=this.items.size,this},T.prototype.set=function(E,s){return E=this.writeHashFunction(E),this.items.set(E,s),this.size=this.items.size,this},T.prototype.get=function(E){return E=this.readHashFunction(E),this.items.get(E)},T.prototype.has=function(E){return E=this.readHashFunction(E),this.items.has(E)},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this,this.items.forEach(function(y){E.call(s,y,y)})},T.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=Array.from(this.items.values());return Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E,s,y){var e=new T(s);return i(E,function(r,d){y?e.set(d,r):e.add(r)}),e},t.exports=T}),ZM=ai((g,t)=>{var i=Hr(),x=Gn();function T(E){this.Container=E||Array,this.items=new Map,this.clear(),Object.defineProperty(this.items,"constructor",{value:T,enumerable:!1})}T.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},T.prototype.set=function(E,s){var y=this.items.get(E),e;return y||(this.dimension++,y=new this.Container,this.items.set(E,y)),this.Container===Set?(e=y.size,y.add(s),e"u"?0:this.Container===Set?s.size:s.length},T.prototype.count=T.prototype.multiplicity,T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;var y;function e(r){E.call(s,r,y)}this.items.forEach(function(r,d){y=d,r.forEach(e)})},T.prototype.forEachAssociation=function(E,s){s=arguments.length>1?s:this,this.items.forEach(E,s)},T.prototype.keys=function(){return this.items.keys()},T.prototype.values=function(){var E=this.items.values(),s=!1,y,e,r,d;return this.Container===Set?new i(function h(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,y=e.value.values()}return e=y.next(),e.done?(s=!1,h()):{done:!1,value:e.value}}):new i(function h(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,y=e.value,r=0,d=y.length}return r>=d?(s=!1,h()):{done:!1,value:y[r++]}})},T.prototype.entries=function(){var E=this.items.entries(),s=!1,y,e,r,d,h;return this.Container===Set?new i(function a(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,r=e.value[0],y=e.value[1].values()}return e=y.next(),e.done?(s=!1,a()):{done:!1,value:[r,e.value]}}):new i(function a(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,r=e.value[0],y=e.value[1],d=0,h=y.length}return d>=h?(s=!1,a()):{done:!1,value:[r,y[d++]]}})},T.prototype.containers=function(){return this.items.values()},T.prototype.associations=function(){return this.items.entries()},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.entries),T.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.prototype.toJSON=function(){return this.items},T.from=function(E,s){var y=new T(s);return x(E,function(e,r){y.set(r,e)}),y},t.exports=T}),iO=ai((g,t)=>{var i=ZM(),x=Gn(),T=function(s){return s};function E(s,y){if(this.items=new i(y),this.clear(),Array.isArray(s)?(this.writeHashFunction=s[0],this.readHashFunction=s[1]):(this.writeHashFunction=s,this.readHashFunction=s),this.writeHashFunction||(this.writeHashFunction=T),this.readHashFunction||(this.readHashFunction=T),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.")}E.prototype.clear=function(){this.items.clear(),this.size=0,this.dimension=0},E.prototype.add=function(s){var y=this.writeHashFunction(s);return this.items.set(y,s),this.size=this.items.size,this.dimension=this.items.dimension,this},E.prototype.set=function(s,y){return s=this.writeHashFunction(s),this.items.set(s,y),this.size=this.items.size,this.dimension=this.items.dimension,this},E.prototype.get=function(s){return s=this.readHashFunction(s),this.items.get(s)},E.prototype.has=function(s){return s=this.readHashFunction(s),this.items.has(s)},E.prototype.forEach=function(s,y){y=arguments.length>1?y:this,this.items.forEach(function(e){s.call(y,e,e)})},E.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.values),E.prototype.inspect=function(){var s=Array.from(this);return Object.defineProperty(s,"constructor",{value:E,enumerable:!1}),s},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.from=function(s,y,e,r){arguments.length===3&&typeof e=="boolean"&&(r=e,e=Array);var d=new E(y,e);return x(s,function(h,a){r?d.set(a,h):d.add(h)}),d},t.exports=E}),nO=ai((g,t)=>{var i=1024;function x(E){return(E&E-1)===0}function T(E,s){if(arguments.length<1)throw new Error("mnemonist/hashed-array-tree: expecting at least a byte array constructor.");var y=s||0,e=i,r=0;if(typeof s=="object"&&(y=s.initialCapacity||0,r=s.initialLength||0,e=s.blockSize||i),!e||!x(e))throw new Error("mnemonist/hashed-array-tree: block size should be a power of two.");var d=Math.max(r,y),h=Math.ceil(d/e);this.ArrayClass=E,this.length=r,this.capacity=h*e,this.blockSize=e,this.offsetMask=e-1,this.blockMask=Math.log2(e),this.blocks=new Array(h);for(var a=0;a>this.blockMask,e=E&this.offsetMask;return this.blocks[y][e]=s,this},T.prototype.get=function(E){if(!(this.length>this.blockMask,y=E&this.offsetMask;return this.blocks[s][y]}},T.prototype.grow=function(E){if(typeof E!="number"&&(E=this.capacity+this.blockSize),this.capacity>=E)return this;for(;this.capacity>this.blockMask,e=s&this.offsetMask;return this.blocks[y][e]=E,++this.length},T.prototype.pop=function(){if(this.length!==0){var E=this.blocks[this.blocks.length-1],s=--this.length&this.offsetMask;return E[s]}},T.prototype.inspect=function(){for(var E=new this.ArrayClass(this.length),s,y=0,e=this.length;y>this.blockMask,E[y]=this.blocks[s][y&this.offsetMask];return E.type=this.ArrayClass.name,E.items=this.length,E.capacity=this.capacity,E.blockSize=this.blockSize,Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),t.exports=T}),$M=ai((g,t)=>{var i=Hr(),x=aa();function T(E,s){if(arguments.length<2)throw new Error("mnemonist/fixed-stack: expecting an Array class and a capacity.");if(typeof s!="number"||s<=0)throw new Error("mnemonist/fixed-stack: `capacity` should be a positive number.");this.capacity=s,this.ArrayClass=E,this.items=new this.ArrayClass(this.capacity),this.clear()}T.prototype.clear=function(){this.size=0},T.prototype.push=function(E){if(this.size===this.capacity)throw new Error("mnemonist/fixed-stack.push: stack capacity ("+this.capacity+") exceeded!");return this.items[this.size++]=E,this.size},T.prototype.pop=function(){if(this.size!==0)return this.items[--this.size]},T.prototype.peek=function(){return this.items[this.size-1]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=0,e=this.items.length;y=s)return{done:!0};var e=E[s-y-1];return y++,{value:e,done:!1}})},T.prototype.entries=function(){var E=this.items,s=this.size,y=0;return new i(function(){if(y>=s)return{done:!0};var e=E[s-y-1];return{value:[y++,e],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.toString=function(){return this.toArray().join(",")},T.prototype.toJSON=function(){return this.toArray()},T.prototype.inspect=function(){var E=this.toArray();return E.type=this.ArrayClass.name,E.capacity=this.capacity,Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E,s,y){if(arguments.length<3&&(y=x.guessLength(E),typeof y!="number"))throw new Error("mnemonist/fixed-stack.from: could not guess iterable length. Please provide desired capacity as last argument.");var e=new T(s,y);if(x.isArrayLike(E)){var r,d;for(r=0,d=E.length;r{var i=aa(),x=Ns(),T=$M();function E(y,e,r,d,h,a,l,n){var u=l+(n-l)/2|0,f=~-u,o=-~u,c=r[u];d[a]=c+1;var p=e?e(y[c]):y[c][1],v=a*2+1,m=a*2+2,S=-1/0,M=-1/0;l<=f&&(S=E(y,e,r,d,h,v,l,f)),o<=n&&(M=E(y,e,r,d,h,m,o,n));var w=Math.max(p,S,M),C=c;return w===S?C=h[d[v]-1]:w===M&&(C=h[d[m]-1]),h[c]=C,w}function s(y,e){this.size=y.length,this.intervals=y;var r=null,d=null;Array.isArray(e)&&(r=e[0],d=e[1]);var h=y.length,a=x.getPointerArray(h+1),l=new a(h),n;for(n=1;nv?1:0});var u=Math.ceil(Math.log2(h+1)),f=Math.pow(2,u)-1,o=new a(f),c=new a(h);E(y,d,l,o,c,0,0,h-1),l=null,this.height=u,this.tree=o,this.augmentations=c,this.startGetter=r,this.endGetter=d,this.stack=new T(a,this.height)}s.prototype.intervalsContainingPoint=function(y){var e=[],r=this.stack;r.clear(),r.push(0);for(var d=this.tree.length,h,a,l,n,u,f,o,c,p;r.size;)h=r.pop(),a=this.tree[h]-1,l=this.intervals[a],n=this.intervals[this.augmentations[a]],o=this.endGetter?this.endGetter(n):n[1],!(y>o)&&(c=h*2+1,c=u&&y<=f&&e.push(l),!(yp)&&(v=l*2+1,v=o&&e<=c&&d.push(u),!(r{g.search=function(t,i,x,T){var E=0;x=typeof x<"u"?x:0,T=typeof T<"u"?T:t.length,T--;for(var s;x<=T;)if(E=x+T>>>1,s=t[E],s>i)T=~-E;else if(s>>1,y=t(i[T],x),y>0)s=~-T;else if(y<0)E=-~T;else return T;return-1},g.lowerBound=function(t,i,x,T){var E=0;for(x=typeof x<"u"?x:0,T=typeof T<"u"?T:t.length;x>>1,i<=t[E]?T=E:x=-~E;return x},g.lowerBoundWithComparator=function(t,i,x){for(var T=0,E=0,s=i.length;E>>1,t(x,i[T])<=0?s=T:E=-~T;return E},g.lowerBoundIndices=function(t,i,x,T,E){var s=0;for(T=typeof T<"u"?T:0,E=typeof E<"u"?E:t.length;T>>1,x<=t[i[s]]?E=s:T=-~s;return T},g.upperBound=function(t,i,x,T){var E=0;for(x=typeof x<"u"?x:0,T=typeof T<"u"?T:t.length;x>>1,i>=t[E]?x=-~E:T=E;return x},g.upperBoundWithComparator=function(t,i,x){for(var T=0,E=0,s=i.length;E>>1,t(x,i[T])>=0?E=-~T:s=T;return E}}),sO=ai(g=>{var t=Ns(),i=aa().isArrayLike,x=JM(),T=jx();function E(r,d){if(r.length===0)return d.slice();if(d.length===0)return r.slice();var h;r[0]>d[0]&&(h=r,r=d,d=h);var a=r[r.length-1],l=d[0];if(a<=l)return t.isTypedArray(r)?t.concat(r,d):r.concat(d);var n=new r.constructor(r.length+d.length),u,f,o;for(u=0,f=r.length;ud[0]&&(h=r,r=d,d=h);var a=r[r.length-1],l=d[0];if(ad[0]&&(h=r,r=d,d=h);var a=r[r.length-1],l=d[0];if(av?o=x.lowerBound(d,p,o+1):(n.push(p),u++,o++);return n};function y(r){var d=0,h=-1/0,a,l,n,u=[];for(l=0,n=r.length;lh&&(h=a));if(u.length===0)return new r[0].constructor(0);if(u.length===1)return u[0].slice();if(u.length===2)return E(u[0],u[1]);r=u;var f=new r[0].constructor(d),o=t.getPointerArray(h),c=new o(r.length),p=new T(function(S,M){return S=r[S][c[S]],M=r[M][c[M]],SM?1:0});for(l=0;ld&&(d=h));if(n.length===0)return new r[0].constructor(0);if(n.length===1)return n[0].slice();if(n.length===2)return s(n[0],n[1]);r=n;var u=new r[0].constructor,f=t.getPointerArray(d),o=new f(r.length),c=new T(function(m,S){return m=r[m][o[m]],S=r[S][o[S]],mS?1:0});for(a=0;ad&&(d=a),lh)return[];if(d===h)return[d];var o,c,p=r[0],v,m,S,M,w,C,A=d;for(u=1;uC?m=x.lowerBound(c,w,m+1):(p.push(w),v++,m++);if(p.length===0)return p;A=p[0]}return p},g.merge=function(){if(arguments.length===2){if(i(arguments[0]))return E(arguments[0],arguments[1])}else if(i(arguments[0]))return y(arguments);return null},g.unionUnique=function(){if(arguments.length===2){if(i(arguments[0]))return s(arguments[0],arguments[1])}else if(i(arguments[0]))return e(arguments);return null},g.intersectionUnique=function(){if(arguments.length===2){if(i(arguments[0]))return g.intersectionUniqueArrays(arguments[0],arguments[1])}else if(i(arguments[0]))return g.kWayIntersectionUniqueArrays(arguments);return null}}),aO=ai((g,t)=>{var i=Hr(),x=Gn(),T=sO();function E(y){return y}function s(y){if(this.clear(),Array.isArray(y)?(this.documentTokenizer=y[0],this.queryTokenizer=y[1]):(this.documentTokenizer=y,this.queryTokenizer=y),this.documentTokenizer||(this.documentTokenizer=E),this.queryTokenizer||(this.queryTokenizer=E),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.")}s.prototype.clear=function(){this.items=[],this.mapping=new Map,this.size=0,this.dimension=0},s.prototype.add=function(y){this.size++;var e=this.items.length;this.items.push(y);var r=this.documentTokenizer(y);if(!Array.isArray(r))throw new Error("mnemonist/InvertedIndex.add: tokenizer function should return an array of tokens.");for(var d=new Set,h,a,l=0,n=r.length;l"u"||r.length===0)return[];if(e.length>1)for(h=1,a=e.length;h"u"||d.length===0)return[];r=T.intersectionUniqueArrays(r,d)}var l=new Array(r.length);for(h=0,a=l.length;h1?e:this;for(var r=0,d=this.documents.length;r=e)return{done:!0};var d=y[r++];return{value:d,done:!1}})},s.prototype.tokens=function(){return this.mapping.keys()},typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=s.prototype.documents),s.prototype.inspect=function(){var y=this.items.slice();return Object.defineProperty(y,"constructor",{value:s,enumerable:!1}),y},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect),s.from=function(y,e){var r=new s(e);return x(y,function(d){r.add(d)}),r},t.exports=s}),QM=ai(g=>{var t=new Float64Array(64),i=new Float64Array(64);function x(E,s,y){var e,r,d,h,a;for(t[0]=s,i[0]=y,r=0;r>=0;)if(d=t[r],h=i[r]-1,d=e&&di[r-1]-t[r-1]&&(a=t[r],t[r]=t[r-1],t[r-1]=a,a=i[r],i[r]=i[r-1],i[r-1]=a)}else r--;return E}g.inplaceQuickSort=x;function T(E,s,y,e){var r,d,h,a,l,n;for(t[0]=y,i[0]=e,d=0;d>=0;)if(h=t[d],a=i[d]-1,h=r&&hi[d-1]-t[d-1]&&(n=t[d],t[d]=t[d-1],t[d-1]=n,n=i[d],i[d]=i[d-1],i[d-1]=n)}else d--;return s}g.inplaceQuickSortIndices=T}),oO=ai((g,t)=>{var i=aa(),x=Ns(),T=tg().createTupleComparator,E=Zx(),s=QM().inplaceQuickSortIndices;function y(l,n,u,f){var o,c=0,p;for(o=0;o>>1),P=u[A],p[D]=P,w>-1&&(C===0?v[w]=D+1:m[w]=D+1),I=(I+1)%l,A!==b&&A!==O-1&&S.push([I,A+1,O,D,1]),A!==b&&S.push([I,b,A,D,0]),D++;return{axes:n,labels:f,pivots:p,lefts:v,rights:m}}function d(l,n){this.dimensions=l,this.visited=0,this.axes=n.axes,this.labels=n.labels,this.pivots=n.pivots,this.lefts=n.lefts,this.rights=n.rights,this.size=this.labels.length}d.prototype.nearestNeighbor=function(l){var n=1/0,u=null,f=this.dimensions,o=this.axes,c=this.pivots,p=this.lefts,v=this.rights,m=0;function S(M,w){m++;var C=p[w],A=v[w],P=c[w],b=y(f,o,P,l);if(!(b0?C!==0&&S(M,C-1):A!==0&&S(M,A-1),O*O0?A!==0&&S(M,A-1):C!==0&&S(M,C-1))}}return S(0,0),this.visited=m,this.labels[u]};var h=T(3),a=T(2);d.prototype.kNearestNeighbors=function(l,n){if(l<=0)throw new Error("mnemonist/kd-tree.kNearestNeighbors: k should be a positive number.");if(l=Math.min(l,this.size),l===1)return[this.nearestNeighbor(n)];var u=new E(Array,h,l),f=this.dimensions,o=this.axes,c=this.pivots,p=this.lefts,v=this.rights,m=0;function S(C,A){var P=p[A],b=v[A],O=c[A],I=y(f,o,O,n);u.push([I,m++,O]);var D=n[C],B=o[C][O],G=D-B;C=(C+1)%f,D{var i=Hr(),x=Gn();function T(){this.clear()}T.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},T.prototype.first=function(){return this.head?this.head.item:void 0},T.prototype.peek=T.prototype.first,T.prototype.last=function(){return this.tail?this.tail.item:void 0},T.prototype.push=function(E){var s={item:E,next:null};return this.head?(this.tail.next=s,this.tail=s):(this.head=s,this.tail=s),this.size++,this.size},T.prototype.unshift=function(E){var s={item:E,next:null};return this.head?(this.head.next||(this.tail=this.head),s.next=this.head,this.head=s):(this.head=s,this.tail=s),this.size++,this.size},T.prototype.shift=function(){if(this.size){var E=this.head;return this.head=E.next,this.size--,E.item}},T.prototype.forEach=function(E,s){if(this.size){s=arguments.length>1?s:this;for(var y=this.head,e=0;y;)E.call(s,y.item,e,this),y=y.next,e++}},T.prototype.toArray=function(){if(!this.size)return[];for(var E=new Array(this.size),s=0,y=this.size,e=this.head;s{var i=Hr(),x=Gn(),T=Ns(),E=aa();function s(y,e,r){if(arguments.length<2&&(r=y,y=null,e=null),this.capacity=r,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 d=T.getPointerArray(r);this.forward=new d(r),this.backward=new d(r),this.K=typeof y=="function"?new y(r):new Array(r),this.V=typeof e=="function"?new e(r):new Array(r),this.size=0,this.head=0,this.tail=0,this.items={}}s.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},s.prototype.splayOnTop=function(y){var e=this.head;if(this.head===y)return this;var r=this.backward[y],d=this.forward[y];return this.tail===y?this.tail=r:this.backward[d]=r,this.forward[r]=d,this.backward[e]=y,this.head=y,this.forward[y]=e,this},s.prototype.set=function(y,e){var r=this.items[y];if(typeof r<"u"){this.splayOnTop(r),this.V[r]=e;return}this.size1?e:this;for(var r=0,d=this.size,h=this.head,a=this.K,l=this.V,n=this.forward;r=e)return{done:!0};var a=d[r];return y++,y=e)return{done:!0};var a=d[r];return y++,y=e)return{done:!0};var l=d[r],n=h[r];return y++,y{var i=$x(),x=Gn(),T=Ns(),E=aa();function s(e,r,d){arguments.length<2?i.call(this,e):i.call(this,e,r,d);var h=T.getPointerArray(this.capacity);this.deleted=new h(this.capacity),this.deletedSize=0}for(y in i.prototype)s.prototype[y]=i.prototype[y];var y;typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=i.prototype[Symbol.iterator]),s.prototype.clear=function(){i.prototype.clear.call(this),this.deletedSize=0},s.prototype.set=function(e,r){var d=this.items[e];if(typeof d<"u"){this.splayOnTop(d),this.V[d]=r;return}this.size0?d=this.deleted[--this.deletedSize]:d=this.size,this.size++):(d=this.tail,this.tail=this.backward[d],delete this.items[this.K[d]]),this.items[e]=d,this.K[d]=e,this.V[d]=r,this.forward[d]=this.head,this.backward[this.head]=d,this.head=d},s.prototype.setpop=function(e,r){var d=null,h=null,a=this.items[e];return typeof a<"u"?(this.splayOnTop(a),d=this.V[a],this.V[a]=r,{evicted:!1,key:e,value:d}):(this.size0?a=this.deleted[--this.deletedSize]:a=this.size,this.size++):(a=this.tail,this.tail=this.backward[a],d=this.V[a],h=this.K[a],delete this.items[h]),this.items[e]=a,this.K[a]=e,this.V[a]=r,this.forward[a]=this.head,this.backward[this.head]=a,this.head=a,h?{evicted:!0,key:h,value:d}:null)},s.prototype.delete=function(e){var r=this.items[e];if(typeof r>"u")return!1;if(delete this.items[e],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var d=this.backward[r],h=this.forward[r];return this.head===r&&(this.head=h),this.tail===r&&(this.tail=d),this.forward[d]=h,this.backward[h]=d,this.size--,this.deleted[this.deletedSize++]=r,!0},s.prototype.remove=function(e,r=void 0){var d=this.items[e];if(typeof d>"u")return r;var h=this.V[d];if(delete this.items[e],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,h;var a=this.backward[d],l=this.forward[d];return this.head===d&&(this.head=l),this.tail===d&&(this.tail=a),this.forward[a]=l,this.backward[l]=a,this.size--,this.deleted[this.deletedSize++]=d,h},s.from=function(e,r,d,h){if(arguments.length<2){if(h=E.guessLength(e),typeof h!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(h=r,r=null,d=null);var a=new s(r,d,h);return x(e,function(l,n){a.set(n,l)}),a},t.exports=s}),_M=ai((g,t)=>{var i=$x(),x=Gn(),T=Ns(),E=aa();function s(y,e,r){if(arguments.length<2&&(r=y,y=null,e=null),this.capacity=r,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 d=T.getPointerArray(r);this.forward=new d(r),this.backward=new d(r),this.K=typeof y=="function"?new y(r):new Array(r),this.V=typeof e=="function"?new e(r):new Array(r),this.size=0,this.head=0,this.tail=0,this.items=new Map}s.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},s.prototype.set=function(y,e){var r=this.items.get(y);if(typeof r<"u"){this.splayOnTop(r),this.V[r]=e;return}this.size{var i=_M(),x=Gn(),T=Ns(),E=aa();function s(e,r,d){arguments.length<2?i.call(this,e):i.call(this,e,r,d);var h=T.getPointerArray(this.capacity);this.deleted=new h(this.capacity),this.deletedSize=0}for(y in i.prototype)s.prototype[y]=i.prototype[y];var y;typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=i.prototype[Symbol.iterator]),s.prototype.clear=function(){i.prototype.clear.call(this),this.deletedSize=0},s.prototype.set=function(e,r){var d=this.items.get(e);if(typeof d<"u"){this.splayOnTop(d),this.V[d]=r;return}this.size0?d=this.deleted[--this.deletedSize]:d=this.size,this.size++):(d=this.tail,this.tail=this.backward[d],this.items.delete(this.K[d])),this.items.set(e,d),this.K[d]=e,this.V[d]=r,this.forward[d]=this.head,this.backward[this.head]=d,this.head=d},s.prototype.setpop=function(e,r){var d=null,h=null,a=this.items.get(e);return typeof a<"u"?(this.splayOnTop(a),d=this.V[a],this.V[a]=r,{evicted:!1,key:e,value:d}):(this.size0?a=this.deleted[--this.deletedSize]:a=this.size,this.size++):(a=this.tail,this.tail=this.backward[a],d=this.V[a],h=this.K[a],this.items.delete(h)),this.items.set(e,a),this.K[a]=e,this.V[a]=r,this.forward[a]=this.head,this.backward[this.head]=a,this.head=a,h?{evicted:!0,key:h,value:d}:null)},s.prototype.delete=function(e){var r=this.items.get(e);if(typeof r>"u")return!1;if(this.items.delete(e),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var d=this.backward[r],h=this.forward[r];return this.head===r&&(this.head=h),this.tail===r&&(this.tail=d),this.forward[d]=h,this.backward[h]=d,this.size--,this.deleted[this.deletedSize++]=r,!0},s.prototype.remove=function(e,r=void 0){var d=this.items.get(e);if(typeof d>"u")return r;var h=this.V[d];if(this.items.delete(e),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,h;var a=this.backward[d],l=this.forward[d];return this.head===d&&(this.head=l),this.tail===d&&(this.tail=a),this.forward[a]=l,this.backward[l]=a,this.size--,this.deleted[this.deletedSize++]=d,h},s.from=function(e,r,d,h){if(arguments.length<2){if(h=E.guessLength(e),typeof h!="number")throw new Error("mnemonist/lru-map.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(h=r,r=null,d=null);var a=new s(r,d,h);return x(e,function(l,n){a.set(n,l)}),a},t.exports=s}),fO=ai((g,t)=>{var i=Hr(),x=Gn(),T=Zx(),E=function(y,e){return y[1]>e[1]?-1:y[1]"u"?0:e},s.prototype.get=s.prototype.multiplicity,s.prototype.count=s.prototype.multiplicity,s.prototype.frequency=function(y){if(this.size===0)return 0;var e=this.multiplicity(y);return e/this.size},s.prototype.top=function(y){if(typeof y!="number"||y<=0)throw new Error("mnemonist/multi-set.top: n must be a number > 0.");for(var e=new T(Array,E,y),r=this.items.entries(),d;d=r.next(),!d.done;)e.push(d.value);return e.consume()},s.prototype.forEach=function(y,e){e=arguments.length>1?e:this;var r;this.items.forEach(function(d,h){for(r=0;r1?e:this,this.items.forEach(y,e)},s.prototype.keys=function(){return this.items.keys()},s.prototype.values=function(){var y=this.items.entries(),e=!1,r,d,h,a;return new i(function l(){if(!e){if(r=y.next(),r.done)return{done:!0};e=!0,d=r.value[0],h=r.value[1],a=0}return a>=h?(e=!1,l()):(a++,{done:!1,value:d})})},s.prototype.multiplicities=function(){return this.items.entries()},typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=s.prototype.values),s.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect),s.prototype.toJSON=function(){return this.items},s.from=function(y){var e=new s;return x(y,function(r){e.add(r)}),e},s.isSubset=function(y,e){var r=y.multiplicities(),d,h,a;if(y===e)return!0;if(y.dimension>e.dimension)return!1;for(;d=r.next(),!d.done;)if(h=d.value[0],a=d.value[1],e.multiplicity(h){var i=Hr(),x=Gn();function T(l,n,u){return((Math.pow(l,2)-Math.pow(Math.abs(n-u),2))/2|0)+l+1}function E(l,n){for(var u=0,f=0,o=n+1;fn.length?-1:l.lengthn?1:0}function y(l,n){var u=l+1,f=n/u|0,o=f+1,c,p,v=n-f*u,m=u-v,S=new Array(l+1);for(c=0;c 0");this.levenshtein=l,this.k=n,this.clear()}a.prototype.clear=function(){this.size=0,this.strings=[],this.invertedIndices={}},a.prototype.add=function(l){var n=l.length,u=this.size;this.strings.push(l),this.size++;var f=e(this.k,l),o=this.invertedIndices[n];typeof o>"u"&&(o={},this.invertedIndices[n]=o);var c,p,v,m,S;for(m=0,S=f.length;m"u"?(p=[u],o[v]=p):p.push(u);return this},a.prototype.search=function(l){var n=l.length,u=this.k,f=new Set,o,c,p,v,m,S,M,w,C,A,P,b,O,I,D;for(w=Math.max(0,n-u),C=n+u+1;w1?n:this;for(var u=0,f=this.strings.length;u=n)return{done:!0};var f=l[u];return u++,{value:f,done:!1}})},typeof Symbol<"u"&&(a.prototype[Symbol.iterator]=a.prototype.values),a.prototype.inspect=function(){var l=this.strings.slice();return Object.defineProperty(l,"constructor",{value:a,enumerable:!1}),l},typeof Symbol<"u"&&(a.prototype[Symbol.for("nodejs.util.inspect.custom")]=a.prototype.inspect),a.from=function(l,n,u){var f=new a(n,u);return x(l,function(o){f.add(o)}),f},a.countKeys=E,a.comparator=s,a.partition=y,a.segments=e,a.segmentPos=r,a.multiMatchAwareInterval=d,a.multiMatchAwareSubstrings=h,t.exports=a}),dO=ai((g,t)=>{var i=Hr(),x=Gn();function T(){this.clear()}T.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},T.prototype.enqueue=function(E){return this.items.push(E),++this.size},T.prototype.dequeue=function(){if(this.size){var E=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,E}},T.prototype.peek=function(){if(this.size)return this.items[this.offset]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=this.offset,e=0,r=this.items.length;y=E.length)return{done:!0};var y=E[s];return s++,{value:y,done:!1}})},T.prototype.entries=function(){var E=this.items,s=this.offset,y=0;return new i(function(){if(s>=E.length)return{done:!0};var e=E[s];return s++,{value:[y++,e],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.toString=function(){return this.toArray().join(",")},T.prototype.toJSON=function(){return this.toArray()},T.prototype.inspect=function(){var E=this.toArray();return Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E){var s=new T;return x(E,function(y){s.enqueue(y)}),s},T.of=function(){return T.from(arguments)},t.exports=T}),pO=ai((g,t)=>{var i=Hr(),x=Gn();function T(){this.clear()}T.prototype.clear=function(){this.items=[],this.size=0},T.prototype.push=function(E){return this.items.push(E),++this.size},T.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},T.prototype.peek=function(){return this.items[this.size-1]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=0,e=this.items.length;y=s)return{done:!0};var e=E[s-y-1];return y++,{value:e,done:!1}})},T.prototype.entries=function(){var E=this.items,s=E.length,y=0;return new i(function(){if(y>=s)return{done:!0};var e=E[s-y-1];return{value:[y++,e],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.toString=function(){return this.toArray().join(",")},T.prototype.toJSON=function(){return this.toArray()},T.prototype.inspect=function(){var E=this.toArray();return Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E){var s=new T;return x(E,function(y){s.push(y)}),s},T.of=function(){return T.from(arguments)},t.exports=T}),vO=ai(g=>{g.intersection=function(){if(arguments.length<2)throw new Error("mnemonist/Set.intersection: needs at least two arguments.");var t=new Set,i=1/0,x=null,T,E,s=arguments.length;for(E=0;Ei.size)return!1;for(;T=x.next(),!T.done;)if(!i.has(T.value))return!1;return!0},g.isSuperset=function(t,i){return g.isSubset(i,t)},g.add=function(t,i){for(var x=i.values(),T;T=x.next(),!T.done;)t.add(T.value)},g.subtract=function(t,i){for(var x=i.values(),T;T=x.next(),!T.done;)t.delete(T.value)},g.intersect=function(t,i){for(var x=t.values(),T;T=x.next(),!T.done;)i.has(T.value)||t.delete(T.value)},g.disjunct=function(t,i){for(var x=t.values(),T,E=[];T=x.next(),!T.done;)i.has(T.value)&&E.push(T.value);for(x=i.values();T=x.next(),!T.done;)t.has(T.value)||t.add(T.value);for(var s=0,y=E.length;si.size&&(x=t,t=i,i=x),t.size===0)return 0;if(t===i)return t.size;for(var T=t.values(),E,s=0;E=T.next(),!E.done;)i.has(E.value)&&s++;return s},g.unionSize=function(t,i){var x=g.intersectionSize(t,i);return t.size+i.size-x},g.jaccard=function(t,i){var x=g.intersectionSize(t,i);if(x===0)return 0;var T=t.size+i.size-x;return x/T},g.overlap=function(t,i){var x=g.intersectionSize(t,i);return x===0?0:x/Math.min(t.size,i.size)}}),mO=ai((g,t)=>{var i=Hr(),x=Ns().getPointerArray;function T(E){var s=x(E);this.start=0,this.size=0,this.capacity=E,this.dense=new s(E),this.sparse=new s(E)}T.prototype.clear=function(){this.start=0,this.size=0},T.prototype.has=function(E){if(this.size===0)return!1;var s=this.sparse[E],y=s=this.start&&s=this.start&&s1?s:this;for(var y=this.capacity,e=this.size,r=this.start,d=0;d=y)return{done:!0};var d=E[e];return e++,r++,e===s&&(e=0),{value:d,done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=[];return this.forEach(function(s){E.push(s)}),Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E.capacity=this.capacity,E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),t.exports=T}),gO=ai((g,t)=>{var i=Hr(),x=Ns().getPointerArray;function T(E,s){arguments.length<2&&(s=E,E=Array);var y=x(s);this.size=0,this.length=s,this.dense=new y(s),this.sparse=new y(s),this.vals=new E(s)}T.prototype.clear=function(){this.size=0},T.prototype.has=function(E){var s=this.sparse[E];return s=this.size||this.dense[s]!==E?!1:(s=this.dense[this.size-1],this.dense[this.sparse[E]]=s,this.sparse[s]=this.sparse[E],this.size--,!0)},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=0;y{var i=Hr(),x=Ns().getPointerArray;function T(E){var s=x(E);this.size=0,this.length=E,this.dense=new s(E),this.sparse=new s(E)}T.prototype.clear=function(){this.size=0},T.prototype.has=function(E){var s=this.sparse[E];return s=this.size||this.dense[s]!==E?!1:(s=this.dense[this.size-1],this.dense[this.sparse[E]]=s,this.sparse[s]=this.sparse[E],this.size--,!0)},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y,e=0;e{var i=Gn(),x=2,T=2,E=new Set([0,1,2]),s={0:"Returns only the top suggestion",1:"Returns suggestions with the smallest edit distance",2:"Returns every suggestion (no early termination)"};function y(n){var u=new Set;return typeof n=="number"&&u.add(n),{suggestions:u,count:0}}function e(n,u,f){return{term:n||"",distance:u||0,count:f||0}}function r(n,u,f,o){o=o||new Set,u++;var c,p=n.length,v;if(p>1)for(v=0;v0&&n[v].length-p.length>o.length-p.length&&(f.suggestions=new Set,f.count=0),(u===2||!f.suggestions.size||n[v].length-p.length>=o.length-p.length)&&f.suggestions.add(c)}function h(n,u){var f=n.length,o=u.length,c=[[]],p=f+o,v=new Map,m,S,M;for(c[0][0]=p,m=0;m<=f;m++)c[m+1]||(c[m+1]=[]),c[m+1][1]=m,c[m+1][0]=p;for(M=0;M<=o;M++)c[1][M+1]=M,c[0][M+1]=p;var w=n+u,C;for(m=0,S=w.length;mc)return[];for(var m=[p],S=new Set,M=new Set,w=[],C,A;m.length>0&&(C=m.shift(),!(f<2&&w.length>0&&v-C.length>w[0].distance));){if(A=n[C],A!==void 0){if(typeof A=="number"&&(A=y(A)),A.count>0&&!M.has(C)){M.add(C);var P=e(C,v-C.length,A.count);if(w.push(P),f<2&&v-C.length===0)break}A.suggestions.forEach(D=>{var B=u[D];if(!M.has(B)){M.add(B);var G=0;if(p!==B)if(B.length===C.length)G=v-C.length;else if(v===C.length)G=B.length-C.length;else{for(var z=0,X=0,j=B.length;z0||X>0?G=h(B.substr(z,j-z-X),p.substr(z,v-z-X)):G=h(B,p)}if(f<2&&w.length>0&&w[0].distance>G&&(w=[]),!(f<2&&w.length>0&&G>w[0].distance)&&G<=o){var Q=n[B];Q!==void 0&&w.push(e(B,G,Q.count))}}})}if(v-C.length0&&v-C.length>=w[0].distance)continue;for(var b=0,O=C.length;bthis.maxLength&&(this.maxLength=n.length)),u.count===1){var f=this.words.length;this.words.push(n);var o=r(n,0,this.maxDistance);o.forEach(c=>{var p=this.dictionary[c];p!==void 0?(typeof p=="number"&&(p=y(p),this.dictionary[c]=p),p.suggestions.has(f)||d(this.words,this.verbosity,p,n,f,c)):this.dictionary[c]=f})}return this.size++,this},l.prototype.search=function(n){return a(this.dictionary,this.words,this.verbosity,this.maxDistance,this.maxLength,n)},l.prototype.inspect=function(){var n=[];n.size=this.size,n.maxDistance=this.maxDistance,n.verbosity=this.verbosity,n.behavior=s[this.verbosity];for(var u in this.dictionary)typeof this.dictionary[u]=="object"&&this.dictionary[u].count&&n.push([u,this.dictionary[u].count]);return Object.defineProperty(n,"constructor",{value:l,enumerable:!1}),n},typeof Symbol<"u"&&(l.prototype[Symbol.for("nodejs.util.inspect.custom")]=l.prototype.inspect),l.from=function(n,u){var f=new l(u);return i(n,function(o){f.add(o)}),f},t.exports=l}),qM=ai((g,t)=>{var i=Gn(),x=Hr(),T="\0";function E(s){this.mode=s===Array?"array":"string",this.clear()}E.prototype.clear=function(){this.root={},this.size=0},E.prototype.set=function(s,y){for(var e=this.root,r,d=0,h=s.length;d"u")return;if(T in y)return y[T]},E.prototype.delete=function(s){var y=this.root,e=null,r=null,d,h,a,l;for(a=0,l=s.length;a"u")return!1;e!==null?Object.keys(y).length>1&&(e=null,r=null):Object.keys(y).length<2&&(e=d,r=h)}return T in y?(this.size--,e?delete e[r]:delete y[T],!0):!1},E.prototype.has=function(s){for(var y=this.root,e,r=0,d=s.length;r"u")return!1;return T in y},E.prototype.find=function(s){var y=typeof s=="string",e=this.root,r=[],d,h,a;for(h=0,a=s.length;h"u")return r;for(var l=[e],n=[s],u;l.length;){s=n.pop(),e=l.pop();for(u in e){if(u===T){r.push([s,e[T]]);continue}l.push(e[u]),n.push(y?s+u:s.concat(u))}}return r},E.prototype.values=function(s){var y=this.root,e=[],r,d,h;if(s){for(d=0,h=s.length;d"u")return x.empty()}return e.push(y),new x(function(){for(var a,l=!1,n;e.length;){a=e.pop();for(n in a){if(n===T){l=!0;continue}e.push(a[n])}if(l)return{done:!1,value:a[T]}}return{done:!0}})},E.prototype.prefixes=function(s){var y=this.root,e=[],r=[],d,h,a,l=this.mode==="string";if(s){for(h=0,a=s.length;h"u")return x.empty()}else s=l?"":[];return e.push(y),r.push(s),new x(function(){for(var n,u,f=!1,o;e.length;){n=e.pop(),u=r.pop();for(o in n){if(o===T){f=!0;continue}e.push(n[o]),r.push(l?u+o:u.concat(o))}if(f)return{done:!1,value:u}}return{done:!0}})},E.prototype.keys=E.prototype.prefixes,E.prototype.entries=function(s){var y=this.root,e=[],r=[],d,h,a,l=this.mode==="string";if(s){for(h=0,a=s.length;h"u")return x.empty()}else s=l?"":[];return e.push(y),r.push(s),new x(function(){for(var n,u,f=!1,o;e.length;){n=e.pop(),u=r.pop();for(o in n){if(o===T){f=!0;continue}e.push(n[o]),r.push(l?u+o:u.concat(o))}if(f)return{done:!1,value:[u,n[T]]}}return{done:!0}})},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.entries),E.prototype.inspect=function(){for(var s=new Array(this.size),y=this.entries(),e,r=0;e=y.next(),!e.done;)s[r++]=e.value;return Object.defineProperty(s,"constructor",{value:E,enumerable:!1}),s},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.prototype.toJSON=function(){return this.root},E.from=function(s){var y=new E;return i(s,function(e,r){y.set(r,e)}),y},E.SENTINEL=T,t.exports=E}),SO=ai((g,t)=>{var i=Gn(),x=qM(),T="\0";function E(y){this.mode=y===Array?"array":"string",this.clear()}for(s in x.prototype)E.prototype[s]=x.prototype[s];var s;delete E.prototype.set,delete E.prototype.get,delete E.prototype.values,delete E.prototype.entries,E.prototype.add=function(y){for(var e=this.root,r,d=0,h=y.length;d"u")return d;for(var n=[r],u=[y],f;n.length;){y=u.pop(),r=n.pop();for(f in r){if(f===T){d.push(y);continue}n.push(r[f]),u.push(e?y+f:y.concat(f))}}return d},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.keys),E.prototype.inspect=function(){for(var y=new Set,e=this.keys(),r;r=e.next(),!r.done;)y.add(r.value);return Object.defineProperty(y,"constructor",{value:E,enumerable:!1}),y},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.prototype.toJSON=function(){return this.root},E.from=function(y){var e=new E;return i(y,function(r){e.add(r)}),e},E.SENTINEL=T,t.exports=E}),TO=ai((g,t)=>{var i=Hr(),x=Gn(),T=aa(),E=Ns(),s=function(d){return Math.max(1,Math.ceil(d*1.5))},y=function(d){var h=E.getPointerArray(d);return new h(d)};function e(d,h){if(arguments.length<1)throw new Error("mnemonist/vector: expecting at least a byte array constructor.");var a=h||0,l=s,n=0,u=!1;typeof h=="object"&&(a=h.initialCapacity||0,n=h.initialLength||0,l=h.policy||l,u=h.factory===!0),this.factory=u?d:null,this.ArrayClass=d,this.length=n,this.capacity=Math.max(n,a),this.policy=l,this.array=new d(this.capacity)}e.prototype.set=function(d,h){if(this.lengththis.capacity)if(this.factory===null?this.array=new this.ArrayClass(d):this.array=this.factory(d),E.isTypedArray(this.array))this.array.set(h,0);else for(var a=0,l=this.length;a=d)return this;for(h=this.capacity;h=h)return{done:!0};var l=d[a];return a++,{value:l,done:!1}})},e.prototype.entries=function(){var d=this.array,h=this.length,a=0;return new i(function(){if(a>=h)return{done:!0};var l=d[a];return{value:[a++,l],done:!1}})},typeof Symbol<"u"&&(e.prototype[Symbol.iterator]=e.prototype.values),e.prototype.inspect=function(){var d=this.array.slice(0,this.length);return d.type=this.array.constructor.name,d.items=this.length,d.capacity=this.capacity,Object.defineProperty(d,"constructor",{value:e,enumerable:!1}),d},typeof Symbol<"u"&&(e.prototype[Symbol.for("nodejs.util.inspect.custom")]=e.prototype.inspect),e.from=function(d,h,a){if(arguments.length<3&&(a=T.guessLength(d),typeof a!="number"))throw new Error("mnemonist/vector.from: could not guess iterable length. Please provide desired capacity as last argument.");var l=new e(h,a);return x(d,function(n){l.push(n)}),l};function r(d){var h=function(l){e.call(this,d,l)};for(var a in e.prototype)e.prototype.hasOwnProperty(a)&&(h.prototype[a]=e.prototype[a]);return h.from=function(l,n){return e.from(l,d,n)},typeof Symbol<"u"&&(h.prototype[Symbol.iterator]=h.prototype.values),h}e.Int8Vector=r(Int8Array),e.Uint8Vector=r(Uint8Array),e.Uint8ClampedVector=r(Uint8ClampedArray),e.Int16Vector=r(Int16Array),e.Uint16Vector=r(Uint16Array),e.Int32Vector=r(Int32Array),e.Uint32Vector=r(Uint32Array),e.Float32Vector=r(Float32Array),e.Float64Vector=r(Float64Array),e.PointerVector=r(y),t.exports=e}),EO=ai((g,t)=>{var i=aa(),x=Ns(),T=QM().inplaceQuickSortIndices,E=JM().lowerBoundIndices,s=Kx(),y=x.getPointerArray;function e(h,a){return h.distancea.distance?-1:0}function r(h,a,l){for(var n=l.length,u=y(n),f=0,o=new u(n),c=new u(n),p=new u(n),v=new Float64Array(n),m=[0,0,n],S=new Float64Array(n),M,w,C,A,P,b,O,I,D;m.length;)if(P=m.pop(),A=m.pop(),M=m.pop(),w=l[P-1],P--,D=P-A,o[M]=w,D!==0){if(D===1){O=h(a[w],a[l[A]]),v[M]=O,f++,p[M]=f,o[f]=l[A];continue}for(I=A;I0&&(f++,p[M]=f,m.push(f,b,P)),b-A>0&&(f++,c[M]=f,m.push(f,A,b))}return{nodes:o,lefts:c,rights:p,mus:v}}function d(h,a){if(typeof h!="function")throw new Error("mnemonist/VPTree.constructor: given `distance` must be a function.");if(!a)throw new Error("mnemonist/VPTree.constructor: you must provide items to the tree. A VPTree cannot be updated after its creation.");this.distance=h,this.heap=new s(e),this.D=0;var l=i.toArrayWithIndices(a);this.items=l[0];var n=l[1];this.size=n.length;var u=r(h,this.items,n);this.nodes=u.nodes,this.lefts=u.lefts,this.rights=u.rights,this.mus=u.mus}d.prototype.nearestNeighbors=function(h,a){var l=this.heap,n=[0],u=1/0,f,o,c,p,v,m,S;for(this.D=0;n.length;)f=n.pop(),o=this.nodes[f],c=this.items[o],S=this.distance(c,a),this.D++,Sh&&l.pop(),l.size>=h&&(u=l.peek().distance)),p=this.lefts[f],v=this.rights[f],!(!p&&!v)&&(m=this.mus[f],S=m-u&&n.push(v)):(v&&S>=m-u&&n.push(v),p&&S=0;w--)M[w]=l.pop();return M},d.prototype.neighbors=function(h,a){var l=[],n=[0],u,f,o,c,p,v,m;for(this.D=0;n.length;)u=n.pop(),f=this.nodes[u],o=this.items[f],m=this.distance(o,a),this.D++,m<=h&&l.push({distance:m,item:o}),c=this.lefts[u],p=this.rights[u],!(!c&&!p)&&(v=this.mus[u],m=v-h&&n.push(p)):(p&&m>=v-h&&n.push(p),c&&m{var i=Kx(),x=jx(),T=YF();t.exports={BiMap:kF(),BitSet:jF(),BitVector:KF(),BloomFilter:$F(),BKTree:JF(),CircularBuffer:QF(),DefaultMap:_F(),DefaultWeakMap:qF(),FixedDeque:KM(),StaticDisjointSet:tO(),FibonacciHeap:x,MinFibonacciHeap:x.MinFibonacciHeap,MaxFibonacciHeap:x.MaxFibonacciHeap,FixedReverseHeap:Zx(),FuzzyMap:eO(),FuzzyMultiMap:iO(),HashedArrayTree:nO(),Heap:i,MinHeap:i.MinHeap,MaxHeap:i.MaxHeap,StaticIntervalTree:rO(),InvertedIndex:aO(),KDTree:oO(),LinkedList:lO(),LRUCache:$x(),LRUCacheWithDelete:hO(),LRUMap:_M(),LRUMapWithDelete:uO(),MultiMap:ZM(),MultiSet:fO(),PassjoinIndex:cO(),Queue:dO(),FixedStack:$M(),Stack:pO(),SuffixArray:T,GeneralizedSuffixArray:T.GeneralizedSuffixArray,Set:vO(),SparseQueueSet:mO(),SparseMap:gO(),SparseSet:yO(),SymSpell:xO(),Trie:SO(),TrieMap:qM(),Vector:TO(),VPTree:EO()}}),_t=class cr{static get ZERO(){return new cr(0,0)}static get ONE(){return new cr(1,1)}static get UP(){return new cr(0,-1)}static get DOWN(){return new cr(0,1)}static get LEFT(){return new cr(-1,0)}static get RIGHT(){return new cr(1,0)}static get UP_LEFT(){return new cr(-1,-1)}static get UP_RIGHT(){return new cr(1,-1)}static get DOWN_RIGHT(){return new cr(1,1)}static get DOWN_LEFT(){return new cr(-1,1)}constructor(t,i){typeof t=="number"?(this.x=t,this.y=i||0):(this.x=t.x,this.y=t.y)}clone(){return new cr(this.x,this.y)}add(t){return new cr(this.x+t.x,this.y+t.y)}multiply(t){return new cr(this.x*t.x,this.y*t.y)}divide(t){return new cr(this.x/t.x,this.y/t.y)}subtract(t){return new cr(this.x-t.x,this.y-t.y)}equals(t){return this.x===t.x&&this.y===t.y}abs(){return new cr(Math.abs(this.x),Math.abs(this.y))}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}modulo(t){return new cr(this.x%t.x,this.y%t.y)}scalarModulo(t){return new cr(this.x%t,this.y%t)}scalarMult(t){return new cr(this.x*t,this.y*t)}toPosition(){return{x:this.x,y:this.y}}toString(){return`${this.x}#${this.y}`}},Ri=class{static equal(g,t){return g.position.x===t.position.x&&g.position.y===t.position.y&&g.layer===t.layer}static copyOver(g,t){t.position.x=g.position.x,t.position.y=g.position.y,t.layer=g.layer}static clone(g){return{position:g.position.clone(),layer:g.layer}}static toString(g){return`${g.position.toString()}#${g.layer}`}static toInternal(g){return{position:new _t(g.position.x,g.position.y),layer:g.charLayer}}static fromInternal(g){return{position:g.position.toPosition(),charLayer:g.layer}}},CO=(g=>(g.NONE="none",g.LEFT="left",g.UP_LEFT="up-left",g.UP="up",g.UP_RIGHT="up-right",g.RIGHT="right",g.DOWN_RIGHT="down-right",g.DOWN="down",g.DOWN_LEFT="down-left",g))(CO||{}),wO={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"},AO={up:_t.UP,down:_t.DOWN,left:_t.LEFT,right:_t.RIGHT,none:_t.ZERO,"up-left":_t.UP_LEFT,"up-right":_t.UP_RIGHT,"down-right":_t.DOWN_RIGHT,"down-left":_t.DOWN_LEFT},xm={up:0,"up-right":1,right:2,"down-right":3,down:4,"down-left":5,left:6,"up-left":7,none:NaN},tC=["up","up-right","right","down-right","down","down-left","left","up-left"],PO=["down-left","down-right","up-right","up-left"];function Jx(){return["up","down","left","right","none","up-left","up-right","down-right","down-left"]}function ud(g){return PO.includes(g)}function RO(g,t=1){return g==="none"?"none":tC[(xm[g]+8-Math.abs(t)%8)%8]}function eC(g,t=1){return g==="none"?"none":tC[(xm[g]+t)%8]}function Pu(g){return AO[g]}function bO(g){return wO[g]}function Ca(g,t){if(g.x===t.x){if(g.y>t.y)return"up";if(g.yt.x)return"left";if(g.xt.x){if(g.yt.y)return"up-left"}else if(g.xt.y)return"up-right"}return"none"}var LO=(g=>(g[g.FOUR=4]="FOUR",g[g.EIGHT=8]="EIGHT",g))(LO||{});function Gf(g){return typeof g=="string"&&Jx().includes(g)}var Py=function(g,t){return Py=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,x){i.__proto__=x}||function(i,x){for(var T in x)Object.prototype.hasOwnProperty.call(x,T)&&(i[T]=x[T])},Py(g,t)};function Zd(g,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Py(g,t);function i(){this.constructor=g}g.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}function FO(g,t,i,x){function T(E){return E instanceof i?E:new i(function(s){s(E)})}return new(i||(i=Promise))(function(E,s){function y(d){try{r(x.next(d))}catch(h){s(h)}}function e(d){try{r(x.throw(d))}catch(h){s(h)}}function r(d){d.done?E(d.value):T(d.value).then(y,e)}r((x=x.apply(g,t||[])).next())})}function iC(g,t){var i={label:0,sent:function(){if(E[0]&1)throw E[1];return E[1]},trys:[],ops:[]},x,T,E,s;return s={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function y(r){return function(d){return e([r,d])}}function e(r){if(x)throw new TypeError("Generator is already executing.");for(;s&&(s=0,r[0]&&(i=0)),i;)try{if(x=1,T&&(E=r[0]&2?T.return:r[0]?T.throw||((E=T.return)&&E.call(T),0):T.next)&&!(E=E.call(T,r[1])).done)return E;switch(T=0,E&&(r=[r[0]&2,E.value]),r[0]){case 0:case 1:E=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,T=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(E=i.trys,!(E=E.length>0&&E[E.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!E||r[1]>E[0]&&r[1]=g.length&&(g=void 0),{value:g&&g[x++],done:!g}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function xd(g,t){var i=typeof Symbol=="function"&&g[Symbol.iterator];if(!i)return g;var x=i.call(g),T,E=[],s;try{for(;(t===void 0||t-- >0)&&!(T=x.next()).done;)E.push(T.value)}catch(y){s={error:y}}finally{try{T&&!T.done&&(i=x.return)&&i.call(x)}finally{if(s)throw s.error}}return E}function Sd(g,t,i){if(i||arguments.length===2)for(var x=0,T=t.length,E;x1||y(a,l)})})}function y(a,l){try{e(x[a](l))}catch(n){h(E[0][3],n)}}function e(a){a.value instanceof Kf?Promise.resolve(a.value.v).then(r,d):h(E[0][2],a)}function r(a){y("next",a)}function d(a){y("throw",a)}function h(a,l){a(l),E.shift(),E.length&&y(E[0][0],E[0][1])}}function DO(g){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=g[Symbol.asyncIterator],i;return t?t.call(g):(g=typeof Qf=="function"?Qf(g):g[Symbol.iterator](),i={},x("next"),x("throw"),x("return"),i[Symbol.asyncIterator]=function(){return this},i);function x(E){i[E]=g[E]&&function(s){return new Promise(function(y,e){s=g[E](s),T(y,e,s.done,s.value)})}}function T(E,s,y,e){Promise.resolve(e).then(function(r){E({value:r,done:y})},s)}}function gr(g){return typeof g=="function"}function nC(g){var t=function(x){Error.call(x),x.stack=new Error().stack},i=g(t);return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}var g0=nC(function(g){return function(t){g(this),this.message=t?t.length+` errors occurred during unsubscription: -`+t.map(function(i,x){return x+1+") "+i.toString()}).join(` - `):"",this.name="UnsubscriptionError",this.errors=t}});function Ry(g,t){if(g){var i=g.indexOf(t);0<=i&&g.splice(i,1)}}var eg=function(){function g(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return g.prototype.unsubscribe=function(){var t,i,x,T,E;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var y=Qf(s),e=y.next();!e.done;e=y.next()){var r=e.value;r.remove(this)}}catch(u){t={error:u}}finally{try{e&&!e.done&&(i=y.return)&&i.call(y)}finally{if(t)throw t.error}}else s.remove(this);var d=this.initialTeardown;if(gr(d))try{d()}catch(u){E=u instanceof g0?u.errors:[u]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var a=Qf(h),l=a.next();!l.done;l=a.next()){var n=l.value;try{iT(n)}catch(u){E=E??[],u instanceof g0?E=Sd(Sd([],xd(E)),xd(u.errors)):E.push(u)}}}catch(u){x={error:u}}finally{try{l&&!l.done&&(T=a.return)&&T.call(a)}finally{if(x)throw x.error}}}if(E)throw new g0(E)}},g.prototype.add=function(t){var i;if(t&&t!==this)if(this.closed)iT(t);else{if(t instanceof g){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(i=this._finalizers)!==null&&i!==void 0?i:[]).push(t)}},g.prototype._hasParent=function(t){var i=this._parentage;return i===t||Array.isArray(i)&&i.includes(t)},g.prototype._addParent=function(t){var i=this._parentage;this._parentage=Array.isArray(i)?(i.push(t),i):i?[i,t]:t},g.prototype._removeParent=function(t){var i=this._parentage;i===t?this._parentage=null:Array.isArray(i)&&Ry(i,t)},g.prototype.remove=function(t){var i=this._finalizers;i&&Ry(i,t),t instanceof g&&t._removeParent(this)},g.EMPTY=function(){var t=new g;return t.closed=!0,t}(),g}(),rC=eg.EMPTY;function sC(g){return g instanceof eg||g&&"closed"in g&&gr(g.remove)&&gr(g.add)&&gr(g.unsubscribe)}function iT(g){gr(g)?g():g.unsubscribe()}var aC={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},IO={setTimeout:function(g,t){for(var i=[],x=2;x0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(i){return this._throwIfClosed(),g.prototype._trySubscribe.call(this,i)},t.prototype._subscribe=function(i){return this._throwIfClosed(),this._checkFinalizedStatuses(i),this._innerSubscribe(i)},t.prototype._innerSubscribe=function(i){var x=this,T=this,E=T.hasError,s=T.isStopped,y=T.observers;return E||s?rC:(this.currentObservers=null,y.push(i),new eg(function(){x.currentObservers=null,Ry(y,i)}))},t.prototype._checkFinalizedStatuses=function(i){var x=this,T=x.hasError,E=x.thrownError,s=x.isStopped;T?i.error(E):s&&i.complete()},t.prototype.asObservable=function(){var i=new Pa;return i.source=this,i},t.create=function(i,x){return new rT(i,x)},t}(Pa),rT=function(g){Zd(t,g);function t(i,x){var T=g.call(this)||this;return T.destination=i,T.source=x,T}return t.prototype.next=function(i){var x,T;(T=(x=this.destination)===null||x===void 0?void 0:x.next)===null||T===void 0||T.call(x,i)},t.prototype.error=function(i){var x,T;(T=(x=this.destination)===null||x===void 0?void 0:x.error)===null||T===void 0||T.call(x,i)},t.prototype.complete=function(){var i,x;(x=(i=this.destination)===null||i===void 0?void 0:i.complete)===null||x===void 0||x.call(i)},t.prototype._subscribe=function(i){var x,T;return(T=(x=this.source)===null||x===void 0?void 0:x.subscribe(i))!==null&&T!==void 0?T:rC},t}(Nn),uC=new Pa(function(g){return g.complete()});function kO(g){return g&&gr(g.schedule)}function fC(g){return g[g.length-1]}function cC(g){return kO(fC(g))?g.pop():void 0}function dC(g,t){return typeof fC(g)=="number"?g.pop():t}var pC=function(g){return g&&typeof g.length=="number"&&typeof g!="function"};function vC(g){return gr(g?.then)}function mC(g){return gr(g[_x])}function gC(g){return Symbol.asyncIterator&&gr(g?.[Symbol.asyncIterator])}function yC(g){return new TypeError("You provided "+(g!==null&&typeof g=="object"?"an invalid object":"'"+g+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function jO(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var xC=jO();function SC(g){return gr(g?.[xC])}function TC(g){return OO(this,arguments,function(){var t,i,x,T;return iC(this,function(E){switch(E.label){case 0:t=g.getReader(),E.label=1;case 1:E.trys.push([1,,9,10]),E.label=2;case 2:return[4,Kf(t.read())];case 3:return i=E.sent(),x=i.value,T=i.done,T?[4,Kf(void 0)]:[3,5];case 4:return[2,E.sent()];case 5:return[4,Kf(x)];case 6:return[4,E.sent()];case 7:return E.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function EC(g){return gr(g?.getReader)}function Iu(g){if(g instanceof Pa)return g;if(g!=null){if(mC(g))return KO(g);if(pC(g))return ZO(g);if(vC(g))return $O(g);if(gC(g))return MC(g);if(SC(g))return JO(g);if(EC(g))return QO(g)}throw yC(g)}function KO(g){return new Pa(function(t){var i=g[_x]();if(gr(i.subscribe))return i.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function ZO(g){return new Pa(function(t){for(var i=0;i{let T=this.tilePosInDirection(new _t(i,x),g);return this.tilemap.hasBlockingTile(T,t,bO(g),this.ignoreMissingTiles)})}isCharBlocking(g,t){return this.someCharTile((i,x)=>{let T=this.tilePosInDirection(new _t(i,x),g);return this.tilemap.hasBlockingChar(T,t,this.getCollisionGroups(),new Set([this.getId()]),this.ignoreCollisionGroups)})}isMoving(){return this.movementDirection!="none"}turnTowards(g){this.isMoving()||g!="none"&&this.changeFacingDirection(g)}changeFacingDirection(g){this.facingDirection!==g&&(this.facingDirection=g,this.directionChanged$.next(g))}getFacingDirection(){return this.facingDirection}getFacingPosition(){return this._tilePos.position.add(Pu(this.facingDirection))}addCollisionGroup(g){this.collisionGroups.add(g)}setCollisionGroups(g){this.collisionGroups=new Set(g)}setIgnoreCollisionGroups(g){this.ignoreCollisionGroups=new Set(g)}getCollisionGroups(){return Array.from(this.collisionGroups)}getIgnoreCollisionGroups(){return Array.from(this.ignoreCollisionGroups)}hasCollisionGroup(g){return this.collisionGroups.has(g)}removeCollisionGroup(g){this.collisionGroups.delete(g)}removeAllCollisionGroups(){this.collisionGroups.clear()}addLabels(g){for(let t of g)this.labels.add(t)}getLabels(){return[...this.labels.values()]}hasLabel(g){return this.labels.has(g)}clearLabels(){this.labels.clear()}removeLabels(g){for(let t of g)this.labels.delete(t)}getNumberOfDirections(){return this.numberOfDirections}movementStarted(){return this.movementStarted$}movementStopped(){return this.movementStopped$}directionChanged(){return this.directionChanged$}tilePositionSet(){return this.tilePositionSet$}positionChangeStarted(){return this.positionChangeStarted$}positionChangeFinished(){return this.positionChangeFinished$}autoMovementSet(){return this.autoMovementSet$}depthChanged(){return this.depthChanged$}getMovementProgress(){return this.movementProgress}setMovementProgress(g){let t=Math.max(0,Math.min(hu,g));this.movementProgress=t}hasWalkedHalfATile(){return this.movementProgress>hu/2}willCrossTileBorderThisUpdate(g){return this.movementProgress+this.maxProgressForDelta(g)>=hu}updateCharacterPosition(g){let t=this.willCrossTileBorderThisUpdate(g),i=1-(t?hu-this.movementProgress:this.maxProgressForDelta(g))/this.maxProgressForDelta(g);this.movementProgress=Math.min(this.movementProgress+this.maxProgressForDelta(g),hu),t&&(this.movementProgress=0,this.shouldContinueMoving()?(this.fire(this.positionChangeFinished$,this.tilePos,this.getNextTilePos()),this.tilePos=this.getNextTilePos(),this.startMoving(this.lastMovementImpulse),i>0&&this.updateCharacterPosition(g*i)):this.stopMoving())}maxProgressForDelta(g){let t=g/1e3;return Math.floor(t*this.speed*hu)}get tilePos(){return Ri.clone(this._tilePos)}set tilePos(g){Ri.copyOver(g,this._tilePos)}startMoving(g){g!=="none"&&(g!=this.movementDirection&&this.movementStarted$.next(g),this.movementDirection=g,this.facingDirection=g,this.fire(this.positionChangeStarted$,this.tilePos,this.getNextTilePos()))}tilePosInDirection(g,t){return g.add(Pu(this.tilemap.toMapDirection(t)))}shouldContinueMoving(){return this.lastMovementImpulse!=="none"&&!this.isBlockingDirection(this.lastMovementImpulse)}stopMoving(){if(this.movementDirection==="none")return;let g=this.tilePos,t=this.getNextTilePos(),i=this.movementDirection;this.tilePos=this.getNextTilePos(),this.movementDirection="none",this.movementStopped$.next(i),this.fire(this.positionChangeFinished$,g,t)}fire(g,{position:t,layer:i},{position:x,layer:T}){g.next({exitTile:t,enterTile:x,exitLayer:i,enterLayer:T})}someCharTile(g){let t=this.getNextTilePos().position;for(let i=t.x;ithis.isLayerAlwaysOnTop(T));this.tilemap.layers.filter(T=>!this.isLayerAlwaysOnTop(T)).forEach(T=>{this.hasLayerProp(T,uu.HEIGHT_SHIFT_PROP_NAME)?(this.createHeightShiftLayers(T,i),t.push(T.tilemapLayer)):this.setDepth(T,++i)}),this.charLayerDepths.set(void 0,i),x.forEach((T,E)=>{T.tilemapLayer.setDepth(E+1+i)}),t.forEach(T=>T.destroy())}setDepth(t,i){t.tilemapLayer.setDepth(i),this.isCharLayer(t)&&this.charLayerDepths.set(this.getLayerProp(t,uu.CHAR_LAYER_PROP_NAME),i)}createHeightShiftLayers(t,i){let x=this.getLayerProp(t,uu.HEIGHT_SHIFT_PROP_NAME);isNaN(x)&&(x=0);let T=1;for(let E=0;ET.name==i);return x?.value}hasLayerProp(t,i){return this.getLayerProp(t,i)!=null}copyLayer(t,i){let x=`${t.name}#${i}`,T=this.tilemap.createBlankLayer(x,t.tilemapLayer.tileset);if(T){if(T.name=x,this.isIsometric())for(let E=i;E>=0;E--){let s=i-E;T.putTileAt(t.data[E][s],s,E)}else for(let E=0;Ey===this.charData.id)).subscribe(({direction:y})=>{var e;(e=this.animation)==null||e.setStandingFrame(y)}),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(g){g?(this.sprite&&(g.x=this.sprite.x,g.y=this.sprite.y),this.sprite=g,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(g){var t;this.container=g,this.cachedContainerHeight=(t=g?.getBounds().height)!=null?t:0}getContainer(){return this.container}getOffsetX(){return this.customOffset.x}setOffsetX(g){this.customOffset.x=g}getOffsetY(){return this.customOffset.y}setOffsetY(g){this.customOffset.y=g}getWalkingAnimationMapping(){return this.walkingAnimationMapping}turnTowards(g){var t;this.geHeadless.isMoving(this.charData.id)||g!="none"&&(this.geHeadless.turnTowards(this.charData.id,g),(t=this.animation)==null||t.setStandingFrame(g))}getAnimation(){return this.animation}setAnimation(g){this.animation=g}update(g){this.updateGridChar()}getEngineOffset(){var g,t,i,x;if(!this.sprite)return _t.ZERO;let T=this.tilemap.getTileWidth()/2-Math.floor(((t=(g=this.sprite)==null?void 0:g.displayWidth)!=null?t:0)/2),E=-((x=(i=this.sprite)==null?void 0:i.displayHeight)!=null?x:0)+this.tilemap.getTileHeight();return new _t(T,E)}updatePixelPos(){let g=new _t(this.geHeadless.getPosition(this.charData.id)),t=this.geHeadless.getMovementProgress(this.charData.id)/1e3,i=this.tilemap.tilePosToPixelPos(g).add(this.getEngineOffset()).add(this.customOffset).add(Pu(this.geHeadless.getFacingDirection(this.charData.id)).multiply(this.tilemap.getTileDistance(this.geHeadless.getFacingDirection(this.charData.id)).scalarMult(t))),x=this.getGameObj();x&&(x.x=Math.floor(i.x),x.y=Math.floor(i.y))}getGameObj(){return this.container||this.sprite}updateGridChar(){var g;if(this.updatePixelPos(),this.sprite&&this.geHeadless.isMoving(this.charData.id)){let t=this.geHeadless.getMovementProgress(this.charData.id)>hu/2;(g=this.getAnimation())==null||g.updateCharacterFrame(this.geHeadless.getFacingDirection(this.charData.id),t,Number(this.sprite.frame.name))}this.updateDepth()}resetAnimation(g){let t=new sT(this.walkingAnimationMapping,g.texture.source[0].width/g.width/sT.FRAMES_CHAR_ROW);this.setAnimation(t),t.frameChange().pipe(Ea(this.newSpriteSet$)).subscribe(i=>{g?.setFrame(i)}),t.setIsEnabled(this.walkingAnimationMapping!==void 0),t.setStandingFrame(this.geHeadless.getFacingDirection(this.charData.id))}updateOverlaySprite(){if(!this.layerOverlaySprite||!this.sprite)return;this.layerOverlaySprite.scale=this.sprite.scale;let g=this.tilemap.getTileHeight()/this.layerOverlaySprite.scale;this.layerOverlaySprite.setCrop(0,0,this.layerOverlaySprite.displayWidth,this.sprite.height-g),this.layerOverlaySprite.setOrigin(0,0)}updateDepth(){if(!this.getGameObj())return;let g=new _t(this.geHeadless.getPosition(this.charData.id)),t=this.geHeadless.getCharLayer(this.charData.id);this.container?this.setContainerDepth(this.container,{position:g,layer:t}):this.sprite&&this.setSpriteDepth(this.sprite,{position:g,layer:t});let i=this.getLayerOverlaySprite();if(i){let x=new _t(gh(Pn({},g),{y:g.y-1}));this.setSpriteDepth(i,{position:x,layer:t})}}setSpriteDepth(g,t){g.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(t))+this.getPaddedPixelDepthSprite(g))}setContainerDepth(g,t){g.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(t))+this.getPaddedPixelDepthContainer(g))}getPaddedPixelDepthContainer(g){return Oy.shiftPad(g.y+this.cachedContainerHeight,Iy.Z_INDEX_PADDING)}getPaddedPixelDepthSprite(g){return Oy.shiftPad(g.y+g.displayHeight,Iy.Z_INDEX_PADDING)}getTransitionLayer(g){if(g.layer)return this.geHeadless.getTransition(g.position,g.layer)||g.layer}},d4=(g=>(g.DONT_BLOCK="DONT_BLOCK",g.BLOCK_TWO_TILES="BLOCK_TWO_TILES",g.BLOCK_ONE_TILE_AHEAD="BLOCK_ONE_TILE_AHEAD",g.BLOCK_ONE_TILE_BEHIND="BLOCK_ONE_TILE_BEHIND",g))(d4||{}),LC=(g=>(g.STOP="STOP",g.CLOSEST_REACHABLE="CLOSEST_REACHABLE",g.RETRY="RETRY",g.ALTERNATIVE_TARGETS="ALTERNATIVE_TARGETS",g))(LC||{}),p4=class{distance(g,t){return no.manhattanDistance(g,t)}direction(g,t){if(no.equal(g,t))return"none";let i=g.clone().subtract(t);return Math.abs(i.x)>Math.abs(i.y)?i.x>0?"left":"right":i.y>0?"up":"down"}neighbors(g){return[new _t(g.x,g.y+1),new _t(g.x+1,g.y),new _t(g.x-1,g.y),new _t(g.x,g.y-1)]}getDirections(){return["up","right","down","left"]}},v4=class{distance(g,t){return no.chebyshevDistance(g,t)}neighbors(g){let t=[new _t(g.x,g.y+1),new _t(g.x+1,g.y),new _t(g.x-1,g.y),new _t(g.x,g.y-1)],i=[new _t(g.x+1,g.y+1),new _t(g.x+1,g.y-1),new _t(g.x-1,g.y+1),new _t(g.x-1,g.y-1)];return[...t,...i]}direction(g,t){return t.x>g.x?t.y>g.y?"down-right":t.yg.y?"down-left":t.yg.y?"down":"none"}getDirections(){return["up","right","down","left","down-left","down-right","up-right","up-left"]}},Td=class{static create(g){switch(g){case 4:return new p4;case 8:return new v4}}},aT=class{constructor(g,t,i){this.backoffMs=g,this.maxRetries=t,this.onFinished=i,this.retries=0,this.elapsed=0}retry(g,t){this.shouldRetry()?(this.elapsed+=g,this.elapsed>=this.backoffMs&&(this.elapsed=0,this.retries++,t())):this.onFinished()}reset(){this.retries=0,this.elapsed=0}getMaxRetries(){return this.maxRetries}getBackoffMs(){return this.backoffMs}shouldRetry(){return this.maxRetries===-1||this.retries(g.WAIT="WAIT",g.RETRY="RETRY",g.STOP="STOP",g))(FC||{}),ig=class{constructor(g,{shortestPathAlgorithm:t="BFS",pathWidth:i=1,pathHeight:x=1,numberOfDirections:T=4,isPositionAllowed:E=(u,f)=>!0,collisionGroups:s=[],ignoredChars:y=[],ignoreTiles:e=!1,ignoreMapBounds:r=!1,ignoreBlockedTarget:d=!1,maxPathLength:h=1/0,ignoreLayers:a=!1,considerCosts:l=!1,calculateClosestToTarget:n=!0}={}){this.gridTilemap=g,this.options={shortestPathAlgorithm:t,pathWidth:i,pathHeight:x,numberOfDirections:T,isPositionAllowed:E,collisionGroups:s,ignoredChars:y,ignoreTiles:e,ignoreMapBounds:r,ignoreBlockedTarget:d,maxPathLength:h,ignoreLayers:a,considerCosts:l,calculateClosestToTarget:n},this.ignoredCharsSet=new Set(y)}findShortestPath(g,t){this.options.ignoreLayers&&(this.gridTilemap.fixCacheLayer(g.layer),t.layer=g.layer);let i=this.findShortestPathImpl(g,t);return this.gridTilemap.unfixCacheLayers(),i}getNeighbors(g,t){var i;return Td.create((i=this.options.numberOfDirections)!=null?i:4).neighbors(g.position).map(x=>{let T=g.layer;return this.options.ignoreLayers||(T=this.gridTilemap.getTransition(x,g.layer)),{position:x,layer:T||g.layer}}).filter(x=>!this.isBlocking(g,x)||this.options.ignoreBlockedTarget&&Ri.equal(x,t))}getTransition(g,t){if(!this.options.ignoreLayers)return this.gridTilemap.getTransition(g,t)}getCosts(g,t){if(!this.options.considerCosts)return 1;let i=Ca(t.position,g);return this.gridTilemap.getTileCosts(t,i)}isBlocking(g,t){return!(this.options.ignoreMapBounds||this.gridTilemap.isInRange(t.position))||!this.options.isPositionAllowed(t.position,t.layer)||!this.options.ignoreTiles&&this.hasBlockingTileFrom(g,t,this.options.pathWidth,this.options.pathHeight,this.options.ignoreMapBounds,this.gridTilemap)?!0:this.hasBlockingCharFrom(g,t,this.options.pathWidth,this.options.pathHeight,this.options.collisionGroups,this.ignoredCharsSet,this.gridTilemap)}distance(g,t){return(this.options.numberOfDirections===4?no.manhattanDistance:no.chebyshevDistance)(g,t)}getTilePosInDir(g,t){return this.options.ignoreLayers?{position:g.position.add(Pu(this.gridTilemap.toMapDirection(t))),layer:g.layer}:this.gridTilemap.getTilePosInDirection(g,t)}getReverseNeighbors(g,t){var i;let x=Td.create((i=this.options.numberOfDirections)!=null?i:4).neighbors(g.position),T;if(!this.options.ignoreLayers){let E=this.gridTilemap.getReverseTransitions(g.position,g.layer);T=E?[...E]:void 0}return x.map(E=>T?T.map(s=>({position:E,layer:s||g.layer})):[{position:E,layer:g.layer}]).flat().filter(E=>!this.isBlocking(E,g)||this.options.ignoreBlockedTarget&&Ri.equal(g,t))}hasBlockingCharFrom(g,t,i,x,T,E,s){if(i===1&&x===1)return s.hasBlockingChar(t.position,t.layer,T,E);let y=r=>s.hasBlockingChar(r,t.layer,T,E),e=Ca(g.position,t.position);return this.isBlockingMultiTile(g,e,i,x,y)}hasBlockingTileFrom(g,t,i,x,T,E){if(i===1&&x===1)return E.hasBlockingTile(t.position,t.layer,Ca(t.position,g.position),T);let s=Ca(g.position,t.position),y=e=>E.hasBlockingTile(e,t.layer,s,T);return this.isBlockingMultiTile(g,s,i,x,y)}isBlockingMultiTile(g,t,i,x,T){let E={src:new _t(g.position.x+i,g.position.y),dest:new _t(g.position.x+i,g.position.y+x-1)},s={src:new _t(g.position.x-1,g.position.y),dest:new _t(g.position.x-1,g.position.y+x-1)},y={src:new _t(g.position.x,g.position.y-1),dest:new _t(g.position.x+i-1,g.position.y-1)},e={src:new _t(g.position.x,g.position.y+x),dest:new _t(g.position.x+i-1,g.position.y+x)};switch(t){case"right":return this.checkLine(E,T);case"left":return this.checkLine(s,T);case"up":return this.checkLine(y,T);case"down":return this.checkLine(e,T);case"up-left":return this.checkLine({src:y.src,dest:new _t(y.dest.x-1,y.dest.y)},T)||this.checkLine({src:new _t(s.src.x,s.src.y-1),dest:new _t(s.dest.x,s.dest.y-1)},T);case"up-right":return this.checkLine({src:new _t(y.src.x+1,y.src.y),dest:y.dest},T)||this.checkLine({src:new _t(E.src.x,E.src.y-1),dest:new _t(E.dest.x,E.dest.y-1)},T);case"down-left":return this.checkLine({src:new _t(s.src.x,s.src.y+1),dest:new _t(s.dest.x,s.dest.y+1)},T)||this.checkLine({src:e.src,dest:new _t(e.dest.x-1,e.dest.y)},T);case"down-right":return this.checkLine({src:new _t(e.src.x+1,e.src.y),dest:e.dest},T)||this.checkLine({src:new _t(E.src.x,E.src.y+1),dest:new _t(E.dest.x,E.dest.y+1)},T)}return!1}checkLine(g,t){for(let i=g.src.x;i<=g.dest.x;i++)for(let x=g.src.y;x<=g.dest.y;x++)if(t(new _t(i,x)))return!0;return!1}},m4=kM(jx(),1),g4=class extends ig{findShortestPathImpl(g,t){let i=this.shortestPathBfs(g,t);return{path:this.returnPath(i.previous,g,t),closestToTarget:i.closestToTarget,steps:i.steps,maxPathLengthReached:i.maxPathLengthReached,algorithmUsed:"A_STAR"}}shortestPathBfs(g,t){let i=new Map,x=new Map,T=new Map,E=new m4.MinFibonacciHeap((r,d)=>kc(T,r)-kc(T,d)),s=g,y=this.distance(g.position,t.position),e=0;for(E.push(g),x.set(Ri.toString(g),0),T.set(Ri.toString(g),this.distance(g.position,t.position));E.size>0;){let r=E.pop();if(!r)break;e++;let d=this.distance(r.position,t.position);if(dthis.options.maxPathLength)return{previous:new Map,closestToTarget:s,steps:e,maxPathLengthReached:!0};for(let h of this.getNeighbors(r,t)){let a=kc(x,r)+this.getCosts(r.position,h),l=Ri.toString(h);(!x.has(l)||a0;){let e=T.dequeue();if(y++,!e)break;let{node:r,dist:d}=e;if(d>this.options.maxPathLength)return{previous:new Map,closestToTarget:E,steps:y,maxPathLengthReached:!0};let h=this.distance(r.position,t.position);if(hthis.lastDist)}step(g,t,i){var x;this.lastDist=i;for(let T of g){let E=Ri.toString(T);if(!this.visited.has(E)){this.previous.set(E,t),this.queue.enqueue({node:T,dist:i+1}),this.visited.set(E,i+1);let s=(x=this.otherBfs)==null?void 0:x.visited.get(E);s!==void 0&&s0,T.queue.size()>0);){let e=x.queue.dequeue();if(!e)break;let{node:r,dist:d}=e;if(d+1+(((i=T.queue.peek())==null?void 0:i.dist)||0)>this.options.maxPathLength)return{previous:x.previous,previous2:T.previous,closestToTarget:this.maybeClosestToTarget(s),steps:E,maxPathLengthReached:!0};let h=this.distance(r.position,t.position);if(hjc(this.f,T)-jc(this.f,E)),this.openSet.push(g);let x=Ri.toString(g);for(this.g.set(x,0),this.f.set(x,this.distance(g.position,t.position)),this.maxFrontierSize=Math.max(this.maxFrontierSize,this.openSet.size);this.openSet.size>0;){let T=this.openSet.pop();if(!T)break;if(this.steps++,Ri.equal(T,t))return{previous:i,closestToTarget:t,steps:this.steps,maxPathLengthReached:!1};if(jc(this.g,T)+1>this.options.maxPathLength)return{previous:new Map,closestToTarget:this.closestToTarget,steps:this.steps,maxPathLengthReached:!0};this.updateClosestToTarget(T,t);for(let E of this.getNeighborsInternal(T,i.get(Ri.toString(T)),t)){let s=Ri.toString(E.p),y=jc(this.g,T)+E.dist;(!this.g.has(s)||y({p:E,dist:1}));let x=this.prune(t,g).filter(E=>!this.isBlockingIgnoreTarget(g,E,i)).map(E=>{let s=this.getTransition(E.position,g.layer);return{position:E.position,layer:s||g.layer}}),T=[];for(let E of x)if(this.isHorizontal(g.position,E.position))T.push({p:E,dist:1});else{let s=this.jump(g,E,i,1,Ca(g.position,E.position));s&&T.push(s)}return T}isBlockingIgnoreTarget(g,t,i){return this.isBlocking(g,t)&&!(this.options.ignoreBlockedTarget&&Ri.equal(t,i))}jump(g,t,i,x,T){if(!this.isBlockingIgnoreTarget(g,t,i))return Ri.equal(t,i)?{p:t,dist:x}:x>=this.maxJumpSize?{p:t,dist:x}:this.getTransition(t.position,g.layer)!==void 0?{p:t,dist:x}:this.hasForced(g,t)?{p:t,dist:x}:(this.updateClosestToTarget(t,i),this.jump(t,this.getTilePosInDir(t,T),i,x+1,T))}isHorizontal(g,t){return g.y===t.y}getForced(g,t,i,x,T,E){let s=[],y=g;return(this.blockOrTrans(y,i)||this.blockOrTrans(i,x))&&this.addIfNotBlocked(s,t,x),(this.blockOrTrans(y,T)||this.blockOrTrans(T,E))&&this.addIfNotBlocked(s,t,E),s}hasForced(g,t){let{topLeft:i,downLeft:x,top:T,bottom:E}=this.normalizedPositions(g,t);return!!((this.blockOrTrans(g,x)||this.blockOrTrans(x,E))&&!this.blockOrTrans(t,E)||(this.blockOrTrans(g,i)||this.blockOrTrans(i,T))&&!this.blockOrTrans(t,T))}prune(g,t){let{right:i,top:x,bottom:T,downLeft:E,topLeft:s}=this.normalizedPositions(g,t);return this.isHorizontal(g.position,t.position)?[i,x,T]:[i,...this.getForced(g,t,E,T,s,x)]}normalizedPositions(g,t){return g.position.xt.position.x?{topLeft:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},downLeft:{position:new _t(t.position.x+1,t.position.y-1),layer:t.layer},top:{position:new _t(t.position.x,t.position.y+1),layer:t.layer},bottom:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},right:{position:new _t(t.position.x-1,t.position.y),layer:t.layer}}:g.position.y1?this.fillPath(T,E,x):x.push(E),T=E}return x.reverse()}fillPath(g,t,i){let x=g;do{let T=Ca(x.position,t.position);x=this.getTilePosInDir(x,T),i.push(x)}while(!no.equal(x.position,t.position))}};function jc(g,t){var i;return(i=g.get(Ri.toString(t)))!=null?i:Number.MAX_VALUE}var x4=class{constructor(g,t,i,x={}){this.character=g,this.gridTilemap=t,this.charToFollow=i;let T={distance:0,noPathFoundStrategy:"STOP",maxPathLength:1/0,shortestPathAlgorithm:"BIDIRECTIONAL_SEARCH",ignoreLayers:!1,considerCosts:x.considerCosts||!1,facingDirection:"none"};this.options=Pn(Pn({},T),x),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=g,this.updateTarget(this.charToFollow.getTilePos().position,this.charToFollow.getTilePos().layer),this.charToFollow.positionChangeStarted().pipe(Ea(this.character.autoMovementSet().pipe(yh(E=>E!==this),sc(1)))).subscribe(({enterTile:E,enterLayer:s})=>{this.updateTarget(E,s)})}update(g){var t;(t=this.targetMovement)==null||t.update(g)}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 g=xm[this.options.facingDirection]+xm[this.charToFollow.getFacingDirection()],t=eC("up",g),i={x:this.charToFollow.getTilePos().position.x,y:this.charToFollow.getTilePos().position.y};return t==="right"?i.x+=this.charToFollow.getTileWidth()-1:t==="down"?i.y+=this.charToFollow.getTileWidth()-1:t==="down-left"?i.y+=this.charToFollow.getTileWidth()-1:t==="down-right"?(i.y+=this.charToFollow.getTileWidth()-1,i.x+=this.charToFollow.getTileWidth()-1):t==="up-right"&&(i.x+=this.charToFollow.getTileWidth()-1),this.gridTilemap.getTilePosInDirection({position:new _t(i),layer:this.charToFollow.getTilePos().layer},t).position}updateTarget(g,t){let i=this.options.facingDirection!=="none"&&this.options.distance===0;i&&(g=this.getFacingPos()),this.targetMovement=new zC(this.character,this.gridTilemap,{position:new _t(g),layer:t},{distance:i?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()]}})}},fT=class{static getRandomInt(g){return Math.floor(Math.random()*Math.floor(g))}},S4=class{constructor(g,t=0,i=-1){this.character=g,this.delay=t,this.radius=i,this.stepSize=0,this.delayLeft=this.delay,this.initialRow=g.getNextTilePos().position.y,this.initialCol=g.getNextTilePos().position.x,this.randomizeStepSize(),this.stepsWalked=0,this.currentMovementDirection="none",this.character.positionChangeStarted().pipe(Ea(this.character.autoMovementSet().pipe(yh(x=>x!==this),sc(1)))).subscribe(()=>{this.stepsWalked++}),this.distanceUtils=Td.create(g.getNumberOfDirections())}update(g){if(this.shouldContinueWalkingCurrentDirection())this.character.move(this.currentMovementDirection);else if(this.delayLeft-=g,this.delayLeft<=0){this.delayLeft=this.delay;let t=this.getFreeRandomDirection();this.stepsWalked=0,this.character.move(t),this.currentMovementDirection=t,this.randomizeStepSize()}}getInfo(){return{type:"Random",config:{delay:this.delay,radius:this.radius}}}shouldContinueWalkingCurrentDirection(){return this.stepsWalked!this.character.isBlockingDirection(g)).filter(g=>this.isWithinRadius(g))}isWithinRadius(g){return this.radius==-1?!0:this.getDist(g)<=this.radius}getDist(g){return this.distanceUtils.distance(this.character.getNextTilePos().position.add(Pu(g)),new _t(this.initialCol,this.initialRow))}getFreeRandomDirection(){let g=this.getFreeDirections();return g.length==0?"none":g[fT.getRandomInt(g.length)]}randomizeStepSize(){this.stepSize=fT.getRandomInt(this.radius)+1}};function T4(g,t){return g.filter(i=>{var x,T,E,s,y,e;return(x=t.labels)!=null&&x.withAllLabels?(T=t.labels)==null?void 0:T.withAllLabels.every(r=>i.hasLabel(r)):(E=t.labels)!=null&&E.withOneOfLabels?(s=t.labels)==null?void 0:s.withOneOfLabels.some(r=>i.hasLabel(r)):(y=t.labels)!=null&&y.withNoneLabels?!((e=t.labels)!=null&&e.withNoneLabels.some(r=>i.hasLabel(r))):!0})}var IC="2.44.6",E4=class{constructor(g,t){this.collistionStrategy=g,this.collisionGroupRelation=t,this.tilePosToCharacters=new M4,this.charRemoved$=new Nn}isCharBlockingAt(g,t,i,x=new Set,T=new Set){if(i.length===0)return!1;let E=this.tilePosToCharacters.get(g,t);return!!(E&&E.size>0&&[...E].filter(s=>!x.has(s.getId())).filter(s=>!this.doIntersect(s.getCollisionGroups(),T)).some(s=>i.some(y=>s.getCollisionGroups().some(e=>this.collidesWith(y,e)))))}doIntersect(g,t){for(let i of g)if(t.has(i))return!0;return!1}collidesWith(g,t){return this.collisionGroupRelation?(this.collisionGroupRelation.get(g)||new Set).has(t):g===t}getCharactersAt(g,t){return this.tilePosToCharacters.get(g,t)||new Set}addCharacter(g){this.addTilePositions(g.getTilePos(),g),this.addTilePositions(g.getNextTilePos(),g),this.addPositionChangeSub(g),this.addPositionChangeFinishedSub(g),this.addTilePosSetSub(g)}removeCharacter(g){let t=g.getId();this.charRemoved$.next(t),this.deleteTilePositions(g.getTilePos(),g),this.deleteTilePositions(g.getNextTilePos(),g)}add(g,t,i){let x=this.tilePosToCharacters.get(g,t);x||this.tilePosToCharacters.set(g,t,new Set([i])),x?.add(i)}addTilePosSetSub(g){g.tilePositionSet().pipe(Ea(this.charRemoved(g.getId()))).subscribe(t=>{this.deleteTilePositions(g.getNextTilePos(),g),this.addTilePositions(t,g)})}charRemoved(g){var t;return(t=this.charRemoved$)==null?void 0:t.pipe(sc(1),yh(i=>i==g))}addPositionChangeSub(g){g.positionChangeStarted().pipe(Ea(this.charRemoved(g.getId())),this.posChangeToLayerPos()).subscribe(t=>{this.collistionStrategy==="BLOCK_ONE_TILE_AHEAD"&&this.deleteTilePositions(t.exit,g),this.addTilePositions(t.enter,g)})}addPositionChangeFinishedSub(g){g.positionChangeFinished().pipe(Ea(this.charRemoved(g.getId())),this.posChangeToLayerPos()).subscribe(t=>{this.deleteTilePositions(t.exit,g),this.addTilePositions(t.enter,g)})}addTilePositions(g,t){this.forEachCharTile(g,t,(i,x)=>{this.add(new _t(i,x),g.layer,t)})}deleteTilePositions(g,t){this.forEachCharTile(g,t,(i,x)=>{var T;(T=this.tilePosToCharacters.get(new _t(i,x),g.layer))==null||T.delete(t)})}forEachCharTile(g,t,i){let x=g.position;for(let T=x.x;T({enter:{position:new _t(g.enterTile),layer:g.enterLayer},exit:{position:new _t(g.exitTile),layer:g.exitLayer}})))}posToString(g,t){return`${g.x}#${g.y}#${t}`}},M4=class{constructor(){this.memo=new Map}set(g,t,i){let x=this.memo.get(g.x);x||(x=new Map,this.memo.set(g.x,x));let T=x.get(g.y);T||(T=new Map,x.set(g.y,T)),T.set(t,i)}get(g,t){let i=this.memo.get(g.x);if(!i)return;let x=i.get(g.y);if(x)return x.get(t)}},qx=class{constructor(g,t,i,x){this.x=g,this.y=t,this.width=i,this.height=x}getX(){return this.x}getY(){return this.y}getWidth(){return this.width}getHeight(){return this.height}isInRange(g){return g.x>=this.x&&g.x=this.y&&g.yi.isCharLayer());for(let i of[...t,void 0]){let x=this.tileCollisionCache.get(i?.getName());if(x===void 0){x=new Array(this.tilemap.getWidth());for(let T=0;T>t&1)==1}var dT="ge_cost",NC=class BC{constructor(t,i,x,T=void 0,E=!1){this.tilemap=t,this.collisionTilePropertyName=i,this.useTileCollisionCache=E,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 E4(x,T);for(let s of Jx())this.collidesPropNames.set(s,BC.ONE_WAY_COLLIDE_PROP_PREFIX+s),this.tileCostPropNames.set(s,`${dT}_${s}`);this.useTileCollisionCache&&(this.tileCollisionCache=new w4(t,this),this.tileCollisionCache.rebuild())}fixCacheLayer(t){var i;(i=this.tileCollisionCache)==null||i.fixLayer(t)}unfixCacheLayers(){var t;(t=this.tileCollisionCache)==null||t.unfixLayers()}addCharacter(t){this.characters.set(t.getId(),t);let i=t.getNextTilePos().layer;i===void 0?t.setTilePosition(gh(Pn({},t.getNextTilePos()),{layer:this.getLowestCharLayer()})):this.getCharLayerNames().includes(i)||console.warn(`Char layer '${i}' of character '${t.getId()}' is unknown.`),this.charBlockCache.addCharacter(t)}removeCharacter(t){let i=this.characters.get(t);i&&(this.charBlockCache.removeCharacter(i),this.characters.delete(t))}getCharacters(){return[...this.characters.values()]}getCharactersAt(t,i){return this.charBlockCache.getCharactersAt(t,i)}rebuildTileCollisionCache(t){var i;(i=this.tileCollisionCache)==null||i.rebuild(t)}hasBlockingTileUncached(t,i,x,T){if(!T&&this.hasNoTileUncached(t,i))return!0;let E=this.getCollisionRelevantLayers(i);for(let s of E)if(this.isLayerBlockingAt(s.getName(),t,x))return!0;return!1}hasBlockingTile(t,i,x,T){var E;let s=(E=this.tileCollisionCache)==null?void 0:E.isBlockingFrom(t.x,t.y,i,x,T);return s!==void 0?s:this.hasBlockingTileUncached(t,i,x,T)}getTransition(t,i){let x=this.transitions.get(t.toString());if(x)return x.get(i)}getReverseTransitions(t,i){let x=this.reverseTransitions.get(t.toString());if(x)return x.get(i)}setTransition(t,i,x){var T,E,s,y,e;this.transitions.has(t.toString())||this.transitions.set(t.toString(),new Map),this.reverseTransitions.has(t.toString())||this.reverseTransitions.set(t.toString(),new Map),(T=this.transitions.get(t.toString()))==null||T.set(i,x),(E=this.reverseTransitions.get(t.toString()))!=null&&E.has(x)||(s=this.reverseTransitions.get(t.toString()))==null||s.set(x,new Set),(e=(y=this.reverseTransitions.get(t.toString()))==null?void 0:y.get(x))==null||e.add(i)}getTransitions(){return new Map([...this.transitions].map(([t,i])=>[t,new Map(i)]))}getTileCosts(t,i){let x=this.getCollisionRelevantLayers(t.layer),T=1;for(let E of x)T=Math.max(T,this.getTileCostsForLayer(gh(Pn({},t),{layer:E.getName()}),i));return T}getTileCostsForLayer(t,i){let x=this.tilemap.getTileAt(t.position.x,t.position.y,t.layer);return i&&x?.getProperty(this.tileCostPropNames.get(i)||"")||x?.getProperty(dT)||1}hasNoTileUncached(t,i){return!this.getCollisionRelevantLayers(i).some(x=>this.tilemap.hasTileAt(t.x,t.y,x.getName()))}hasNoTile(t,i){var x;let T=(x=this.tileCollisionCache)==null?void 0:x.hasTileAt(t.x,t.y,i);return T!==void 0?T:this.hasNoTileUncached(t,i)}hasBlockingChar(t,i,x,T=new Set,E=new Set){return this.charBlockCache.isCharBlockingAt(t,i,x,T,E)}isInRange(t){return new qx(0,0,this.tilemap.getWidth(),this.tilemap.getHeight()).isInRange(t)}toMapDirection(t){return this.isIsometric()?RO(t):t}fromMapDirection(t){return this.isIsometric()?eC(t):t}isIsometric(){return this.tilemap.getOrientation()==="isometric"}getTilePosInDirection(t,i){let x=t.position.add(Pu(this.toMapDirection(i))),T=this.getTransition(x,t.layer)||t.layer;return{position:x,layer:T}}invalidateFrameCache(){this.collisionRelevantLayersFrameCache.clear()}isLayerBlockingAt(t,i,x){let T=this.tilemap.getTileAt(i.x,i.y,t);return T?!!(T.getProperty(this.collisionTilePropertyName)||x&&T.getProperty(this.collidesPropNames.get(x)||"")):!1}getCharLayerIndexes(){return this.tilemap.getLayers().map((t,i)=>({layer:t,index:i})).filter(({layer:t})=>t.isCharLayer()).map(({index:t})=>t)}findPrevAndCharLayer(t){let i=this.getCharLayerIndexes(),x=this.tilemap.getLayers(),T=i.findIndex(E=>x[E].getProperty(nm)==t);return T==0?{prevIndex:-1,charLayerIndex:i[T]}:{prevIndex:i[T-1],charLayerIndex:i[T]}}getCollisionRelevantLayers(t){if(!t)return this.tilemap.getLayers();let i=this.collisionRelevantLayersFrameCache.get(t);if(i)return i;let{prevIndex:x,charLayerIndex:T}=this.findPrevAndCharLayer(t),E=this.tilemap.getLayers().slice(x+1,T+1);return this.collisionRelevantLayersFrameCache.set(t,E),E}getLowestCharLayer(){for(let t of this.tilemap.getLayers())if(t.isCharLayer())return t.getProperty(nm)}getCharLayerNames(){return this.tilemap.getLayers().filter(t=>t.isCharLayer()).map(t=>t.getProperty(nm)).filter(P4)}};NC.ONE_WAY_COLLIDE_PROP_PREFIX="ge_collide_";var A4=NC;function P4(g){return g!=null}var R4=(g=>(g.REMOVED="REMOVED",g.ADDED="ADDED",g))(R4||{}),b4=(g=>(g.WAIT="WAIT",g.SKIP="SKIP",g.STOP="STOP",g))(b4||{}),L4=class{constructor(g,t){this.character=g,this.tilemap=t,this.queue=new Sm,this.finished$=new Nn,this.pathBlockedWaitElapsed=0,this.distanceUtils=Td.create(g.getNumberOfDirections()),this.character.autoMovementSet().pipe(yh(i=>i!==this),sc(1)).subscribe(()=>{this.queue.size()>0&&this.finishMovementTerminated(),this.finished$.complete()})}update(g){(!this.character.isMoving()||this.character.willCrossTileBorderThisUpdate(g))&&this.queue.size()>0&&this.moveCharOnPath(g)}getInfo(){return{type:"Queue"}}enqueue(g,t={}){var i,x,T;let E={pathBlockedStrategy:(i=t.pathBlockedStrategy)!=null?i:"STOP",pathBlockedWaitTimeoutMs:t?.pathBlockedWaitTimeoutMs||-1,ignoreInvalidPositions:(x=t.ignoreInvalidPositions)!=null?x:!1,skipInvalidPositions:(T=t.skipInvalidPositions)!=null?T:!1};for(let s of g){let y={command:s,config:E};if(Gf(s)){this.queue.enqueue(y);continue}let e=this.queue.peekEnd(),r=e?.command;if(r||(r=this.character.getNextTilePos()),Gf(r)){this.queue.enqueue(y);continue}let d=this.distanceUtils.distance(r.position,s.position)===1;(!t.ignoreInvalidPositions||d)&&this.queue.enqueue(y)}}peekAll(){return this.queue.peekAll()}size(){return this.queue.size()}finished(){return this.finished$}clear(){this.queue.clear()}moveCharOnPath(g){let t=this.queue.peek();if(!t)return;let i=t.command,x=t.config;if(Gf(i)&&(i=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),i)),x.skipInvalidPositions){if(i=this.getNextValidPosition(),!i){this.finishInvalidNextPos(i);return}}else if(!this.isNeighborPos(i)){this.finishInvalidNextPos(i);return}if(this.character.isBlockingDirection(Ca(this.character.getNextTilePos().position,i.position))){if(x.pathBlockedStrategy==="STOP")this.finishPathBlocked(i);else if(x.pathBlockedStrategy==="SKIP"){this.queue.dequeue(),this.moveCharOnPath(g);return}else x.pathBlockedStrategy==="WAIT"&&x.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=g,this.pathBlockedWaitElapsed>=x.pathBlockedWaitTimeoutMs&&this.finishBlockedWaitTimeout(i,x.pathBlockedWaitTimeoutMs));return}this.pathBlockedWaitElapsed=0,this.queue.dequeue(),this.character.move(this.getDir(this.character.getNextTilePos().position,i.position)),this.isLastMovement()&&this.finish("SUCCESS","",i)}getNextValidPosition(){for(var g;this.queue.size()>0;){let t=(g=this.queue.peek())==null?void 0:g.command;if(Gf(t)&&(t=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),t)),t&&this.isNeighborPos(t))return t;this.queue.dequeue()}}isLastMovement(){return this.queue.size()===0}isNeighborPos(g){let t=this.distanceUtils.distance(this.character.getNextTilePos().position,g.position)===1,i=this.tilemap.getTransition(g.position,this.character.getNextTilePos().layer);if(this.character.getNextTilePos().layer!==g.layer)return t&&i===g.layer;let x=i!==void 0&&i!==g.layer;return t&&!x}finishMovementTerminated(){this.finish("MOVEMENT_TERMINATED","New automatic movement has been set to character.")}finishInvalidNextPos(g){g?this.finish("INVALID_NEXT_POS",`Position ${this.posToStr(g)} 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(g){this.finish("PATH_BLOCKED",`Position ${this.posToStr(g)} is blocked.`)}finishBlockedWaitTimeout(g,t){this.finish("PATH_BLOCKED_WAIT_TIMEOUT",`Position ${this.posToStr(g)} is blocked and the wait timeout of ${t} ms has been exceeded.`)}finish(g,t="",i=this.character.getNextTilePos()){this.queue=new Sm,this.finished$.next({position:i.position,result:g,description:t,layer:i.layer})}getDir(g,t){return this.tilemap.fromMapDirection(Ca(g,t))}posToStr(g){return`(${g.position.x}, ${g.position.y}, ${g.layer})`}},F4=class{constructor(g=!0){this.isCreatedInternal=!1,g&&console.log(`Using GridEngine v${IC}`)}getCharLayer(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getTilePos().layer}getTransition(g,t){var i;return this.initGuard(),(i=this.gridTilemap)==null?void 0:i.getTransition(new _t(g),t)}setTransition(g,t,i){var x;return this.initGuard(),(x=this.gridTilemap)==null?void 0:x.setTransition(new _t(g),t,i)}create(g,t){this.isCreatedInternal=!0,this.gridCharacters=new Map;let i=this.setConfigDefaults(t);this.config=i,this.movementStopped$=new Nn,this.movementStarted$=new Nn,this.directionChanged$=new Nn,this.positionChangeStarted$=new Nn,this.positionChangeFinished$=new Nn,this.queueMovementFinished$=new Nn,this.charRemoved$=new Nn,this.charAdded$=new Nn,this.gridTilemap=new A4(g,this.config.collisionTilePropertyName,this.config.characterCollisionStrategy,this.recordToMap(this.config.collisionGroupRelation),this.config.cacheTileCollisions),this.addCharacters()}recordToMap(g){return g?new Map(Object.entries(g).map(([t,i])=>[t,new Set(i)])):void 0}getPosition(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getTilePos().position}move(g,t){this.moveChar(g,t)}moveRandomly(g,t=0,i=-1){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(g);if(!T)throw this.createCharUnknownErr(g);let E=new S4(T,t,i);T.setMovement(E)}getMovement(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);let x=i.getMovement();return x?x.getInfo():{type:"None"}}moveTo(g,t,i){var x;let T=this.assembleMoveToConfig(i);this.initGuard();let E=(x=this.gridCharacters)==null?void 0:x.get(g);if(!E)throw this.createCharUnknownErr(g);if(!this.gridTilemap)throw this.createUninitializedErr();let s=new zC(E,this.gridTilemap,{position:new _t(t),layer:i?.targetLayer||E.getNextTilePos().layer},{distance:0,config:T});return E.setMovement(s),s.finishedObs().pipe(fd(y=>({charId:g,position:y.position,result:y.result,description:y.description,layer:y.layer})))}stopMovement(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);i.setMovement(void 0)}setSpeed(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.setSpeed(t)}getSpeed(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getSpeed()}collidesWithTiles(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.collidesWithTiles()}update(g,t){var i;if(this.isCreatedInternal&&this.gridCharacters)for(let[x,T]of this.gridCharacters)T.update(t);(i=this.gridTilemap)==null||i.invalidateFrameCache()}addCharacter(g){var t,i,x,T,E;if(!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let s={speed:g.speed||4,tilemap:this.gridTilemap,collidesWithTiles:!0,collisionGroups:["geDefault"],ignoreCollisionGroups:[],charLayer:g.charLayer,facingDirection:g.facingDirection,labels:g.labels,numberOfDirections:(t=g.numberOfDirections)!=null?t:this.config.numberOfDirections,tileWidth:g.tileWidth,tileHeight:g.tileHeight};typeof g.collides=="boolean"?g.collides===!1&&(s.collidesWithTiles=!1,s.collisionGroups=[]):g.collides!==void 0&&(g.collides.collidesWithTiles===!1&&(s.collidesWithTiles=!1),g.collides.collisionGroups&&(s.collisionGroups=g.collides.collisionGroups),g.collides.ignoreCollisionGroups&&(s.ignoreCollisionGroups=g.collides.ignoreCollisionGroups),s.ignoreMissingTiles=(x=(i=g.collides)==null?void 0:i.ignoreMissingTiles)!=null?x:!1);let y=new f4(g.id,s);g.startPosition&&y.setTilePosition({position:new _t(g.startPosition),layer:y.getTilePos().layer}),(T=this.gridCharacters)==null||T.set(g.id,y),this.gridTilemap.addCharacter(y);let e=y.getId();y.movementStopped().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var d;(d=this.movementStopped$)==null||d.next({charId:e,direction:r})}),y.movementStarted().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var d;(d=this.movementStarted$)==null||d.next({charId:e,direction:r})}),y.directionChanged().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var d;(d=this.directionChanged$)==null||d.next({charId:e,direction:r})}),y.positionChangeStarted().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var d;(d=this.positionChangeStarted$)==null||d.next(Pn({charId:e},r))}),y.positionChangeFinished().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var d;(d=this.positionChangeFinished$)==null||d.next(Pn({charId:e},r))}),(E=this.charAdded$)==null||E.next(e)}hasCharacter(g){var t;return this.initGuard(),!!((t=this.gridCharacters)!=null&&t.has(g))}removeCharacter(g){var t,i,x,T;if(this.initGuard(),!((t=this.gridCharacters)!=null&&t.get(g)))throw this.createCharUnknownErr(g);(i=this.gridTilemap)==null||i.removeCharacter(g),(x=this.gridCharacters)==null||x.delete(g),(T=this.charRemoved$)==null||T.next(g)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters)for(let g of this.gridCharacters.keys())this.removeCharacter(g)}getAllCharacters(g){if(this.initGuard(),!this.gridCharacters)return[];let t=[...this.gridCharacters.values()];return(g?T4(t,g):t).map(i=>i.getId())}getLabels(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getLabels()}addLabels(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.addLabels(t)}removeLabels(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.removeLabels(t)}clearLabels(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);i.clearLabels()}follow(g,t,i,x){var T,E,s,y,e,r;let d;i===void 0?d={distance:0,closestPointIfBlocked:!1}:typeof i=="number"?(d={distance:i,closestPointIfBlocked:!1},x&&(d.closestPointIfBlocked=!0)):d=i,this.initGuard();let h=(T=this.gridCharacters)==null?void 0:T.get(g),a=(E=this.gridCharacters)==null?void 0:E.get(t);if(!h)throw this.createCharUnknownErr(g);if(!a)throw this.createCharUnknownErr(t);if(!this.gridTilemap)throw this.createUninitializedErr();let l=new x4(h,this.gridTilemap,a,{distance:(s=d.distance)!=null?s:0,noPathFoundStrategy:d.closestPointIfBlocked?"CLOSEST_REACHABLE":"STOP",maxPathLength:(y=d.maxPathLength)!=null?y:1/0,shortestPathAlgorithm:(e=d.algorithm)!=null?e:"BIDIRECTIONAL_SEARCH",ignoreLayers:!!d.ignoreLayers,facingDirection:(r=d.facingDirection)!=null?r:"none"});h.setMovement(l)}isMoving(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.isMoving()}getFacingDirection(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getFacingDirection()}getFacingPosition(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);let x=i.getFacingPosition();return{x:x.x,y:x.y}}turnTowards(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);return x.turnTowards(t)}getCharactersAt(g,t){if(this.initGuard(),!this.gridTilemap)return[];let i=this.gridTilemap.getCharactersAt(new _t(g),t);return Array.from(i).map(x=>x.getId())}setPosition(g,t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(g);if(!T)throw this.createCharUnknownErr(g);i||T.setTilePosition({position:new _t(t),layer:T.getTilePos().layer}),T.setTilePosition({position:new _t(t),layer:i})}isBlocked(g,t,i=["geDefault"]){var x,T;this.initGuard();let E=new _t(g);return!!((x=this.gridTilemap)!=null&&x.hasBlockingTile(E,t)||(T=this.gridTilemap)!=null&&T.hasBlockingChar(E,t,i))}isTileBlocked(g,t){var i;return this.initGuard(),!!((i=this.gridTilemap)!=null&&i.hasBlockingTile(new _t(g),t))}getCollisionGroups(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getCollisionGroups()||[]}setCollisionGroups(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.setCollisionGroups(t)}getIgnoreCollisionGroups(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getIgnoreCollisionGroups()||[]}setIgnoreCollisionGroups(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.setIgnoreCollisionGroups(t)}getTilePosInDirection(g,t,i){if(!this.gridTilemap)throw this.createUninitializedErr();let x=this.gridTilemap.getTilePosInDirection({position:new _t(g),layer:t},i);return{position:x.position.toPosition(),charLayer:x.layer}}findShortestPath(g,t,i={}){if(!this.gridTilemap)throw this.createUninitializedErr();let x=i.shortestPathAlgorithm||"BFS";i.considerCosts&&x!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${x}'. It can only be used with A* algorithm.`);let T=i.pathWidth!==void 0&&i.pathWidth!==1,E=i.pathHeight!==void 0&&i.pathHeight!==1;(T||E)&&x==="JPS"&&console.warn("GridEngine: Pathfinding options 'pathWidth' and 'pathHeight' > 1 cannot be used with algorithm 'JPS'.");let s=new UC(this.gridTilemap).findShortestPath(Ri.toInternal(g),Ri.toInternal(t),gh(Pn({},i),{shortestPathAlgorithm:x}));return{path:s.path.map(Ri.fromInternal),closestToTarget:s.closestToTarget?Ri.fromInternal(s.closestToTarget):void 0,reachedMaxPathLength:!1,steps:s.steps}}steppedOn(g,t,i){return this.positionChangeFinished().pipe(yh(x=>g.includes(x.charId)&&t.some(T=>T.x===x.enterTile.x&&T.y===x.enterTile.y)&&(i===void 0||i.includes(x.enterLayer))))}characterShifted(){if(!this.charAdded$||!this.charRemoved$)throw this.createUninitializedErr();return this.charAdded$.pipe(fd(g=>({charId:g,action:"ADDED"})),u4(this.charRemoved$.pipe(fd(g=>({charId:g,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(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getMovementProgress()}rebuildTileCollisionCache(g,t,i,x){var T;(T=this.gridTilemap)==null||T.rebuildTileCollisionCache(new qx(g,t,i,x))}addQueueMovements(g,t,i){var x,T;this.initGuard();let E=(x=this.gridCharacters)==null?void 0:x.get(g);if(!E)throw this.createCharUnknownErr(g);if(!this.gridTilemap)throw this.createUninitializedErr();let s;((T=E?.getMovement())==null?void 0:T.getInfo().type)==="Queue"?s=E.getMovement():(s=new L4(E,this.gridTilemap),E.setMovement(s),s.finished().pipe(Ea(a4(this.charRemoved(g),E.autoMovementSet()))).subscribe(y=>{var e;(e=this.queueMovementFinished$)==null||e.next(Pn({charId:g},y))})),s.enqueue(t.map(y=>Gf(y)?y:{position:new _t(y.position),layer:y.charLayer}),i)}queueMovementFinished(){if(!this.queueMovementFinished$)throw this.createUninitializedErr();return this.queueMovementFinished$}getEnqueuedMovements(g){var t,i;this.initGuard();let x=(t=this.gridCharacters)==null?void 0:t.get(g);if(!x)throw this.createCharUnknownErr(g);return((i=x.getMovement())==null?void 0:i.getInfo().type)==="Queue"?x.getMovement().peekAll().map(T=>({command:Gf(T.command)?T.command:Ri.fromInternal(T.command),config:T.config})):[]}clearEnqueuedMovements(g){var t,i;this.initGuard();let x=(t=this.gridCharacters)==null?void 0:t.get(g);if(!x)throw this.createCharUnknownErr(g);((i=x.getMovement())==null?void 0:i.getInfo().type)==="Queue"&&x.getMovement().clear()}getTileCost(g,t,i){var x,T;return this.initGuard(),(T=(x=this.gridTilemap)==null?void 0:x.getTileCosts({position:new _t(g),layer:t},i))!=null?T:1}getState(){let g=[];if(this.gridCharacters)for(let[t,i]of this.gridCharacters.entries())g.push({id:t,position:Ri.fromInternal(i.getTilePos()),facingDirection:i.getFacingDirection(),speed:i.getSpeed(),labels:i.getLabels(),movementProgress:i.getMovementProgress(),collisionConfig:{collisionGroups:i.getCollisionGroups(),ignoreCollisionGroups:i.getIgnoreCollisionGroups(),collidesWithTiles:i.collidesWithTiles(),ignoreMissingTiles:i.getIgnoreMissingTiles()}});return{characters:g}}setState(g){if(this.gridCharacters)for(let t of g.characters){let i=this.gridCharacters.get(t.id);if(i){let x=i.getTilePos();Ri.equal(x,Ri.toInternal(t.position))||i.setTilePosition(Ri.toInternal(t.position)),i.setSpeed(t.speed),i.turnTowards(t.facingDirection),t.collisionConfig.collisionGroups&&i.setCollisionGroups(t.collisionConfig.collisionGroups),t.collisionConfig.collidesWithTiles!==void 0&&i.setCollidesWithTiles(t.collisionConfig.collidesWithTiles),t.collisionConfig.ignoreMissingTiles!==void 0&&i.setIgnoreMissingTiles(t.collisionConfig.ignoreMissingTiles),i.setMovementProgress(t.movementProgress),i.clearLabels(),i.addLabels(t.labels)}}}charRemoved(g){var t;if(!this.charRemoved$)throw this.createUninitializedErr();return(t=this.charRemoved$)==null?void 0:t.pipe(sc(1),yh(i=>i==g))}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var g;(g=this.config)==null||g.characters.forEach(t=>this.addCharacter(t))}moveChar(g,t){var i,x,T;this.initGuard();let E=(i=this.gridCharacters)==null?void 0:i.get(g);if(!E)throw this.createCharUnknownErr(g);if(E.getNumberOfDirections()===4){if(!((x=this.gridTilemap)!=null&&x.isIsometric())&&ud(t)){console.warn(`GridEngine: Character '${g}' can't be moved '${t}' in 4 direction mode.`);return}else if((T=this.gridTilemap)!=null&&T.isIsometric()&&!ud(t)){console.warn(`GridEngine: Character '${g}' can't be moved '${t}' in 4 direction isometric mode.`);return}}E.move(t)}createCharUnknownErr(g){return new Error(`Character unknown: ${g}`)}assembleMoveToConfig(g={}){let t=gh(Pn({},g),{noPathFoundStrategy:"STOP",pathBlockedStrategy:"WAIT"});return g!=null&&g.noPathFoundStrategy&&(Object.values(LC).includes(g.noPathFoundStrategy)?t.noPathFoundStrategy=g.noPathFoundStrategy:console.warn(`GridEngine: Unknown NoPathFoundStrategy '${g.noPathFoundStrategy}'. Falling back to 'STOP'`)),g!=null&&g.pathBlockedStrategy&&(Object.values(FC).includes(g.pathBlockedStrategy)?t.pathBlockedStrategy=g.pathBlockedStrategy:console.warn(`GridEngine: Unknown PathBlockedStrategy '${g.pathBlockedStrategy}'. Falling back to 'WAIT'`)),t}setConfigDefaults(g){return Pn({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",cacheTileCollisions:!1},g)}},O4=class extends DC{constructor(g,t={}){super(g,t),this.jumpCache=new pT}findShortestPathImpl(g,t){return this.jumpCache=new pT,super.findShortestPathImpl(g,t)}getNeighborsInternal(g,t,i){if(!t||g.layer!==t.layer)return this.getNeighbors(g,i).map(E=>({p:E,dist:1}));let x=this.prune(t,g).map(E=>{let s=this.getTransition(E.position,g.layer);return{position:E.position,layer:s||g.layer}}),T=[];for(let E of x){let s=this.jump(g,E,i,1,Ca(g.position,E.position));s&&(s.dist=this.distance(g.position,s.p.position),T.push(s))}return T}getForced(g,t){let i=[],{topLeft:x,downLeft:T,top:E,bottom:s,topRight:y,downRight:e}=this.normalizedPositions(g,t),r=Ca(g.position,t.position);return ud(r)?(this.blockOrTrans(g,x)&&(this.addIfNotBlocked(i,t,E),this.addIfNotBlocked(i,t,y),this.blockOrTrans(T,x)&&this.addIfNotBlocked(i,t,x)),this.blockOrTrans(g,T)&&(this.addIfNotBlocked(i,t,s),this.addIfNotBlocked(i,t,e),this.blockOrTrans(x,T)&&this.addIfNotBlocked(i,t,T)),this.blockOrTrans(x,E)&&this.addIfNotBlocked(i,t,E),this.blockOrTrans(T,s)&&this.addIfNotBlocked(i,t,s),this.blockOrTrans(x,y)&&this.addIfNotBlocked(i,t,y),this.blockOrTrans(T,e)&&this.addIfNotBlocked(i,t,e)):((this.blockOrTrans(g,E)||this.blockOrTrans(E,y))&&this.addIfNotBlocked(i,t,y),(this.blockOrTrans(g,s)||this.blockOrTrans(s,e))&&this.addIfNotBlocked(i,t,e),this.blockOrTrans(g,x)&&this.blockOrTrans(g,E)&&(this.addIfNotBlocked(i,t,E),this.addIfNotBlocked(i,t,x)),this.blockOrTrans(g,T)&&this.blockOrTrans(g,s)&&(this.addIfNotBlocked(i,t,s),this.addIfNotBlocked(i,t,T)),this.blockOrTrans(x,E)&&this.blockOrTrans(g,E)&&this.addIfNotBlocked(i,t,E),this.blockOrTrans(T,s)&&this.blockOrTrans(g,s)&&this.addIfNotBlocked(i,t,s)),i}hasForced(g,t){let{topLeft:i,downLeft:x,top:T,bottom:E,topRight:s,downRight:y}=this.normalizedPositions(g,t),e=Ca(g.position,t.position);if(ud(e)){if(this.blockOrTrans(g,i)&&(!this.blockOrTrans(t,T)||!this.blockOrTrans(t,s)||this.blockOrTrans(x,i)&&!this.blockOrTrans(t,i))||this.blockOrTrans(g,x)&&(!this.blockOrTrans(t,E)||!this.blockOrTrans(t,y)||this.blockOrTrans(i,x)&&!this.blockOrTrans(t,x))||this.blockOrTrans(i,T)&&!this.blockOrTrans(t,T)||this.blockOrTrans(x,E)&&!this.blockOrTrans(t,E)||this.blockOrTrans(i,s)&&!this.blockOrTrans(t,s)||this.blockOrTrans(x,y)&&!this.blockOrTrans(t,y))return!0}else if((this.blockOrTrans(g,T)||this.blockOrTrans(T,s))&&!this.blockOrTrans(t,s)||(this.blockOrTrans(g,E)||this.blockOrTrans(E,y))&&!this.blockOrTrans(t,y)||this.blockOrTrans(g,i)&&this.blockOrTrans(g,T)&&(!this.blockOrTrans(t,T)||!this.blockOrTrans(t,i))||this.blockOrTrans(g,x)&&this.blockOrTrans(g,E)&&(!this.blockOrTrans(t,E)||!this.blockOrTrans(t,x))||this.blockOrTrans(i,T)&&this.blockOrTrans(g,T)&&!this.blockOrTrans(t,T)||this.blockOrTrans(x,E)&&this.blockOrTrans(g,E)&&!this.blockOrTrans(t,E))return!0;return!1}prune(g,t){let{top:i,right:x,topRight:T,downRight:E,bottom:s}=this.normalizedPositions(g,t),y=this.getForced(g,t),e=Ca(g.position,t.position);return ud(e)?[i,x,T,E,s,...y]:[x,...y]}jump(g,t,i,x,T){let E=this.jumpCache.get(g,t);if(E!==null)return E;if(this.isBlocking(g,t)&&!(Ri.equal(t,i)&&this.options.ignoreBlockedTarget)){this.jumpCache.set(g,t,void 0);return}if(Ri.equal(t,i))return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(x>=this.maxJumpSize)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.getTransition(t.position,g.layer)!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.hasForced(g,t))return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.updateClosestToTarget(t,i),T==="up-left"){if(this.jump(t,this.getTilePosInDir(t,"up"),i,x+1,"up")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"left"),i,x+1,"left")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}else if(T==="down-left"){if(this.jump(t,this.getTilePosInDir(t,"down"),i,x+1,"down")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"left"),i,x+1,"left")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}else if(T==="up-right"){if(this.jump(t,this.getTilePosInDir(t,"up"),i,x+1,"up")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"right"),i,x+1,"right")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}else if(T==="down-right"){if(this.jump(t,this.getTilePosInDir(t,"down"),i,x+1,"down")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"right"),i,x+1,"right")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}let s=this.jump(t,this.getTilePosInDir(t,T),i,x+1,T);return this.jumpCache.set(g,t,s),s}normalizedPositions(g,t){return g.position.xt.position.x&&g.position.y===t.position.y?{topLeft:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},downLeft:{position:new _t(t.position.x+1,t.position.y-1),layer:t.layer},top:{position:new _t(t.position.x,t.position.y+1),layer:t.layer},bottom:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},right:{position:new _t(t.position.x-1,t.position.y),layer:t.layer},topRight:{position:new _t(t.position.x-1,t.position.y+1),layer:t.layer},downRight:{position:new _t(t.position.x-1,t.position.y-1),layer:t.layer}}:g.position.yt.position.y&&g.position.x===t.position.x?{topLeft:{position:new _t(t.position.x-1,t.position.y+1),layer:t.layer},downLeft:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},top:{position:new _t(t.position.x-1,t.position.y),layer:t.layer},bottom:{position:new _t(t.position.x+1,t.position.y),layer:t.layer},right:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},topRight:{position:new _t(t.position.x-1,t.position.y-1),layer:t.layer},downRight:{position:new _t(t.position.x+1,t.position.y-1),layer:t.layer}}:g.position.yt.position.x?{topLeft:{position:new _t(t.position.x+1,t.position.y),layer:t.layer},downLeft:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},top:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},bottom:{position:new _t(t.position.x-1,t.position.y-1),layer:t.layer},right:{position:new _t(t.position.x-1,t.position.y+1),layer:t.layer},topRight:{position:new _t(t.position.x,t.position.y+1),layer:t.layer},downRight:{position:new _t(t.position.x-1,t.position.y),layer:t.layer}}:g.position.y>t.position.y&&g.position.x(g.SUCCESS="SUCCESS",g.NO_PATH_FOUND_MAX_RETRIES_EXCEEDED="NO_PATH_FOUND_MAX_RETRIES_EXCEEDED",g.PATH_BLOCKED_MAX_RETRIES_EXCEEDED="PATH_BLOCKED_MAX_RETRIES_EXCEEDED",g.PATH_BLOCKED="PATH_BLOCKED",g.NO_PATH_FOUND="NO_PATH_FOUND",g.PATH_BLOCKED_WAIT_TIMEOUT="PATH_BLOCKED_WAIT_TIMEOUT",g.MOVEMENT_TERMINATED="MOVEMENT_TERMINATED",g.MAX_PATH_LENGTH_REACHED="MAX_PATH_LENGTH_REACHED",g))(I4||{}),zC=class{constructor(g,t,i,{config:x,ignoreBlockedTarget:T=!1,distance:E=0}={}){this.character=g,this.tilemap=t,this.targetPos=i,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=(e,r)=>e?new OC(this.tilemap,this.getPathfindingOptions()).isBlocking(this.character.getTilePos(),{position:e,layer:r}):!0;var s,y;this.shortestPathAlgorithm=(s=x?.algorithm)!=null?s:this.shortestPathAlgorithm,this.ignoreBlockedTarget=T,this.distance=E,this.noPathFoundStrategy=x?.noPathFoundStrategy||"STOP",this.pathBlockedStrategy=x?.pathBlockedStrategy||"WAIT",this.noPathFoundRetryable=new aT(x?.noPathFoundRetryBackoffMs||200,x?.noPathFoundMaxRetries||-1,()=>{this.stop("NO_PATH_FOUND_MAX_RETRIES_EXCEEDED")}),this.pathBlockedRetryable=new aT(x?.pathBlockedRetryBackoffMs||200,x?.pathBlockedMaxRetries||-1,()=>{this.stop("PATH_BLOCKED_MAX_RETRIES_EXCEEDED")}),x!=null&&x.isPositionAllowedFn&&(this.isPositionAllowed=x.isPositionAllowedFn),x!=null&&x.maxPathLength&&(this.maxPathLength=x.maxPathLength),this.alternativeTargets=x?.alternativeTargets,this.noPathFoundAlternativeTargetsFallbackStrategy=x?.noPathFoundAlternativeTargetsFallbackStrategy,x!=null&&x.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=x?.considerCosts||!1,this.ignoreLayers=!!(x!=null&&x.ignoreLayers),this.distanceUtils=Td.create(g.getNumberOfDirections()),this.pathBlockedWaitTimeoutMs=x?.pathBlockedWaitTimeoutMs||-1,this.ignoredChars=(y=x?.ignoredChars)!=null?y:[],this.finished$=new Nn,this.setCharacter(g)}setPathBlockedStrategy(g){this.pathBlockedStrategy=g}getPathBlockedStrategy(){return this.pathBlockedStrategy}setCharacter(g){this.character=g,this.noPathFoundRetryable.reset(),this.pathBlockedRetryable.reset(),this.pathBlockedWaitElapsed=0,this.calcShortestPath(),this.character.autoMovementSet().pipe(yh(t=>t!==this),sc(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(g){var t,i,x,T;this.stopped||(this.noPathFound()&&(this.noPathFoundStrategy==="RETRY"?this.noPathFoundRetryable.retry(g,()=>this.calcShortestPath()):this.noPathFoundStrategy==="STOP"&&this.stop("NO_PATH_FOUND")),this.updatePosOnPath(),this.isBlocking((t=this.nextTileOnPath())==null?void 0:t.position,(i=this.character)==null?void 0:i.getNextTilePos().layer)?this.applyPathBlockedStrategy(g):this.pathBlockedWaitElapsed=0,this.hasArrived()?(this.stop("SUCCESS"),this.existsDistToTarget()&&this.turnTowardsTarget()):this.isBlocking((x=this.nextTileOnPath())==null?void 0:x.position,(T=this.character)==null?void 0:T.getNextTilePos().layer)||this.moveCharOnPath())}finishedObs(){return this.finished$}getInfo(){return{type:"Target",state:{pathAhead:this.shortestPath.slice(this.posOnPath).map(g=>Ri.fromInternal(g))},config:{algorithm:this.shortestPathAlgorithm,ignoreBlockedTarget:this.ignoreBlockedTarget,distance:this.distance,targetPos:Ri.fromInternal(this.targetPos),noPathFoundStrategy:this.noPathFoundStrategy,pathBlockedStrategy:this.pathBlockedStrategy,noPathFoundRetryBackoffMs:this.noPathFoundRetryable.getBackoffMs(),noPathFoundMaxRetries:this.noPathFoundRetryable.getMaxRetries()}}}resultToReason(g){switch(g){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(g){this.pathBlockedStrategy==="RETRY"?this.pathBlockedRetryable.retry(g,()=>{let t=this.getShortestPath();t.path.length>0&&this.calcShortestPath(t)}):this.pathBlockedStrategy==="STOP"?this.stop("PATH_BLOCKED"):this.pathBlockedStrategy==="WAIT"&&this.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=g,this.pathBlockedWaitElapsed>=this.pathBlockedWaitTimeoutMs&&this.stop("PATH_BLOCKED_WAIT_TIMEOUT"))}moveCharOnPath(){let g=this.nextTileOnPath();if(!g)return;let t=this.getDir(this.character.getNextTilePos().position,g.position);this.character.move(t)}nextTileOnPath(){return this.shortestPath[this.posOnPath+1]}stop(g){this.finished$.next({position:this.character.getTilePos().position,result:g,description:this.resultToReason(g),layer:this.character.getTilePos().layer}),this.finished$.complete(),this.stopped=!0}turnTowardsTarget(){let g=this.shortestPath[this.posOnPath+1],t=this.getDir(this.character.getNextTilePos().position,g.position);this.character.turnTowards(t)}existsDistToTarget(){return this.posOnPath=this.shortestPath.length-1}updatePosOnPath(){let g=this.shortestPath[this.posOnPath];for(;this.posOnPath0)return{path:E,distOffset:s}}return this.noPathFoundStrategy=this.noPathFoundAlternativeTargetsFallbackStrategy||"STOP",this.getShortestPath()}}return{path:i,distOffset:0}}pathToAlternativeTarget(g,t){let i=t.findShortestPath(this.character.getNextTilePos(),g,this.getPathfindingOptions()).path,x=this.distanceUtils.distance(g.position,this.targetPos.position);return{path:i,distOffset:x}}getDir(g,t){return this.tilemap.fromMapDirection(this.distanceUtils.direction(g,t))}},N4=Object.create,GC=Object.defineProperty,B4=Object.getOwnPropertyDescriptor,U4=Object.getOwnPropertyNames,z4=Object.getPrototypeOf,G4=Object.prototype.hasOwnProperty,V4=(g,t)=>()=>(t||g((t={exports:{}}).exports,t),t.exports),H4=(g,t,i,x)=>{if(t&&typeof t=="object"||typeof t=="function")for(let T of U4(t))!G4.call(g,T)&&T!==i&&GC(g,T,{get:()=>t[T],enumerable:!(x=B4(t,T))||x.enumerable});return g},t1=(g,t,i)=>(i=g!=null?N4(z4(g)):{},H4(t||!g||!g.__esModule?GC(i,"default",{value:g,enumerable:!0}):i,g)),e1=V4((g,t)=>{(function(){var i,x="4.17.21",T=200,E="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",y="Invalid `variable` option passed into `_.template`",e="__lodash_hash_undefined__",r=500,d="__lodash_placeholder__",h=1,a=2,l=4,n=1,u=2,f=1,o=2,c=4,p=8,v=16,m=32,S=64,M=128,w=256,C=512,A=30,P="...",b=800,O=16,I=1,D=2,B=3,G=1/0,z=9007199254740991,X=17976931348623157e292,j=NaN,Q=4294967295,tt=Q-1,Y=Q>>>1,Z=[["ary",M],["bind",f],["bindKey",o],["curry",p],["curryRight",v],["flip",C],["partial",m],["partialRight",S],["rearg",w]],U="[object Arguments]",H="[object Array]",$="[object AsyncFunction]",_="[object Boolean]",q="[object Date]",at="[object DOMException]",ot="[object Error]",rt="[object Function]",gt="[object GeneratorFunction]",yt="[object Map]",Et="[object Number]",At="[object Null]",Pt="[object Object]",Vt="[object Promise]",dt="[object Proxy]",ut="[object RegExp]",Rt="[object Set]",Dt="[object String]",Ht="[object Symbol]",Bt="[object Undefined]",re="[object WeakMap]",le="[object WeakSet]",ge="[object ArrayBuffer]",xe="[object DataView]",Pe="[object Float32Array]",te="[object Float64Array]",Ge="[object Int8Array]",Oe="[object Int16Array]",Be="[object Int32Array]",Le="[object Uint8Array]",ne="[object Uint8ClampedArray]",je="[object Uint16Array]",si="[object Uint32Array]",Mi=/\b__p \+= '';/g,he=/\b(__p \+=) '' \+/g,Ti=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bt=/&(?:amp|lt|gt|quot|#39);/g,Ce=/[&<>"']/g,we=RegExp(bt.source),Ve=RegExp(Ce.source),$e=/<%-([\s\S]+?)%>/g,Gi=/<%([\s\S]+?)%>/g,Ii=/<%=([\s\S]+?)%>/g,nn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$n=/^\w*$/,Vi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pi=/[\\^$.*+?()[\]{}|]/g,Xi=RegExp(pi.source),ba=/^\s+/,oa=/\s/,Us=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_r=/\{\n\/\* \[wrapped with (.+)\] \*/,lo=/,? & /,qr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zs=/[()=,{}\[\]\/\s]/,Ss=/\\(\\)?/g,ho=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fl=/\w*$/,Tt=/^[-+]0x[0-9a-f]+$/i,Zt=/^0b[01]+$/i,qt=/^\[object .+?Constructor\]$/,ie=/^0o[0-7]+$/i,ee=/^(?:0|[1-9]\d*)$/,Te=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ue=/($^)/,We=/['\n\r\u2028\u2029\\]/g,Je="\\ud800-\\udfff",ti="\\u0300-\\u036f",ni="\\ufe20-\\ufe2f",oi="\\u20d0-\\u20ff",Ji=ti+ni+oi,un="\\u2700-\\u27bf",ji="a-z\\xdf-\\xf6\\xf8-\\xff",yn="\\xac\\xb1\\xd7\\xf7",ei="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Se="\\u2000-\\u206f",Br=" \\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",gi="A-Z\\xc0-\\xd6\\xd8-\\xde",fn="\\ufe0e\\ufe0f",Ni=yn+ei+Se+Br,Vn="['’]",vn="["+Je+"]",Ki="["+Ni+"]",pr="["+Ji+"]",Gs="\\d+",En="["+un+"]",la="["+ji+"]",Jn="[^"+Je+Ni+Gs+un+ji+gi+"]",La="\\ud83c[\\udffb-\\udfff]",Vs="(?:"+pr+"|"+La+")",uo="[^"+Je+"]",Fa="(?:\\ud83c[\\udde6-\\uddff]){2}",fo="[\\ud800-\\udbff][\\udc00-\\udfff]",yi="["+gi+"]",Oa="\\u200d",Vu="(?:"+la+"|"+Jn+")",dc="(?:"+yi+"|"+Jn+")",sr="(?:"+Vn+"(?:d|ll|m|re|s|t|ve))?",Hs="(?:"+Vn+"(?:D|LL|M|RE|S|T|VE))?",Ws=Vs+"?",Xs="["+fn+"]?",Ol="(?:"+Oa+"(?:"+[uo,Fa,fo].join("|")+")"+Xs+Ws+")*",Bi="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rn="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ur=Xs+Ws+Ol,co="(?:"+[En,Fa,fo].join("|")+")"+Ur,Yo="(?:"+[uo+pr+"?",pr,Fa,fo,vn].join("|")+")",Ah=RegExp(Vn,"g"),rn=RegExp(pr,"g"),ko=RegExp(La+"(?="+La+")|"+Yo+Ur,"g"),Ts=RegExp([yi+"?"+la+"+"+sr+"(?="+[Ki,yi,"$"].join("|")+")",dc+"+"+Hs+"(?="+[Ki,yi+Vu,"$"].join("|")+")",yi+"?"+Vu+"+"+sr,yi+"+"+Hs,Rn,Bi,Gs,co].join("|"),"g"),jo=RegExp("["+Oa+Je+Ji+fn+"]"),Hu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,po=["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"],Sr=-1,Zi={};Zi[Pe]=Zi[te]=Zi[Ge]=Zi[Oe]=Zi[Be]=Zi[Le]=Zi[ne]=Zi[je]=Zi[si]=!0,Zi[U]=Zi[H]=Zi[ge]=Zi[_]=Zi[xe]=Zi[q]=Zi[ot]=Zi[rt]=Zi[yt]=Zi[Et]=Zi[Pt]=Zi[ut]=Zi[Rt]=Zi[Dt]=Zi[re]=!1;var $i={};$i[U]=$i[H]=$i[ge]=$i[xe]=$i[_]=$i[q]=$i[Pe]=$i[te]=$i[Ge]=$i[Oe]=$i[Be]=$i[yt]=$i[Et]=$i[Pt]=$i[ut]=$i[Rt]=$i[Dt]=$i[Ht]=$i[Le]=$i[ne]=$i[je]=$i[si]=!0,$i[ot]=$i[rt]=$i[re]=!1;var Es={À:"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"},zr={"&":"&","<":"<",">":">",'"':""","'":"'"},Dl={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ph={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ko=parseFloat,Il=parseInt,Gr=typeof global=="object"&&global&&global.Object===Object&&global,pc=typeof self=="object"&&self&&self.Object===Object&&self,xn=Gr||pc||Function("return this")(),Rh=typeof g=="object"&&g&&!g.nodeType&&g,bn=Rh&&typeof t=="object"&&t&&!t.nodeType&&t,Da=bn&&bn.exports===Rh,Ia=Da&&Gr.process,Mn=function(){try{var ct=bn&&bn.require&&bn.require("util").types;return ct||Ia&&Ia.binding&&Ia.binding("util")}catch{}}(),Na=Mn&&Mn.isArrayBuffer,Ba=Mn&&Mn.isDate,Nl=Mn&&Mn.isMap,Bl=Mn&&Mn.isRegExp,Ua=Mn&&Mn.isSet,Ys=Mn&&Mn.isTypedArray;function Qi(ct,St,vt){switch(vt.length){case 0:return ct.call(St);case 1:return ct.call(St,vt[0]);case 2:return ct.call(St,vt[0],vt[1]);case 3:return ct.call(St,vt[0],vt[1],vt[2])}return ct.apply(St,vt)}function Xr(ct,St,vt,Ft){for(var Lt=-1,Ut=ct==null?0:ct.length;++Lt-1}function ha(ct,St,vt){for(var Ft=-1,Lt=ct==null?0:ct.length;++Ft-1;);return vt}function mo(ct,St){for(var vt=ct.length;vt--&&es(St,ct[vt],0)>-1;);return vt}function ns(ct,St){for(var vt=ct.length,Ft=0;vt--;)ct[vt]===St&&++Ft;return Ft}var Wu=or(Es),Qo=or(zr);function rs(ct){return"\\"+Ph[ct]}function dn(ct,St){return ct==null?i:ct[St]}function ws(ct){return jo.test(ct)}function hr(ct){return Hu.test(ct)}function go(ct){for(var St,vt=[];!(St=ct.next()).done;)vt.push(St.value);return vt}function Ha(ct){var St=-1,vt=Array(ct.size);return ct.forEach(function(Ft,Lt){vt[++St]=[Lt,Ft]}),vt}function Wa(ct,St){return function(vt){return ct(St(vt))}}function _n(ct,St){for(var vt=-1,Ft=ct.length,Lt=0,Ut=[];++vt-1}function Yu(R,N){var k=this.__data__,nt=Mo(k,R);return nt<0?(++this.size,k.push([R,N])):k[nt][1]=N,this}js.prototype.clear=wp,js.prototype.delete=xc,js.prototype.get=Ap,js.prototype.has=Pp,js.prototype.set=Yu;function As(R){var N=-1,k=R==null?0:R.length;for(this.clear();++N=N?R:N)),R}function as(R,N,k,nt,ft,xt){var Ot,Gt=N&h,jt=N&a,fe=N&l;if(k&&(Ot=ft?k(R,nt,ft,xt):k(R)),Ot!==i)return Ot;if(!In(R))return R;var ce=Ei(R);if(ce){if(Ot=oP(R),!Gt)return br(R,Ot)}else{var ye=kr(R),Ie=ye==rt||ye==gt;if(ql(R))return Gc(R,Gt);if(ye==Pt||ye==U||Ie&&!ft){if(Ot=jt||Ie?{}:q1(R),!Gt)return jt?Xp(R,Dp(Ot,R)):jg(R,wc(Ot,R))}else{if(!$i[ye])return ft?R:{};Ot=lP(R,ye,Gt)}}xt||(xt=new tr);var Ke=xt.get(R);if(Ke)return Ke;xt.set(R,Ot),RS(R)?R.forEach(function(ui){Ot.add(as(ui,N,k,ui,R,xt))}):AS(R)&&R.forEach(function(ui,Ui){Ot.set(Ui,as(ui,N,k,Ui,R,xt))});var hi=fe?jt?zi:kn:jt?Fs:Fr,Oi=ce?i:hi(R);return Sn(Oi||R,function(ui,Ui){Oi&&(Ui=ui,ui=R[Ui]),Ks(Ot,Ui,as(ui,N,k,Ui,R,xt))}),Ot}function Ac(R){var N=Fr(R);return function(k){return Zu(k,R,N)}}function Zu(R,N,k){var nt=k.length;if(R==null)return!nt;for(R=It(R);nt--;){var ft=k[nt],xt=N[ft],Ot=R[ft];if(Ot===i&&!(ft in R)||!xt(Ot))return!1}return!0}function Pc(R,N,k){if(typeof R!="function")throw new Qt(s);return Xc(function(){R.apply(i,k)},N)}function il(R,N,k,nt){var ft=-1,xt=Tr,Ot=!0,Gt=R.length,jt=[],fe=N.length;if(!Gt)return jt;k&&(N=_i(N,lr(k))),nt?(xt=ha,Ot=!1):N.length>=T&&(xt=Wn,Ot=!1,N=new Eo(N));t:for(;++ftft?0:ft+k),nt=nt===i||nt>ft?ft:bi(nt),nt<0&&(nt+=ft),nt=k>nt?0:LS(nt);k0&&k(Gt)?N>1?ur(Gt,N-1,k,nt,ft):Yr(ft,Gt):nt||(ft[ft.length]=Gt)}return ft}var Yl=of(),Vh=of(!0);function os(R,N){return R&&Yl(R,N,Fr)}function kl(R,N){return R&&Vh(R,N,Fr)}function nl(R,N){return Cn(N,function(k){return ll(R[k])})}function $s(R,N){N=bo(N,R);for(var k=0,nt=N.length;R!=null&&kN}function Bp(R,N){return R!=null&&me.call(R,N)}function bc(R,N){return R!=null&&N in It(R)}function Yg(R,N,k){return R>=Mr(N,k)&&R=120&&ce.length>=120)?new Eo(Ot&&ce):i}ce=R[0];var ye=-1,Ie=Gt[0];t:for(;++ye-1;)Gt!==R&&So.call(Gt,jt,1),So.call(R,jt,1);return R}function Ar(R,N){for(var k=R?N.length:0,nt=k-1;k--;){var ft=N[k];if(k==nt||ft!==xt){var xt=ft;ol(ft)?So.call(R,ft,1):Bc(R,ft)}}return R}function ma(R,N){return R+Dh(gc()*(N-R+1))}function Ps(R,N,k,nt){for(var ft=-1,xt=qn(Oh((N-R)/(k||1)),0),Ot=vt(xt);xt--;)Ot[nt?xt:++ft]=R,R+=k;return Ot}function _l(R,N){var k="";if(!R||N<1||N>z)return k;do N%2&&(k+=R),N=Dh(N/2),N&&(R+=R);while(N);return k}function ii(R,N){return qg(iS(R,N,Os),R+"")}function Up(R){return zh(ff(R))}function Dc(R,N){var k=ff(R);return jp(k,Co(N,0,k.length))}function sl(R,N,k,nt){if(!In(R))return R;N=bo(N,R);for(var ft=-1,xt=N.length,Ot=xt-1,Gt=R;Gt!=null&&++ftft?0:ft+N),k=k>ft?ft:k,k<0&&(k+=ft),ft=N>k?0:k-N>>>0,N>>>=0;for(var xt=vt(ft);++nt>>1,Ot=R[xt];Ot!==null&&!Qs(Ot)&&(k?Ot<=N:Ot=T){var fe=N?null:Lr(R);if(fe)return Xa(fe);Ot=!1,ft=Wn,jt=new Eo}else jt=N?[]:Gt;t:for(;++nt=nt?R:hs(R,N,k)}var Hp=Fh||function(R){return xn.clearTimeout(R)};function Gc(R,N){if(N)return R.slice();var k=R.length,nt=yo?yo(k):new R.constructor(k);return R.copy(nt),nt}function sf(R){var N=new R.constructor(R.byteLength);return new wn(N).set(new wn(R)),N}function kg(R,N){var k=N?sf(R.buffer):R.buffer;return new R.constructor(k,R.byteOffset,R.byteLength)}function Rs(R){var N=new R.constructor(R.source,Fl.exec(R));return N.lastIndex=R.lastIndex,N}function Vc(R){return ka?It(ka.call(R)):{}}function Wp(R,N){var k=N?sf(R.buffer):R.buffer;return new R.constructor(k,R.byteOffset,R.length)}function Za(R,N){if(R!==N){var k=R!==i,nt=R===null,ft=R===R,xt=Qs(R),Ot=N!==i,Gt=N===null,jt=N===N,fe=Qs(N);if(!Gt&&!fe&&!xt&&R>N||xt&&Ot&&jt&&!Gt&&!fe||nt&&Ot&&jt||!k&&jt||!ft)return 1;if(!nt&&!xt&&!fe&&R=Gt)return jt;var fe=k[nt];return jt*(fe=="desc"?-1:1)}}return R.index-N.index}function Fo(R,N,k,nt){for(var ft=-1,xt=R.length,Ot=k.length,Gt=-1,jt=N.length,fe=qn(xt-Ot,0),ce=vt(jt+fe),ye=!nt;++Gt1?k[ft-1]:i,Ot=ft>2?k[2]:i;for(xt=R.length>3&&typeof xt=="function"?(ft--,xt):i,Ot&&fs(k[0],k[1],Ot)&&(xt=ft<3?i:xt,ft=1),N=It(N);++nt-1?ft[xt?N[Ot]:Ot]:i}}function it(R){return Ai(function(N){var k=N.length,nt=k,ft=Cr.prototype.thru;for(R&&N.reverse();nt--;){var xt=N[nt];if(typeof xt!="function")throw new Qt(s);if(ft&&!Ot&&lf(xt)=="wrapper")var Ot=new Cr([],!0)}for(nt=Ot?nt:k;++nt1&&Hi.reverse(),ce&&jtGt))return!1;var fe=xt.get(R),ce=xt.get(N);if(fe&&ce)return fe==N&&ce==R;var ye=-1,Ie=!0,Ke=k&u?new Eo:i;for(xt.set(R,N),xt.set(N,R);++ye1?"& ":"")+N[nt],N=N.join(k>2?", ":" "),R.replace(Us,`{ + */s.exports={Format:e(27902),Pad:e(41836),RemoveAt:e(33628),Reverse:e(27671),UppercaseFirst:e(35355),UUID:e(45650)}}},y={};function T(s){var x=y[s];if(x!==void 0)return x.exports;var e=y[s]={exports:{}};return i[s](e,e.exports,T),e.exports}T.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var E=T(85454);return E})())})(YM);var eg=YM.exports;const ad=Kd(eg);var FF=Object.create,jx=Object.defineProperty,OF=Object.defineProperties,DF=Object.getOwnPropertyDescriptor,IF=Object.getOwnPropertyDescriptors,NF=Object.getOwnPropertyNames,eT=Object.getOwnPropertySymbols,BF=Object.getPrototypeOf,kM=Object.prototype.hasOwnProperty,UF=Object.prototype.propertyIsEnumerable,iT=(g,t,i)=>t in g?jx(g,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):g[t]=i,Pn=(g,t)=>{for(var i in t||(t={}))kM.call(t,i)&&iT(g,i,t[i]);if(eT)for(var i of eT(t))UF.call(t,i)&&iT(g,i,t[i]);return g},mh=(g,t)=>OF(g,IF(t)),ai=(g,t)=>()=>(t||g((t={exports:{}}).exports,t),t.exports),zF=(g,t,i,y)=>{if(t&&typeof t=="object"||typeof t=="function")for(let T of NF(t))!kM.call(g,T)&&T!==i&&jx(g,T,{get:()=>t[T],enumerable:!(y=DF(t,T))||y.enumerable});return g},jM=(g,t,i)=>(i=g!=null?FF(BF(g)):{},zF(t||!g||!g.__esModule?jx(i,"default",{value:g,enumerable:!0}):i,g)),ig=ai(g=>{var t=function(E,s){return Es?1:0},i=function(E,s){return Es?-1:0};function y(E){return function(s,x){return E(x,s)}}function T(E){return E===2?function(s,x){return s[0]x[0]?1:s[1]x[1]?1:0}:function(s,x){for(var e=0;ex[e])return 1;e++}return 0}}g.DEFAULT_COMPARATOR=t,g.DEFAULT_REVERSE_COMPARATOR=i,g.reverseComparator=y,g.createTupleComparator=T}),GF=ai(g=>{g.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",g.SYMBOL_SUPPORT=typeof Symbol<"u"}),Gn=ai((g,t)=>{var i=GF(),y=i.ARRAY_BUFFER_SUPPORT,T=i.SYMBOL_SUPPORT;t.exports=function(E,s){var x,e,r,d,h;if(!E)throw new Error("obliterator/forEach: invalid iterable.");if(typeof s!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(E)||y&&ArrayBuffer.isView(E)||typeof E=="string"||E.toString()==="[object Arguments]"){for(r=0,d=E.length;r{var i=ig(),y=Gn(),T=i.DEFAULT_COMPARATOR,E=i.reverseComparator;function s(u){if(this.clear(),this.comparator=u||T,typeof this.comparator!="function")throw new Error("mnemonist/FibonacciHeap.constructor: given comparator should be a function.")}s.prototype.clear=function(){this.root=null,this.min=null,this.size=0};function x(u){return{item:u,degree:0}}function e(u,f){u.root?(f.right=u.root.right,f.left=u.root,u.root.right.left=f,u.root.right=f):u.root=f}s.prototype.push=function(u){var f=x(u);return f.left=f,f.right=f,e(this,f),(!this.min||this.comparator(f.item,this.min.item)<=0)&&(this.min=f),++this.size},s.prototype.peek=function(){return this.min?this.min.item:void 0};function r(u){for(var f=[],o=u,c=!1;!(o===u&&c);)o===u&&(c=!0),f.push(o),o=o.right;return f}function d(u,f){u.root===f&&(u.root=f.right),f.left.right=f.right,f.right.left=f.left}function h(u,f){u.child?(f.right=u.child.right,f.left=u.child,u.child.right.left=f,u.child.right=f):u.child=f}function a(u,f,o){d(u,f),f.left=f,f.right=f,h(o,f),o.degree++,f.parent=o}function l(u){var f=new Array(u.size),o=r(u.root),c,p,v,m,S,M;for(c=0,p=o.length;c0&&(M=v,v=m,m=M),a(u,m,v),f[S]=null,S++;f[S]=v}for(c=0;c{var t=Math.pow(2,8)-1,i=Math.pow(2,16)-1,y=Math.pow(2,32)-1,T=Math.pow(2,7)-1,E=Math.pow(2,15)-1,s=Math.pow(2,31)-1;g.getPointerArray=function(e){var r=e-1;if(r<=t)return Uint8Array;if(r<=i)return Uint16Array;if(r<=y)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},g.getSignedPointerArray=function(e){var r=e-1;return r<=T?Int8Array:r<=E?Int16Array:r<=s?Int32Array:Float64Array},g.getNumberType=function(e){return e===(e|0)?Math.sign(e)===-1?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var x={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};g.getMinimalRepresentation=function(e,r){var d=null,h=0,a,l,n,u,f;for(u=0,f=e.length;uh&&(h=a,d=l);return d},g.isTypedArray=function(e){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(e)},g.concat=function(){var e=0,r,d,h;for(r=0,h=arguments.length;r{var t=Gn(),i=Ns();function y(x){return Array.isArray(x)||i.isTypedArray(x)}function T(x){if(typeof x.length=="number")return x.length;if(typeof x.size=="number")return x.size}function E(x){var e=T(x),r=typeof e=="number"?new Array(e):[],d=0;return t(x,function(h){r[d++]=h}),r}function s(x){var e=T(x),r=typeof e=="number"?i.getPointerArray(e):Array,d=typeof e=="number"?new Array(e):[],h=typeof e=="number"?new r(e):[],a=0;return t(x,function(l){d[a]=l,h[a]=a++}),[d,h]}g.isArrayLike=y,g.guessLength=T,g.toArray=E,g.toArrayWithIndices=s}),$x=ai((g,t)=>{var i=Gn(),y=ig(),T=aa(),E=y.DEFAULT_COMPARATOR,s=y.reverseComparator;function x(p,v,m,S){for(var M=v[S],w,C;S>m;){if(w=S-1>>1,C=v[w],p(M,C)<0){v[S]=C,S=w;continue}break}v[S]=M}function e(p,v,m){for(var S=v.length,M=m,w=v[m],C=2*m+1,A;C=0&&(C=A),v[m]=v[C],m=C,C=2*m+1;v[m]=w,x(p,v,M,m)}function r(p,v,m){v.push(m),x(p,v,0,v.length-1)}function d(p,v){var m=v.pop();if(v.length!==0){var S=v[0];return v[0]=m,e(p,v,0),S}return m}function h(p,v,m){if(v.length===0)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var S=v[0];return v[0]=m,e(p,v,0),S}function a(p,v,m){var S;return v.length!==0&&p(v[0],m)<0&&(S=v[0],v[0]=m,m=S,e(p,v,0)),m}function l(p,v){for(var m=v.length,S=m>>1,M=S;--M>=0;)e(p,v,M)}function n(p,v){for(var m=v.length,S=0,M=new Array(m);S=m.length)return m.slice().sort(p);for(P=m.slice(0,v),l(S,P),M=v,w=m.length;M0&&h(S,P,m[M]);return P.sort(p)}var b=T.guessLength(m);return b!==null&&b0&&h(S,P,O)),M++}),P.length>M&&(P.length=M),P.sort(p)}function f(p,v,m){arguments.length===2&&(m=v,v=p,p=E);var S=s(p),M,w,C,A=-1/0,P;if(v===1){if(T.isArrayLike(m)){for(M=0,w=m.length;M0)&&(A=C);return P=new m.constructor(1),P[0]=A,P}return i(m,function(O){(A===-1/0||p(O,A)>0)&&(A=O)}),[A]}if(T.isArrayLike(m)){if(v>=m.length)return m.slice().sort(S);for(P=m.slice(0,v),l(p,P),M=v,w=m.length;M0&&h(p,P,m[M]);return P.sort(S)}var b=T.guessLength(m);return b!==null&&b0&&h(p,P,O)),M++}),P.length>M&&(P.length=M),P.sort(S)}function o(p){if(this.clear(),this.comparator=p||E,typeof this.comparator!="function")throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}o.prototype.clear=function(){this.items=[],this.size=0},o.prototype.push=function(p){return r(this.comparator,this.items,p),++this.size},o.prototype.peek=function(){return this.items[0]},o.prototype.pop=function(){return this.size!==0&&this.size--,d(this.comparator,this.items)},o.prototype.replace=function(p){return h(this.comparator,this.items,p)},o.prototype.pushpop=function(p){return a(this.comparator,this.items,p)},o.prototype.consume=function(){return this.size=0,n(this.comparator,this.items)},o.prototype.toArray=function(){return n(this.comparator,this.items.slice())},o.prototype.inspect=function(){var p=this.toArray();return Object.defineProperty(p,"constructor",{value:o,enumerable:!1}),p},typeof Symbol<"u"&&(o.prototype[Symbol.for("nodejs.util.inspect.custom")]=o.prototype.inspect);function c(p){if(this.clear(),this.comparator=p||E,typeof this.comparator!="function")throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=s(this.comparator)}c.prototype=o.prototype,o.from=function(p,v){var m=new o(v),S;return T.isArrayLike(p)?S=p.slice():S=T.toArray(p),l(m.comparator,S),m.items=S,m.size=S.length,m},c.from=function(p,v){var m=new c(v),S;return T.isArrayLike(p)?S=p.slice():S=T.toArray(p),l(m.comparator,S),m.items=S,m.size=S.length,m},o.siftUp=e,o.siftDown=x,o.push=r,o.pop=d,o.replace=h,o.pushpop=a,o.heapify=l,o.consume=n,o.nsmallest=u,o.nlargest=f,o.MinHeap=o,o.MaxHeap=c,t.exports=o}),VF=ai((g,t)=>{var i="";function y(r,d,h){for(var a=d.length,l=[],n=a,u=-1,f,o=0,c;n--;)u=Math.max(r[d[n]+h],u);for(c=u>>24&&32||u>>16&&24||u>>8&&16||8;o>o&15].push(d[n]);for(f=0;f<16;f++)for(u=l[f].length;u--;)d[++n]=l[f][u]}}function T(r,d,h,a){return r[h]-r[a]||(h%3===2?r[h+1]-r[a+1]||d[h+2]-d[a+2]:d[h+1]-d[a+1])}function E(r,d){var h=[],a=[],l=2*d/3|0,n=d-l,u=l+1>>1,f=l,o=0,c,p=[],v=[];if(d===1)return[0];for(;f--;)h[f]=(f*3>>1)+1;for(f=3;f--;)y(r,h,f);for(o=a[(h[0]/3|0)+(h[0]%3===1?0:u)]=1,f=1;fthis.firstLength&&n>this.firstLength)){for(d=Math.min(this.length-l,this.length-n),a=0;ar.length&&(r=this.text.slice(l,l+d))}return r},e.prototype.toString=function(){return this.array.join(",")},e.prototype.toJSON=function(){return this.array},e.prototype.inspect=function(){for(var r=new Array(this.length),d=0;d{var i=Gn();function y(r){this.size=0,this.items=new Map,this.inverse=r}function T(){this.size=0,this.items=new Map,this.inverse=new y(this)}function E(){this.size=0,this.items.clear(),this.inverse.items.clear()}T.prototype.clear=E,y.prototype.clear=E;function s(r,d){if(this.items.has(r)){var h=this.items.get(r);if(h===d)return this;this.inverse.items.delete(h)}if(this.inverse.items.has(d)){var a=this.inverse.items.get(d);if(a===r)return this;this.items.delete(a)}return this.items.set(r,d),this.inverse.items.set(d,r),this.size=this.items.size,this.inverse.size=this.inverse.items.size,this}T.prototype.set=s,y.prototype.set=s;function x(r){if(this.items.has(r)){var d=this.items.get(r);return this.items.delete(r),this.inverse.items.delete(d),this.size=this.items.size,this.inverse.size=this.inverse.items.size,!0}return!1}T.prototype.delete=x,y.prototype.delete=x;var e=["has","get","forEach","keys","values","entries"];e.forEach(function(r){T.prototype[r]=y.prototype[r]=function(){return Map.prototype[r].apply(this.items,arguments)}}),typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.entries,y.prototype[Symbol.iterator]=y.prototype.entries),T.prototype.inspect=function(){var r={left:this.items,right:this.inverse.items};return Object.defineProperty(r,"constructor",{value:T,enumerable:!1}),r},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),y.prototype.inspect=function(){var r={left:this.inverse.items,right:this.items};return Object.defineProperty(r,"constructor",{value:y,enumerable:!1}),r},typeof Symbol<"u"&&(y.prototype[Symbol.for("nodejs.util.inspect.custom")]=y.prototype.inspect),T.from=function(r){var d=new T;return i(r,function(h,a){d.set(a,h)}),d},t.exports=T}),Hr=ai((g,t)=>{function i(y){if(typeof y!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=y}typeof Symbol<"u"&&(i.prototype[Symbol.iterator]=function(){return this}),i.of=function(){var y=arguments,T=y.length,E=0;return new i(function(){return E>=T?{done:!0}:{done:!1,value:y[E++]}})},i.empty=function(){var y=new i(function(){return{done:!0}});return y},i.fromSequence=function(y){var T=0,E=y.length;return new i(function(){return T>=E?{done:!0}:{done:!1,value:y[T++]}})},i.is=function(y){return y instanceof i?!0:typeof y=="object"&&y!==null&&typeof y.next=="function"},t.exports=i}),KM=ai(g=>{function t(s){return s|=s>>1,s|=s>>2,s|=s>>4,s|=s>>8,s|=s>>16,s&~(s>>1)}g.msb32=t;function i(s){return s|=s>>1,s|=s>>2,s|=s>>4,s&~(s>>1)}g.msb8=i,g.test=function(s,x){return s>>x&1},g.criticalBit8=function(s,x){return i(s^x)},g.criticalBit8Mask=function(s,x){return~i(s^x)>>>0&255},g.testCriticalBit8=function(s,x){return 1+(s|x)>>8},g.criticalBit32Mask=function(s,x){return~t(s^x)>>>0&4294967295},g.popcount=function(s){return s-=s>>1&1431655765,s=(s&858993459)+(s>>2&858993459),s=s+(s>>4)&252645135,s+=s>>8,s+=s>>16,s&127};var y=new Uint8Array(Math.pow(2,8));for(T=0,E=y.length;T>8&255]+y[s>>16&255]+y[s>>24&255]}}),WF=ai((g,t)=>{var i=Hr(),y=KM();function T(E){this.length=E,this.clear()}T.prototype.clear=function(){this.size=0,this.array=new Uint32Array(Math.ceil(this.length/32))},T.prototype.set=function(E,s){var x=E>>5,e=E&31,r=this.array[x],d;return s===0||s===!1?d=this.array[x]&=~(1<>>0,d>r?this.size++:d>5,x=E&31,e=this.array[s],r;return r=this.array[s]&=~(1<>5,x=E&31,e=this.array[s],r=this.array[s]^=1<>>0,r>e?this.size++:r>5,x=E&31;return this.array[s]>>x&1},T.prototype.test=function(E){return!!this.get(E)},T.prototype.rank=function(E){if(this.size===0)return 0;for(var s=E>>5,x=E&31,e=0,r=0;r=this.length)return-1;for(var s,x=32,e=0,r=0,d=0,h=this.array.length;d>a&1,r===E)return e}},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var x=this.length,e,r,d=32,h=0,a=this.array.length;h>l&1,E.call(s,r,h*32+l)}},T.prototype.values=function(){var E=this.length,s=!1,x,e,r=this.array,d=r.length,h=0,a=-1,l=32;return new i(function n(){if(!s){if(h>=d)return{done:!0};h===d-1&&(l=E%32||32),x=r[h++],s=!0,a=-1}return a++,a>=l?(s=!1,n()):(e=x>>a&1,{value:e})})},T.prototype.entries=function(){var E=this.length,s=!1,x,e,r=this.array,d,h=r.length,a=0,l=-1,n=32;return new i(function u(){if(!s){if(a>=h)return{done:!0};a===h-1&&(n=E%32||32),x=r[a++],s=!0,l=-1}return l++,d=~-a*32+l,l>=n?(s=!1,u()):(e=x>>l&1,{value:[d,e]})})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=new Uint8Array(this.length);return this.forEach(function(s,x){E[x]=s}),Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.prototype.toJSON=function(){return Array.from(this.array)},t.exports=T}),XF=ai((g,t)=>{var i=Hr(),y=KM(),T=function(x){return Math.max(1,Math.ceil(x*1.5))};function E(x){return new Uint32Array(Math.ceil(x/32))}function s(x){var e=x||0,r=T;typeof x=="object"&&(e=x.initialLength||x.initialCapacity||0,r=x.policy||r),this.size=0,this.length=e,this.capacity=Math.ceil(this.length/32)*32,this.policy=r,this.array=E(this.capacity)}s.prototype.set=function(x,e){if(this.length>5,d=x&31,h=this.array[r],a;return e===0||e===!1?a=this.array[r]&=~(1<>>0,a>h?this.size++:a>5,r=x&31,d=this.array[e],h;return h=this.array[e]&=~(1<>5,r=x&31,d=this.array[e],h=this.array[e]^=1<>>0,h>d?this.size++:hthis.array.length?(this.array=new Uint32Array(d),this.array.set(r,0)):this.array=r.slice(0,d),this.capacity=x,this)},s.prototype.grow=function(x){var e;if(typeof x=="number"){if(this.capacity>=x)return this;for(e=this.capacity;e>5,d=e&31;return this.array[r]|=1<>5,r=x&31;return this.array[e]>>r&1}},s.prototype.get=function(x){if(!(this.length>5,r=x&31;return this.array[e]>>r&1}},s.prototype.test=function(x){return this.length>5,r=x&31,d=0,h=0;h=this.length)return-1;for(var e,r=32,d=0,h=0,a=0,l=this.array.length;a>n&1,h===x)return d}},s.prototype.forEach=function(x,e){e=arguments.length>1?e:this;for(var r=this.length,d,h,a=32,l=0,n=this.array.length;l>u&1,x.call(e,h,l*32+u)}},s.prototype.values=function(){var x=this.length,e=!1,r,d,h=this.array,a=h.length,l=0,n=-1,u=32;return new i(function f(){if(!e){if(l>=a)return{done:!0};l===a-1&&(u=x%32||32),r=h[l++],e=!0,n=-1}return n++,n>=u?(e=!1,f()):(d=r>>n&1,{value:d})})},s.prototype.entries=function(){var x=this.length,e=!1,r,d,h=this.array,a,l=h.length,n=0,u=-1,f=32;return new i(function o(){if(!e){if(n>=l)return{done:!0};n===l-1&&(f=x%32||32),r=h[n++],e=!0,u=-1}return u++,a=~-n*32+u,u>=f?(e=!1,o()):(d=r>>u&1,{value:[a,d]})})},typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=s.prototype.values),s.prototype.inspect=function(){var x=new Uint8Array(this.length);return this.forEach(function(e,r){x[r]=e}),Object.defineProperty(x,"constructor",{value:s,enumerable:!1}),x},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect),s.prototype.toJSON=function(){return Array.from(this.array.slice(0,(this.length>>5)+1))},t.exports=s}),YF=ai((g,t)=>{function i(E,s){return(E&65535)*s+(((E>>>16)*s&65535)<<16)&4294967295}function y(E,s){return(E&65535)+(s>>>16)+(((E>>>16)+s&65535)<<16)&4294967295}function T(E,s){return E<>>32-s}t.exports=function(E,s){var x=3432918353,e=461845907,r=15,d=13,h=5,a=1801774676,l=E,n,u,f;for(u=0,f=s.length-4;u<=f;u+=4)n=s[u]|s[u+1]<<8|s[u+2]<<16|s[u+3]<<24,n=i(n,x),n=T(n,r),n=i(n,e),l^=n,l=T(l,d),l=i(l,h),l=y(l,a);switch(n=0,s.length&3){case 3:n^=s[u+2]<<16;case 2:n^=s[u+1]<<8;case 1:n^=s[u],n=i(n,x),n=T(n,r),n=i(n,e),l^=n}return l^=s.length,l^=l>>>16,l=i(l,2246822507),l^=l>>>13,l=i(l,3266489909),l^=l>>>16,l>>>0}}),kF=ai((g,t)=>{var i=YF(),y=Gn(),T=Math.LN2*Math.LN2,E={errorRate:.005};function s(r){var d=new Uint16Array(r.length),h,a;for(h=0,a=r.length;h>3]|=n}return this},e.prototype.test=function(r){for(var d=s(r),h=0,a=this.hashFunctions;h>3]&1<<(7&l)))return!1}return!0},e.prototype.toJSON=function(){return this.data},e.from=function(r,d){if(!d&&(d=r.length||r.size,typeof d!="number"))throw new Error("BloomFilter.from: could not infer the filter's capacity. Try passing it as second argument.");var h=new e(d);return y(r,function(a){h.add(a)}),h},t.exports=e}),jF=ai((g,t)=>{var i=Gn();function y(T){if(typeof T!="function")throw new Error("mnemonist/BKTree.constructor: given `distance` should be a function.");this.distance=T,this.clear()}y.prototype.add=function(T){if(!this.root)return this.root={item:T,children:{}},this.size++,this;for(var E=this.root,s;s=this.distance(T,E.item),!!E.children[s];)E=E.children[s];return E.children[s]={item:T,children:{}},this.size++,this},y.prototype.search=function(T,E){if(!this.root)return[];for(var s=[],x=[this.root],e,r,d,h,a;x.length;)for(e=x.pop(),d=this.distance(E,e.item),d<=T&&s.push({item:e.item,distance:d}),h=d-T,a=d+T+1;h{var i=aa(),y=Hr();function T(E,s){if(arguments.length<2)throw new Error("mnemonist/fixed-deque: expecting an Array class and a capacity.");if(typeof s!="number"||s<=0)throw new Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=E,this.capacity=s,this.items=new E(this.capacity),this.clear()}T.prototype.clear=function(){this.start=0,this.size=0},T.prototype.push=function(E){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.push: deque capacity ("+this.capacity+") exceeded!");var s=this.start+this.size;return s>=this.capacity&&(s-=this.capacity),this.items[s]=E,++this.size},T.prototype.unshift=function(E){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.unshift: deque capacity ("+this.capacity+") exceeded!");var s=this.start-1;return this.start===0&&(s=this.capacity-1),this.items[s]=E,this.start=s,++this.size},T.prototype.pop=function(){if(this.size!==0){this.size--;var E=this.start+this.size;return E>=this.capacity&&(E-=this.capacity),this.items[E]}},T.prototype.shift=function(){if(this.size!==0){var E=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[E]}},T.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},T.prototype.peekLast=function(){if(this.size!==0){var E=this.start+this.size-1;return E>=this.capacity&&(E-=this.capacity),this.items[E]}},T.prototype.get=function(E){if(!(this.size===0||E>=this.capacity))return E=this.start+E,E>=this.capacity&&(E-=this.capacity),this.items[E]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var x=this.capacity,e=this.size,r=this.start,d=0;d=x)return{done:!0};var d=E[e];return e++,r++,e===s&&(e=0),{value:d,done:!1}})},T.prototype.entries=function(){var E=this.items,s=this.capacity,x=this.size,e=this.start,r=0;return new y(function(){if(r>=x)return{done:!0};var d=E[e];return e++,e===s&&(e=0),{value:[r++,d],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=this.toArray();return E.type=this.ArrayClass.name,E.capacity=this.capacity,Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E,s,x){if(arguments.length<3&&(x=i.guessLength(E),typeof x!="number"))throw new Error("mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.");var e=new T(s,x);if(i.isArrayLike(E)){var r,d;for(r=0,d=E.length;r{var i=aa(),y=$M();function T(s,x){if(arguments.length<2)throw new Error("mnemonist/circular-buffer: expecting an Array class and a capacity.");if(typeof x!="number"||x<=0)throw new Error("mnemonist/circular-buffer: `capacity` should be a positive number.");this.ArrayClass=s,this.capacity=x,this.items=new s(this.capacity),this.clear()}function E(s){T.prototype[s]=y.prototype[s]}Object.keys(y.prototype).forEach(E),typeof Symbol<"u"&&Object.getOwnPropertySymbols(y.prototype).forEach(E),T.prototype.push=function(s){var x=this.start+this.size;return x>=this.capacity&&(x-=this.capacity),this.items[x]=s,this.size===this.capacity?(x++,x>=this.capacity?this.start=0:this.start=x,this.size):++this.size},T.prototype.unshift=function(s){var x=this.start-1;return this.start===0&&(x=this.capacity-1),this.items[x]=s,this.size===this.capacity?(this.start=x,this.size):(this.start=x,++this.size)},T.from=function(s,x,e){if(arguments.length<3&&(e=i.guessLength(s),typeof e!="number"))throw new Error("mnemonist/circular-buffer.from: could not guess iterable length. Please provide desired capacity as last argument.");var r=new T(x,e);if(i.isArrayLike(s)){var d,h;for(d=0,h=s.length;d{function i(y){if(typeof y!="function")throw new Error("mnemonist/DefaultMap.constructor: expecting a function.");this.items=new Map,this.factory=y,this.size=0}i.prototype.clear=function(){this.items.clear(),this.size=0},i.prototype.get=function(y){var T=this.items.get(y);return typeof T>"u"&&(T=this.factory(y,this.size),this.items.set(y,T),this.size++),T},i.prototype.peek=function(y){return this.items.get(y)},i.prototype.set=function(y,T){return this.items.set(y,T),this.size=this.items.size,this},i.prototype.has=function(y){return this.items.has(y)},i.prototype.delete=function(y){var T=this.items.delete(y);return this.size=this.items.size,T},i.prototype.forEach=function(y,T){T=arguments.length>1?T:this,this.items.forEach(y,T)},i.prototype.entries=function(){return this.items.entries()},i.prototype.keys=function(){return this.items.keys()},i.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(i.prototype[Symbol.iterator]=i.prototype.entries),i.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(i.prototype[Symbol.for("nodejs.util.inspect.custom")]=i.prototype.inspect),i.autoIncrement=function(){var y=0;return function(){return y++}},t.exports=i}),ZF=ai((g,t)=>{function i(y){if(typeof y!="function")throw new Error("mnemonist/DefaultWeakMap.constructor: expecting a function.");this.items=new WeakMap,this.factory=y}i.prototype.clear=function(){this.items=new WeakMap},i.prototype.get=function(y){var T=this.items.get(y);return typeof T>"u"&&(T=this.factory(y),this.items.set(y,T)),T},i.prototype.peek=function(y){return this.items.get(y)},i.prototype.set=function(y,T){return this.items.set(y,T),this},i.prototype.has=function(y){return this.items.has(y)},i.prototype.delete=function(y){return this.items.delete(y)},i.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(i.prototype[Symbol.for("nodejs.util.inspect.custom")]=i.prototype.inspect),t.exports=i}),JF=ai((g,t)=>{var i=Ns();function y(T){var E=i.getPointerArray(T),s=i.getPointerArray(Math.log2(T));this.size=T,this.dimension=T,this.parents=new E(T),this.ranks=new s(T);for(var x=0;xr?this.parents[x]=s:(this.parents[x]=s,this.ranks[s]++),this},y.prototype.connected=function(T,E){var s=this.find(T);return s===this.find(E)},y.prototype.mapping=function(){for(var T=i.getPointerArray(this.dimension),E={},s=new T(this.size),x=0,e,r=0,d=this.parents.length;r"u"?(s[r]=x,E[e]=x++):s[r]=E[e];return s},y.prototype.compile=function(){for(var T={},E=new Array(this.dimension),s=0,x,e=0,r=this.parents.length;e"u"?(E[s]=[e],T[x]=s++):E[T[x]].push(e);return E},y.prototype.inspect=function(){var T=this.compile();return Object.defineProperty(T,"constructor",{value:y,enumerable:!1}),T},typeof Symbol<"u"&&(y.prototype[Symbol.for("nodejs.util.inspect.custom")]=y.prototype.inspect),t.exports=y}),Zx=ai((g,t)=>{var i=ig(),y=$x(),T=i.DEFAULT_COMPARATOR,E=i.reverseComparator;function s(r,d,h,a){for(var l=h,n=a,u=d[a],f=2*a+1,o;f=0&&(f=o),d[a]=d[f],a=f,f=2*a+1;d[a]=u,y.siftDown(r,d,n,a)}function x(r,d,h,a){for(var l=a,n=l,u=new r(a),f,o;n>0;)f=h[--n],n!==0&&(o=h[0],h[0]=f,s(d,h,--a,0),f=o),u[n]=f;return u}function e(r,d,h){if(arguments.length===2&&(h=d,d=null),this.ArrayClass=r,this.capacity=h,this.items=new r(h),this.clear(),this.comparator=d||T,typeof h!="number"&&h<=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=E(this.comparator)}e.prototype.clear=function(){this.size=0},e.prototype.push=function(r){return this.size0&&y.replace(this.comparator,this.items,r),this.size},e.prototype.peek=function(){return this.items[0]},e.prototype.consume=function(){var r=x(this.ArrayClass,this.comparator,this.items,this.size);return this.size=0,r},e.prototype.toArray=function(){return x(this.ArrayClass,this.comparator,this.items.slice(0,this.size),this.size)},e.prototype.inspect=function(){var r=this.toArray();return Object.defineProperty(r,"constructor",{value:e,enumerable:!1}),r},typeof Symbol<"u"&&(e.prototype[Symbol.for("nodejs.util.inspect.custom")]=e.prototype.inspect),t.exports=e}),QF=ai((g,t)=>{var i=Gn(),y=function(E){return E};function T(E){if(this.items=new Map,this.clear(),Array.isArray(E)?(this.writeHashFunction=E[0],this.readHashFunction=E[1]):(this.writeHashFunction=E,this.readHashFunction=E),this.writeHashFunction||(this.writeHashFunction=y),this.readHashFunction||(this.readHashFunction=y),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.")}T.prototype.clear=function(){this.items.clear(),this.size=0},T.prototype.add=function(E){var s=this.writeHashFunction(E);return this.items.set(s,E),this.size=this.items.size,this},T.prototype.set=function(E,s){return E=this.writeHashFunction(E),this.items.set(E,s),this.size=this.items.size,this},T.prototype.get=function(E){return E=this.readHashFunction(E),this.items.get(E)},T.prototype.has=function(E){return E=this.readHashFunction(E),this.items.has(E)},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this,this.items.forEach(function(x){E.call(s,x,x)})},T.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=Array.from(this.items.values());return Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E,s,x){var e=new T(s);return i(E,function(r,d){x?e.set(d,r):e.add(r)}),e},t.exports=T}),ZM=ai((g,t)=>{var i=Hr(),y=Gn();function T(E){this.Container=E||Array,this.items=new Map,this.clear(),Object.defineProperty(this.items,"constructor",{value:T,enumerable:!1})}T.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},T.prototype.set=function(E,s){var x=this.items.get(E),e;return x||(this.dimension++,x=new this.Container,this.items.set(E,x)),this.Container===Set?(e=x.size,x.add(s),e"u"?0:this.Container===Set?s.size:s.length},T.prototype.count=T.prototype.multiplicity,T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;var x;function e(r){E.call(s,r,x)}this.items.forEach(function(r,d){x=d,r.forEach(e)})},T.prototype.forEachAssociation=function(E,s){s=arguments.length>1?s:this,this.items.forEach(E,s)},T.prototype.keys=function(){return this.items.keys()},T.prototype.values=function(){var E=this.items.values(),s=!1,x,e,r,d;return this.Container===Set?new i(function h(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,x=e.value.values()}return e=x.next(),e.done?(s=!1,h()):{done:!1,value:e.value}}):new i(function h(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,x=e.value,r=0,d=x.length}return r>=d?(s=!1,h()):{done:!1,value:x[r++]}})},T.prototype.entries=function(){var E=this.items.entries(),s=!1,x,e,r,d,h;return this.Container===Set?new i(function a(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,r=e.value[0],x=e.value[1].values()}return e=x.next(),e.done?(s=!1,a()):{done:!1,value:[r,e.value]}}):new i(function a(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,r=e.value[0],x=e.value[1],d=0,h=x.length}return d>=h?(s=!1,a()):{done:!1,value:[r,x[d++]]}})},T.prototype.containers=function(){return this.items.values()},T.prototype.associations=function(){return this.items.entries()},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.entries),T.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.prototype.toJSON=function(){return this.items},T.from=function(E,s){var x=new T(s);return y(E,function(e,r){x.set(r,e)}),x},t.exports=T}),_F=ai((g,t)=>{var i=ZM(),y=Gn(),T=function(s){return s};function E(s,x){if(this.items=new i(x),this.clear(),Array.isArray(s)?(this.writeHashFunction=s[0],this.readHashFunction=s[1]):(this.writeHashFunction=s,this.readHashFunction=s),this.writeHashFunction||(this.writeHashFunction=T),this.readHashFunction||(this.readHashFunction=T),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.")}E.prototype.clear=function(){this.items.clear(),this.size=0,this.dimension=0},E.prototype.add=function(s){var x=this.writeHashFunction(s);return this.items.set(x,s),this.size=this.items.size,this.dimension=this.items.dimension,this},E.prototype.set=function(s,x){return s=this.writeHashFunction(s),this.items.set(s,x),this.size=this.items.size,this.dimension=this.items.dimension,this},E.prototype.get=function(s){return s=this.readHashFunction(s),this.items.get(s)},E.prototype.has=function(s){return s=this.readHashFunction(s),this.items.has(s)},E.prototype.forEach=function(s,x){x=arguments.length>1?x:this,this.items.forEach(function(e){s.call(x,e,e)})},E.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.values),E.prototype.inspect=function(){var s=Array.from(this);return Object.defineProperty(s,"constructor",{value:E,enumerable:!1}),s},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.from=function(s,x,e,r){arguments.length===3&&typeof e=="boolean"&&(r=e,e=Array);var d=new E(x,e);return y(s,function(h,a){r?d.set(a,h):d.add(h)}),d},t.exports=E}),qF=ai((g,t)=>{var i=1024;function y(E){return(E&E-1)===0}function T(E,s){if(arguments.length<1)throw new Error("mnemonist/hashed-array-tree: expecting at least a byte array constructor.");var x=s||0,e=i,r=0;if(typeof s=="object"&&(x=s.initialCapacity||0,r=s.initialLength||0,e=s.blockSize||i),!e||!y(e))throw new Error("mnemonist/hashed-array-tree: block size should be a power of two.");var d=Math.max(r,x),h=Math.ceil(d/e);this.ArrayClass=E,this.length=r,this.capacity=h*e,this.blockSize=e,this.offsetMask=e-1,this.blockMask=Math.log2(e),this.blocks=new Array(h);for(var a=0;a>this.blockMask,e=E&this.offsetMask;return this.blocks[x][e]=s,this},T.prototype.get=function(E){if(!(this.length>this.blockMask,x=E&this.offsetMask;return this.blocks[s][x]}},T.prototype.grow=function(E){if(typeof E!="number"&&(E=this.capacity+this.blockSize),this.capacity>=E)return this;for(;this.capacity>this.blockMask,e=s&this.offsetMask;return this.blocks[x][e]=E,++this.length},T.prototype.pop=function(){if(this.length!==0){var E=this.blocks[this.blocks.length-1],s=--this.length&this.offsetMask;return E[s]}},T.prototype.inspect=function(){for(var E=new this.ArrayClass(this.length),s,x=0,e=this.length;x>this.blockMask,E[x]=this.blocks[s][x&this.offsetMask];return E.type=this.ArrayClass.name,E.items=this.length,E.capacity=this.capacity,E.blockSize=this.blockSize,Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),t.exports=T}),JM=ai((g,t)=>{var i=Hr(),y=aa();function T(E,s){if(arguments.length<2)throw new Error("mnemonist/fixed-stack: expecting an Array class and a capacity.");if(typeof s!="number"||s<=0)throw new Error("mnemonist/fixed-stack: `capacity` should be a positive number.");this.capacity=s,this.ArrayClass=E,this.items=new this.ArrayClass(this.capacity),this.clear()}T.prototype.clear=function(){this.size=0},T.prototype.push=function(E){if(this.size===this.capacity)throw new Error("mnemonist/fixed-stack.push: stack capacity ("+this.capacity+") exceeded!");return this.items[this.size++]=E,this.size},T.prototype.pop=function(){if(this.size!==0)return this.items[--this.size]},T.prototype.peek=function(){return this.items[this.size-1]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var x=0,e=this.items.length;x=s)return{done:!0};var e=E[s-x-1];return x++,{value:e,done:!1}})},T.prototype.entries=function(){var E=this.items,s=this.size,x=0;return new i(function(){if(x>=s)return{done:!0};var e=E[s-x-1];return{value:[x++,e],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.toString=function(){return this.toArray().join(",")},T.prototype.toJSON=function(){return this.toArray()},T.prototype.inspect=function(){var E=this.toArray();return E.type=this.ArrayClass.name,E.capacity=this.capacity,Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E,s,x){if(arguments.length<3&&(x=y.guessLength(E),typeof x!="number"))throw new Error("mnemonist/fixed-stack.from: could not guess iterable length. Please provide desired capacity as last argument.");var e=new T(s,x);if(y.isArrayLike(E)){var r,d;for(r=0,d=E.length;r{var i=aa(),y=Ns(),T=JM();function E(x,e,r,d,h,a,l,n){var u=l+(n-l)/2|0,f=~-u,o=-~u,c=r[u];d[a]=c+1;var p=e?e(x[c]):x[c][1],v=a*2+1,m=a*2+2,S=-1/0,M=-1/0;l<=f&&(S=E(x,e,r,d,h,v,l,f)),o<=n&&(M=E(x,e,r,d,h,m,o,n));var w=Math.max(p,S,M),C=c;return w===S?C=h[d[v]-1]:w===M&&(C=h[d[m]-1]),h[c]=C,w}function s(x,e){this.size=x.length,this.intervals=x;var r=null,d=null;Array.isArray(e)&&(r=e[0],d=e[1]);var h=x.length,a=y.getPointerArray(h+1),l=new a(h),n;for(n=1;nv?1:0});var u=Math.ceil(Math.log2(h+1)),f=Math.pow(2,u)-1,o=new a(f),c=new a(h);E(x,d,l,o,c,0,0,h-1),l=null,this.height=u,this.tree=o,this.augmentations=c,this.startGetter=r,this.endGetter=d,this.stack=new T(a,this.height)}s.prototype.intervalsContainingPoint=function(x){var e=[],r=this.stack;r.clear(),r.push(0);for(var d=this.tree.length,h,a,l,n,u,f,o,c,p;r.size;)h=r.pop(),a=this.tree[h]-1,l=this.intervals[a],n=this.intervals[this.augmentations[a]],o=this.endGetter?this.endGetter(n):n[1],!(x>o)&&(c=h*2+1,c=u&&x<=f&&e.push(l),!(xp)&&(v=l*2+1,v=o&&e<=c&&d.push(u),!(r{g.search=function(t,i,y,T){var E=0;y=typeof y<"u"?y:0,T=typeof T<"u"?T:t.length,T--;for(var s;y<=T;)if(E=y+T>>>1,s=t[E],s>i)T=~-E;else if(s>>1,x=t(i[T],y),x>0)s=~-T;else if(x<0)E=-~T;else return T;return-1},g.lowerBound=function(t,i,y,T){var E=0;for(y=typeof y<"u"?y:0,T=typeof T<"u"?T:t.length;y>>1,i<=t[E]?T=E:y=-~E;return y},g.lowerBoundWithComparator=function(t,i,y){for(var T=0,E=0,s=i.length;E>>1,t(y,i[T])<=0?s=T:E=-~T;return E},g.lowerBoundIndices=function(t,i,y,T,E){var s=0;for(T=typeof T<"u"?T:0,E=typeof E<"u"?E:t.length;T>>1,y<=t[i[s]]?E=s:T=-~s;return T},g.upperBound=function(t,i,y,T){var E=0;for(y=typeof y<"u"?y:0,T=typeof T<"u"?T:t.length;y>>1,i>=t[E]?y=-~E:T=E;return y},g.upperBoundWithComparator=function(t,i,y){for(var T=0,E=0,s=i.length;E>>1,t(y,i[T])>=0?E=-~T:s=T;return E}}),eO=ai(g=>{var t=Ns(),i=aa().isArrayLike,y=QM(),T=Kx();function E(r,d){if(r.length===0)return d.slice();if(d.length===0)return r.slice();var h;r[0]>d[0]&&(h=r,r=d,d=h);var a=r[r.length-1],l=d[0];if(a<=l)return t.isTypedArray(r)?t.concat(r,d):r.concat(d);var n=new r.constructor(r.length+d.length),u,f,o;for(u=0,f=r.length;ud[0]&&(h=r,r=d,d=h);var a=r[r.length-1],l=d[0];if(ad[0]&&(h=r,r=d,d=h);var a=r[r.length-1],l=d[0];if(av?o=y.lowerBound(d,p,o+1):(n.push(p),u++,o++);return n};function x(r){var d=0,h=-1/0,a,l,n,u=[];for(l=0,n=r.length;lh&&(h=a));if(u.length===0)return new r[0].constructor(0);if(u.length===1)return u[0].slice();if(u.length===2)return E(u[0],u[1]);r=u;var f=new r[0].constructor(d),o=t.getPointerArray(h),c=new o(r.length),p=new T(function(S,M){return S=r[S][c[S]],M=r[M][c[M]],SM?1:0});for(l=0;ld&&(d=h));if(n.length===0)return new r[0].constructor(0);if(n.length===1)return n[0].slice();if(n.length===2)return s(n[0],n[1]);r=n;var u=new r[0].constructor,f=t.getPointerArray(d),o=new f(r.length),c=new T(function(m,S){return m=r[m][o[m]],S=r[S][o[S]],mS?1:0});for(a=0;ad&&(d=a),lh)return[];if(d===h)return[d];var o,c,p=r[0],v,m,S,M,w,C,A=d;for(u=1;uC?m=y.lowerBound(c,w,m+1):(p.push(w),v++,m++);if(p.length===0)return p;A=p[0]}return p},g.merge=function(){if(arguments.length===2){if(i(arguments[0]))return E(arguments[0],arguments[1])}else if(i(arguments[0]))return x(arguments);return null},g.unionUnique=function(){if(arguments.length===2){if(i(arguments[0]))return s(arguments[0],arguments[1])}else if(i(arguments[0]))return e(arguments);return null},g.intersectionUnique=function(){if(arguments.length===2){if(i(arguments[0]))return g.intersectionUniqueArrays(arguments[0],arguments[1])}else if(i(arguments[0]))return g.kWayIntersectionUniqueArrays(arguments);return null}}),iO=ai((g,t)=>{var i=Hr(),y=Gn(),T=eO();function E(x){return x}function s(x){if(this.clear(),Array.isArray(x)?(this.documentTokenizer=x[0],this.queryTokenizer=x[1]):(this.documentTokenizer=x,this.queryTokenizer=x),this.documentTokenizer||(this.documentTokenizer=E),this.queryTokenizer||(this.queryTokenizer=E),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.")}s.prototype.clear=function(){this.items=[],this.mapping=new Map,this.size=0,this.dimension=0},s.prototype.add=function(x){this.size++;var e=this.items.length;this.items.push(x);var r=this.documentTokenizer(x);if(!Array.isArray(r))throw new Error("mnemonist/InvertedIndex.add: tokenizer function should return an array of tokens.");for(var d=new Set,h,a,l=0,n=r.length;l"u"||r.length===0)return[];if(e.length>1)for(h=1,a=e.length;h"u"||d.length===0)return[];r=T.intersectionUniqueArrays(r,d)}var l=new Array(r.length);for(h=0,a=l.length;h1?e:this;for(var r=0,d=this.documents.length;r=e)return{done:!0};var d=x[r++];return{value:d,done:!1}})},s.prototype.tokens=function(){return this.mapping.keys()},typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=s.prototype.documents),s.prototype.inspect=function(){var x=this.items.slice();return Object.defineProperty(x,"constructor",{value:s,enumerable:!1}),x},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect),s.from=function(x,e){var r=new s(e);return y(x,function(d){r.add(d)}),r},t.exports=s}),_M=ai(g=>{var t=new Float64Array(64),i=new Float64Array(64);function y(E,s,x){var e,r,d,h,a;for(t[0]=s,i[0]=x,r=0;r>=0;)if(d=t[r],h=i[r]-1,d=e&&di[r-1]-t[r-1]&&(a=t[r],t[r]=t[r-1],t[r-1]=a,a=i[r],i[r]=i[r-1],i[r-1]=a)}else r--;return E}g.inplaceQuickSort=y;function T(E,s,x,e){var r,d,h,a,l,n;for(t[0]=x,i[0]=e,d=0;d>=0;)if(h=t[d],a=i[d]-1,h=r&&hi[d-1]-t[d-1]&&(n=t[d],t[d]=t[d-1],t[d-1]=n,n=i[d],i[d]=i[d-1],i[d-1]=n)}else d--;return s}g.inplaceQuickSortIndices=T}),nO=ai((g,t)=>{var i=aa(),y=Ns(),T=ig().createTupleComparator,E=Zx(),s=_M().inplaceQuickSortIndices;function x(l,n,u,f){var o,c=0,p;for(o=0;o>>1),P=u[A],p[D]=P,w>-1&&(C===0?v[w]=D+1:m[w]=D+1),I=(I+1)%l,A!==b&&A!==O-1&&S.push([I,A+1,O,D,1]),A!==b&&S.push([I,b,A,D,0]),D++;return{axes:n,labels:f,pivots:p,lefts:v,rights:m}}function d(l,n){this.dimensions=l,this.visited=0,this.axes=n.axes,this.labels=n.labels,this.pivots=n.pivots,this.lefts=n.lefts,this.rights=n.rights,this.size=this.labels.length}d.prototype.nearestNeighbor=function(l){var n=1/0,u=null,f=this.dimensions,o=this.axes,c=this.pivots,p=this.lefts,v=this.rights,m=0;function S(M,w){m++;var C=p[w],A=v[w],P=c[w],b=x(f,o,P,l);if(!(b0?C!==0&&S(M,C-1):A!==0&&S(M,A-1),O*O0?A!==0&&S(M,A-1):C!==0&&S(M,C-1))}}return S(0,0),this.visited=m,this.labels[u]};var h=T(3),a=T(2);d.prototype.kNearestNeighbors=function(l,n){if(l<=0)throw new Error("mnemonist/kd-tree.kNearestNeighbors: k should be a positive number.");if(l=Math.min(l,this.size),l===1)return[this.nearestNeighbor(n)];var u=new E(Array,h,l),f=this.dimensions,o=this.axes,c=this.pivots,p=this.lefts,v=this.rights,m=0;function S(C,A){var P=p[A],b=v[A],O=c[A],I=x(f,o,O,n);u.push([I,m++,O]);var D=n[C],B=o[C][O],G=D-B;C=(C+1)%f,D{var i=Hr(),y=Gn();function T(){this.clear()}T.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},T.prototype.first=function(){return this.head?this.head.item:void 0},T.prototype.peek=T.prototype.first,T.prototype.last=function(){return this.tail?this.tail.item:void 0},T.prototype.push=function(E){var s={item:E,next:null};return this.head?(this.tail.next=s,this.tail=s):(this.head=s,this.tail=s),this.size++,this.size},T.prototype.unshift=function(E){var s={item:E,next:null};return this.head?(this.head.next||(this.tail=this.head),s.next=this.head,this.head=s):(this.head=s,this.tail=s),this.size++,this.size},T.prototype.shift=function(){if(this.size){var E=this.head;return this.head=E.next,this.size--,E.item}},T.prototype.forEach=function(E,s){if(this.size){s=arguments.length>1?s:this;for(var x=this.head,e=0;x;)E.call(s,x.item,e,this),x=x.next,e++}},T.prototype.toArray=function(){if(!this.size)return[];for(var E=new Array(this.size),s=0,x=this.size,e=this.head;s{var i=Hr(),y=Gn(),T=Ns(),E=aa();function s(x,e,r){if(arguments.length<2&&(r=x,x=null,e=null),this.capacity=r,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 d=T.getPointerArray(r);this.forward=new d(r),this.backward=new d(r),this.K=typeof x=="function"?new x(r):new Array(r),this.V=typeof e=="function"?new e(r):new Array(r),this.size=0,this.head=0,this.tail=0,this.items={}}s.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},s.prototype.splayOnTop=function(x){var e=this.head;if(this.head===x)return this;var r=this.backward[x],d=this.forward[x];return this.tail===x?this.tail=r:this.backward[d]=r,this.forward[r]=d,this.backward[e]=x,this.head=x,this.forward[x]=e,this},s.prototype.set=function(x,e){var r=this.items[x];if(typeof r<"u"){this.splayOnTop(r),this.V[r]=e;return}this.size1?e:this;for(var r=0,d=this.size,h=this.head,a=this.K,l=this.V,n=this.forward;r=e)return{done:!0};var a=d[r];return x++,x=e)return{done:!0};var a=d[r];return x++,x=e)return{done:!0};var l=d[r],n=h[r];return x++,x{var i=Jx(),y=Gn(),T=Ns(),E=aa();function s(e,r,d){arguments.length<2?i.call(this,e):i.call(this,e,r,d);var h=T.getPointerArray(this.capacity);this.deleted=new h(this.capacity),this.deletedSize=0}for(x in i.prototype)s.prototype[x]=i.prototype[x];var x;typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=i.prototype[Symbol.iterator]),s.prototype.clear=function(){i.prototype.clear.call(this),this.deletedSize=0},s.prototype.set=function(e,r){var d=this.items[e];if(typeof d<"u"){this.splayOnTop(d),this.V[d]=r;return}this.size0?d=this.deleted[--this.deletedSize]:d=this.size,this.size++):(d=this.tail,this.tail=this.backward[d],delete this.items[this.K[d]]),this.items[e]=d,this.K[d]=e,this.V[d]=r,this.forward[d]=this.head,this.backward[this.head]=d,this.head=d},s.prototype.setpop=function(e,r){var d=null,h=null,a=this.items[e];return typeof a<"u"?(this.splayOnTop(a),d=this.V[a],this.V[a]=r,{evicted:!1,key:e,value:d}):(this.size0?a=this.deleted[--this.deletedSize]:a=this.size,this.size++):(a=this.tail,this.tail=this.backward[a],d=this.V[a],h=this.K[a],delete this.items[h]),this.items[e]=a,this.K[a]=e,this.V[a]=r,this.forward[a]=this.head,this.backward[this.head]=a,this.head=a,h?{evicted:!0,key:h,value:d}:null)},s.prototype.delete=function(e){var r=this.items[e];if(typeof r>"u")return!1;if(delete this.items[e],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var d=this.backward[r],h=this.forward[r];return this.head===r&&(this.head=h),this.tail===r&&(this.tail=d),this.forward[d]=h,this.backward[h]=d,this.size--,this.deleted[this.deletedSize++]=r,!0},s.prototype.remove=function(e,r=void 0){var d=this.items[e];if(typeof d>"u")return r;var h=this.V[d];if(delete this.items[e],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,h;var a=this.backward[d],l=this.forward[d];return this.head===d&&(this.head=l),this.tail===d&&(this.tail=a),this.forward[a]=l,this.backward[l]=a,this.size--,this.deleted[this.deletedSize++]=d,h},s.from=function(e,r,d,h){if(arguments.length<2){if(h=E.guessLength(e),typeof h!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(h=r,r=null,d=null);var a=new s(r,d,h);return y(e,function(l,n){a.set(n,l)}),a},t.exports=s}),qM=ai((g,t)=>{var i=Jx(),y=Gn(),T=Ns(),E=aa();function s(x,e,r){if(arguments.length<2&&(r=x,x=null,e=null),this.capacity=r,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 d=T.getPointerArray(r);this.forward=new d(r),this.backward=new d(r),this.K=typeof x=="function"?new x(r):new Array(r),this.V=typeof e=="function"?new e(r):new Array(r),this.size=0,this.head=0,this.tail=0,this.items=new Map}s.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},s.prototype.set=function(x,e){var r=this.items.get(x);if(typeof r<"u"){this.splayOnTop(r),this.V[r]=e;return}this.size{var i=qM(),y=Gn(),T=Ns(),E=aa();function s(e,r,d){arguments.length<2?i.call(this,e):i.call(this,e,r,d);var h=T.getPointerArray(this.capacity);this.deleted=new h(this.capacity),this.deletedSize=0}for(x in i.prototype)s.prototype[x]=i.prototype[x];var x;typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=i.prototype[Symbol.iterator]),s.prototype.clear=function(){i.prototype.clear.call(this),this.deletedSize=0},s.prototype.set=function(e,r){var d=this.items.get(e);if(typeof d<"u"){this.splayOnTop(d),this.V[d]=r;return}this.size0?d=this.deleted[--this.deletedSize]:d=this.size,this.size++):(d=this.tail,this.tail=this.backward[d],this.items.delete(this.K[d])),this.items.set(e,d),this.K[d]=e,this.V[d]=r,this.forward[d]=this.head,this.backward[this.head]=d,this.head=d},s.prototype.setpop=function(e,r){var d=null,h=null,a=this.items.get(e);return typeof a<"u"?(this.splayOnTop(a),d=this.V[a],this.V[a]=r,{evicted:!1,key:e,value:d}):(this.size0?a=this.deleted[--this.deletedSize]:a=this.size,this.size++):(a=this.tail,this.tail=this.backward[a],d=this.V[a],h=this.K[a],this.items.delete(h)),this.items.set(e,a),this.K[a]=e,this.V[a]=r,this.forward[a]=this.head,this.backward[this.head]=a,this.head=a,h?{evicted:!0,key:h,value:d}:null)},s.prototype.delete=function(e){var r=this.items.get(e);if(typeof r>"u")return!1;if(this.items.delete(e),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var d=this.backward[r],h=this.forward[r];return this.head===r&&(this.head=h),this.tail===r&&(this.tail=d),this.forward[d]=h,this.backward[h]=d,this.size--,this.deleted[this.deletedSize++]=r,!0},s.prototype.remove=function(e,r=void 0){var d=this.items.get(e);if(typeof d>"u")return r;var h=this.V[d];if(this.items.delete(e),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,h;var a=this.backward[d],l=this.forward[d];return this.head===d&&(this.head=l),this.tail===d&&(this.tail=a),this.forward[a]=l,this.backward[l]=a,this.size--,this.deleted[this.deletedSize++]=d,h},s.from=function(e,r,d,h){if(arguments.length<2){if(h=E.guessLength(e),typeof h!="number")throw new Error("mnemonist/lru-map.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(h=r,r=null,d=null);var a=new s(r,d,h);return y(e,function(l,n){a.set(n,l)}),a},t.exports=s}),oO=ai((g,t)=>{var i=Hr(),y=Gn(),T=Zx(),E=function(x,e){return x[1]>e[1]?-1:x[1]"u"?0:e},s.prototype.get=s.prototype.multiplicity,s.prototype.count=s.prototype.multiplicity,s.prototype.frequency=function(x){if(this.size===0)return 0;var e=this.multiplicity(x);return e/this.size},s.prototype.top=function(x){if(typeof x!="number"||x<=0)throw new Error("mnemonist/multi-set.top: n must be a number > 0.");for(var e=new T(Array,E,x),r=this.items.entries(),d;d=r.next(),!d.done;)e.push(d.value);return e.consume()},s.prototype.forEach=function(x,e){e=arguments.length>1?e:this;var r;this.items.forEach(function(d,h){for(r=0;r1?e:this,this.items.forEach(x,e)},s.prototype.keys=function(){return this.items.keys()},s.prototype.values=function(){var x=this.items.entries(),e=!1,r,d,h,a;return new i(function l(){if(!e){if(r=x.next(),r.done)return{done:!0};e=!0,d=r.value[0],h=r.value[1],a=0}return a>=h?(e=!1,l()):(a++,{done:!1,value:d})})},s.prototype.multiplicities=function(){return this.items.entries()},typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=s.prototype.values),s.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect),s.prototype.toJSON=function(){return this.items},s.from=function(x){var e=new s;return y(x,function(r){e.add(r)}),e},s.isSubset=function(x,e){var r=x.multiplicities(),d,h,a;if(x===e)return!0;if(x.dimension>e.dimension)return!1;for(;d=r.next(),!d.done;)if(h=d.value[0],a=d.value[1],e.multiplicity(h){var i=Hr(),y=Gn();function T(l,n,u){return((Math.pow(l,2)-Math.pow(Math.abs(n-u),2))/2|0)+l+1}function E(l,n){for(var u=0,f=0,o=n+1;fn.length?-1:l.lengthn?1:0}function x(l,n){var u=l+1,f=n/u|0,o=f+1,c,p,v=n-f*u,m=u-v,S=new Array(l+1);for(c=0;c 0");this.levenshtein=l,this.k=n,this.clear()}a.prototype.clear=function(){this.size=0,this.strings=[],this.invertedIndices={}},a.prototype.add=function(l){var n=l.length,u=this.size;this.strings.push(l),this.size++;var f=e(this.k,l),o=this.invertedIndices[n];typeof o>"u"&&(o={},this.invertedIndices[n]=o);var c,p,v,m,S;for(m=0,S=f.length;m"u"?(p=[u],o[v]=p):p.push(u);return this},a.prototype.search=function(l){var n=l.length,u=this.k,f=new Set,o,c,p,v,m,S,M,w,C,A,P,b,O,I,D;for(w=Math.max(0,n-u),C=n+u+1;w1?n:this;for(var u=0,f=this.strings.length;u=n)return{done:!0};var f=l[u];return u++,{value:f,done:!1}})},typeof Symbol<"u"&&(a.prototype[Symbol.iterator]=a.prototype.values),a.prototype.inspect=function(){var l=this.strings.slice();return Object.defineProperty(l,"constructor",{value:a,enumerable:!1}),l},typeof Symbol<"u"&&(a.prototype[Symbol.for("nodejs.util.inspect.custom")]=a.prototype.inspect),a.from=function(l,n,u){var f=new a(n,u);return y(l,function(o){f.add(o)}),f},a.countKeys=E,a.comparator=s,a.partition=x,a.segments=e,a.segmentPos=r,a.multiMatchAwareInterval=d,a.multiMatchAwareSubstrings=h,t.exports=a}),hO=ai((g,t)=>{var i=Hr(),y=Gn();function T(){this.clear()}T.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},T.prototype.enqueue=function(E){return this.items.push(E),++this.size},T.prototype.dequeue=function(){if(this.size){var E=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,E}},T.prototype.peek=function(){if(this.size)return this.items[this.offset]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var x=this.offset,e=0,r=this.items.length;x=E.length)return{done:!0};var x=E[s];return s++,{value:x,done:!1}})},T.prototype.entries=function(){var E=this.items,s=this.offset,x=0;return new i(function(){if(s>=E.length)return{done:!0};var e=E[s];return s++,{value:[x++,e],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.toString=function(){return this.toArray().join(",")},T.prototype.toJSON=function(){return this.toArray()},T.prototype.inspect=function(){var E=this.toArray();return Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E){var s=new T;return y(E,function(x){s.enqueue(x)}),s},T.of=function(){return T.from(arguments)},t.exports=T}),uO=ai((g,t)=>{var i=Hr(),y=Gn();function T(){this.clear()}T.prototype.clear=function(){this.items=[],this.size=0},T.prototype.push=function(E){return this.items.push(E),++this.size},T.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},T.prototype.peek=function(){return this.items[this.size-1]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var x=0,e=this.items.length;x=s)return{done:!0};var e=E[s-x-1];return x++,{value:e,done:!1}})},T.prototype.entries=function(){var E=this.items,s=E.length,x=0;return new i(function(){if(x>=s)return{done:!0};var e=E[s-x-1];return{value:[x++,e],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.toString=function(){return this.toArray().join(",")},T.prototype.toJSON=function(){return this.toArray()},T.prototype.inspect=function(){var E=this.toArray();return Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E){var s=new T;return y(E,function(x){s.push(x)}),s},T.of=function(){return T.from(arguments)},t.exports=T}),fO=ai(g=>{g.intersection=function(){if(arguments.length<2)throw new Error("mnemonist/Set.intersection: needs at least two arguments.");var t=new Set,i=1/0,y=null,T,E,s=arguments.length;for(E=0;Ei.size)return!1;for(;T=y.next(),!T.done;)if(!i.has(T.value))return!1;return!0},g.isSuperset=function(t,i){return g.isSubset(i,t)},g.add=function(t,i){for(var y=i.values(),T;T=y.next(),!T.done;)t.add(T.value)},g.subtract=function(t,i){for(var y=i.values(),T;T=y.next(),!T.done;)t.delete(T.value)},g.intersect=function(t,i){for(var y=t.values(),T;T=y.next(),!T.done;)i.has(T.value)||t.delete(T.value)},g.disjunct=function(t,i){for(var y=t.values(),T,E=[];T=y.next(),!T.done;)i.has(T.value)&&E.push(T.value);for(y=i.values();T=y.next(),!T.done;)t.has(T.value)||t.add(T.value);for(var s=0,x=E.length;si.size&&(y=t,t=i,i=y),t.size===0)return 0;if(t===i)return t.size;for(var T=t.values(),E,s=0;E=T.next(),!E.done;)i.has(E.value)&&s++;return s},g.unionSize=function(t,i){var y=g.intersectionSize(t,i);return t.size+i.size-y},g.jaccard=function(t,i){var y=g.intersectionSize(t,i);if(y===0)return 0;var T=t.size+i.size-y;return y/T},g.overlap=function(t,i){var y=g.intersectionSize(t,i);return y===0?0:y/Math.min(t.size,i.size)}}),cO=ai((g,t)=>{var i=Hr(),y=Ns().getPointerArray;function T(E){var s=y(E);this.start=0,this.size=0,this.capacity=E,this.dense=new s(E),this.sparse=new s(E)}T.prototype.clear=function(){this.start=0,this.size=0},T.prototype.has=function(E){if(this.size===0)return!1;var s=this.sparse[E],x=s=this.start&&s=this.start&&s1?s:this;for(var x=this.capacity,e=this.size,r=this.start,d=0;d=x)return{done:!0};var d=E[e];return e++,r++,e===s&&(e=0),{value:d,done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=[];return this.forEach(function(s){E.push(s)}),Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E.capacity=this.capacity,E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),t.exports=T}),dO=ai((g,t)=>{var i=Hr(),y=Ns().getPointerArray;function T(E,s){arguments.length<2&&(s=E,E=Array);var x=y(s);this.size=0,this.length=s,this.dense=new x(s),this.sparse=new x(s),this.vals=new E(s)}T.prototype.clear=function(){this.size=0},T.prototype.has=function(E){var s=this.sparse[E];return s=this.size||this.dense[s]!==E?!1:(s=this.dense[this.size-1],this.dense[this.sparse[E]]=s,this.sparse[s]=this.sparse[E],this.size--,!0)},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var x=0;x{var i=Hr(),y=Ns().getPointerArray;function T(E){var s=y(E);this.size=0,this.length=E,this.dense=new s(E),this.sparse=new s(E)}T.prototype.clear=function(){this.size=0},T.prototype.has=function(E){var s=this.sparse[E];return s=this.size||this.dense[s]!==E?!1:(s=this.dense[this.size-1],this.dense[this.sparse[E]]=s,this.sparse[s]=this.sparse[E],this.size--,!0)},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var x,e=0;e{var i=Gn(),y=2,T=2,E=new Set([0,1,2]),s={0:"Returns only the top suggestion",1:"Returns suggestions with the smallest edit distance",2:"Returns every suggestion (no early termination)"};function x(n){var u=new Set;return typeof n=="number"&&u.add(n),{suggestions:u,count:0}}function e(n,u,f){return{term:n||"",distance:u||0,count:f||0}}function r(n,u,f,o){o=o||new Set,u++;var c,p=n.length,v;if(p>1)for(v=0;v0&&n[v].length-p.length>o.length-p.length&&(f.suggestions=new Set,f.count=0),(u===2||!f.suggestions.size||n[v].length-p.length>=o.length-p.length)&&f.suggestions.add(c)}function h(n,u){var f=n.length,o=u.length,c=[[]],p=f+o,v=new Map,m,S,M;for(c[0][0]=p,m=0;m<=f;m++)c[m+1]||(c[m+1]=[]),c[m+1][1]=m,c[m+1][0]=p;for(M=0;M<=o;M++)c[1][M+1]=M,c[0][M+1]=p;var w=n+u,C;for(m=0,S=w.length;mc)return[];for(var m=[p],S=new Set,M=new Set,w=[],C,A;m.length>0&&(C=m.shift(),!(f<2&&w.length>0&&v-C.length>w[0].distance));){if(A=n[C],A!==void 0){if(typeof A=="number"&&(A=x(A)),A.count>0&&!M.has(C)){M.add(C);var P=e(C,v-C.length,A.count);if(w.push(P),f<2&&v-C.length===0)break}A.suggestions.forEach(D=>{var B=u[D];if(!M.has(B)){M.add(B);var G=0;if(p!==B)if(B.length===C.length)G=v-C.length;else if(v===C.length)G=B.length-C.length;else{for(var z=0,X=0,j=B.length;z0||X>0?G=h(B.substr(z,j-z-X),p.substr(z,v-z-X)):G=h(B,p)}if(f<2&&w.length>0&&w[0].distance>G&&(w=[]),!(f<2&&w.length>0&&G>w[0].distance)&&G<=o){var Q=n[B];Q!==void 0&&w.push(e(B,G,Q.count))}}})}if(v-C.length0&&v-C.length>=w[0].distance)continue;for(var b=0,O=C.length;bthis.maxLength&&(this.maxLength=n.length)),u.count===1){var f=this.words.length;this.words.push(n);var o=r(n,0,this.maxDistance);o.forEach(c=>{var p=this.dictionary[c];p!==void 0?(typeof p=="number"&&(p=x(p),this.dictionary[c]=p),p.suggestions.has(f)||d(this.words,this.verbosity,p,n,f,c)):this.dictionary[c]=f})}return this.size++,this},l.prototype.search=function(n){return a(this.dictionary,this.words,this.verbosity,this.maxDistance,this.maxLength,n)},l.prototype.inspect=function(){var n=[];n.size=this.size,n.maxDistance=this.maxDistance,n.verbosity=this.verbosity,n.behavior=s[this.verbosity];for(var u in this.dictionary)typeof this.dictionary[u]=="object"&&this.dictionary[u].count&&n.push([u,this.dictionary[u].count]);return Object.defineProperty(n,"constructor",{value:l,enumerable:!1}),n},typeof Symbol<"u"&&(l.prototype[Symbol.for("nodejs.util.inspect.custom")]=l.prototype.inspect),l.from=function(n,u){var f=new l(u);return i(n,function(o){f.add(o)}),f},t.exports=l}),tC=ai((g,t)=>{var i=Gn(),y=Hr(),T="\0";function E(s){this.mode=s===Array?"array":"string",this.clear()}E.prototype.clear=function(){this.root={},this.size=0},E.prototype.set=function(s,x){for(var e=this.root,r,d=0,h=s.length;d"u")return;if(T in x)return x[T]},E.prototype.delete=function(s){var x=this.root,e=null,r=null,d,h,a,l;for(a=0,l=s.length;a"u")return!1;e!==null?Object.keys(x).length>1&&(e=null,r=null):Object.keys(x).length<2&&(e=d,r=h)}return T in x?(this.size--,e?delete e[r]:delete x[T],!0):!1},E.prototype.has=function(s){for(var x=this.root,e,r=0,d=s.length;r"u")return!1;return T in x},E.prototype.find=function(s){var x=typeof s=="string",e=this.root,r=[],d,h,a;for(h=0,a=s.length;h"u")return r;for(var l=[e],n=[s],u;l.length;){s=n.pop(),e=l.pop();for(u in e){if(u===T){r.push([s,e[T]]);continue}l.push(e[u]),n.push(x?s+u:s.concat(u))}}return r},E.prototype.values=function(s){var x=this.root,e=[],r,d,h;if(s){for(d=0,h=s.length;d"u")return y.empty()}return e.push(x),new y(function(){for(var a,l=!1,n;e.length;){a=e.pop();for(n in a){if(n===T){l=!0;continue}e.push(a[n])}if(l)return{done:!1,value:a[T]}}return{done:!0}})},E.prototype.prefixes=function(s){var x=this.root,e=[],r=[],d,h,a,l=this.mode==="string";if(s){for(h=0,a=s.length;h"u")return y.empty()}else s=l?"":[];return e.push(x),r.push(s),new y(function(){for(var n,u,f=!1,o;e.length;){n=e.pop(),u=r.pop();for(o in n){if(o===T){f=!0;continue}e.push(n[o]),r.push(l?u+o:u.concat(o))}if(f)return{done:!1,value:u}}return{done:!0}})},E.prototype.keys=E.prototype.prefixes,E.prototype.entries=function(s){var x=this.root,e=[],r=[],d,h,a,l=this.mode==="string";if(s){for(h=0,a=s.length;h"u")return y.empty()}else s=l?"":[];return e.push(x),r.push(s),new y(function(){for(var n,u,f=!1,o;e.length;){n=e.pop(),u=r.pop();for(o in n){if(o===T){f=!0;continue}e.push(n[o]),r.push(l?u+o:u.concat(o))}if(f)return{done:!1,value:[u,n[T]]}}return{done:!0}})},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.entries),E.prototype.inspect=function(){for(var s=new Array(this.size),x=this.entries(),e,r=0;e=x.next(),!e.done;)s[r++]=e.value;return Object.defineProperty(s,"constructor",{value:E,enumerable:!1}),s},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.prototype.toJSON=function(){return this.root},E.from=function(s){var x=new E;return i(s,function(e,r){x.set(r,e)}),x},E.SENTINEL=T,t.exports=E}),mO=ai((g,t)=>{var i=Gn(),y=tC(),T="\0";function E(x){this.mode=x===Array?"array":"string",this.clear()}for(s in y.prototype)E.prototype[s]=y.prototype[s];var s;delete E.prototype.set,delete E.prototype.get,delete E.prototype.values,delete E.prototype.entries,E.prototype.add=function(x){for(var e=this.root,r,d=0,h=x.length;d"u")return d;for(var n=[r],u=[x],f;n.length;){x=u.pop(),r=n.pop();for(f in r){if(f===T){d.push(x);continue}n.push(r[f]),u.push(e?x+f:x.concat(f))}}return d},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.keys),E.prototype.inspect=function(){for(var x=new Set,e=this.keys(),r;r=e.next(),!r.done;)x.add(r.value);return Object.defineProperty(x,"constructor",{value:E,enumerable:!1}),x},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.prototype.toJSON=function(){return this.root},E.from=function(x){var e=new E;return i(x,function(r){e.add(r)}),e},E.SENTINEL=T,t.exports=E}),gO=ai((g,t)=>{var i=Hr(),y=Gn(),T=aa(),E=Ns(),s=function(d){return Math.max(1,Math.ceil(d*1.5))},x=function(d){var h=E.getPointerArray(d);return new h(d)};function e(d,h){if(arguments.length<1)throw new Error("mnemonist/vector: expecting at least a byte array constructor.");var a=h||0,l=s,n=0,u=!1;typeof h=="object"&&(a=h.initialCapacity||0,n=h.initialLength||0,l=h.policy||l,u=h.factory===!0),this.factory=u?d:null,this.ArrayClass=d,this.length=n,this.capacity=Math.max(n,a),this.policy=l,this.array=new d(this.capacity)}e.prototype.set=function(d,h){if(this.lengththis.capacity)if(this.factory===null?this.array=new this.ArrayClass(d):this.array=this.factory(d),E.isTypedArray(this.array))this.array.set(h,0);else for(var a=0,l=this.length;a=d)return this;for(h=this.capacity;h=h)return{done:!0};var l=d[a];return a++,{value:l,done:!1}})},e.prototype.entries=function(){var d=this.array,h=this.length,a=0;return new i(function(){if(a>=h)return{done:!0};var l=d[a];return{value:[a++,l],done:!1}})},typeof Symbol<"u"&&(e.prototype[Symbol.iterator]=e.prototype.values),e.prototype.inspect=function(){var d=this.array.slice(0,this.length);return d.type=this.array.constructor.name,d.items=this.length,d.capacity=this.capacity,Object.defineProperty(d,"constructor",{value:e,enumerable:!1}),d},typeof Symbol<"u"&&(e.prototype[Symbol.for("nodejs.util.inspect.custom")]=e.prototype.inspect),e.from=function(d,h,a){if(arguments.length<3&&(a=T.guessLength(d),typeof a!="number"))throw new Error("mnemonist/vector.from: could not guess iterable length. Please provide desired capacity as last argument.");var l=new e(h,a);return y(d,function(n){l.push(n)}),l};function r(d){var h=function(l){e.call(this,d,l)};for(var a in e.prototype)e.prototype.hasOwnProperty(a)&&(h.prototype[a]=e.prototype[a]);return h.from=function(l,n){return e.from(l,d,n)},typeof Symbol<"u"&&(h.prototype[Symbol.iterator]=h.prototype.values),h}e.Int8Vector=r(Int8Array),e.Uint8Vector=r(Uint8Array),e.Uint8ClampedVector=r(Uint8ClampedArray),e.Int16Vector=r(Int16Array),e.Uint16Vector=r(Uint16Array),e.Int32Vector=r(Int32Array),e.Uint32Vector=r(Uint32Array),e.Float32Vector=r(Float32Array),e.Float64Vector=r(Float64Array),e.PointerVector=r(x),t.exports=e}),yO=ai((g,t)=>{var i=aa(),y=Ns(),T=_M().inplaceQuickSortIndices,E=QM().lowerBoundIndices,s=$x(),x=y.getPointerArray;function e(h,a){return h.distancea.distance?-1:0}function r(h,a,l){for(var n=l.length,u=x(n),f=0,o=new u(n),c=new u(n),p=new u(n),v=new Float64Array(n),m=[0,0,n],S=new Float64Array(n),M,w,C,A,P,b,O,I,D;m.length;)if(P=m.pop(),A=m.pop(),M=m.pop(),w=l[P-1],P--,D=P-A,o[M]=w,D!==0){if(D===1){O=h(a[w],a[l[A]]),v[M]=O,f++,p[M]=f,o[f]=l[A];continue}for(I=A;I0&&(f++,p[M]=f,m.push(f,b,P)),b-A>0&&(f++,c[M]=f,m.push(f,A,b))}return{nodes:o,lefts:c,rights:p,mus:v}}function d(h,a){if(typeof h!="function")throw new Error("mnemonist/VPTree.constructor: given `distance` must be a function.");if(!a)throw new Error("mnemonist/VPTree.constructor: you must provide items to the tree. A VPTree cannot be updated after its creation.");this.distance=h,this.heap=new s(e),this.D=0;var l=i.toArrayWithIndices(a);this.items=l[0];var n=l[1];this.size=n.length;var u=r(h,this.items,n);this.nodes=u.nodes,this.lefts=u.lefts,this.rights=u.rights,this.mus=u.mus}d.prototype.nearestNeighbors=function(h,a){var l=this.heap,n=[0],u=1/0,f,o,c,p,v,m,S;for(this.D=0;n.length;)f=n.pop(),o=this.nodes[f],c=this.items[o],S=this.distance(c,a),this.D++,Sh&&l.pop(),l.size>=h&&(u=l.peek().distance)),p=this.lefts[f],v=this.rights[f],!(!p&&!v)&&(m=this.mus[f],S=m-u&&n.push(v)):(v&&S>=m-u&&n.push(v),p&&S=0;w--)M[w]=l.pop();return M},d.prototype.neighbors=function(h,a){var l=[],n=[0],u,f,o,c,p,v,m;for(this.D=0;n.length;)u=n.pop(),f=this.nodes[u],o=this.items[f],m=this.distance(o,a),this.D++,m<=h&&l.push({distance:m,item:o}),c=this.lefts[u],p=this.rights[u],!(!c&&!p)&&(v=this.mus[u],m=v-h&&n.push(p)):(p&&m>=v-h&&n.push(p),c&&m{var i=$x(),y=Kx(),T=VF();t.exports={BiMap:HF(),BitSet:WF(),BitVector:XF(),BloomFilter:kF(),BKTree:jF(),CircularBuffer:KF(),DefaultMap:$F(),DefaultWeakMap:ZF(),FixedDeque:$M(),StaticDisjointSet:JF(),FibonacciHeap:y,MinFibonacciHeap:y.MinFibonacciHeap,MaxFibonacciHeap:y.MaxFibonacciHeap,FixedReverseHeap:Zx(),FuzzyMap:QF(),FuzzyMultiMap:_F(),HashedArrayTree:qF(),Heap:i,MinHeap:i.MinHeap,MaxHeap:i.MaxHeap,StaticIntervalTree:tO(),InvertedIndex:iO(),KDTree:nO(),LinkedList:rO(),LRUCache:Jx(),LRUCacheWithDelete:sO(),LRUMap:qM(),LRUMapWithDelete:aO(),MultiMap:ZM(),MultiSet:oO(),PassjoinIndex:lO(),Queue:hO(),FixedStack:JM(),Stack:uO(),SuffixArray:T,GeneralizedSuffixArray:T.GeneralizedSuffixArray,Set:fO(),SparseQueueSet:cO(),SparseMap:dO(),SparseSet:pO(),SymSpell:vO(),Trie:mO(),TrieMap:tC(),Vector:gO(),VPTree:yO()}}),_t=class cr{static get ZERO(){return new cr(0,0)}static get ONE(){return new cr(1,1)}static get UP(){return new cr(0,-1)}static get DOWN(){return new cr(0,1)}static get LEFT(){return new cr(-1,0)}static get RIGHT(){return new cr(1,0)}static get UP_LEFT(){return new cr(-1,-1)}static get UP_RIGHT(){return new cr(1,-1)}static get DOWN_RIGHT(){return new cr(1,1)}static get DOWN_LEFT(){return new cr(-1,1)}constructor(t,i){typeof t=="number"?(this.x=t,this.y=i||0):(this.x=t.x,this.y=t.y)}clone(){return new cr(this.x,this.y)}add(t){return new cr(this.x+t.x,this.y+t.y)}multiply(t){return new cr(this.x*t.x,this.y*t.y)}divide(t){return new cr(this.x/t.x,this.y/t.y)}subtract(t){return new cr(this.x-t.x,this.y-t.y)}equals(t){return this.x===t.x&&this.y===t.y}abs(){return new cr(Math.abs(this.x),Math.abs(this.y))}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}modulo(t){return new cr(this.x%t.x,this.y%t.y)}scalarModulo(t){return new cr(this.x%t,this.y%t)}scalarMult(t){return new cr(this.x*t,this.y*t)}toPosition(){return{x:this.x,y:this.y}}toString(){return`${this.x}#${this.y}`}},Ri=class{static equal(g,t){return g.position.x===t.position.x&&g.position.y===t.position.y&&g.layer===t.layer}static copyOver(g,t){t.position.x=g.position.x,t.position.y=g.position.y,t.layer=g.layer}static clone(g){return{position:g.position.clone(),layer:g.layer}}static toString(g){return`${g.position.toString()}#${g.layer}`}static toInternal(g){return{position:new _t(g.position.x,g.position.y),layer:g.charLayer}}static fromInternal(g){return{position:g.position.toPosition(),charLayer:g.layer}}},SO=(g=>(g.NONE="none",g.LEFT="left",g.UP_LEFT="up-left",g.UP="up",g.UP_RIGHT="up-right",g.RIGHT="right",g.DOWN_RIGHT="down-right",g.DOWN="down",g.DOWN_LEFT="down-left",g))(SO||{}),TO={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"},EO={up:_t.UP,down:_t.DOWN,left:_t.LEFT,right:_t.RIGHT,none:_t.ZERO,"up-left":_t.UP_LEFT,"up-right":_t.UP_RIGHT,"down-right":_t.DOWN_RIGHT,"down-left":_t.DOWN_LEFT},Sm={up:0,"up-right":1,right:2,"down-right":3,down:4,"down-left":5,left:6,"up-left":7,none:NaN},eC=["up","up-right","right","down-right","down","down-left","left","up-left"],MO=["down-left","down-right","up-right","up-left"];function Qx(){return["up","down","left","right","none","up-left","up-right","down-right","down-left"]}function ud(g){return MO.includes(g)}function CO(g,t=1){return g==="none"?"none":eC[(Sm[g]+8-Math.abs(t)%8)%8]}function iC(g,t=1){return g==="none"?"none":eC[(Sm[g]+t)%8]}function Pu(g){return EO[g]}function wO(g){return TO[g]}function Ca(g,t){if(g.x===t.x){if(g.y>t.y)return"up";if(g.yt.x)return"left";if(g.xt.x){if(g.yt.y)return"up-left"}else if(g.xt.y)return"up-right"}return"none"}var AO=(g=>(g[g.FOUR=4]="FOUR",g[g.EIGHT=8]="EIGHT",g))(AO||{});function zf(g){return typeof g=="string"&&Qx().includes(g)}var by=function(g,t){return by=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,y){i.__proto__=y}||function(i,y){for(var T in y)Object.prototype.hasOwnProperty.call(y,T)&&(i[T]=y[T])},by(g,t)};function Zd(g,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");by(g,t);function i(){this.constructor=g}g.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}function PO(g,t,i,y){function T(E){return E instanceof i?E:new i(function(s){s(E)})}return new(i||(i=Promise))(function(E,s){function x(d){try{r(y.next(d))}catch(h){s(h)}}function e(d){try{r(y.throw(d))}catch(h){s(h)}}function r(d){d.done?E(d.value):T(d.value).then(x,e)}r((y=y.apply(g,t||[])).next())})}function nC(g,t){var i={label:0,sent:function(){if(E[0]&1)throw E[1];return E[1]},trys:[],ops:[]},y,T,E,s;return s={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function x(r){return function(d){return e([r,d])}}function e(r){if(y)throw new TypeError("Generator is already executing.");for(;s&&(s=0,r[0]&&(i=0)),i;)try{if(y=1,T&&(E=r[0]&2?T.return:r[0]?T.throw||((E=T.return)&&E.call(T),0):T.next)&&!(E=E.call(T,r[1])).done)return E;switch(T=0,E&&(r=[r[0]&2,E.value]),r[0]){case 0:case 1:E=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,T=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(E=i.trys,!(E=E.length>0&&E[E.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!E||r[1]>E[0]&&r[1]=g.length&&(g=void 0),{value:g&&g[y++],done:!g}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Sd(g,t){var i=typeof Symbol=="function"&&g[Symbol.iterator];if(!i)return g;var y=i.call(g),T,E=[],s;try{for(;(t===void 0||t-- >0)&&!(T=y.next()).done;)E.push(T.value)}catch(x){s={error:x}}finally{try{T&&!T.done&&(i=y.return)&&i.call(y)}finally{if(s)throw s.error}}return E}function Td(g,t,i){if(i||arguments.length===2)for(var y=0,T=t.length,E;y1||x(a,l)})})}function x(a,l){try{e(y[a](l))}catch(n){h(E[0][3],n)}}function e(a){a.value instanceof jf?Promise.resolve(a.value.v).then(r,d):h(E[0][2],a)}function r(a){x("next",a)}function d(a){x("throw",a)}function h(a,l){a(l),E.shift(),E.length&&x(E[0][0],E[0][1])}}function bO(g){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=g[Symbol.asyncIterator],i;return t?t.call(g):(g=typeof Jf=="function"?Jf(g):g[Symbol.iterator](),i={},y("next"),y("throw"),y("return"),i[Symbol.asyncIterator]=function(){return this},i);function y(E){i[E]=g[E]&&function(s){return new Promise(function(x,e){s=g[E](s),T(x,e,s.done,s.value)})}}function T(E,s,x,e){Promise.resolve(e).then(function(r){E({value:r,done:x})},s)}}function gr(g){return typeof g=="function"}function rC(g){var t=function(y){Error.call(y),y.stack=new Error().stack},i=g(t);return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}var x0=rC(function(g){return function(t){g(this),this.message=t?t.length+` errors occurred during unsubscription: +`+t.map(function(i,y){return y+1+") "+i.toString()}).join(` + `):"",this.name="UnsubscriptionError",this.errors=t}});function Ly(g,t){if(g){var i=g.indexOf(t);0<=i&&g.splice(i,1)}}var ng=function(){function g(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return g.prototype.unsubscribe=function(){var t,i,y,T,E;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var x=Jf(s),e=x.next();!e.done;e=x.next()){var r=e.value;r.remove(this)}}catch(u){t={error:u}}finally{try{e&&!e.done&&(i=x.return)&&i.call(x)}finally{if(t)throw t.error}}else s.remove(this);var d=this.initialTeardown;if(gr(d))try{d()}catch(u){E=u instanceof x0?u.errors:[u]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var a=Jf(h),l=a.next();!l.done;l=a.next()){var n=l.value;try{nT(n)}catch(u){E=E??[],u instanceof x0?E=Td(Td([],Sd(E)),Sd(u.errors)):E.push(u)}}}catch(u){y={error:u}}finally{try{l&&!l.done&&(T=a.return)&&T.call(a)}finally{if(y)throw y.error}}}if(E)throw new x0(E)}},g.prototype.add=function(t){var i;if(t&&t!==this)if(this.closed)nT(t);else{if(t instanceof g){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(i=this._finalizers)!==null&&i!==void 0?i:[]).push(t)}},g.prototype._hasParent=function(t){var i=this._parentage;return i===t||Array.isArray(i)&&i.includes(t)},g.prototype._addParent=function(t){var i=this._parentage;this._parentage=Array.isArray(i)?(i.push(t),i):i?[i,t]:t},g.prototype._removeParent=function(t){var i=this._parentage;i===t?this._parentage=null:Array.isArray(i)&&Ly(i,t)},g.prototype.remove=function(t){var i=this._finalizers;i&&Ly(i,t),t instanceof g&&t._removeParent(this)},g.EMPTY=function(){var t=new g;return t.closed=!0,t}(),g}(),sC=ng.EMPTY;function aC(g){return g instanceof ng||g&&"closed"in g&&gr(g.remove)&&gr(g.add)&&gr(g.unsubscribe)}function nT(g){gr(g)?g():g.unsubscribe()}var oC={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},LO={setTimeout:function(g,t){for(var i=[],y=2;y0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(i){return this._throwIfClosed(),g.prototype._trySubscribe.call(this,i)},t.prototype._subscribe=function(i){return this._throwIfClosed(),this._checkFinalizedStatuses(i),this._innerSubscribe(i)},t.prototype._innerSubscribe=function(i){var y=this,T=this,E=T.hasError,s=T.isStopped,x=T.observers;return E||s?sC:(this.currentObservers=null,x.push(i),new ng(function(){y.currentObservers=null,Ly(x,i)}))},t.prototype._checkFinalizedStatuses=function(i){var y=this,T=y.hasError,E=y.thrownError,s=y.isStopped;T?i.error(E):s&&i.complete()},t.prototype.asObservable=function(){var i=new Pa;return i.source=this,i},t.create=function(i,y){return new sT(i,y)},t}(Pa),sT=function(g){Zd(t,g);function t(i,y){var T=g.call(this)||this;return T.destination=i,T.source=y,T}return t.prototype.next=function(i){var y,T;(T=(y=this.destination)===null||y===void 0?void 0:y.next)===null||T===void 0||T.call(y,i)},t.prototype.error=function(i){var y,T;(T=(y=this.destination)===null||y===void 0?void 0:y.error)===null||T===void 0||T.call(y,i)},t.prototype.complete=function(){var i,y;(y=(i=this.destination)===null||i===void 0?void 0:i.complete)===null||y===void 0||y.call(i)},t.prototype._subscribe=function(i){var y,T;return(T=(y=this.source)===null||y===void 0?void 0:y.subscribe(i))!==null&&T!==void 0?T:sC},t}(Nn),fC=new Pa(function(g){return g.complete()});function HO(g){return g&&gr(g.schedule)}function cC(g){return g[g.length-1]}function dC(g){return HO(cC(g))?g.pop():void 0}function pC(g,t){return typeof cC(g)=="number"?g.pop():t}var vC=function(g){return g&&typeof g.length=="number"&&typeof g!="function"};function mC(g){return gr(g?.then)}function gC(g){return gr(g[qx])}function yC(g){return Symbol.asyncIterator&&gr(g?.[Symbol.asyncIterator])}function xC(g){return new TypeError("You provided "+(g!==null&&typeof g=="object"?"an invalid object":"'"+g+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function WO(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var SC=WO();function TC(g){return gr(g?.[SC])}function EC(g){return RO(this,arguments,function(){var t,i,y,T;return nC(this,function(E){switch(E.label){case 0:t=g.getReader(),E.label=1;case 1:E.trys.push([1,,9,10]),E.label=2;case 2:return[4,jf(t.read())];case 3:return i=E.sent(),y=i.value,T=i.done,T?[4,jf(void 0)]:[3,5];case 4:return[2,E.sent()];case 5:return[4,jf(y)];case 6:return[4,E.sent()];case 7:return E.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function MC(g){return gr(g?.getReader)}function Iu(g){if(g instanceof Pa)return g;if(g!=null){if(gC(g))return XO(g);if(vC(g))return YO(g);if(mC(g))return kO(g);if(yC(g))return CC(g);if(TC(g))return jO(g);if(MC(g))return KO(g)}throw xC(g)}function XO(g){return new Pa(function(t){var i=g[qx]();if(gr(i.subscribe))return i.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function YO(g){return new Pa(function(t){for(var i=0;i{let T=this.tilePosInDirection(new _t(i,y),g);return this.tilemap.hasBlockingTile(T,t,wO(g),this.ignoreMissingTiles)})}isCharBlocking(g,t){return this.someCharTile((i,y)=>{let T=this.tilePosInDirection(new _t(i,y),g);return this.tilemap.hasBlockingChar(T,t,this.getCollisionGroups(),new Set([this.getId()]),this.ignoreCollisionGroups)})}isMoving(){return this.movementDirection!="none"}turnTowards(g){this.isMoving()||g!="none"&&this.changeFacingDirection(g)}changeFacingDirection(g){this.facingDirection!==g&&(this.facingDirection=g,this.directionChanged$.next(g))}getFacingDirection(){return this.facingDirection}getFacingPosition(){return this._tilePos.position.add(Pu(this.facingDirection))}addCollisionGroup(g){this.collisionGroups.add(g)}setCollisionGroups(g){this.collisionGroups=new Set(g)}setIgnoreCollisionGroups(g){this.ignoreCollisionGroups=new Set(g)}getCollisionGroups(){return Array.from(this.collisionGroups)}getIgnoreCollisionGroups(){return Array.from(this.ignoreCollisionGroups)}hasCollisionGroup(g){return this.collisionGroups.has(g)}removeCollisionGroup(g){this.collisionGroups.delete(g)}removeAllCollisionGroups(){this.collisionGroups.clear()}addLabels(g){for(let t of g)this.labels.add(t)}getLabels(){return[...this.labels.values()]}hasLabel(g){return this.labels.has(g)}clearLabels(){this.labels.clear()}removeLabels(g){for(let t of g)this.labels.delete(t)}getNumberOfDirections(){return this.numberOfDirections}movementStarted(){return this.movementStarted$}movementStopped(){return this.movementStopped$}directionChanged(){return this.directionChanged$}tilePositionSet(){return this.tilePositionSet$}positionChangeStarted(){return this.positionChangeStarted$}positionChangeFinished(){return this.positionChangeFinished$}autoMovementSet(){return this.autoMovementSet$}depthChanged(){return this.depthChanged$}getMovementProgress(){return this.movementProgress}setMovementProgress(g){let t=Math.max(0,Math.min(lu,g));this.movementProgress=t}hasWalkedHalfATile(){return this.movementProgress>lu/2}willCrossTileBorderThisUpdate(g){return this.movementProgress+this.maxProgressForDelta(g)>=lu}updateCharacterPosition(g){let t=this.willCrossTileBorderThisUpdate(g),i=1-(t?lu-this.movementProgress:this.maxProgressForDelta(g))/this.maxProgressForDelta(g);this.movementProgress=Math.min(this.movementProgress+this.maxProgressForDelta(g),lu),t&&(this.movementProgress=0,this.shouldContinueMoving()?(this.fire(this.positionChangeFinished$,this.tilePos,this.getNextTilePos()),this.tilePos=this.getNextTilePos(),this.startMoving(this.lastMovementImpulse),i>0&&this.updateCharacterPosition(g*i)):this.stopMoving())}maxProgressForDelta(g){let t=g/1e3;return Math.floor(t*this.speed*lu)}get tilePos(){return Ri.clone(this._tilePos)}set tilePos(g){Ri.copyOver(g,this._tilePos)}startMoving(g){g!=="none"&&(g!=this.movementDirection&&this.movementStarted$.next(g),this.movementDirection=g,this.facingDirection=g,this.fire(this.positionChangeStarted$,this.tilePos,this.getNextTilePos()))}tilePosInDirection(g,t){return g.add(Pu(this.tilemap.toMapDirection(t)))}shouldContinueMoving(){return this.lastMovementImpulse!=="none"&&!this.isBlockingDirection(this.lastMovementImpulse)}stopMoving(){if(this.movementDirection==="none")return;let g=this.tilePos,t=this.getNextTilePos(),i=this.movementDirection;this.tilePos=this.getNextTilePos(),this.movementDirection="none",this.movementStopped$.next(i),this.fire(this.positionChangeFinished$,g,t)}fire(g,{position:t,layer:i},{position:y,layer:T}){g.next({exitTile:t,enterTile:y,exitLayer:i,enterLayer:T})}someCharTile(g){let t=this.getNextTilePos().position;for(let i=t.x;ithis.isLayerAlwaysOnTop(T));this.tilemap.layers.filter(T=>!this.isLayerAlwaysOnTop(T)).forEach(T=>{this.hasLayerProp(T,hu.HEIGHT_SHIFT_PROP_NAME)?(this.createHeightShiftLayers(T,i),t.push(T.tilemapLayer)):this.setDepth(T,++i)}),this.charLayerDepths.set(void 0,i),y.forEach((T,E)=>{T.tilemapLayer.setDepth(E+1+i)}),t.forEach(T=>T.destroy())}setDepth(t,i){t.tilemapLayer.setDepth(i),this.isCharLayer(t)&&this.charLayerDepths.set(this.getLayerProp(t,hu.CHAR_LAYER_PROP_NAME),i)}createHeightShiftLayers(t,i){let y=this.getLayerProp(t,hu.HEIGHT_SHIFT_PROP_NAME);isNaN(y)&&(y=0);let T=1;for(let E=0;ET.name==i);return y?.value}hasLayerProp(t,i){return this.getLayerProp(t,i)!=null}copyLayer(t,i){let y=`${t.name}#${i}`,T=this.tilemap.createBlankLayer(y,t.tilemapLayer.tileset);if(T){if(T.name=y,this.isIsometric())for(let E=i;E>=0;E--){let s=i-E;T.putTileAt(t.data[E][s],s,E)}else for(let E=0;Ex===this.charData.id)).subscribe(({direction:x})=>{var e;(e=this.animation)==null||e.setStandingFrame(x)}),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(g){g?(this.sprite&&(g.x=this.sprite.x,g.y=this.sprite.y),this.sprite=g,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(g){var t;this.container=g,this.cachedContainerHeight=(t=g?.getBounds().height)!=null?t:0}getContainer(){return this.container}getOffsetX(){return this.customOffset.x}setOffsetX(g){this.customOffset.x=g}getOffsetY(){return this.customOffset.y}setOffsetY(g){this.customOffset.y=g}getWalkingAnimationMapping(){return this.walkingAnimationMapping}turnTowards(g){var t;this.geHeadless.isMoving(this.charData.id)||g!="none"&&(this.geHeadless.turnTowards(this.charData.id,g),(t=this.animation)==null||t.setStandingFrame(g))}getAnimation(){return this.animation}setAnimation(g){this.animation=g}update(g){this.updateGridChar()}getEngineOffset(){var g,t,i,y;if(!this.sprite)return _t.ZERO;let T=this.tilemap.getTileWidth()/2-Math.floor(((t=(g=this.sprite)==null?void 0:g.displayWidth)!=null?t:0)/2),E=-((y=(i=this.sprite)==null?void 0:i.displayHeight)!=null?y:0)+this.tilemap.getTileHeight();return new _t(T,E)}updatePixelPos(){let g=new _t(this.geHeadless.getPosition(this.charData.id)),t=this.geHeadless.getMovementProgress(this.charData.id)/1e3,i=this.tilemap.tilePosToPixelPos(g).add(this.getEngineOffset()).add(this.customOffset).add(Pu(this.geHeadless.getFacingDirection(this.charData.id)).multiply(this.tilemap.getTileDistance(this.geHeadless.getFacingDirection(this.charData.id)).scalarMult(t))),y=this.getGameObj();y&&(y.x=Math.floor(i.x),y.y=Math.floor(i.y))}getGameObj(){return this.container||this.sprite}updateGridChar(){var g;if(this.updatePixelPos(),this.sprite&&this.geHeadless.isMoving(this.charData.id)){let t=this.geHeadless.getMovementProgress(this.charData.id)>lu/2;(g=this.getAnimation())==null||g.updateCharacterFrame(this.geHeadless.getFacingDirection(this.charData.id),t,Number(this.sprite.frame.name))}this.updateDepth()}resetAnimation(g){let t=new aT(this.walkingAnimationMapping,g.texture.source[0].width/g.width/aT.FRAMES_CHAR_ROW);this.setAnimation(t),t.frameChange().pipe(Ea(this.newSpriteSet$)).subscribe(i=>{g?.setFrame(i)}),t.setIsEnabled(this.walkingAnimationMapping!==void 0),t.setStandingFrame(this.geHeadless.getFacingDirection(this.charData.id))}updateOverlaySprite(){if(!this.layerOverlaySprite||!this.sprite)return;this.layerOverlaySprite.scale=this.sprite.scale;let g=this.tilemap.getTileHeight()/this.layerOverlaySprite.scale;this.layerOverlaySprite.setCrop(0,0,this.layerOverlaySprite.displayWidth,this.sprite.height-g),this.layerOverlaySprite.setOrigin(0,0)}updateDepth(){if(!this.getGameObj())return;let g=new _t(this.geHeadless.getPosition(this.charData.id)),t=this.geHeadless.getCharLayer(this.charData.id);this.container?this.setContainerDepth(this.container,{position:g,layer:t}):this.sprite&&this.setSpriteDepth(this.sprite,{position:g,layer:t});let i=this.getLayerOverlaySprite();if(i){let y=new _t(mh(Pn({},g),{y:g.y-1}));this.setSpriteDepth(i,{position:y,layer:t})}}setSpriteDepth(g,t){g.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(t))+this.getPaddedPixelDepthSprite(g))}setContainerDepth(g,t){g.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(t))+this.getPaddedPixelDepthContainer(g))}getPaddedPixelDepthContainer(g){return Iy.shiftPad(g.y+this.cachedContainerHeight,By.Z_INDEX_PADDING)}getPaddedPixelDepthSprite(g){return Iy.shiftPad(g.y+g.displayHeight,By.Z_INDEX_PADDING)}getTransitionLayer(g){if(g.layer)return this.geHeadless.getTransition(g.position,g.layer)||g.layer}},h4=(g=>(g.DONT_BLOCK="DONT_BLOCK",g.BLOCK_TWO_TILES="BLOCK_TWO_TILES",g.BLOCK_ONE_TILE_AHEAD="BLOCK_ONE_TILE_AHEAD",g.BLOCK_ONE_TILE_BEHIND="BLOCK_ONE_TILE_BEHIND",g))(h4||{}),FC=(g=>(g.STOP="STOP",g.CLOSEST_REACHABLE="CLOSEST_REACHABLE",g.RETRY="RETRY",g.ALTERNATIVE_TARGETS="ALTERNATIVE_TARGETS",g))(FC||{}),u4=class{distance(g,t){return no.manhattanDistance(g,t)}direction(g,t){if(no.equal(g,t))return"none";let i=g.clone().subtract(t);return Math.abs(i.x)>Math.abs(i.y)?i.x>0?"left":"right":i.y>0?"up":"down"}neighbors(g){return[new _t(g.x,g.y+1),new _t(g.x+1,g.y),new _t(g.x-1,g.y),new _t(g.x,g.y-1)]}getDirections(){return["up","right","down","left"]}},f4=class{distance(g,t){return no.chebyshevDistance(g,t)}neighbors(g){let t=[new _t(g.x,g.y+1),new _t(g.x+1,g.y),new _t(g.x-1,g.y),new _t(g.x,g.y-1)],i=[new _t(g.x+1,g.y+1),new _t(g.x+1,g.y-1),new _t(g.x-1,g.y+1),new _t(g.x-1,g.y-1)];return[...t,...i]}direction(g,t){return t.x>g.x?t.y>g.y?"down-right":t.yg.y?"down-left":t.yg.y?"down":"none"}getDirections(){return["up","right","down","left","down-left","down-right","up-right","up-left"]}},Ed=class{static create(g){switch(g){case 4:return new u4;case 8:return new f4}}},oT=class{constructor(g,t,i){this.backoffMs=g,this.maxRetries=t,this.onFinished=i,this.retries=0,this.elapsed=0}retry(g,t){this.shouldRetry()?(this.elapsed+=g,this.elapsed>=this.backoffMs&&(this.elapsed=0,this.retries++,t())):this.onFinished()}reset(){this.retries=0,this.elapsed=0}getMaxRetries(){return this.maxRetries}getBackoffMs(){return this.backoffMs}shouldRetry(){return this.maxRetries===-1||this.retries(g.WAIT="WAIT",g.RETRY="RETRY",g.STOP="STOP",g))(OC||{}),rg=class{constructor(g,{shortestPathAlgorithm:t="BFS",pathWidth:i=1,pathHeight:y=1,numberOfDirections:T=4,isPositionAllowed:E=(u,f)=>!0,collisionGroups:s=[],ignoredChars:x=[],ignoreTiles:e=!1,ignoreMapBounds:r=!1,ignoreBlockedTarget:d=!1,maxPathLength:h=1/0,ignoreLayers:a=!1,considerCosts:l=!1,calculateClosestToTarget:n=!0}={}){this.gridTilemap=g,this.options={shortestPathAlgorithm:t,pathWidth:i,pathHeight:y,numberOfDirections:T,isPositionAllowed:E,collisionGroups:s,ignoredChars:x,ignoreTiles:e,ignoreMapBounds:r,ignoreBlockedTarget:d,maxPathLength:h,ignoreLayers:a,considerCosts:l,calculateClosestToTarget:n},this.ignoredCharsSet=new Set(x)}findShortestPath(g,t){this.options.ignoreLayers&&(this.gridTilemap.fixCacheLayer(g.layer),t.layer=g.layer);let i=this.findShortestPathImpl(g,t);return this.gridTilemap.unfixCacheLayers(),i}getNeighbors(g,t){var i;return Ed.create((i=this.options.numberOfDirections)!=null?i:4).neighbors(g.position).map(y=>{let T=g.layer;return this.options.ignoreLayers||(T=this.gridTilemap.getTransition(y,g.layer)),{position:y,layer:T||g.layer}}).filter(y=>!this.isBlocking(g,y)||this.options.ignoreBlockedTarget&&Ri.equal(y,t))}getTransition(g,t){if(!this.options.ignoreLayers)return this.gridTilemap.getTransition(g,t)}getCosts(g,t){if(!this.options.considerCosts)return 1;let i=Ca(t.position,g);return this.gridTilemap.getTileCosts(t,i)}isBlocking(g,t){return!(this.options.ignoreMapBounds||this.gridTilemap.isInRange(t.position))||!this.options.isPositionAllowed(t.position,t.layer)||!this.options.ignoreTiles&&this.hasBlockingTileFrom(g,t,this.options.pathWidth,this.options.pathHeight,this.options.ignoreMapBounds,this.gridTilemap)?!0:this.hasBlockingCharFrom(g,t,this.options.pathWidth,this.options.pathHeight,this.options.collisionGroups,this.ignoredCharsSet,this.gridTilemap)}distance(g,t){return(this.options.numberOfDirections===4?no.manhattanDistance:no.chebyshevDistance)(g,t)}getTilePosInDir(g,t){return this.options.ignoreLayers?{position:g.position.add(Pu(this.gridTilemap.toMapDirection(t))),layer:g.layer}:this.gridTilemap.getTilePosInDirection(g,t)}getReverseNeighbors(g,t){var i;let y=Ed.create((i=this.options.numberOfDirections)!=null?i:4).neighbors(g.position),T;if(!this.options.ignoreLayers){let E=this.gridTilemap.getReverseTransitions(g.position,g.layer);T=E?[...E]:void 0}return y.map(E=>T?T.map(s=>({position:E,layer:s||g.layer})):[{position:E,layer:g.layer}]).flat().filter(E=>!this.isBlocking(E,g)||this.options.ignoreBlockedTarget&&Ri.equal(g,t))}hasBlockingCharFrom(g,t,i,y,T,E,s){if(i===1&&y===1)return s.hasBlockingChar(t.position,t.layer,T,E);let x=r=>s.hasBlockingChar(r,t.layer,T,E),e=Ca(g.position,t.position);return this.isBlockingMultiTile(g,e,i,y,x)}hasBlockingTileFrom(g,t,i,y,T,E){if(i===1&&y===1)return E.hasBlockingTile(t.position,t.layer,Ca(t.position,g.position),T);let s=Ca(g.position,t.position),x=e=>E.hasBlockingTile(e,t.layer,s,T);return this.isBlockingMultiTile(g,s,i,y,x)}isBlockingMultiTile(g,t,i,y,T){let E={src:new _t(g.position.x+i,g.position.y),dest:new _t(g.position.x+i,g.position.y+y-1)},s={src:new _t(g.position.x-1,g.position.y),dest:new _t(g.position.x-1,g.position.y+y-1)},x={src:new _t(g.position.x,g.position.y-1),dest:new _t(g.position.x+i-1,g.position.y-1)},e={src:new _t(g.position.x,g.position.y+y),dest:new _t(g.position.x+i-1,g.position.y+y)};switch(t){case"right":return this.checkLine(E,T);case"left":return this.checkLine(s,T);case"up":return this.checkLine(x,T);case"down":return this.checkLine(e,T);case"up-left":return this.checkLine({src:x.src,dest:new _t(x.dest.x-1,x.dest.y)},T)||this.checkLine({src:new _t(s.src.x,s.src.y-1),dest:new _t(s.dest.x,s.dest.y-1)},T);case"up-right":return this.checkLine({src:new _t(x.src.x+1,x.src.y),dest:x.dest},T)||this.checkLine({src:new _t(E.src.x,E.src.y-1),dest:new _t(E.dest.x,E.dest.y-1)},T);case"down-left":return this.checkLine({src:new _t(s.src.x,s.src.y+1),dest:new _t(s.dest.x,s.dest.y+1)},T)||this.checkLine({src:e.src,dest:new _t(e.dest.x-1,e.dest.y)},T);case"down-right":return this.checkLine({src:new _t(e.src.x+1,e.src.y),dest:e.dest},T)||this.checkLine({src:new _t(E.src.x,E.src.y+1),dest:new _t(E.dest.x,E.dest.y+1)},T)}return!1}checkLine(g,t){for(let i=g.src.x;i<=g.dest.x;i++)for(let y=g.src.y;y<=g.dest.y;y++)if(t(new _t(i,y)))return!0;return!1}},c4=jM(Kx(),1),d4=class extends rg{findShortestPathImpl(g,t){let i=this.shortestPathBfs(g,t);return{path:this.returnPath(i.previous,g,t),closestToTarget:i.closestToTarget,steps:i.steps,maxPathLengthReached:i.maxPathLengthReached,algorithmUsed:"A_STAR"}}shortestPathBfs(g,t){let i=new Map,y=new Map,T=new Map,E=new c4.MinFibonacciHeap((r,d)=>Yc(T,r)-Yc(T,d)),s=g,x=this.distance(g.position,t.position),e=0;for(E.push(g),y.set(Ri.toString(g),0),T.set(Ri.toString(g),this.distance(g.position,t.position));E.size>0;){let r=E.pop();if(!r)break;e++;let d=this.distance(r.position,t.position);if(dthis.options.maxPathLength)return{previous:new Map,closestToTarget:s,steps:e,maxPathLengthReached:!0};for(let h of this.getNeighbors(r,t)){let a=Yc(y,r)+this.getCosts(r.position,h),l=Ri.toString(h);(!y.has(l)||a0;){let e=T.dequeue();if(x++,!e)break;let{node:r,dist:d}=e;if(d>this.options.maxPathLength)return{previous:new Map,closestToTarget:E,steps:x,maxPathLengthReached:!0};let h=this.distance(r.position,t.position);if(hthis.lastDist)}step(g,t,i){var y;this.lastDist=i;for(let T of g){let E=Ri.toString(T);if(!this.visited.has(E)){this.previous.set(E,t),this.queue.enqueue({node:T,dist:i+1}),this.visited.set(E,i+1);let s=(y=this.otherBfs)==null?void 0:y.visited.get(E);s!==void 0&&s0,T.queue.size()>0);){let e=y.queue.dequeue();if(!e)break;let{node:r,dist:d}=e;if(d+1+(((i=T.queue.peek())==null?void 0:i.dist)||0)>this.options.maxPathLength)return{previous:y.previous,previous2:T.previous,closestToTarget:this.maybeClosestToTarget(s),steps:E,maxPathLengthReached:!0};let h=this.distance(r.position,t.position);if(hkc(this.f,T)-kc(this.f,E)),this.openSet.push(g);let y=Ri.toString(g);for(this.g.set(y,0),this.f.set(y,this.distance(g.position,t.position)),this.maxFrontierSize=Math.max(this.maxFrontierSize,this.openSet.size);this.openSet.size>0;){let T=this.openSet.pop();if(!T)break;if(this.steps++,Ri.equal(T,t))return{previous:i,closestToTarget:t,steps:this.steps,maxPathLengthReached:!1};if(kc(this.g,T)+1>this.options.maxPathLength)return{previous:new Map,closestToTarget:this.closestToTarget,steps:this.steps,maxPathLengthReached:!0};this.updateClosestToTarget(T,t);for(let E of this.getNeighborsInternal(T,i.get(Ri.toString(T)),t)){let s=Ri.toString(E.p),x=kc(this.g,T)+E.dist;(!this.g.has(s)||x({p:E,dist:1}));let y=this.prune(t,g).filter(E=>!this.isBlockingIgnoreTarget(g,E,i)).map(E=>{let s=this.getTransition(E.position,g.layer);return{position:E.position,layer:s||g.layer}}),T=[];for(let E of y)if(this.isHorizontal(g.position,E.position))T.push({p:E,dist:1});else{let s=this.jump(g,E,i,1,Ca(g.position,E.position));s&&T.push(s)}return T}isBlockingIgnoreTarget(g,t,i){return this.isBlocking(g,t)&&!(this.options.ignoreBlockedTarget&&Ri.equal(t,i))}jump(g,t,i,y,T){if(!this.isBlockingIgnoreTarget(g,t,i))return Ri.equal(t,i)?{p:t,dist:y}:y>=this.maxJumpSize?{p:t,dist:y}:this.getTransition(t.position,g.layer)!==void 0?{p:t,dist:y}:this.hasForced(g,t)?{p:t,dist:y}:(this.updateClosestToTarget(t,i),this.jump(t,this.getTilePosInDir(t,T),i,y+1,T))}isHorizontal(g,t){return g.y===t.y}getForced(g,t,i,y,T,E){let s=[],x=g;return(this.blockOrTrans(x,i)||this.blockOrTrans(i,y))&&this.addIfNotBlocked(s,t,y),(this.blockOrTrans(x,T)||this.blockOrTrans(T,E))&&this.addIfNotBlocked(s,t,E),s}hasForced(g,t){let{topLeft:i,downLeft:y,top:T,bottom:E}=this.normalizedPositions(g,t);return!!((this.blockOrTrans(g,y)||this.blockOrTrans(y,E))&&!this.blockOrTrans(t,E)||(this.blockOrTrans(g,i)||this.blockOrTrans(i,T))&&!this.blockOrTrans(t,T))}prune(g,t){let{right:i,top:y,bottom:T,downLeft:E,topLeft:s}=this.normalizedPositions(g,t);return this.isHorizontal(g.position,t.position)?[i,y,T]:[i,...this.getForced(g,t,E,T,s,y)]}normalizedPositions(g,t){return g.position.xt.position.x?{topLeft:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},downLeft:{position:new _t(t.position.x+1,t.position.y-1),layer:t.layer},top:{position:new _t(t.position.x,t.position.y+1),layer:t.layer},bottom:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},right:{position:new _t(t.position.x-1,t.position.y),layer:t.layer}}:g.position.y1?this.fillPath(T,E,y):y.push(E),T=E}return y.reverse()}fillPath(g,t,i){let y=g;do{let T=Ca(y.position,t.position);y=this.getTilePosInDir(y,T),i.push(y)}while(!no.equal(y.position,t.position))}};function kc(g,t){var i;return(i=g.get(Ri.toString(t)))!=null?i:Number.MAX_VALUE}var v4=class{constructor(g,t,i,y={}){this.character=g,this.gridTilemap=t,this.charToFollow=i;let T={distance:0,noPathFoundStrategy:"STOP",maxPathLength:1/0,shortestPathAlgorithm:"BIDIRECTIONAL_SEARCH",ignoreLayers:!1,considerCosts:y.considerCosts||!1,facingDirection:"none"};this.options=Pn(Pn({},T),y),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=g,this.updateTarget(this.charToFollow.getTilePos().position,this.charToFollow.getTilePos().layer),this.charToFollow.positionChangeStarted().pipe(Ea(this.character.autoMovementSet().pipe(gh(E=>E!==this),rc(1)))).subscribe(({enterTile:E,enterLayer:s})=>{this.updateTarget(E,s)})}update(g){var t;(t=this.targetMovement)==null||t.update(g)}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 g=Sm[this.options.facingDirection]+Sm[this.charToFollow.getFacingDirection()],t=iC("up",g),i={x:this.charToFollow.getTilePos().position.x,y:this.charToFollow.getTilePos().position.y};return t==="right"?i.x+=this.charToFollow.getTileWidth()-1:t==="down"?i.y+=this.charToFollow.getTileWidth()-1:t==="down-left"?i.y+=this.charToFollow.getTileWidth()-1:t==="down-right"?(i.y+=this.charToFollow.getTileWidth()-1,i.x+=this.charToFollow.getTileWidth()-1):t==="up-right"&&(i.x+=this.charToFollow.getTileWidth()-1),this.gridTilemap.getTilePosInDirection({position:new _t(i),layer:this.charToFollow.getTilePos().layer},t).position}updateTarget(g,t){let i=this.options.facingDirection!=="none"&&this.options.distance===0;i&&(g=this.getFacingPos()),this.targetMovement=new GC(this.character,this.gridTilemap,{position:new _t(g),layer:t},{distance:i?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()]}})}},cT=class{static getRandomInt(g){return Math.floor(Math.random()*Math.floor(g))}},m4=class{constructor(g,t=0,i=-1){this.character=g,this.delay=t,this.radius=i,this.stepSize=0,this.delayLeft=this.delay,this.initialRow=g.getNextTilePos().position.y,this.initialCol=g.getNextTilePos().position.x,this.randomizeStepSize(),this.stepsWalked=0,this.currentMovementDirection="none",this.character.positionChangeStarted().pipe(Ea(this.character.autoMovementSet().pipe(gh(y=>y!==this),rc(1)))).subscribe(()=>{this.stepsWalked++}),this.distanceUtils=Ed.create(g.getNumberOfDirections())}update(g){if(this.shouldContinueWalkingCurrentDirection())this.character.move(this.currentMovementDirection);else if(this.delayLeft-=g,this.delayLeft<=0){this.delayLeft=this.delay;let t=this.getFreeRandomDirection();this.stepsWalked=0,this.character.move(t),this.currentMovementDirection=t,this.randomizeStepSize()}}getInfo(){return{type:"Random",config:{delay:this.delay,radius:this.radius}}}shouldContinueWalkingCurrentDirection(){return this.stepsWalked!this.character.isBlockingDirection(g)).filter(g=>this.isWithinRadius(g))}isWithinRadius(g){return this.radius==-1?!0:this.getDist(g)<=this.radius}getDist(g){return this.distanceUtils.distance(this.character.getNextTilePos().position.add(Pu(g)),new _t(this.initialCol,this.initialRow))}getFreeRandomDirection(){let g=this.getFreeDirections();return g.length==0?"none":g[cT.getRandomInt(g.length)]}randomizeStepSize(){this.stepSize=cT.getRandomInt(this.radius)+1}};function g4(g,t){return g.filter(i=>{var y,T,E,s,x,e;return(y=t.labels)!=null&&y.withAllLabels?(T=t.labels)==null?void 0:T.withAllLabels.every(r=>i.hasLabel(r)):(E=t.labels)!=null&&E.withOneOfLabels?(s=t.labels)==null?void 0:s.withOneOfLabels.some(r=>i.hasLabel(r)):(x=t.labels)!=null&&x.withNoneLabels?!((e=t.labels)!=null&&e.withNoneLabels.some(r=>i.hasLabel(r))):!0})}var NC="2.44.6",y4=class{constructor(g,t){this.collistionStrategy=g,this.collisionGroupRelation=t,this.tilePosToCharacters=new x4,this.charRemoved$=new Nn}isCharBlockingAt(g,t,i,y=new Set,T=new Set){if(i.length===0)return!1;let E=this.tilePosToCharacters.get(g,t);return!!(E&&E.size>0&&[...E].filter(s=>!y.has(s.getId())).filter(s=>!this.doIntersect(s.getCollisionGroups(),T)).some(s=>i.some(x=>s.getCollisionGroups().some(e=>this.collidesWith(x,e)))))}doIntersect(g,t){for(let i of g)if(t.has(i))return!0;return!1}collidesWith(g,t){return this.collisionGroupRelation?(this.collisionGroupRelation.get(g)||new Set).has(t):g===t}getCharactersAt(g,t){return this.tilePosToCharacters.get(g,t)||new Set}addCharacter(g){this.addTilePositions(g.getTilePos(),g),this.addTilePositions(g.getNextTilePos(),g),this.addPositionChangeSub(g),this.addPositionChangeFinishedSub(g),this.addTilePosSetSub(g)}removeCharacter(g){let t=g.getId();this.charRemoved$.next(t),this.deleteTilePositions(g.getTilePos(),g),this.deleteTilePositions(g.getNextTilePos(),g)}add(g,t,i){let y=this.tilePosToCharacters.get(g,t);y||this.tilePosToCharacters.set(g,t,new Set([i])),y?.add(i)}addTilePosSetSub(g){g.tilePositionSet().pipe(Ea(this.charRemoved(g.getId()))).subscribe(t=>{this.deleteTilePositions(g.getNextTilePos(),g),this.addTilePositions(t,g)})}charRemoved(g){var t;return(t=this.charRemoved$)==null?void 0:t.pipe(rc(1),gh(i=>i==g))}addPositionChangeSub(g){g.positionChangeStarted().pipe(Ea(this.charRemoved(g.getId())),this.posChangeToLayerPos()).subscribe(t=>{this.collistionStrategy==="BLOCK_ONE_TILE_AHEAD"&&this.deleteTilePositions(t.exit,g),this.addTilePositions(t.enter,g)})}addPositionChangeFinishedSub(g){g.positionChangeFinished().pipe(Ea(this.charRemoved(g.getId())),this.posChangeToLayerPos()).subscribe(t=>{this.deleteTilePositions(t.exit,g),this.addTilePositions(t.enter,g)})}addTilePositions(g,t){this.forEachCharTile(g,t,(i,y)=>{this.add(new _t(i,y),g.layer,t)})}deleteTilePositions(g,t){this.forEachCharTile(g,t,(i,y)=>{var T;(T=this.tilePosToCharacters.get(new _t(i,y),g.layer))==null||T.delete(t)})}forEachCharTile(g,t,i){let y=g.position;for(let T=y.x;T({enter:{position:new _t(g.enterTile),layer:g.enterLayer},exit:{position:new _t(g.exitTile),layer:g.exitLayer}})))}posToString(g,t){return`${g.x}#${g.y}#${t}`}},x4=class{constructor(){this.memo=new Map}set(g,t,i){let y=this.memo.get(g.x);y||(y=new Map,this.memo.set(g.x,y));let T=y.get(g.y);T||(T=new Map,y.set(g.y,T)),T.set(t,i)}get(g,t){let i=this.memo.get(g.x);if(!i)return;let y=i.get(g.y);if(y)return y.get(t)}},t1=class{constructor(g,t,i,y){this.x=g,this.y=t,this.width=i,this.height=y}getX(){return this.x}getY(){return this.y}getWidth(){return this.width}getHeight(){return this.height}isInRange(g){return g.x>=this.x&&g.x=this.y&&g.yi.isCharLayer());for(let i of[...t,void 0]){let y=this.tileCollisionCache.get(i?.getName());if(y===void 0){y=new Array(this.tilemap.getWidth());for(let T=0;T>t&1)==1}var pT="ge_cost",BC=class UC{constructor(t,i,y,T=void 0,E=!1){this.tilemap=t,this.collisionTilePropertyName=i,this.useTileCollisionCache=E,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 y4(y,T);for(let s of Qx())this.collidesPropNames.set(s,UC.ONE_WAY_COLLIDE_PROP_PREFIX+s),this.tileCostPropNames.set(s,`${pT}_${s}`);this.useTileCollisionCache&&(this.tileCollisionCache=new T4(t,this),this.tileCollisionCache.rebuild())}fixCacheLayer(t){var i;(i=this.tileCollisionCache)==null||i.fixLayer(t)}unfixCacheLayers(){var t;(t=this.tileCollisionCache)==null||t.unfixLayers()}addCharacter(t){this.characters.set(t.getId(),t);let i=t.getNextTilePos().layer;i===void 0?t.setTilePosition(mh(Pn({},t.getNextTilePos()),{layer:this.getLowestCharLayer()})):this.getCharLayerNames().includes(i)||console.warn(`Char layer '${i}' of character '${t.getId()}' is unknown.`),this.charBlockCache.addCharacter(t)}removeCharacter(t){let i=this.characters.get(t);i&&(this.charBlockCache.removeCharacter(i),this.characters.delete(t))}getCharacters(){return[...this.characters.values()]}getCharactersAt(t,i){return this.charBlockCache.getCharactersAt(t,i)}rebuildTileCollisionCache(t){var i;(i=this.tileCollisionCache)==null||i.rebuild(t)}hasBlockingTileUncached(t,i,y,T){if(!T&&this.hasNoTileUncached(t,i))return!0;let E=this.getCollisionRelevantLayers(i);for(let s of E)if(this.isLayerBlockingAt(s.getName(),t,y))return!0;return!1}hasBlockingTile(t,i,y,T){var E;let s=(E=this.tileCollisionCache)==null?void 0:E.isBlockingFrom(t.x,t.y,i,y,T);return s!==void 0?s:this.hasBlockingTileUncached(t,i,y,T)}getTransition(t,i){let y=this.transitions.get(t.toString());if(y)return y.get(i)}getReverseTransitions(t,i){let y=this.reverseTransitions.get(t.toString());if(y)return y.get(i)}setTransition(t,i,y){var T,E,s,x,e;this.transitions.has(t.toString())||this.transitions.set(t.toString(),new Map),this.reverseTransitions.has(t.toString())||this.reverseTransitions.set(t.toString(),new Map),(T=this.transitions.get(t.toString()))==null||T.set(i,y),(E=this.reverseTransitions.get(t.toString()))!=null&&E.has(y)||(s=this.reverseTransitions.get(t.toString()))==null||s.set(y,new Set),(e=(x=this.reverseTransitions.get(t.toString()))==null?void 0:x.get(y))==null||e.add(i)}getTransitions(){return new Map([...this.transitions].map(([t,i])=>[t,new Map(i)]))}getTileCosts(t,i){let y=this.getCollisionRelevantLayers(t.layer),T=1;for(let E of y)T=Math.max(T,this.getTileCostsForLayer(mh(Pn({},t),{layer:E.getName()}),i));return T}getTileCostsForLayer(t,i){let y=this.tilemap.getTileAt(t.position.x,t.position.y,t.layer);return i&&y?.getProperty(this.tileCostPropNames.get(i)||"")||y?.getProperty(pT)||1}hasNoTileUncached(t,i){return!this.getCollisionRelevantLayers(i).some(y=>this.tilemap.hasTileAt(t.x,t.y,y.getName()))}hasNoTile(t,i){var y;let T=(y=this.tileCollisionCache)==null?void 0:y.hasTileAt(t.x,t.y,i);return T!==void 0?T:this.hasNoTileUncached(t,i)}hasBlockingChar(t,i,y,T=new Set,E=new Set){return this.charBlockCache.isCharBlockingAt(t,i,y,T,E)}isInRange(t){return new t1(0,0,this.tilemap.getWidth(),this.tilemap.getHeight()).isInRange(t)}toMapDirection(t){return this.isIsometric()?CO(t):t}fromMapDirection(t){return this.isIsometric()?iC(t):t}isIsometric(){return this.tilemap.getOrientation()==="isometric"}getTilePosInDirection(t,i){let y=t.position.add(Pu(this.toMapDirection(i))),T=this.getTransition(y,t.layer)||t.layer;return{position:y,layer:T}}invalidateFrameCache(){this.collisionRelevantLayersFrameCache.clear()}isLayerBlockingAt(t,i,y){let T=this.tilemap.getTileAt(i.x,i.y,t);return T?!!(T.getProperty(this.collisionTilePropertyName)||y&&T.getProperty(this.collidesPropNames.get(y)||"")):!1}getCharLayerIndexes(){return this.tilemap.getLayers().map((t,i)=>({layer:t,index:i})).filter(({layer:t})=>t.isCharLayer()).map(({index:t})=>t)}findPrevAndCharLayer(t){let i=this.getCharLayerIndexes(),y=this.tilemap.getLayers(),T=i.findIndex(E=>y[E].getProperty(rm)==t);return T==0?{prevIndex:-1,charLayerIndex:i[T]}:{prevIndex:i[T-1],charLayerIndex:i[T]}}getCollisionRelevantLayers(t){if(!t)return this.tilemap.getLayers();let i=this.collisionRelevantLayersFrameCache.get(t);if(i)return i;let{prevIndex:y,charLayerIndex:T}=this.findPrevAndCharLayer(t),E=this.tilemap.getLayers().slice(y+1,T+1);return this.collisionRelevantLayersFrameCache.set(t,E),E}getLowestCharLayer(){for(let t of this.tilemap.getLayers())if(t.isCharLayer())return t.getProperty(rm)}getCharLayerNames(){return this.tilemap.getLayers().filter(t=>t.isCharLayer()).map(t=>t.getProperty(rm)).filter(M4)}};BC.ONE_WAY_COLLIDE_PROP_PREFIX="ge_collide_";var E4=BC;function M4(g){return g!=null}var C4=(g=>(g.REMOVED="REMOVED",g.ADDED="ADDED",g))(C4||{}),w4=(g=>(g.WAIT="WAIT",g.SKIP="SKIP",g.STOP="STOP",g))(w4||{}),A4=class{constructor(g,t){this.character=g,this.tilemap=t,this.queue=new Tm,this.finished$=new Nn,this.pathBlockedWaitElapsed=0,this.distanceUtils=Ed.create(g.getNumberOfDirections()),this.character.autoMovementSet().pipe(gh(i=>i!==this),rc(1)).subscribe(()=>{this.queue.size()>0&&this.finishMovementTerminated(),this.finished$.complete()})}update(g){(!this.character.isMoving()||this.character.willCrossTileBorderThisUpdate(g))&&this.queue.size()>0&&this.moveCharOnPath(g)}getInfo(){return{type:"Queue"}}enqueue(g,t={}){var i,y,T;let E={pathBlockedStrategy:(i=t.pathBlockedStrategy)!=null?i:"STOP",pathBlockedWaitTimeoutMs:t?.pathBlockedWaitTimeoutMs||-1,ignoreInvalidPositions:(y=t.ignoreInvalidPositions)!=null?y:!1,skipInvalidPositions:(T=t.skipInvalidPositions)!=null?T:!1};for(let s of g){let x={command:s,config:E};if(zf(s)){this.queue.enqueue(x);continue}let e=this.queue.peekEnd(),r=e?.command;if(r||(r=this.character.getNextTilePos()),zf(r)){this.queue.enqueue(x);continue}let d=this.distanceUtils.distance(r.position,s.position)===1;(!t.ignoreInvalidPositions||d)&&this.queue.enqueue(x)}}peekAll(){return this.queue.peekAll()}size(){return this.queue.size()}finished(){return this.finished$}clear(){this.queue.clear()}moveCharOnPath(g){let t=this.queue.peek();if(!t)return;let i=t.command,y=t.config;if(zf(i)&&(i=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),i)),y.skipInvalidPositions){if(i=this.getNextValidPosition(),!i){this.finishInvalidNextPos(i);return}}else if(!this.isNeighborPos(i)){this.finishInvalidNextPos(i);return}if(this.character.isBlockingDirection(Ca(this.character.getNextTilePos().position,i.position))){if(y.pathBlockedStrategy==="STOP")this.finishPathBlocked(i);else if(y.pathBlockedStrategy==="SKIP"){this.queue.dequeue(),this.moveCharOnPath(g);return}else y.pathBlockedStrategy==="WAIT"&&y.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=g,this.pathBlockedWaitElapsed>=y.pathBlockedWaitTimeoutMs&&this.finishBlockedWaitTimeout(i,y.pathBlockedWaitTimeoutMs));return}this.pathBlockedWaitElapsed=0,this.queue.dequeue(),this.character.move(this.getDir(this.character.getNextTilePos().position,i.position)),this.isLastMovement()&&this.finish("SUCCESS","",i)}getNextValidPosition(){for(var g;this.queue.size()>0;){let t=(g=this.queue.peek())==null?void 0:g.command;if(zf(t)&&(t=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),t)),t&&this.isNeighborPos(t))return t;this.queue.dequeue()}}isLastMovement(){return this.queue.size()===0}isNeighborPos(g){let t=this.distanceUtils.distance(this.character.getNextTilePos().position,g.position)===1,i=this.tilemap.getTransition(g.position,this.character.getNextTilePos().layer);if(this.character.getNextTilePos().layer!==g.layer)return t&&i===g.layer;let y=i!==void 0&&i!==g.layer;return t&&!y}finishMovementTerminated(){this.finish("MOVEMENT_TERMINATED","New automatic movement has been set to character.")}finishInvalidNextPos(g){g?this.finish("INVALID_NEXT_POS",`Position ${this.posToStr(g)} 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(g){this.finish("PATH_BLOCKED",`Position ${this.posToStr(g)} is blocked.`)}finishBlockedWaitTimeout(g,t){this.finish("PATH_BLOCKED_WAIT_TIMEOUT",`Position ${this.posToStr(g)} is blocked and the wait timeout of ${t} ms has been exceeded.`)}finish(g,t="",i=this.character.getNextTilePos()){this.queue=new Tm,this.finished$.next({position:i.position,result:g,description:t,layer:i.layer})}getDir(g,t){return this.tilemap.fromMapDirection(Ca(g,t))}posToStr(g){return`(${g.position.x}, ${g.position.y}, ${g.layer})`}},P4=class{constructor(g=!0){this.isCreatedInternal=!1,g&&console.log(`Using GridEngine v${NC}`)}getCharLayer(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getTilePos().layer}getTransition(g,t){var i;return this.initGuard(),(i=this.gridTilemap)==null?void 0:i.getTransition(new _t(g),t)}setTransition(g,t,i){var y;return this.initGuard(),(y=this.gridTilemap)==null?void 0:y.setTransition(new _t(g),t,i)}create(g,t){this.isCreatedInternal=!0,this.gridCharacters=new Map;let i=this.setConfigDefaults(t);this.config=i,this.movementStopped$=new Nn,this.movementStarted$=new Nn,this.directionChanged$=new Nn,this.positionChangeStarted$=new Nn,this.positionChangeFinished$=new Nn,this.queueMovementFinished$=new Nn,this.charRemoved$=new Nn,this.charAdded$=new Nn,this.gridTilemap=new E4(g,this.config.collisionTilePropertyName,this.config.characterCollisionStrategy,this.recordToMap(this.config.collisionGroupRelation),this.config.cacheTileCollisions),this.addCharacters()}recordToMap(g){return g?new Map(Object.entries(g).map(([t,i])=>[t,new Set(i)])):void 0}getPosition(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getTilePos().position}move(g,t){this.moveChar(g,t)}moveRandomly(g,t=0,i=-1){var y;this.initGuard();let T=(y=this.gridCharacters)==null?void 0:y.get(g);if(!T)throw this.createCharUnknownErr(g);let E=new m4(T,t,i);T.setMovement(E)}getMovement(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);let y=i.getMovement();return y?y.getInfo():{type:"None"}}moveTo(g,t,i){var y;let T=this.assembleMoveToConfig(i);this.initGuard();let E=(y=this.gridCharacters)==null?void 0:y.get(g);if(!E)throw this.createCharUnknownErr(g);if(!this.gridTilemap)throw this.createUninitializedErr();let s=new GC(E,this.gridTilemap,{position:new _t(t),layer:i?.targetLayer||E.getNextTilePos().layer},{distance:0,config:T});return E.setMovement(s),s.finishedObs().pipe(fd(x=>({charId:g,position:x.position,result:x.result,description:x.description,layer:x.layer})))}stopMovement(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);i.setMovement(void 0)}setSpeed(g,t){var i;this.initGuard();let y=(i=this.gridCharacters)==null?void 0:i.get(g);if(!y)throw this.createCharUnknownErr(g);y.setSpeed(t)}getSpeed(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getSpeed()}collidesWithTiles(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.collidesWithTiles()}update(g,t){var i;if(this.isCreatedInternal&&this.gridCharacters)for(let[y,T]of this.gridCharacters)T.update(t);(i=this.gridTilemap)==null||i.invalidateFrameCache()}addCharacter(g){var t,i,y,T,E;if(!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let s={speed:g.speed||4,tilemap:this.gridTilemap,collidesWithTiles:!0,collisionGroups:["geDefault"],ignoreCollisionGroups:[],charLayer:g.charLayer,facingDirection:g.facingDirection,labels:g.labels,numberOfDirections:(t=g.numberOfDirections)!=null?t:this.config.numberOfDirections,tileWidth:g.tileWidth,tileHeight:g.tileHeight};typeof g.collides=="boolean"?g.collides===!1&&(s.collidesWithTiles=!1,s.collisionGroups=[]):g.collides!==void 0&&(g.collides.collidesWithTiles===!1&&(s.collidesWithTiles=!1),g.collides.collisionGroups&&(s.collisionGroups=g.collides.collisionGroups),g.collides.ignoreCollisionGroups&&(s.ignoreCollisionGroups=g.collides.ignoreCollisionGroups),s.ignoreMissingTiles=(y=(i=g.collides)==null?void 0:i.ignoreMissingTiles)!=null?y:!1);let x=new o4(g.id,s);g.startPosition&&x.setTilePosition({position:new _t(g.startPosition),layer:x.getTilePos().layer}),(T=this.gridCharacters)==null||T.set(g.id,x),this.gridTilemap.addCharacter(x);let e=x.getId();x.movementStopped().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var d;(d=this.movementStopped$)==null||d.next({charId:e,direction:r})}),x.movementStarted().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var d;(d=this.movementStarted$)==null||d.next({charId:e,direction:r})}),x.directionChanged().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var d;(d=this.directionChanged$)==null||d.next({charId:e,direction:r})}),x.positionChangeStarted().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var d;(d=this.positionChangeStarted$)==null||d.next(Pn({charId:e},r))}),x.positionChangeFinished().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var d;(d=this.positionChangeFinished$)==null||d.next(Pn({charId:e},r))}),(E=this.charAdded$)==null||E.next(e)}hasCharacter(g){var t;return this.initGuard(),!!((t=this.gridCharacters)!=null&&t.has(g))}removeCharacter(g){var t,i,y,T;if(this.initGuard(),!((t=this.gridCharacters)!=null&&t.get(g)))throw this.createCharUnknownErr(g);(i=this.gridTilemap)==null||i.removeCharacter(g),(y=this.gridCharacters)==null||y.delete(g),(T=this.charRemoved$)==null||T.next(g)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters)for(let g of this.gridCharacters.keys())this.removeCharacter(g)}getAllCharacters(g){if(this.initGuard(),!this.gridCharacters)return[];let t=[...this.gridCharacters.values()];return(g?g4(t,g):t).map(i=>i.getId())}getLabels(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getLabels()}addLabels(g,t){var i;this.initGuard();let y=(i=this.gridCharacters)==null?void 0:i.get(g);if(!y)throw this.createCharUnknownErr(g);y.addLabels(t)}removeLabels(g,t){var i;this.initGuard();let y=(i=this.gridCharacters)==null?void 0:i.get(g);if(!y)throw this.createCharUnknownErr(g);y.removeLabels(t)}clearLabels(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);i.clearLabels()}follow(g,t,i,y){var T,E,s,x,e,r;let d;i===void 0?d={distance:0,closestPointIfBlocked:!1}:typeof i=="number"?(d={distance:i,closestPointIfBlocked:!1},y&&(d.closestPointIfBlocked=!0)):d=i,this.initGuard();let h=(T=this.gridCharacters)==null?void 0:T.get(g),a=(E=this.gridCharacters)==null?void 0:E.get(t);if(!h)throw this.createCharUnknownErr(g);if(!a)throw this.createCharUnknownErr(t);if(!this.gridTilemap)throw this.createUninitializedErr();let l=new v4(h,this.gridTilemap,a,{distance:(s=d.distance)!=null?s:0,noPathFoundStrategy:d.closestPointIfBlocked?"CLOSEST_REACHABLE":"STOP",maxPathLength:(x=d.maxPathLength)!=null?x:1/0,shortestPathAlgorithm:(e=d.algorithm)!=null?e:"BIDIRECTIONAL_SEARCH",ignoreLayers:!!d.ignoreLayers,facingDirection:(r=d.facingDirection)!=null?r:"none"});h.setMovement(l)}isMoving(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.isMoving()}getFacingDirection(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getFacingDirection()}getFacingPosition(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);let y=i.getFacingPosition();return{x:y.x,y:y.y}}turnTowards(g,t){var i;this.initGuard();let y=(i=this.gridCharacters)==null?void 0:i.get(g);if(!y)throw this.createCharUnknownErr(g);return y.turnTowards(t)}getCharactersAt(g,t){if(this.initGuard(),!this.gridTilemap)return[];let i=this.gridTilemap.getCharactersAt(new _t(g),t);return Array.from(i).map(y=>y.getId())}setPosition(g,t,i){var y;this.initGuard();let T=(y=this.gridCharacters)==null?void 0:y.get(g);if(!T)throw this.createCharUnknownErr(g);i||T.setTilePosition({position:new _t(t),layer:T.getTilePos().layer}),T.setTilePosition({position:new _t(t),layer:i})}isBlocked(g,t,i=["geDefault"]){var y,T;this.initGuard();let E=new _t(g);return!!((y=this.gridTilemap)!=null&&y.hasBlockingTile(E,t)||(T=this.gridTilemap)!=null&&T.hasBlockingChar(E,t,i))}isTileBlocked(g,t){var i;return this.initGuard(),!!((i=this.gridTilemap)!=null&&i.hasBlockingTile(new _t(g),t))}getCollisionGroups(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getCollisionGroups()||[]}setCollisionGroups(g,t){var i;this.initGuard();let y=(i=this.gridCharacters)==null?void 0:i.get(g);if(!y)throw this.createCharUnknownErr(g);y.setCollisionGroups(t)}getIgnoreCollisionGroups(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getIgnoreCollisionGroups()||[]}setIgnoreCollisionGroups(g,t){var i;this.initGuard();let y=(i=this.gridCharacters)==null?void 0:i.get(g);if(!y)throw this.createCharUnknownErr(g);y.setIgnoreCollisionGroups(t)}getTilePosInDirection(g,t,i){if(!this.gridTilemap)throw this.createUninitializedErr();let y=this.gridTilemap.getTilePosInDirection({position:new _t(g),layer:t},i);return{position:y.position.toPosition(),charLayer:y.layer}}findShortestPath(g,t,i={}){if(!this.gridTilemap)throw this.createUninitializedErr();let y=i.shortestPathAlgorithm||"BFS";i.considerCosts&&y!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${y}'. It can only be used with A* algorithm.`);let T=i.pathWidth!==void 0&&i.pathWidth!==1,E=i.pathHeight!==void 0&&i.pathHeight!==1;(T||E)&&y==="JPS"&&console.warn("GridEngine: Pathfinding options 'pathWidth' and 'pathHeight' > 1 cannot be used with algorithm 'JPS'.");let s=new zC(this.gridTilemap).findShortestPath(Ri.toInternal(g),Ri.toInternal(t),mh(Pn({},i),{shortestPathAlgorithm:y}));return{path:s.path.map(Ri.fromInternal),closestToTarget:s.closestToTarget?Ri.fromInternal(s.closestToTarget):void 0,reachedMaxPathLength:!1,steps:s.steps}}steppedOn(g,t,i){return this.positionChangeFinished().pipe(gh(y=>g.includes(y.charId)&&t.some(T=>T.x===y.enterTile.x&&T.y===y.enterTile.y)&&(i===void 0||i.includes(y.enterLayer))))}characterShifted(){if(!this.charAdded$||!this.charRemoved$)throw this.createUninitializedErr();return this.charAdded$.pipe(fd(g=>({charId:g,action:"ADDED"})),a4(this.charRemoved$.pipe(fd(g=>({charId:g,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(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getMovementProgress()}rebuildTileCollisionCache(g,t,i,y){var T;(T=this.gridTilemap)==null||T.rebuildTileCollisionCache(new t1(g,t,i,y))}addQueueMovements(g,t,i){var y,T;this.initGuard();let E=(y=this.gridCharacters)==null?void 0:y.get(g);if(!E)throw this.createCharUnknownErr(g);if(!this.gridTilemap)throw this.createUninitializedErr();let s;((T=E?.getMovement())==null?void 0:T.getInfo().type)==="Queue"?s=E.getMovement():(s=new A4(E,this.gridTilemap),E.setMovement(s),s.finished().pipe(Ea(i4(this.charRemoved(g),E.autoMovementSet()))).subscribe(x=>{var e;(e=this.queueMovementFinished$)==null||e.next(Pn({charId:g},x))})),s.enqueue(t.map(x=>zf(x)?x:{position:new _t(x.position),layer:x.charLayer}),i)}queueMovementFinished(){if(!this.queueMovementFinished$)throw this.createUninitializedErr();return this.queueMovementFinished$}getEnqueuedMovements(g){var t,i;this.initGuard();let y=(t=this.gridCharacters)==null?void 0:t.get(g);if(!y)throw this.createCharUnknownErr(g);return((i=y.getMovement())==null?void 0:i.getInfo().type)==="Queue"?y.getMovement().peekAll().map(T=>({command:zf(T.command)?T.command:Ri.fromInternal(T.command),config:T.config})):[]}clearEnqueuedMovements(g){var t,i;this.initGuard();let y=(t=this.gridCharacters)==null?void 0:t.get(g);if(!y)throw this.createCharUnknownErr(g);((i=y.getMovement())==null?void 0:i.getInfo().type)==="Queue"&&y.getMovement().clear()}getTileCost(g,t,i){var y,T;return this.initGuard(),(T=(y=this.gridTilemap)==null?void 0:y.getTileCosts({position:new _t(g),layer:t},i))!=null?T:1}getState(){let g=[];if(this.gridCharacters)for(let[t,i]of this.gridCharacters.entries())g.push({id:t,position:Ri.fromInternal(i.getTilePos()),facingDirection:i.getFacingDirection(),speed:i.getSpeed(),labels:i.getLabels(),movementProgress:i.getMovementProgress(),collisionConfig:{collisionGroups:i.getCollisionGroups(),ignoreCollisionGroups:i.getIgnoreCollisionGroups(),collidesWithTiles:i.collidesWithTiles(),ignoreMissingTiles:i.getIgnoreMissingTiles()}});return{characters:g}}setState(g){if(this.gridCharacters)for(let t of g.characters){let i=this.gridCharacters.get(t.id);if(i){let y=i.getTilePos();Ri.equal(y,Ri.toInternal(t.position))||i.setTilePosition(Ri.toInternal(t.position)),i.setSpeed(t.speed),i.turnTowards(t.facingDirection),t.collisionConfig.collisionGroups&&i.setCollisionGroups(t.collisionConfig.collisionGroups),t.collisionConfig.collidesWithTiles!==void 0&&i.setCollidesWithTiles(t.collisionConfig.collidesWithTiles),t.collisionConfig.ignoreMissingTiles!==void 0&&i.setIgnoreMissingTiles(t.collisionConfig.ignoreMissingTiles),i.setMovementProgress(t.movementProgress),i.clearLabels(),i.addLabels(t.labels)}}}charRemoved(g){var t;if(!this.charRemoved$)throw this.createUninitializedErr();return(t=this.charRemoved$)==null?void 0:t.pipe(rc(1),gh(i=>i==g))}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var g;(g=this.config)==null||g.characters.forEach(t=>this.addCharacter(t))}moveChar(g,t){var i,y,T;this.initGuard();let E=(i=this.gridCharacters)==null?void 0:i.get(g);if(!E)throw this.createCharUnknownErr(g);if(E.getNumberOfDirections()===4){if(!((y=this.gridTilemap)!=null&&y.isIsometric())&&ud(t)){console.warn(`GridEngine: Character '${g}' can't be moved '${t}' in 4 direction mode.`);return}else if((T=this.gridTilemap)!=null&&T.isIsometric()&&!ud(t)){console.warn(`GridEngine: Character '${g}' can't be moved '${t}' in 4 direction isometric mode.`);return}}E.move(t)}createCharUnknownErr(g){return new Error(`Character unknown: ${g}`)}assembleMoveToConfig(g={}){let t=mh(Pn({},g),{noPathFoundStrategy:"STOP",pathBlockedStrategy:"WAIT"});return g!=null&&g.noPathFoundStrategy&&(Object.values(FC).includes(g.noPathFoundStrategy)?t.noPathFoundStrategy=g.noPathFoundStrategy:console.warn(`GridEngine: Unknown NoPathFoundStrategy '${g.noPathFoundStrategy}'. Falling back to 'STOP'`)),g!=null&&g.pathBlockedStrategy&&(Object.values(OC).includes(g.pathBlockedStrategy)?t.pathBlockedStrategy=g.pathBlockedStrategy:console.warn(`GridEngine: Unknown PathBlockedStrategy '${g.pathBlockedStrategy}'. Falling back to 'WAIT'`)),t}setConfigDefaults(g){return Pn({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",cacheTileCollisions:!1},g)}},R4=class extends IC{constructor(g,t={}){super(g,t),this.jumpCache=new vT}findShortestPathImpl(g,t){return this.jumpCache=new vT,super.findShortestPathImpl(g,t)}getNeighborsInternal(g,t,i){if(!t||g.layer!==t.layer)return this.getNeighbors(g,i).map(E=>({p:E,dist:1}));let y=this.prune(t,g).map(E=>{let s=this.getTransition(E.position,g.layer);return{position:E.position,layer:s||g.layer}}),T=[];for(let E of y){let s=this.jump(g,E,i,1,Ca(g.position,E.position));s&&(s.dist=this.distance(g.position,s.p.position),T.push(s))}return T}getForced(g,t){let i=[],{topLeft:y,downLeft:T,top:E,bottom:s,topRight:x,downRight:e}=this.normalizedPositions(g,t),r=Ca(g.position,t.position);return ud(r)?(this.blockOrTrans(g,y)&&(this.addIfNotBlocked(i,t,E),this.addIfNotBlocked(i,t,x),this.blockOrTrans(T,y)&&this.addIfNotBlocked(i,t,y)),this.blockOrTrans(g,T)&&(this.addIfNotBlocked(i,t,s),this.addIfNotBlocked(i,t,e),this.blockOrTrans(y,T)&&this.addIfNotBlocked(i,t,T)),this.blockOrTrans(y,E)&&this.addIfNotBlocked(i,t,E),this.blockOrTrans(T,s)&&this.addIfNotBlocked(i,t,s),this.blockOrTrans(y,x)&&this.addIfNotBlocked(i,t,x),this.blockOrTrans(T,e)&&this.addIfNotBlocked(i,t,e)):((this.blockOrTrans(g,E)||this.blockOrTrans(E,x))&&this.addIfNotBlocked(i,t,x),(this.blockOrTrans(g,s)||this.blockOrTrans(s,e))&&this.addIfNotBlocked(i,t,e),this.blockOrTrans(g,y)&&this.blockOrTrans(g,E)&&(this.addIfNotBlocked(i,t,E),this.addIfNotBlocked(i,t,y)),this.blockOrTrans(g,T)&&this.blockOrTrans(g,s)&&(this.addIfNotBlocked(i,t,s),this.addIfNotBlocked(i,t,T)),this.blockOrTrans(y,E)&&this.blockOrTrans(g,E)&&this.addIfNotBlocked(i,t,E),this.blockOrTrans(T,s)&&this.blockOrTrans(g,s)&&this.addIfNotBlocked(i,t,s)),i}hasForced(g,t){let{topLeft:i,downLeft:y,top:T,bottom:E,topRight:s,downRight:x}=this.normalizedPositions(g,t),e=Ca(g.position,t.position);if(ud(e)){if(this.blockOrTrans(g,i)&&(!this.blockOrTrans(t,T)||!this.blockOrTrans(t,s)||this.blockOrTrans(y,i)&&!this.blockOrTrans(t,i))||this.blockOrTrans(g,y)&&(!this.blockOrTrans(t,E)||!this.blockOrTrans(t,x)||this.blockOrTrans(i,y)&&!this.blockOrTrans(t,y))||this.blockOrTrans(i,T)&&!this.blockOrTrans(t,T)||this.blockOrTrans(y,E)&&!this.blockOrTrans(t,E)||this.blockOrTrans(i,s)&&!this.blockOrTrans(t,s)||this.blockOrTrans(y,x)&&!this.blockOrTrans(t,x))return!0}else if((this.blockOrTrans(g,T)||this.blockOrTrans(T,s))&&!this.blockOrTrans(t,s)||(this.blockOrTrans(g,E)||this.blockOrTrans(E,x))&&!this.blockOrTrans(t,x)||this.blockOrTrans(g,i)&&this.blockOrTrans(g,T)&&(!this.blockOrTrans(t,T)||!this.blockOrTrans(t,i))||this.blockOrTrans(g,y)&&this.blockOrTrans(g,E)&&(!this.blockOrTrans(t,E)||!this.blockOrTrans(t,y))||this.blockOrTrans(i,T)&&this.blockOrTrans(g,T)&&!this.blockOrTrans(t,T)||this.blockOrTrans(y,E)&&this.blockOrTrans(g,E)&&!this.blockOrTrans(t,E))return!0;return!1}prune(g,t){let{top:i,right:y,topRight:T,downRight:E,bottom:s}=this.normalizedPositions(g,t),x=this.getForced(g,t),e=Ca(g.position,t.position);return ud(e)?[i,y,T,E,s,...x]:[y,...x]}jump(g,t,i,y,T){let E=this.jumpCache.get(g,t);if(E!==null)return E;if(this.isBlocking(g,t)&&!(Ri.equal(t,i)&&this.options.ignoreBlockedTarget)){this.jumpCache.set(g,t,void 0);return}if(Ri.equal(t,i))return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(y>=this.maxJumpSize)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.getTransition(t.position,g.layer)!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.hasForced(g,t))return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.updateClosestToTarget(t,i),T==="up-left"){if(this.jump(t,this.getTilePosInDir(t,"up"),i,y+1,"up")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"left"),i,y+1,"left")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}else if(T==="down-left"){if(this.jump(t,this.getTilePosInDir(t,"down"),i,y+1,"down")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"left"),i,y+1,"left")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}else if(T==="up-right"){if(this.jump(t,this.getTilePosInDir(t,"up"),i,y+1,"up")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"right"),i,y+1,"right")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}else if(T==="down-right"){if(this.jump(t,this.getTilePosInDir(t,"down"),i,y+1,"down")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"right"),i,y+1,"right")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}let s=this.jump(t,this.getTilePosInDir(t,T),i,y+1,T);return this.jumpCache.set(g,t,s),s}normalizedPositions(g,t){return g.position.xt.position.x&&g.position.y===t.position.y?{topLeft:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},downLeft:{position:new _t(t.position.x+1,t.position.y-1),layer:t.layer},top:{position:new _t(t.position.x,t.position.y+1),layer:t.layer},bottom:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},right:{position:new _t(t.position.x-1,t.position.y),layer:t.layer},topRight:{position:new _t(t.position.x-1,t.position.y+1),layer:t.layer},downRight:{position:new _t(t.position.x-1,t.position.y-1),layer:t.layer}}:g.position.yt.position.y&&g.position.x===t.position.x?{topLeft:{position:new _t(t.position.x-1,t.position.y+1),layer:t.layer},downLeft:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},top:{position:new _t(t.position.x-1,t.position.y),layer:t.layer},bottom:{position:new _t(t.position.x+1,t.position.y),layer:t.layer},right:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},topRight:{position:new _t(t.position.x-1,t.position.y-1),layer:t.layer},downRight:{position:new _t(t.position.x+1,t.position.y-1),layer:t.layer}}:g.position.yt.position.x?{topLeft:{position:new _t(t.position.x+1,t.position.y),layer:t.layer},downLeft:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},top:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},bottom:{position:new _t(t.position.x-1,t.position.y-1),layer:t.layer},right:{position:new _t(t.position.x-1,t.position.y+1),layer:t.layer},topRight:{position:new _t(t.position.x,t.position.y+1),layer:t.layer},downRight:{position:new _t(t.position.x-1,t.position.y),layer:t.layer}}:g.position.y>t.position.y&&g.position.x(g.SUCCESS="SUCCESS",g.NO_PATH_FOUND_MAX_RETRIES_EXCEEDED="NO_PATH_FOUND_MAX_RETRIES_EXCEEDED",g.PATH_BLOCKED_MAX_RETRIES_EXCEEDED="PATH_BLOCKED_MAX_RETRIES_EXCEEDED",g.PATH_BLOCKED="PATH_BLOCKED",g.NO_PATH_FOUND="NO_PATH_FOUND",g.PATH_BLOCKED_WAIT_TIMEOUT="PATH_BLOCKED_WAIT_TIMEOUT",g.MOVEMENT_TERMINATED="MOVEMENT_TERMINATED",g.MAX_PATH_LENGTH_REACHED="MAX_PATH_LENGTH_REACHED",g))(L4||{}),GC=class{constructor(g,t,i,{config:y,ignoreBlockedTarget:T=!1,distance:E=0}={}){this.character=g,this.tilemap=t,this.targetPos=i,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=(e,r)=>e?new DC(this.tilemap,this.getPathfindingOptions()).isBlocking(this.character.getTilePos(),{position:e,layer:r}):!0;var s,x;this.shortestPathAlgorithm=(s=y?.algorithm)!=null?s:this.shortestPathAlgorithm,this.ignoreBlockedTarget=T,this.distance=E,this.noPathFoundStrategy=y?.noPathFoundStrategy||"STOP",this.pathBlockedStrategy=y?.pathBlockedStrategy||"WAIT",this.noPathFoundRetryable=new oT(y?.noPathFoundRetryBackoffMs||200,y?.noPathFoundMaxRetries||-1,()=>{this.stop("NO_PATH_FOUND_MAX_RETRIES_EXCEEDED")}),this.pathBlockedRetryable=new oT(y?.pathBlockedRetryBackoffMs||200,y?.pathBlockedMaxRetries||-1,()=>{this.stop("PATH_BLOCKED_MAX_RETRIES_EXCEEDED")}),y!=null&&y.isPositionAllowedFn&&(this.isPositionAllowed=y.isPositionAllowedFn),y!=null&&y.maxPathLength&&(this.maxPathLength=y.maxPathLength),this.alternativeTargets=y?.alternativeTargets,this.noPathFoundAlternativeTargetsFallbackStrategy=y?.noPathFoundAlternativeTargetsFallbackStrategy,y!=null&&y.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=y?.considerCosts||!1,this.ignoreLayers=!!(y!=null&&y.ignoreLayers),this.distanceUtils=Ed.create(g.getNumberOfDirections()),this.pathBlockedWaitTimeoutMs=y?.pathBlockedWaitTimeoutMs||-1,this.ignoredChars=(x=y?.ignoredChars)!=null?x:[],this.finished$=new Nn,this.setCharacter(g)}setPathBlockedStrategy(g){this.pathBlockedStrategy=g}getPathBlockedStrategy(){return this.pathBlockedStrategy}setCharacter(g){this.character=g,this.noPathFoundRetryable.reset(),this.pathBlockedRetryable.reset(),this.pathBlockedWaitElapsed=0,this.calcShortestPath(),this.character.autoMovementSet().pipe(gh(t=>t!==this),rc(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(g){var t,i,y,T;this.stopped||(this.noPathFound()&&(this.noPathFoundStrategy==="RETRY"?this.noPathFoundRetryable.retry(g,()=>this.calcShortestPath()):this.noPathFoundStrategy==="STOP"&&this.stop("NO_PATH_FOUND")),this.updatePosOnPath(),this.isBlocking((t=this.nextTileOnPath())==null?void 0:t.position,(i=this.character)==null?void 0:i.getNextTilePos().layer)?this.applyPathBlockedStrategy(g):this.pathBlockedWaitElapsed=0,this.hasArrived()?(this.stop("SUCCESS"),this.existsDistToTarget()&&this.turnTowardsTarget()):this.isBlocking((y=this.nextTileOnPath())==null?void 0:y.position,(T=this.character)==null?void 0:T.getNextTilePos().layer)||this.moveCharOnPath())}finishedObs(){return this.finished$}getInfo(){return{type:"Target",state:{pathAhead:this.shortestPath.slice(this.posOnPath).map(g=>Ri.fromInternal(g))},config:{algorithm:this.shortestPathAlgorithm,ignoreBlockedTarget:this.ignoreBlockedTarget,distance:this.distance,targetPos:Ri.fromInternal(this.targetPos),noPathFoundStrategy:this.noPathFoundStrategy,pathBlockedStrategy:this.pathBlockedStrategy,noPathFoundRetryBackoffMs:this.noPathFoundRetryable.getBackoffMs(),noPathFoundMaxRetries:this.noPathFoundRetryable.getMaxRetries()}}}resultToReason(g){switch(g){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(g){this.pathBlockedStrategy==="RETRY"?this.pathBlockedRetryable.retry(g,()=>{let t=this.getShortestPath();t.path.length>0&&this.calcShortestPath(t)}):this.pathBlockedStrategy==="STOP"?this.stop("PATH_BLOCKED"):this.pathBlockedStrategy==="WAIT"&&this.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=g,this.pathBlockedWaitElapsed>=this.pathBlockedWaitTimeoutMs&&this.stop("PATH_BLOCKED_WAIT_TIMEOUT"))}moveCharOnPath(){let g=this.nextTileOnPath();if(!g)return;let t=this.getDir(this.character.getNextTilePos().position,g.position);this.character.move(t)}nextTileOnPath(){return this.shortestPath[this.posOnPath+1]}stop(g){this.finished$.next({position:this.character.getTilePos().position,result:g,description:this.resultToReason(g),layer:this.character.getTilePos().layer}),this.finished$.complete(),this.stopped=!0}turnTowardsTarget(){let g=this.shortestPath[this.posOnPath+1],t=this.getDir(this.character.getNextTilePos().position,g.position);this.character.turnTowards(t)}existsDistToTarget(){return this.posOnPath=this.shortestPath.length-1}updatePosOnPath(){let g=this.shortestPath[this.posOnPath];for(;this.posOnPath0)return{path:E,distOffset:s}}return this.noPathFoundStrategy=this.noPathFoundAlternativeTargetsFallbackStrategy||"STOP",this.getShortestPath()}}return{path:i,distOffset:0}}pathToAlternativeTarget(g,t){let i=t.findShortestPath(this.character.getNextTilePos(),g,this.getPathfindingOptions()).path,y=this.distanceUtils.distance(g.position,this.targetPos.position);return{path:i,distOffset:y}}getDir(g,t){return this.tilemap.fromMapDirection(this.distanceUtils.direction(g,t))}},F4=Object.create,VC=Object.defineProperty,O4=Object.getOwnPropertyDescriptor,D4=Object.getOwnPropertyNames,I4=Object.getPrototypeOf,N4=Object.prototype.hasOwnProperty,B4=(g,t)=>()=>(t||g((t={exports:{}}).exports,t),t.exports),U4=(g,t,i,y)=>{if(t&&typeof t=="object"||typeof t=="function")for(let T of D4(t))!N4.call(g,T)&&T!==i&&VC(g,T,{get:()=>t[T],enumerable:!(y=O4(t,T))||y.enumerable});return g},e1=(g,t,i)=>(i=g!=null?F4(I4(g)):{},U4(t||!g||!g.__esModule?VC(i,"default",{value:g,enumerable:!0}):i,g)),i1=B4((g,t)=>{(function(){var i,y="4.17.21",T=200,E="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",x="Invalid `variable` option passed into `_.template`",e="__lodash_hash_undefined__",r=500,d="__lodash_placeholder__",h=1,a=2,l=4,n=1,u=2,f=1,o=2,c=4,p=8,v=16,m=32,S=64,M=128,w=256,C=512,A=30,P="...",b=800,O=16,I=1,D=2,B=3,G=1/0,z=9007199254740991,X=17976931348623157e292,j=NaN,Q=4294967295,tt=Q-1,Y=Q>>>1,$=[["ary",M],["bind",f],["bindKey",o],["curry",p],["curryRight",v],["flip",C],["partial",m],["partialRight",S],["rearg",w]],U="[object Arguments]",H="[object Array]",Z="[object AsyncFunction]",_="[object Boolean]",q="[object Date]",at="[object DOMException]",ot="[object Error]",rt="[object Function]",gt="[object GeneratorFunction]",yt="[object Map]",Et="[object Number]",At="[object Null]",Pt="[object Object]",Vt="[object Promise]",dt="[object Proxy]",ut="[object RegExp]",Rt="[object Set]",Dt="[object String]",Ht="[object Symbol]",Bt="[object Undefined]",re="[object WeakMap]",le="[object WeakSet]",ge="[object ArrayBuffer]",xe="[object DataView]",Pe="[object Float32Array]",te="[object Float64Array]",Ve="[object Int8Array]",De="[object Int16Array]",Ue="[object Int32Array]",Le="[object Uint8Array]",ne="[object Uint8ClampedArray]",Ke="[object Uint16Array]",si="[object Uint32Array]",Mi=/\b__p \+= '';/g,he=/\b(__p \+=) '' \+/g,Ti=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bt=/&(?:amp|lt|gt|quot|#39);/g,Ce=/[&<>"']/g,we=RegExp(bt.source),He=RegExp(Ce.source),Je=/<%-([\s\S]+?)%>/g,Gi=/<%([\s\S]+?)%>/g,Ii=/<%=([\s\S]+?)%>/g,rn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zn=/^\w*$/,Vi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pi=/[\\^$.*+?()[\]{}|]/g,Xi=RegExp(pi.source),ba=/^\s+/,oa=/\s/,Us=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_r=/\{\n\/\* \[wrapped with (.+)\] \*/,lo=/,? & /,qr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zs=/[()=,{}\[\]\/\s]/,Ss=/\\(\\)?/g,ho=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ll=/\w*$/,Tt=/^[-+]0x[0-9a-f]+$/i,$t=/^0b[01]+$/i,qt=/^\[object .+?Constructor\]$/,ie=/^0o[0-7]+$/i,ee=/^(?:0|[1-9]\d*)$/,Te=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ze=/($^)/,Xe=/['\n\r\u2028\u2029\\]/g,Qe="\\ud800-\\udfff",ti="\\u0300-\\u036f",ni="\\ufe20-\\ufe2f",oi="\\u20d0-\\u20ff",Qi=ti+ni+oi,fn="\\u2700-\\u27bf",ji="a-z\\xdf-\\xf6\\xf8-\\xff",yn="\\xac\\xb1\\xd7\\xf7",ei="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Se="\\u2000-\\u206f",Br=" \\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",gi="A-Z\\xc0-\\xd6\\xd8-\\xde",cn="\\ufe0e\\ufe0f",Ni=yn+ei+Se+Br,Vn="['’]",mn="["+Qe+"]",Ki="["+Ni+"]",pr="["+Qi+"]",Gs="\\d+",En="["+fn+"]",la="["+ji+"]",Jn="[^"+Qe+Ni+Gs+fn+ji+gi+"]",La="\\ud83c[\\udffb-\\udfff]",Vs="(?:"+pr+"|"+La+")",uo="[^"+Qe+"]",Fa="(?:\\ud83c[\\udde6-\\uddff]){2}",fo="[\\ud800-\\udbff][\\udc00-\\udfff]",yi="["+gi+"]",Oa="\\u200d",Vu="(?:"+la+"|"+Jn+")",cc="(?:"+yi+"|"+Jn+")",sr="(?:"+Vn+"(?:d|ll|m|re|s|t|ve))?",Hs="(?:"+Vn+"(?:D|LL|M|RE|S|T|VE))?",Ws=Vs+"?",Xs="["+cn+"]?",Fl="(?:"+Oa+"(?:"+[uo,Fa,fo].join("|")+")"+Xs+Ws+")*",Bi="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rn="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ur=Xs+Ws+Fl,co="(?:"+[En,Fa,fo].join("|")+")"+Ur,Yo="(?:"+[uo+pr+"?",pr,Fa,fo,mn].join("|")+")",wh=RegExp(Vn,"g"),sn=RegExp(pr,"g"),ko=RegExp(La+"(?="+La+")|"+Yo+Ur,"g"),Ts=RegExp([yi+"?"+la+"+"+sr+"(?="+[Ki,yi,"$"].join("|")+")",cc+"+"+Hs+"(?="+[Ki,yi+Vu,"$"].join("|")+")",yi+"?"+Vu+"+"+sr,yi+"+"+Hs,Rn,Bi,Gs,co].join("|"),"g"),jo=RegExp("["+Oa+Qe+Qi+cn+"]"),Hu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,po=["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"],Sr=-1,$i={};$i[Pe]=$i[te]=$i[Ve]=$i[De]=$i[Ue]=$i[Le]=$i[ne]=$i[Ke]=$i[si]=!0,$i[U]=$i[H]=$i[ge]=$i[_]=$i[xe]=$i[q]=$i[ot]=$i[rt]=$i[yt]=$i[Et]=$i[Pt]=$i[ut]=$i[Rt]=$i[Dt]=$i[re]=!1;var Zi={};Zi[U]=Zi[H]=Zi[ge]=Zi[xe]=Zi[_]=Zi[q]=Zi[Pe]=Zi[te]=Zi[Ve]=Zi[De]=Zi[Ue]=Zi[yt]=Zi[Et]=Zi[Pt]=Zi[ut]=Zi[Rt]=Zi[Dt]=Zi[Ht]=Zi[Le]=Zi[ne]=Zi[Ke]=Zi[si]=!0,Zi[ot]=Zi[rt]=Zi[re]=!1;var Es={À:"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"},zr={"&":"&","<":"<",">":">",'"':""","'":"'"},Ol={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ah={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ko=parseFloat,Dl=parseInt,Gr=typeof global=="object"&&global&&global.Object===Object&&global,dc=typeof self=="object"&&self&&self.Object===Object&&self,xn=Gr||dc||Function("return this")(),Ph=typeof g=="object"&&g&&!g.nodeType&&g,bn=Ph&&typeof t=="object"&&t&&!t.nodeType&&t,Da=bn&&bn.exports===Ph,Ia=Da&&Gr.process,Mn=function(){try{var ct=bn&&bn.require&&bn.require("util").types;return ct||Ia&&Ia.binding&&Ia.binding("util")}catch{}}(),Na=Mn&&Mn.isArrayBuffer,Ba=Mn&&Mn.isDate,Il=Mn&&Mn.isMap,Nl=Mn&&Mn.isRegExp,Ua=Mn&&Mn.isSet,Ys=Mn&&Mn.isTypedArray;function _i(ct,St,vt){switch(vt.length){case 0:return ct.call(St);case 1:return ct.call(St,vt[0]);case 2:return ct.call(St,vt[0],vt[1]);case 3:return ct.call(St,vt[0],vt[1],vt[2])}return ct.apply(St,vt)}function Xr(ct,St,vt,Ft){for(var Lt=-1,Ut=ct==null?0:ct.length;++Lt-1}function ha(ct,St,vt){for(var Ft=-1,Lt=ct==null?0:ct.length;++Ft-1;);return vt}function mo(ct,St){for(var vt=ct.length;vt--&&es(St,ct[vt],0)>-1;);return vt}function ns(ct,St){for(var vt=ct.length,Ft=0;vt--;)ct[vt]===St&&++Ft;return Ft}var Wu=or(Es),Qo=or(zr);function rs(ct){return"\\"+Ah[ct]}function pn(ct,St){return ct==null?i:ct[St]}function ws(ct){return jo.test(ct)}function hr(ct){return Hu.test(ct)}function go(ct){for(var St,vt=[];!(St=ct.next()).done;)vt.push(St.value);return vt}function Ha(ct){var St=-1,vt=Array(ct.size);return ct.forEach(function(Ft,Lt){vt[++St]=[Lt,Ft]}),vt}function Wa(ct,St){return function(vt){return ct(St(vt))}}function _n(ct,St){for(var vt=-1,Ft=ct.length,Lt=0,Ut=[];++vt-1}function Yu(R,N){var k=this.__data__,nt=Mo(k,R);return nt<0?(++this.size,k.push([R,N])):k[nt][1]=N,this}js.prototype.clear=Ap,js.prototype.delete=yc,js.prototype.get=Pp,js.prototype.has=Rp,js.prototype.set=Yu;function As(R){var N=-1,k=R==null?0:R.length;for(this.clear();++N=N?R:N)),R}function as(R,N,k,nt,ft,xt){var Ot,Gt=N&h,jt=N&a,fe=N&l;if(k&&(Ot=ft?k(R,nt,ft,xt):k(R)),Ot!==i)return Ot;if(!In(R))return R;var ce=Ei(R);if(ce){if(Ot=nP(R),!Gt)return br(R,Ot)}else{var ye=kr(R),Ne=ye==rt||ye==gt;if(_l(R))return zc(R,Gt);if(ye==Pt||ye==U||Ne&&!ft){if(Ot=jt||Ne?{}:tS(R),!Gt)return jt?Yp(R,Ip(Ot,R)):$g(R,Cc(Ot,R))}else{if(!Zi[ye])return ft?R:{};Ot=rP(R,ye,Gt)}}xt||(xt=new tr);var $e=xt.get(R);if($e)return $e;xt.set(R,Ot),bS(R)?R.forEach(function(ui){Ot.add(as(ui,N,k,ui,R,xt))}):PS(R)&&R.forEach(function(ui,Ui){Ot.set(Ui,as(ui,N,k,Ui,R,xt))});var hi=fe?jt?zi:kn:jt?Fs:Fr,Oi=ce?i:hi(R);return Sn(Oi||R,function(ui,Ui){Oi&&(Ui=ui,ui=R[Ui]),Ks(Ot,Ui,as(ui,N,k,Ui,R,xt))}),Ot}function wc(R){var N=Fr(R);return function(k){return $u(k,R,N)}}function $u(R,N,k){var nt=k.length;if(R==null)return!nt;for(R=It(R);nt--;){var ft=k[nt],xt=N[ft],Ot=R[ft];if(Ot===i&&!(ft in R)||!xt(Ot))return!1}return!0}function Ac(R,N,k){if(typeof R!="function")throw new Qt(s);return Wc(function(){R.apply(i,k)},N)}function il(R,N,k,nt){var ft=-1,xt=Tr,Ot=!0,Gt=R.length,jt=[],fe=N.length;if(!Gt)return jt;k&&(N=qi(N,lr(k))),nt?(xt=ha,Ot=!1):N.length>=T&&(xt=Wn,Ot=!1,N=new Eo(N));t:for(;++ftft?0:ft+k),nt=nt===i||nt>ft?ft:bi(nt),nt<0&&(nt+=ft),nt=k>nt?0:FS(nt);k0&&k(Gt)?N>1?ur(Gt,N-1,k,nt,ft):Yr(ft,Gt):nt||(ft[ft.length]=Gt)}return ft}var Xl=of(),Gh=of(!0);function os(R,N){return R&&Xl(R,N,Fr)}function Yl(R,N){return R&&Gh(R,N,Fr)}function nl(R,N){return Cn(N,function(k){return ll(R[k])})}function Zs(R,N){N=bo(N,R);for(var k=0,nt=N.length;R!=null&&kN}function Up(R,N){return R!=null&&me.call(R,N)}function Rc(R,N){return R!=null&&N in It(R)}function jg(R,N,k){return R>=Mr(N,k)&&R=120&&ce.length>=120)?new Eo(Ot&&ce):i}ce=R[0];var ye=-1,Ne=Gt[0];t:for(;++ye-1;)Gt!==R&&So.call(Gt,jt,1),So.call(R,jt,1);return R}function Ar(R,N){for(var k=R?N.length:0,nt=k-1;k--;){var ft=N[k];if(k==nt||ft!==xt){var xt=ft;ol(ft)?So.call(R,ft,1):Nc(R,ft)}}return R}function ma(R,N){return R+Oh(mc()*(N-R+1))}function Ps(R,N,k,nt){for(var ft=-1,xt=qn(Fh((N-R)/(k||1)),0),Ot=vt(xt);xt--;)Ot[nt?xt:++ft]=R,R+=k;return Ot}function Ql(R,N){var k="";if(!R||N<1||N>z)return k;do N%2&&(k+=R),N=Oh(N/2),N&&(R+=R);while(N);return k}function ii(R,N){return e0(nS(R,N,Os),R+"")}function zp(R){return Uh(ff(R))}function Oc(R,N){var k=ff(R);return Kp(k,Co(N,0,k.length))}function sl(R,N,k,nt){if(!In(R))return R;N=bo(N,R);for(var ft=-1,xt=N.length,Ot=xt-1,Gt=R;Gt!=null&&++ftft?0:ft+N),k=k>ft?ft:k,k<0&&(k+=ft),ft=N>k?0:k-N>>>0,N>>>=0;for(var xt=vt(ft);++nt>>1,Ot=R[xt];Ot!==null&&!Qs(Ot)&&(k?Ot<=N:Ot=T){var fe=N?null:Lr(R);if(fe)return Xa(fe);Ot=!1,ft=Wn,jt=new Eo}else jt=N?[]:Gt;t:for(;++nt=nt?R:hs(R,N,k)}var Wp=Lh||function(R){return xn.clearTimeout(R)};function zc(R,N){if(N)return R.slice();var k=R.length,nt=yo?yo(k):new R.constructor(k);return R.copy(nt),nt}function sf(R){var N=new R.constructor(R.byteLength);return new wn(N).set(new wn(R)),N}function Kg(R,N){var k=N?sf(R.buffer):R.buffer;return new R.constructor(k,R.byteOffset,R.byteLength)}function Rs(R){var N=new R.constructor(R.source,Ll.exec(R));return N.lastIndex=R.lastIndex,N}function Gc(R){return ka?It(ka.call(R)):{}}function Xp(R,N){var k=N?sf(R.buffer):R.buffer;return new R.constructor(k,R.byteOffset,R.length)}function $a(R,N){if(R!==N){var k=R!==i,nt=R===null,ft=R===R,xt=Qs(R),Ot=N!==i,Gt=N===null,jt=N===N,fe=Qs(N);if(!Gt&&!fe&&!xt&&R>N||xt&&Ot&&jt&&!Gt&&!fe||nt&&Ot&&jt||!k&&jt||!ft)return 1;if(!nt&&!xt&&!fe&&R=Gt)return jt;var fe=k[nt];return jt*(fe=="desc"?-1:1)}}return R.index-N.index}function Fo(R,N,k,nt){for(var ft=-1,xt=R.length,Ot=k.length,Gt=-1,jt=N.length,fe=qn(xt-Ot,0),ce=vt(jt+fe),ye=!nt;++Gt1?k[ft-1]:i,Ot=ft>2?k[2]:i;for(xt=R.length>3&&typeof xt=="function"?(ft--,xt):i,Ot&&fs(k[0],k[1],Ot)&&(xt=ft<3?i:xt,ft=1),N=It(N);++nt-1?ft[xt?N[Ot]:Ot]:i}}function it(R){return Ai(function(N){var k=N.length,nt=k,ft=Cr.prototype.thru;for(R&&N.reverse();nt--;){var xt=N[nt];if(typeof xt!="function")throw new Qt(s);if(ft&&!Ot&&lf(xt)=="wrapper")var Ot=new Cr([],!0)}for(nt=Ot?nt:k;++nt1&&Hi.reverse(),ce&&jtGt))return!1;var fe=xt.get(R),ce=xt.get(N);if(fe&&ce)return fe==N&&ce==R;var ye=-1,Ne=!0,$e=k&u?new Eo:i;for(xt.set(R,N),xt.set(N,R);++ye1?"& ":"")+N[nt],N=N.join(k>2?", ":" "),R.replace(Us,`{ /* [wrapped with `+N+`] */ -`)}function uP(R){return Ei(R)||Qh(R)||!!(vc&&R&&R[vc])}function ol(R,N){var k=typeof R;return N=N??z,!!N&&(k=="number"||k!="symbol"&&ee.test(R))&&R>-1&&R%1==0&&R0){if(++N>=b)return arguments[0]}else N=0;return R.apply(i,arguments)}}function jp(R,N){var k=-1,nt=R.length,ft=nt-1;for(N=N===i?nt:N;++k1?R[N-1]:i;return k=typeof k=="function"?(R.pop(),k):i,pS(R,k)});function vS(R){var N=mt(R);return N.__chain__=!0,N}function TR(R,N){return N(R),R}function Kp(R,N){return N(R)}var ER=Ai(function(R){var N=R.length,k=N?R[0]:0,nt=this.__wrapped__,ft=function(xt){return Ku(xt,R)};return N>1||this.__actions__.length||!(nt instanceof ri)||!ol(k)?this.thru(ft):(nt=nt.slice(k,+k+(N?1:0)),nt.__actions__.push({func:Kp,args:[ft],thisArg:i}),new Cr(nt,this.__chain__).thru(function(xt){return N&&!xt.length&&xt.push(i),xt}))});function MR(){return vS(this)}function CR(){return new Cr(this.value(),this.__chain__)}function wR(){this.__values__===i&&(this.__values__=bS(this.value()));var R=this.__index__>=this.__values__.length,N=R?i:this.__values__[this.__index__++];return{done:R,value:N}}function AR(){return this}function PR(R){for(var N,k=this;k instanceof Uh;){var nt=lS(k);nt.__index__=0,nt.__values__=i,N?ft.__wrapped__=nt:N=nt;var ft=nt;k=k.__wrapped__}return ft.__wrapped__=R,N}function RR(){var R=this.__wrapped__;if(R instanceof ri){var N=R;return this.__actions__.length&&(N=new ri(this)),N=N.reverse(),N.__actions__.push({func:Kp,args:[t0],thisArg:i}),new Cr(N,this.__chain__)}return this.thru(t0)}function bR(){return Po(this.__wrapped__,this.__actions__)}var LR=Zh(function(R,N,k){me.call(R,k)?++R[k]:va(R,k,1)});function FR(R,N,k){var nt=Ei(R)?za:Xg;return k&&fs(R,N,k)&&(N=i),nt(R,li(N,3))}function OR(R,N){var k=Ei(R)?Cn:Rc;return k(R,li(N,3))}var DR=J(hS),IR=J(uS);function NR(R,N){return ur(Zp(R,N),1)}function BR(R,N){return ur(Zp(R,N),G)}function UR(R,N,k){return k=k===i?1:bi(k),ur(Zp(R,N),k)}function mS(R,N){var k=Ei(R)?Sn:Zs;return k(R,li(N,3))}function gS(R,N){var k=Ei(R)?Hn:Ip;return k(R,li(N,3))}var zR=Zh(function(R,N,k){me.call(R,k)?R[k].push(N):va(R,k,[N])});function GR(R,N,k,nt){R=Ls(R)?R:ff(R),k=k&&!nt?bi(k):0;var ft=R.length;return k<0&&(k=qn(ft+k,0)),qp(R)?k<=ft&&R.indexOf(N,k)>-1:!!ft&&es(R,N,k)>-1}var VR=ii(function(R,N,k){var nt=-1,ft=typeof N=="function",xt=Ls(R)?vt(R.length):[];return Zs(R,function(Ot){xt[++nt]=ft?Qi(N,Ot,k):pn(Ot,N,k)}),xt}),HR=Zh(function(R,N,k){va(R,k,N)});function Zp(R,N){var k=Ei(R)?_i:rl;return k(R,li(N,3))}function WR(R,N,k,nt){return R==null?[]:(Ei(N)||(N=N==null?[]:[N]),k=nt?i:k,Ei(k)||(k=k==null?[]:[k]),Yh(R,N,k))}var XR=Zh(function(R,N,k){R[k?0:1].push(N)},function(){return[[],[]]});function YR(R,N,k){var nt=Ei(R)?Ga:ca,ft=arguments.length<3;return nt(R,li(N,4),k,ft,Zs)}function kR(R,N,k){var nt=Ei(R)?Ul:ca,ft=arguments.length<3;return nt(R,li(N,4),k,ft,Ip)}function jR(R,N){var k=Ei(R)?Cn:Rc;return k(R,Qp(li(N,3)))}function KR(R){var N=Ei(R)?zh:Up;return N(R)}function ZR(R,N,k){(k?fs(R,N,k):N===i)?N=1:N=bi(N);var nt=Ei(R)?Ec:Dc;return nt(R,N)}function $R(R){var N=Ei(R)?Op:Gp;return N(R)}function JR(R){if(R==null)return 0;if(Ls(R))return qp(R)?V(R):R.length;var N=kr(R);return N==yt||N==Rt?R.size:wr(R).length}function QR(R,N,k){var nt=Ei(R)?ts:Ic;return k&&fs(R,N,k)&&(N=i),nt(R,li(N,3))}var _R=ii(function(R,N){if(R==null)return[];var k=N.length;return k>1&&fs(R,N[0],N[1])?N=[]:k>2&&fs(N[0],N[1],N[2])&&(N=[N[0]]),Yh(R,ur(N,1),[])}),$p=hp||function(){return xn.Date.now()};function qR(R,N){if(typeof N!="function")throw new Qt(s);return R=bi(R),function(){if(--R<1)return N.apply(this,arguments)}}function yS(R,N,k){return N=k?i:N,N=R&&N==null?R.length:N,Jt(R,M,i,i,i,i,N)}function xS(R,N){var k;if(typeof N!="function")throw new Qt(s);return R=bi(R),function(){return--R>0&&(k=N.apply(this,arguments)),R<=1&&(N=i),k}}var i0=ii(function(R,N,k){var nt=f;if(k.length){var ft=_n(k,hf(i0));nt|=m}return Jt(R,nt,N,k,ft)}),SS=ii(function(R,N,k){var nt=f|o;if(k.length){var ft=_n(k,hf(SS));nt|=m}return Jt(N,nt,R,k,ft)});function TS(R,N,k){N=k?i:N;var nt=Jt(R,p,i,i,i,i,i,N);return nt.placeholder=TS.placeholder,nt}function ES(R,N,k){N=k?i:N;var nt=Jt(R,v,i,i,i,i,i,N);return nt.placeholder=ES.placeholder,nt}function MS(R,N,k){var nt,ft,xt,Ot,Gt,jt,fe=0,ce=!1,ye=!1,Ie=!0;if(typeof R!="function")throw new Qt(s);N=Sa(N)||0,In(k)&&(ce=!!k.leading,ye="maxWait"in k,xt=ye?qn(Sa(k.maxWait)||0,N):xt,Ie="trailing"in k?!!k.trailing:Ie);function Ke(ir){var Ja=nt,ul=ft;return nt=ft=i,fe=ir,Ot=R.apply(ul,Ja),Ot}function hi(ir){return fe=ir,Gt=Xc(Ui,N),ce?Ke(ir):Ot}function Oi(ir){var Ja=ir-jt,ul=ir-fe,WS=N-Ja;return ye?Mr(WS,xt-ul):WS}function ui(ir){var Ja=ir-jt,ul=ir-fe;return jt===i||Ja>=N||Ja<0||ye&&ul>=xt}function Ui(){var ir=$p();if(ui(ir))return Hi(ir);Gt=Xc(Ui,Oi(ir))}function Hi(ir){return Gt=i,Ie&&nt?Ke(ir):(nt=ft=i,Ot)}function _s(){Gt!==i&&Hp(Gt),fe=0,nt=jt=ft=Gt=i}function cs(){return Gt===i?Ot:Hi($p())}function qs(){var ir=$p(),Ja=ui(ir);if(nt=arguments,ft=this,jt=ir,Ja){if(Gt===i)return hi(jt);if(ye)return Hp(Gt),Gt=Xc(Ui,N),Ke(jt)}return Gt===i&&(Gt=Xc(Ui,N)),Ot}return qs.cancel=_s,qs.flush=cs,qs}var t3=ii(function(R,N){return Pc(R,1,N)}),e3=ii(function(R,N,k){return Pc(R,Sa(N)||0,k)});function i3(R){return Jt(R,C)}function Jp(R,N){if(typeof R!="function"||N!=null&&typeof N!="function")throw new Qt(s);var k=function(){var nt=arguments,ft=N?N.apply(this,nt):nt[0],xt=k.cache;if(xt.has(ft))return xt.get(ft);var Ot=R.apply(this,nt);return k.cache=xt.set(ft,Ot)||xt,Ot};return k.cache=new(Jp.Cache||As),k}Jp.Cache=As;function Qp(R){if(typeof R!="function")throw new Qt(s);return function(){var N=arguments;switch(N.length){case 0:return!R.call(this);case 1:return!R.call(this,N[0]);case 2:return!R.call(this,N[0],N[1]);case 3:return!R.call(this,N[0],N[1],N[2])}return!R.apply(this,N)}}function n3(R){return xS(2,R)}var r3=Vp(function(R,N){N=N.length==1&&Ei(N[0])?_i(N[0],lr(li())):_i(ur(N,1),lr(li()));var k=N.length;return ii(function(nt){for(var ft=-1,xt=Mr(nt.length,k);++ft=N}),Qh=Ci(function(){return arguments}())?Ci:function(R){return jn(R)&&me.call(R,"callee")&&!xo.call(R,"callee")},Ei=vt.isArray,x3=Na?lr(Na):Xn;function Ls(R){return R!=null&&_p(R.length)&&!ll(R)}function er(R){return jn(R)&&Ls(R)}function S3(R){return R===!0||R===!1||jn(R)&&vr(R)==_}var ql=fp||p0,T3=Ba?lr(Ba):Yn;function E3(R){return jn(R)&&R.nodeType===1&&!Yc(R)}function M3(R){if(R==null)return!0;if(Ls(R)&&(Ei(R)||typeof R=="string"||typeof R.splice=="function"||ql(R)||uf(R)||Qh(R)))return!R.length;var N=kr(R);if(N==yt||N==Rt)return!R.size;if(Wc(R))return!wr(R).length;for(var k in R)if(me.call(R,k))return!1;return!0}function C3(R,N){return On(R,N)}function w3(R,N,k){k=typeof k=="function"?k:i;var nt=k?k(R,N):i;return nt===i?On(R,N,i,k):!!nt}function r0(R){if(!jn(R))return!1;var N=vr(R);return N==ot||N==at||typeof R.message=="string"&&typeof R.name=="string"&&!Yc(R)}function A3(R){return typeof R=="number"&&mc(R)}function ll(R){if(!In(R))return!1;var N=vr(R);return N==rt||N==gt||N==$||N==dt}function wS(R){return typeof R=="number"&&R==bi(R)}function _p(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=z}function In(R){var N=typeof R;return R!=null&&(N=="object"||N=="function")}function jn(R){return R!=null&&typeof R=="object"}var AS=Nl?lr(Nl):Kl;function P3(R,N){return R===N||Dn(R,N,Zg(N))}function R3(R,N,k){return k=typeof k=="function"?k:i,Dn(R,N,Zg(N),k)}function b3(R){return PS(R)&&R!=+R}function L3(R){if(dP(R))throw new Lt(E);return Zl(R)}function F3(R){return R===null}function O3(R){return R==null}function PS(R){return typeof R=="number"||jn(R)&&vr(R)==Et}function Yc(R){if(!jn(R)||vr(R)!=Pt)return!1;var N=Ln(R);if(N===null)return!0;var k=me.call(N,"constructor")&&N.constructor;return typeof k=="function"&&k instanceof k&&Ae.call(k)==fi}var s0=Bl?lr(Bl):$l;function D3(R){return wS(R)&&R>=-z&&R<=z}var RS=Ua?lr(Ua):Ju;function qp(R){return typeof R=="string"||!Ei(R)&&jn(R)&&vr(R)==Dt}function Qs(R){return typeof R=="symbol"||jn(R)&&vr(R)==Ht}var uf=Ys?lr(Ys):Fc;function I3(R){return R===i}function N3(R){return jn(R)&&kr(R)==re}function B3(R){return jn(R)&&vr(R)==le}var U3=Qe(Wh),z3=Qe(function(R,N){return R<=N});function bS(R){if(!R)return[];if(Ls(R))return qp(R)?K(R):br(R);if(To&&R[To])return go(R[To]());var N=kr(R),k=N==yt?Ha:N==Rt?Xa:ff;return k(R)}function hl(R){if(!R)return R===0?R:0;if(R=Sa(R),R===G||R===-G){var N=R<0?-1:1;return N*X}return R===R?R:0}function bi(R){var N=hl(R),k=N%1;return N===N?k?N-k:N:0}function LS(R){return R?Co(bi(R),0,Q):0}function Sa(R){if(typeof R=="number")return R;if(Qs(R))return j;if(In(R)){var N=typeof R.valueOf=="function"?R.valueOf():R;R=In(N)?N+"":N}if(typeof R!="string")return R===0?R:+R;R=Gl(R);var k=Zt.test(R);return k||ie.test(R)?Il(R.slice(2),k?2:8):Tt.test(R)?j:+R}function FS(R){return bs(R,Fs(R))}function G3(R){return R?Co(bi(R),-z,z):R===0?R:0}function en(R){return R==null?"":Pr(R)}var V3=al(function(R,N){if(Wc(N)||Ls(N)){bs(N,Fr(N),R);return}for(var k in N)me.call(N,k)&&Ks(R,k,N[k])}),OS=al(function(R,N){bs(N,Fs(N),R)}),tv=al(function(R,N,k,nt){bs(N,Fs(N),R,nt)}),H3=al(function(R,N,k,nt){bs(N,Fr(N),R,nt)}),W3=Ai(Ku);function X3(R,N){var k=ja(R);return N==null?k:wc(k,N)}var Y3=ii(function(R,N){R=It(R);var k=-1,nt=N.length,ft=nt>2?N[2]:i;for(ft&&fs(N[0],N[1],ft)&&(nt=1);++k1),xt}),bs(R,zi(R),k),nt&&(k=as(k,h|a|l,Ne));for(var ft=N.length;ft--;)Bc(k,N[ft]);return k});function lb(R,N){return IS(R,Qp(li(N)))}var hb=Ai(function(R,N){return R==null?{}:kh(R,N)});function IS(R,N){if(R==null)return{};var k=_i(zi(R),function(nt){return[nt]});return N=li(N),qu(R,k,function(nt,ft){return N(nt,ft[0])})}function ub(R,N,k){N=bo(N,R);var nt=-1,ft=N.length;for(ft||(ft=1,R=i);++ntN){var nt=R;R=N,N=nt}if(k||R%1||N%1){var ft=gc();return Mr(R+ft*(N-R+Ko("1e-"+((ft+"").length-1))),N)}return ma(R,N)}var Tb=L(function(R,N,k){return N=N.toLowerCase(),R+(k?US(N):N)});function US(R){return l0(en(R).toLowerCase())}function zS(R){return R=en(R),R&&R.replace(Te,Wu).replace(rn,"")}function Eb(R,N,k){R=en(R),N=Pr(N);var nt=R.length;k=k===i?nt:Co(bi(k),0,nt);var ft=k;return k-=N.length,k>=0&&R.slice(k,ft)==N}function Mb(R){return R=en(R),R&&Ve.test(R)?R.replace(Ce,Qo):R}function Cb(R){return R=en(R),R&&Xi.test(R)?R.replace(pi,"\\$&"):R}var wb=L(function(R,N,k){return R+(k?"-":"")+N.toLowerCase()}),Ab=L(function(R,N,k){return R+(k?" ":"")+N.toLowerCase()}),Pb=Yp("toLowerCase");function Rb(R,N,k){R=en(R),N=bi(N);var nt=N?V(R):0;if(!N||nt>=N)return R;var ft=(N-nt)/2;return Ee(Dh(ft),k)+R+Ee(Oh(ft),k)}function bb(R,N,k){R=en(R),N=bi(N);var nt=N?V(R):0;return N&&nt>>0,k?(R=en(R),R&&(typeof N=="string"||N!=null&&!s0(N))&&(N=Pr(N),!N&&ws(R))?Lo(K(R),0,k):R.split(N,k)):[]}var Bb=L(function(R,N,k){return R+(k?" ":"")+l0(N)});function Ub(R,N,k){return R=en(R),k=k==null?0:Co(bi(k),0,R.length),N=Pr(N),R.slice(k,k+N.length)==N}function zb(R,N,k){var nt=mt.templateSettings;k&&fs(R,N,k)&&(N=i),R=en(R),N=tv({},N,nt,kt);var ft=tv({},N.imports,nt.imports,kt),xt=Fr(ft),Ot=Qn(ft,xt),Gt,jt,fe=0,ce=N.interpolate||Ue,ye="__p += '",Ie=Kt((N.escape||Ue).source+"|"+ce.source+"|"+(ce===Ii?ho:Ue).source+"|"+(N.evaluate||Ue).source+"|$","g"),Ke="//# sourceURL="+(me.call(N,"sourceURL")?(N.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Sr+"]")+` -`;R.replace(Ie,function(ui,Ui,Hi,_s,cs,qs){return Hi||(Hi=_s),ye+=R.slice(fe,qs).replace(We,rs),Ui&&(Gt=!0,ye+=`' + +`)}function aP(R){return Ei(R)||Jh(R)||!!(pc&&R&&R[pc])}function ol(R,N){var k=typeof R;return N=N??z,!!N&&(k=="number"||k!="symbol"&&ee.test(R))&&R>-1&&R%1==0&&R0){if(++N>=b)return arguments[0]}else N=0;return R.apply(i,arguments)}}function Kp(R,N){var k=-1,nt=R.length,ft=nt-1;for(N=N===i?nt:N;++k1?R[N-1]:i;return k=typeof k=="function"?(R.pop(),k):i,vS(R,k)});function mS(R){var N=mt(R);return N.__chain__=!0,N}function gR(R,N){return N(R),R}function $p(R,N){return N(R)}var yR=Ai(function(R){var N=R.length,k=N?R[0]:0,nt=this.__wrapped__,ft=function(xt){return Ku(xt,R)};return N>1||this.__actions__.length||!(nt instanceof ri)||!ol(k)?this.thru(ft):(nt=nt.slice(k,+k+(N?1:0)),nt.__actions__.push({func:$p,args:[ft],thisArg:i}),new Cr(nt,this.__chain__).thru(function(xt){return N&&!xt.length&&xt.push(i),xt}))});function xR(){return mS(this)}function SR(){return new Cr(this.value(),this.__chain__)}function TR(){this.__values__===i&&(this.__values__=LS(this.value()));var R=this.__index__>=this.__values__.length,N=R?i:this.__values__[this.__index__++];return{done:R,value:N}}function ER(){return this}function MR(R){for(var N,k=this;k instanceof Bh;){var nt=hS(k);nt.__index__=0,nt.__values__=i,N?ft.__wrapped__=nt:N=nt;var ft=nt;k=k.__wrapped__}return ft.__wrapped__=R,N}function CR(){var R=this.__wrapped__;if(R instanceof ri){var N=R;return this.__actions__.length&&(N=new ri(this)),N=N.reverse(),N.__actions__.push({func:$p,args:[i0],thisArg:i}),new Cr(N,this.__chain__)}return this.thru(i0)}function wR(){return Po(this.__wrapped__,this.__actions__)}var AR=Kh(function(R,N,k){me.call(R,k)?++R[k]:va(R,k,1)});function PR(R,N,k){var nt=Ei(R)?za:kg;return k&&fs(R,N,k)&&(N=i),nt(R,li(N,3))}function RR(R,N){var k=Ei(R)?Cn:Pc;return k(R,li(N,3))}var bR=J(uS),LR=J(fS);function FR(R,N){return ur(Zp(R,N),1)}function OR(R,N){return ur(Zp(R,N),G)}function DR(R,N,k){return k=k===i?1:bi(k),ur(Zp(R,N),k)}function gS(R,N){var k=Ei(R)?Sn:$s;return k(R,li(N,3))}function yS(R,N){var k=Ei(R)?Hn:Np;return k(R,li(N,3))}var IR=Kh(function(R,N,k){me.call(R,k)?R[k].push(N):va(R,k,[N])});function NR(R,N,k,nt){R=Ls(R)?R:ff(R),k=k&&!nt?bi(k):0;var ft=R.length;return k<0&&(k=qn(ft+k,0)),tv(R)?k<=ft&&R.indexOf(N,k)>-1:!!ft&&es(R,N,k)>-1}var BR=ii(function(R,N,k){var nt=-1,ft=typeof N=="function",xt=Ls(R)?vt(R.length):[];return $s(R,function(Ot){xt[++nt]=ft?_i(N,Ot,k):vn(Ot,N,k)}),xt}),UR=Kh(function(R,N,k){va(R,k,N)});function Zp(R,N){var k=Ei(R)?qi:rl;return k(R,li(N,3))}function zR(R,N,k,nt){return R==null?[]:(Ei(N)||(N=N==null?[]:[N]),k=nt?i:k,Ei(k)||(k=k==null?[]:[k]),Xh(R,N,k))}var GR=Kh(function(R,N,k){R[k?0:1].push(N)},function(){return[[],[]]});function VR(R,N,k){var nt=Ei(R)?Ga:ca,ft=arguments.length<3;return nt(R,li(N,4),k,ft,$s)}function HR(R,N,k){var nt=Ei(R)?Bl:ca,ft=arguments.length<3;return nt(R,li(N,4),k,ft,Np)}function WR(R,N){var k=Ei(R)?Cn:Pc;return k(R,_p(li(N,3)))}function XR(R){var N=Ei(R)?Uh:zp;return N(R)}function YR(R,N,k){(k?fs(R,N,k):N===i)?N=1:N=bi(N);var nt=Ei(R)?Tc:Oc;return nt(R,N)}function kR(R){var N=Ei(R)?Dp:Vp;return N(R)}function jR(R){if(R==null)return 0;if(Ls(R))return tv(R)?V(R):R.length;var N=kr(R);return N==yt||N==Rt?R.size:wr(R).length}function KR(R,N,k){var nt=Ei(R)?ts:Dc;return k&&fs(R,N,k)&&(N=i),nt(R,li(N,3))}var $R=ii(function(R,N){if(R==null)return[];var k=N.length;return k>1&&fs(R,N[0],N[1])?N=[]:k>2&&fs(N[0],N[1],N[2])&&(N=[N[0]]),Xh(R,ur(N,1),[])}),Jp=up||function(){return xn.Date.now()};function ZR(R,N){if(typeof N!="function")throw new Qt(s);return R=bi(R),function(){if(--R<1)return N.apply(this,arguments)}}function xS(R,N,k){return N=k?i:N,N=R&&N==null?R.length:N,Jt(R,M,i,i,i,i,N)}function SS(R,N){var k;if(typeof N!="function")throw new Qt(s);return R=bi(R),function(){return--R>0&&(k=N.apply(this,arguments)),R<=1&&(N=i),k}}var r0=ii(function(R,N,k){var nt=f;if(k.length){var ft=_n(k,hf(r0));nt|=m}return Jt(R,nt,N,k,ft)}),TS=ii(function(R,N,k){var nt=f|o;if(k.length){var ft=_n(k,hf(TS));nt|=m}return Jt(N,nt,R,k,ft)});function ES(R,N,k){N=k?i:N;var nt=Jt(R,p,i,i,i,i,i,N);return nt.placeholder=ES.placeholder,nt}function MS(R,N,k){N=k?i:N;var nt=Jt(R,v,i,i,i,i,i,N);return nt.placeholder=MS.placeholder,nt}function CS(R,N,k){var nt,ft,xt,Ot,Gt,jt,fe=0,ce=!1,ye=!1,Ne=!0;if(typeof R!="function")throw new Qt(s);N=Sa(N)||0,In(k)&&(ce=!!k.leading,ye="maxWait"in k,xt=ye?qn(Sa(k.maxWait)||0,N):xt,Ne="trailing"in k?!!k.trailing:Ne);function $e(ir){var Ja=nt,ul=ft;return nt=ft=i,fe=ir,Ot=R.apply(ul,Ja),Ot}function hi(ir){return fe=ir,Gt=Wc(Ui,N),ce?$e(ir):Ot}function Oi(ir){var Ja=ir-jt,ul=ir-fe,XS=N-Ja;return ye?Mr(XS,xt-ul):XS}function ui(ir){var Ja=ir-jt,ul=ir-fe;return jt===i||Ja>=N||Ja<0||ye&&ul>=xt}function Ui(){var ir=Jp();if(ui(ir))return Hi(ir);Gt=Wc(Ui,Oi(ir))}function Hi(ir){return Gt=i,Ne&&nt?$e(ir):(nt=ft=i,Ot)}function _s(){Gt!==i&&Wp(Gt),fe=0,nt=jt=ft=Gt=i}function cs(){return Gt===i?Ot:Hi(Jp())}function qs(){var ir=Jp(),Ja=ui(ir);if(nt=arguments,ft=this,jt=ir,Ja){if(Gt===i)return hi(jt);if(ye)return Wp(Gt),Gt=Wc(Ui,N),$e(jt)}return Gt===i&&(Gt=Wc(Ui,N)),Ot}return qs.cancel=_s,qs.flush=cs,qs}var JR=ii(function(R,N){return Ac(R,1,N)}),QR=ii(function(R,N,k){return Ac(R,Sa(N)||0,k)});function _R(R){return Jt(R,C)}function Qp(R,N){if(typeof R!="function"||N!=null&&typeof N!="function")throw new Qt(s);var k=function(){var nt=arguments,ft=N?N.apply(this,nt):nt[0],xt=k.cache;if(xt.has(ft))return xt.get(ft);var Ot=R.apply(this,nt);return k.cache=xt.set(ft,Ot)||xt,Ot};return k.cache=new(Qp.Cache||As),k}Qp.Cache=As;function _p(R){if(typeof R!="function")throw new Qt(s);return function(){var N=arguments;switch(N.length){case 0:return!R.call(this);case 1:return!R.call(this,N[0]);case 2:return!R.call(this,N[0],N[1]);case 3:return!R.call(this,N[0],N[1],N[2])}return!R.apply(this,N)}}function qR(R){return SS(2,R)}var t3=Hp(function(R,N){N=N.length==1&&Ei(N[0])?qi(N[0],lr(li())):qi(ur(N,1),lr(li()));var k=N.length;return ii(function(nt){for(var ft=-1,xt=Mr(nt.length,k);++ft=N}),Jh=Ci(function(){return arguments}())?Ci:function(R){return jn(R)&&me.call(R,"callee")&&!xo.call(R,"callee")},Ei=vt.isArray,v3=Na?lr(Na):Xn;function Ls(R){return R!=null&&qp(R.length)&&!ll(R)}function er(R){return jn(R)&&Ls(R)}function m3(R){return R===!0||R===!1||jn(R)&&vr(R)==_}var _l=cp||m0,g3=Ba?lr(Ba):Yn;function y3(R){return jn(R)&&R.nodeType===1&&!Xc(R)}function x3(R){if(R==null)return!0;if(Ls(R)&&(Ei(R)||typeof R=="string"||typeof R.splice=="function"||_l(R)||uf(R)||Jh(R)))return!R.length;var N=kr(R);if(N==yt||N==Rt)return!R.size;if(Hc(R))return!wr(R).length;for(var k in R)if(me.call(R,k))return!1;return!0}function S3(R,N){return On(R,N)}function T3(R,N,k){k=typeof k=="function"?k:i;var nt=k?k(R,N):i;return nt===i?On(R,N,i,k):!!nt}function a0(R){if(!jn(R))return!1;var N=vr(R);return N==ot||N==at||typeof R.message=="string"&&typeof R.name=="string"&&!Xc(R)}function E3(R){return typeof R=="number"&&vc(R)}function ll(R){if(!In(R))return!1;var N=vr(R);return N==rt||N==gt||N==Z||N==dt}function AS(R){return typeof R=="number"&&R==bi(R)}function qp(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=z}function In(R){var N=typeof R;return R!=null&&(N=="object"||N=="function")}function jn(R){return R!=null&&typeof R=="object"}var PS=Il?lr(Il):jl;function M3(R,N){return R===N||Dn(R,N,Jg(N))}function C3(R,N,k){return k=typeof k=="function"?k:i,Dn(R,N,Jg(N),k)}function w3(R){return RS(R)&&R!=+R}function A3(R){if(hP(R))throw new Lt(E);return Kl(R)}function P3(R){return R===null}function R3(R){return R==null}function RS(R){return typeof R=="number"||jn(R)&&vr(R)==Et}function Xc(R){if(!jn(R)||vr(R)!=Pt)return!1;var N=Ln(R);if(N===null)return!0;var k=me.call(N,"constructor")&&N.constructor;return typeof k=="function"&&k instanceof k&&Ae.call(k)==fi}var o0=Nl?lr(Nl):$l;function b3(R){return AS(R)&&R>=-z&&R<=z}var bS=Ua?lr(Ua):Ju;function tv(R){return typeof R=="string"||!Ei(R)&&jn(R)&&vr(R)==Dt}function Qs(R){return typeof R=="symbol"||jn(R)&&vr(R)==Ht}var uf=Ys?lr(Ys):Lc;function L3(R){return R===i}function F3(R){return jn(R)&&kr(R)==re}function O3(R){return jn(R)&&vr(R)==le}var D3=_e(Hh),I3=_e(function(R,N){return R<=N});function LS(R){if(!R)return[];if(Ls(R))return tv(R)?K(R):br(R);if(To&&R[To])return go(R[To]());var N=kr(R),k=N==yt?Ha:N==Rt?Xa:ff;return k(R)}function hl(R){if(!R)return R===0?R:0;if(R=Sa(R),R===G||R===-G){var N=R<0?-1:1;return N*X}return R===R?R:0}function bi(R){var N=hl(R),k=N%1;return N===N?k?N-k:N:0}function FS(R){return R?Co(bi(R),0,Q):0}function Sa(R){if(typeof R=="number")return R;if(Qs(R))return j;if(In(R)){var N=typeof R.valueOf=="function"?R.valueOf():R;R=In(N)?N+"":N}if(typeof R!="string")return R===0?R:+R;R=zl(R);var k=$t.test(R);return k||ie.test(R)?Dl(R.slice(2),k?2:8):Tt.test(R)?j:+R}function OS(R){return bs(R,Fs(R))}function N3(R){return R?Co(bi(R),-z,z):R===0?R:0}function nn(R){return R==null?"":Pr(R)}var B3=al(function(R,N){if(Hc(N)||Ls(N)){bs(N,Fr(N),R);return}for(var k in N)me.call(N,k)&&Ks(R,k,N[k])}),DS=al(function(R,N){bs(N,Fs(N),R)}),ev=al(function(R,N,k,nt){bs(N,Fs(N),R,nt)}),U3=al(function(R,N,k,nt){bs(N,Fr(N),R,nt)}),z3=Ai(Ku);function G3(R,N){var k=ja(R);return N==null?k:Cc(k,N)}var V3=ii(function(R,N){R=It(R);var k=-1,nt=N.length,ft=nt>2?N[2]:i;for(ft&&fs(N[0],N[1],ft)&&(nt=1);++k1),xt}),bs(R,zi(R),k),nt&&(k=as(k,h|a|l,Be));for(var ft=N.length;ft--;)Nc(k,N[ft]);return k});function rb(R,N){return NS(R,_p(li(N)))}var sb=Ai(function(R,N){return R==null?{}:Yh(R,N)});function NS(R,N){if(R==null)return{};var k=qi(zi(R),function(nt){return[nt]});return N=li(N),qu(R,k,function(nt,ft){return N(nt,ft[0])})}function ab(R,N,k){N=bo(N,R);var nt=-1,ft=N.length;for(ft||(ft=1,R=i);++ntN){var nt=R;R=N,N=nt}if(k||R%1||N%1){var ft=mc();return Mr(R+ft*(N-R+Ko("1e-"+((ft+"").length-1))),N)}return ma(R,N)}var gb=L(function(R,N,k){return N=N.toLowerCase(),R+(k?zS(N):N)});function zS(R){return u0(nn(R).toLowerCase())}function GS(R){return R=nn(R),R&&R.replace(Te,Wu).replace(sn,"")}function yb(R,N,k){R=nn(R),N=Pr(N);var nt=R.length;k=k===i?nt:Co(bi(k),0,nt);var ft=k;return k-=N.length,k>=0&&R.slice(k,ft)==N}function xb(R){return R=nn(R),R&&He.test(R)?R.replace(Ce,Qo):R}function Sb(R){return R=nn(R),R&&Xi.test(R)?R.replace(pi,"\\$&"):R}var Tb=L(function(R,N,k){return R+(k?"-":"")+N.toLowerCase()}),Eb=L(function(R,N,k){return R+(k?" ":"")+N.toLowerCase()}),Mb=kp("toLowerCase");function Cb(R,N,k){R=nn(R),N=bi(N);var nt=N?V(R):0;if(!N||nt>=N)return R;var ft=(N-nt)/2;return Ee(Oh(ft),k)+R+Ee(Fh(ft),k)}function wb(R,N,k){R=nn(R),N=bi(N);var nt=N?V(R):0;return N&&nt>>0,k?(R=nn(R),R&&(typeof N=="string"||N!=null&&!o0(N))&&(N=Pr(N),!N&&ws(R))?Lo(K(R),0,k):R.split(N,k)):[]}var Ob=L(function(R,N,k){return R+(k?" ":"")+u0(N)});function Db(R,N,k){return R=nn(R),k=k==null?0:Co(bi(k),0,R.length),N=Pr(N),R.slice(k,k+N.length)==N}function Ib(R,N,k){var nt=mt.templateSettings;k&&fs(R,N,k)&&(N=i),R=nn(R),N=ev({},N,nt,kt);var ft=ev({},N.imports,nt.imports,kt),xt=Fr(ft),Ot=Qn(ft,xt),Gt,jt,fe=0,ce=N.interpolate||ze,ye="__p += '",Ne=Kt((N.escape||ze).source+"|"+ce.source+"|"+(ce===Ii?ho:ze).source+"|"+(N.evaluate||ze).source+"|$","g"),$e="//# sourceURL="+(me.call(N,"sourceURL")?(N.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Sr+"]")+` +`;R.replace(Ne,function(ui,Ui,Hi,_s,cs,qs){return Hi||(Hi=_s),ye+=R.slice(fe,qs).replace(Xe,rs),Ui&&(Gt=!0,ye+=`' + __e(`+Ui+`) + '`),cs&&(jt=!0,ye+=`'; `+cs+`; @@ -6375,13 +6375,13 @@ __p += '`),Hi&&(ye+=`' + `;var hi=me.call(N,"variable")&&N.variable;if(!hi)ye=`with (obj) { `+ye+` } -`;else if(zs.test(hi))throw new Lt(y);ye=(jt?ye.replace(Mi,""):ye).replace(he,"$1").replace(Ti,"$1;"),ye="function("+(hi||"obj")+`) { +`;else if(zs.test(hi))throw new Lt(x);ye=(jt?ye.replace(Mi,""):ye).replace(he,"$1").replace(Ti,"$1;"),ye="function("+(hi||"obj")+`) { `+(hi?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(Gt?", __e = _.escape":"")+(jt?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+ye+`return __p -}`;var Oi=VS(function(){return Ut(xt,Ke+"return "+ye).apply(i,Ot)});if(Oi.source=ye,r0(Oi))throw Oi;return Oi}function Gb(R){return en(R).toLowerCase()}function Vb(R){return en(R).toUpperCase()}function Hb(R,N,k){if(R=en(R),R&&(k||N===i))return Gl(R);if(!R||!(N=Pr(N)))return R;var nt=K(R),ft=K(N),xt=qi(nt,ft),Ot=mo(nt,ft)+1;return Lo(nt,xt,Ot).join("")}function Wb(R,N,k){if(R=en(R),R&&(k||N===i))return R.slice(0,et(R)+1);if(!R||!(N=Pr(N)))return R;var nt=K(R),ft=mo(nt,K(N))+1;return Lo(nt,0,ft).join("")}function Xb(R,N,k){if(R=en(R),R&&(k||N===i))return R.replace(ba,"");if(!R||!(N=Pr(N)))return R;var nt=K(R),ft=qi(nt,K(N));return Lo(nt,ft).join("")}function Yb(R,N){var k=A,nt=P;if(In(N)){var ft="separator"in N?N.separator:ft;k="length"in N?bi(N.length):k,nt="omission"in N?Pr(N.omission):nt}R=en(R);var xt=R.length;if(ws(R)){var Ot=K(R);xt=Ot.length}if(k>=xt)return R;var Gt=k-V(nt);if(Gt<1)return nt;var jt=Ot?Lo(Ot,0,Gt).join(""):R.slice(0,Gt);if(ft===i)return jt+nt;if(Ot&&(Gt+=jt.length-Gt),s0(ft)){if(R.slice(Gt).search(ft)){var fe,ce=jt;for(ft.global||(ft=Kt(ft.source,en(Fl.exec(ft))+"g")),ft.lastIndex=0;fe=ft.exec(ce);)var ye=fe.index;jt=jt.slice(0,ye===i?Gt:ye)}}else if(R.indexOf(Pr(ft),Gt)!=Gt){var Ie=jt.lastIndexOf(ft);Ie>-1&&(jt=jt.slice(0,Ie))}return jt+nt}function kb(R){return R=en(R),R&&we.test(R)?R.replace(bt,st):R}var jb=L(function(R,N,k){return R+(k?" ":"")+N.toUpperCase()}),l0=Yp("toUpperCase");function GS(R,N,k){return R=en(R),N=k?i:N,N===i?hr(R)?Mt(R):Zo(R):R.match(N)||[]}var VS=ii(function(R,N){try{return Qi(R,i,N)}catch(k){return r0(k)?k:new Lt(k)}}),Kb=Ai(function(R,N){return Sn(N,function(k){k=Oo(k),va(R,k,i0(R[k],R))}),R});function Zb(R){var N=R==null?0:R.length,k=li();return R=N?_i(R,function(nt){if(typeof nt[1]!="function")throw new Qt(s);return[k(nt[0]),nt[1]]}):[],ii(function(nt){for(var ft=-1;++ftz)return[];var k=Q,nt=Mr(R,Q);N=li(N),R-=Q;for(var ft=Cs(nt,N);++k0||N<0)?new ri(k):(R<0?k=k.takeRight(-R):R&&(k=k.drop(R)),N!==i&&(N=bi(N),k=N<0?k.dropRight(-N):k.take(N-R)),k)},ri.prototype.takeRightWhile=function(R){return this.reverse().takeWhile(R).reverse()},ri.prototype.toArray=function(){return this.take(Q)},os(ri.prototype,function(R,N){var k=/^(?:filter|find|map|reject)|While$/.test(N),nt=/^(?:head|last)$/.test(N),ft=mt[nt?"take"+(N=="last"?"Right":""):N],xt=nt||/^find/.test(N);ft&&(mt.prototype[N]=function(){var Ot=this.__wrapped__,Gt=nt?[1]:arguments,jt=Ot instanceof ri,fe=Gt[0],ce=jt||Ei(Ot),ye=function(Ui){var Hi=ft.apply(mt,Yr([Ui],Gt));return nt&&Ie?Hi[0]:Hi};ce&&k&&typeof fe=="function"&&fe.length!=1&&(jt=ce=!1);var Ie=this.__chain__,Ke=!!this.__actions__.length,hi=xt&&!Ie,Oi=jt&&!Ke;if(!xt&&ce){Ot=Oi?Ot:new ri(this);var ui=R.apply(Ot,Gt);return ui.__actions__.push({func:Kp,args:[ye],thisArg:i}),new Cr(ui,Ie)}return hi&&Oi?R.apply(this,Gt):(ui=this.thru(ye),hi?nt?ui.value()[0]:ui.value():ui)})}),Sn(["pop","push","shift","sort","splice","unshift"],function(R){var N=ae[R],k=/^(?:push|sort|unshift)$/.test(R)?"tap":"thru",nt=/^(?:pop|shift)$/.test(R);mt.prototype[R]=function(){var ft=arguments;if(nt&&!this.__chain__){var xt=this.value();return N.apply(Ei(xt)?xt:[],ft)}return this[k](function(Ot){return N.apply(Ei(Ot)?Ot:[],ft)})}}),os(ri.prototype,function(R,N){var k=mt[N];if(k){var nt=k.name+"";me.call(tl,nt)||(tl[nt]=[]),tl[nt].push({name:N,func:k})}}),tl[lt(i,o).name]=[{name:"wrapper",func:i}],ri.prototype.clone=zg,ri.prototype.reverse=Gg,ri.prototype.value=ss,mt.prototype.at=ER,mt.prototype.chain=MR,mt.prototype.commit=CR,mt.prototype.next=wR,mt.prototype.plant=PR,mt.prototype.reverse=RR,mt.prototype.toJSON=mt.prototype.valueOf=mt.prototype.value=bR,mt.prototype.first=mt.prototype.head,To&&(mt.prototype[To]=AR),mt},zt=Nt();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(xn._=zt,define(function(){return zt})):bn?((bn.exports=zt)._=zt,Rh._=zt):xn._=zt}).call(g)}),VC=class extends Set{constructor(g,t=!1){super(g),this.valuesAsFlags=t}};function cd(g){if(g instanceof Map)return Object.fromEntries([...g.entries()].map(([t,i])=>[t,cd(i)]));if(g instanceof Set)return Array.from(g.values()).map(cd);if(g instanceof VC)return{values:[...g.values()],valuesAsFlags:g.valuesAsFlags};if(typeof g=="object"){let t={};return Object.entries(g).forEach(([i,x])=>{t[i]=cd(x)}),t}else return g}t1(e1(),1);var W4=t1(e1(),1);function fu(g,t){if(typeof g!="object")throw new Error(`Cannot merge into non-object objectToMergeWith. Received: ${JSON.stringify(g)}`);if(typeof t!="object")throw new Error(`Cannot merge using non-object objectToMergeWith. Received: ${JSON.stringify(t)}`);let i=(0,W4.cloneDeep)(g);for(let[x,T]of Object.entries(t))typeof T!="object"||T instanceof Set||i[x]===void 0?i[x]=T:i[x]=fu(i[x],T);return i}function HC(g,t){if(!(g===void 0||typeof g!="object"))for(let i of Object.keys(g)){if(i===t)return g[i];let x=g[i];if(typeof x=="object"){let T=HC(x,t);if(T!==void 0)return T}}}var T0="@composite:",X4="@inherit:",Y4=class{constructor(g,t,i){this.tiledClassToMembersMap=g,this.enumNameToValuesMap=t,this.parserOptions=i,this.memoiser=new Map}flattenMembers(g,t){return this.memoiser.has(g)?{[g]:this.memoiser.get(g)}:(this.memoiser.set(g,t.reduce((i,x)=>Pn(Pn({},i),this.flattenMemberProperty(x)),{})),{[g]:this.memoiser.get(g)})}flattenMemberProperty(g){var t;let i=(t=g.propertyType)!=null?t:g.propertytype;if(g.type==="class"){if(!this.memoiser.has(i)){let E=this.tiledClassToMembersMap.get(i).reduce((s,y)=>fu(this.flattenMemberProperty(y),s),{});this.memoiser.set(i,E)}let x=this.memoiser.get(i),T=fu(x,this.flattenValue(g.value,x));return this.checkIfShouldFlatten(g.name)?T:{[g.name.replace(T0,"")]:T}}else return this.enumNameToValuesMap.has(i)?this.enumNameToValuesMap.get(i).valuesAsFlags?{[g.name]:new Set(g.value.split(",").filter(x=>x!==""))}:{[g.name]:g.value}:{[g.name]:g.value}}get memoisedFlattenedProperties(){return this.memoiser}flattenValue(g,t){return Object.entries(g).reduce((i,[x,T])=>{if(typeof T!="object")return HC(t,x)instanceof Set?fu({[x]:new Set(T.split(",").filter(E=>E!==""))},i):fu({[x]:T},i);if(this.checkIfShouldFlatten(x))return fu(this.flattenValue(T,t),i);{let E=x.replace(T0,"");return fu({[E]:this.flattenValue(T,t)},i)}},{})}checkIfShouldFlatten(g){var t;return((t=this.parserOptions)==null?void 0:t.defaultComposite)===!0?g.startsWith(X4):!g.startsWith(T0)}},vT=t1(e1(),1),k4=class{constructor(g){this.flattener=g}flattenPropertiesOnObject(g){var t,i,x,T;return gh(Pn(Pn({},this.flattener.memoisedFlattenedProperties.get((t=g.class)!=null?t:g.type)),(i=g.properties)==null?void 0:i.reduce((E,s)=>Pn(Pn({},E),this.flattener.flattenMemberProperty(s)),{})),{name:g.name,id:g.id,class:(T=(x=g.class)!=null?x:g.type)!=null?T:null,x:g.x,y:g.y})}flattenPropertiesOnTile(g){var t,i,x,T;return gh(Pn(Pn({},this.flattener.memoisedFlattenedProperties.get((t=g.class)!=null?t:g.type)),(i=g.properties)==null?void 0:i.reduce((E,s)=>Pn(Pn({},E),this.flattener.flattenMemberProperty(s)),{})),{id:g.id,class:(T=(x=g.class)!=null?x:g.type)!=null?T:null})}getCustomTypesMap(){return new Map([...this.flattener.memoisedFlattenedProperties.entries()].map(([g,t])=>[g,(0,vT.cloneDeep)(t)]))}getEnumsMap(){return new Map([...this.flattener.enumNameToValuesMap.entries()].map(([g,t])=>[g,(0,vT.cloneDeep)(t)]))}toJSON(){return JSON.stringify({customTypes:cd(this.getCustomTypesMap()),enums:cd(this.getEnumsMap())},null,4)}};function j4(g,t){let i=new Map(g.propertyTypes.filter(E=>E.type==="enum").map(E=>[E.name,new VC(E.values,E.valuesAsFlags)])),x=new Map(g.propertyTypes.filter(E=>E.type==="class").map(E=>[E.name,E.members])),T=new Y4(x,i,t);return x.forEach((E,s)=>{T.flattenMembers(s,E)}),new k4(T)}var K4={parse:j4},WC=class{constructor(g,t){this.phaserTile=g,this.tiledProject=t}getProperty(g){var t,i;let x={};if(this.tiledProject){let T=K4.parse(this.tiledProject),E=this.getType();if(E){let s=(t=T.getCustomTypesMap())==null?void 0:t.get(E);if(s)for(let[y,e]of Object.entries(s))x[y]=e}}return(i=this.phaserTile.properties[g])!=null?i:x[g]}hasProperty(g){return this.getProperty(g)!=null}getType(){var g,t;return(t=(g=this.phaserTile.tileset)==null?void 0:g.tileData[this.phaserTile.index-1])==null?void 0:t.type}},Z4=class{constructor(g,t){this.phaserTilemapLayer=g,this.tiledProject=t}getName(){return this.phaserTilemapLayer.layer.name}getProperty(g){let t=this.phaserTilemapLayer.layer.properties,i=t?.find(x=>x.name==g);return i?.value}hasProperty(g){return this.getProperty(g)!=null}isCharLayer(){return this.hasProperty(nm)}getData(){return this.phaserTilemapLayer.layer.data.map(g=>g.map(t=>new WC(t,this.tiledProject)))}},$4=class{constructor(g,t){this.phaserTilemap=g,this.tiledProject=t;for(let i of this.phaserTilemap.layers)if(i.tilemapLayer==null)throw new Error(`Error initializing tilemap. Layer '${i.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(g=>new Z4(g.tilemapLayer,this.tiledProject))}hasTileAt(g,t,i){return!!this.phaserTilemap.hasTileAt(g,t,i)}getTileAt(g,t,i){let x=this.phaserTilemap.getTileAt(g,t,!1,i);if(x)return new WC(x,this.tiledProject)}},XC=class Ny{constructor(t){this.scene=t,this.geHeadless=new F4(!1),this.isCreatedInternal=!1,Ny.welcomeMessagePrinted||(console.log(`Using GridEngine Phaser Plugin v${IC}`),Ny.welcomeMessagePrinted=!0),this.scene.sys.events.once("boot",this.boot,this)}boot(){this.scene.sys.events.on("update",this.update,this)}getCharLayer(t){return this.geHeadless.getCharLayer(t)}getTransition(t,i){return this.geHeadless.getTransition(t,i)}setTransition(t,i,x){this.geHeadless.setTransition(t,i,x)}create(t,i){this.geHeadless.create(new $4(t,i.tiledProject),i),this.isCreatedInternal=!0,this.gridCharacters=new Map;let x=this.setConfigDefaults(i);this.config=x,this.gridTilemap=new Iy(t),this.addCharacters()}getPosition(t){return this.geHeadless.getPosition(t)}move(t,i){this.geHeadless.move(t,i)}moveRandomly(t,i=0,x=-1){this.geHeadless.moveRandomly(t,i,x)}getMovement(t){return this.geHeadless.getMovement(t)}moveTo(t,i,x){return this.geHeadless.moveTo(t,i,x)}stopMovement(t){this.geHeadless.stopMovement(t)}setSpeed(t,i){this.geHeadless.setSpeed(t,i)}getSpeed(t){return this.geHeadless.getSpeed(t)}setContainer(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);T.setContainer(i)}getContainer(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);return x.getContainer()}getOffsetX(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);return x.getOffsetX()}setOffsetX(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);T.setOffsetX(i)}getOffsetY(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);return x.getOffsetY()}setOffsetY(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);T.setOffsetY(i)}collidesWithTiles(t){return this.geHeadless.collidesWithTiles(t)}getWalkingAnimationMapping(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);let T=x.getAnimation();return T?.getWalkingAnimationMapping()}hasLayerOverlay(){var t;return this.initGuard(),!!((t=this.config)!=null&&t.layerOverlay)}setWalkingAnimationMapping(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);let E=T.getAnimation();E?.setWalkingAnimationMapping(i)}update(t,i){if(this.isCreatedInternal&&this.gridCharacters)for(let[x,T]of this.gridCharacters)T.update(i);this.geHeadless.update(t,i)}addCharacter(t){this.geHeadless.addCharacter(t),this.addCharacterInternal(t)}hasCharacter(t){return this.geHeadless.hasCharacter(t)}removeCharacter(t){var i,x;this.initGuard();let T=(i=this.gridCharacters)==null?void 0:i.get(t);if(!T)throw this.createCharUnknownErr(t);T.destroy(),(x=this.gridCharacters)==null||x.delete(t),this.geHeadless.removeCharacter(t)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters){for(let t of this.gridCharacters.keys())this.removeCharacter(t);this.geHeadless.removeAllCharacters()}}getAllCharacters(t){return this.geHeadless.getAllCharacters(t)}getLabels(t){return this.geHeadless.getLabels(t)}addLabels(t,i){this.geHeadless.addLabels(t,i)}removeLabels(t,i){this.geHeadless.removeLabels(t,i)}clearLabels(t){this.geHeadless.clearLabels(t)}follow(t,i,x,T){let E;x===void 0?E={distance:0,closestPointIfBlocked:!1}:typeof x=="number"?(E={distance:x,closestPointIfBlocked:!1},T&&(E.closestPointIfBlocked=!0)):E=x,this.geHeadless.follow(t,i,E)}isMoving(t){return this.geHeadless.isMoving(t)}getFacingDirection(t){return this.geHeadless.getFacingDirection(t)}getFacingPosition(t){return this.geHeadless.getFacingPosition(t)}turnTowards(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);T.turnTowards(i),this.geHeadless.turnTowards(t,i)}getCharactersAt(t,i){return this.geHeadless.getCharactersAt(t,i)}setPosition(t,i,x){this.geHeadless.setPosition(t,i,x)}getSprite(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);return x.getSprite()}setSprite(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);i.setOrigin(0,0),T.setSprite(i)}isBlocked(t,i,x=["geDefault"]){return this.geHeadless.isBlocked(t,i,x)}isTileBlocked(t,i){return this.geHeadless.isTileBlocked(t,i)}getCollisionGroups(t){return this.geHeadless.getCollisionGroups(t)}setCollisionGroups(t,i){this.geHeadless.setCollisionGroups(t,i)}getIgnoreCollisionGroups(t){return this.geHeadless.getIgnoreCollisionGroups(t)}setIgnoreCollisionGroups(t,i){this.geHeadless.setIgnoreCollisionGroups(t,i)}getTilePosInDirection(t,i,x){return this.geHeadless.getTilePosInDirection(t,i,x)}findShortestPath(t,i,x={}){return this.geHeadless.findShortestPath(t,i,x)}steppedOn(t,i,x){return this.geHeadless.steppedOn(t,i,x)}characterShifted(){return this.geHeadless.characterShifted()}movementStarted(){return this.geHeadless.movementStarted()}movementStopped(){return this.geHeadless.movementStopped()}directionChanged(){return this.geHeadless.directionChanged()}positionChangeStarted(){return this.geHeadless.positionChangeStarted()}positionChangeFinished(){return this.geHeadless.positionChangeFinished()}getMovementProgress(t){return this.geHeadless.getMovementProgress(t)}rebuildTileCollisionCache(t,i,x,T){this.geHeadless.rebuildTileCollisionCache(t,i,x,T)}addQueueMovements(t,i,x){this.geHeadless.addQueueMovements(t,i,x)}getEnqueuedMovements(t){return this.geHeadless.getEnqueuedMovements(t)}queueMovementFinished(){return this.geHeadless.queueMovementFinished()}clearEnqueuedMovements(t){return this.geHeadless.clearEnqueuedMovements(t)}getState(){return{characters:this.geHeadless.getState().characters.map(t=>gh(Pn({},t),{offsetX:this.getOffsetX(t.id),offsetY:this.getOffsetY(t.id)}))}}setState(t){if(this.geHeadless.setState(t),this.gridCharacters)for(let i of t.characters){let x=this.gridCharacters.get(i.id);x&&(x.setOffsetX(i.offsetX),x.setOffsetY(i.offsetY))}}getTileCost(t,i,x){return this.initGuard(),this.geHeadless.getTileCost(t,i,x)}setConfigDefaults(t){return Pn({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",layerOverlay:!1,cacheTileCollisions:!1},t)}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var t;(t=this.config)==null||t.characters.forEach(i=>this.addCharacterInternal(i))}createCharUnknownErr(t){return new Error(`Character unknown: ${t}`)}addCharacterInternal(t){var i;if(this.initGuard(),!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let x=new c4(t,this.scene,this.gridTilemap,this.config.layerOverlay,this.geHeadless);(i=this.gridCharacters)==null||i.set(t.id,x)}};XC.welcomeMessagePrinted=!1;var J4=XC,Q4=J4;/*! Bundled license information: +}`;var Oi=HS(function(){return Ut(xt,$e+"return "+ye).apply(i,Ot)});if(Oi.source=ye,a0(Oi))throw Oi;return Oi}function Nb(R){return nn(R).toLowerCase()}function Bb(R){return nn(R).toUpperCase()}function Ub(R,N,k){if(R=nn(R),R&&(k||N===i))return zl(R);if(!R||!(N=Pr(N)))return R;var nt=K(R),ft=K(N),xt=tn(nt,ft),Ot=mo(nt,ft)+1;return Lo(nt,xt,Ot).join("")}function zb(R,N,k){if(R=nn(R),R&&(k||N===i))return R.slice(0,et(R)+1);if(!R||!(N=Pr(N)))return R;var nt=K(R),ft=mo(nt,K(N))+1;return Lo(nt,0,ft).join("")}function Gb(R,N,k){if(R=nn(R),R&&(k||N===i))return R.replace(ba,"");if(!R||!(N=Pr(N)))return R;var nt=K(R),ft=tn(nt,K(N));return Lo(nt,ft).join("")}function Vb(R,N){var k=A,nt=P;if(In(N)){var ft="separator"in N?N.separator:ft;k="length"in N?bi(N.length):k,nt="omission"in N?Pr(N.omission):nt}R=nn(R);var xt=R.length;if(ws(R)){var Ot=K(R);xt=Ot.length}if(k>=xt)return R;var Gt=k-V(nt);if(Gt<1)return nt;var jt=Ot?Lo(Ot,0,Gt).join(""):R.slice(0,Gt);if(ft===i)return jt+nt;if(Ot&&(Gt+=jt.length-Gt),o0(ft)){if(R.slice(Gt).search(ft)){var fe,ce=jt;for(ft.global||(ft=Kt(ft.source,nn(Ll.exec(ft))+"g")),ft.lastIndex=0;fe=ft.exec(ce);)var ye=fe.index;jt=jt.slice(0,ye===i?Gt:ye)}}else if(R.indexOf(Pr(ft),Gt)!=Gt){var Ne=jt.lastIndexOf(ft);Ne>-1&&(jt=jt.slice(0,Ne))}return jt+nt}function Hb(R){return R=nn(R),R&&we.test(R)?R.replace(bt,st):R}var Wb=L(function(R,N,k){return R+(k?" ":"")+N.toUpperCase()}),u0=kp("toUpperCase");function VS(R,N,k){return R=nn(R),N=k?i:N,N===i?hr(R)?Mt(R):$o(R):R.match(N)||[]}var HS=ii(function(R,N){try{return _i(R,i,N)}catch(k){return a0(k)?k:new Lt(k)}}),Xb=Ai(function(R,N){return Sn(N,function(k){k=Oo(k),va(R,k,r0(R[k],R))}),R});function Yb(R){var N=R==null?0:R.length,k=li();return R=N?qi(R,function(nt){if(typeof nt[1]!="function")throw new Qt(s);return[k(nt[0]),nt[1]]}):[],ii(function(nt){for(var ft=-1;++ftz)return[];var k=Q,nt=Mr(R,Q);N=li(N),R-=Q;for(var ft=Cs(nt,N);++k0||N<0)?new ri(k):(R<0?k=k.takeRight(-R):R&&(k=k.drop(R)),N!==i&&(N=bi(N),k=N<0?k.dropRight(-N):k.take(N-R)),k)},ri.prototype.takeRightWhile=function(R){return this.reverse().takeWhile(R).reverse()},ri.prototype.toArray=function(){return this.take(Q)},os(ri.prototype,function(R,N){var k=/^(?:filter|find|map|reject)|While$/.test(N),nt=/^(?:head|last)$/.test(N),ft=mt[nt?"take"+(N=="last"?"Right":""):N],xt=nt||/^find/.test(N);ft&&(mt.prototype[N]=function(){var Ot=this.__wrapped__,Gt=nt?[1]:arguments,jt=Ot instanceof ri,fe=Gt[0],ce=jt||Ei(Ot),ye=function(Ui){var Hi=ft.apply(mt,Yr([Ui],Gt));return nt&&Ne?Hi[0]:Hi};ce&&k&&typeof fe=="function"&&fe.length!=1&&(jt=ce=!1);var Ne=this.__chain__,$e=!!this.__actions__.length,hi=xt&&!Ne,Oi=jt&&!$e;if(!xt&&ce){Ot=Oi?Ot:new ri(this);var ui=R.apply(Ot,Gt);return ui.__actions__.push({func:$p,args:[ye],thisArg:i}),new Cr(ui,Ne)}return hi&&Oi?R.apply(this,Gt):(ui=this.thru(ye),hi?nt?ui.value()[0]:ui.value():ui)})}),Sn(["pop","push","shift","sort","splice","unshift"],function(R){var N=ae[R],k=/^(?:push|sort|unshift)$/.test(R)?"tap":"thru",nt=/^(?:pop|shift)$/.test(R);mt.prototype[R]=function(){var ft=arguments;if(nt&&!this.__chain__){var xt=this.value();return N.apply(Ei(xt)?xt:[],ft)}return this[k](function(Ot){return N.apply(Ei(Ot)?Ot:[],ft)})}}),os(ri.prototype,function(R,N){var k=mt[N];if(k){var nt=k.name+"";me.call(tl,nt)||(tl[nt]=[]),tl[nt].push({name:N,func:k})}}),tl[lt(i,o).name]=[{name:"wrapper",func:i}],ri.prototype.clone=Vg,ri.prototype.reverse=Hg,ri.prototype.value=ss,mt.prototype.at=yR,mt.prototype.chain=xR,mt.prototype.commit=SR,mt.prototype.next=TR,mt.prototype.plant=MR,mt.prototype.reverse=CR,mt.prototype.toJSON=mt.prototype.valueOf=mt.prototype.value=wR,mt.prototype.first=mt.prototype.head,To&&(mt.prototype[To]=ER),mt},zt=Nt();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(xn._=zt,define(function(){return zt})):bn?((bn.exports=zt)._=zt,Ph._=zt):xn._=zt}).call(g)}),HC=class extends Set{constructor(g,t=!1){super(g),this.valuesAsFlags=t}};function cd(g){if(g instanceof Map)return Object.fromEntries([...g.entries()].map(([t,i])=>[t,cd(i)]));if(g instanceof Set)return Array.from(g.values()).map(cd);if(g instanceof HC)return{values:[...g.values()],valuesAsFlags:g.valuesAsFlags};if(typeof g=="object"){let t={};return Object.entries(g).forEach(([i,y])=>{t[i]=cd(y)}),t}else return g}e1(i1(),1);var z4=e1(i1(),1);function uu(g,t){if(typeof g!="object")throw new Error(`Cannot merge into non-object objectToMergeWith. Received: ${JSON.stringify(g)}`);if(typeof t!="object")throw new Error(`Cannot merge using non-object objectToMergeWith. Received: ${JSON.stringify(t)}`);let i=(0,z4.cloneDeep)(g);for(let[y,T]of Object.entries(t))typeof T!="object"||T instanceof Set||i[y]===void 0?i[y]=T:i[y]=uu(i[y],T);return i}function WC(g,t){if(!(g===void 0||typeof g!="object"))for(let i of Object.keys(g)){if(i===t)return g[i];let y=g[i];if(typeof y=="object"){let T=WC(y,t);if(T!==void 0)return T}}}var M0="@composite:",G4="@inherit:",V4=class{constructor(g,t,i){this.tiledClassToMembersMap=g,this.enumNameToValuesMap=t,this.parserOptions=i,this.memoiser=new Map}flattenMembers(g,t){return this.memoiser.has(g)?{[g]:this.memoiser.get(g)}:(this.memoiser.set(g,t.reduce((i,y)=>Pn(Pn({},i),this.flattenMemberProperty(y)),{})),{[g]:this.memoiser.get(g)})}flattenMemberProperty(g){var t;let i=(t=g.propertyType)!=null?t:g.propertytype;if(g.type==="class"){if(!this.memoiser.has(i)){let E=this.tiledClassToMembersMap.get(i).reduce((s,x)=>uu(this.flattenMemberProperty(x),s),{});this.memoiser.set(i,E)}let y=this.memoiser.get(i),T=uu(y,this.flattenValue(g.value,y));return this.checkIfShouldFlatten(g.name)?T:{[g.name.replace(M0,"")]:T}}else return this.enumNameToValuesMap.has(i)?this.enumNameToValuesMap.get(i).valuesAsFlags?{[g.name]:new Set(g.value.split(",").filter(y=>y!==""))}:{[g.name]:g.value}:{[g.name]:g.value}}get memoisedFlattenedProperties(){return this.memoiser}flattenValue(g,t){return Object.entries(g).reduce((i,[y,T])=>{if(typeof T!="object")return WC(t,y)instanceof Set?uu({[y]:new Set(T.split(",").filter(E=>E!==""))},i):uu({[y]:T},i);if(this.checkIfShouldFlatten(y))return uu(this.flattenValue(T,t),i);{let E=y.replace(M0,"");return uu({[E]:this.flattenValue(T,t)},i)}},{})}checkIfShouldFlatten(g){var t;return((t=this.parserOptions)==null?void 0:t.defaultComposite)===!0?g.startsWith(G4):!g.startsWith(M0)}},mT=e1(i1(),1),H4=class{constructor(g){this.flattener=g}flattenPropertiesOnObject(g){var t,i,y,T;return mh(Pn(Pn({},this.flattener.memoisedFlattenedProperties.get((t=g.class)!=null?t:g.type)),(i=g.properties)==null?void 0:i.reduce((E,s)=>Pn(Pn({},E),this.flattener.flattenMemberProperty(s)),{})),{name:g.name,id:g.id,class:(T=(y=g.class)!=null?y:g.type)!=null?T:null,x:g.x,y:g.y})}flattenPropertiesOnTile(g){var t,i,y,T;return mh(Pn(Pn({},this.flattener.memoisedFlattenedProperties.get((t=g.class)!=null?t:g.type)),(i=g.properties)==null?void 0:i.reduce((E,s)=>Pn(Pn({},E),this.flattener.flattenMemberProperty(s)),{})),{id:g.id,class:(T=(y=g.class)!=null?y:g.type)!=null?T:null})}getCustomTypesMap(){return new Map([...this.flattener.memoisedFlattenedProperties.entries()].map(([g,t])=>[g,(0,mT.cloneDeep)(t)]))}getEnumsMap(){return new Map([...this.flattener.enumNameToValuesMap.entries()].map(([g,t])=>[g,(0,mT.cloneDeep)(t)]))}toJSON(){return JSON.stringify({customTypes:cd(this.getCustomTypesMap()),enums:cd(this.getEnumsMap())},null,4)}};function W4(g,t){let i=new Map(g.propertyTypes.filter(E=>E.type==="enum").map(E=>[E.name,new HC(E.values,E.valuesAsFlags)])),y=new Map(g.propertyTypes.filter(E=>E.type==="class").map(E=>[E.name,E.members])),T=new V4(y,i,t);return y.forEach((E,s)=>{T.flattenMembers(s,E)}),new H4(T)}var X4={parse:W4},XC=class{constructor(g,t){this.phaserTile=g,this.tiledProject=t}getProperty(g){var t,i;let y={};if(this.tiledProject){let T=X4.parse(this.tiledProject),E=this.getType();if(E){let s=(t=T.getCustomTypesMap())==null?void 0:t.get(E);if(s)for(let[x,e]of Object.entries(s))y[x]=e}}return(i=this.phaserTile.properties[g])!=null?i:y[g]}hasProperty(g){return this.getProperty(g)!=null}getType(){var g,t;return(t=(g=this.phaserTile.tileset)==null?void 0:g.tileData[this.phaserTile.index-1])==null?void 0:t.type}},Y4=class{constructor(g,t){this.phaserTilemapLayer=g,this.tiledProject=t}getName(){return this.phaserTilemapLayer.layer.name}getProperty(g){let t=this.phaserTilemapLayer.layer.properties,i=t?.find(y=>y.name==g);return i?.value}hasProperty(g){return this.getProperty(g)!=null}isCharLayer(){return this.hasProperty(rm)}getData(){return this.phaserTilemapLayer.layer.data.map(g=>g.map(t=>new XC(t,this.tiledProject)))}},k4=class{constructor(g,t){this.phaserTilemap=g,this.tiledProject=t;for(let i of this.phaserTilemap.layers)if(i.tilemapLayer==null)throw new Error(`Error initializing tilemap. Layer '${i.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(g=>new Y4(g.tilemapLayer,this.tiledProject))}hasTileAt(g,t,i){return!!this.phaserTilemap.hasTileAt(g,t,i)}getTileAt(g,t,i){let y=this.phaserTilemap.getTileAt(g,t,!1,i);if(y)return new XC(y,this.tiledProject)}},YC=class Uy{constructor(t){this.scene=t,this.geHeadless=new P4(!1),this.isCreatedInternal=!1,Uy.welcomeMessagePrinted||(console.log(`Using GridEngine Phaser Plugin v${NC}`),Uy.welcomeMessagePrinted=!0),this.scene.sys.events.once("boot",this.boot,this)}boot(){this.scene.sys.events.on("update",this.update,this)}getCharLayer(t){return this.geHeadless.getCharLayer(t)}getTransition(t,i){return this.geHeadless.getTransition(t,i)}setTransition(t,i,y){this.geHeadless.setTransition(t,i,y)}create(t,i){this.geHeadless.create(new k4(t,i.tiledProject),i),this.isCreatedInternal=!0,this.gridCharacters=new Map;let y=this.setConfigDefaults(i);this.config=y,this.gridTilemap=new By(t),this.addCharacters()}getPosition(t){return this.geHeadless.getPosition(t)}move(t,i){this.geHeadless.move(t,i)}moveRandomly(t,i=0,y=-1){this.geHeadless.moveRandomly(t,i,y)}getMovement(t){return this.geHeadless.getMovement(t)}moveTo(t,i,y){return this.geHeadless.moveTo(t,i,y)}stopMovement(t){this.geHeadless.stopMovement(t)}setSpeed(t,i){this.geHeadless.setSpeed(t,i)}getSpeed(t){return this.geHeadless.getSpeed(t)}setContainer(t,i){var y;this.initGuard();let T=(y=this.gridCharacters)==null?void 0:y.get(t);if(!T)throw this.createCharUnknownErr(t);T.setContainer(i)}getContainer(t){var i;this.initGuard();let y=(i=this.gridCharacters)==null?void 0:i.get(t);if(!y)throw this.createCharUnknownErr(t);return y.getContainer()}getOffsetX(t){var i;this.initGuard();let y=(i=this.gridCharacters)==null?void 0:i.get(t);if(!y)throw this.createCharUnknownErr(t);return y.getOffsetX()}setOffsetX(t,i){var y;this.initGuard();let T=(y=this.gridCharacters)==null?void 0:y.get(t);if(!T)throw this.createCharUnknownErr(t);T.setOffsetX(i)}getOffsetY(t){var i;this.initGuard();let y=(i=this.gridCharacters)==null?void 0:i.get(t);if(!y)throw this.createCharUnknownErr(t);return y.getOffsetY()}setOffsetY(t,i){var y;this.initGuard();let T=(y=this.gridCharacters)==null?void 0:y.get(t);if(!T)throw this.createCharUnknownErr(t);T.setOffsetY(i)}collidesWithTiles(t){return this.geHeadless.collidesWithTiles(t)}getWalkingAnimationMapping(t){var i;this.initGuard();let y=(i=this.gridCharacters)==null?void 0:i.get(t);if(!y)throw this.createCharUnknownErr(t);let T=y.getAnimation();return T?.getWalkingAnimationMapping()}hasLayerOverlay(){var t;return this.initGuard(),!!((t=this.config)!=null&&t.layerOverlay)}setWalkingAnimationMapping(t,i){var y;this.initGuard();let T=(y=this.gridCharacters)==null?void 0:y.get(t);if(!T)throw this.createCharUnknownErr(t);let E=T.getAnimation();E?.setWalkingAnimationMapping(i)}update(t,i){if(this.isCreatedInternal&&this.gridCharacters)for(let[y,T]of this.gridCharacters)T.update(i);this.geHeadless.update(t,i)}addCharacter(t){this.geHeadless.addCharacter(t),this.addCharacterInternal(t)}hasCharacter(t){return this.geHeadless.hasCharacter(t)}removeCharacter(t){var i,y;this.initGuard();let T=(i=this.gridCharacters)==null?void 0:i.get(t);if(!T)throw this.createCharUnknownErr(t);T.destroy(),(y=this.gridCharacters)==null||y.delete(t),this.geHeadless.removeCharacter(t)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters){for(let t of this.gridCharacters.keys())this.removeCharacter(t);this.geHeadless.removeAllCharacters()}}getAllCharacters(t){return this.geHeadless.getAllCharacters(t)}getLabels(t){return this.geHeadless.getLabels(t)}addLabels(t,i){this.geHeadless.addLabels(t,i)}removeLabels(t,i){this.geHeadless.removeLabels(t,i)}clearLabels(t){this.geHeadless.clearLabels(t)}follow(t,i,y,T){let E;y===void 0?E={distance:0,closestPointIfBlocked:!1}:typeof y=="number"?(E={distance:y,closestPointIfBlocked:!1},T&&(E.closestPointIfBlocked=!0)):E=y,this.geHeadless.follow(t,i,E)}isMoving(t){return this.geHeadless.isMoving(t)}getFacingDirection(t){return this.geHeadless.getFacingDirection(t)}getFacingPosition(t){return this.geHeadless.getFacingPosition(t)}turnTowards(t,i){var y;this.initGuard();let T=(y=this.gridCharacters)==null?void 0:y.get(t);if(!T)throw this.createCharUnknownErr(t);T.turnTowards(i),this.geHeadless.turnTowards(t,i)}getCharactersAt(t,i){return this.geHeadless.getCharactersAt(t,i)}setPosition(t,i,y){this.geHeadless.setPosition(t,i,y)}getSprite(t){var i;this.initGuard();let y=(i=this.gridCharacters)==null?void 0:i.get(t);if(!y)throw this.createCharUnknownErr(t);return y.getSprite()}setSprite(t,i){var y;this.initGuard();let T=(y=this.gridCharacters)==null?void 0:y.get(t);if(!T)throw this.createCharUnknownErr(t);i.setOrigin(0,0),T.setSprite(i)}isBlocked(t,i,y=["geDefault"]){return this.geHeadless.isBlocked(t,i,y)}isTileBlocked(t,i){return this.geHeadless.isTileBlocked(t,i)}getCollisionGroups(t){return this.geHeadless.getCollisionGroups(t)}setCollisionGroups(t,i){this.geHeadless.setCollisionGroups(t,i)}getIgnoreCollisionGroups(t){return this.geHeadless.getIgnoreCollisionGroups(t)}setIgnoreCollisionGroups(t,i){this.geHeadless.setIgnoreCollisionGroups(t,i)}getTilePosInDirection(t,i,y){return this.geHeadless.getTilePosInDirection(t,i,y)}findShortestPath(t,i,y={}){return this.geHeadless.findShortestPath(t,i,y)}steppedOn(t,i,y){return this.geHeadless.steppedOn(t,i,y)}characterShifted(){return this.geHeadless.characterShifted()}movementStarted(){return this.geHeadless.movementStarted()}movementStopped(){return this.geHeadless.movementStopped()}directionChanged(){return this.geHeadless.directionChanged()}positionChangeStarted(){return this.geHeadless.positionChangeStarted()}positionChangeFinished(){return this.geHeadless.positionChangeFinished()}getMovementProgress(t){return this.geHeadless.getMovementProgress(t)}rebuildTileCollisionCache(t,i,y,T){this.geHeadless.rebuildTileCollisionCache(t,i,y,T)}addQueueMovements(t,i,y){this.geHeadless.addQueueMovements(t,i,y)}getEnqueuedMovements(t){return this.geHeadless.getEnqueuedMovements(t)}queueMovementFinished(){return this.geHeadless.queueMovementFinished()}clearEnqueuedMovements(t){return this.geHeadless.clearEnqueuedMovements(t)}getState(){return{characters:this.geHeadless.getState().characters.map(t=>mh(Pn({},t),{offsetX:this.getOffsetX(t.id),offsetY:this.getOffsetY(t.id)}))}}setState(t){if(this.geHeadless.setState(t),this.gridCharacters)for(let i of t.characters){let y=this.gridCharacters.get(i.id);y&&(y.setOffsetX(i.offsetX),y.setOffsetY(i.offsetY))}}getTileCost(t,i,y){return this.initGuard(),this.geHeadless.getTileCost(t,i,y)}setConfigDefaults(t){return Pn({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",layerOverlay:!1,cacheTileCollisions:!1},t)}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var t;(t=this.config)==null||t.characters.forEach(i=>this.addCharacterInternal(i))}createCharUnknownErr(t){return new Error(`Character unknown: ${t}`)}addCharacterInternal(t){var i;if(this.initGuard(),!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let y=new l4(t,this.scene,this.gridTilemap,this.config.layerOverlay,this.geHeadless);(i=this.gridCharacters)==null||i.set(t.id,y)}};YC.welcomeMessagePrinted=!1;var j4=YC,K4=j4;/*! Bundled license information: tiled-property-flattener/dist/tiled_property_flattener.min.js: (*! Bundled license information: @@ -6396,21 +6396,23 @@ tiled-property-flattener/dist/tiled_property_flattener.min.js: * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) *) -*/function mT(g){return g.type==="ROLL_DICE"}class mu{constructor(t,i=4){this.bounds=t,this.capacity=i,this.points=[],this.divided=!1,this.cache=new Map}subdivide(){const{xMin:t,yMin:i,xMax:x,yMax:T}=this.bounds,E=(x-t)/2,s=(T-i)/2,y=t,e=i;this.northeast=new mu({xMin:y+E,xMax:y+2*E,yMin:i,yMax:e+s},this.capacity),this.northwest=new mu({xMin:t,xMax:y+E,yMin:i,yMax:e+s},this.capacity),this.southeast=new mu({xMin:y+E,xMax:y+2*E,yMin:e+s,yMax:e+2*s},this.capacity),this.southwest=new mu({xMin:t,xMax:y+E,yMin:e+s,yMax:e+2*s},this.capacity),this.divided=!0}insert(t){return this.contains(t.bounds)?this.points.length=i&&t.xMax<=T&&t.yMin>=x&&t.yMax<=E}generateCacheKey(t){const{xMin:i,xMax:x,yMin:T,yMax:E}=t;return`${i},${x},${T},${E}`}queryRange(t,i=[]){if(!this.intersects(t))return i;for(const x of this.points)this.isWithinBounds(x.bounds,t)&&i.push(x);return this.divided&&(this.northwest?.queryRange(t,i),this.northeast?.queryRange(t,i),this.southwest?.queryRange(t,i),this.southeast?.queryRange(t,i)),i}query(t,i=[]){const x=`${t.x},${t.y}`,T=this.cache.get(x);if(T)return T;if(!this.intersects({xMin:t.x,xMax:t.x,yMin:t.y,yMax:t.y}))return i;for(const E of this.points)this.isWithinRange(t,E.bounds)&&i.push(E);return this.divided&&(this.northwest?.query(t,i),this.northeast?.query(t,i),this.southwest?.query(t,i),this.southeast?.query(t,i)),this.cache.set(x,i),i}intersects(t){const{xMin:i,yMin:x,xMax:T,yMax:E}=this.bounds;return!(t.xMin>T||t.xMaxE||t.yMax=i.xMin&&t.xMin<=i.xMax&&t.yMax>=i.yMin&&t.yMin<=i.yMax}isWithinRange(t,i){return t.x>=i.xMin&&t.x<=i.xMax&&t.y>=i.yMin&&t.y<=i.yMax}}function _4(g,t,i){let x=new Set([...t,void 0]);return g.listen((T,E)=>{x.has(E)&&i(T,E)})}function YC(g,t){return function(){return g.apply(t,arguments)}}const{toString:q4}=Object.prototype,{getPrototypeOf:i1}=Object,ng=(g=>t=>{const i=q4.call(t);return g[i]||(g[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),Wo=g=>(g=g.toLowerCase(),t=>ng(t)===g),rg=g=>t=>typeof t===g,{isArray:ac}=Array,Ed=rg("undefined");function tD(g){return g!==null&&!Ed(g)&&g.constructor!==null&&!Ed(g.constructor)&&Aa(g.constructor.isBuffer)&&g.constructor.isBuffer(g)}const kC=Wo("ArrayBuffer");function eD(g){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(g):t=g&&g.buffer&&kC(g.buffer),t}const iD=rg("string"),Aa=rg("function"),jC=rg("number"),sg=g=>g!==null&&typeof g=="object",nD=g=>g===!0||g===!1,rm=g=>{if(ng(g)!=="object")return!1;const t=i1(g);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in g)&&!(Symbol.iterator in g)},rD=Wo("Date"),sD=Wo("File"),aD=Wo("Blob"),oD=Wo("FileList"),lD=g=>sg(g)&&Aa(g.pipe),hD=g=>{let t;return g&&(typeof FormData=="function"&&g instanceof FormData||Aa(g.append)&&((t=ng(g))==="formdata"||t==="object"&&Aa(g.toString)&&g.toString()==="[object FormData]"))},uD=Wo("URLSearchParams"),fD=g=>g.trim?g.trim():g.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $d(g,t,{allOwnKeys:i=!1}={}){if(g===null||typeof g>"u")return;let x,T;if(typeof g!="object"&&(g=[g]),ac(g))for(x=0,T=g.length;x0;)if(T=i[x],t===T.toLowerCase())return T;return null}const ZC=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$C=g=>!Ed(g)&&g!==ZC;function By(){const{caseless:g}=$C(this)&&this||{},t={},i=(x,T)=>{const E=g&&KC(t,T)||T;rm(t[E])&&rm(x)?t[E]=By(t[E],x):rm(x)?t[E]=By({},x):ac(x)?t[E]=x.slice():t[E]=x};for(let x=0,T=arguments.length;x($d(t,(T,E)=>{i&&Aa(T)?g[E]=YC(T,i):g[E]=T},{allOwnKeys:x}),g),dD=g=>(g.charCodeAt(0)===65279&&(g=g.slice(1)),g),pD=(g,t,i,x)=>{g.prototype=Object.create(t.prototype,x),g.prototype.constructor=g,Object.defineProperty(g,"super",{value:t.prototype}),i&&Object.assign(g.prototype,i)},vD=(g,t,i,x)=>{let T,E,s;const y={};if(t=t||{},g==null)return t;do{for(T=Object.getOwnPropertyNames(g),E=T.length;E-- >0;)s=T[E],(!x||x(s,g,t))&&!y[s]&&(t[s]=g[s],y[s]=!0);g=i!==!1&&i1(g)}while(g&&(!i||i(g,t))&&g!==Object.prototype);return t},mD=(g,t,i)=>{g=String(g),(i===void 0||i>g.length)&&(i=g.length),i-=t.length;const x=g.indexOf(t,i);return x!==-1&&x===i},gD=g=>{if(!g)return null;if(ac(g))return g;let t=g.length;if(!jC(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=g[t];return i},yD=(g=>t=>g&&t instanceof g)(typeof Uint8Array<"u"&&i1(Uint8Array)),xD=(g,t)=>{const x=(g&&g[Symbol.iterator]).call(g);let T;for(;(T=x.next())&&!T.done;){const E=T.value;t.call(g,E[0],E[1])}},SD=(g,t)=>{let i;const x=[];for(;(i=g.exec(t))!==null;)x.push(i);return x},TD=Wo("HTMLFormElement"),ED=g=>g.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,x,T){return x.toUpperCase()+T}),gT=(({hasOwnProperty:g})=>(t,i)=>g.call(t,i))(Object.prototype),MD=Wo("RegExp"),JC=(g,t)=>{const i=Object.getOwnPropertyDescriptors(g),x={};$d(i,(T,E)=>{let s;(s=t(T,E,g))!==!1&&(x[E]=s||T)}),Object.defineProperties(g,x)},CD=g=>{JC(g,(t,i)=>{if(Aa(g)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const x=g[i];if(Aa(x)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},wD=(g,t)=>{const i={},x=T=>{T.forEach(E=>{i[E]=!0})};return ac(g)?x(g):x(String(g).split(t)),i},AD=()=>{},PD=(g,t)=>(g=+g,Number.isFinite(g)?g:t),E0="abcdefghijklmnopqrstuvwxyz",yT="0123456789",QC={DIGIT:yT,ALPHA:E0,ALPHA_DIGIT:E0+E0.toUpperCase()+yT},RD=(g=16,t=QC.ALPHA_DIGIT)=>{let i="";const{length:x}=t;for(;g--;)i+=t[Math.random()*x|0];return i};function bD(g){return!!(g&&Aa(g.append)&&g[Symbol.toStringTag]==="FormData"&&g[Symbol.iterator])}const LD=g=>{const t=new Array(10),i=(x,T)=>{if(sg(x)){if(t.indexOf(x)>=0)return;if(!("toJSON"in x)){t[T]=x;const E=ac(x)?[]:{};return $d(x,(s,y)=>{const e=i(s,T+1);!Ed(e)&&(E[y]=e)}),t[T]=void 0,E}}return x};return i(g,0)},FD=Wo("AsyncFunction"),OD=g=>g&&(sg(g)||Aa(g))&&Aa(g.then)&&Aa(g.catch),de={isArray:ac,isArrayBuffer:kC,isBuffer:tD,isFormData:hD,isArrayBufferView:eD,isString:iD,isNumber:jC,isBoolean:nD,isObject:sg,isPlainObject:rm,isUndefined:Ed,isDate:rD,isFile:sD,isBlob:aD,isRegExp:MD,isFunction:Aa,isStream:lD,isURLSearchParams:uD,isTypedArray:yD,isFileList:oD,forEach:$d,merge:By,extend:cD,trim:fD,stripBOM:dD,inherits:pD,toFlatObject:vD,kindOf:ng,kindOfTest:Wo,endsWith:mD,toArray:gD,forEachEntry:xD,matchAll:SD,isHTMLForm:TD,hasOwnProperty:gT,hasOwnProp:gT,reduceDescriptors:JC,freezeMethods:CD,toObjectSet:wD,toCamelCase:ED,noop:AD,toFiniteNumber:PD,findKey:KC,global:ZC,isContextDefined:$C,ALPHABET:QC,generateString:RD,isSpecCompliantForm:bD,toJSONObject:LD,isAsyncFn:FD,isThenable:OD};function Wi(g,t,i,x,T){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=g,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),x&&(this.request=x),T&&(this.response=T)}de.inherits(Wi,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:de.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const _C=Wi.prototype,qC={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(g=>{qC[g]={value:g}});Object.defineProperties(Wi,qC);Object.defineProperty(_C,"isAxiosError",{value:!0});Wi.from=(g,t,i,x,T,E)=>{const s=Object.create(_C);return de.toFlatObject(g,s,function(e){return e!==Error.prototype},y=>y!=="isAxiosError"),Wi.call(s,g.message,t,i,x,T),s.cause=g,s.name=g.name,E&&Object.assign(s,E),s};const DD=null;function Uy(g){return de.isPlainObject(g)||de.isArray(g)}function tw(g){return de.endsWith(g,"[]")?g.slice(0,-2):g}function xT(g,t,i){return g?g.concat(t).map(function(T,E){return T=tw(T),!i&&E?"["+T+"]":T}).join(i?".":""):t}function ID(g){return de.isArray(g)&&!g.some(Uy)}const ND=de.toFlatObject(de,{},null,function(t){return/^is[A-Z]/.test(t)});function ag(g,t,i){if(!de.isObject(g))throw new TypeError("target must be an object");t=t||new FormData,i=de.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,f){return!de.isUndefined(f[u])});const x=i.metaTokens,T=i.visitor||d,E=i.dots,s=i.indexes,e=(i.Blob||typeof Blob<"u"&&Blob)&&de.isSpecCompliantForm(t);if(!de.isFunction(T))throw new TypeError("visitor must be a function");function r(n){if(n===null)return"";if(de.isDate(n))return n.toISOString();if(!e&&de.isBlob(n))throw new Wi("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(n)||de.isTypedArray(n)?e&&typeof Blob=="function"?new Blob([n]):Buffer.from(n):n}function d(n,u,f){let o=n;if(n&&!f&&typeof n=="object"){if(de.endsWith(u,"{}"))u=x?u:u.slice(0,-2),n=JSON.stringify(n);else if(de.isArray(n)&&ID(n)||(de.isFileList(n)||de.endsWith(u,"[]"))&&(o=de.toArray(n)))return u=tw(u),o.forEach(function(p,v){!(de.isUndefined(p)||p===null)&&t.append(s===!0?xT([u],v,E):s===null?u:u+"[]",r(p))}),!1}return Uy(n)?!0:(t.append(xT(f,u,E),r(n)),!1)}const h=[],a=Object.assign(ND,{defaultVisitor:d,convertValue:r,isVisitable:Uy});function l(n,u){if(!de.isUndefined(n)){if(h.indexOf(n)!==-1)throw Error("Circular reference detected in "+u.join("."));h.push(n),de.forEach(n,function(o,c){(!(de.isUndefined(o)||o===null)&&T.call(t,o,de.isString(c)?c.trim():c,u,a))===!0&&l(o,u?u.concat(c):[c])}),h.pop()}}if(!de.isObject(g))throw new TypeError("data must be an object");return l(g),t}function ST(g){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(g).replace(/[!'()~]|%20|%00/g,function(x){return t[x]})}function n1(g,t){this._pairs=[],g&&ag(g,this,t)}const ew=n1.prototype;ew.append=function(t,i){this._pairs.push([t,i])};ew.toString=function(t){const i=t?function(x){return t.call(this,x,ST)}:ST;return this._pairs.map(function(T){return i(T[0])+"="+i(T[1])},"").join("&")};function BD(g){return encodeURIComponent(g).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function iw(g,t,i){if(!t)return g;const x=i&&i.encode||BD,T=i&&i.serialize;let E;if(T?E=T(t,i):E=de.isURLSearchParams(t)?t.toString():new n1(t,i).toString(x),E){const s=g.indexOf("#");s!==-1&&(g=g.slice(0,s)),g+=(g.indexOf("?")===-1?"?":"&")+E}return g}class TT{constructor(){this.handlers=[]}use(t,i,x){return this.handlers.push({fulfilled:t,rejected:i,synchronous:x?x.synchronous:!1,runWhen:x?x.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){de.forEach(this.handlers,function(x){x!==null&&t(x)})}}const nw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},UD=typeof URLSearchParams<"u"?URLSearchParams:n1,zD=typeof FormData<"u"?FormData:null,GD=typeof Blob<"u"?Blob:null,VD={isBrowser:!0,classes:{URLSearchParams:UD,FormData:zD,Blob:GD},protocols:["http","https","file","blob","url","data"]},rw=typeof window<"u"&&typeof document<"u",HD=(g=>rw&&["ReactNative","NativeScript","NS"].indexOf(g)<0)(typeof navigator<"u"&&navigator.product),WD=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",XD=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rw,hasStandardBrowserEnv:HD,hasStandardBrowserWebWorkerEnv:WD},Symbol.toStringTag,{value:"Module"})),No={...XD,...VD};function YD(g,t){return ag(g,new No.classes.URLSearchParams,Object.assign({visitor:function(i,x,T,E){return No.isNode&&de.isBuffer(i)?(this.append(x,i.toString("base64")),!1):E.defaultVisitor.apply(this,arguments)}},t))}function kD(g){return de.matchAll(/\w+|\[(\w*)]/g,g).map(t=>t[0]==="[]"?"":t[1]||t[0])}function jD(g){const t={},i=Object.keys(g);let x;const T=i.length;let E;for(x=0;x=i.length;return s=!s&&de.isArray(T)?T.length:s,e?(de.hasOwnProp(T,s)?T[s]=[T[s],x]:T[s]=x,!y):((!T[s]||!de.isObject(T[s]))&&(T[s]=[]),t(i,x,T[s],E)&&de.isArray(T[s])&&(T[s]=jD(T[s])),!y)}if(de.isFormData(g)&&de.isFunction(g.entries)){const i={};return de.forEachEntry(g,(x,T)=>{t(kD(x),T,i,0)}),i}return null}function KD(g,t,i){if(de.isString(g))try{return(t||JSON.parse)(g),de.trim(g)}catch(x){if(x.name!=="SyntaxError")throw x}return(i||JSON.stringify)(g)}const r1={transitional:nw,adapter:["xhr","http"],transformRequest:[function(t,i){const x=i.getContentType()||"",T=x.indexOf("application/json")>-1,E=de.isObject(t);if(E&&de.isHTMLForm(t)&&(t=new FormData(t)),de.isFormData(t))return T?JSON.stringify(sw(t)):t;if(de.isArrayBuffer(t)||de.isBuffer(t)||de.isStream(t)||de.isFile(t)||de.isBlob(t))return t;if(de.isArrayBufferView(t))return t.buffer;if(de.isURLSearchParams(t))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let y;if(E){if(x.indexOf("application/x-www-form-urlencoded")>-1)return YD(t,this.formSerializer).toString();if((y=de.isFileList(t))||x.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return ag(y?{"files[]":t}:t,e&&new e,this.formSerializer)}}return E||T?(i.setContentType("application/json",!1),KD(t)):t}],transformResponse:[function(t){const i=this.transitional||r1.transitional,x=i&&i.forcedJSONParsing,T=this.responseType==="json";if(t&&de.isString(t)&&(x&&!this.responseType||T)){const s=!(i&&i.silentJSONParsing)&&T;try{return JSON.parse(t)}catch(y){if(s)throw y.name==="SyntaxError"?Wi.from(y,Wi.ERR_BAD_RESPONSE,this,null,this.response):y}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:No.classes.FormData,Blob:No.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(["delete","get","head","post","put","patch"],g=>{r1.headers[g]={}});const s1=r1,ZD=de.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),$D=g=>{const t={};let i,x,T;return g&&g.split(` -`).forEach(function(s){T=s.indexOf(":"),i=s.substring(0,T).trim().toLowerCase(),x=s.substring(T+1).trim(),!(!i||t[i]&&ZD[i])&&(i==="set-cookie"?t[i]?t[i].push(x):t[i]=[x]:t[i]=t[i]?t[i]+", "+x:x)}),t},ET=Symbol("internals");function Kc(g){return g&&String(g).trim().toLowerCase()}function sm(g){return g===!1||g==null?g:de.isArray(g)?g.map(sm):String(g)}function JD(g){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let x;for(;x=i.exec(g);)t[x[1]]=x[2];return t}const QD=g=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(g.trim());function M0(g,t,i,x,T){if(de.isFunction(x))return x.call(this,t,i);if(T&&(t=i),!!de.isString(t)){if(de.isString(x))return t.indexOf(x)!==-1;if(de.isRegExp(x))return x.test(t)}}function _D(g){return g.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,i,x)=>i.toUpperCase()+x)}function qD(g,t){const i=de.toCamelCase(" "+t);["get","set","has"].forEach(x=>{Object.defineProperty(g,x+i,{value:function(T,E,s){return this[x].call(this,t,T,E,s)},configurable:!0})})}class og{constructor(t){t&&this.set(t)}set(t,i,x){const T=this;function E(y,e,r){const d=Kc(e);if(!d)throw new Error("header name must be a non-empty string");const h=de.findKey(T,d);(!h||T[h]===void 0||r===!0||r===void 0&&T[h]!==!1)&&(T[h||e]=sm(y))}const s=(y,e)=>de.forEach(y,(r,d)=>E(r,d,e));return de.isPlainObject(t)||t instanceof this.constructor?s(t,i):de.isString(t)&&(t=t.trim())&&!QD(t)?s($D(t),i):t!=null&&E(i,t,x),this}get(t,i){if(t=Kc(t),t){const x=de.findKey(this,t);if(x){const T=this[x];if(!i)return T;if(i===!0)return JD(T);if(de.isFunction(i))return i.call(this,T,x);if(de.isRegExp(i))return i.exec(T);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,i){if(t=Kc(t),t){const x=de.findKey(this,t);return!!(x&&this[x]!==void 0&&(!i||M0(this,this[x],x,i)))}return!1}delete(t,i){const x=this;let T=!1;function E(s){if(s=Kc(s),s){const y=de.findKey(x,s);y&&(!i||M0(x,x[y],y,i))&&(delete x[y],T=!0)}}return de.isArray(t)?t.forEach(E):E(t),T}clear(t){const i=Object.keys(this);let x=i.length,T=!1;for(;x--;){const E=i[x];(!t||M0(this,this[E],E,t,!0))&&(delete this[E],T=!0)}return T}normalize(t){const i=this,x={};return de.forEach(this,(T,E)=>{const s=de.findKey(x,E);if(s){i[s]=sm(T),delete i[E];return}const y=t?_D(E):String(E).trim();y!==E&&delete i[E],i[y]=sm(T),x[y]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const i=Object.create(null);return de.forEach(this,(x,T)=>{x!=null&&x!==!1&&(i[T]=t&&de.isArray(x)?x.join(", "):x)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,i])=>t+": "+i).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...i){const x=new this(t);return i.forEach(T=>x.set(T)),x}static accessor(t){const x=(this[ET]=this[ET]={accessors:{}}).accessors,T=this.prototype;function E(s){const y=Kc(s);x[y]||(qD(T,s),x[y]=!0)}return de.isArray(t)?t.forEach(E):E(t),this}}og.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);de.reduceDescriptors(og.prototype,({value:g},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>g,set(x){this[i]=x}}});de.freezeMethods(og);const wl=og;function C0(g,t){const i=this||s1,x=t||i,T=wl.from(x.headers);let E=x.data;return de.forEach(g,function(y){E=y.call(i,E,T.normalize(),t?t.status:void 0)}),T.normalize(),E}function aw(g){return!!(g&&g.__CANCEL__)}function Jd(g,t,i){Wi.call(this,g??"canceled",Wi.ERR_CANCELED,t,i),this.name="CanceledError"}de.inherits(Jd,Wi,{__CANCEL__:!0});function tI(g,t,i){const x=i.config.validateStatus;!i.status||!x||x(i.status)?g(i):t(new Wi("Request failed with status code "+i.status,[Wi.ERR_BAD_REQUEST,Wi.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}const eI=No.hasStandardBrowserEnv?{write(g,t,i,x,T,E){const s=[g+"="+encodeURIComponent(t)];de.isNumber(i)&&s.push("expires="+new Date(i).toGMTString()),de.isString(x)&&s.push("path="+x),de.isString(T)&&s.push("domain="+T),E===!0&&s.push("secure"),document.cookie=s.join("; ")},read(g){const t=document.cookie.match(new RegExp("(^|;\\s*)("+g+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(g){this.write(g,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function iI(g){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(g)}function nI(g,t){return t?g.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):g}function ow(g,t){return g&&!iI(t)?nI(g,t):t}const rI=No.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");let x;function T(E){let s=E;return t&&(i.setAttribute("href",s),s=i.href),i.setAttribute("href",s),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:i.pathname.charAt(0)==="/"?i.pathname:"/"+i.pathname}}return x=T(window.location.href),function(s){const y=de.isString(s)?T(s):s;return y.protocol===x.protocol&&y.host===x.host}}():function(){return function(){return!0}}();function sI(g){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(g);return t&&t[1]||""}function aI(g,t){g=g||10;const i=new Array(g),x=new Array(g);let T=0,E=0,s;return t=t!==void 0?t:1e3,function(e){const r=Date.now(),d=x[E];s||(s=r),i[T]=e,x[T]=r;let h=E,a=0;for(;h!==T;)a+=i[h++],h=h%g;if(T=(T+1)%g,T===E&&(E=(E+1)%g),r-s{const E=T.loaded,s=T.lengthComputable?T.total:void 0,y=E-i,e=x(y),r=E<=s;i=E;const d={loaded:E,total:s,progress:s?E/s:void 0,bytes:y,rate:e||void 0,estimated:e&&s&&r?(s-E)/e:void 0,event:T};d[t?"download":"upload"]=!0,g(d)}}const oI=typeof XMLHttpRequest<"u",lI=oI&&function(g){return new Promise(function(i,x){let T=g.data;const E=wl.from(g.headers).normalize();let{responseType:s,withXSRFToken:y}=g,e;function r(){g.cancelToken&&g.cancelToken.unsubscribe(e),g.signal&&g.signal.removeEventListener("abort",e)}let d;if(de.isFormData(T)){if(No.hasStandardBrowserEnv||No.hasStandardBrowserWebWorkerEnv)E.setContentType(!1);else if((d=E.getContentType())!==!1){const[u,...f]=d?d.split(";").map(o=>o.trim()).filter(Boolean):[];E.setContentType([u||"multipart/form-data",...f].join("; "))}}let h=new XMLHttpRequest;if(g.auth){const u=g.auth.username||"",f=g.auth.password?unescape(encodeURIComponent(g.auth.password)):"";E.set("Authorization","Basic "+btoa(u+":"+f))}const a=ow(g.baseURL,g.url);h.open(g.method.toUpperCase(),iw(a,g.params,g.paramsSerializer),!0),h.timeout=g.timeout;function l(){if(!h)return;const u=wl.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),o={data:!s||s==="text"||s==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:u,config:g,request:h};tI(function(p){i(p),r()},function(p){x(p),r()},o),h=null}if("onloadend"in h?h.onloadend=l:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(l)},h.onabort=function(){h&&(x(new Wi("Request aborted",Wi.ECONNABORTED,g,h)),h=null)},h.onerror=function(){x(new Wi("Network Error",Wi.ERR_NETWORK,g,h)),h=null},h.ontimeout=function(){let f=g.timeout?"timeout of "+g.timeout+"ms exceeded":"timeout exceeded";const o=g.transitional||nw;g.timeoutErrorMessage&&(f=g.timeoutErrorMessage),x(new Wi(f,o.clarifyTimeoutError?Wi.ETIMEDOUT:Wi.ECONNABORTED,g,h)),h=null},No.hasStandardBrowserEnv&&(y&&de.isFunction(y)&&(y=y(g)),y||y!==!1&&rI(a))){const u=g.xsrfHeaderName&&g.xsrfCookieName&&eI.read(g.xsrfCookieName);u&&E.set(g.xsrfHeaderName,u)}T===void 0&&E.setContentType(null),"setRequestHeader"in h&&de.forEach(E.toJSON(),function(f,o){h.setRequestHeader(o,f)}),de.isUndefined(g.withCredentials)||(h.withCredentials=!!g.withCredentials),s&&s!=="json"&&(h.responseType=g.responseType),typeof g.onDownloadProgress=="function"&&h.addEventListener("progress",MT(g.onDownloadProgress,!0)),typeof g.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",MT(g.onUploadProgress)),(g.cancelToken||g.signal)&&(e=u=>{h&&(x(!u||u.type?new Jd(null,g,h):u),h.abort(),h=null)},g.cancelToken&&g.cancelToken.subscribe(e),g.signal&&(g.signal.aborted?e():g.signal.addEventListener("abort",e)));const n=sI(a);if(n&&No.protocols.indexOf(n)===-1){x(new Wi("Unsupported protocol "+n+":",Wi.ERR_BAD_REQUEST,g));return}h.send(T||null)})},zy={http:DD,xhr:lI};de.forEach(zy,(g,t)=>{if(g){try{Object.defineProperty(g,"name",{value:t})}catch{}Object.defineProperty(g,"adapterName",{value:t})}});const CT=g=>`- ${g}`,hI=g=>de.isFunction(g)||g===null||g===!1,lw={getAdapter:g=>{g=de.isArray(g)?g:[g];const{length:t}=g;let i,x;const T={};for(let E=0;E`adapter ${y} `+(e===!1?"is not supported by the environment":"is not available in the build"));let s=t?E.length>1?`since : -`+E.map(CT).join(` -`):" "+CT(E[0]):"as no adapter specified";throw new Wi("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return x},adapters:zy};function w0(g){if(g.cancelToken&&g.cancelToken.throwIfRequested(),g.signal&&g.signal.aborted)throw new Jd(null,g)}function wT(g){return w0(g),g.headers=wl.from(g.headers),g.data=C0.call(g,g.transformRequest),["post","put","patch"].indexOf(g.method)!==-1&&g.headers.setContentType("application/x-www-form-urlencoded",!1),lw.getAdapter(g.adapter||s1.adapter)(g).then(function(x){return w0(g),x.data=C0.call(g,g.transformResponse,x),x.headers=wl.from(x.headers),x},function(x){return aw(x)||(w0(g),x&&x.response&&(x.response.data=C0.call(g,g.transformResponse,x.response),x.response.headers=wl.from(x.response.headers))),Promise.reject(x)})}const AT=g=>g instanceof wl?g.toJSON():g;function _f(g,t){t=t||{};const i={};function x(r,d,h){return de.isPlainObject(r)&&de.isPlainObject(d)?de.merge.call({caseless:h},r,d):de.isPlainObject(d)?de.merge({},d):de.isArray(d)?d.slice():d}function T(r,d,h){if(de.isUndefined(d)){if(!de.isUndefined(r))return x(void 0,r,h)}else return x(r,d,h)}function E(r,d){if(!de.isUndefined(d))return x(void 0,d)}function s(r,d){if(de.isUndefined(d)){if(!de.isUndefined(r))return x(void 0,r)}else return x(void 0,d)}function y(r,d,h){if(h in t)return x(r,d);if(h in g)return x(void 0,r)}const e={url:E,method:E,data:E,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:y,headers:(r,d)=>T(AT(r),AT(d),!0)};return de.forEach(Object.keys(Object.assign({},g,t)),function(d){const h=e[d]||T,a=h(g[d],t[d],d);de.isUndefined(a)&&h!==y||(i[d]=a)}),i}const hw="1.6.7",a1={};["object","boolean","number","function","string","symbol"].forEach((g,t)=>{a1[g]=function(x){return typeof x===g||"a"+(t<1?"n ":" ")+g}});const PT={};a1.transitional=function(t,i,x){function T(E,s){return"[Axios v"+hw+"] Transitional option '"+E+"'"+s+(x?". "+x:"")}return(E,s,y)=>{if(t===!1)throw new Wi(T(s," has been removed"+(i?" in "+i:"")),Wi.ERR_DEPRECATED);return i&&!PT[s]&&(PT[s]=!0,console.warn(T(s," has been deprecated since v"+i+" and will be removed in the near future"))),t?t(E,s,y):!0}};function uI(g,t,i){if(typeof g!="object")throw new Wi("options must be an object",Wi.ERR_BAD_OPTION_VALUE);const x=Object.keys(g);let T=x.length;for(;T-- >0;){const E=x[T],s=t[E];if(s){const y=g[E],e=y===void 0||s(y,E,g);if(e!==!0)throw new Wi("option "+E+" must be "+e,Wi.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new Wi("Unknown option "+E,Wi.ERR_BAD_OPTION)}}const Gy={assertOptions:uI,validators:a1},th=Gy.validators;class Tm{constructor(t){this.defaults=t,this.interceptors={request:new TT,response:new TT}}async request(t,i){try{return await this._request(t,i)}catch(x){if(x instanceof Error){let T;Error.captureStackTrace?Error.captureStackTrace(T={}):T=new Error;const E=T.stack?T.stack.replace(/^.+\n/,""):"";x.stack?E&&!String(x.stack).endsWith(E.replace(/^.+\n.+\n/,""))&&(x.stack+=` -`+E):x.stack=E}throw x}}_request(t,i){typeof t=="string"?(i=i||{},i.url=t):i=t||{},i=_f(this.defaults,i);const{transitional:x,paramsSerializer:T,headers:E}=i;x!==void 0&&Gy.assertOptions(x,{silentJSONParsing:th.transitional(th.boolean),forcedJSONParsing:th.transitional(th.boolean),clarifyTimeoutError:th.transitional(th.boolean)},!1),T!=null&&(de.isFunction(T)?i.paramsSerializer={serialize:T}:Gy.assertOptions(T,{encode:th.function,serialize:th.function},!0)),i.method=(i.method||this.defaults.method||"get").toLowerCase();let s=E&&de.merge(E.common,E[i.method]);E&&de.forEach(["delete","get","head","post","put","patch","common"],n=>{delete E[n]}),i.headers=wl.concat(s,E);const y=[];let e=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(i)===!1||(e=e&&u.synchronous,y.unshift(u.fulfilled,u.rejected))});const r=[];this.interceptors.response.forEach(function(u){r.push(u.fulfilled,u.rejected)});let d,h=0,a;if(!e){const n=[wT.bind(this),void 0];for(n.unshift.apply(n,y),n.push.apply(n,r),a=n.length,d=Promise.resolve(i);h{if(!x._listeners)return;let E=x._listeners.length;for(;E-- >0;)x._listeners[E](T);x._listeners=null}),this.promise.then=T=>{let E;const s=new Promise(y=>{x.subscribe(y),E=y}).then(T);return s.cancel=function(){x.unsubscribe(E)},s},t(function(E,s,y){x.reason||(x.reason=new Jd(E,s,y),i(x.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const i=this._listeners.indexOf(t);i!==-1&&this._listeners.splice(i,1)}static source(){let t;return{token:new o1(function(T){t=T}),cancel:t}}}const fI=o1;function cI(g){return function(i){return g.apply(null,i)}}function dI(g){return de.isObject(g)&&g.isAxiosError===!0}const Vy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vy).forEach(([g,t])=>{Vy[t]=g});const pI=Vy;function uw(g){const t=new am(g),i=YC(am.prototype.request,t);return de.extend(i,am.prototype,t,{allOwnKeys:!0}),de.extend(i,t,null,{allOwnKeys:!0}),i.create=function(T){return uw(_f(g,T))},i}const gn=uw(s1);gn.Axios=am;gn.CanceledError=Jd;gn.CancelToken=fI;gn.isCancel=aw;gn.VERSION=hw;gn.toFormData=ag;gn.AxiosError=Wi;gn.Cancel=gn.CanceledError;gn.all=function(t){return Promise.all(t)};gn.spread=cI;gn.isAxiosError=dI;gn.mergeConfig=_f;gn.AxiosHeaders=wl;gn.formToJSON=g=>sw(de.isHTMLForm(g)?new FormData(g):g);gn.getAdapter=lw.getAdapter;gn.HttpStatusCode=pI;gn.default=gn;const Vf="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function vI(g,t,i){for(;g.length=0;x--){const T=g%Vf.length;i=Vf.charAt(T)+i,g=Math.floor(g/Vf.length)}return vI(i,t,Vf[0])}function l1(){const g=Date.now(),t=yI(g,10),i=gI(16);return t+i}const xI={id:"",title:"",description:"",journals:[],isComplete:!1,reward:""},SI={backpack:[],equipment:{head:null,body:null,legs:null,feet:null,hands:null,weapon:null,shield:null,accessory:null}},fw={},TI={inCombat:!1,isDead:!1,isResting:!1,activeBoosts:{}},EI={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"},MI={stats:EI,inventory:SI,state:TI},CI={tooltipItem:{id:null,position:{x:0,y:0}},submenuItem:{id:null,position:{x:0,y:0}},tooltipNPC:{id:null,position:{x:0,y:0}},isStatsMenuCollapsed:!1,isSettingsMenuCollapsed:!1,debugMode:!1},wI={gamemode:"Idle",action:{type:"ROLL_DICE",diceValues:[],isRolling:!1},textures:{side1:"",side2:"",side3:"",side4:"",side5:"",side6:""}},AI=g=>{Ir(async()=>{$r.set({...$r.get(),[g.id]:g})})},PI=g=>{Ir(async()=>{const t=$r.get(),{[g]:i,...x}=t;$r.set(x)})};function Nu(g,t){return OL(g,t,{encode(i){return JSON.stringify(i)},decode(i){try{return JSON.parse(i)}catch{return t}}})}const Tn=Nu("playerData",MI),RI=Nu("quest",xI),$r=Nu("items",fw),_h=Nu("notifications",[]),cw=Nu("itemDB",fw),Em=Nu("settings",CI),Md=Nu("minigameState",wI),gl=g=>Em.get()[g],fh=(g,t)=>{Ir(async()=>{const i=Em.get();Em.set({...i,[g]:t})})},bI=()=>{Ir(async()=>{try{const t=(await gn.get("https://kbve.com/api/itemdb.json")).data,i={};Object.keys(t.key).forEach(x=>{const T=t.key[x];i[T.id]=T,i[T.name]=T}),cw.set(i)}catch(g){console.error("Failed to reload item database:",g)}})},LI=g=>cw.get()[g],FI=g=>{Ir(async()=>{const t=Tn.get();t.inventory.backpack.push(g),Tn.set({...t})})},Tl=g=>{const i=$r.get()[g];if(i)return i;console.warn(`Item with ID ${g} not found.`)},OI=g=>{Ir(async()=>{const t=l1(),i={...g,id:t};AI(i),FI(i.id),Si.emit("notification",{title:"Success",message:`You got a ${i.name}, verified by E Corp ID ${i.id}`,notificationType:bu.success})})},DI=(g,t)=>{Ir(async()=>{const i=Tn.get(),x=$r.get()[t];if(x){const T=i.inventory.equipment[g];if(T){const E=$r.get()[T];E.equipped=!1,$r.set({...$r.get(),[E.id]:E})}x.equipped=!0,$r.set({...$r.get(),[x.id]:x}),i.inventory.equipment[g]=t,Tn.set({...i})}})},II=g=>{Ir(async()=>{const t=Tn.get(),i=t.inventory.equipment[g];if(i){const x=$r.get()[i];x&&(x.equipped=!1,$r.set({...$r.get(),[x.id]:x}),t.inventory.equipment[g]=null,Tn.set({...t}))}})},RT=g=>{Ir(async()=>{const t=Tn.get(),i=$r.get()[g];i&&!i.equipped?(t.inventory.backpack=t.inventory.backpack.filter(x=>x!==g),Tn.set({...t}),PI(g)):Si.emit("notification",{title:"Warning",message:"Cannot remove item that is currently equipped.",notificationType:bu.warning})})},dw=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.health,10),x=Math.max(i-g,0);t.stats={...t.stats,health:x.toString()},Tn.set({...t})})},NI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.health,10),x=parseInt(t.stats.maxHealth,10),T=Math.min(i+g,x);t.stats={...t.stats,health:T.toString()},Tn.set({...t})})},BI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.mana,10),x=Math.max(i-g,0);t.stats={...t.stats,mana:x.toString()},Tn.set({...t})})},UI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.mana,10),x=parseInt(t.stats.maxMana,10),T=Math.min(i+g,x);t.stats={...t.stats,mana:T.toString()},Tn.set({...t})})},zI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.energy,10),x=Math.max(i-g,0);t.stats={...t.stats,energy:x.toString()},Tn.set({...t})})},GI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.energy,10),x=parseInt(t.stats.maxEnergy,10),T=Math.min(i+g,x);t.stats={...t.stats,energy:T.toString()},Tn.set({...t})})},VI=g=>{if(g.health!==void 0){const t=parseInt(g.health,10);t>0?NI(t):dw(Math.abs(t))}if(g.mana!==void 0){const t=parseInt(g.mana,10);t>0?UI(t):BI(Math.abs(t))}if(g.energy!==void 0){const t=parseInt(g.energy,10);t>0?GI(t):zI(Math.abs(t))}},HI=async g=>{const t=l1();Ir(async()=>{const i=Tn.get();i.state.activeBoosts[t]={...g,expiry:Date.now()+g.duration*1e3},Tn.set({...i})})},WI=g=>{Ir(async()=>{const t=Tn.get(),i=g.bonuses,x={health:i?.health!==void 0?i.health.toString():void 0,mana:i?.mana!==void 0?i.mana.toString():void 0,energy:i?.energy!==void 0?i.energy.toString():void 0};VI(x),g.boost&&HI(g.boost),g.action&&console.log(`Action: ${g.action}`),Tn.set({...t})})},XI=g=>{const t=Tl(g);if(!t)return[];const i=["view","discard"];return t.consumable&&i.push("consume"),t.equipped?i.push("unequip"):t.consumable||i.push("equip"),i},bu={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"}};function Qd(g){try{Ir(async()=>{const t=Md.get();Md.set({...t,...g})})}catch(t){console.error("Error updating minigame state:",t)}}function YI(g){Qd({gamemode:g})}function kI(g){Qd({action:g})}function jI(g){Qd({textures:g})}function pw(g){const t=Md.get();t.gamemode==="Dice"&&t.action.type==="ROLL_DICE"&&Qd({action:{...t.action,diceValues:g}})}function bT(g){const t=Md.get();t.gamemode==="Dice"&&t.action.type==="ROLL_DICE"&&Qd({action:{...t.action,isRolling:g}})}const KI=()=>{fh("debugMode",!0)},ZI=()=>{fh("debugMode",!1)},lg=()=>gl("debugMode"),Mm=g=>typeof g=="string"?g:JSON.stringify(g,null,2),$I=g=>{lg()&&console.log(`[DEBUG] ${Mm(g)}`)},JI=g=>{lg()&&console.warn(`[DEBUG] ${Mm(g)}`)},QI=(g,t)=>{lg()&&(t instanceof Error?console.error(`[DEBUG] ${Mm(g)} - Error: ${t.message} -${t.stack}`):console.error(`[DEBUG] ${Mm(g)}`))},_e={enable:KI,disable:ZI,isEnabled:lg,log:$I,warn:JI,error:QI};class _I{constructor(){this.events={},this.lastEmitted=new Map}on(t,i){this.events[t]||(this.events[t]=[]),this.events[t]?.push(i)}off(t,i){this.events[t]&&(this.events[t]=this.events[t]?.filter(x=>x!==i))}emit(t,i,x=0,T){const E=Date.now(),s=this.lastEmitted.get(t)||0;if(E-s>=x){if(!this.events[t])return;this.events[t]?.forEach(y=>y(i)),T&&_e.isEnabled()&&_e.log(`Event: ${String(t)} - Message: ${T}`),_e.isEnabled()&&_e.log(`Event Data: ${String(t)} - Data: ${i?JSON.stringify(i):"No data"}`),this.lastEmitted.set(t,E)}}}const Si=new _I,qI=({styleClass:g,size:t=32,color:i="#000",onClick:x,...T})=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:t,height:t,className:g,onClick:x,...T,children:Yt.jsx("path",{stroke:i,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M11.493 8.757L8.039 5.304 5.374 7.969l3.454 3.453-2.59 2.59 7.797.004-.017-7.784-2.525 2.525zm11.679 2.665l3.454-3.453-2.665-2.665-3.454 3.453-2.525-2.525-.017 7.784 7.797-.004-2.59-2.59zM8.828 20.578l-3.454 3.453 2.665 2.665 3.454-3.453 2.526 2.525.017-7.784-7.797.004 2.589 2.59zm16.934-2.59l-7.797-.004.017 7.784 2.525-2.525 3.454 3.453 2.665-2.665-3.454-3.453 2.59-2.59z"})}),t5=({styleClass:g,size:t=24,color:i="#000",onClick:x,...T})=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:t,height:t,className:g,onClick:x,...T,children:Yt.jsx("path",{stroke:i,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 8.5V4m0 0h4.5M4 4l5.5 5.5m10.5-1V4m0 0h-4.5M20 4l-5.5 5.5M4 15.5V20m0 0h4.5M4 20l5.5-5.5m10.5 1V20m0 0h-4.5m4.5 0l-5.5-5.5"})});/** +*/function gT(g){return g.type==="ROLL_DICE"}class vu{constructor(t,i=4){this.bounds=t,this.capacity=i,this.points=[],this.divided=!1,this.cache=new Map}subdivide(){const{xMin:t,yMin:i,xMax:y,yMax:T}=this.bounds,E=(y-t)/2,s=(T-i)/2,x=t,e=i;this.northeast=new vu({xMin:x+E,xMax:x+2*E,yMin:i,yMax:e+s},this.capacity),this.northwest=new vu({xMin:t,xMax:x+E,yMin:i,yMax:e+s},this.capacity),this.southeast=new vu({xMin:x+E,xMax:x+2*E,yMin:e+s,yMax:e+2*s},this.capacity),this.southwest=new vu({xMin:t,xMax:x+E,yMin:e+s,yMax:e+2*s},this.capacity),this.divided=!0}insert(t){return this.contains(t.bounds)?this.points.length=i&&t.xMax<=T&&t.yMin>=y&&t.yMax<=E}generateCacheKey(t){const{xMin:i,xMax:y,yMin:T,yMax:E}=t;return`${i},${y},${T},${E}`}queryRange(t,i=[]){if(!this.intersects(t))return i;for(const y of this.points)this.isWithinBounds(y.bounds,t)&&i.push(y);return this.divided&&(this.northwest?.queryRange(t,i),this.northeast?.queryRange(t,i),this.southwest?.queryRange(t,i),this.southeast?.queryRange(t,i)),i}query(t,i=[]){const y=`${t.x},${t.y}`,T=this.cache.get(y);if(T)return T;if(!this.intersects({xMin:t.x,xMax:t.x,yMin:t.y,yMax:t.y}))return i;for(const E of this.points)this.isWithinRange(t,E.bounds)&&i.push(E);return this.divided&&(this.northwest?.query(t,i),this.northeast?.query(t,i),this.southwest?.query(t,i),this.southeast?.query(t,i)),this.cache.set(y,i),i}intersects(t){const{xMin:i,yMin:y,xMax:T,yMax:E}=this.bounds;return!(t.xMin>T||t.xMaxE||t.yMax=i.xMin&&t.xMin<=i.xMax&&t.yMax>=i.yMin&&t.yMin<=i.yMax}isWithinRange(t,i){return t.x>=i.xMin&&t.x<=i.xMax&&t.y>=i.yMin&&t.y<=i.yMax}}function $4(g,t,i){let y=new Set([...t,void 0]);return g.listen((T,E)=>{y.has(E)&&i(T,E)})}function kC(g,t){return function(){return g.apply(t,arguments)}}const{toString:Z4}=Object.prototype,{getPrototypeOf:n1}=Object,sg=(g=>t=>{const i=Z4.call(t);return g[i]||(g[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),Wo=g=>(g=g.toLowerCase(),t=>sg(t)===g),ag=g=>t=>typeof t===g,{isArray:sc}=Array,Md=ag("undefined");function J4(g){return g!==null&&!Md(g)&&g.constructor!==null&&!Md(g.constructor)&&Aa(g.constructor.isBuffer)&&g.constructor.isBuffer(g)}const jC=Wo("ArrayBuffer");function Q4(g){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(g):t=g&&g.buffer&&jC(g.buffer),t}const _4=ag("string"),Aa=ag("function"),KC=ag("number"),og=g=>g!==null&&typeof g=="object",q4=g=>g===!0||g===!1,sm=g=>{if(sg(g)!=="object")return!1;const t=n1(g);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in g)&&!(Symbol.iterator in g)},tD=Wo("Date"),eD=Wo("File"),iD=Wo("Blob"),nD=Wo("FileList"),rD=g=>og(g)&&Aa(g.pipe),sD=g=>{let t;return g&&(typeof FormData=="function"&&g instanceof FormData||Aa(g.append)&&((t=sg(g))==="formdata"||t==="object"&&Aa(g.toString)&&g.toString()==="[object FormData]"))},aD=Wo("URLSearchParams"),oD=g=>g.trim?g.trim():g.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jd(g,t,{allOwnKeys:i=!1}={}){if(g===null||typeof g>"u")return;let y,T;if(typeof g!="object"&&(g=[g]),sc(g))for(y=0,T=g.length;y0;)if(T=i[y],t===T.toLowerCase())return T;return null}const ZC=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,JC=g=>!Md(g)&&g!==ZC;function zy(){const{caseless:g}=JC(this)&&this||{},t={},i=(y,T)=>{const E=g&&$C(t,T)||T;sm(t[E])&&sm(y)?t[E]=zy(t[E],y):sm(y)?t[E]=zy({},y):sc(y)?t[E]=y.slice():t[E]=y};for(let y=0,T=arguments.length;y(Jd(t,(T,E)=>{i&&Aa(T)?g[E]=kC(T,i):g[E]=T},{allOwnKeys:y}),g),hD=g=>(g.charCodeAt(0)===65279&&(g=g.slice(1)),g),uD=(g,t,i,y)=>{g.prototype=Object.create(t.prototype,y),g.prototype.constructor=g,Object.defineProperty(g,"super",{value:t.prototype}),i&&Object.assign(g.prototype,i)},fD=(g,t,i,y)=>{let T,E,s;const x={};if(t=t||{},g==null)return t;do{for(T=Object.getOwnPropertyNames(g),E=T.length;E-- >0;)s=T[E],(!y||y(s,g,t))&&!x[s]&&(t[s]=g[s],x[s]=!0);g=i!==!1&&n1(g)}while(g&&(!i||i(g,t))&&g!==Object.prototype);return t},cD=(g,t,i)=>{g=String(g),(i===void 0||i>g.length)&&(i=g.length),i-=t.length;const y=g.indexOf(t,i);return y!==-1&&y===i},dD=g=>{if(!g)return null;if(sc(g))return g;let t=g.length;if(!KC(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=g[t];return i},pD=(g=>t=>g&&t instanceof g)(typeof Uint8Array<"u"&&n1(Uint8Array)),vD=(g,t)=>{const y=(g&&g[Symbol.iterator]).call(g);let T;for(;(T=y.next())&&!T.done;){const E=T.value;t.call(g,E[0],E[1])}},mD=(g,t)=>{let i;const y=[];for(;(i=g.exec(t))!==null;)y.push(i);return y},gD=Wo("HTMLFormElement"),yD=g=>g.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,y,T){return y.toUpperCase()+T}),yT=(({hasOwnProperty:g})=>(t,i)=>g.call(t,i))(Object.prototype),xD=Wo("RegExp"),QC=(g,t)=>{const i=Object.getOwnPropertyDescriptors(g),y={};Jd(i,(T,E)=>{let s;(s=t(T,E,g))!==!1&&(y[E]=s||T)}),Object.defineProperties(g,y)},SD=g=>{QC(g,(t,i)=>{if(Aa(g)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const y=g[i];if(Aa(y)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},TD=(g,t)=>{const i={},y=T=>{T.forEach(E=>{i[E]=!0})};return sc(g)?y(g):y(String(g).split(t)),i},ED=()=>{},MD=(g,t)=>(g=+g,Number.isFinite(g)?g:t),C0="abcdefghijklmnopqrstuvwxyz",xT="0123456789",_C={DIGIT:xT,ALPHA:C0,ALPHA_DIGIT:C0+C0.toUpperCase()+xT},CD=(g=16,t=_C.ALPHA_DIGIT)=>{let i="";const{length:y}=t;for(;g--;)i+=t[Math.random()*y|0];return i};function wD(g){return!!(g&&Aa(g.append)&&g[Symbol.toStringTag]==="FormData"&&g[Symbol.iterator])}const AD=g=>{const t=new Array(10),i=(y,T)=>{if(og(y)){if(t.indexOf(y)>=0)return;if(!("toJSON"in y)){t[T]=y;const E=sc(y)?[]:{};return Jd(y,(s,x)=>{const e=i(s,T+1);!Md(e)&&(E[x]=e)}),t[T]=void 0,E}}return y};return i(g,0)},PD=Wo("AsyncFunction"),RD=g=>g&&(og(g)||Aa(g))&&Aa(g.then)&&Aa(g.catch),de={isArray:sc,isArrayBuffer:jC,isBuffer:J4,isFormData:sD,isArrayBufferView:Q4,isString:_4,isNumber:KC,isBoolean:q4,isObject:og,isPlainObject:sm,isUndefined:Md,isDate:tD,isFile:eD,isBlob:iD,isRegExp:xD,isFunction:Aa,isStream:rD,isURLSearchParams:aD,isTypedArray:pD,isFileList:nD,forEach:Jd,merge:zy,extend:lD,trim:oD,stripBOM:hD,inherits:uD,toFlatObject:fD,kindOf:sg,kindOfTest:Wo,endsWith:cD,toArray:dD,forEachEntry:vD,matchAll:mD,isHTMLForm:gD,hasOwnProperty:yT,hasOwnProp:yT,reduceDescriptors:QC,freezeMethods:SD,toObjectSet:TD,toCamelCase:yD,noop:ED,toFiniteNumber:MD,findKey:$C,global:ZC,isContextDefined:JC,ALPHABET:_C,generateString:CD,isSpecCompliantForm:wD,toJSONObject:AD,isAsyncFn:PD,isThenable:RD};function Wi(g,t,i,y,T){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=g,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),y&&(this.request=y),T&&(this.response=T)}de.inherits(Wi,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:de.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const qC=Wi.prototype,tw={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(g=>{tw[g]={value:g}});Object.defineProperties(Wi,tw);Object.defineProperty(qC,"isAxiosError",{value:!0});Wi.from=(g,t,i,y,T,E)=>{const s=Object.create(qC);return de.toFlatObject(g,s,function(e){return e!==Error.prototype},x=>x!=="isAxiosError"),Wi.call(s,g.message,t,i,y,T),s.cause=g,s.name=g.name,E&&Object.assign(s,E),s};const bD=null;function Gy(g){return de.isPlainObject(g)||de.isArray(g)}function ew(g){return de.endsWith(g,"[]")?g.slice(0,-2):g}function ST(g,t,i){return g?g.concat(t).map(function(T,E){return T=ew(T),!i&&E?"["+T+"]":T}).join(i?".":""):t}function LD(g){return de.isArray(g)&&!g.some(Gy)}const FD=de.toFlatObject(de,{},null,function(t){return/^is[A-Z]/.test(t)});function lg(g,t,i){if(!de.isObject(g))throw new TypeError("target must be an object");t=t||new FormData,i=de.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,f){return!de.isUndefined(f[u])});const y=i.metaTokens,T=i.visitor||d,E=i.dots,s=i.indexes,e=(i.Blob||typeof Blob<"u"&&Blob)&&de.isSpecCompliantForm(t);if(!de.isFunction(T))throw new TypeError("visitor must be a function");function r(n){if(n===null)return"";if(de.isDate(n))return n.toISOString();if(!e&&de.isBlob(n))throw new Wi("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(n)||de.isTypedArray(n)?e&&typeof Blob=="function"?new Blob([n]):Buffer.from(n):n}function d(n,u,f){let o=n;if(n&&!f&&typeof n=="object"){if(de.endsWith(u,"{}"))u=y?u:u.slice(0,-2),n=JSON.stringify(n);else if(de.isArray(n)&&LD(n)||(de.isFileList(n)||de.endsWith(u,"[]"))&&(o=de.toArray(n)))return u=ew(u),o.forEach(function(p,v){!(de.isUndefined(p)||p===null)&&t.append(s===!0?ST([u],v,E):s===null?u:u+"[]",r(p))}),!1}return Gy(n)?!0:(t.append(ST(f,u,E),r(n)),!1)}const h=[],a=Object.assign(FD,{defaultVisitor:d,convertValue:r,isVisitable:Gy});function l(n,u){if(!de.isUndefined(n)){if(h.indexOf(n)!==-1)throw Error("Circular reference detected in "+u.join("."));h.push(n),de.forEach(n,function(o,c){(!(de.isUndefined(o)||o===null)&&T.call(t,o,de.isString(c)?c.trim():c,u,a))===!0&&l(o,u?u.concat(c):[c])}),h.pop()}}if(!de.isObject(g))throw new TypeError("data must be an object");return l(g),t}function TT(g){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(g).replace(/[!'()~]|%20|%00/g,function(y){return t[y]})}function r1(g,t){this._pairs=[],g&&lg(g,this,t)}const iw=r1.prototype;iw.append=function(t,i){this._pairs.push([t,i])};iw.toString=function(t){const i=t?function(y){return t.call(this,y,TT)}:TT;return this._pairs.map(function(T){return i(T[0])+"="+i(T[1])},"").join("&")};function OD(g){return encodeURIComponent(g).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nw(g,t,i){if(!t)return g;const y=i&&i.encode||OD,T=i&&i.serialize;let E;if(T?E=T(t,i):E=de.isURLSearchParams(t)?t.toString():new r1(t,i).toString(y),E){const s=g.indexOf("#");s!==-1&&(g=g.slice(0,s)),g+=(g.indexOf("?")===-1?"?":"&")+E}return g}class ET{constructor(){this.handlers=[]}use(t,i,y){return this.handlers.push({fulfilled:t,rejected:i,synchronous:y?y.synchronous:!1,runWhen:y?y.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){de.forEach(this.handlers,function(y){y!==null&&t(y)})}}const rw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},DD=typeof URLSearchParams<"u"?URLSearchParams:r1,ID=typeof FormData<"u"?FormData:null,ND=typeof Blob<"u"?Blob:null,BD={isBrowser:!0,classes:{URLSearchParams:DD,FormData:ID,Blob:ND},protocols:["http","https","file","blob","url","data"]},sw=typeof window<"u"&&typeof document<"u",UD=(g=>sw&&["ReactNative","NativeScript","NS"].indexOf(g)<0)(typeof navigator<"u"&&navigator.product),zD=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",GD=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sw,hasStandardBrowserEnv:UD,hasStandardBrowserWebWorkerEnv:zD},Symbol.toStringTag,{value:"Module"})),No={...GD,...BD};function VD(g,t){return lg(g,new No.classes.URLSearchParams,Object.assign({visitor:function(i,y,T,E){return No.isNode&&de.isBuffer(i)?(this.append(y,i.toString("base64")),!1):E.defaultVisitor.apply(this,arguments)}},t))}function HD(g){return de.matchAll(/\w+|\[(\w*)]/g,g).map(t=>t[0]==="[]"?"":t[1]||t[0])}function WD(g){const t={},i=Object.keys(g);let y;const T=i.length;let E;for(y=0;y=i.length;return s=!s&&de.isArray(T)?T.length:s,e?(de.hasOwnProp(T,s)?T[s]=[T[s],y]:T[s]=y,!x):((!T[s]||!de.isObject(T[s]))&&(T[s]=[]),t(i,y,T[s],E)&&de.isArray(T[s])&&(T[s]=WD(T[s])),!x)}if(de.isFormData(g)&&de.isFunction(g.entries)){const i={};return de.forEachEntry(g,(y,T)=>{t(HD(y),T,i,0)}),i}return null}function XD(g,t,i){if(de.isString(g))try{return(t||JSON.parse)(g),de.trim(g)}catch(y){if(y.name!=="SyntaxError")throw y}return(i||JSON.stringify)(g)}const s1={transitional:rw,adapter:["xhr","http"],transformRequest:[function(t,i){const y=i.getContentType()||"",T=y.indexOf("application/json")>-1,E=de.isObject(t);if(E&&de.isHTMLForm(t)&&(t=new FormData(t)),de.isFormData(t))return T?JSON.stringify(aw(t)):t;if(de.isArrayBuffer(t)||de.isBuffer(t)||de.isStream(t)||de.isFile(t)||de.isBlob(t))return t;if(de.isArrayBufferView(t))return t.buffer;if(de.isURLSearchParams(t))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let x;if(E){if(y.indexOf("application/x-www-form-urlencoded")>-1)return VD(t,this.formSerializer).toString();if((x=de.isFileList(t))||y.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return lg(x?{"files[]":t}:t,e&&new e,this.formSerializer)}}return E||T?(i.setContentType("application/json",!1),XD(t)):t}],transformResponse:[function(t){const i=this.transitional||s1.transitional,y=i&&i.forcedJSONParsing,T=this.responseType==="json";if(t&&de.isString(t)&&(y&&!this.responseType||T)){const s=!(i&&i.silentJSONParsing)&&T;try{return JSON.parse(t)}catch(x){if(s)throw x.name==="SyntaxError"?Wi.from(x,Wi.ERR_BAD_RESPONSE,this,null,this.response):x}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:No.classes.FormData,Blob:No.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(["delete","get","head","post","put","patch"],g=>{s1.headers[g]={}});const a1=s1,YD=de.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),kD=g=>{const t={};let i,y,T;return g&&g.split(` +`).forEach(function(s){T=s.indexOf(":"),i=s.substring(0,T).trim().toLowerCase(),y=s.substring(T+1).trim(),!(!i||t[i]&&YD[i])&&(i==="set-cookie"?t[i]?t[i].push(y):t[i]=[y]:t[i]=t[i]?t[i]+", "+y:y)}),t},MT=Symbol("internals");function jc(g){return g&&String(g).trim().toLowerCase()}function am(g){return g===!1||g==null?g:de.isArray(g)?g.map(am):String(g)}function jD(g){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let y;for(;y=i.exec(g);)t[y[1]]=y[2];return t}const KD=g=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(g.trim());function w0(g,t,i,y,T){if(de.isFunction(y))return y.call(this,t,i);if(T&&(t=i),!!de.isString(t)){if(de.isString(y))return t.indexOf(y)!==-1;if(de.isRegExp(y))return y.test(t)}}function $D(g){return g.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,i,y)=>i.toUpperCase()+y)}function ZD(g,t){const i=de.toCamelCase(" "+t);["get","set","has"].forEach(y=>{Object.defineProperty(g,y+i,{value:function(T,E,s){return this[y].call(this,t,T,E,s)},configurable:!0})})}class hg{constructor(t){t&&this.set(t)}set(t,i,y){const T=this;function E(x,e,r){const d=jc(e);if(!d)throw new Error("header name must be a non-empty string");const h=de.findKey(T,d);(!h||T[h]===void 0||r===!0||r===void 0&&T[h]!==!1)&&(T[h||e]=am(x))}const s=(x,e)=>de.forEach(x,(r,d)=>E(r,d,e));return de.isPlainObject(t)||t instanceof this.constructor?s(t,i):de.isString(t)&&(t=t.trim())&&!KD(t)?s(kD(t),i):t!=null&&E(i,t,y),this}get(t,i){if(t=jc(t),t){const y=de.findKey(this,t);if(y){const T=this[y];if(!i)return T;if(i===!0)return jD(T);if(de.isFunction(i))return i.call(this,T,y);if(de.isRegExp(i))return i.exec(T);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,i){if(t=jc(t),t){const y=de.findKey(this,t);return!!(y&&this[y]!==void 0&&(!i||w0(this,this[y],y,i)))}return!1}delete(t,i){const y=this;let T=!1;function E(s){if(s=jc(s),s){const x=de.findKey(y,s);x&&(!i||w0(y,y[x],x,i))&&(delete y[x],T=!0)}}return de.isArray(t)?t.forEach(E):E(t),T}clear(t){const i=Object.keys(this);let y=i.length,T=!1;for(;y--;){const E=i[y];(!t||w0(this,this[E],E,t,!0))&&(delete this[E],T=!0)}return T}normalize(t){const i=this,y={};return de.forEach(this,(T,E)=>{const s=de.findKey(y,E);if(s){i[s]=am(T),delete i[E];return}const x=t?$D(E):String(E).trim();x!==E&&delete i[E],i[x]=am(T),y[x]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const i=Object.create(null);return de.forEach(this,(y,T)=>{y!=null&&y!==!1&&(i[T]=t&&de.isArray(y)?y.join(", "):y)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,i])=>t+": "+i).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...i){const y=new this(t);return i.forEach(T=>y.set(T)),y}static accessor(t){const y=(this[MT]=this[MT]={accessors:{}}).accessors,T=this.prototype;function E(s){const x=jc(s);y[x]||(ZD(T,s),y[x]=!0)}return de.isArray(t)?t.forEach(E):E(t),this}}hg.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);de.reduceDescriptors(hg.prototype,({value:g},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>g,set(y){this[i]=y}}});de.freezeMethods(hg);const Cl=hg;function A0(g,t){const i=this||a1,y=t||i,T=Cl.from(y.headers);let E=y.data;return de.forEach(g,function(x){E=x.call(i,E,T.normalize(),t?t.status:void 0)}),T.normalize(),E}function ow(g){return!!(g&&g.__CANCEL__)}function Qd(g,t,i){Wi.call(this,g??"canceled",Wi.ERR_CANCELED,t,i),this.name="CanceledError"}de.inherits(Qd,Wi,{__CANCEL__:!0});function JD(g,t,i){const y=i.config.validateStatus;!i.status||!y||y(i.status)?g(i):t(new Wi("Request failed with status code "+i.status,[Wi.ERR_BAD_REQUEST,Wi.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}const QD=No.hasStandardBrowserEnv?{write(g,t,i,y,T,E){const s=[g+"="+encodeURIComponent(t)];de.isNumber(i)&&s.push("expires="+new Date(i).toGMTString()),de.isString(y)&&s.push("path="+y),de.isString(T)&&s.push("domain="+T),E===!0&&s.push("secure"),document.cookie=s.join("; ")},read(g){const t=document.cookie.match(new RegExp("(^|;\\s*)("+g+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(g){this.write(g,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function _D(g){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(g)}function qD(g,t){return t?g.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):g}function lw(g,t){return g&&!_D(t)?qD(g,t):t}const tI=No.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");let y;function T(E){let s=E;return t&&(i.setAttribute("href",s),s=i.href),i.setAttribute("href",s),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:i.pathname.charAt(0)==="/"?i.pathname:"/"+i.pathname}}return y=T(window.location.href),function(s){const x=de.isString(s)?T(s):s;return x.protocol===y.protocol&&x.host===y.host}}():function(){return function(){return!0}}();function eI(g){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(g);return t&&t[1]||""}function iI(g,t){g=g||10;const i=new Array(g),y=new Array(g);let T=0,E=0,s;return t=t!==void 0?t:1e3,function(e){const r=Date.now(),d=y[E];s||(s=r),i[T]=e,y[T]=r;let h=E,a=0;for(;h!==T;)a+=i[h++],h=h%g;if(T=(T+1)%g,T===E&&(E=(E+1)%g),r-s{const E=T.loaded,s=T.lengthComputable?T.total:void 0,x=E-i,e=y(x),r=E<=s;i=E;const d={loaded:E,total:s,progress:s?E/s:void 0,bytes:x,rate:e||void 0,estimated:e&&s&&r?(s-E)/e:void 0,event:T};d[t?"download":"upload"]=!0,g(d)}}const nI=typeof XMLHttpRequest<"u",rI=nI&&function(g){return new Promise(function(i,y){let T=g.data;const E=Cl.from(g.headers).normalize();let{responseType:s,withXSRFToken:x}=g,e;function r(){g.cancelToken&&g.cancelToken.unsubscribe(e),g.signal&&g.signal.removeEventListener("abort",e)}let d;if(de.isFormData(T)){if(No.hasStandardBrowserEnv||No.hasStandardBrowserWebWorkerEnv)E.setContentType(!1);else if((d=E.getContentType())!==!1){const[u,...f]=d?d.split(";").map(o=>o.trim()).filter(Boolean):[];E.setContentType([u||"multipart/form-data",...f].join("; "))}}let h=new XMLHttpRequest;if(g.auth){const u=g.auth.username||"",f=g.auth.password?unescape(encodeURIComponent(g.auth.password)):"";E.set("Authorization","Basic "+btoa(u+":"+f))}const a=lw(g.baseURL,g.url);h.open(g.method.toUpperCase(),nw(a,g.params,g.paramsSerializer),!0),h.timeout=g.timeout;function l(){if(!h)return;const u=Cl.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),o={data:!s||s==="text"||s==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:u,config:g,request:h};JD(function(p){i(p),r()},function(p){y(p),r()},o),h=null}if("onloadend"in h?h.onloadend=l:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(l)},h.onabort=function(){h&&(y(new Wi("Request aborted",Wi.ECONNABORTED,g,h)),h=null)},h.onerror=function(){y(new Wi("Network Error",Wi.ERR_NETWORK,g,h)),h=null},h.ontimeout=function(){let f=g.timeout?"timeout of "+g.timeout+"ms exceeded":"timeout exceeded";const o=g.transitional||rw;g.timeoutErrorMessage&&(f=g.timeoutErrorMessage),y(new Wi(f,o.clarifyTimeoutError?Wi.ETIMEDOUT:Wi.ECONNABORTED,g,h)),h=null},No.hasStandardBrowserEnv&&(x&&de.isFunction(x)&&(x=x(g)),x||x!==!1&&tI(a))){const u=g.xsrfHeaderName&&g.xsrfCookieName&&QD.read(g.xsrfCookieName);u&&E.set(g.xsrfHeaderName,u)}T===void 0&&E.setContentType(null),"setRequestHeader"in h&&de.forEach(E.toJSON(),function(f,o){h.setRequestHeader(o,f)}),de.isUndefined(g.withCredentials)||(h.withCredentials=!!g.withCredentials),s&&s!=="json"&&(h.responseType=g.responseType),typeof g.onDownloadProgress=="function"&&h.addEventListener("progress",CT(g.onDownloadProgress,!0)),typeof g.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",CT(g.onUploadProgress)),(g.cancelToken||g.signal)&&(e=u=>{h&&(y(!u||u.type?new Qd(null,g,h):u),h.abort(),h=null)},g.cancelToken&&g.cancelToken.subscribe(e),g.signal&&(g.signal.aborted?e():g.signal.addEventListener("abort",e)));const n=eI(a);if(n&&No.protocols.indexOf(n)===-1){y(new Wi("Unsupported protocol "+n+":",Wi.ERR_BAD_REQUEST,g));return}h.send(T||null)})},Vy={http:bD,xhr:rI};de.forEach(Vy,(g,t)=>{if(g){try{Object.defineProperty(g,"name",{value:t})}catch{}Object.defineProperty(g,"adapterName",{value:t})}});const wT=g=>`- ${g}`,sI=g=>de.isFunction(g)||g===null||g===!1,hw={getAdapter:g=>{g=de.isArray(g)?g:[g];const{length:t}=g;let i,y;const T={};for(let E=0;E`adapter ${x} `+(e===!1?"is not supported by the environment":"is not available in the build"));let s=t?E.length>1?`since : +`+E.map(wT).join(` +`):" "+wT(E[0]):"as no adapter specified";throw new Wi("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return y},adapters:Vy};function P0(g){if(g.cancelToken&&g.cancelToken.throwIfRequested(),g.signal&&g.signal.aborted)throw new Qd(null,g)}function AT(g){return P0(g),g.headers=Cl.from(g.headers),g.data=A0.call(g,g.transformRequest),["post","put","patch"].indexOf(g.method)!==-1&&g.headers.setContentType("application/x-www-form-urlencoded",!1),hw.getAdapter(g.adapter||a1.adapter)(g).then(function(y){return P0(g),y.data=A0.call(g,g.transformResponse,y),y.headers=Cl.from(y.headers),y},function(y){return ow(y)||(P0(g),y&&y.response&&(y.response.data=A0.call(g,g.transformResponse,y.response),y.response.headers=Cl.from(y.response.headers))),Promise.reject(y)})}const PT=g=>g instanceof Cl?g.toJSON():g;function Qf(g,t){t=t||{};const i={};function y(r,d,h){return de.isPlainObject(r)&&de.isPlainObject(d)?de.merge.call({caseless:h},r,d):de.isPlainObject(d)?de.merge({},d):de.isArray(d)?d.slice():d}function T(r,d,h){if(de.isUndefined(d)){if(!de.isUndefined(r))return y(void 0,r,h)}else return y(r,d,h)}function E(r,d){if(!de.isUndefined(d))return y(void 0,d)}function s(r,d){if(de.isUndefined(d)){if(!de.isUndefined(r))return y(void 0,r)}else return y(void 0,d)}function x(r,d,h){if(h in t)return y(r,d);if(h in g)return y(void 0,r)}const e={url:E,method:E,data:E,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:x,headers:(r,d)=>T(PT(r),PT(d),!0)};return de.forEach(Object.keys(Object.assign({},g,t)),function(d){const h=e[d]||T,a=h(g[d],t[d],d);de.isUndefined(a)&&h!==x||(i[d]=a)}),i}const uw="1.6.7",o1={};["object","boolean","number","function","string","symbol"].forEach((g,t)=>{o1[g]=function(y){return typeof y===g||"a"+(t<1?"n ":" ")+g}});const RT={};o1.transitional=function(t,i,y){function T(E,s){return"[Axios v"+uw+"] Transitional option '"+E+"'"+s+(y?". "+y:"")}return(E,s,x)=>{if(t===!1)throw new Wi(T(s," has been removed"+(i?" in "+i:"")),Wi.ERR_DEPRECATED);return i&&!RT[s]&&(RT[s]=!0,console.warn(T(s," has been deprecated since v"+i+" and will be removed in the near future"))),t?t(E,s,x):!0}};function aI(g,t,i){if(typeof g!="object")throw new Wi("options must be an object",Wi.ERR_BAD_OPTION_VALUE);const y=Object.keys(g);let T=y.length;for(;T-- >0;){const E=y[T],s=t[E];if(s){const x=g[E],e=x===void 0||s(x,E,g);if(e!==!0)throw new Wi("option "+E+" must be "+e,Wi.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new Wi("Unknown option "+E,Wi.ERR_BAD_OPTION)}}const Hy={assertOptions:aI,validators:o1},ql=Hy.validators;class Em{constructor(t){this.defaults=t,this.interceptors={request:new ET,response:new ET}}async request(t,i){try{return await this._request(t,i)}catch(y){if(y instanceof Error){let T;Error.captureStackTrace?Error.captureStackTrace(T={}):T=new Error;const E=T.stack?T.stack.replace(/^.+\n/,""):"";y.stack?E&&!String(y.stack).endsWith(E.replace(/^.+\n.+\n/,""))&&(y.stack+=` +`+E):y.stack=E}throw y}}_request(t,i){typeof t=="string"?(i=i||{},i.url=t):i=t||{},i=Qf(this.defaults,i);const{transitional:y,paramsSerializer:T,headers:E}=i;y!==void 0&&Hy.assertOptions(y,{silentJSONParsing:ql.transitional(ql.boolean),forcedJSONParsing:ql.transitional(ql.boolean),clarifyTimeoutError:ql.transitional(ql.boolean)},!1),T!=null&&(de.isFunction(T)?i.paramsSerializer={serialize:T}:Hy.assertOptions(T,{encode:ql.function,serialize:ql.function},!0)),i.method=(i.method||this.defaults.method||"get").toLowerCase();let s=E&&de.merge(E.common,E[i.method]);E&&de.forEach(["delete","get","head","post","put","patch","common"],n=>{delete E[n]}),i.headers=Cl.concat(s,E);const x=[];let e=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(i)===!1||(e=e&&u.synchronous,x.unshift(u.fulfilled,u.rejected))});const r=[];this.interceptors.response.forEach(function(u){r.push(u.fulfilled,u.rejected)});let d,h=0,a;if(!e){const n=[AT.bind(this),void 0];for(n.unshift.apply(n,x),n.push.apply(n,r),a=n.length,d=Promise.resolve(i);h{if(!y._listeners)return;let E=y._listeners.length;for(;E-- >0;)y._listeners[E](T);y._listeners=null}),this.promise.then=T=>{let E;const s=new Promise(x=>{y.subscribe(x),E=x}).then(T);return s.cancel=function(){y.unsubscribe(E)},s},t(function(E,s,x){y.reason||(y.reason=new Qd(E,s,x),i(y.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const i=this._listeners.indexOf(t);i!==-1&&this._listeners.splice(i,1)}static source(){let t;return{token:new l1(function(T){t=T}),cancel:t}}}const oI=l1;function lI(g){return function(i){return g.apply(null,i)}}function hI(g){return de.isObject(g)&&g.isAxiosError===!0}const Wy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Wy).forEach(([g,t])=>{Wy[t]=g});const uI=Wy;function fw(g){const t=new om(g),i=kC(om.prototype.request,t);return de.extend(i,om.prototype,t,{allOwnKeys:!0}),de.extend(i,t,null,{allOwnKeys:!0}),i.create=function(T){return fw(Qf(g,T))},i}const Ji=fw(a1);Ji.Axios=om;Ji.CanceledError=Qd;Ji.CancelToken=oI;Ji.isCancel=ow;Ji.VERSION=uw;Ji.toFormData=lg;Ji.AxiosError=Wi;Ji.Cancel=Ji.CanceledError;Ji.all=function(t){return Promise.all(t)};Ji.spread=lI;Ji.isAxiosError=hI;Ji.mergeConfig=Qf;Ji.AxiosHeaders=Cl;Ji.formToJSON=g=>aw(de.isHTMLForm(g)?new FormData(g):g);Ji.getAdapter=hw.getAdapter;Ji.HttpStatusCode=uI;Ji.default=Ji;const Gf="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function fI(g,t,i){for(;g.length=0;y--){const T=g%Gf.length;i=Gf.charAt(T)+i,g=Math.floor(g/Gf.length)}return fI(i,t,Gf[0])}function h1(){const g=Date.now(),t=pI(g,10),i=dI(16);return t+i}const vI={id:"",title:"",description:"",journals:[],isComplete:!1,reward:""},mI={backpack:[],equipment:{head:null,body:null,legs:null,feet:null,hands:null,weapon:null,shield:null,accessory:null}},cw={},gI={inCombat:!1,isDead:!1,isResting:!1,activeBoosts:{}},yI={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"},xI={stats:yI,inventory:mI,state:gI},SI={tooltipItem:{id:null,position:{x:0,y:0}},submenuItem:{id:null,position:{x:0,y:0}},tooltipNPC:{id:null,position:{x:0,y:0}},isStatsMenuCollapsed:!1,isSettingsMenuCollapsed:!1,debugMode:!1,textSpeed:40},TI={gamemode:"Idle",action:{type:"ROLL_DICE",diceValues:[],isRolling:!1},textures:{side1:"",side2:"",side3:"",side4:"",side5:"",side6:""}},EI=g=>{Ir(async()=>{Zr.set({...Zr.get(),[g.id]:g})})},MI=g=>{Ir(async()=>{const t=Zr.get(),{[g]:i,...y}=t;Zr.set(y)})};function Nu(g,t){return RL(g,t,{encode(i){return JSON.stringify(i)},decode(i){try{return JSON.parse(i)}catch{return t}}})}const Tn=Nu("playerData",xI),CI=Nu("quest",vI),Zr=Nu("items",cw),Qh=Nu("notifications",[]),dw=Nu("itemDB",cw),Mm=Nu("settings",SI),Cd=Nu("minigameState",TI),gl=g=>Mm.get()[g],uh=(g,t)=>{Ir(async()=>{const i=Mm.get();Mm.set({...i,[g]:t})})},wI=()=>{Ir(async()=>{try{const t=(await Ji.get("https://kbve.com/api/itemdb.json")).data,i={};Object.keys(t.key).forEach(y=>{const T=t.key[y];i[T.id]=T,i[T.name]=T}),dw.set(i)}catch(g){console.error("Failed to reload item database:",g)}})},AI=g=>dw.get()[g],PI=g=>{Ir(async()=>{const t=Tn.get();t.inventory.backpack.push(g),Tn.set({...t})})},Tl=g=>{const i=Zr.get()[g];if(i)return i;console.warn(`Item with ID ${g} not found.`)},RI=g=>{Ir(async()=>{const t=h1(),i={...g,id:t};EI(i),PI(i.id),Si.emit("notification",{title:"Success",message:`You got a ${i.name}, verified by E Corp ID ${i.id}`,notificationType:bu.success})})},bI=(g,t)=>{Ir(async()=>{const i=Tn.get(),y=Zr.get()[t];if(y){const T=i.inventory.equipment[g];if(T){const E=Zr.get()[T];E.equipped=!1,Zr.set({...Zr.get(),[E.id]:E})}y.equipped=!0,Zr.set({...Zr.get(),[y.id]:y}),i.inventory.equipment[g]=t,Tn.set({...i})}})},LI=g=>{Ir(async()=>{const t=Tn.get(),i=t.inventory.equipment[g];if(i){const y=Zr.get()[i];y&&(y.equipped=!1,Zr.set({...Zr.get(),[y.id]:y}),t.inventory.equipment[g]=null,Tn.set({...t}))}})},bT=g=>{Ir(async()=>{const t=Tn.get(),i=Zr.get()[g];i&&!i.equipped?(t.inventory.backpack=t.inventory.backpack.filter(y=>y!==g),Tn.set({...t}),MI(g)):Si.emit("notification",{title:"Warning",message:"Cannot remove item that is currently equipped.",notificationType:bu.warning})})},pw=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.health,10),y=Math.max(i-g,0);t.stats={...t.stats,health:y.toString()},Tn.set({...t})})},FI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.health,10),y=parseInt(t.stats.maxHealth,10),T=Math.min(i+g,y);t.stats={...t.stats,health:T.toString()},Tn.set({...t})})},OI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.mana,10),y=Math.max(i-g,0);t.stats={...t.stats,mana:y.toString()},Tn.set({...t})})},DI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.mana,10),y=parseInt(t.stats.maxMana,10),T=Math.min(i+g,y);t.stats={...t.stats,mana:T.toString()},Tn.set({...t})})},II=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.energy,10),y=Math.max(i-g,0);t.stats={...t.stats,energy:y.toString()},Tn.set({...t})})},NI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.energy,10),y=parseInt(t.stats.maxEnergy,10),T=Math.min(i+g,y);t.stats={...t.stats,energy:T.toString()},Tn.set({...t})})},BI=g=>{if(g.health!==void 0){const t=parseInt(g.health,10);t>0?FI(t):pw(Math.abs(t))}if(g.mana!==void 0){const t=parseInt(g.mana,10);t>0?DI(t):OI(Math.abs(t))}if(g.energy!==void 0){const t=parseInt(g.energy,10);t>0?NI(t):II(Math.abs(t))}},UI=async g=>{const t=h1();Ir(async()=>{const i=Tn.get();i.state.activeBoosts[t]={...g,expiry:Date.now()+g.duration*1e3},Tn.set({...i})})},zI=g=>{Ir(async()=>{const t=Tn.get(),i=g.bonuses,y={health:i?.health!==void 0?i.health.toString():void 0,mana:i?.mana!==void 0?i.mana.toString():void 0,energy:i?.energy!==void 0?i.energy.toString():void 0};BI(y),g.boost&&UI(g.boost),g.action&&console.log(`Action: ${g.action}`),Tn.set({...t})})},GI=g=>{const t=Tl(g);if(!t)return[];const i=["view","discard"];return t.consumable&&i.push("consume"),t.equipped?i.push("unequip"):t.consumable||i.push("equip"),i},bu={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"}};function _d(g){try{Ir(async()=>{const t=Cd.get();Cd.set({...t,...g})})}catch(t){console.error("Error updating minigame state:",t)}}function VI(g){_d({gamemode:g})}function HI(g){_d({action:g})}function WI(g){_d({textures:g})}function vw(g){const t=Cd.get();t.gamemode==="Dice"&&t.action.type==="ROLL_DICE"&&_d({action:{...t.action,diceValues:g}})}function LT(g){const t=Cd.get();t.gamemode==="Dice"&&t.action.type==="ROLL_DICE"&&_d({action:{...t.action,isRolling:g}})}const XI=()=>{uh("debugMode",!0)},YI=()=>{uh("debugMode",!1)},ug=()=>gl("debugMode"),Cm=g=>typeof g=="string"?g:JSON.stringify(g,null,2),kI=g=>{ug()&&console.log(`[DEBUG] ${Cm(g)}`)},jI=g=>{ug()&&console.warn(`[DEBUG] ${Cm(g)}`)},KI=(g,t)=>{ug()&&(t instanceof Error?console.error(`[DEBUG] ${Cm(g)} - Error: ${t.message} +${t.stack}`):console.error(`[DEBUG] ${Cm(g)}`))},Oe={enable:XI,disable:YI,isEnabled:ug,log:kI,warn:jI,error:KI};class $I{constructor(){this.events={},this.lastEmitted=new Map}on(t,i){this.events[t]||(this.events[t]=[]),this.events[t]?.push(i)}off(t,i){this.events[t]&&(this.events[t]=this.events[t]?.filter(y=>y!==i))}emit(t,i,y=0,T){const E=Date.now(),s=this.lastEmitted.get(t)||0;if(E-s>=y){if(!this.events[t])return;this.events[t]?.forEach(x=>x(i)),T&&Oe.isEnabled()&&Oe.log(`Event: ${String(t)} - Message: ${T}`),Oe.isEnabled()&&Oe.log(`Event Data: ${String(t)} - Data: ${i?JSON.stringify(i):"No data"}`),this.lastEmitted.set(t,E)}}}const Si=new $I,ZI=({styleClass:g,size:t=32,color:i="#000",onClick:y,...T})=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:t,height:t,className:g,onClick:y,...T,children:Yt.jsx("path",{stroke:i,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M11.493 8.757L8.039 5.304 5.374 7.969l3.454 3.453-2.59 2.59 7.797.004-.017-7.784-2.525 2.525zm11.679 2.665l3.454-3.453-2.665-2.665-3.454 3.453-2.525-2.525-.017 7.784 7.797-.004-2.59-2.59zM8.828 20.578l-3.454 3.453 2.665 2.665 3.454-3.453 2.526 2.525.017-7.784-7.797.004 2.589 2.59zm16.934-2.59l-7.797-.004.017 7.784 2.525-2.525 3.454 3.453 2.665-2.665-3.454-3.453 2.59-2.59z"})}),JI=({styleClass:g,size:t=24,color:i="#000",onClick:y,...T})=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:t,height:t,className:g,onClick:y,...T,children:Yt.jsx("path",{stroke:i,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 8.5V4m0 0h4.5M4 4l5.5 5.5m10.5-1V4m0 0h-4.5M20 4l-5.5 5.5M4 15.5V20m0 0h4.5M4 20l5.5-5.5m10.5 1V20m0 0h-4.5m4.5 0l-5.5-5.5"})});var mw={exports:{}};(function(g,t){(function(i,y){g.exports=y()})(Cy,function(){var i=function(V,K){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(et,st){et.__proto__=st}||function(et,st){for(var ht in st)Object.prototype.hasOwnProperty.call(st,ht)&&(et[ht]=st[ht])})(V,K)},y=function(){return(y=Object.assign||function(V){for(var K,et=1,st=arguments.length;et"u"||E.Promise||(E.Promise=Promise);var r=Object.getPrototypeOf,d={}.hasOwnProperty;function h(V,K){return d.call(V,K)}function a(V,K){typeof K=="function"&&(K=K(r(V))),(typeof Reflect>"u"?s:Reflect.ownKeys)(K).forEach(function(et){n(V,et,K[et])})}var l=Object.defineProperty;function n(V,K,et,st){l(V,K,e(et&&h(et,"get")&&typeof et.get=="function"?{get:et.get,set:et.set,configurable:!0}:{value:et,configurable:!0,writable:!0},st))}function u(V){return{from:function(K){return V.prototype=Object.create(K.prototype),n(V.prototype,"constructor",V),{extend:a.bind(null,V.prototype)}}}}var f=Object.getOwnPropertyDescriptor,o=[].slice;function c(V,K,et){return o.call(V,K,et)}function p(V,K){return K(V)}function v(V){if(!V)throw new Error("Assertion Failed")}function m(V){E.setImmediate?setImmediate(V):setTimeout(V,0)}function S(V,K){if(typeof K=="string"&&h(V,K))return V[K];if(!K)return V;if(typeof K!="string"){for(var et=[],st=0,ht=K.length;st"u"?[]:function(){var V=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[V,r(V),V];var K=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[K,r(K),V]}(),re=Vs[0],hr=Vs[1],Vs=Vs[2],hr=hr&&hr.then,le=re&&re.constructor,ge=!!Vs,xe=function(V,K){Ke.push([V,K]),te&&(queueMicrotask(Gi),te=!1)},Pe=!0,te=!0,Ve=[],De=[],Ue=gt,Le={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:rt,pgp:!1,env:{},finalize:rt},ne=Le,Ke=[],si=0,Mi=[];function he(V){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var K=this._PSD=ne;if(typeof V!="function"){if(V!==Ht)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Ce(this,this._value))}this._state=null,this._value=null,++K.ref,function et(st,ht){try{ht(function(pt){if(st._state===null){if(pt===st)throw new TypeError("A promise cannot be resolved with itself.");var Mt=st._lib&&Ii();pt&&typeof pt.then=="function"?et(st,function(Nt,zt){pt instanceof he?pt._then(Nt,zt):pt.then(Nt,zt)}):(st._state=!0,st._value=pt,we(st)),Mt&&rn()}},Ce.bind(null,st))}catch(pt){Ce(st,pt)}}(this,V)}var Ti={get:function(){var V=ne,K=_r;function et(st,ht){var pt=this,Mt=!V.global&&(V!==ne||K!==_r),Nt=Mt&&!Ss(),zt=new he(function(ct,St){He(pt,new bt(ie(st,V,Mt,Nt),ie(ht,V,Mt,Nt),ct,St,V))});return this._consoleTask&&(zt._consoleTask=this._consoleTask),zt}return et.prototype=Ht,et},set:function(V){n(this,"then",V&&V.prototype===Ht?Ti:{get:function(){return V},set:Ti.set})}};function bt(V,K,et,st,ht){this.onFulfilled=typeof V=="function"?V:null,this.onRejected=typeof K=="function"?K:null,this.resolve=et,this.reject=st,this.psd=ht}function Ce(V,K){var et,st;De.push(K),V._state===null&&(et=V._lib&&Ii(),K=Ue(K),V._state=!1,V._value=K,st=V,Ve.some(function(ht){return ht._value===st._value})||Ve.push(st),we(V),et&&rn())}function we(V){var K=V._listeners;V._listeners=[];for(var et=0,st=K.length;et.",Qe="String expected.",ti=[],ni="__dbnames",oi="readonly",Qi="readwrite";function fn(V,K){return V?K?function(){return V.apply(this,arguments)&&K.apply(this,arguments)}:V:K}var ji={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function yn(V){return typeof V!="string"||/\./.test(V)?function(K){return K}:function(K){return K[V]===void 0&&V in K&&delete(K=O(K))[V],K}}function ei(){throw q.Type()}function Se(V,K){try{var et=Br(V),st=Br(K);if(et!==st)return et==="Array"?1:st==="Array"?-1:et==="binary"?1:st==="binary"?-1:et==="string"?1:st==="string"?-1:et==="Date"?1:st!=="Date"?NaN:-1;switch(et){case"number":case"Date":case"string":return KQt+ae&&Kt(Qt+Ft)})})}var Zt=Ki(et)&&et.limit===1/0&&(typeof V!="function"||V===Oa)&&{index:et.index,range:et.range};return Kt(0).then(function(){if(0=Ft})).length!==0?(St.forEach(function(Kt){Wt.push(function(){var Zt=It,Qt=Kt._cfg.dbschema;Ba(vt,Zt,Ut),Ba(vt,Qt,Ut),It=vt._dbSchema=Qt;var ae=bn(Zt,Qt);ae.add.forEach(function(me){Da(Ut,me[0],me[1].primKey,me[1].indexes)}),ae.change.forEach(function(me){if(me.recreate)throw new q.Upgrade("Not yet support for changing primary key");var be=Ut.objectStore(me.name);me.add.forEach(function(qe){return Mn(be,qe)}),me.change.forEach(function(qe){be.deleteIndex(qe.name),Mn(be,qe)}),me.del.forEach(function(qe){return be.deleteIndex(qe)})});var ue=Kt._cfg.contentUpgrade;if(ue&&Kt._cfg.version>Ft){Ko(vt,Ut),Lt._memoizedTables={};var Re=w(Qt);ae.del.forEach(function(me){Re[me]=Zt[me]}),Gr(vt,[vt.Transaction.prototype]),Dl(vt,[vt.Transaction.prototype],s(Re),Re),Lt.schema=Re;var pe,Ae=Q(ue);return Ae&&zs(),ae=he.follow(function(){var me;(pe=ue(Lt))&&Ae&&(me=Ss.bind(null,null),pe.then(me,me))}),pe&&typeof pe.then=="function"?he.resolve(pe):ae.then(function(){return pe})}}),Wt.push(function(Zt){var Qt,ae,ue=Kt._cfg.dbschema;Qt=ue,ae=Zt,[].slice.call(ae.db.objectStoreNames).forEach(function(Re){return Qt[Re]==null&&ae.db.deleteObjectStore(Re)}),Gr(vt,[vt.Transaction.prototype]),Dl(vt,[vt.Transaction.prototype],vt._storeNames,vt._dbSchema),Lt.schema=vt._dbSchema}),Wt.push(function(Zt){vt.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(vt.idbdb.version/10)===Kt._cfg.version?(vt.idbdb.deleteObjectStore("$meta"),delete vt._dbSchema.$meta,vt._storeNames=vt._storeNames.filter(function(Qt){return Qt!=="$meta"})):Zt.objectStore("$meta").put(Kt._cfg.version,"version"))})}),function Kt(){return Wt.length?he.resolve(Wt.shift()(Lt.idbtrans)).then(Kt):he.resolve()}().then(function(){Ia(It,Ut)})):he.resolve();var vt,Ft,Lt,Ut,Wt,It}).catch(Mt)):(s(ht).forEach(function(St){Da(et,St,ht[St].primKey,ht[St].indexes)}),Ko(V,et),void he.follow(function(){return V.on.populate.fire(pt)}).catch(Mt));var zt,ct})}function Ph(V,K){Ia(V._dbSchema,K),K.db.version%10!=0||K.objectStoreNames.contains("$meta")||K.db.createObjectStore("$meta").add(Math.ceil(K.db.version/10-1),"version");var et=Na(0,V.idbdb,K);Ba(V,V._dbSchema,K);for(var st=0,ht=bn(et,V._dbSchema).change;stMath.pow(2,62)?0:It.oldVersion,vt=It<1,V.idbdb=Wt.result,pt&&Ph(V,St),xn(V,It/10,St,Lt))},Lt),Wt.onsuccess=pi(function(){St=null;var It,Kt,Zt,Qt,ae,ue=V.idbdb=Wt.result,Re=c(ue.objectStoreNames);if(0"u"?he.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(Ft){function Lt(){return indexedDB.databases().finally(Ft)}zt=setInterval(Lt,100),Lt()}).finally(function(){return clearInterval(zt)}):Promise.resolve()).then(Nt)]).then(function(){return Mt(),K.onReadyBeingFired=[],he.resolve(Xr(function(){return V.on.ready.fire(V.vip)})).then(function Ft(){if(0K.limit?Ft.length=K.limit:V.length===K.limit&&Ft.length=Kt.limit&&(!Kt.values||ue.req.values)&&mo(ue.req.query.range,Kt.query.range)}),!1,Zt,Qt];case"count":return ae=Qt.find(function(ue){return tn(ue.req.query.range,Kt.query.range)}),[ae,!!ae,Zt,Qt]}}(K,et,"query",pt),St=ct[0],vt=ct[1],Ft=ct[2],Lt=ct[3];return St&&vt?St.obsSet=pt.obsSet:(vt=st.query(pt).then(function(Ut){var Wt=Ut.result;if(St&&(St.res=Wt),Mt){for(var It=0,Kt=Wt.length;It{const x=t.make.tilemap({key:i}),e=x.addTilesetImage(y.tilesetName,y.tilesetKey);if(e)for(let r=0;r{t.load.once("complete",()=>{const e=t.make.tilemap({key:i});if(e.addTilesetImage(y.tilesetName,y.tilesetKey)){for(let d=0;d>8&255]+jr[g>>16&255]+jr[g>>24&255]+"-"+jr[t&255]+jr[t>>8&255]+"-"+jr[t>>16&15|64]+jr[t>>24&255]+"-"+jr[i&63|128]+jr[i>>8&255]+"-"+jr[i>>16&255]+jr[i>>24&255]+jr[x&255]+jr[x>>8&255]+jr[x>>16&255]+jr[x>>24&255]).toLowerCase()}function Zn(g,t,i){return Math.max(t,Math.min(i,g))}function S1(g,t){return(g%t+t)%t}function I5(g,t,i,x,T){return x+(g-t)*(T-x)/(i-t)}function N5(g,t,i){return g!==t?(i-g)/(t-g):0}function vd(g,t,i){return(1-i)*g+i*t}function B5(g,t,i,x){return vd(g,t,1-Math.exp(-i*x))}function U5(g,t=1){return t-Math.abs(S1(g,t*2)-t)}function z5(g,t,i){return g<=t?0:g>=i?1:(g=(g-t)/(i-t),g*g*(3-2*g))}function G5(g,t,i){return g<=t?0:g>=i?1:(g=(g-t)/(i-t),g*g*g*(g*(g*6-15)+10))}function V5(g,t){return g+Math.floor(Math.random()*(t-g+1))}function H5(g,t){return g+Math.random()*(t-g)}function W5(g){return g*(.5-Math.random())}function X5(g){g!==void 0&&(LT=g);let t=LT+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function Y5(g){return g*Eu}function k5(g){return g*tc}function Tx(g){return(g&g-1)===0&&g!==0}function j5(g){return Math.pow(2,Math.ceil(Math.log(g)/Math.LN2))}function Rm(g){return Math.pow(2,Math.floor(Math.log(g)/Math.LN2))}function K5(g,t,i,x,T){const E=Math.cos,s=Math.sin,y=E(i/2),e=s(i/2),r=E((t+x)/2),d=s((t+x)/2),h=E((t-x)/2),a=s((t-x)/2),l=E((x-t)/2),n=s((x-t)/2);switch(T){case"XYX":g.set(y*d,e*h,e*a,y*r);break;case"YZY":g.set(e*a,y*d,e*h,y*r);break;case"ZXZ":g.set(e*h,e*a,y*d,y*r);break;case"XZX":g.set(y*d,e*n,e*l,y*r);break;case"YXY":g.set(e*l,y*d,e*n,y*r);break;case"ZYZ":g.set(e*n,e*l,y*d,y*r);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+T)}}function ms(g,t){switch(t.constructor){case Float32Array:return g;case Uint32Array:return g/4294967295;case Uint16Array:return g/65535;case Uint8Array:return g/255;case Int32Array:return Math.max(g/2147483647,-1);case Int16Array:return Math.max(g/32767,-1);case Int8Array:return Math.max(g/127,-1);default:throw new Error("Invalid component type.")}}function Pi(g,t){switch(t.constructor){case Float32Array:return g;case Uint32Array:return Math.round(g*4294967295);case Uint16Array:return Math.round(g*65535);case Uint8Array:return Math.round(g*255);case Int32Array:return Math.round(g*2147483647);case Int16Array:return Math.round(g*32767);case Int8Array:return Math.round(g*127);default:throw new Error("Invalid component type.")}}const dm={DEG2RAD:Eu,RAD2DEG:tc,generateUUID:ra,clamp:Zn,euclideanModulo:S1,mapLinear:I5,inverseLerp:N5,lerp:vd,damp:B5,pingpong:U5,smoothstep:z5,smootherstep:G5,randInt:V5,randFloat:H5,randFloatSpread:W5,seededRandom:X5,degToRad:Y5,radToDeg:k5,isPowerOfTwo:Tx,ceilPowerOfTwo:j5,floorPowerOfTwo:Rm,setQuaternionFromProperEuler:K5,normalize:Pi,denormalize:ms};class ve{constructor(t=0,i=0){ve.prototype.isVector2=!0,this.x=t,this.y=i}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,i){return this.x=t,this.y=i,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this}addScaledVector(t,i){return this.x+=t.x*i,this.y+=t.y*i,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const i=this.x,x=this.y,T=t.elements;return this.x=T[0]*i+T[3]*x+T[6],this.y=T[1]*i+T[4]*x+T[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this}clampScalar(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this}clampLength(t,i){const x=this.length();return this.divideScalar(x||1).multiplyScalar(Math.max(t,Math.min(i,x)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const i=Math.sqrt(this.lengthSq()*t.lengthSq());if(i===0)return Math.PI/2;const x=this.dot(t)/i;return Math.acos(Zn(x,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const i=this.x-t.x,x=this.y-t.y;return i*i+x*x}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this}lerpVectors(t,i,x){return this.x=t.x+(i.x-t.x)*x,this.y=t.y+(i.y-t.y)*x,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,i=0){return this.x=t[i],this.y=t[i+1],this}toArray(t=[],i=0){return t[i]=this.x,t[i+1]=this.y,t}fromBufferAttribute(t,i){return this.x=t.getX(i),this.y=t.getY(i),this}rotateAround(t,i){const x=Math.cos(i),T=Math.sin(i),E=this.x-t.x,s=this.y-t.y;return this.x=E*x-s*T+t.x,this.y=E*T+s*x+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Di{constructor(t,i,x,T,E,s,y,e,r){Di.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,i,x,T,E,s,y,e,r)}set(t,i,x,T,E,s,y,e,r){const d=this.elements;return d[0]=t,d[1]=T,d[2]=y,d[3]=i,d[4]=E,d[5]=e,d[6]=x,d[7]=s,d[8]=r,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const i=this.elements,x=t.elements;return i[0]=x[0],i[1]=x[1],i[2]=x[2],i[3]=x[3],i[4]=x[4],i[5]=x[5],i[6]=x[6],i[7]=x[7],i[8]=x[8],this}extractBasis(t,i,x){return t.setFromMatrix3Column(this,0),i.setFromMatrix3Column(this,1),x.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const i=t.elements;return this.set(i[0],i[4],i[8],i[1],i[5],i[9],i[2],i[6],i[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,i){const x=t.elements,T=i.elements,E=this.elements,s=x[0],y=x[3],e=x[6],r=x[1],d=x[4],h=x[7],a=x[2],l=x[5],n=x[8],u=T[0],f=T[3],o=T[6],c=T[1],p=T[4],v=T[7],m=T[2],S=T[5],M=T[8];return E[0]=s*u+y*c+e*m,E[3]=s*f+y*p+e*S,E[6]=s*o+y*v+e*M,E[1]=r*u+d*c+h*m,E[4]=r*f+d*p+h*S,E[7]=r*o+d*v+h*M,E[2]=a*u+l*c+n*m,E[5]=a*f+l*p+n*S,E[8]=a*o+l*v+n*M,this}multiplyScalar(t){const i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=t,i[4]*=t,i[7]*=t,i[2]*=t,i[5]*=t,i[8]*=t,this}determinant(){const t=this.elements,i=t[0],x=t[1],T=t[2],E=t[3],s=t[4],y=t[5],e=t[6],r=t[7],d=t[8];return i*s*d-i*y*r-x*E*d+x*y*e+T*E*r-T*s*e}invert(){const t=this.elements,i=t[0],x=t[1],T=t[2],E=t[3],s=t[4],y=t[5],e=t[6],r=t[7],d=t[8],h=d*s-y*r,a=y*e-d*E,l=r*E-s*e,n=i*h+x*a+T*l;if(n===0)return this.set(0,0,0,0,0,0,0,0,0);const u=1/n;return t[0]=h*u,t[1]=(T*r-d*x)*u,t[2]=(y*x-T*s)*u,t[3]=a*u,t[4]=(d*i-T*e)*u,t[5]=(T*E-y*i)*u,t[6]=l*u,t[7]=(x*e-r*i)*u,t[8]=(s*i-x*E)*u,this}transpose(){let t;const i=this.elements;return t=i[1],i[1]=i[3],i[3]=t,t=i[2],i[2]=i[6],i[6]=t,t=i[5],i[5]=i[7],i[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const i=this.elements;return t[0]=i[0],t[1]=i[3],t[2]=i[6],t[3]=i[1],t[4]=i[4],t[5]=i[7],t[6]=i[2],t[7]=i[5],t[8]=i[8],this}setUvTransform(t,i,x,T,E,s,y){const e=Math.cos(E),r=Math.sin(E);return this.set(x*e,x*r,-x*(e*s+r*y)+s+t,-T*r,T*e,-T*(-r*s+e*y)+y+i,0,0,1),this}scale(t,i){return this.premultiply(A0.makeScale(t,i)),this}rotate(t){return this.premultiply(A0.makeRotation(-t)),this}translate(t,i){return this.premultiply(A0.makeTranslation(t,i)),this}makeTranslation(t,i){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,i,0,0,1),this}makeRotation(t){const i=Math.cos(t),x=Math.sin(t);return this.set(i,-x,0,x,i,0,0,0,1),this}makeScale(t,i){return this.set(t,0,0,0,i,0,0,0,1),this}equals(t){const i=this.elements,x=t.elements;for(let T=0;T<9;T++)if(i[T]!==x[T])return!1;return!0}fromArray(t,i=0){for(let x=0;x<9;x++)this.elements[x]=t[x+i];return this}toArray(t=[],i=0){const x=this.elements;return t[i]=x[0],t[i+1]=x[1],t[i+2]=x[2],t[i+3]=x[3],t[i+4]=x[4],t[i+5]=x[5],t[i+6]=x[6],t[i+7]=x[7],t[i+8]=x[8],t}clone(){return new this.constructor().fromArray(this.elements)}}const A0=new Di;function m2(g){for(let t=g.length-1;t>=0;--t)if(g[t]>=65535)return!0;return!1}const Z5={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Hf(g,t){return new Z5[g](t)}function Ud(g){return document.createElementNS("http://www.w3.org/1999/xhtml",g)}function g2(){const g=Ud("canvas");return g.style.display="block",g}const FT={};function Mu(g){g in FT||(FT[g]=!0,console.warn(g))}const OT=new Di().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),DT=new Di().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),sv={[Ho]:{transfer:Od,primaries:Dd,toReference:g=>g,fromReference:g=>g},[mr]:{transfer:mn,primaries:Dd,toReference:g=>g.convertSRGBToLinear(),fromReference:g=>g.convertLinearToSRGB()},[qd]:{transfer:Od,primaries:Id,toReference:g=>g.applyMatrix3(DT),fromReference:g=>g.applyMatrix3(OT)},[pg]:{transfer:mn,primaries:Id,toReference:g=>g.convertSRGBToLinear().applyMatrix3(DT),fromReference:g=>g.applyMatrix3(OT).convertLinearToSRGB()}},$5=new Set([Ho,qd]),sn={enabled:!0,_workingColorSpace:Ho,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(g){if(!$5.has(g))throw new Error(`Unsupported working color space, "${g}".`);this._workingColorSpace=g},convert:function(g,t,i){if(this.enabled===!1||t===i||!t||!i)return g;const x=sv[t].toReference,T=sv[i].fromReference;return T(x(g))},fromWorkingColorSpace:function(g,t){return this.convert(g,this._workingColorSpace,t)},toWorkingColorSpace:function(g,t){return this.convert(g,t,this._workingColorSpace)},getPrimaries:function(g){return sv[g].primaries},getTransfer:function(g){return g===ia?Od:sv[g].transfer}};function Zf(g){return g<.04045?g*.0773993808:Math.pow(g*.9478672986+.0521327014,2.4)}function P0(g){return g<.0031308?g*12.92:1.055*Math.pow(g,.41666)-.055}let cf;class T1{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let i;if(t instanceof HTMLCanvasElement)i=t;else{cf===void 0&&(cf=Ud("canvas")),cf.width=t.width,cf.height=t.height;const x=cf.getContext("2d");t instanceof ImageData?x.putImageData(t,0,0):x.drawImage(t,0,0,t.width,t.height),i=cf}return i.width>2048||i.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),i.toDataURL("image/jpeg",.6)):i.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){const i=Ud("canvas");i.width=t.width,i.height=t.height;const x=i.getContext("2d");x.drawImage(t,0,0,t.width,t.height);const T=x.getImageData(0,0,t.width,t.height),E=T.data;for(let s=0;s0&&(x.userData=this.userData),i||(t.textures[this.uuid]=x),x}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==fg)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Pd:t.x=t.x-Math.floor(t.x);break;case Jr:t.x=t.x<0?0:1;break;case Rd:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Pd:t.y=t.y-Math.floor(t.y);break;case Jr:t.y=t.y<0?0:1;break;case Rd:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Mu("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===mr?mh:y1}set encoding(t){Mu("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=t===mh?mr:ia}}zn.DEFAULT_IMAGE=null;zn.DEFAULT_MAPPING=fg;zn.DEFAULT_ANISOTROPY=1;class an{constructor(t=0,i=0,x=0,T=1){an.prototype.isVector4=!0,this.x=t,this.y=i,this.z=x,this.w=T}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,i,x,T){return this.x=t,this.y=i,this.z=x,this.w=T,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;case 2:this.z=i;break;case 3:this.w=i;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this.z=t.z+i.z,this.w=t.w+i.w,this}addScaledVector(t,i){return this.x+=t.x*i,this.y+=t.y*i,this.z+=t.z*i,this.w+=t.w*i,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this.z=t.z-i.z,this.w=t.w-i.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const i=this.x,x=this.y,T=this.z,E=this.w,s=t.elements;return this.x=s[0]*i+s[4]*x+s[8]*T+s[12]*E,this.y=s[1]*i+s[5]*x+s[9]*T+s[13]*E,this.z=s[2]*i+s[6]*x+s[10]*T+s[14]*E,this.w=s[3]*i+s[7]*x+s[11]*T+s[15]*E,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const i=Math.sqrt(1-t.w*t.w);return i<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/i,this.y=t.y/i,this.z=t.z/i),this}setAxisAngleFromRotationMatrix(t){let i,x,T,E;const e=t.elements,r=e[0],d=e[4],h=e[8],a=e[1],l=e[5],n=e[9],u=e[2],f=e[6],o=e[10];if(Math.abs(d-a)<.01&&Math.abs(h-u)<.01&&Math.abs(n-f)<.01){if(Math.abs(d+a)<.1&&Math.abs(h+u)<.1&&Math.abs(n+f)<.1&&Math.abs(r+l+o-3)<.1)return this.set(1,0,0,0),this;i=Math.PI;const p=(r+1)/2,v=(l+1)/2,m=(o+1)/2,S=(d+a)/4,M=(h+u)/4,w=(n+f)/4;return p>v&&p>m?p<.01?(x=0,T=.707106781,E=.707106781):(x=Math.sqrt(p),T=S/x,E=M/x):v>m?v<.01?(x=.707106781,T=0,E=.707106781):(T=Math.sqrt(v),x=S/T,E=w/T):m<.01?(x=.707106781,T=.707106781,E=0):(E=Math.sqrt(m),x=M/E,T=w/E),this.set(x,T,E,i),this}let c=Math.sqrt((f-n)*(f-n)+(h-u)*(h-u)+(a-d)*(a-d));return Math.abs(c)<.001&&(c=1),this.x=(f-n)/c,this.y=(h-u)/c,this.z=(a-d)/c,this.w=Math.acos((r+l+o-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this.z=Math.max(t.z,Math.min(i.z,this.z)),this.w=Math.max(t.w,Math.min(i.w,this.w)),this}clampScalar(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this.z=Math.max(t,Math.min(i,this.z)),this.w=Math.max(t,Math.min(i,this.w)),this}clampLength(t,i){const x=this.length();return this.divideScalar(x||1).multiplyScalar(Math.max(t,Math.min(i,x)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this.z+=(t.z-this.z)*i,this.w+=(t.w-this.w)*i,this}lerpVectors(t,i,x){return this.x=t.x+(i.x-t.x)*x,this.y=t.y+(i.y-t.y)*x,this.z=t.z+(i.z-t.z)*x,this.w=t.w+(i.w-t.w)*x,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,i=0){return this.x=t[i],this.y=t[i+1],this.z=t[i+2],this.w=t[i+3],this}toArray(t=[],i=0){return t[i]=this.x,t[i+1]=this.y,t[i+2]=this.z,t[i+3]=this.w,t}fromBufferAttribute(t,i){return this.x=t.getX(i),this.y=t.getY(i),this.z=t.getZ(i),this.w=t.getW(i),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class y2 extends Ll{constructor(t=1,i=1,x={}){super(),this.isRenderTarget=!0,this.width=t,this.height=i,this.depth=1,this.scissor=new an(0,0,t,i),this.scissorTest=!1,this.viewport=new an(0,0,t,i);const T={width:t,height:i,depth:1};x.encoding!==void 0&&(Mu("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),x.colorSpace=x.encoding===mh?mr:ia),x=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Bn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},x),this.texture=new zn(T,x.mapping,x.wrapS,x.wrapT,x.magFilter,x.minFilter,x.format,x.type,x.anisotropy,x.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=x.generateMipmaps,this.texture.internalFormat=x.internalFormat,this.depthBuffer=x.depthBuffer,this.stencilBuffer=x.stencilBuffer,this.depthTexture=x.depthTexture,this.samples=x.samples}setSize(t,i,x=1){(this.width!==t||this.height!==i||this.depth!==x)&&(this.width=t,this.height=i,this.depth=x,this.texture.image.width=t,this.texture.image.height=i,this.texture.image.depth=x,this.dispose()),this.viewport.set(0,0,t,i),this.scissor.set(0,0,t,i)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.isRenderTargetTexture=!0;const i=Object.assign({},t.texture.image);return this.texture.source=new xu(i),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class ro extends y2{constructor(t=1,i=1,x={}){super(t,i,x),this.isWebGLRenderTarget=!0}}class vg extends zn{constructor(t=null,i=1,x=1,T=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:i,height:x,depth:T},this.magFilter=rr,this.minFilter=rr,this.wrapR=Jr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class _5 extends ro{constructor(t=1,i=1,x=1,T={}){super(t,i,T),this.isWebGLArrayRenderTarget=!0,this.depth=x,this.texture=new vg(null,t,i,x),this.texture.isRenderTargetTexture=!0}}class E1 extends zn{constructor(t=null,i=1,x=1,T=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:i,height:x,depth:T},this.magFilter=rr,this.minFilter=rr,this.wrapR=Jr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class q5 extends ro{constructor(t=1,i=1,x=1,T={}){super(t,i,T),this.isWebGL3DRenderTarget=!0,this.depth=x,this.texture=new E1(null,t,i,x),this.texture.isRenderTargetTexture=!0}}class tN extends ro{constructor(t=1,i=1,x=1,T={}){super(t,i,T),this.isWebGLMultipleRenderTargets=!0;const E=this.texture;this.texture=[];for(let s=0;s=0?1:-1,p=1-o*o;if(p>Number.EPSILON){const m=Math.sqrt(p),S=Math.atan2(m,o*c);f=Math.sin(f*S)/m,y=Math.sin(y*S)/m}const v=y*c;if(e=e*f+a*v,r=r*f+l*v,d=d*f+n*v,h=h*f+u*v,f===1-y){const m=1/Math.sqrt(e*e+r*r+d*d+h*h);e*=m,r*=m,d*=m,h*=m}}t[i]=e,t[i+1]=r,t[i+2]=d,t[i+3]=h}static multiplyQuaternionsFlat(t,i,x,T,E,s){const y=x[T],e=x[T+1],r=x[T+2],d=x[T+3],h=E[s],a=E[s+1],l=E[s+2],n=E[s+3];return t[i]=y*n+d*h+e*l-r*a,t[i+1]=e*n+d*a+r*h-y*l,t[i+2]=r*n+d*l+y*a-e*h,t[i+3]=d*n-y*h-e*a-r*l,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,i,x,T){return this._x=t,this._y=i,this._z=x,this._w=T,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,i=!0){const x=t._x,T=t._y,E=t._z,s=t._order,y=Math.cos,e=Math.sin,r=y(x/2),d=y(T/2),h=y(E/2),a=e(x/2),l=e(T/2),n=e(E/2);switch(s){case"XYZ":this._x=a*d*h+r*l*n,this._y=r*l*h-a*d*n,this._z=r*d*n+a*l*h,this._w=r*d*h-a*l*n;break;case"YXZ":this._x=a*d*h+r*l*n,this._y=r*l*h-a*d*n,this._z=r*d*n-a*l*h,this._w=r*d*h+a*l*n;break;case"ZXY":this._x=a*d*h-r*l*n,this._y=r*l*h+a*d*n,this._z=r*d*n+a*l*h,this._w=r*d*h-a*l*n;break;case"ZYX":this._x=a*d*h-r*l*n,this._y=r*l*h+a*d*n,this._z=r*d*n-a*l*h,this._w=r*d*h+a*l*n;break;case"YZX":this._x=a*d*h+r*l*n,this._y=r*l*h+a*d*n,this._z=r*d*n-a*l*h,this._w=r*d*h-a*l*n;break;case"XZY":this._x=a*d*h-r*l*n,this._y=r*l*h-a*d*n,this._z=r*d*n+a*l*h,this._w=r*d*h+a*l*n;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return i===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,i){const x=i/2,T=Math.sin(x);return this._x=t.x*T,this._y=t.y*T,this._z=t.z*T,this._w=Math.cos(x),this._onChangeCallback(),this}setFromRotationMatrix(t){const i=t.elements,x=i[0],T=i[4],E=i[8],s=i[1],y=i[5],e=i[9],r=i[2],d=i[6],h=i[10],a=x+y+h;if(a>0){const l=.5/Math.sqrt(a+1);this._w=.25/l,this._x=(d-e)*l,this._y=(E-r)*l,this._z=(s-T)*l}else if(x>y&&x>h){const l=2*Math.sqrt(1+x-y-h);this._w=(d-e)/l,this._x=.25*l,this._y=(T+s)/l,this._z=(E+r)/l}else if(y>h){const l=2*Math.sqrt(1+y-x-h);this._w=(E-r)/l,this._x=(T+s)/l,this._y=.25*l,this._z=(e+d)/l}else{const l=2*Math.sqrt(1+h-x-y);this._w=(s-T)/l,this._x=(E+r)/l,this._y=(e+d)/l,this._z=.25*l}return this._onChangeCallback(),this}setFromUnitVectors(t,i){let x=t.dot(i)+1;return xMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=x):(this._x=0,this._y=-t.z,this._z=t.y,this._w=x)):(this._x=t.y*i.z-t.z*i.y,this._y=t.z*i.x-t.x*i.z,this._z=t.x*i.y-t.y*i.x,this._w=x),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Zn(this.dot(t),-1,1)))}rotateTowards(t,i){const x=this.angleTo(t);if(x===0)return this;const T=Math.min(1,i/x);return this.slerp(t,T),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,i){const x=t._x,T=t._y,E=t._z,s=t._w,y=i._x,e=i._y,r=i._z,d=i._w;return this._x=x*d+s*y+T*r-E*e,this._y=T*d+s*e+E*y-x*r,this._z=E*d+s*r+x*e-T*y,this._w=s*d-x*y-T*e-E*r,this._onChangeCallback(),this}slerp(t,i){if(i===0)return this;if(i===1)return this.copy(t);const x=this._x,T=this._y,E=this._z,s=this._w;let y=s*t._w+x*t._x+T*t._y+E*t._z;if(y<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,y=-y):this.copy(t),y>=1)return this._w=s,this._x=x,this._y=T,this._z=E,this;const e=1-y*y;if(e<=Number.EPSILON){const l=1-i;return this._w=l*s+i*this._w,this._x=l*x+i*this._x,this._y=l*T+i*this._y,this._z=l*E+i*this._z,this.normalize(),this}const r=Math.sqrt(e),d=Math.atan2(r,y),h=Math.sin((1-i)*d)/r,a=Math.sin(i*d)/r;return this._w=s*h+this._w*a,this._x=x*h+this._x*a,this._y=T*h+this._y*a,this._z=E*h+this._z*a,this._onChangeCallback(),this}slerpQuaternions(t,i,x){return this.copy(t).slerp(i,x)}random(){const t=Math.random(),i=Math.sqrt(1-t),x=Math.sqrt(t),T=2*Math.PI*Math.random(),E=2*Math.PI*Math.random();return this.set(i*Math.cos(T),x*Math.sin(E),x*Math.cos(E),i*Math.sin(T))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,i=0){return this._x=t[i],this._y=t[i+1],this._z=t[i+2],this._w=t[i+3],this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._w,t}fromBufferAttribute(t,i){return this._x=t.getX(i),this._y=t.getY(i),this._z=t.getZ(i),this._w=t.getW(i),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Ct{constructor(t=0,i=0,x=0){Ct.prototype.isVector3=!0,this.x=t,this.y=i,this.z=x}set(t,i,x){return x===void 0&&(x=this.z),this.x=t,this.y=i,this.z=x,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;case 2:this.z=i;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this.z=t.z+i.z,this}addScaledVector(t,i){return this.x+=t.x*i,this.y+=t.y*i,this.z+=t.z*i,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this.z=t.z-i.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,i){return this.x=t.x*i.x,this.y=t.y*i.y,this.z=t.z*i.z,this}applyEuler(t){return this.applyQuaternion(IT.setFromEuler(t))}applyAxisAngle(t,i){return this.applyQuaternion(IT.setFromAxisAngle(t,i))}applyMatrix3(t){const i=this.x,x=this.y,T=this.z,E=t.elements;return this.x=E[0]*i+E[3]*x+E[6]*T,this.y=E[1]*i+E[4]*x+E[7]*T,this.z=E[2]*i+E[5]*x+E[8]*T,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const i=this.x,x=this.y,T=this.z,E=t.elements,s=1/(E[3]*i+E[7]*x+E[11]*T+E[15]);return this.x=(E[0]*i+E[4]*x+E[8]*T+E[12])*s,this.y=(E[1]*i+E[5]*x+E[9]*T+E[13])*s,this.z=(E[2]*i+E[6]*x+E[10]*T+E[14])*s,this}applyQuaternion(t){const i=this.x,x=this.y,T=this.z,E=t.x,s=t.y,y=t.z,e=t.w,r=2*(s*T-y*x),d=2*(y*i-E*T),h=2*(E*x-s*i);return this.x=i+e*r+s*h-y*d,this.y=x+e*d+y*r-E*h,this.z=T+e*h+E*d-s*r,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const i=this.x,x=this.y,T=this.z,E=t.elements;return this.x=E[0]*i+E[4]*x+E[8]*T,this.y=E[1]*i+E[5]*x+E[9]*T,this.z=E[2]*i+E[6]*x+E[10]*T,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this.z=Math.max(t.z,Math.min(i.z,this.z)),this}clampScalar(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this.z=Math.max(t,Math.min(i,this.z)),this}clampLength(t,i){const x=this.length();return this.divideScalar(x||1).multiplyScalar(Math.max(t,Math.min(i,x)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this.z+=(t.z-this.z)*i,this}lerpVectors(t,i,x){return this.x=t.x+(i.x-t.x)*x,this.y=t.y+(i.y-t.y)*x,this.z=t.z+(i.z-t.z)*x,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,i){const x=t.x,T=t.y,E=t.z,s=i.x,y=i.y,e=i.z;return this.x=T*e-E*y,this.y=E*s-x*e,this.z=x*y-T*s,this}projectOnVector(t){const i=t.lengthSq();if(i===0)return this.set(0,0,0);const x=t.dot(this)/i;return this.copy(t).multiplyScalar(x)}projectOnPlane(t){return b0.copy(this).projectOnVector(t),this.sub(b0)}reflect(t){return this.sub(b0.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const i=Math.sqrt(this.lengthSq()*t.lengthSq());if(i===0)return Math.PI/2;const x=this.dot(t)/i;return Math.acos(Zn(x,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const i=this.x-t.x,x=this.y-t.y,T=this.z-t.z;return i*i+x*x+T*T}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,i,x){const T=Math.sin(i)*t;return this.x=T*Math.sin(x),this.y=Math.cos(i)*t,this.z=T*Math.cos(x),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,i,x){return this.x=t*Math.sin(i),this.y=x,this.z=t*Math.cos(i),this}setFromMatrixPosition(t){const i=t.elements;return this.x=i[12],this.y=i[13],this.z=i[14],this}setFromMatrixScale(t){const i=this.setFromMatrixColumn(t,0).length(),x=this.setFromMatrixColumn(t,1).length(),T=this.setFromMatrixColumn(t,2).length();return this.x=i,this.y=x,this.z=T,this}setFromMatrixColumn(t,i){return this.fromArray(t.elements,i*4)}setFromMatrix3Column(t,i){return this.fromArray(t.elements,i*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,i=0){return this.x=t[i],this.y=t[i+1],this.z=t[i+2],this}toArray(t=[],i=0){return t[i]=this.x,t[i+1]=this.y,t[i+2]=this.z,t}fromBufferAttribute(t,i){return this.x=t.getX(i),this.y=t.getY(i),this.z=t.getZ(i),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=(Math.random()-.5)*2,i=Math.random()*Math.PI*2,x=Math.sqrt(1-t**2);return this.x=x*Math.cos(i),this.y=x*Math.sin(i),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const b0=new Ct,IT=new Is;class ys{constructor(t=new Ct(1/0,1/0,1/0),i=new Ct(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=i}set(t,i){return this.min.copy(t),this.max.copy(i),this}setFromArray(t){this.makeEmpty();for(let i=0,x=t.length;ithis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,i){return i.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,Qa),Qa.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let i,x;return t.normal.x>0?(i=t.normal.x*this.min.x,x=t.normal.x*this.max.x):(i=t.normal.x*this.max.x,x=t.normal.x*this.min.x),t.normal.y>0?(i+=t.normal.y*this.min.y,x+=t.normal.y*this.max.y):(i+=t.normal.y*this.max.y,x+=t.normal.y*this.min.y),t.normal.z>0?(i+=t.normal.z*this.min.z,x+=t.normal.z*this.max.z):(i+=t.normal.z*this.max.z,x+=t.normal.z*this.min.z),i<=-t.constant&&x>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Zc),ov.subVectors(this.max,Zc),df.subVectors(t.a,Zc),pf.subVectors(t.b,Zc),vf.subVectors(t.c,Zc),eh.subVectors(pf,df),ih.subVectors(vf,pf),qh.subVectors(df,vf);let i=[0,-eh.z,eh.y,0,-ih.z,ih.y,0,-qh.z,qh.y,eh.z,0,-eh.x,ih.z,0,-ih.x,qh.z,0,-qh.x,-eh.y,eh.x,0,-ih.y,ih.x,0,-qh.y,qh.x,0];return!L0(i,df,pf,vf,ov)||(i=[1,0,0,0,1,0,0,0,1],!L0(i,df,pf,vf,ov))?!1:(lv.crossVectors(eh,ih),i=[lv.x,lv.y,lv.z],L0(i,df,pf,vf,ov))}clampPoint(t,i){return i.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,Qa).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(Qa).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(fl[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),fl[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),fl[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),fl[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),fl[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),fl[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),fl[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),fl[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(fl),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const fl=[new Ct,new Ct,new Ct,new Ct,new Ct,new Ct,new Ct,new Ct],Qa=new Ct,av=new ys,df=new Ct,pf=new Ct,vf=new Ct,eh=new Ct,ih=new Ct,qh=new Ct,Zc=new Ct,ov=new Ct,lv=new Ct,tu=new Ct;function L0(g,t,i,x,T){for(let E=0,s=g.length-3;E<=s;E+=3){tu.fromArray(g,E);const y=T.x*Math.abs(tu.x)+T.y*Math.abs(tu.y)+T.z*Math.abs(tu.z),e=t.dot(tu),r=i.dot(tu),d=x.dot(tu);if(Math.max(-Math.max(e,r,d),Math.min(e,r,d))>y)return!1}return!0}const eN=new ys,$c=new Ct,F0=new Ct;class Qr{constructor(t=new Ct,i=-1){this.isSphere=!0,this.center=t,this.radius=i}set(t,i){return this.center.copy(t),this.radius=i,this}setFromPoints(t,i){const x=this.center;i!==void 0?x.copy(i):eN.setFromPoints(t).getCenter(x);let T=0;for(let E=0,s=t.length;Ethis.radius*this.radius&&(i.sub(this.center).normalize(),i.multiplyScalar(this.radius).add(this.center)),i}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;$c.subVectors(t,this.center);const i=$c.lengthSq();if(i>this.radius*this.radius){const x=Math.sqrt(i),T=(x-this.radius)*.5;this.center.addScaledVector($c,T/x),this.radius+=T}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(F0.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint($c.copy(t.center).add(F0)),this.expandByPoint($c.copy(t.center).sub(F0))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}}const cl=new Ct,O0=new Ct,hv=new Ct,nh=new Ct,D0=new Ct,uv=new Ct,I0=new Ct;class lc{constructor(t=new Ct,i=new Ct(0,0,-1)){this.origin=t,this.direction=i}set(t,i){return this.origin.copy(t),this.direction.copy(i),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,i){return i.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,cl)),this}closestPointToPoint(t,i){i.subVectors(t,this.origin);const x=i.dot(this.direction);return x<0?i.copy(this.origin):i.copy(this.origin).addScaledVector(this.direction,x)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const i=cl.subVectors(t,this.origin).dot(this.direction);return i<0?this.origin.distanceToSquared(t):(cl.copy(this.origin).addScaledVector(this.direction,i),cl.distanceToSquared(t))}distanceSqToSegment(t,i,x,T){O0.copy(t).add(i).multiplyScalar(.5),hv.copy(i).sub(t).normalize(),nh.copy(this.origin).sub(O0);const E=t.distanceTo(i)*.5,s=-this.direction.dot(hv),y=nh.dot(this.direction),e=-nh.dot(hv),r=nh.lengthSq(),d=Math.abs(1-s*s);let h,a,l,n;if(d>0)if(h=s*e-y,a=s*y-e,n=E*d,h>=0)if(a>=-n)if(a<=n){const u=1/d;h*=u,a*=u,l=h*(h+s*a+2*y)+a*(s*h+a+2*e)+r}else a=E,h=Math.max(0,-(s*a+y)),l=-h*h+a*(a+2*e)+r;else a=-E,h=Math.max(0,-(s*a+y)),l=-h*h+a*(a+2*e)+r;else a<=-n?(h=Math.max(0,-(-s*E+y)),a=h>0?-E:Math.min(Math.max(-E,-e),E),l=-h*h+a*(a+2*e)+r):a<=n?(h=0,a=Math.min(Math.max(-E,-e),E),l=a*(a+2*e)+r):(h=Math.max(0,-(s*E+y)),a=h>0?E:Math.min(Math.max(-E,-e),E),l=-h*h+a*(a+2*e)+r);else a=s>0?-E:E,h=Math.max(0,-(s*a+y)),l=-h*h+a*(a+2*e)+r;return x&&x.copy(this.origin).addScaledVector(this.direction,h),T&&T.copy(O0).addScaledVector(hv,a),l}intersectSphere(t,i){cl.subVectors(t.center,this.origin);const x=cl.dot(this.direction),T=cl.dot(cl)-x*x,E=t.radius*t.radius;if(T>E)return null;const s=Math.sqrt(E-T),y=x-s,e=x+s;return e<0?null:y<0?this.at(e,i):this.at(y,i)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const i=t.normal.dot(this.direction);if(i===0)return t.distanceToPoint(this.origin)===0?0:null;const x=-(this.origin.dot(t.normal)+t.constant)/i;return x>=0?x:null}intersectPlane(t,i){const x=this.distanceToPlane(t);return x===null?null:this.at(x,i)}intersectsPlane(t){const i=t.distanceToPoint(this.origin);return i===0||t.normal.dot(this.direction)*i<0}intersectBox(t,i){let x,T,E,s,y,e;const r=1/this.direction.x,d=1/this.direction.y,h=1/this.direction.z,a=this.origin;return r>=0?(x=(t.min.x-a.x)*r,T=(t.max.x-a.x)*r):(x=(t.max.x-a.x)*r,T=(t.min.x-a.x)*r),d>=0?(E=(t.min.y-a.y)*d,s=(t.max.y-a.y)*d):(E=(t.max.y-a.y)*d,s=(t.min.y-a.y)*d),x>s||E>T||((E>x||isNaN(x))&&(x=E),(s=0?(y=(t.min.z-a.z)*h,e=(t.max.z-a.z)*h):(y=(t.max.z-a.z)*h,e=(t.min.z-a.z)*h),x>e||y>T)||((y>x||x!==x)&&(x=y),(e=0?x:T,i)}intersectsBox(t){return this.intersectBox(t,cl)!==null}intersectTriangle(t,i,x,T,E){D0.subVectors(i,t),uv.subVectors(x,t),I0.crossVectors(D0,uv);let s=this.direction.dot(I0),y;if(s>0){if(T)return null;y=1}else if(s<0)y=-1,s=-s;else return null;nh.subVectors(this.origin,t);const e=y*this.direction.dot(uv.crossVectors(nh,uv));if(e<0)return null;const r=y*this.direction.dot(D0.cross(nh));if(r<0||e+r>s)return null;const d=-y*nh.dot(I0);return d<0?null:this.at(d/s,E)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class di{constructor(t,i,x,T,E,s,y,e,r,d,h,a,l,n,u,f){di.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,i,x,T,E,s,y,e,r,d,h,a,l,n,u,f)}set(t,i,x,T,E,s,y,e,r,d,h,a,l,n,u,f){const o=this.elements;return o[0]=t,o[4]=i,o[8]=x,o[12]=T,o[1]=E,o[5]=s,o[9]=y,o[13]=e,o[2]=r,o[6]=d,o[10]=h,o[14]=a,o[3]=l,o[7]=n,o[11]=u,o[15]=f,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new di().fromArray(this.elements)}copy(t){const i=this.elements,x=t.elements;return i[0]=x[0],i[1]=x[1],i[2]=x[2],i[3]=x[3],i[4]=x[4],i[5]=x[5],i[6]=x[6],i[7]=x[7],i[8]=x[8],i[9]=x[9],i[10]=x[10],i[11]=x[11],i[12]=x[12],i[13]=x[13],i[14]=x[14],i[15]=x[15],this}copyPosition(t){const i=this.elements,x=t.elements;return i[12]=x[12],i[13]=x[13],i[14]=x[14],this}setFromMatrix3(t){const i=t.elements;return this.set(i[0],i[3],i[6],0,i[1],i[4],i[7],0,i[2],i[5],i[8],0,0,0,0,1),this}extractBasis(t,i,x){return t.setFromMatrixColumn(this,0),i.setFromMatrixColumn(this,1),x.setFromMatrixColumn(this,2),this}makeBasis(t,i,x){return this.set(t.x,i.x,x.x,0,t.y,i.y,x.y,0,t.z,i.z,x.z,0,0,0,0,1),this}extractRotation(t){const i=this.elements,x=t.elements,T=1/mf.setFromMatrixColumn(t,0).length(),E=1/mf.setFromMatrixColumn(t,1).length(),s=1/mf.setFromMatrixColumn(t,2).length();return i[0]=x[0]*T,i[1]=x[1]*T,i[2]=x[2]*T,i[3]=0,i[4]=x[4]*E,i[5]=x[5]*E,i[6]=x[6]*E,i[7]=0,i[8]=x[8]*s,i[9]=x[9]*s,i[10]=x[10]*s,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}makeRotationFromEuler(t){const i=this.elements,x=t.x,T=t.y,E=t.z,s=Math.cos(x),y=Math.sin(x),e=Math.cos(T),r=Math.sin(T),d=Math.cos(E),h=Math.sin(E);if(t.order==="XYZ"){const a=s*d,l=s*h,n=y*d,u=y*h;i[0]=e*d,i[4]=-e*h,i[8]=r,i[1]=l+n*r,i[5]=a-u*r,i[9]=-y*e,i[2]=u-a*r,i[6]=n+l*r,i[10]=s*e}else if(t.order==="YXZ"){const a=e*d,l=e*h,n=r*d,u=r*h;i[0]=a+u*y,i[4]=n*y-l,i[8]=s*r,i[1]=s*h,i[5]=s*d,i[9]=-y,i[2]=l*y-n,i[6]=u+a*y,i[10]=s*e}else if(t.order==="ZXY"){const a=e*d,l=e*h,n=r*d,u=r*h;i[0]=a-u*y,i[4]=-s*h,i[8]=n+l*y,i[1]=l+n*y,i[5]=s*d,i[9]=u-a*y,i[2]=-s*r,i[6]=y,i[10]=s*e}else if(t.order==="ZYX"){const a=s*d,l=s*h,n=y*d,u=y*h;i[0]=e*d,i[4]=n*r-l,i[8]=a*r+u,i[1]=e*h,i[5]=u*r+a,i[9]=l*r-n,i[2]=-r,i[6]=y*e,i[10]=s*e}else if(t.order==="YZX"){const a=s*e,l=s*r,n=y*e,u=y*r;i[0]=e*d,i[4]=u-a*h,i[8]=n*h+l,i[1]=h,i[5]=s*d,i[9]=-y*d,i[2]=-r*d,i[6]=l*h+n,i[10]=a-u*h}else if(t.order==="XZY"){const a=s*e,l=s*r,n=y*e,u=y*r;i[0]=e*d,i[4]=-h,i[8]=r*d,i[1]=a*h+u,i[5]=s*d,i[9]=l*h-n,i[2]=n*h-l,i[6]=y*d,i[10]=u*h+a}return i[3]=0,i[7]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}makeRotationFromQuaternion(t){return this.compose(iN,t,nN)}lookAt(t,i,x){const T=this.elements;return ta.subVectors(t,i),ta.lengthSq()===0&&(ta.z=1),ta.normalize(),rh.crossVectors(x,ta),rh.lengthSq()===0&&(Math.abs(x.z)===1?ta.x+=1e-4:ta.z+=1e-4,ta.normalize(),rh.crossVectors(x,ta)),rh.normalize(),fv.crossVectors(ta,rh),T[0]=rh.x,T[4]=fv.x,T[8]=ta.x,T[1]=rh.y,T[5]=fv.y,T[9]=ta.y,T[2]=rh.z,T[6]=fv.z,T[10]=ta.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,i){const x=t.elements,T=i.elements,E=this.elements,s=x[0],y=x[4],e=x[8],r=x[12],d=x[1],h=x[5],a=x[9],l=x[13],n=x[2],u=x[6],f=x[10],o=x[14],c=x[3],p=x[7],v=x[11],m=x[15],S=T[0],M=T[4],w=T[8],C=T[12],A=T[1],P=T[5],b=T[9],O=T[13],I=T[2],D=T[6],B=T[10],G=T[14],z=T[3],X=T[7],j=T[11],Q=T[15];return E[0]=s*S+y*A+e*I+r*z,E[4]=s*M+y*P+e*D+r*X,E[8]=s*w+y*b+e*B+r*j,E[12]=s*C+y*O+e*G+r*Q,E[1]=d*S+h*A+a*I+l*z,E[5]=d*M+h*P+a*D+l*X,E[9]=d*w+h*b+a*B+l*j,E[13]=d*C+h*O+a*G+l*Q,E[2]=n*S+u*A+f*I+o*z,E[6]=n*M+u*P+f*D+o*X,E[10]=n*w+u*b+f*B+o*j,E[14]=n*C+u*O+f*G+o*Q,E[3]=c*S+p*A+v*I+m*z,E[7]=c*M+p*P+v*D+m*X,E[11]=c*w+p*b+v*B+m*j,E[15]=c*C+p*O+v*G+m*Q,this}multiplyScalar(t){const i=this.elements;return i[0]*=t,i[4]*=t,i[8]*=t,i[12]*=t,i[1]*=t,i[5]*=t,i[9]*=t,i[13]*=t,i[2]*=t,i[6]*=t,i[10]*=t,i[14]*=t,i[3]*=t,i[7]*=t,i[11]*=t,i[15]*=t,this}determinant(){const t=this.elements,i=t[0],x=t[4],T=t[8],E=t[12],s=t[1],y=t[5],e=t[9],r=t[13],d=t[2],h=t[6],a=t[10],l=t[14],n=t[3],u=t[7],f=t[11],o=t[15];return n*(+E*e*h-T*r*h-E*y*a+x*r*a+T*y*l-x*e*l)+u*(+i*e*l-i*r*a+E*s*a-T*s*l+T*r*d-E*e*d)+f*(+i*r*h-i*y*l-E*s*h+x*s*l+E*y*d-x*r*d)+o*(-T*y*d-i*e*h+i*y*a+T*s*h-x*s*a+x*e*d)}transpose(){const t=this.elements;let i;return i=t[1],t[1]=t[4],t[4]=i,i=t[2],t[2]=t[8],t[8]=i,i=t[6],t[6]=t[9],t[9]=i,i=t[3],t[3]=t[12],t[12]=i,i=t[7],t[7]=t[13],t[13]=i,i=t[11],t[11]=t[14],t[14]=i,this}setPosition(t,i,x){const T=this.elements;return t.isVector3?(T[12]=t.x,T[13]=t.y,T[14]=t.z):(T[12]=t,T[13]=i,T[14]=x),this}invert(){const t=this.elements,i=t[0],x=t[1],T=t[2],E=t[3],s=t[4],y=t[5],e=t[6],r=t[7],d=t[8],h=t[9],a=t[10],l=t[11],n=t[12],u=t[13],f=t[14],o=t[15],c=h*f*r-u*a*r+u*e*l-y*f*l-h*e*o+y*a*o,p=n*a*r-d*f*r-n*e*l+s*f*l+d*e*o-s*a*o,v=d*u*r-n*h*r+n*y*l-s*u*l-d*y*o+s*h*o,m=n*h*e-d*u*e-n*y*a+s*u*a+d*y*f-s*h*f,S=i*c+x*p+T*v+E*m;if(S===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const M=1/S;return t[0]=c*M,t[1]=(u*a*E-h*f*E-u*T*l+x*f*l+h*T*o-x*a*o)*M,t[2]=(y*f*E-u*e*E+u*T*r-x*f*r-y*T*o+x*e*o)*M,t[3]=(h*e*E-y*a*E-h*T*r+x*a*r+y*T*l-x*e*l)*M,t[4]=p*M,t[5]=(d*f*E-n*a*E+n*T*l-i*f*l-d*T*o+i*a*o)*M,t[6]=(n*e*E-s*f*E-n*T*r+i*f*r+s*T*o-i*e*o)*M,t[7]=(s*a*E-d*e*E+d*T*r-i*a*r-s*T*l+i*e*l)*M,t[8]=v*M,t[9]=(n*h*E-d*u*E-n*x*l+i*u*l+d*x*o-i*h*o)*M,t[10]=(s*u*E-n*y*E+n*x*r-i*u*r-s*x*o+i*y*o)*M,t[11]=(d*y*E-s*h*E-d*x*r+i*h*r+s*x*l-i*y*l)*M,t[12]=m*M,t[13]=(d*u*T-n*h*T+n*x*a-i*u*a-d*x*f+i*h*f)*M,t[14]=(n*y*T-s*u*T-n*x*e+i*u*e+s*x*f-i*y*f)*M,t[15]=(s*h*T-d*y*T+d*x*e-i*h*e-s*x*a+i*y*a)*M,this}scale(t){const i=this.elements,x=t.x,T=t.y,E=t.z;return i[0]*=x,i[4]*=T,i[8]*=E,i[1]*=x,i[5]*=T,i[9]*=E,i[2]*=x,i[6]*=T,i[10]*=E,i[3]*=x,i[7]*=T,i[11]*=E,this}getMaxScaleOnAxis(){const t=this.elements,i=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],x=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],T=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(i,x,T))}makeTranslation(t,i,x){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,i,0,0,1,x,0,0,0,1),this}makeRotationX(t){const i=Math.cos(t),x=Math.sin(t);return this.set(1,0,0,0,0,i,-x,0,0,x,i,0,0,0,0,1),this}makeRotationY(t){const i=Math.cos(t),x=Math.sin(t);return this.set(i,0,x,0,0,1,0,0,-x,0,i,0,0,0,0,1),this}makeRotationZ(t){const i=Math.cos(t),x=Math.sin(t);return this.set(i,-x,0,0,x,i,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,i){const x=Math.cos(i),T=Math.sin(i),E=1-x,s=t.x,y=t.y,e=t.z,r=E*s,d=E*y;return this.set(r*s+x,r*y-T*e,r*e+T*y,0,r*y+T*e,d*y+x,d*e-T*s,0,r*e-T*y,d*e+T*s,E*e*e+x,0,0,0,0,1),this}makeScale(t,i,x){return this.set(t,0,0,0,0,i,0,0,0,0,x,0,0,0,0,1),this}makeShear(t,i,x,T,E,s){return this.set(1,x,E,0,t,1,s,0,i,T,1,0,0,0,0,1),this}compose(t,i,x){const T=this.elements,E=i._x,s=i._y,y=i._z,e=i._w,r=E+E,d=s+s,h=y+y,a=E*r,l=E*d,n=E*h,u=s*d,f=s*h,o=y*h,c=e*r,p=e*d,v=e*h,m=x.x,S=x.y,M=x.z;return T[0]=(1-(u+o))*m,T[1]=(l+v)*m,T[2]=(n-p)*m,T[3]=0,T[4]=(l-v)*S,T[5]=(1-(a+o))*S,T[6]=(f+c)*S,T[7]=0,T[8]=(n+p)*M,T[9]=(f-c)*M,T[10]=(1-(a+u))*M,T[11]=0,T[12]=t.x,T[13]=t.y,T[14]=t.z,T[15]=1,this}decompose(t,i,x){const T=this.elements;let E=mf.set(T[0],T[1],T[2]).length();const s=mf.set(T[4],T[5],T[6]).length(),y=mf.set(T[8],T[9],T[10]).length();this.determinant()<0&&(E=-E),t.x=T[12],t.y=T[13],t.z=T[14],_a.copy(this);const r=1/E,d=1/s,h=1/y;return _a.elements[0]*=r,_a.elements[1]*=r,_a.elements[2]*=r,_a.elements[4]*=d,_a.elements[5]*=d,_a.elements[6]*=d,_a.elements[8]*=h,_a.elements[9]*=h,_a.elements[10]*=h,i.setFromRotationMatrix(_a),x.x=E,x.y=s,x.z=y,this}makePerspective(t,i,x,T,E,s,y=Uo){const e=this.elements,r=2*E/(i-t),d=2*E/(x-T),h=(i+t)/(i-t),a=(x+T)/(x-T);let l,n;if(y===Uo)l=-(s+E)/(s-E),n=-2*s*E/(s-E);else if(y===Bd)l=-s/(s-E),n=-s*E/(s-E);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+y);return e[0]=r,e[4]=0,e[8]=h,e[12]=0,e[1]=0,e[5]=d,e[9]=a,e[13]=0,e[2]=0,e[6]=0,e[10]=l,e[14]=n,e[3]=0,e[7]=0,e[11]=-1,e[15]=0,this}makeOrthographic(t,i,x,T,E,s,y=Uo){const e=this.elements,r=1/(i-t),d=1/(x-T),h=1/(s-E),a=(i+t)*r,l=(x+T)*d;let n,u;if(y===Uo)n=(s+E)*h,u=-2*h;else if(y===Bd)n=E*h,u=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+y);return e[0]=2*r,e[4]=0,e[8]=0,e[12]=-a,e[1]=0,e[5]=2*d,e[9]=0,e[13]=-l,e[2]=0,e[6]=0,e[10]=u,e[14]=-n,e[3]=0,e[7]=0,e[11]=0,e[15]=1,this}equals(t){const i=this.elements,x=t.elements;for(let T=0;T<16;T++)if(i[T]!==x[T])return!1;return!0}fromArray(t,i=0){for(let x=0;x<16;x++)this.elements[x]=t[x+i];return this}toArray(t=[],i=0){const x=this.elements;return t[i]=x[0],t[i+1]=x[1],t[i+2]=x[2],t[i+3]=x[3],t[i+4]=x[4],t[i+5]=x[5],t[i+6]=x[6],t[i+7]=x[7],t[i+8]=x[8],t[i+9]=x[9],t[i+10]=x[10],t[i+11]=x[11],t[i+12]=x[12],t[i+13]=x[13],t[i+14]=x[14],t[i+15]=x[15],t}}const mf=new Ct,_a=new di,iN=new Ct(0,0,0),nN=new Ct(1,1,1),rh=new Ct,fv=new Ct,ta=new Ct,NT=new di,BT=new Is;class eo{constructor(t=0,i=0,x=0,T=eo.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=i,this._z=x,this._order=T}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,i,x,T=this._order){return this._x=t,this._y=i,this._z=x,this._order=T,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,i=this._order,x=!0){const T=t.elements,E=T[0],s=T[4],y=T[8],e=T[1],r=T[5],d=T[9],h=T[2],a=T[6],l=T[10];switch(i){case"XYZ":this._y=Math.asin(Zn(y,-1,1)),Math.abs(y)<.9999999?(this._x=Math.atan2(-d,l),this._z=Math.atan2(-s,E)):(this._x=Math.atan2(a,r),this._z=0);break;case"YXZ":this._x=Math.asin(-Zn(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(y,l),this._z=Math.atan2(e,r)):(this._y=Math.atan2(-h,E),this._z=0);break;case"ZXY":this._x=Math.asin(Zn(a,-1,1)),Math.abs(a)<.9999999?(this._y=Math.atan2(-h,l),this._z=Math.atan2(-s,r)):(this._y=0,this._z=Math.atan2(e,E));break;case"ZYX":this._y=Math.asin(-Zn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(a,l),this._z=Math.atan2(e,E)):(this._x=0,this._z=Math.atan2(-s,r));break;case"YZX":this._z=Math.asin(Zn(e,-1,1)),Math.abs(e)<.9999999?(this._x=Math.atan2(-d,r),this._y=Math.atan2(-h,E)):(this._x=0,this._y=Math.atan2(y,l));break;case"XZY":this._z=Math.asin(-Zn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(a,r),this._y=Math.atan2(y,E)):(this._x=Math.atan2(-d,l),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,x===!0&&this._onChangeCallback(),this}setFromQuaternion(t,i,x){return NT.makeRotationFromQuaternion(t),this.setFromRotationMatrix(NT,i,x)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return BT.setFromEuler(this),this.setFromQuaternion(BT,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}eo.DEFAULT_ORDER="XYZ";class Cu{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let i=0;i1){for(let x=0;x0&&(T.userData=this.userData),T.layers=this.layers.mask,T.matrix=this.matrix.toArray(),T.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(T.matrixAutoUpdate=!1),this.isInstancedMesh&&(T.type="InstancedMesh",T.count=this.count,T.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(T.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(T.type="BatchedMesh",T.perObjectFrustumCulled=this.perObjectFrustumCulled,T.sortObjects=this.sortObjects,T.drawRanges=this._drawRanges,T.reservedRanges=this._reservedRanges,T.visibility=this._visibility,T.active=this._active,T.bounds=this._bounds.map(y=>({boxInitialized:y.boxInitialized,boxMin:y.box.min.toArray(),boxMax:y.box.max.toArray(),sphereInitialized:y.sphereInitialized,sphereRadius:y.sphere.radius,sphereCenter:y.sphere.center.toArray()})),T.maxGeometryCount=this._maxGeometryCount,T.maxVertexCount=this._maxVertexCount,T.maxIndexCount=this._maxIndexCount,T.geometryInitialized=this._geometryInitialized,T.geometryCount=this._geometryCount,T.matricesTexture=this._matricesTexture.toJSON(t),this.boundingSphere!==null&&(T.boundingSphere={center:T.boundingSphere.center.toArray(),radius:T.boundingSphere.radius}),this.boundingBox!==null&&(T.boundingBox={min:T.boundingBox.min.toArray(),max:T.boundingBox.max.toArray()}));function E(y,e){return y[e.uuid]===void 0&&(y[e.uuid]=e.toJSON(t)),e.uuid}if(this.isScene)this.background&&(this.background.isColor?T.background=this.background.toJSON():this.background.isTexture&&(T.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(T.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){T.geometry=E(t.geometries,this.geometry);const y=this.geometry.parameters;if(y!==void 0&&y.shapes!==void 0){const e=y.shapes;if(Array.isArray(e))for(let r=0,d=e.length;r0){T.children=[];for(let y=0;y0){T.animations=[];for(let y=0;y0&&(x.geometries=y),e.length>0&&(x.materials=e),r.length>0&&(x.textures=r),d.length>0&&(x.images=d),h.length>0&&(x.shapes=h),a.length>0&&(x.skeletons=a),l.length>0&&(x.animations=l),n.length>0&&(x.nodes=n)}return x.object=T,x;function s(y){const e=[];for(const r in y){const d=y[r];delete d.metadata,e.push(d)}return e}}clone(t){return new this.constructor().copy(this,t)}copy(t,i=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),i===!0)for(let x=0;x0?T.multiplyScalar(1/Math.sqrt(E)):T.set(0,0,0)}static getBarycoord(t,i,x,T,E){qa.subVectors(T,i),pl.subVectors(x,i),N0.subVectors(t,i);const s=qa.dot(qa),y=qa.dot(pl),e=qa.dot(N0),r=pl.dot(pl),d=pl.dot(N0),h=s*r-y*y;if(h===0)return E.set(0,0,0),null;const a=1/h,l=(r*e-y*d)*a,n=(s*d-y*e)*a;return E.set(1-l-n,n,l)}static containsPoint(t,i,x,T){return this.getBarycoord(t,i,x,T,vl)===null?!1:vl.x>=0&&vl.y>=0&&vl.x+vl.y<=1}static getInterpolation(t,i,x,T,E,s,y,e){return this.getBarycoord(t,i,x,T,vl)===null?(e.x=0,e.y=0,"z"in e&&(e.z=0),"w"in e&&(e.w=0),null):(e.setScalar(0),e.addScaledVector(E,vl.x),e.addScaledVector(s,vl.y),e.addScaledVector(y,vl.z),e)}static isFrontFacing(t,i,x,T){return qa.subVectors(x,i),pl.subVectors(t,i),qa.cross(pl).dot(T)<0}set(t,i,x){return this.a.copy(t),this.b.copy(i),this.c.copy(x),this}setFromPointsAndIndices(t,i,x,T){return this.a.copy(t[i]),this.b.copy(t[x]),this.c.copy(t[T]),this}setFromAttributeAndIndices(t,i,x,T){return this.a.fromBufferAttribute(t,i),this.b.fromBufferAttribute(t,x),this.c.fromBufferAttribute(t,T),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return qa.subVectors(this.c,this.b),pl.subVectors(this.a,this.b),qa.cross(pl).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return na.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,i){return na.getBarycoord(t,this.a,this.b,this.c,i)}getInterpolation(t,i,x,T,E){return na.getInterpolation(t,this.a,this.b,this.c,i,x,T,E)}containsPoint(t){return na.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return na.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,i){const x=this.a,T=this.b,E=this.c;let s,y;yf.subVectors(T,x),xf.subVectors(E,x),B0.subVectors(t,x);const e=yf.dot(B0),r=xf.dot(B0);if(e<=0&&r<=0)return i.copy(x);U0.subVectors(t,T);const d=yf.dot(U0),h=xf.dot(U0);if(d>=0&&h<=d)return i.copy(T);const a=e*h-d*r;if(a<=0&&e>=0&&d<=0)return s=e/(e-d),i.copy(x).addScaledVector(yf,s);z0.subVectors(t,E);const l=yf.dot(z0),n=xf.dot(z0);if(n>=0&&l<=n)return i.copy(E);const u=l*r-e*n;if(u<=0&&r>=0&&n<=0)return y=r/(r-n),i.copy(x).addScaledVector(xf,y);const f=d*n-l*h;if(f<=0&&h-d>=0&&l-n>=0)return HT.subVectors(E,T),y=(h-d)/(h-d+(l-n)),i.copy(T).addScaledVector(HT,y);const o=1/(f+u+a);return s=u*o,y=a*o,i.copy(x).addScaledVector(yf,s).addScaledVector(xf,y)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const x2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},sh={h:0,s:0,l:0},dv={h:0,s:0,l:0};function G0(g,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?g+(t-g)*6*i:i<1/2?t:i<2/3?g+(t-g)*6*(2/3-i):g}class ze{constructor(t,i,x){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,i,x)}set(t,i,x){if(i===void 0&&x===void 0){const T=t;T&&T.isColor?this.copy(T):typeof T=="number"?this.setHex(T):typeof T=="string"&&this.setStyle(T)}else this.setRGB(t,i,x);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,i=mr){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,sn.toWorkingColorSpace(this,i),this}setRGB(t,i,x,T=sn.workingColorSpace){return this.r=t,this.g=i,this.b=x,sn.toWorkingColorSpace(this,T),this}setHSL(t,i,x,T=sn.workingColorSpace){if(t=S1(t,1),i=Zn(i,0,1),x=Zn(x,0,1),i===0)this.r=this.g=this.b=x;else{const E=x<=.5?x*(1+i):x+i-x*i,s=2*x-E;this.r=G0(s,E,t+1/3),this.g=G0(s,E,t),this.b=G0(s,E,t-1/3)}return sn.toWorkingColorSpace(this,T),this}setStyle(t,i=mr){function x(E){E!==void 0&&parseFloat(E)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let T;if(T=/^(\w+)\(([^\)]*)\)/.exec(t)){let E;const s=T[1],y=T[2];switch(s){case"rgb":case"rgba":if(E=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return x(E[4]),this.setRGB(Math.min(255,parseInt(E[1],10))/255,Math.min(255,parseInt(E[2],10))/255,Math.min(255,parseInt(E[3],10))/255,i);if(E=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return x(E[4]),this.setRGB(Math.min(100,parseInt(E[1],10))/100,Math.min(100,parseInt(E[2],10))/100,Math.min(100,parseInt(E[3],10))/100,i);break;case"hsl":case"hsla":if(E=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return x(E[4]),this.setHSL(parseFloat(E[1])/360,parseFloat(E[2])/100,parseFloat(E[3])/100,i);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(T=/^\#([A-Fa-f\d]+)$/.exec(t)){const E=T[1],s=E.length;if(s===3)return this.setRGB(parseInt(E.charAt(0),16)/15,parseInt(E.charAt(1),16)/15,parseInt(E.charAt(2),16)/15,i);if(s===6)return this.setHex(parseInt(E,16),i);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,i);return this}setColorName(t,i=mr){const x=x2[t.toLowerCase()];return x!==void 0?this.setHex(x,i):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Zf(t.r),this.g=Zf(t.g),this.b=Zf(t.b),this}copyLinearToSRGB(t){return this.r=P0(t.r),this.g=P0(t.g),this.b=P0(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=mr){return sn.fromWorkingColorSpace(Kr.copy(this),t),Math.round(Zn(Kr.r*255,0,255))*65536+Math.round(Zn(Kr.g*255,0,255))*256+Math.round(Zn(Kr.b*255,0,255))}getHexString(t=mr){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,i=sn.workingColorSpace){sn.fromWorkingColorSpace(Kr.copy(this),i);const x=Kr.r,T=Kr.g,E=Kr.b,s=Math.max(x,T,E),y=Math.min(x,T,E);let e,r;const d=(y+s)/2;if(y===s)e=0,r=0;else{const h=s-y;switch(r=d<=.5?h/(s+y):h/(2-s-y),s){case x:e=(T-E)/h+(T0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(const i in t){const x=t[i];if(x===void 0){console.warn(`THREE.Material: parameter '${i}' has value of undefined.`);continue}const T=this[i];if(T===void 0){console.warn(`THREE.Material: '${i}' is not a property of THREE.${this.type}.`);continue}T&&T.isColor?T.set(x):T&&T.isVector3&&x&&x.isVector3?T.copy(x):this[i]=x}}toJSON(t){const i=t===void 0||typeof t=="string";i&&(t={textures:{},images:{}});const x={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};x.uuid=this.uuid,x.type=this.type,this.name!==""&&(x.name=this.name),this.color&&this.color.isColor&&(x.color=this.color.getHex()),this.roughness!==void 0&&(x.roughness=this.roughness),this.metalness!==void 0&&(x.metalness=this.metalness),this.sheen!==void 0&&(x.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(x.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(x.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(x.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(x.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(x.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(x.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(x.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(x.shininess=this.shininess),this.clearcoat!==void 0&&(x.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(x.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(x.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(x.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(x.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,x.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(x.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(x.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(x.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(x.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(x.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(x.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(x.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(x.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(x.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(x.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(x.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(x.lightMap=this.lightMap.toJSON(t).uuid,x.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(x.aoMap=this.aoMap.toJSON(t).uuid,x.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(x.bumpMap=this.bumpMap.toJSON(t).uuid,x.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(x.normalMap=this.normalMap.toJSON(t).uuid,x.normalMapType=this.normalMapType,x.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(x.displacementMap=this.displacementMap.toJSON(t).uuid,x.displacementScale=this.displacementScale,x.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(x.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(x.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(x.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(x.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(x.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(x.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(x.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(x.combine=this.combine)),this.envMapIntensity!==void 0&&(x.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(x.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(x.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(x.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(x.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(x.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(x.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(x.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(x.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(x.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(x.size=this.size),this.shadowSide!==null&&(x.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(x.sizeAttenuation=this.sizeAttenuation),this.blending!==Tu&&(x.blending=this.blending),this.side!==Pl&&(x.side=this.side),this.vertexColors===!0&&(x.vertexColors=!0),this.opacity<1&&(x.opacity=this.opacity),this.transparent===!0&&(x.transparent=!0),this.blendSrc!==Cm&&(x.blendSrc=this.blendSrc),this.blendDst!==wm&&(x.blendDst=this.blendDst),this.blendEquation!==uh&&(x.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(x.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(x.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(x.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(x.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(x.blendAlpha=this.blendAlpha),this.depthFunc!==Cd&&(x.depthFunc=this.depthFunc),this.depthTest===!1&&(x.depthTest=this.depthTest),this.depthWrite===!1&&(x.depthWrite=this.depthWrite),this.colorWrite===!1&&(x.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(x.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==xx&&(x.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(x.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(x.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==cu&&(x.stencilFail=this.stencilFail),this.stencilZFail!==cu&&(x.stencilZFail=this.stencilZFail),this.stencilZPass!==cu&&(x.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(x.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(x.rotation=this.rotation),this.polygonOffset===!0&&(x.polygonOffset=!0),this.polygonOffsetFactor!==0&&(x.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(x.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(x.linewidth=this.linewidth),this.dashSize!==void 0&&(x.dashSize=this.dashSize),this.gapSize!==void 0&&(x.gapSize=this.gapSize),this.scale!==void 0&&(x.scale=this.scale),this.dithering===!0&&(x.dithering=!0),this.alphaTest>0&&(x.alphaTest=this.alphaTest),this.alphaHash===!0&&(x.alphaHash=!0),this.alphaToCoverage===!0&&(x.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(x.premultipliedAlpha=!0),this.forceSinglePass===!0&&(x.forceSinglePass=!0),this.wireframe===!0&&(x.wireframe=!0),this.wireframeLinewidth>1&&(x.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(x.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(x.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(x.flatShading=!0),this.visible===!1&&(x.visible=!1),this.toneMapped===!1&&(x.toneMapped=!1),this.fog===!1&&(x.fog=!1),Object.keys(this.userData).length>0&&(x.userData=this.userData);function T(E){const s=[];for(const y in E){const e=E[y];delete e.metadata,s.push(e)}return s}if(i){const E=T(t.textures),s=T(t.images);E.length>0&&(x.textures=E),s.length>0&&(x.images=s)}return x}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const i=t.clippingPlanes;let x=null;if(i!==null){const T=i.length;x=new Array(T);for(let E=0;E!==T;++E)x[E]=i[E].clone()}return this.clippingPlanes=x,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}}class Mh extends Wr{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ze(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=_d,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const xl=uN();function uN(){const g=new ArrayBuffer(4),t=new Float32Array(g),i=new Uint32Array(g),x=new Uint32Array(512),T=new Uint32Array(512);for(let e=0;e<256;++e){const r=e-127;r<-27?(x[e]=0,x[e|256]=32768,T[e]=24,T[e|256]=24):r<-14?(x[e]=1024>>-r-14,x[e|256]=1024>>-r-14|32768,T[e]=-r-1,T[e|256]=-r-1):r<=15?(x[e]=r+15<<10,x[e|256]=r+15<<10|32768,T[e]=13,T[e|256]=13):r<128?(x[e]=31744,x[e|256]=64512,T[e]=24,T[e|256]=24):(x[e]=31744,x[e|256]=64512,T[e]=13,T[e|256]=13)}const E=new Uint32Array(2048),s=new Uint32Array(64),y=new Uint32Array(64);for(let e=1;e<1024;++e){let r=e<<13,d=0;for(;!(r&8388608);)r<<=1,d-=8388608;r&=-8388609,d+=947912704,E[e]=r|d}for(let e=1024;e<2048;++e)E[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)s[e]=e<<23;s[31]=1199570944,s[32]=2147483648;for(let e=33;e<63;++e)s[e]=2147483648+(e-32<<23);s[63]=3347054592;for(let e=1;e<64;++e)e!==32&&(y[e]=1024);return{floatView:t,uint32View:i,baseTable:x,shiftTable:T,mantissaTable:E,exponentTable:s,offsetTable:y}}function Ds(g){Math.abs(g)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),g=Zn(g,-65504,65504),xl.floatView[0]=g;const t=xl.uint32View[0],i=t>>23&511;return xl.baseTable[i]+((t&8388607)>>xl.shiftTable[i])}function ld(g){const t=g>>10;return xl.uint32View[0]=xl.mantissaTable[xl.offsetTable[t]+(g&1023)]+xl.exponentTable[t],xl.floatView[0]}const fN={toHalfFloat:Ds,fromHalfFloat:ld},fr=new Ct,pv=new ve;class on{constructor(t,i,x=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=i,this.count=t!==void 0?t.length/i:0,this.normalized=x,this.usage=Nd,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ma,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return Mu("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,i){this.updateRanges.push({start:t,count:i})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,i,x){t*=this.itemSize,x*=i.itemSize;for(let T=0,E=this.itemSize;T0&&(t.userData=this.userData),this.parameters!==void 0){const e=this.parameters;for(const r in e)e[r]!==void 0&&(t[r]=e[r]);return t}t.data={attributes:{}};const i=this.index;i!==null&&(t.data.index={type:i.array.constructor.name,array:Array.prototype.slice.call(i.array)});const x=this.attributes;for(const e in x){const r=x[e];t.data.attributes[e]=r.toJSON(t.data)}const T={};let E=!1;for(const e in this.morphAttributes){const r=this.morphAttributes[e],d=[];for(let h=0,a=r.length;h0&&(T[e]=d,E=!0)}E&&(t.data.morphAttributes=T,t.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));const y=this.boundingSphere;return y!==null&&(t.data.boundingSphere={center:y.center.toArray(),radius:y.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const i={};this.name=t.name;const x=t.index;x!==null&&this.setIndex(x.clone(i));const T=t.attributes;for(const r in T){const d=T[r];this.setAttribute(r,d.clone(i))}const E=t.morphAttributes;for(const r in E){const d=[],h=E[r];for(let a=0,l=h.length;a0){const T=i[x[0]];if(T!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,s=T.length;E(t.far-t.near)**2))&&(WT.copy(E).invert(),eu.copy(t.ray).applyMatrix4(WT),!(x.boundingBox!==null&&eu.intersectsBox(x.boundingBox)===!1)&&this._computeIntersections(t,i,eu)))}_computeIntersections(t,i,x){let T;const E=this.geometry,s=this.material,y=E.index,e=E.attributes.position,r=E.attributes.uv,d=E.attributes.uv1,h=E.attributes.normal,a=E.groups,l=E.drawRange;if(y!==null)if(Array.isArray(s))for(let n=0,u=a.length;ni.far?null:{distance:r,point:Tv.clone(),object:g}}function Ev(g,t,i,x,T,E,s,y,e,r){g.getVertexPosition(y,Tf),g.getVertexPosition(e,Ef),g.getVertexPosition(r,Mf);const d=SN(g,t,i,x,Tf,Ef,Mf,Sv);if(d){T&&(gv.fromBufferAttribute(T,y),yv.fromBufferAttribute(T,e),xv.fromBufferAttribute(T,r),d.uv=na.getInterpolation(Sv,Tf,Ef,Mf,gv,yv,xv,new ve)),E&&(gv.fromBufferAttribute(E,y),yv.fromBufferAttribute(E,e),xv.fromBufferAttribute(E,r),d.uv1=na.getInterpolation(Sv,Tf,Ef,Mf,gv,yv,xv,new ve),d.uv2=d.uv1),s&&(YT.fromBufferAttribute(s,y),kT.fromBufferAttribute(s,e),jT.fromBufferAttribute(s,r),d.normal=na.getInterpolation(Sv,Tf,Ef,Mf,YT,kT,jT,new Ct),d.normal.dot(x.direction)>0&&d.normal.multiplyScalar(-1));const h={a:y,b:e,c:r,normal:new Ct,materialIndex:0};na.getNormal(Tf,Ef,Mf,h.normal),d.face=h}return d}class Bu extends Fi{constructor(t=1,i=1,x=1,T=1,E=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:i,depth:x,widthSegments:T,heightSegments:E,depthSegments:s};const y=this;T=Math.floor(T),E=Math.floor(E),s=Math.floor(s);const e=[],r=[],d=[],h=[];let a=0,l=0;n("z","y","x",-1,-1,x,i,t,s,E,0),n("z","y","x",1,-1,x,i,-t,s,E,1),n("x","z","y",1,1,t,x,i,T,s,2),n("x","z","y",1,-1,t,x,-i,T,s,3),n("x","y","z",1,-1,t,i,x,T,E,4),n("x","y","z",-1,-1,t,i,-x,T,E,5),this.setIndex(e),this.setAttribute("position",new ke(r,3)),this.setAttribute("normal",new ke(d,3)),this.setAttribute("uv",new ke(h,2));function n(u,f,o,c,p,v,m,S,M,w,C){const A=v/M,P=m/w,b=v/2,O=m/2,I=S/2,D=M+1,B=w+1;let G=0,z=0;const X=new Ct;for(let j=0;j0?1:-1,d.push(X.x,X.y,X.z),h.push(tt/M),h.push(1-j/w),G+=1}}for(let j=0;j>8&255]+jr[g>>16&255]+jr[g>>24&255]+"-"+jr[t&255]+jr[t>>8&255]+"-"+jr[t>>16&15|64]+jr[t>>24&255]+"-"+jr[i&63|128]+jr[i>>8&255]+"-"+jr[i>>16&255]+jr[i>>24&255]+jr[y&255]+jr[y>>8&255]+jr[y>>16&255]+jr[y>>24&255]).toLowerCase()}function $n(g,t,i){return Math.max(t,Math.min(i,g))}function T1(g,t){return(g%t+t)%t}function O5(g,t,i,y,T){return y+(g-t)*(T-y)/(i-t)}function D5(g,t,i){return g!==t?(i-g)/(t-g):0}function md(g,t,i){return(1-i)*g+i*t}function I5(g,t,i,y){return md(g,t,1-Math.exp(-i*y))}function N5(g,t=1){return t-Math.abs(T1(g,t*2)-t)}function B5(g,t,i){return g<=t?0:g>=i?1:(g=(g-t)/(i-t),g*g*(3-2*g))}function U5(g,t,i){return g<=t?0:g>=i?1:(g=(g-t)/(i-t),g*g*g*(g*(g*6-15)+10))}function z5(g,t){return g+Math.floor(Math.random()*(t-g+1))}function G5(g,t){return g+Math.random()*(t-g)}function V5(g){return g*(.5-Math.random())}function H5(g){g!==void 0&&(OT=g);let t=OT+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function W5(g){return g*Eu}function X5(g){return g*qf}function Cx(g){return(g&g-1)===0&&g!==0}function Y5(g){return Math.pow(2,Math.ceil(Math.log(g)/Math.LN2))}function Lm(g){return Math.pow(2,Math.floor(Math.log(g)/Math.LN2))}function k5(g,t,i,y,T){const E=Math.cos,s=Math.sin,x=E(i/2),e=s(i/2),r=E((t+y)/2),d=s((t+y)/2),h=E((t-y)/2),a=s((t-y)/2),l=E((y-t)/2),n=s((y-t)/2);switch(T){case"XYX":g.set(x*d,e*h,e*a,x*r);break;case"YZY":g.set(e*a,x*d,e*h,x*r);break;case"ZXZ":g.set(e*h,e*a,x*d,x*r);break;case"XZX":g.set(x*d,e*n,e*l,x*r);break;case"YXY":g.set(e*l,x*d,e*n,x*r);break;case"ZYZ":g.set(e*n,e*l,x*d,x*r);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+T)}}function ms(g,t){switch(t.constructor){case Float32Array:return g;case Uint32Array:return g/4294967295;case Uint16Array:return g/65535;case Uint8Array:return g/255;case Int32Array:return Math.max(g/2147483647,-1);case Int16Array:return Math.max(g/32767,-1);case Int8Array:return Math.max(g/127,-1);default:throw new Error("Invalid component type.")}}function Pi(g,t){switch(t.constructor){case Float32Array:return g;case Uint32Array:return Math.round(g*4294967295);case Uint16Array:return Math.round(g*65535);case Uint8Array:return Math.round(g*255);case Int32Array:return Math.round(g*2147483647);case Int16Array:return Math.round(g*32767);case Int8Array:return Math.round(g*127);default:throw new Error("Invalid component type.")}}const pm={DEG2RAD:Eu,RAD2DEG:qf,generateUUID:ra,clamp:$n,euclideanModulo:T1,mapLinear:O5,inverseLerp:D5,lerp:md,damp:I5,pingpong:N5,smoothstep:B5,smootherstep:U5,randInt:z5,randFloat:G5,randFloatSpread:V5,seededRandom:H5,degToRad:W5,radToDeg:X5,isPowerOfTwo:Cx,ceilPowerOfTwo:Y5,floorPowerOfTwo:Lm,setQuaternionFromProperEuler:k5,normalize:Pi,denormalize:ms};class ve{constructor(t=0,i=0){ve.prototype.isVector2=!0,this.x=t,this.y=i}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,i){return this.x=t,this.y=i,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this}addScaledVector(t,i){return this.x+=t.x*i,this.y+=t.y*i,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const i=this.x,y=this.y,T=t.elements;return this.x=T[0]*i+T[3]*y+T[6],this.y=T[1]*i+T[4]*y+T[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this}clampScalar(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this}clampLength(t,i){const y=this.length();return this.divideScalar(y||1).multiplyScalar(Math.max(t,Math.min(i,y)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const i=Math.sqrt(this.lengthSq()*t.lengthSq());if(i===0)return Math.PI/2;const y=this.dot(t)/i;return Math.acos($n(y,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const i=this.x-t.x,y=this.y-t.y;return i*i+y*y}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this}lerpVectors(t,i,y){return this.x=t.x+(i.x-t.x)*y,this.y=t.y+(i.y-t.y)*y,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,i=0){return this.x=t[i],this.y=t[i+1],this}toArray(t=[],i=0){return t[i]=this.x,t[i+1]=this.y,t}fromBufferAttribute(t,i){return this.x=t.getX(i),this.y=t.getY(i),this}rotateAround(t,i){const y=Math.cos(i),T=Math.sin(i),E=this.x-t.x,s=this.y-t.y;return this.x=E*y-s*T+t.x,this.y=E*T+s*y+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Di{constructor(t,i,y,T,E,s,x,e,r){Di.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,i,y,T,E,s,x,e,r)}set(t,i,y,T,E,s,x,e,r){const d=this.elements;return d[0]=t,d[1]=T,d[2]=x,d[3]=i,d[4]=E,d[5]=e,d[6]=y,d[7]=s,d[8]=r,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const i=this.elements,y=t.elements;return i[0]=y[0],i[1]=y[1],i[2]=y[2],i[3]=y[3],i[4]=y[4],i[5]=y[5],i[6]=y[6],i[7]=y[7],i[8]=y[8],this}extractBasis(t,i,y){return t.setFromMatrix3Column(this,0),i.setFromMatrix3Column(this,1),y.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const i=t.elements;return this.set(i[0],i[4],i[8],i[1],i[5],i[9],i[2],i[6],i[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,i){const y=t.elements,T=i.elements,E=this.elements,s=y[0],x=y[3],e=y[6],r=y[1],d=y[4],h=y[7],a=y[2],l=y[5],n=y[8],u=T[0],f=T[3],o=T[6],c=T[1],p=T[4],v=T[7],m=T[2],S=T[5],M=T[8];return E[0]=s*u+x*c+e*m,E[3]=s*f+x*p+e*S,E[6]=s*o+x*v+e*M,E[1]=r*u+d*c+h*m,E[4]=r*f+d*p+h*S,E[7]=r*o+d*v+h*M,E[2]=a*u+l*c+n*m,E[5]=a*f+l*p+n*S,E[8]=a*o+l*v+n*M,this}multiplyScalar(t){const i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=t,i[4]*=t,i[7]*=t,i[2]*=t,i[5]*=t,i[8]*=t,this}determinant(){const t=this.elements,i=t[0],y=t[1],T=t[2],E=t[3],s=t[4],x=t[5],e=t[6],r=t[7],d=t[8];return i*s*d-i*x*r-y*E*d+y*x*e+T*E*r-T*s*e}invert(){const t=this.elements,i=t[0],y=t[1],T=t[2],E=t[3],s=t[4],x=t[5],e=t[6],r=t[7],d=t[8],h=d*s-x*r,a=x*e-d*E,l=r*E-s*e,n=i*h+y*a+T*l;if(n===0)return this.set(0,0,0,0,0,0,0,0,0);const u=1/n;return t[0]=h*u,t[1]=(T*r-d*y)*u,t[2]=(x*y-T*s)*u,t[3]=a*u,t[4]=(d*i-T*e)*u,t[5]=(T*E-x*i)*u,t[6]=l*u,t[7]=(y*e-r*i)*u,t[8]=(s*i-y*E)*u,this}transpose(){let t;const i=this.elements;return t=i[1],i[1]=i[3],i[3]=t,t=i[2],i[2]=i[6],i[6]=t,t=i[5],i[5]=i[7],i[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const i=this.elements;return t[0]=i[0],t[1]=i[3],t[2]=i[6],t[3]=i[1],t[4]=i[4],t[5]=i[7],t[6]=i[2],t[7]=i[5],t[8]=i[8],this}setUvTransform(t,i,y,T,E,s,x){const e=Math.cos(E),r=Math.sin(E);return this.set(y*e,y*r,-y*(e*s+r*x)+s+t,-T*r,T*e,-T*(-r*s+e*x)+x+i,0,0,1),this}scale(t,i){return this.premultiply(R0.makeScale(t,i)),this}rotate(t){return this.premultiply(R0.makeRotation(-t)),this}translate(t,i){return this.premultiply(R0.makeTranslation(t,i)),this}makeTranslation(t,i){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,i,0,0,1),this}makeRotation(t){const i=Math.cos(t),y=Math.sin(t);return this.set(i,-y,0,y,i,0,0,0,1),this}makeScale(t,i){return this.set(t,0,0,0,i,0,0,0,1),this}equals(t){const i=this.elements,y=t.elements;for(let T=0;T<9;T++)if(i[T]!==y[T])return!1;return!0}fromArray(t,i=0){for(let y=0;y<9;y++)this.elements[y]=t[y+i];return this}toArray(t=[],i=0){const y=this.elements;return t[i]=y[0],t[i+1]=y[1],t[i+2]=y[2],t[i+3]=y[3],t[i+4]=y[4],t[i+5]=y[5],t[i+6]=y[6],t[i+7]=y[7],t[i+8]=y[8],t}clone(){return new this.constructor().fromArray(this.elements)}}const R0=new Di;function y2(g){for(let t=g.length-1;t>=0;--t)if(g[t]>=65535)return!0;return!1}const j5={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Vf(g,t){return new j5[g](t)}function zd(g){return document.createElementNS("http://www.w3.org/1999/xhtml",g)}function x2(){const g=zd("canvas");return g.style.display="block",g}const DT={};function Mu(g){g in DT||(DT[g]=!0,console.warn(g))}const IT=new Di().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),NT=new Di().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),av={[Ho]:{transfer:Dd,primaries:Id,toReference:g=>g,fromReference:g=>g},[mr]:{transfer:gn,primaries:Id,toReference:g=>g.convertSRGBToLinear(),fromReference:g=>g.convertLinearToSRGB()},[tp]:{transfer:Dd,primaries:Nd,toReference:g=>g.applyMatrix3(NT),fromReference:g=>g.applyMatrix3(IT)},[mg]:{transfer:gn,primaries:Nd,toReference:g=>g.convertSRGBToLinear().applyMatrix3(NT),fromReference:g=>g.applyMatrix3(IT).convertLinearToSRGB()}},K5=new Set([Ho,tp]),an={enabled:!0,_workingColorSpace:Ho,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(g){if(!K5.has(g))throw new Error(`Unsupported working color space, "${g}".`);this._workingColorSpace=g},convert:function(g,t,i){if(this.enabled===!1||t===i||!t||!i)return g;const y=av[t].toReference,T=av[i].fromReference;return T(y(g))},fromWorkingColorSpace:function(g,t){return this.convert(g,this._workingColorSpace,t)},toWorkingColorSpace:function(g,t){return this.convert(g,t,this._workingColorSpace)},getPrimaries:function(g){return av[g].primaries},getTransfer:function(g){return g===ia?Dd:av[g].transfer}};function Kf(g){return g<.04045?g*.0773993808:Math.pow(g*.9478672986+.0521327014,2.4)}function b0(g){return g<.0031308?g*12.92:1.055*Math.pow(g,.41666)-.055}let cf;class E1{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let i;if(t instanceof HTMLCanvasElement)i=t;else{cf===void 0&&(cf=zd("canvas")),cf.width=t.width,cf.height=t.height;const y=cf.getContext("2d");t instanceof ImageData?y.putImageData(t,0,0):y.drawImage(t,0,0,t.width,t.height),i=cf}return i.width>2048||i.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),i.toDataURL("image/jpeg",.6)):i.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){const i=zd("canvas");i.width=t.width,i.height=t.height;const y=i.getContext("2d");y.drawImage(t,0,0,t.width,t.height);const T=y.getImageData(0,0,t.width,t.height),E=T.data;for(let s=0;s0&&(y.userData=this.userData),i||(t.textures[this.uuid]=y),y}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==dg)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Rd:t.x=t.x-Math.floor(t.x);break;case Jr:t.x=t.x<0?0:1;break;case bd:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Rd:t.y=t.y-Math.floor(t.y);break;case Jr:t.y=t.y<0?0:1;break;case bd:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Mu("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===mr?vh:x1}set encoding(t){Mu("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=t===vh?mr:ia}}zn.DEFAULT_IMAGE=null;zn.DEFAULT_MAPPING=dg;zn.DEFAULT_ANISOTROPY=1;class on{constructor(t=0,i=0,y=0,T=1){on.prototype.isVector4=!0,this.x=t,this.y=i,this.z=y,this.w=T}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,i,y,T){return this.x=t,this.y=i,this.z=y,this.w=T,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;case 2:this.z=i;break;case 3:this.w=i;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this.z=t.z+i.z,this.w=t.w+i.w,this}addScaledVector(t,i){return this.x+=t.x*i,this.y+=t.y*i,this.z+=t.z*i,this.w+=t.w*i,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this.z=t.z-i.z,this.w=t.w-i.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const i=this.x,y=this.y,T=this.z,E=this.w,s=t.elements;return this.x=s[0]*i+s[4]*y+s[8]*T+s[12]*E,this.y=s[1]*i+s[5]*y+s[9]*T+s[13]*E,this.z=s[2]*i+s[6]*y+s[10]*T+s[14]*E,this.w=s[3]*i+s[7]*y+s[11]*T+s[15]*E,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const i=Math.sqrt(1-t.w*t.w);return i<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/i,this.y=t.y/i,this.z=t.z/i),this}setAxisAngleFromRotationMatrix(t){let i,y,T,E;const e=t.elements,r=e[0],d=e[4],h=e[8],a=e[1],l=e[5],n=e[9],u=e[2],f=e[6],o=e[10];if(Math.abs(d-a)<.01&&Math.abs(h-u)<.01&&Math.abs(n-f)<.01){if(Math.abs(d+a)<.1&&Math.abs(h+u)<.1&&Math.abs(n+f)<.1&&Math.abs(r+l+o-3)<.1)return this.set(1,0,0,0),this;i=Math.PI;const p=(r+1)/2,v=(l+1)/2,m=(o+1)/2,S=(d+a)/4,M=(h+u)/4,w=(n+f)/4;return p>v&&p>m?p<.01?(y=0,T=.707106781,E=.707106781):(y=Math.sqrt(p),T=S/y,E=M/y):v>m?v<.01?(y=.707106781,T=0,E=.707106781):(T=Math.sqrt(v),y=S/T,E=w/T):m<.01?(y=.707106781,T=.707106781,E=0):(E=Math.sqrt(m),y=M/E,T=w/E),this.set(y,T,E,i),this}let c=Math.sqrt((f-n)*(f-n)+(h-u)*(h-u)+(a-d)*(a-d));return Math.abs(c)<.001&&(c=1),this.x=(f-n)/c,this.y=(h-u)/c,this.z=(a-d)/c,this.w=Math.acos((r+l+o-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this.z=Math.max(t.z,Math.min(i.z,this.z)),this.w=Math.max(t.w,Math.min(i.w,this.w)),this}clampScalar(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this.z=Math.max(t,Math.min(i,this.z)),this.w=Math.max(t,Math.min(i,this.w)),this}clampLength(t,i){const y=this.length();return this.divideScalar(y||1).multiplyScalar(Math.max(t,Math.min(i,y)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this.z+=(t.z-this.z)*i,this.w+=(t.w-this.w)*i,this}lerpVectors(t,i,y){return this.x=t.x+(i.x-t.x)*y,this.y=t.y+(i.y-t.y)*y,this.z=t.z+(i.z-t.z)*y,this.w=t.w+(i.w-t.w)*y,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,i=0){return this.x=t[i],this.y=t[i+1],this.z=t[i+2],this.w=t[i+3],this}toArray(t=[],i=0){return t[i]=this.x,t[i+1]=this.y,t[i+2]=this.z,t[i+3]=this.w,t}fromBufferAttribute(t,i){return this.x=t.getX(i),this.y=t.getY(i),this.z=t.getZ(i),this.w=t.getW(i),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class S2 extends bl{constructor(t=1,i=1,y={}){super(),this.isRenderTarget=!0,this.width=t,this.height=i,this.depth=1,this.scissor=new on(0,0,t,i),this.scissorTest=!1,this.viewport=new on(0,0,t,i);const T={width:t,height:i,depth:1};y.encoding!==void 0&&(Mu("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),y.colorSpace=y.encoding===vh?mr:ia),y=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Bn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},y),this.texture=new zn(T,y.mapping,y.wrapS,y.wrapT,y.magFilter,y.minFilter,y.format,y.type,y.anisotropy,y.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=y.generateMipmaps,this.texture.internalFormat=y.internalFormat,this.depthBuffer=y.depthBuffer,this.stencilBuffer=y.stencilBuffer,this.depthTexture=y.depthTexture,this.samples=y.samples}setSize(t,i,y=1){(this.width!==t||this.height!==i||this.depth!==y)&&(this.width=t,this.height=i,this.depth=y,this.texture.image.width=t,this.texture.image.height=i,this.texture.image.depth=y,this.dispose()),this.viewport.set(0,0,t,i),this.scissor.set(0,0,t,i)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.isRenderTargetTexture=!0;const i=Object.assign({},t.texture.image);return this.texture.source=new yu(i),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class ro extends S2{constructor(t=1,i=1,y={}){super(t,i,y),this.isWebGLRenderTarget=!0}}class gg extends zn{constructor(t=null,i=1,y=1,T=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:i,height:y,depth:T},this.magFilter=rr,this.minFilter=rr,this.wrapR=Jr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class J5 extends ro{constructor(t=1,i=1,y=1,T={}){super(t,i,T),this.isWebGLArrayRenderTarget=!0,this.depth=y,this.texture=new gg(null,t,i,y),this.texture.isRenderTargetTexture=!0}}class M1 extends zn{constructor(t=null,i=1,y=1,T=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:i,height:y,depth:T},this.magFilter=rr,this.minFilter=rr,this.wrapR=Jr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Q5 extends ro{constructor(t=1,i=1,y=1,T={}){super(t,i,T),this.isWebGL3DRenderTarget=!0,this.depth=y,this.texture=new M1(null,t,i,y),this.texture.isRenderTargetTexture=!0}}class _5 extends ro{constructor(t=1,i=1,y=1,T={}){super(t,i,T),this.isWebGLMultipleRenderTargets=!0;const E=this.texture;this.texture=[];for(let s=0;s=0?1:-1,p=1-o*o;if(p>Number.EPSILON){const m=Math.sqrt(p),S=Math.atan2(m,o*c);f=Math.sin(f*S)/m,x=Math.sin(x*S)/m}const v=x*c;if(e=e*f+a*v,r=r*f+l*v,d=d*f+n*v,h=h*f+u*v,f===1-x){const m=1/Math.sqrt(e*e+r*r+d*d+h*h);e*=m,r*=m,d*=m,h*=m}}t[i]=e,t[i+1]=r,t[i+2]=d,t[i+3]=h}static multiplyQuaternionsFlat(t,i,y,T,E,s){const x=y[T],e=y[T+1],r=y[T+2],d=y[T+3],h=E[s],a=E[s+1],l=E[s+2],n=E[s+3];return t[i]=x*n+d*h+e*l-r*a,t[i+1]=e*n+d*a+r*h-x*l,t[i+2]=r*n+d*l+x*a-e*h,t[i+3]=d*n-x*h-e*a-r*l,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,i,y,T){return this._x=t,this._y=i,this._z=y,this._w=T,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,i=!0){const y=t._x,T=t._y,E=t._z,s=t._order,x=Math.cos,e=Math.sin,r=x(y/2),d=x(T/2),h=x(E/2),a=e(y/2),l=e(T/2),n=e(E/2);switch(s){case"XYZ":this._x=a*d*h+r*l*n,this._y=r*l*h-a*d*n,this._z=r*d*n+a*l*h,this._w=r*d*h-a*l*n;break;case"YXZ":this._x=a*d*h+r*l*n,this._y=r*l*h-a*d*n,this._z=r*d*n-a*l*h,this._w=r*d*h+a*l*n;break;case"ZXY":this._x=a*d*h-r*l*n,this._y=r*l*h+a*d*n,this._z=r*d*n+a*l*h,this._w=r*d*h-a*l*n;break;case"ZYX":this._x=a*d*h-r*l*n,this._y=r*l*h+a*d*n,this._z=r*d*n-a*l*h,this._w=r*d*h+a*l*n;break;case"YZX":this._x=a*d*h+r*l*n,this._y=r*l*h+a*d*n,this._z=r*d*n-a*l*h,this._w=r*d*h-a*l*n;break;case"XZY":this._x=a*d*h-r*l*n,this._y=r*l*h-a*d*n,this._z=r*d*n+a*l*h,this._w=r*d*h+a*l*n;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return i===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,i){const y=i/2,T=Math.sin(y);return this._x=t.x*T,this._y=t.y*T,this._z=t.z*T,this._w=Math.cos(y),this._onChangeCallback(),this}setFromRotationMatrix(t){const i=t.elements,y=i[0],T=i[4],E=i[8],s=i[1],x=i[5],e=i[9],r=i[2],d=i[6],h=i[10],a=y+x+h;if(a>0){const l=.5/Math.sqrt(a+1);this._w=.25/l,this._x=(d-e)*l,this._y=(E-r)*l,this._z=(s-T)*l}else if(y>x&&y>h){const l=2*Math.sqrt(1+y-x-h);this._w=(d-e)/l,this._x=.25*l,this._y=(T+s)/l,this._z=(E+r)/l}else if(x>h){const l=2*Math.sqrt(1+x-y-h);this._w=(E-r)/l,this._x=(T+s)/l,this._y=.25*l,this._z=(e+d)/l}else{const l=2*Math.sqrt(1+h-y-x);this._w=(s-T)/l,this._x=(E+r)/l,this._y=(e+d)/l,this._z=.25*l}return this._onChangeCallback(),this}setFromUnitVectors(t,i){let y=t.dot(i)+1;return yMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=y):(this._x=0,this._y=-t.z,this._z=t.y,this._w=y)):(this._x=t.y*i.z-t.z*i.y,this._y=t.z*i.x-t.x*i.z,this._z=t.x*i.y-t.y*i.x,this._w=y),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs($n(this.dot(t),-1,1)))}rotateTowards(t,i){const y=this.angleTo(t);if(y===0)return this;const T=Math.min(1,i/y);return this.slerp(t,T),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,i){const y=t._x,T=t._y,E=t._z,s=t._w,x=i._x,e=i._y,r=i._z,d=i._w;return this._x=y*d+s*x+T*r-E*e,this._y=T*d+s*e+E*x-y*r,this._z=E*d+s*r+y*e-T*x,this._w=s*d-y*x-T*e-E*r,this._onChangeCallback(),this}slerp(t,i){if(i===0)return this;if(i===1)return this.copy(t);const y=this._x,T=this._y,E=this._z,s=this._w;let x=s*t._w+y*t._x+T*t._y+E*t._z;if(x<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,x=-x):this.copy(t),x>=1)return this._w=s,this._x=y,this._y=T,this._z=E,this;const e=1-x*x;if(e<=Number.EPSILON){const l=1-i;return this._w=l*s+i*this._w,this._x=l*y+i*this._x,this._y=l*T+i*this._y,this._z=l*E+i*this._z,this.normalize(),this}const r=Math.sqrt(e),d=Math.atan2(r,x),h=Math.sin((1-i)*d)/r,a=Math.sin(i*d)/r;return this._w=s*h+this._w*a,this._x=y*h+this._x*a,this._y=T*h+this._y*a,this._z=E*h+this._z*a,this._onChangeCallback(),this}slerpQuaternions(t,i,y){return this.copy(t).slerp(i,y)}random(){const t=Math.random(),i=Math.sqrt(1-t),y=Math.sqrt(t),T=2*Math.PI*Math.random(),E=2*Math.PI*Math.random();return this.set(i*Math.cos(T),y*Math.sin(E),y*Math.cos(E),i*Math.sin(T))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,i=0){return this._x=t[i],this._y=t[i+1],this._z=t[i+2],this._w=t[i+3],this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._w,t}fromBufferAttribute(t,i){return this._x=t.getX(i),this._y=t.getY(i),this._z=t.getZ(i),this._w=t.getW(i),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Ct{constructor(t=0,i=0,y=0){Ct.prototype.isVector3=!0,this.x=t,this.y=i,this.z=y}set(t,i,y){return y===void 0&&(y=this.z),this.x=t,this.y=i,this.z=y,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;case 2:this.z=i;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this.z=t.z+i.z,this}addScaledVector(t,i){return this.x+=t.x*i,this.y+=t.y*i,this.z+=t.z*i,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this.z=t.z-i.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,i){return this.x=t.x*i.x,this.y=t.y*i.y,this.z=t.z*i.z,this}applyEuler(t){return this.applyQuaternion(BT.setFromEuler(t))}applyAxisAngle(t,i){return this.applyQuaternion(BT.setFromAxisAngle(t,i))}applyMatrix3(t){const i=this.x,y=this.y,T=this.z,E=t.elements;return this.x=E[0]*i+E[3]*y+E[6]*T,this.y=E[1]*i+E[4]*y+E[7]*T,this.z=E[2]*i+E[5]*y+E[8]*T,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const i=this.x,y=this.y,T=this.z,E=t.elements,s=1/(E[3]*i+E[7]*y+E[11]*T+E[15]);return this.x=(E[0]*i+E[4]*y+E[8]*T+E[12])*s,this.y=(E[1]*i+E[5]*y+E[9]*T+E[13])*s,this.z=(E[2]*i+E[6]*y+E[10]*T+E[14])*s,this}applyQuaternion(t){const i=this.x,y=this.y,T=this.z,E=t.x,s=t.y,x=t.z,e=t.w,r=2*(s*T-x*y),d=2*(x*i-E*T),h=2*(E*y-s*i);return this.x=i+e*r+s*h-x*d,this.y=y+e*d+x*r-E*h,this.z=T+e*h+E*d-s*r,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const i=this.x,y=this.y,T=this.z,E=t.elements;return this.x=E[0]*i+E[4]*y+E[8]*T,this.y=E[1]*i+E[5]*y+E[9]*T,this.z=E[2]*i+E[6]*y+E[10]*T,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this.z=Math.max(t.z,Math.min(i.z,this.z)),this}clampScalar(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this.z=Math.max(t,Math.min(i,this.z)),this}clampLength(t,i){const y=this.length();return this.divideScalar(y||1).multiplyScalar(Math.max(t,Math.min(i,y)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this.z+=(t.z-this.z)*i,this}lerpVectors(t,i,y){return this.x=t.x+(i.x-t.x)*y,this.y=t.y+(i.y-t.y)*y,this.z=t.z+(i.z-t.z)*y,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,i){const y=t.x,T=t.y,E=t.z,s=i.x,x=i.y,e=i.z;return this.x=T*e-E*x,this.y=E*s-y*e,this.z=y*x-T*s,this}projectOnVector(t){const i=t.lengthSq();if(i===0)return this.set(0,0,0);const y=t.dot(this)/i;return this.copy(t).multiplyScalar(y)}projectOnPlane(t){return F0.copy(this).projectOnVector(t),this.sub(F0)}reflect(t){return this.sub(F0.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const i=Math.sqrt(this.lengthSq()*t.lengthSq());if(i===0)return Math.PI/2;const y=this.dot(t)/i;return Math.acos($n(y,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const i=this.x-t.x,y=this.y-t.y,T=this.z-t.z;return i*i+y*y+T*T}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,i,y){const T=Math.sin(i)*t;return this.x=T*Math.sin(y),this.y=Math.cos(i)*t,this.z=T*Math.cos(y),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,i,y){return this.x=t*Math.sin(i),this.y=y,this.z=t*Math.cos(i),this}setFromMatrixPosition(t){const i=t.elements;return this.x=i[12],this.y=i[13],this.z=i[14],this}setFromMatrixScale(t){const i=this.setFromMatrixColumn(t,0).length(),y=this.setFromMatrixColumn(t,1).length(),T=this.setFromMatrixColumn(t,2).length();return this.x=i,this.y=y,this.z=T,this}setFromMatrixColumn(t,i){return this.fromArray(t.elements,i*4)}setFromMatrix3Column(t,i){return this.fromArray(t.elements,i*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,i=0){return this.x=t[i],this.y=t[i+1],this.z=t[i+2],this}toArray(t=[],i=0){return t[i]=this.x,t[i+1]=this.y,t[i+2]=this.z,t}fromBufferAttribute(t,i){return this.x=t.getX(i),this.y=t.getY(i),this.z=t.getZ(i),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=(Math.random()-.5)*2,i=Math.random()*Math.PI*2,y=Math.sqrt(1-t**2);return this.x=y*Math.cos(i),this.y=y*Math.sin(i),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const F0=new Ct,BT=new Is;class ys{constructor(t=new Ct(1/0,1/0,1/0),i=new Ct(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=i}set(t,i){return this.min.copy(t),this.max.copy(i),this}setFromArray(t){this.makeEmpty();for(let i=0,y=t.length;ithis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,i){return i.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,Qa),Qa.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let i,y;return t.normal.x>0?(i=t.normal.x*this.min.x,y=t.normal.x*this.max.x):(i=t.normal.x*this.max.x,y=t.normal.x*this.min.x),t.normal.y>0?(i+=t.normal.y*this.min.y,y+=t.normal.y*this.max.y):(i+=t.normal.y*this.max.y,y+=t.normal.y*this.min.y),t.normal.z>0?(i+=t.normal.z*this.min.z,y+=t.normal.z*this.max.z):(i+=t.normal.z*this.max.z,y+=t.normal.z*this.min.z),i<=-t.constant&&y>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Kc),lv.subVectors(this.max,Kc),df.subVectors(t.a,Kc),pf.subVectors(t.b,Kc),vf.subVectors(t.c,Kc),th.subVectors(pf,df),eh.subVectors(vf,pf),_h.subVectors(df,vf);let i=[0,-th.z,th.y,0,-eh.z,eh.y,0,-_h.z,_h.y,th.z,0,-th.x,eh.z,0,-eh.x,_h.z,0,-_h.x,-th.y,th.x,0,-eh.y,eh.x,0,-_h.y,_h.x,0];return!O0(i,df,pf,vf,lv)||(i=[1,0,0,0,1,0,0,0,1],!O0(i,df,pf,vf,lv))?!1:(hv.crossVectors(th,eh),i=[hv.x,hv.y,hv.z],O0(i,df,pf,vf,lv))}clampPoint(t,i){return i.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,Qa).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(Qa).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(fl[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),fl[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),fl[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),fl[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),fl[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),fl[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),fl[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),fl[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(fl),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const fl=[new Ct,new Ct,new Ct,new Ct,new Ct,new Ct,new Ct,new Ct],Qa=new Ct,ov=new ys,df=new Ct,pf=new Ct,vf=new Ct,th=new Ct,eh=new Ct,_h=new Ct,Kc=new Ct,lv=new Ct,hv=new Ct,qh=new Ct;function O0(g,t,i,y,T){for(let E=0,s=g.length-3;E<=s;E+=3){qh.fromArray(g,E);const x=T.x*Math.abs(qh.x)+T.y*Math.abs(qh.y)+T.z*Math.abs(qh.z),e=t.dot(qh),r=i.dot(qh),d=y.dot(qh);if(Math.max(-Math.max(e,r,d),Math.min(e,r,d))>x)return!1}return!0}const q5=new ys,$c=new Ct,D0=new Ct;class Qr{constructor(t=new Ct,i=-1){this.isSphere=!0,this.center=t,this.radius=i}set(t,i){return this.center.copy(t),this.radius=i,this}setFromPoints(t,i){const y=this.center;i!==void 0?y.copy(i):q5.setFromPoints(t).getCenter(y);let T=0;for(let E=0,s=t.length;Ethis.radius*this.radius&&(i.sub(this.center).normalize(),i.multiplyScalar(this.radius).add(this.center)),i}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;$c.subVectors(t,this.center);const i=$c.lengthSq();if(i>this.radius*this.radius){const y=Math.sqrt(i),T=(y-this.radius)*.5;this.center.addScaledVector($c,T/y),this.radius+=T}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(D0.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint($c.copy(t.center).add(D0)),this.expandByPoint($c.copy(t.center).sub(D0))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}}const cl=new Ct,I0=new Ct,uv=new Ct,ih=new Ct,N0=new Ct,fv=new Ct,B0=new Ct;class oc{constructor(t=new Ct,i=new Ct(0,0,-1)){this.origin=t,this.direction=i}set(t,i){return this.origin.copy(t),this.direction.copy(i),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,i){return i.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,cl)),this}closestPointToPoint(t,i){i.subVectors(t,this.origin);const y=i.dot(this.direction);return y<0?i.copy(this.origin):i.copy(this.origin).addScaledVector(this.direction,y)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const i=cl.subVectors(t,this.origin).dot(this.direction);return i<0?this.origin.distanceToSquared(t):(cl.copy(this.origin).addScaledVector(this.direction,i),cl.distanceToSquared(t))}distanceSqToSegment(t,i,y,T){I0.copy(t).add(i).multiplyScalar(.5),uv.copy(i).sub(t).normalize(),ih.copy(this.origin).sub(I0);const E=t.distanceTo(i)*.5,s=-this.direction.dot(uv),x=ih.dot(this.direction),e=-ih.dot(uv),r=ih.lengthSq(),d=Math.abs(1-s*s);let h,a,l,n;if(d>0)if(h=s*e-x,a=s*x-e,n=E*d,h>=0)if(a>=-n)if(a<=n){const u=1/d;h*=u,a*=u,l=h*(h+s*a+2*x)+a*(s*h+a+2*e)+r}else a=E,h=Math.max(0,-(s*a+x)),l=-h*h+a*(a+2*e)+r;else a=-E,h=Math.max(0,-(s*a+x)),l=-h*h+a*(a+2*e)+r;else a<=-n?(h=Math.max(0,-(-s*E+x)),a=h>0?-E:Math.min(Math.max(-E,-e),E),l=-h*h+a*(a+2*e)+r):a<=n?(h=0,a=Math.min(Math.max(-E,-e),E),l=a*(a+2*e)+r):(h=Math.max(0,-(s*E+x)),a=h>0?E:Math.min(Math.max(-E,-e),E),l=-h*h+a*(a+2*e)+r);else a=s>0?-E:E,h=Math.max(0,-(s*a+x)),l=-h*h+a*(a+2*e)+r;return y&&y.copy(this.origin).addScaledVector(this.direction,h),T&&T.copy(I0).addScaledVector(uv,a),l}intersectSphere(t,i){cl.subVectors(t.center,this.origin);const y=cl.dot(this.direction),T=cl.dot(cl)-y*y,E=t.radius*t.radius;if(T>E)return null;const s=Math.sqrt(E-T),x=y-s,e=y+s;return e<0?null:x<0?this.at(e,i):this.at(x,i)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const i=t.normal.dot(this.direction);if(i===0)return t.distanceToPoint(this.origin)===0?0:null;const y=-(this.origin.dot(t.normal)+t.constant)/i;return y>=0?y:null}intersectPlane(t,i){const y=this.distanceToPlane(t);return y===null?null:this.at(y,i)}intersectsPlane(t){const i=t.distanceToPoint(this.origin);return i===0||t.normal.dot(this.direction)*i<0}intersectBox(t,i){let y,T,E,s,x,e;const r=1/this.direction.x,d=1/this.direction.y,h=1/this.direction.z,a=this.origin;return r>=0?(y=(t.min.x-a.x)*r,T=(t.max.x-a.x)*r):(y=(t.max.x-a.x)*r,T=(t.min.x-a.x)*r),d>=0?(E=(t.min.y-a.y)*d,s=(t.max.y-a.y)*d):(E=(t.max.y-a.y)*d,s=(t.min.y-a.y)*d),y>s||E>T||((E>y||isNaN(y))&&(y=E),(s=0?(x=(t.min.z-a.z)*h,e=(t.max.z-a.z)*h):(x=(t.max.z-a.z)*h,e=(t.min.z-a.z)*h),y>e||x>T)||((x>y||y!==y)&&(y=x),(e=0?y:T,i)}intersectsBox(t){return this.intersectBox(t,cl)!==null}intersectTriangle(t,i,y,T,E){N0.subVectors(i,t),fv.subVectors(y,t),B0.crossVectors(N0,fv);let s=this.direction.dot(B0),x;if(s>0){if(T)return null;x=1}else if(s<0)x=-1,s=-s;else return null;ih.subVectors(this.origin,t);const e=x*this.direction.dot(fv.crossVectors(ih,fv));if(e<0)return null;const r=x*this.direction.dot(N0.cross(ih));if(r<0||e+r>s)return null;const d=-x*ih.dot(B0);return d<0?null:this.at(d/s,E)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class di{constructor(t,i,y,T,E,s,x,e,r,d,h,a,l,n,u,f){di.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,i,y,T,E,s,x,e,r,d,h,a,l,n,u,f)}set(t,i,y,T,E,s,x,e,r,d,h,a,l,n,u,f){const o=this.elements;return o[0]=t,o[4]=i,o[8]=y,o[12]=T,o[1]=E,o[5]=s,o[9]=x,o[13]=e,o[2]=r,o[6]=d,o[10]=h,o[14]=a,o[3]=l,o[7]=n,o[11]=u,o[15]=f,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new di().fromArray(this.elements)}copy(t){const i=this.elements,y=t.elements;return i[0]=y[0],i[1]=y[1],i[2]=y[2],i[3]=y[3],i[4]=y[4],i[5]=y[5],i[6]=y[6],i[7]=y[7],i[8]=y[8],i[9]=y[9],i[10]=y[10],i[11]=y[11],i[12]=y[12],i[13]=y[13],i[14]=y[14],i[15]=y[15],this}copyPosition(t){const i=this.elements,y=t.elements;return i[12]=y[12],i[13]=y[13],i[14]=y[14],this}setFromMatrix3(t){const i=t.elements;return this.set(i[0],i[3],i[6],0,i[1],i[4],i[7],0,i[2],i[5],i[8],0,0,0,0,1),this}extractBasis(t,i,y){return t.setFromMatrixColumn(this,0),i.setFromMatrixColumn(this,1),y.setFromMatrixColumn(this,2),this}makeBasis(t,i,y){return this.set(t.x,i.x,y.x,0,t.y,i.y,y.y,0,t.z,i.z,y.z,0,0,0,0,1),this}extractRotation(t){const i=this.elements,y=t.elements,T=1/mf.setFromMatrixColumn(t,0).length(),E=1/mf.setFromMatrixColumn(t,1).length(),s=1/mf.setFromMatrixColumn(t,2).length();return i[0]=y[0]*T,i[1]=y[1]*T,i[2]=y[2]*T,i[3]=0,i[4]=y[4]*E,i[5]=y[5]*E,i[6]=y[6]*E,i[7]=0,i[8]=y[8]*s,i[9]=y[9]*s,i[10]=y[10]*s,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}makeRotationFromEuler(t){const i=this.elements,y=t.x,T=t.y,E=t.z,s=Math.cos(y),x=Math.sin(y),e=Math.cos(T),r=Math.sin(T),d=Math.cos(E),h=Math.sin(E);if(t.order==="XYZ"){const a=s*d,l=s*h,n=x*d,u=x*h;i[0]=e*d,i[4]=-e*h,i[8]=r,i[1]=l+n*r,i[5]=a-u*r,i[9]=-x*e,i[2]=u-a*r,i[6]=n+l*r,i[10]=s*e}else if(t.order==="YXZ"){const a=e*d,l=e*h,n=r*d,u=r*h;i[0]=a+u*x,i[4]=n*x-l,i[8]=s*r,i[1]=s*h,i[5]=s*d,i[9]=-x,i[2]=l*x-n,i[6]=u+a*x,i[10]=s*e}else if(t.order==="ZXY"){const a=e*d,l=e*h,n=r*d,u=r*h;i[0]=a-u*x,i[4]=-s*h,i[8]=n+l*x,i[1]=l+n*x,i[5]=s*d,i[9]=u-a*x,i[2]=-s*r,i[6]=x,i[10]=s*e}else if(t.order==="ZYX"){const a=s*d,l=s*h,n=x*d,u=x*h;i[0]=e*d,i[4]=n*r-l,i[8]=a*r+u,i[1]=e*h,i[5]=u*r+a,i[9]=l*r-n,i[2]=-r,i[6]=x*e,i[10]=s*e}else if(t.order==="YZX"){const a=s*e,l=s*r,n=x*e,u=x*r;i[0]=e*d,i[4]=u-a*h,i[8]=n*h+l,i[1]=h,i[5]=s*d,i[9]=-x*d,i[2]=-r*d,i[6]=l*h+n,i[10]=a-u*h}else if(t.order==="XZY"){const a=s*e,l=s*r,n=x*e,u=x*r;i[0]=e*d,i[4]=-h,i[8]=r*d,i[1]=a*h+u,i[5]=s*d,i[9]=l*h-n,i[2]=n*h-l,i[6]=x*d,i[10]=u*h+a}return i[3]=0,i[7]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}makeRotationFromQuaternion(t){return this.compose(tN,t,eN)}lookAt(t,i,y){const T=this.elements;return ta.subVectors(t,i),ta.lengthSq()===0&&(ta.z=1),ta.normalize(),nh.crossVectors(y,ta),nh.lengthSq()===0&&(Math.abs(y.z)===1?ta.x+=1e-4:ta.z+=1e-4,ta.normalize(),nh.crossVectors(y,ta)),nh.normalize(),cv.crossVectors(ta,nh),T[0]=nh.x,T[4]=cv.x,T[8]=ta.x,T[1]=nh.y,T[5]=cv.y,T[9]=ta.y,T[2]=nh.z,T[6]=cv.z,T[10]=ta.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,i){const y=t.elements,T=i.elements,E=this.elements,s=y[0],x=y[4],e=y[8],r=y[12],d=y[1],h=y[5],a=y[9],l=y[13],n=y[2],u=y[6],f=y[10],o=y[14],c=y[3],p=y[7],v=y[11],m=y[15],S=T[0],M=T[4],w=T[8],C=T[12],A=T[1],P=T[5],b=T[9],O=T[13],I=T[2],D=T[6],B=T[10],G=T[14],z=T[3],X=T[7],j=T[11],Q=T[15];return E[0]=s*S+x*A+e*I+r*z,E[4]=s*M+x*P+e*D+r*X,E[8]=s*w+x*b+e*B+r*j,E[12]=s*C+x*O+e*G+r*Q,E[1]=d*S+h*A+a*I+l*z,E[5]=d*M+h*P+a*D+l*X,E[9]=d*w+h*b+a*B+l*j,E[13]=d*C+h*O+a*G+l*Q,E[2]=n*S+u*A+f*I+o*z,E[6]=n*M+u*P+f*D+o*X,E[10]=n*w+u*b+f*B+o*j,E[14]=n*C+u*O+f*G+o*Q,E[3]=c*S+p*A+v*I+m*z,E[7]=c*M+p*P+v*D+m*X,E[11]=c*w+p*b+v*B+m*j,E[15]=c*C+p*O+v*G+m*Q,this}multiplyScalar(t){const i=this.elements;return i[0]*=t,i[4]*=t,i[8]*=t,i[12]*=t,i[1]*=t,i[5]*=t,i[9]*=t,i[13]*=t,i[2]*=t,i[6]*=t,i[10]*=t,i[14]*=t,i[3]*=t,i[7]*=t,i[11]*=t,i[15]*=t,this}determinant(){const t=this.elements,i=t[0],y=t[4],T=t[8],E=t[12],s=t[1],x=t[5],e=t[9],r=t[13],d=t[2],h=t[6],a=t[10],l=t[14],n=t[3],u=t[7],f=t[11],o=t[15];return n*(+E*e*h-T*r*h-E*x*a+y*r*a+T*x*l-y*e*l)+u*(+i*e*l-i*r*a+E*s*a-T*s*l+T*r*d-E*e*d)+f*(+i*r*h-i*x*l-E*s*h+y*s*l+E*x*d-y*r*d)+o*(-T*x*d-i*e*h+i*x*a+T*s*h-y*s*a+y*e*d)}transpose(){const t=this.elements;let i;return i=t[1],t[1]=t[4],t[4]=i,i=t[2],t[2]=t[8],t[8]=i,i=t[6],t[6]=t[9],t[9]=i,i=t[3],t[3]=t[12],t[12]=i,i=t[7],t[7]=t[13],t[13]=i,i=t[11],t[11]=t[14],t[14]=i,this}setPosition(t,i,y){const T=this.elements;return t.isVector3?(T[12]=t.x,T[13]=t.y,T[14]=t.z):(T[12]=t,T[13]=i,T[14]=y),this}invert(){const t=this.elements,i=t[0],y=t[1],T=t[2],E=t[3],s=t[4],x=t[5],e=t[6],r=t[7],d=t[8],h=t[9],a=t[10],l=t[11],n=t[12],u=t[13],f=t[14],o=t[15],c=h*f*r-u*a*r+u*e*l-x*f*l-h*e*o+x*a*o,p=n*a*r-d*f*r-n*e*l+s*f*l+d*e*o-s*a*o,v=d*u*r-n*h*r+n*x*l-s*u*l-d*x*o+s*h*o,m=n*h*e-d*u*e-n*x*a+s*u*a+d*x*f-s*h*f,S=i*c+y*p+T*v+E*m;if(S===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const M=1/S;return t[0]=c*M,t[1]=(u*a*E-h*f*E-u*T*l+y*f*l+h*T*o-y*a*o)*M,t[2]=(x*f*E-u*e*E+u*T*r-y*f*r-x*T*o+y*e*o)*M,t[3]=(h*e*E-x*a*E-h*T*r+y*a*r+x*T*l-y*e*l)*M,t[4]=p*M,t[5]=(d*f*E-n*a*E+n*T*l-i*f*l-d*T*o+i*a*o)*M,t[6]=(n*e*E-s*f*E-n*T*r+i*f*r+s*T*o-i*e*o)*M,t[7]=(s*a*E-d*e*E+d*T*r-i*a*r-s*T*l+i*e*l)*M,t[8]=v*M,t[9]=(n*h*E-d*u*E-n*y*l+i*u*l+d*y*o-i*h*o)*M,t[10]=(s*u*E-n*x*E+n*y*r-i*u*r-s*y*o+i*x*o)*M,t[11]=(d*x*E-s*h*E-d*y*r+i*h*r+s*y*l-i*x*l)*M,t[12]=m*M,t[13]=(d*u*T-n*h*T+n*y*a-i*u*a-d*y*f+i*h*f)*M,t[14]=(n*x*T-s*u*T-n*y*e+i*u*e+s*y*f-i*x*f)*M,t[15]=(s*h*T-d*x*T+d*y*e-i*h*e-s*y*a+i*x*a)*M,this}scale(t){const i=this.elements,y=t.x,T=t.y,E=t.z;return i[0]*=y,i[4]*=T,i[8]*=E,i[1]*=y,i[5]*=T,i[9]*=E,i[2]*=y,i[6]*=T,i[10]*=E,i[3]*=y,i[7]*=T,i[11]*=E,this}getMaxScaleOnAxis(){const t=this.elements,i=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],y=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],T=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(i,y,T))}makeTranslation(t,i,y){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,i,0,0,1,y,0,0,0,1),this}makeRotationX(t){const i=Math.cos(t),y=Math.sin(t);return this.set(1,0,0,0,0,i,-y,0,0,y,i,0,0,0,0,1),this}makeRotationY(t){const i=Math.cos(t),y=Math.sin(t);return this.set(i,0,y,0,0,1,0,0,-y,0,i,0,0,0,0,1),this}makeRotationZ(t){const i=Math.cos(t),y=Math.sin(t);return this.set(i,-y,0,0,y,i,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,i){const y=Math.cos(i),T=Math.sin(i),E=1-y,s=t.x,x=t.y,e=t.z,r=E*s,d=E*x;return this.set(r*s+y,r*x-T*e,r*e+T*x,0,r*x+T*e,d*x+y,d*e-T*s,0,r*e-T*x,d*e+T*s,E*e*e+y,0,0,0,0,1),this}makeScale(t,i,y){return this.set(t,0,0,0,0,i,0,0,0,0,y,0,0,0,0,1),this}makeShear(t,i,y,T,E,s){return this.set(1,y,E,0,t,1,s,0,i,T,1,0,0,0,0,1),this}compose(t,i,y){const T=this.elements,E=i._x,s=i._y,x=i._z,e=i._w,r=E+E,d=s+s,h=x+x,a=E*r,l=E*d,n=E*h,u=s*d,f=s*h,o=x*h,c=e*r,p=e*d,v=e*h,m=y.x,S=y.y,M=y.z;return T[0]=(1-(u+o))*m,T[1]=(l+v)*m,T[2]=(n-p)*m,T[3]=0,T[4]=(l-v)*S,T[5]=(1-(a+o))*S,T[6]=(f+c)*S,T[7]=0,T[8]=(n+p)*M,T[9]=(f-c)*M,T[10]=(1-(a+u))*M,T[11]=0,T[12]=t.x,T[13]=t.y,T[14]=t.z,T[15]=1,this}decompose(t,i,y){const T=this.elements;let E=mf.set(T[0],T[1],T[2]).length();const s=mf.set(T[4],T[5],T[6]).length(),x=mf.set(T[8],T[9],T[10]).length();this.determinant()<0&&(E=-E),t.x=T[12],t.y=T[13],t.z=T[14],_a.copy(this);const r=1/E,d=1/s,h=1/x;return _a.elements[0]*=r,_a.elements[1]*=r,_a.elements[2]*=r,_a.elements[4]*=d,_a.elements[5]*=d,_a.elements[6]*=d,_a.elements[8]*=h,_a.elements[9]*=h,_a.elements[10]*=h,i.setFromRotationMatrix(_a),y.x=E,y.y=s,y.z=x,this}makePerspective(t,i,y,T,E,s,x=Uo){const e=this.elements,r=2*E/(i-t),d=2*E/(y-T),h=(i+t)/(i-t),a=(y+T)/(y-T);let l,n;if(x===Uo)l=-(s+E)/(s-E),n=-2*s*E/(s-E);else if(x===Ud)l=-s/(s-E),n=-s*E/(s-E);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+x);return e[0]=r,e[4]=0,e[8]=h,e[12]=0,e[1]=0,e[5]=d,e[9]=a,e[13]=0,e[2]=0,e[6]=0,e[10]=l,e[14]=n,e[3]=0,e[7]=0,e[11]=-1,e[15]=0,this}makeOrthographic(t,i,y,T,E,s,x=Uo){const e=this.elements,r=1/(i-t),d=1/(y-T),h=1/(s-E),a=(i+t)*r,l=(y+T)*d;let n,u;if(x===Uo)n=(s+E)*h,u=-2*h;else if(x===Ud)n=E*h,u=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+x);return e[0]=2*r,e[4]=0,e[8]=0,e[12]=-a,e[1]=0,e[5]=2*d,e[9]=0,e[13]=-l,e[2]=0,e[6]=0,e[10]=u,e[14]=-n,e[3]=0,e[7]=0,e[11]=0,e[15]=1,this}equals(t){const i=this.elements,y=t.elements;for(let T=0;T<16;T++)if(i[T]!==y[T])return!1;return!0}fromArray(t,i=0){for(let y=0;y<16;y++)this.elements[y]=t[y+i];return this}toArray(t=[],i=0){const y=this.elements;return t[i]=y[0],t[i+1]=y[1],t[i+2]=y[2],t[i+3]=y[3],t[i+4]=y[4],t[i+5]=y[5],t[i+6]=y[6],t[i+7]=y[7],t[i+8]=y[8],t[i+9]=y[9],t[i+10]=y[10],t[i+11]=y[11],t[i+12]=y[12],t[i+13]=y[13],t[i+14]=y[14],t[i+15]=y[15],t}}const mf=new Ct,_a=new di,tN=new Ct(0,0,0),eN=new Ct(1,1,1),nh=new Ct,cv=new Ct,ta=new Ct,UT=new di,zT=new Is;class eo{constructor(t=0,i=0,y=0,T=eo.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=i,this._z=y,this._order=T}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,i,y,T=this._order){return this._x=t,this._y=i,this._z=y,this._order=T,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,i=this._order,y=!0){const T=t.elements,E=T[0],s=T[4],x=T[8],e=T[1],r=T[5],d=T[9],h=T[2],a=T[6],l=T[10];switch(i){case"XYZ":this._y=Math.asin($n(x,-1,1)),Math.abs(x)<.9999999?(this._x=Math.atan2(-d,l),this._z=Math.atan2(-s,E)):(this._x=Math.atan2(a,r),this._z=0);break;case"YXZ":this._x=Math.asin(-$n(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(x,l),this._z=Math.atan2(e,r)):(this._y=Math.atan2(-h,E),this._z=0);break;case"ZXY":this._x=Math.asin($n(a,-1,1)),Math.abs(a)<.9999999?(this._y=Math.atan2(-h,l),this._z=Math.atan2(-s,r)):(this._y=0,this._z=Math.atan2(e,E));break;case"ZYX":this._y=Math.asin(-$n(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(a,l),this._z=Math.atan2(e,E)):(this._x=0,this._z=Math.atan2(-s,r));break;case"YZX":this._z=Math.asin($n(e,-1,1)),Math.abs(e)<.9999999?(this._x=Math.atan2(-d,r),this._y=Math.atan2(-h,E)):(this._x=0,this._y=Math.atan2(x,l));break;case"XZY":this._z=Math.asin(-$n(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(a,r),this._y=Math.atan2(x,E)):(this._x=Math.atan2(-d,l),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,y===!0&&this._onChangeCallback(),this}setFromQuaternion(t,i,y){return UT.makeRotationFromQuaternion(t),this.setFromRotationMatrix(UT,i,y)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return zT.setFromEuler(this),this.setFromQuaternion(zT,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}eo.DEFAULT_ORDER="XYZ";class Cu{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let i=0;i1){for(let y=0;y0&&(T.userData=this.userData),T.layers=this.layers.mask,T.matrix=this.matrix.toArray(),T.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(T.matrixAutoUpdate=!1),this.isInstancedMesh&&(T.type="InstancedMesh",T.count=this.count,T.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(T.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(T.type="BatchedMesh",T.perObjectFrustumCulled=this.perObjectFrustumCulled,T.sortObjects=this.sortObjects,T.drawRanges=this._drawRanges,T.reservedRanges=this._reservedRanges,T.visibility=this._visibility,T.active=this._active,T.bounds=this._bounds.map(x=>({boxInitialized:x.boxInitialized,boxMin:x.box.min.toArray(),boxMax:x.box.max.toArray(),sphereInitialized:x.sphereInitialized,sphereRadius:x.sphere.radius,sphereCenter:x.sphere.center.toArray()})),T.maxGeometryCount=this._maxGeometryCount,T.maxVertexCount=this._maxVertexCount,T.maxIndexCount=this._maxIndexCount,T.geometryInitialized=this._geometryInitialized,T.geometryCount=this._geometryCount,T.matricesTexture=this._matricesTexture.toJSON(t),this.boundingSphere!==null&&(T.boundingSphere={center:T.boundingSphere.center.toArray(),radius:T.boundingSphere.radius}),this.boundingBox!==null&&(T.boundingBox={min:T.boundingBox.min.toArray(),max:T.boundingBox.max.toArray()}));function E(x,e){return x[e.uuid]===void 0&&(x[e.uuid]=e.toJSON(t)),e.uuid}if(this.isScene)this.background&&(this.background.isColor?T.background=this.background.toJSON():this.background.isTexture&&(T.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(T.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){T.geometry=E(t.geometries,this.geometry);const x=this.geometry.parameters;if(x!==void 0&&x.shapes!==void 0){const e=x.shapes;if(Array.isArray(e))for(let r=0,d=e.length;r0){T.children=[];for(let x=0;x0){T.animations=[];for(let x=0;x0&&(y.geometries=x),e.length>0&&(y.materials=e),r.length>0&&(y.textures=r),d.length>0&&(y.images=d),h.length>0&&(y.shapes=h),a.length>0&&(y.skeletons=a),l.length>0&&(y.animations=l),n.length>0&&(y.nodes=n)}return y.object=T,y;function s(x){const e=[];for(const r in x){const d=x[r];delete d.metadata,e.push(d)}return e}}clone(t){return new this.constructor().copy(this,t)}copy(t,i=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),i===!0)for(let y=0;y0?T.multiplyScalar(1/Math.sqrt(E)):T.set(0,0,0)}static getBarycoord(t,i,y,T,E){qa.subVectors(T,i),pl.subVectors(y,i),U0.subVectors(t,i);const s=qa.dot(qa),x=qa.dot(pl),e=qa.dot(U0),r=pl.dot(pl),d=pl.dot(U0),h=s*r-x*x;if(h===0)return E.set(0,0,0),null;const a=1/h,l=(r*e-x*d)*a,n=(s*d-x*e)*a;return E.set(1-l-n,n,l)}static containsPoint(t,i,y,T){return this.getBarycoord(t,i,y,T,vl)===null?!1:vl.x>=0&&vl.y>=0&&vl.x+vl.y<=1}static getInterpolation(t,i,y,T,E,s,x,e){return this.getBarycoord(t,i,y,T,vl)===null?(e.x=0,e.y=0,"z"in e&&(e.z=0),"w"in e&&(e.w=0),null):(e.setScalar(0),e.addScaledVector(E,vl.x),e.addScaledVector(s,vl.y),e.addScaledVector(x,vl.z),e)}static isFrontFacing(t,i,y,T){return qa.subVectors(y,i),pl.subVectors(t,i),qa.cross(pl).dot(T)<0}set(t,i,y){return this.a.copy(t),this.b.copy(i),this.c.copy(y),this}setFromPointsAndIndices(t,i,y,T){return this.a.copy(t[i]),this.b.copy(t[y]),this.c.copy(t[T]),this}setFromAttributeAndIndices(t,i,y,T){return this.a.fromBufferAttribute(t,i),this.b.fromBufferAttribute(t,y),this.c.fromBufferAttribute(t,T),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return qa.subVectors(this.c,this.b),pl.subVectors(this.a,this.b),qa.cross(pl).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return na.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,i){return na.getBarycoord(t,this.a,this.b,this.c,i)}getInterpolation(t,i,y,T,E){return na.getInterpolation(t,this.a,this.b,this.c,i,y,T,E)}containsPoint(t){return na.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return na.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,i){const y=this.a,T=this.b,E=this.c;let s,x;yf.subVectors(T,y),xf.subVectors(E,y),z0.subVectors(t,y);const e=yf.dot(z0),r=xf.dot(z0);if(e<=0&&r<=0)return i.copy(y);G0.subVectors(t,T);const d=yf.dot(G0),h=xf.dot(G0);if(d>=0&&h<=d)return i.copy(T);const a=e*h-d*r;if(a<=0&&e>=0&&d<=0)return s=e/(e-d),i.copy(y).addScaledVector(yf,s);V0.subVectors(t,E);const l=yf.dot(V0),n=xf.dot(V0);if(n>=0&&l<=n)return i.copy(E);const u=l*r-e*n;if(u<=0&&r>=0&&n<=0)return x=r/(r-n),i.copy(y).addScaledVector(xf,x);const f=d*n-l*h;if(f<=0&&h-d>=0&&l-n>=0)return XT.subVectors(E,T),x=(h-d)/(h-d+(l-n)),i.copy(T).addScaledVector(XT,x);const o=1/(f+u+a);return s=u*o,x=a*o,i.copy(y).addScaledVector(yf,s).addScaledVector(xf,x)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const T2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},rh={h:0,s:0,l:0},pv={h:0,s:0,l:0};function H0(g,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?g+(t-g)*6*i:i<1/2?t:i<2/3?g+(t-g)*6*(2/3-i):g}class Ge{constructor(t,i,y){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,i,y)}set(t,i,y){if(i===void 0&&y===void 0){const T=t;T&&T.isColor?this.copy(T):typeof T=="number"?this.setHex(T):typeof T=="string"&&this.setStyle(T)}else this.setRGB(t,i,y);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,i=mr){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,an.toWorkingColorSpace(this,i),this}setRGB(t,i,y,T=an.workingColorSpace){return this.r=t,this.g=i,this.b=y,an.toWorkingColorSpace(this,T),this}setHSL(t,i,y,T=an.workingColorSpace){if(t=T1(t,1),i=$n(i,0,1),y=$n(y,0,1),i===0)this.r=this.g=this.b=y;else{const E=y<=.5?y*(1+i):y+i-y*i,s=2*y-E;this.r=H0(s,E,t+1/3),this.g=H0(s,E,t),this.b=H0(s,E,t-1/3)}return an.toWorkingColorSpace(this,T),this}setStyle(t,i=mr){function y(E){E!==void 0&&parseFloat(E)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let T;if(T=/^(\w+)\(([^\)]*)\)/.exec(t)){let E;const s=T[1],x=T[2];switch(s){case"rgb":case"rgba":if(E=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(x))return y(E[4]),this.setRGB(Math.min(255,parseInt(E[1],10))/255,Math.min(255,parseInt(E[2],10))/255,Math.min(255,parseInt(E[3],10))/255,i);if(E=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(x))return y(E[4]),this.setRGB(Math.min(100,parseInt(E[1],10))/100,Math.min(100,parseInt(E[2],10))/100,Math.min(100,parseInt(E[3],10))/100,i);break;case"hsl":case"hsla":if(E=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(x))return y(E[4]),this.setHSL(parseFloat(E[1])/360,parseFloat(E[2])/100,parseFloat(E[3])/100,i);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(T=/^\#([A-Fa-f\d]+)$/.exec(t)){const E=T[1],s=E.length;if(s===3)return this.setRGB(parseInt(E.charAt(0),16)/15,parseInt(E.charAt(1),16)/15,parseInt(E.charAt(2),16)/15,i);if(s===6)return this.setHex(parseInt(E,16),i);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,i);return this}setColorName(t,i=mr){const y=T2[t.toLowerCase()];return y!==void 0?this.setHex(y,i):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Kf(t.r),this.g=Kf(t.g),this.b=Kf(t.b),this}copyLinearToSRGB(t){return this.r=b0(t.r),this.g=b0(t.g),this.b=b0(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=mr){return an.fromWorkingColorSpace(Kr.copy(this),t),Math.round($n(Kr.r*255,0,255))*65536+Math.round($n(Kr.g*255,0,255))*256+Math.round($n(Kr.b*255,0,255))}getHexString(t=mr){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,i=an.workingColorSpace){an.fromWorkingColorSpace(Kr.copy(this),i);const y=Kr.r,T=Kr.g,E=Kr.b,s=Math.max(y,T,E),x=Math.min(y,T,E);let e,r;const d=(x+s)/2;if(x===s)e=0,r=0;else{const h=s-x;switch(r=d<=.5?h/(s+x):h/(2-s-x),s){case y:e=(T-E)/h+(T0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(const i in t){const y=t[i];if(y===void 0){console.warn(`THREE.Material: parameter '${i}' has value of undefined.`);continue}const T=this[i];if(T===void 0){console.warn(`THREE.Material: '${i}' is not a property of THREE.${this.type}.`);continue}T&&T.isColor?T.set(y):T&&T.isVector3&&y&&y.isVector3?T.copy(y):this[i]=y}}toJSON(t){const i=t===void 0||typeof t=="string";i&&(t={textures:{},images:{}});const y={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};y.uuid=this.uuid,y.type=this.type,this.name!==""&&(y.name=this.name),this.color&&this.color.isColor&&(y.color=this.color.getHex()),this.roughness!==void 0&&(y.roughness=this.roughness),this.metalness!==void 0&&(y.metalness=this.metalness),this.sheen!==void 0&&(y.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(y.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(y.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(y.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(y.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(y.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(y.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(y.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(y.shininess=this.shininess),this.clearcoat!==void 0&&(y.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(y.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(y.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(y.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(y.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,y.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(y.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(y.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(y.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(y.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(y.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(y.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(y.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(y.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(y.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(y.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(y.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(y.lightMap=this.lightMap.toJSON(t).uuid,y.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(y.aoMap=this.aoMap.toJSON(t).uuid,y.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(y.bumpMap=this.bumpMap.toJSON(t).uuid,y.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(y.normalMap=this.normalMap.toJSON(t).uuid,y.normalMapType=this.normalMapType,y.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(y.displacementMap=this.displacementMap.toJSON(t).uuid,y.displacementScale=this.displacementScale,y.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(y.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(y.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(y.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(y.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(y.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(y.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(y.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(y.combine=this.combine)),this.envMapIntensity!==void 0&&(y.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(y.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(y.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(y.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(y.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(y.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(y.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(y.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(y.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(y.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(y.size=this.size),this.shadowSide!==null&&(y.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(y.sizeAttenuation=this.sizeAttenuation),this.blending!==Tu&&(y.blending=this.blending),this.side!==Al&&(y.side=this.side),this.vertexColors===!0&&(y.vertexColors=!0),this.opacity<1&&(y.opacity=this.opacity),this.transparent===!0&&(y.transparent=!0),this.blendSrc!==Am&&(y.blendSrc=this.blendSrc),this.blendDst!==Pm&&(y.blendDst=this.blendDst),this.blendEquation!==hh&&(y.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(y.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(y.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(y.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(y.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(y.blendAlpha=this.blendAlpha),this.depthFunc!==wd&&(y.depthFunc=this.depthFunc),this.depthTest===!1&&(y.depthTest=this.depthTest),this.depthWrite===!1&&(y.depthWrite=this.depthWrite),this.colorWrite===!1&&(y.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(y.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Ex&&(y.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(y.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(y.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==fu&&(y.stencilFail=this.stencilFail),this.stencilZFail!==fu&&(y.stencilZFail=this.stencilZFail),this.stencilZPass!==fu&&(y.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(y.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(y.rotation=this.rotation),this.polygonOffset===!0&&(y.polygonOffset=!0),this.polygonOffsetFactor!==0&&(y.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(y.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(y.linewidth=this.linewidth),this.dashSize!==void 0&&(y.dashSize=this.dashSize),this.gapSize!==void 0&&(y.gapSize=this.gapSize),this.scale!==void 0&&(y.scale=this.scale),this.dithering===!0&&(y.dithering=!0),this.alphaTest>0&&(y.alphaTest=this.alphaTest),this.alphaHash===!0&&(y.alphaHash=!0),this.alphaToCoverage===!0&&(y.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(y.premultipliedAlpha=!0),this.forceSinglePass===!0&&(y.forceSinglePass=!0),this.wireframe===!0&&(y.wireframe=!0),this.wireframeLinewidth>1&&(y.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(y.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(y.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(y.flatShading=!0),this.visible===!1&&(y.visible=!1),this.toneMapped===!1&&(y.toneMapped=!1),this.fog===!1&&(y.fog=!1),Object.keys(this.userData).length>0&&(y.userData=this.userData);function T(E){const s=[];for(const x in E){const e=E[x];delete e.metadata,s.push(e)}return s}if(i){const E=T(t.textures),s=T(t.images);E.length>0&&(y.textures=E),s.length>0&&(y.images=s)}return y}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const i=t.clippingPlanes;let y=null;if(i!==null){const T=i.length;y=new Array(T);for(let E=0;E!==T;++E)y[E]=i[E].clone()}return this.clippingPlanes=y,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}}class Eh extends Wr{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Ge(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=qd,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const xl=lN();function lN(){const g=new ArrayBuffer(4),t=new Float32Array(g),i=new Uint32Array(g),y=new Uint32Array(512),T=new Uint32Array(512);for(let e=0;e<256;++e){const r=e-127;r<-27?(y[e]=0,y[e|256]=32768,T[e]=24,T[e|256]=24):r<-14?(y[e]=1024>>-r-14,y[e|256]=1024>>-r-14|32768,T[e]=-r-1,T[e|256]=-r-1):r<=15?(y[e]=r+15<<10,y[e|256]=r+15<<10|32768,T[e]=13,T[e|256]=13):r<128?(y[e]=31744,y[e|256]=64512,T[e]=24,T[e|256]=24):(y[e]=31744,y[e|256]=64512,T[e]=13,T[e|256]=13)}const E=new Uint32Array(2048),s=new Uint32Array(64),x=new Uint32Array(64);for(let e=1;e<1024;++e){let r=e<<13,d=0;for(;!(r&8388608);)r<<=1,d-=8388608;r&=-8388609,d+=947912704,E[e]=r|d}for(let e=1024;e<2048;++e)E[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)s[e]=e<<23;s[31]=1199570944,s[32]=2147483648;for(let e=33;e<63;++e)s[e]=2147483648+(e-32<<23);s[63]=3347054592;for(let e=1;e<64;++e)e!==32&&(x[e]=1024);return{floatView:t,uint32View:i,baseTable:y,shiftTable:T,mantissaTable:E,exponentTable:s,offsetTable:x}}function Ds(g){Math.abs(g)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),g=$n(g,-65504,65504),xl.floatView[0]=g;const t=xl.uint32View[0],i=t>>23&511;return xl.baseTable[i]+((t&8388607)>>xl.shiftTable[i])}function ld(g){const t=g>>10;return xl.uint32View[0]=xl.mantissaTable[xl.offsetTable[t]+(g&1023)]+xl.exponentTable[t],xl.floatView[0]}const hN={toHalfFloat:Ds,fromHalfFloat:ld},fr=new Ct,vv=new ve;class ln{constructor(t,i,y=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=i,this.count=t!==void 0?t.length/i:0,this.normalized=y,this.usage=Bd,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ma,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return Mu("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,i){this.updateRanges.push({start:t,count:i})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,i,y){t*=this.itemSize,y*=i.itemSize;for(let T=0,E=this.itemSize;T0&&(t.userData=this.userData),this.parameters!==void 0){const e=this.parameters;for(const r in e)e[r]!==void 0&&(t[r]=e[r]);return t}t.data={attributes:{}};const i=this.index;i!==null&&(t.data.index={type:i.array.constructor.name,array:Array.prototype.slice.call(i.array)});const y=this.attributes;for(const e in y){const r=y[e];t.data.attributes[e]=r.toJSON(t.data)}const T={};let E=!1;for(const e in this.morphAttributes){const r=this.morphAttributes[e],d=[];for(let h=0,a=r.length;h0&&(T[e]=d,E=!0)}E&&(t.data.morphAttributes=T,t.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));const x=this.boundingSphere;return x!==null&&(t.data.boundingSphere={center:x.center.toArray(),radius:x.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const i={};this.name=t.name;const y=t.index;y!==null&&this.setIndex(y.clone(i));const T=t.attributes;for(const r in T){const d=T[r];this.setAttribute(r,d.clone(i))}const E=t.morphAttributes;for(const r in E){const d=[],h=E[r];for(let a=0,l=h.length;a0){const T=i[y[0]];if(T!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,s=T.length;E(t.far-t.near)**2))&&(YT.copy(E).invert(),tu.copy(t.ray).applyMatrix4(YT),!(y.boundingBox!==null&&tu.intersectsBox(y.boundingBox)===!1)&&this._computeIntersections(t,i,tu)))}_computeIntersections(t,i,y){let T;const E=this.geometry,s=this.material,x=E.index,e=E.attributes.position,r=E.attributes.uv,d=E.attributes.uv1,h=E.attributes.normal,a=E.groups,l=E.drawRange;if(x!==null)if(Array.isArray(s))for(let n=0,u=a.length;ni.far?null:{distance:r,point:Ev.clone(),object:g}}function Mv(g,t,i,y,T,E,s,x,e,r){g.getVertexPosition(x,Tf),g.getVertexPosition(e,Ef),g.getVertexPosition(r,Mf);const d=yN(g,t,i,y,Tf,Ef,Mf,Tv);if(d){T&&(yv.fromBufferAttribute(T,x),xv.fromBufferAttribute(T,e),Sv.fromBufferAttribute(T,r),d.uv=na.getInterpolation(Tv,Tf,Ef,Mf,yv,xv,Sv,new ve)),E&&(yv.fromBufferAttribute(E,x),xv.fromBufferAttribute(E,e),Sv.fromBufferAttribute(E,r),d.uv1=na.getInterpolation(Tv,Tf,Ef,Mf,yv,xv,Sv,new ve),d.uv2=d.uv1),s&&(jT.fromBufferAttribute(s,x),KT.fromBufferAttribute(s,e),$T.fromBufferAttribute(s,r),d.normal=na.getInterpolation(Tv,Tf,Ef,Mf,jT,KT,$T,new Ct),d.normal.dot(y.direction)>0&&d.normal.multiplyScalar(-1));const h={a:x,b:e,c:r,normal:new Ct,materialIndex:0};na.getNormal(Tf,Ef,Mf,h.normal),d.face=h}return d}class Bu extends Fi{constructor(t=1,i=1,y=1,T=1,E=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:i,depth:y,widthSegments:T,heightSegments:E,depthSegments:s};const x=this;T=Math.floor(T),E=Math.floor(E),s=Math.floor(s);const e=[],r=[],d=[],h=[];let a=0,l=0;n("z","y","x",-1,-1,y,i,t,s,E,0),n("z","y","x",1,-1,y,i,-t,s,E,1),n("x","z","y",1,1,t,y,i,T,s,2),n("x","z","y",1,-1,t,y,-i,T,s,3),n("x","y","z",1,-1,t,i,y,T,E,4),n("x","y","z",-1,-1,t,i,-y,T,E,5),this.setIndex(e),this.setAttribute("position",new je(r,3)),this.setAttribute("normal",new je(d,3)),this.setAttribute("uv",new je(h,2));function n(u,f,o,c,p,v,m,S,M,w,C){const A=v/M,P=m/w,b=v/2,O=m/2,I=S/2,D=M+1,B=w+1;let G=0,z=0;const X=new Ct;for(let j=0;j0?1:-1,d.push(X.x,X.y,X.z),h.push(tt/M),h.push(1-j/w),G+=1}}for(let j=0;j0&&(i.defines=this.defines),i.vertexShader=this.vertexShader,i.fragmentShader=this.fragmentShader,i.lights=this.lights,i.clipping=this.clipping;const x={};for(const T in this.extensions)this.extensions[T]===!0&&(x[T]=!0);return Object.keys(x).length>0&&(i.extensions=x),i}}class tp extends ki{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new di,this.projectionMatrix=new di,this.projectionMatrixInverse=new di,this.coordinateSystem=Uo}copy(t,i){return super.copy(t,i),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,i){super.updateWorldMatrix(t,i),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const ah=new Ct,KT=new ve,ZT=new ve;class Dr extends tp{constructor(t=50,i=1,x=.1,T=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=x,this.far=T,this.focus=10,this.aspect=i,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,i){return super.copy(t,i),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const i=.5*this.getFilmHeight()/t;this.fov=tc*2*Math.atan(i),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(Eu*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return tc*2*Math.atan(Math.tan(Eu*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,i,x){ah.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(ah.x,ah.y).multiplyScalar(-t/ah.z),ah.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),x.set(ah.x,ah.y).multiplyScalar(-t/ah.z)}getViewSize(t,i){return this.getViewBounds(t,KT,ZT),i.subVectors(ZT,KT)}setViewOffset(t,i,x,T,E,s){this.aspect=t/i,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=i,this.view.offsetX=x,this.view.offsetY=T,this.view.width=E,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let i=t*Math.tan(Eu*.5*this.fov)/this.zoom,x=2*i,T=this.aspect*x,E=-.5*T;const s=this.view;if(this.view!==null&&this.view.enabled){const e=s.fullWidth,r=s.fullHeight;E+=s.offsetX*T/e,i-=s.offsetY*x/r,T*=s.width/e,x*=s.height/r}const y=this.filmOffset;y!==0&&(E+=t*y/this.getFilmWidth()),this.projectionMatrix.makePerspective(E,E+T,i,i-x,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const i=super.toJSON(t);return i.object.fov=this.fov,i.object.zoom=this.zoom,i.object.near=this.near,i.object.far=this.far,i.object.focus=this.focus,i.object.aspect=this.aspect,this.view!==null&&(i.object.view=Object.assign({},this.view)),i.object.filmGauge=this.filmGauge,i.object.filmOffset=this.filmOffset,i}}const Cf=-90,wf=1;class E2 extends ki{constructor(t,i,x){super(),this.type="CubeCamera",this.renderTarget=x,this.coordinateSystem=null,this.activeMipmapLevel=0;const T=new Dr(Cf,wf,t,i);T.layers=this.layers,this.add(T);const E=new Dr(Cf,wf,t,i);E.layers=this.layers,this.add(E);const s=new Dr(Cf,wf,t,i);s.layers=this.layers,this.add(s);const y=new Dr(Cf,wf,t,i);y.layers=this.layers,this.add(y);const e=new Dr(Cf,wf,t,i);e.layers=this.layers,this.add(e);const r=new Dr(Cf,wf,t,i);r.layers=this.layers,this.add(r)}updateCoordinateSystem(){const t=this.coordinateSystem,i=this.children.concat(),[x,T,E,s,y,e]=i;for(const r of i)this.remove(r);if(t===Uo)x.up.set(0,1,0),x.lookAt(1,0,0),T.up.set(0,1,0),T.lookAt(-1,0,0),E.up.set(0,0,-1),E.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),y.up.set(0,1,0),y.lookAt(0,0,1),e.up.set(0,1,0),e.lookAt(0,0,-1);else if(t===Bd)x.up.set(0,-1,0),x.lookAt(-1,0,0),T.up.set(0,-1,0),T.lookAt(1,0,0),E.up.set(0,0,1),E.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),y.up.set(0,-1,0),y.lookAt(0,0,1),e.up.set(0,-1,0),e.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);for(const r of i)this.add(r),r.updateMatrixWorld()}update(t,i){this.parent===null&&this.updateMatrixWorld();const{renderTarget:x,activeMipmapLevel:T}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[E,s,y,e,r,d]=this.children,h=t.getRenderTarget(),a=t.getActiveCubeFace(),l=t.getActiveMipmapLevel(),n=t.xr.enabled;t.xr.enabled=!1;const u=x.texture.generateMipmaps;x.texture.generateMipmaps=!1,t.setRenderTarget(x,0,T),t.render(i,E),t.setRenderTarget(x,1,T),t.render(i,s),t.setRenderTarget(x,2,T),t.render(i,y),t.setRenderTarget(x,3,T),t.render(i,e),t.setRenderTarget(x,4,T),t.render(i,r),x.texture.generateMipmaps=u,t.setRenderTarget(x,5,T),t.render(i,d),t.setRenderTarget(h,a,l),t.xr.enabled=n,x.texture.needsPMREMUpdate=!0}}class ep extends zn{constructor(t,i,x,T,E,s,y,e,r,d){t=t!==void 0?t:[],i=i!==void 0?i:Rl,super(t,i,x,T,E,s,y,e,r,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class M2 extends ro{constructor(t=1,i={}){super(t,t,i),this.isWebGLCubeRenderTarget=!0;const x={width:t,height:t,depth:1},T=[x,x,x,x,x,x];i.encoding!==void 0&&(Mu("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===mh?mr:ia),this.texture=new ep(T,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=i.generateMipmaps!==void 0?i.generateMipmaps:!1,this.texture.minFilter=i.minFilter!==void 0?i.minFilter:Bn}fromEquirectangularTexture(t,i){this.texture.type=i.type,this.texture.colorSpace=i.colorSpace,this.texture.generateMipmaps=i.generateMipmaps,this.texture.minFilter=i.minFilter,this.texture.magFilter=i.magFilter;const x={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class so extends Wr{constructor(t){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=SN,this.fragmentShader=TN,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1,clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,t!==void 0&&this.setValues(t)}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=tc(t.uniforms),this.uniformsGroups=xN(t.uniformsGroups),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.fog=t.fog,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this}toJSON(t){const i=super.toJSON(t);i.glslVersion=this.glslVersion,i.uniforms={};for(const T in this.uniforms){const s=this.uniforms[T].value;s&&s.isTexture?i.uniforms[T]={type:"t",value:s.toJSON(t).uuid}:s&&s.isColor?i.uniforms[T]={type:"c",value:s.getHex()}:s&&s.isVector2?i.uniforms[T]={type:"v2",value:s.toArray()}:s&&s.isVector3?i.uniforms[T]={type:"v3",value:s.toArray()}:s&&s.isVector4?i.uniforms[T]={type:"v4",value:s.toArray()}:s&&s.isMatrix3?i.uniforms[T]={type:"m3",value:s.toArray()}:s&&s.isMatrix4?i.uniforms[T]={type:"m4",value:s.toArray()}:i.uniforms[T]={value:s}}Object.keys(this.defines).length>0&&(i.defines=this.defines),i.vertexShader=this.vertexShader,i.fragmentShader=this.fragmentShader,i.lights=this.lights,i.clipping=this.clipping;const y={};for(const T in this.extensions)this.extensions[T]===!0&&(y[T]=!0);return Object.keys(y).length>0&&(i.extensions=y),i}}class ep extends ki{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new di,this.projectionMatrix=new di,this.projectionMatrixInverse=new di,this.coordinateSystem=Uo}copy(t,i){return super.copy(t,i),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,i){super.updateWorldMatrix(t,i),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const sh=new Ct,ZT=new ve,JT=new ve;class Dr extends ep{constructor(t=50,i=1,y=.1,T=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=y,this.far=T,this.focus=10,this.aspect=i,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,i){return super.copy(t,i),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const i=.5*this.getFilmHeight()/t;this.fov=qf*2*Math.atan(i),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(Eu*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return qf*2*Math.atan(Math.tan(Eu*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,i,y){sh.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(sh.x,sh.y).multiplyScalar(-t/sh.z),sh.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),y.set(sh.x,sh.y).multiplyScalar(-t/sh.z)}getViewSize(t,i){return this.getViewBounds(t,ZT,JT),i.subVectors(JT,ZT)}setViewOffset(t,i,y,T,E,s){this.aspect=t/i,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=i,this.view.offsetX=y,this.view.offsetY=T,this.view.width=E,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let i=t*Math.tan(Eu*.5*this.fov)/this.zoom,y=2*i,T=this.aspect*y,E=-.5*T;const s=this.view;if(this.view!==null&&this.view.enabled){const e=s.fullWidth,r=s.fullHeight;E+=s.offsetX*T/e,i-=s.offsetY*y/r,T*=s.width/e,y*=s.height/r}const x=this.filmOffset;x!==0&&(E+=t*x/this.getFilmWidth()),this.projectionMatrix.makePerspective(E,E+T,i,i-y,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const i=super.toJSON(t);return i.object.fov=this.fov,i.object.zoom=this.zoom,i.object.near=this.near,i.object.far=this.far,i.object.focus=this.focus,i.object.aspect=this.aspect,this.view!==null&&(i.object.view=Object.assign({},this.view)),i.object.filmGauge=this.filmGauge,i.object.filmOffset=this.filmOffset,i}}const Cf=-90,wf=1;class C2 extends ki{constructor(t,i,y){super(),this.type="CubeCamera",this.renderTarget=y,this.coordinateSystem=null,this.activeMipmapLevel=0;const T=new Dr(Cf,wf,t,i);T.layers=this.layers,this.add(T);const E=new Dr(Cf,wf,t,i);E.layers=this.layers,this.add(E);const s=new Dr(Cf,wf,t,i);s.layers=this.layers,this.add(s);const x=new Dr(Cf,wf,t,i);x.layers=this.layers,this.add(x);const e=new Dr(Cf,wf,t,i);e.layers=this.layers,this.add(e);const r=new Dr(Cf,wf,t,i);r.layers=this.layers,this.add(r)}updateCoordinateSystem(){const t=this.coordinateSystem,i=this.children.concat(),[y,T,E,s,x,e]=i;for(const r of i)this.remove(r);if(t===Uo)y.up.set(0,1,0),y.lookAt(1,0,0),T.up.set(0,1,0),T.lookAt(-1,0,0),E.up.set(0,0,-1),E.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),x.up.set(0,1,0),x.lookAt(0,0,1),e.up.set(0,1,0),e.lookAt(0,0,-1);else if(t===Ud)y.up.set(0,-1,0),y.lookAt(-1,0,0),T.up.set(0,-1,0),T.lookAt(1,0,0),E.up.set(0,0,1),E.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),x.up.set(0,-1,0),x.lookAt(0,0,1),e.up.set(0,-1,0),e.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);for(const r of i)this.add(r),r.updateMatrixWorld()}update(t,i){this.parent===null&&this.updateMatrixWorld();const{renderTarget:y,activeMipmapLevel:T}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[E,s,x,e,r,d]=this.children,h=t.getRenderTarget(),a=t.getActiveCubeFace(),l=t.getActiveMipmapLevel(),n=t.xr.enabled;t.xr.enabled=!1;const u=y.texture.generateMipmaps;y.texture.generateMipmaps=!1,t.setRenderTarget(y,0,T),t.render(i,E),t.setRenderTarget(y,1,T),t.render(i,s),t.setRenderTarget(y,2,T),t.render(i,x),t.setRenderTarget(y,3,T),t.render(i,e),t.setRenderTarget(y,4,T),t.render(i,r),y.texture.generateMipmaps=u,t.setRenderTarget(y,5,T),t.render(i,d),t.setRenderTarget(h,a,l),t.xr.enabled=n,y.texture.needsPMREMUpdate=!0}}class ip extends zn{constructor(t,i,y,T,E,s,x,e,r,d){t=t!==void 0?t:[],i=i!==void 0?i:Pl,super(t,i,y,T,E,s,x,e,r,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class w2 extends ro{constructor(t=1,i={}){super(t,t,i),this.isWebGLCubeRenderTarget=!0;const y={width:t,height:t,depth:1},T=[y,y,y,y,y,y];i.encoding!==void 0&&(Mu("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===vh?mr:ia),this.texture=new ip(T,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=i.generateMipmaps!==void 0?i.generateMipmaps:!1,this.texture.minFilter=i.minFilter!==void 0?i.minFilter:Bn}fromEquirectangularTexture(t,i){this.texture.type=i.type,this.texture.colorSpace=i.colorSpace,this.texture.generateMipmaps=i.generateMipmaps,this.texture.minFilter=i.minFilter,this.texture.magFilter=i.magFilter;const y={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -6445,9 +6447,9 @@ ${t.stack}`):console.error(`[DEBUG] ${Mm(g)}`))},_e={enable:KI,disable:ZI,isEnab gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},T=new Bu(5,5,5),E=new so({name:"CubemapFromEquirect",uniforms:ec(x.uniforms),vertexShader:x.vertexShader,fragmentShader:x.fragmentShader,side:gs,blending:Al});E.uniforms.tEquirect.value=i;const s=new dr(T,E),y=i.minFilter;return i.minFilter===Bo&&(i.minFilter=Bn),new E2(1,10,this).update(t,s),i.minFilter=y,s.geometry.dispose(),s.material.dispose(),this}clear(t,i,x,T){const E=t.getRenderTarget();for(let s=0;s<6;s++)t.setRenderTarget(this,s),t.clear(i,x,T);t.setRenderTarget(E)}}const W0=new Ct,CN=new Ct,wN=new Di;class hh{constructor(t=new Ct(1,0,0),i=0){this.isPlane=!0,this.normal=t,this.constant=i}set(t,i){return this.normal.copy(t),this.constant=i,this}setComponents(t,i,x,T){return this.normal.set(t,i,x),this.constant=T,this}setFromNormalAndCoplanarPoint(t,i){return this.normal.copy(t),this.constant=-i.dot(this.normal),this}setFromCoplanarPoints(t,i,x){const T=W0.subVectors(x,i).cross(CN.subVectors(t,i)).normalize();return this.setFromNormalAndCoplanarPoint(T,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,i){return i.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,i){const x=t.delta(W0),T=this.normal.dot(x);if(T===0)return this.distanceToPoint(t.start)===0?i.copy(t.start):null;const E=-(t.start.dot(this.normal)+this.constant)/T;return E<0||E>1?null:i.copy(t.start).addScaledVector(x,E)}intersectsLine(t){const i=this.distanceToPoint(t.start),x=this.distanceToPoint(t.end);return i<0&&x>0||x<0&&i>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,i){const x=i||wN.getNormalMatrix(t),T=this.coplanarPoint(W0).applyMatrix4(t),E=this.normal.applyMatrix3(x).normalize();return this.constant=-T.dot(E),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}}const iu=new Qr,Mv=new Ct;class ip{constructor(t=new hh,i=new hh,x=new hh,T=new hh,E=new hh,s=new hh){this.planes=[t,i,x,T,E,s]}set(t,i,x,T,E,s){const y=this.planes;return y[0].copy(t),y[1].copy(i),y[2].copy(x),y[3].copy(T),y[4].copy(E),y[5].copy(s),this}copy(t){const i=this.planes;for(let x=0;x<6;x++)i[x].copy(t.planes[x]);return this}setFromProjectionMatrix(t,i=Uo){const x=this.planes,T=t.elements,E=T[0],s=T[1],y=T[2],e=T[3],r=T[4],d=T[5],h=T[6],a=T[7],l=T[8],n=T[9],u=T[10],f=T[11],o=T[12],c=T[13],p=T[14],v=T[15];if(x[0].setComponents(e-E,a-r,f-l,v-o).normalize(),x[1].setComponents(e+E,a+r,f+l,v+o).normalize(),x[2].setComponents(e+s,a+d,f+n,v+c).normalize(),x[3].setComponents(e-s,a-d,f-n,v-c).normalize(),x[4].setComponents(e-y,a-h,f-u,v-p).normalize(),i===Uo)x[5].setComponents(e+y,a+h,f+u,v+p).normalize();else if(i===Bd)x[5].setComponents(y,h,u,p).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+i);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),iu.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const i=t.geometry;i.boundingSphere===null&&i.computeBoundingSphere(),iu.copy(i.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(iu)}intersectsSprite(t){return iu.center.set(0,0,0),iu.radius=.7071067811865476,iu.applyMatrix4(t.matrixWorld),this.intersectsSphere(iu)}intersectsSphere(t){const i=this.planes,x=t.center,T=-t.radius;for(let E=0;E<6;E++)if(i[E].distanceToPoint(x)0?t.max.x:t.min.x,Mv.y=T.normal.y>0?t.max.y:t.min.y,Mv.z=T.normal.z>0?t.max.z:t.min.z,T.distanceToPoint(Mv)<0)return!1}return!0}containsPoint(t){const i=this.planes;for(let x=0;x<6;x++)if(i[x].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function C2(){let g=null,t=!1,i=null,x=null;function T(E,s){i(E,s),x=g.requestAnimationFrame(T)}return{start:function(){t!==!0&&i!==null&&(x=g.requestAnimationFrame(T),t=!0)},stop:function(){g.cancelAnimationFrame(x),t=!1},setAnimationLoop:function(E){i=E},setContext:function(E){g=E}}}function AN(g,t){const i=t.isWebGL2,x=new WeakMap;function T(r,d){const h=r.array,a=r.usage,l=h.byteLength,n=g.createBuffer();g.bindBuffer(d,n),g.bufferData(d,h,a),r.onUploadCallback();let u;if(h instanceof Float32Array)u=g.FLOAT;else if(h instanceof Uint16Array)if(r.isFloat16BufferAttribute)if(i)u=g.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else u=g.UNSIGNED_SHORT;else if(h instanceof Int16Array)u=g.SHORT;else if(h instanceof Uint32Array)u=g.UNSIGNED_INT;else if(h instanceof Int32Array)u=g.INT;else if(h instanceof Int8Array)u=g.BYTE;else if(h instanceof Uint8Array)u=g.UNSIGNED_BYTE;else if(h instanceof Uint8ClampedArray)u=g.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+h);return{buffer:n,type:u,bytesPerElement:h.BYTES_PER_ELEMENT,version:r.version,size:l}}function E(r,d,h){const a=d.array,l=d._updateRange,n=d.updateRanges;if(g.bindBuffer(h,r),l.count===-1&&n.length===0&&g.bufferSubData(h,0,a),n.length!==0){for(let u=0,f=n.length;u1?null:i.copy(t.start).addScaledVector(y,E)}intersectsLine(t){const i=this.distanceToPoint(t.start),y=this.distanceToPoint(t.end);return i<0&&y>0||y<0&&i>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,i){const y=i||MN.getNormalMatrix(t),T=this.coplanarPoint(Y0).applyMatrix4(t),E=this.normal.applyMatrix3(y).normalize();return this.constant=-T.dot(E),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}}const eu=new Qr,Cv=new Ct;class np{constructor(t=new lh,i=new lh,y=new lh,T=new lh,E=new lh,s=new lh){this.planes=[t,i,y,T,E,s]}set(t,i,y,T,E,s){const x=this.planes;return x[0].copy(t),x[1].copy(i),x[2].copy(y),x[3].copy(T),x[4].copy(E),x[5].copy(s),this}copy(t){const i=this.planes;for(let y=0;y<6;y++)i[y].copy(t.planes[y]);return this}setFromProjectionMatrix(t,i=Uo){const y=this.planes,T=t.elements,E=T[0],s=T[1],x=T[2],e=T[3],r=T[4],d=T[5],h=T[6],a=T[7],l=T[8],n=T[9],u=T[10],f=T[11],o=T[12],c=T[13],p=T[14],v=T[15];if(y[0].setComponents(e-E,a-r,f-l,v-o).normalize(),y[1].setComponents(e+E,a+r,f+l,v+o).normalize(),y[2].setComponents(e+s,a+d,f+n,v+c).normalize(),y[3].setComponents(e-s,a-d,f-n,v-c).normalize(),y[4].setComponents(e-x,a-h,f-u,v-p).normalize(),i===Uo)y[5].setComponents(e+x,a+h,f+u,v+p).normalize();else if(i===Ud)y[5].setComponents(x,h,u,p).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+i);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),eu.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const i=t.geometry;i.boundingSphere===null&&i.computeBoundingSphere(),eu.copy(i.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(eu)}intersectsSprite(t){return eu.center.set(0,0,0),eu.radius=.7071067811865476,eu.applyMatrix4(t.matrixWorld),this.intersectsSphere(eu)}intersectsSphere(t){const i=this.planes,y=t.center,T=-t.radius;for(let E=0;E<6;E++)if(i[E].distanceToPoint(y)0?t.max.x:t.min.x,Cv.y=T.normal.y>0?t.max.y:t.min.y,Cv.z=T.normal.z>0?t.max.z:t.min.z,T.distanceToPoint(Cv)<0)return!1}return!0}containsPoint(t){const i=this.planes;for(let y=0;y<6;y++)if(i[y].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function A2(){let g=null,t=!1,i=null,y=null;function T(E,s){i(E,s),y=g.requestAnimationFrame(T)}return{start:function(){t!==!0&&i!==null&&(y=g.requestAnimationFrame(T),t=!0)},stop:function(){g.cancelAnimationFrame(y),t=!1},setAnimationLoop:function(E){i=E},setContext:function(E){g=E}}}function CN(g,t){const i=t.isWebGL2,y=new WeakMap;function T(r,d){const h=r.array,a=r.usage,l=h.byteLength,n=g.createBuffer();g.bindBuffer(d,n),g.bufferData(d,h,a),r.onUploadCallback();let u;if(h instanceof Float32Array)u=g.FLOAT;else if(h instanceof Uint16Array)if(r.isFloat16BufferAttribute)if(i)u=g.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else u=g.UNSIGNED_SHORT;else if(h instanceof Int16Array)u=g.SHORT;else if(h instanceof Uint32Array)u=g.UNSIGNED_INT;else if(h instanceof Int32Array)u=g.INT;else if(h instanceof Int8Array)u=g.BYTE;else if(h instanceof Uint8Array)u=g.UNSIGNED_BYTE;else if(h instanceof Uint8ClampedArray)u=g.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+h);return{buffer:n,type:u,bytesPerElement:h.BYTES_PER_ELEMENT,version:r.version,size:l}}function E(r,d,h){const a=d.array,l=d._updateRange,n=d.updateRanges;if(g.bindBuffer(h,r),l.count===-1&&n.length===0&&g.bufferSubData(h,0,a),n.length!==0){for(let u=0,f=n.length;u 0 +#endif`,VN=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #ifdef ALPHA_TO_COVERAGE float distanceToPlane, distanceGradient; @@ -6677,26 +6679,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve if ( clipped ) discard; #endif #endif -#endif`,XN=`#if NUM_CLIPPING_PLANES > 0 +#endif`,HN=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,YN=`#if NUM_CLIPPING_PLANES > 0 +#endif`,WN=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,kN=`#if NUM_CLIPPING_PLANES > 0 +#endif`,XN=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,jN=`#if defined( USE_COLOR_ALPHA ) +#endif`,YN=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,KN=`#if defined( USE_COLOR_ALPHA ) +#endif`,kN=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,ZN=`#if defined( USE_COLOR_ALPHA ) +#endif`,jN=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,$N=`#if defined( USE_COLOR_ALPHA ) +#endif`,KN=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -6706,7 +6708,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,JN=`#define PI 3.141592653589793 +#endif`,$N=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -6784,7 +6786,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,QN=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,ZN=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -6877,7 +6879,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,_N=`vec3 transformedNormal = objectNormal; +#endif`,JN=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -6906,18 +6908,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,qN=`#ifdef USE_DISPLACEMENTMAP +#endif`,QN=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,t9=`#ifdef USE_DISPLACEMENTMAP +#endif`,_N=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,e9=`#ifdef USE_EMISSIVEMAP +#endif`,qN=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,i9=`#ifdef USE_EMISSIVEMAP +#endif`,t9=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,n9="gl_FragColor = linearToOutputTexel( gl_FragColor );",r9=` +#endif`,e9="gl_FragColor = linearToOutputTexel( gl_FragColor );",i9=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -6945,7 +6947,7 @@ vec4 LinearToLinear( in vec4 value ) { } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); -}`,s9=`#ifdef USE_ENVMAP +}`,n9=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -6974,7 +6976,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,a9=`#ifdef USE_ENVMAP +#endif`,r9=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; #ifdef ENVMAP_TYPE_CUBE @@ -6983,7 +6985,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,o9=`#ifdef USE_ENVMAP +#endif`,s9=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -6994,7 +6996,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,l9=`#ifdef USE_ENVMAP +#endif`,a9=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -7005,7 +7007,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,h9=`#ifdef USE_ENVMAP +#endif`,o9=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -7022,18 +7024,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,u9=`#ifdef USE_FOG +#endif`,l9=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,f9=`#ifdef USE_FOG +#endif`,h9=`#ifdef USE_FOG varying float vFogDepth; -#endif`,c9=`#ifdef USE_FOG +#endif`,u9=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,d9=`#ifdef USE_FOG +#endif`,f9=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -7042,7 +7044,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,p9=`#ifdef USE_GRADIENTMAP +#endif`,c9=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -7054,16 +7056,16 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,v9=`#ifdef USE_LIGHTMAP +}`,d9=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,m9=`#ifdef USE_LIGHTMAP +#endif`,p9=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,g9=`LambertMaterial material; +#endif`,v9=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,y9=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,m9=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -7077,7 +7079,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,x9=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,g9=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -7200,7 +7202,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,S9=`#ifdef USE_ENVMAP +#endif`,y9=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -7233,8 +7235,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,T9=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,E9=`varying vec3 vViewPosition; +#endif`,x9=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,S9=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -7246,11 +7248,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,M9=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,T9=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,C9=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,E9=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -7267,7 +7269,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,w9=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,M9=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -7350,7 +7352,7 @@ material.roughness = min( material.roughness, 1.0 ); material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,A9=`struct PhysicalMaterial { +#endif`,C9=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -7650,7 +7652,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,P9=` +}`,w9=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -7765,7 +7767,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,R9=`#if defined( RE_IndirectDiffuse ) +#endif`,A9=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -7784,25 +7786,25 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,b9=`#if defined( RE_IndirectDiffuse ) +#endif`,P9=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,L9=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,R9=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,F9=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,b9=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,O9=`#ifdef USE_LOGDEPTHBUF +#endif`,L9=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif -#endif`,D9=`#ifdef USE_LOGDEPTHBUF +#endif`,F9=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); @@ -7812,16 +7814,16 @@ IncidentLight directLight; gl_Position.z *= gl_Position.w; } #endif -#endif`,I9=`#ifdef USE_MAP +#endif`,O9=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,N9=`#ifdef USE_MAP +#endif`,D9=`#ifdef USE_MAP uniform sampler2D map; -#endif`,B9=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,I9=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -7833,7 +7835,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,U9=`#if defined( USE_POINTS_UV ) +#endif`,N9=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -7845,13 +7847,13 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,z9=`float metalnessFactor = metalness; +#endif`,B9=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,G9=`#ifdef USE_METALNESSMAP +#endif`,U9=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,V9=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`,z9=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -7860,7 +7862,7 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,H9=`#ifdef USE_MORPHNORMALS +#endif`,G9=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -7872,7 +7874,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,W9=`#ifdef USE_MORPHTARGETS +#endif`,V9=`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -7892,7 +7894,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,X9=`#ifdef USE_MORPHTARGETS +#endif`,H9=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -7910,7 +7912,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,Y9=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,W9=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -7951,7 +7953,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,k9=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,X9=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -7966,25 +7968,25 @@ vec3 nonPerturbedNormal = normal;`,k9=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,j9=`#ifndef FLAT_SHADED +#endif`,Y9=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,K9=`#ifndef FLAT_SHADED +#endif`,k9=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,Z9=`#ifndef FLAT_SHADED +#endif`,j9=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,$9=`#ifdef USE_NORMALMAP +#endif`,K9=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -8006,13 +8008,13 @@ vec3 nonPerturbedNormal = normal;`,k9=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,J9=`#ifdef USE_CLEARCOAT +#endif`,$9=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,Q9=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,Z9=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,_9=`#ifdef USE_CLEARCOATMAP +#endif`,J9=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -8021,18 +8023,18 @@ vec3 nonPerturbedNormal = normal;`,k9=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,q9=`#ifdef USE_IRIDESCENCEMAP +#endif`,Q9=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,tB=`#ifdef OPAQUE +#endif`,_9=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,eB=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,q9=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -8073,9 +8075,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,iB=`#ifdef PREMULTIPLIED_ALPHA +}`,tB=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,nB=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,eB=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -8083,22 +8085,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,rB=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,iB=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,sB=`#ifdef DITHERING +#endif`,nB=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,aB=`float roughnessFactor = roughness; +#endif`,rB=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,oB=`#ifdef USE_ROUGHNESSMAP +#endif`,sB=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,lB=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,aB=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -8275,7 +8277,7 @@ gl_Position = projectionMatrix * mvPosition;`,rB=`#ifdef DITHERING return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } -#endif`,hB=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,oB=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -8313,7 +8315,7 @@ gl_Position = projectionMatrix * mvPosition;`,rB=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,uB=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,lB=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -8345,7 +8347,7 @@ gl_Position = projectionMatrix * mvPosition;`,rB=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,fB=`float getShadowMask() { +#endif`,hB=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -8377,12 +8379,12 @@ gl_Position = projectionMatrix * mvPosition;`,rB=`#ifdef DITHERING #endif #endif return shadow; -}`,cB=`#ifdef USE_SKINNING +}`,uB=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,dB=`#ifdef USE_SKINNING +#endif`,fB=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -8397,7 +8399,7 @@ gl_Position = projectionMatrix * mvPosition;`,rB=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,pB=`#ifdef USE_SKINNING +#endif`,cB=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -8405,7 +8407,7 @@ gl_Position = projectionMatrix * mvPosition;`,rB=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,vB=`#ifdef USE_SKINNING +#endif`,dB=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -8416,17 +8418,17 @@ gl_Position = projectionMatrix * mvPosition;`,rB=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,mB=`float specularStrength; +#endif`,pB=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,gB=`#ifdef USE_SPECULARMAP +#endif`,vB=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,yB=`#if defined( TONE_MAPPING ) +#endif`,mB=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,xB=`#ifndef saturate +#endif`,gB=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -8508,7 +8510,7 @@ vec3 AgXToneMapping( vec3 color ) { color = clamp( color, 0.0, 1.0 ); return color; } -vec3 CustomToneMapping( vec3 color ) { return color; }`,SB=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,yB=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -8529,7 +8531,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,SB=`#ifdef USE_TRANSMISS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,TB=`#ifdef USE_TRANSMISSION +#endif`,xB=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -8635,7 +8637,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,SB=`#ifdef USE_TRANSMISS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,EB=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,SB=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -8705,7 +8707,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,SB=`#ifdef USE_TRANSMISS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,MB=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,TB=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -8799,7 +8801,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,SB=`#ifdef USE_TRANSMISS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,CB=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,EB=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -8870,7 +8872,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,SB=`#ifdef USE_TRANSMISS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,wB=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,MB=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; @@ -8879,12 +8881,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,SB=`#ifdef USE_TRANSMISS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const AB=`varying vec2 vUv; +#endif`;const CB=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,PB=`uniform sampler2D t2D; +}`,wB=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -8896,14 +8898,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,RB=`varying vec3 vWorldDirection; +}`,AB=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,bB=`#ifdef ENVMAP_TYPE_CUBE +}`,PB=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -8925,14 +8927,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,LB=`varying vec3 vWorldDirection; +}`,RB=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,FB=`uniform samplerCube tCube; +}`,bB=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -8942,7 +8944,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,OB=`#include +}`,LB=`#include #include #include #include @@ -8968,7 +8970,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,DB=`#if DEPTH_PACKING == 3200 +}`,FB=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -8998,7 +9000,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,IB=`#define DISTANCE +}`,OB=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -9024,7 +9026,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,NB=`#define DISTANCE +}`,DB=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -9048,13 +9050,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,BB=`varying vec3 vWorldDirection; +}`,IB=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,UB=`uniform sampler2D tEquirect; +}`,NB=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -9063,7 +9065,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,zB=`uniform float scale; +}`,BB=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -9084,7 +9086,7 @@ void main() { #include #include #include -}`,GB=`uniform vec3 diffuse; +}`,UB=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -9112,7 +9114,7 @@ void main() { #include #include #include -}`,VB=`#include +}`,zB=`#include #include #include #include @@ -9143,7 +9145,7 @@ void main() { #include #include #include -}`,HB=`uniform vec3 diffuse; +}`,GB=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -9191,7 +9193,7 @@ void main() { #include #include #include -}`,WB=`#define LAMBERT +}`,VB=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -9229,7 +9231,7 @@ void main() { #include #include #include -}`,XB=`#define LAMBERT +}`,HB=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -9286,7 +9288,7 @@ void main() { #include #include #include -}`,YB=`#define MATCAP +}`,WB=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -9319,7 +9321,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,kB=`#define MATCAP +}`,XB=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -9365,7 +9367,7 @@ void main() { #include #include #include -}`,jB=`#define NORMAL +}`,YB=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -9397,7 +9399,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,KB=`#define NORMAL +}`,kB=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -9419,7 +9421,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,ZB=`#define PHONG +}`,jB=`#define PHONG varying vec3 vViewPosition; #include #include @@ -9457,7 +9459,7 @@ void main() { #include #include #include -}`,$B=`#define PHONG +}`,KB=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -9516,7 +9518,7 @@ void main() { #include #include #include -}`,JB=`#define STANDARD +}`,$B=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -9558,7 +9560,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,QB=`#define STANDARD +}`,ZB=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -9680,7 +9682,7 @@ void main() { #include #include #include -}`,_B=`#define TOON +}`,JB=`#define TOON varying vec3 vViewPosition; #include #include @@ -9716,7 +9718,7 @@ void main() { #include #include #include -}`,qB=`#define TOON +}`,QB=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -9769,7 +9771,7 @@ void main() { #include #include #include -}`,t8=`uniform float size; +}`,_B=`uniform float size; uniform float scale; #include #include @@ -9799,7 +9801,7 @@ void main() { #include #include #include -}`,e8=`uniform vec3 diffuse; +}`,qB=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -9824,7 +9826,7 @@ void main() { #include #include #include -}`,i8=`#include +}`,t8=`#include #include #include #include @@ -9846,7 +9848,7 @@ void main() { #include #include #include -}`,n8=`uniform vec3 color; +}`,e8=`uniform vec3 color; uniform float opacity; #include #include @@ -9862,7 +9864,7 @@ void main() { #include #include #include -}`,r8=`uniform float rotation; +}`,i8=`uniform float rotation; uniform vec2 center; #include #include @@ -9888,7 +9890,7 @@ void main() { #include #include #include -}`,s8=`uniform vec3 diffuse; +}`,n8=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -9913,7 +9915,7 @@ void main() { #include #include #include -}`,Li={alphahash_fragment:PN,alphahash_pars_fragment:RN,alphamap_fragment:bN,alphamap_pars_fragment:LN,alphatest_fragment:FN,alphatest_pars_fragment:ON,aomap_fragment:DN,aomap_pars_fragment:IN,batching_pars_vertex:NN,batching_vertex:BN,begin_vertex:UN,beginnormal_vertex:zN,bsdfs:GN,iridescence_fragment:VN,bumpmap_pars_fragment:HN,clipping_planes_fragment:WN,clipping_planes_pars_fragment:XN,clipping_planes_pars_vertex:YN,clipping_planes_vertex:kN,color_fragment:jN,color_pars_fragment:KN,color_pars_vertex:ZN,color_vertex:$N,common:JN,cube_uv_reflection_fragment:QN,defaultnormal_vertex:_N,displacementmap_pars_vertex:qN,displacementmap_vertex:t9,emissivemap_fragment:e9,emissivemap_pars_fragment:i9,colorspace_fragment:n9,colorspace_pars_fragment:r9,envmap_fragment:s9,envmap_common_pars_fragment:a9,envmap_pars_fragment:o9,envmap_pars_vertex:l9,envmap_physical_pars_fragment:S9,envmap_vertex:h9,fog_vertex:u9,fog_pars_vertex:f9,fog_fragment:c9,fog_pars_fragment:d9,gradientmap_pars_fragment:p9,lightmap_fragment:v9,lightmap_pars_fragment:m9,lights_lambert_fragment:g9,lights_lambert_pars_fragment:y9,lights_pars_begin:x9,lights_toon_fragment:T9,lights_toon_pars_fragment:E9,lights_phong_fragment:M9,lights_phong_pars_fragment:C9,lights_physical_fragment:w9,lights_physical_pars_fragment:A9,lights_fragment_begin:P9,lights_fragment_maps:R9,lights_fragment_end:b9,logdepthbuf_fragment:L9,logdepthbuf_pars_fragment:F9,logdepthbuf_pars_vertex:O9,logdepthbuf_vertex:D9,map_fragment:I9,map_pars_fragment:N9,map_particle_fragment:B9,map_particle_pars_fragment:U9,metalnessmap_fragment:z9,metalnessmap_pars_fragment:G9,morphcolor_vertex:V9,morphnormal_vertex:H9,morphtarget_pars_vertex:W9,morphtarget_vertex:X9,normal_fragment_begin:Y9,normal_fragment_maps:k9,normal_pars_fragment:j9,normal_pars_vertex:K9,normal_vertex:Z9,normalmap_pars_fragment:$9,clearcoat_normal_fragment_begin:J9,clearcoat_normal_fragment_maps:Q9,clearcoat_pars_fragment:_9,iridescence_pars_fragment:q9,opaque_fragment:tB,packing:eB,premultiplied_alpha_fragment:iB,project_vertex:nB,dithering_fragment:rB,dithering_pars_fragment:sB,roughnessmap_fragment:aB,roughnessmap_pars_fragment:oB,shadowmap_pars_fragment:lB,shadowmap_pars_vertex:hB,shadowmap_vertex:uB,shadowmask_pars_fragment:fB,skinbase_vertex:cB,skinning_pars_vertex:dB,skinning_vertex:pB,skinnormal_vertex:vB,specularmap_fragment:mB,specularmap_pars_fragment:gB,tonemapping_fragment:yB,tonemapping_pars_fragment:xB,transmission_fragment:SB,transmission_pars_fragment:TB,uv_pars_fragment:EB,uv_pars_vertex:MB,uv_vertex:CB,worldpos_vertex:wB,background_vert:AB,background_frag:PB,backgroundCube_vert:RB,backgroundCube_frag:bB,cube_vert:LB,cube_frag:FB,depth_vert:OB,depth_frag:DB,distanceRGBA_vert:IB,distanceRGBA_frag:NB,equirect_vert:BB,equirect_frag:UB,linedashed_vert:zB,linedashed_frag:GB,meshbasic_vert:VB,meshbasic_frag:HB,meshlambert_vert:WB,meshlambert_frag:XB,meshmatcap_vert:YB,meshmatcap_frag:kB,meshnormal_vert:jB,meshnormal_frag:KB,meshphong_vert:ZB,meshphong_frag:$B,meshphysical_vert:JB,meshphysical_frag:QB,meshtoon_vert:_B,meshtoon_frag:qB,points_vert:t8,points_frag:e8,shadow_vert:i8,shadow_frag:n8,sprite_vert:r8,sprite_frag:s8},Fe={common:{diffuse:{value:new ze(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Di},alphaMap:{value:null},alphaMapTransform:{value:new Di},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Di}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Di}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Di}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Di},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Di},normalScale:{value:new ve(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Di},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Di}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Di}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Di}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ze(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new ze(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Di},alphaTest:{value:0},uvTransform:{value:new Di}},sprite:{diffuse:{value:new ze(16777215)},opacity:{value:1},center:{value:new ve(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Di},alphaMap:{value:null},alphaMapTransform:{value:new Di},alphaTest:{value:0}}},io={basic:{uniforms:ps([Fe.common,Fe.specularmap,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.fog]),vertexShader:Li.meshbasic_vert,fragmentShader:Li.meshbasic_frag},lambert:{uniforms:ps([Fe.common,Fe.specularmap,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.fog,Fe.lights,{emissive:{value:new ze(0)}}]),vertexShader:Li.meshlambert_vert,fragmentShader:Li.meshlambert_frag},phong:{uniforms:ps([Fe.common,Fe.specularmap,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.fog,Fe.lights,{emissive:{value:new ze(0)},specular:{value:new ze(1118481)},shininess:{value:30}}]),vertexShader:Li.meshphong_vert,fragmentShader:Li.meshphong_frag},standard:{uniforms:ps([Fe.common,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.roughnessmap,Fe.metalnessmap,Fe.fog,Fe.lights,{emissive:{value:new ze(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Li.meshphysical_vert,fragmentShader:Li.meshphysical_frag},toon:{uniforms:ps([Fe.common,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.gradientmap,Fe.fog,Fe.lights,{emissive:{value:new ze(0)}}]),vertexShader:Li.meshtoon_vert,fragmentShader:Li.meshtoon_frag},matcap:{uniforms:ps([Fe.common,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.fog,{matcap:{value:null}}]),vertexShader:Li.meshmatcap_vert,fragmentShader:Li.meshmatcap_frag},points:{uniforms:ps([Fe.points,Fe.fog]),vertexShader:Li.points_vert,fragmentShader:Li.points_frag},dashed:{uniforms:ps([Fe.common,Fe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Li.linedashed_vert,fragmentShader:Li.linedashed_frag},depth:{uniforms:ps([Fe.common,Fe.displacementmap]),vertexShader:Li.depth_vert,fragmentShader:Li.depth_frag},normal:{uniforms:ps([Fe.common,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,{opacity:{value:1}}]),vertexShader:Li.meshnormal_vert,fragmentShader:Li.meshnormal_frag},sprite:{uniforms:ps([Fe.sprite,Fe.fog]),vertexShader:Li.sprite_vert,fragmentShader:Li.sprite_frag},background:{uniforms:{uvTransform:{value:new Di},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Li.background_vert,fragmentShader:Li.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Li.backgroundCube_vert,fragmentShader:Li.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Li.cube_vert,fragmentShader:Li.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Li.equirect_vert,fragmentShader:Li.equirect_frag},distanceRGBA:{uniforms:ps([Fe.common,Fe.displacementmap,{referencePosition:{value:new Ct},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Li.distanceRGBA_vert,fragmentShader:Li.distanceRGBA_frag},shadow:{uniforms:ps([Fe.lights,Fe.fog,{color:{value:new ze(0)},opacity:{value:1}}]),vertexShader:Li.shadow_vert,fragmentShader:Li.shadow_frag}};io.physical={uniforms:ps([io.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Di},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Di},clearcoatNormalScale:{value:new ve(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Di},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Di},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Di},sheen:{value:0},sheenColor:{value:new ze(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Di},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Di},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Di},transmissionSamplerSize:{value:new ve},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Di},attenuationDistance:{value:0},attenuationColor:{value:new ze(0)},specularColor:{value:new ze(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Di},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Di},anisotropyVector:{value:new ve},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Di}}]),vertexShader:Li.meshphysical_vert,fragmentShader:Li.meshphysical_frag};const Cv={r:0,b:0,g:0};function a8(g,t,i,x,T,E,s){const y=new ze(0);let e=E===!0?0:1,r,d,h=null,a=0,l=null;function n(f,o){let c=!1,p=o.isScene===!0?o.background:null;p&&p.isTexture&&(p=(o.backgroundBlurriness>0?i:t).get(p)),p===null?u(y,e):p&&p.isColor&&(u(p,1),c=!0);const v=g.xr.getEnvironmentBlendMode();v==="additive"?x.buffers.color.setClear(0,0,0,1,s):v==="alpha-blend"&&x.buffers.color.setClear(0,0,0,0,s),(g.autoClear||c)&&g.clear(g.autoClearColor,g.autoClearDepth,g.autoClearStencil),p&&(p.isCubeTexture||p.mapping===oc)?(d===void 0&&(d=new dr(new Bu(1,1,1),new so({name:"BackgroundCubeMaterial",uniforms:ec(io.backgroundCube.uniforms),vertexShader:io.backgroundCube.vertexShader,fragmentShader:io.backgroundCube.fragmentShader,side:gs,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(m,S,M){this.matrixWorld.copyPosition(M.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),T.update(d)),d.material.uniforms.envMap.value=p,d.material.uniforms.flipEnvMap.value=p.isCubeTexture&&p.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=o.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=o.backgroundIntensity,d.material.toneMapped=sn.getTransfer(p.colorSpace)!==mn,(h!==p||a!==p.version||l!==g.toneMapping)&&(d.material.needsUpdate=!0,h=p,a=p.version,l=g.toneMapping),d.layers.enableAll(),f.unshift(d,d.geometry,d.material,0,0,null)):p&&p.isTexture&&(r===void 0&&(r=new dr(new hc(2,2),new so({name:"BackgroundMaterial",uniforms:ec(io.background.uniforms),vertexShader:io.background.vertexShader,fragmentShader:io.background.fragmentShader,side:Pl,depthTest:!1,depthWrite:!1,fog:!1})),r.geometry.deleteAttribute("normal"),Object.defineProperty(r.material,"map",{get:function(){return this.uniforms.t2D.value}}),T.update(r)),r.material.uniforms.t2D.value=p,r.material.uniforms.backgroundIntensity.value=o.backgroundIntensity,r.material.toneMapped=sn.getTransfer(p.colorSpace)!==mn,p.matrixAutoUpdate===!0&&p.updateMatrix(),r.material.uniforms.uvTransform.value.copy(p.matrix),(h!==p||a!==p.version||l!==g.toneMapping)&&(r.material.needsUpdate=!0,h=p,a=p.version,l=g.toneMapping),r.layers.enableAll(),f.unshift(r,r.geometry,r.material,0,0,null))}function u(f,o){f.getRGB(Cv,S2(g)),x.buffers.color.setClear(Cv.r,Cv.g,Cv.b,o,s)}return{getClearColor:function(){return y},setClearColor:function(f,o=1){y.set(f),e=o,u(y,e)},getClearAlpha:function(){return e},setClearAlpha:function(f){e=f,u(y,e)},render:n}}function o8(g,t,i,x){const T=g.getParameter(g.MAX_VERTEX_ATTRIBS),E=x.isWebGL2?null:t.get("OES_vertex_array_object"),s=x.isWebGL2||E!==null,y={},e=f(null);let r=e,d=!1;function h(I,D,B,G,z){let X=!1;if(s){const j=u(G,B,D);r!==j&&(r=j,l(r.object)),X=o(I,G,B,z),X&&c(I,G,B,z)}else{const j=D.wireframe===!0;(r.geometry!==G.id||r.program!==B.id||r.wireframe!==j)&&(r.geometry=G.id,r.program=B.id,r.wireframe=j,X=!0)}z!==null&&i.update(z,g.ELEMENT_ARRAY_BUFFER),(X||d)&&(d=!1,w(I,D,B,G),z!==null&&g.bindBuffer(g.ELEMENT_ARRAY_BUFFER,i.get(z).buffer))}function a(){return x.isWebGL2?g.createVertexArray():E.createVertexArrayOES()}function l(I){return x.isWebGL2?g.bindVertexArray(I):E.bindVertexArrayOES(I)}function n(I){return x.isWebGL2?g.deleteVertexArray(I):E.deleteVertexArrayOES(I)}function u(I,D,B){const G=B.wireframe===!0;let z=y[I.id];z===void 0&&(z={},y[I.id]=z);let X=z[D.id];X===void 0&&(X={},z[D.id]=X);let j=X[G];return j===void 0&&(j=f(a()),X[G]=j),j}function f(I){const D=[],B=[],G=[];for(let z=0;z=0){const Z=z[tt];let U=X[tt];if(U===void 0&&(tt==="instanceMatrix"&&I.instanceMatrix&&(U=I.instanceMatrix),tt==="instanceColor"&&I.instanceColor&&(U=I.instanceColor)),Z===void 0||Z.attribute!==U||U&&Z.data!==U.data)return!0;j++}return r.attributesNum!==j||r.index!==G}function c(I,D,B,G){const z={},X=D.attributes;let j=0;const Q=B.getAttributes();for(const tt in Q)if(Q[tt].location>=0){let Z=X[tt];Z===void 0&&(tt==="instanceMatrix"&&I.instanceMatrix&&(Z=I.instanceMatrix),tt==="instanceColor"&&I.instanceColor&&(Z=I.instanceColor));const U={};U.attribute=Z,Z&&Z.data&&(U.data=Z.data),z[tt]=U,j++}r.attributes=z,r.attributesNum=j,r.index=G}function p(){const I=r.newAttributes;for(let D=0,B=I.length;D=0){let Y=z[Q];if(Y===void 0&&(Q==="instanceMatrix"&&I.instanceMatrix&&(Y=I.instanceMatrix),Q==="instanceColor"&&I.instanceColor&&(Y=I.instanceColor)),Y!==void 0){const Z=Y.normalized,U=Y.itemSize,H=i.get(Y);if(H===void 0)continue;const $=H.buffer,_=H.type,q=H.bytesPerElement,at=x.isWebGL2===!0&&(_===g.INT||_===g.UNSIGNED_INT||Y.gpuType===u1);if(Y.isInterleavedBufferAttribute){const ot=Y.data,rt=ot.stride,gt=Y.offset;if(ot.isInstancedInterleavedBuffer){for(let yt=0;yt0&&g.getShaderPrecisionFormat(g.FRAGMENT_SHADER,g.HIGH_FLOAT).precision>0)return"highp";M="mediump"}return M==="mediump"&&g.getShaderPrecisionFormat(g.VERTEX_SHADER,g.MEDIUM_FLOAT).precision>0&&g.getShaderPrecisionFormat(g.FRAGMENT_SHADER,g.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s=typeof WebGL2RenderingContext<"u"&&g.constructor.name==="WebGL2RenderingContext";let y=i.precision!==void 0?i.precision:"highp";const e=E(y);e!==y&&(console.warn("THREE.WebGLRenderer:",y,"not supported, using",e,"instead."),y=e);const r=s||t.has("WEBGL_draw_buffers"),d=i.logarithmicDepthBuffer===!0,h=g.getParameter(g.MAX_TEXTURE_IMAGE_UNITS),a=g.getParameter(g.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=g.getParameter(g.MAX_TEXTURE_SIZE),n=g.getParameter(g.MAX_CUBE_MAP_TEXTURE_SIZE),u=g.getParameter(g.MAX_VERTEX_ATTRIBS),f=g.getParameter(g.MAX_VERTEX_UNIFORM_VECTORS),o=g.getParameter(g.MAX_VARYING_VECTORS),c=g.getParameter(g.MAX_FRAGMENT_UNIFORM_VECTORS),p=a>0,v=s||t.has("OES_texture_float"),m=p&&v,S=s?g.getParameter(g.MAX_SAMPLES):0;return{isWebGL2:s,drawBuffers:r,getMaxAnisotropy:T,getMaxPrecision:E,precision:y,logarithmicDepthBuffer:d,maxTextures:h,maxVertexTextures:a,maxTextureSize:l,maxCubemapSize:n,maxAttributes:u,maxVertexUniforms:f,maxVaryings:o,maxFragmentUniforms:c,vertexTextures:p,floatFragmentTextures:v,floatVertexTextures:m,maxSamples:S}}function u8(g){const t=this;let i=null,x=0,T=!1,E=!1;const s=new hh,y=new Di,e={value:null,needsUpdate:!1};this.uniform=e,this.numPlanes=0,this.numIntersection=0,this.init=function(h,a){const l=h.length!==0||a||x!==0||T;return T=a,x=h.length,l},this.beginShadows=function(){E=!0,d(null)},this.endShadows=function(){E=!1},this.setGlobalState=function(h,a){i=d(h,a,0)},this.setState=function(h,a,l){const n=h.clippingPlanes,u=h.clipIntersection,f=h.clipShadows,o=g.get(h);if(!T||n===null||n.length===0||E&&!f)E?d(null):r();else{const c=E?0:x,p=c*4;let v=o.clippingState||null;e.value=v,v=d(n,a,p,l);for(let m=0;m!==p;++m)v[m]=i[m];o.clippingState=v,this.numIntersection=u?this.numPlanes:0,this.numPlanes+=c}};function r(){e.value!==i&&(e.value=i,e.needsUpdate=x>0),t.numPlanes=x,t.numIntersection=0}function d(h,a,l,n){const u=h!==null?h.length:0;let f=null;if(u!==0){if(f=e.value,n!==!0||f===null){const o=l+u*4,c=a.matrixWorldInverse;y.getNormalMatrix(c),(f===null||f.length0){const r=new M2(e.height);return r.fromEquirectangularTexture(g,s),t.set(s,r),s.addEventListener("dispose",T),i(r.texture,s.mapping)}else return null}}return s}function T(s){const y=s.target;y.removeEventListener("dispose",T);const e=t.get(y);e!==void 0&&(t.delete(y),e.dispose())}function E(){t=new WeakMap}return{get:x,dispose:E}}class np extends tp{constructor(t=-1,i=1,x=1,T=-1,E=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=i,this.top=x,this.bottom=T,this.near=E,this.far=s,this.updateProjectionMatrix()}copy(t,i){return super.copy(t,i),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,i,x,T,E,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=i,this.view.offsetX=x,this.view.offsetY=T,this.view.width=E,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),i=(this.top-this.bottom)/(2*this.zoom),x=(this.right+this.left)/2,T=(this.top+this.bottom)/2;let E=x-t,s=x+t,y=T+i,e=T-i;if(this.view!==null&&this.view.enabled){const r=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;E+=r*this.view.offsetX,s=E+r*this.view.width,y-=d*this.view.offsetY,e=y-d*this.view.height}this.projectionMatrix.makeOrthographic(E,s,y,e,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const i=super.toJSON(t);return i.object.zoom=this.zoom,i.object.left=this.left,i.object.right=this.right,i.object.top=this.top,i.object.bottom=this.bottom,i.object.near=this.near,i.object.far=this.far,this.view!==null&&(i.object.view=Object.assign({},this.view)),i}}const Wf=4,$T=[.125,.215,.35,.446,.526,.582],vu=20,X0=new np,JT=new ze;let Y0=null,k0=0,j0=0;const du=(1+Math.sqrt(5))/2,Af=1/du,QT=[new Ct(1,1,1),new Ct(-1,1,1),new Ct(1,1,-1),new Ct(-1,1,-1),new Ct(0,du,Af),new Ct(0,du,-Af),new Ct(Af,0,du),new Ct(-Af,0,du),new Ct(du,Af,0),new Ct(-du,Af,0)];class Ex{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(t,i=0,x=.1,T=100){Y0=this._renderer.getRenderTarget(),k0=this._renderer.getActiveCubeFace(),j0=this._renderer.getActiveMipmapLevel(),this._setSize(256);const E=this._allocateTargets();return E.depthBuffer=!0,this._sceneToCubeUV(t,x,T,E),i>0&&this._blur(E,0,0,i),this._applyPMREM(E),this._cleanup(E),E}fromEquirectangular(t,i=null){return this._fromTexture(t,i)}fromCubemap(t,i=null){return this._fromTexture(t,i)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=tE(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=qT(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let t=0;t2?p:0,p,p),d.setRenderTarget(T),u&&d.render(n,y),d.render(t,y)}n.geometry.dispose(),n.material.dispose(),d.toneMapping=a,d.autoClear=h,t.background=f}_textureToCubeUV(t,i){const x=this._renderer,T=t.mapping===Rl||t.mapping===xh;T?(this._cubemapMaterial===null&&(this._cubemapMaterial=tE()),this._cubemapMaterial.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=qT());const E=T?this._cubemapMaterial:this._equirectMaterial,s=new dr(this._lodPlanes[0],E),y=E.uniforms;y.envMap.value=t;const e=this._cubeSize;wv(i,0,0,3*e,2*e),x.setRenderTarget(i),x.render(s,X0)}_applyPMREM(t){const i=this._renderer,x=i.autoClear;i.autoClear=!1;for(let T=1;Tvu&&console.warn(`sigmaRadians, ${E}, is too large and will clip, as it requested ${f} samples when the maximum is set to ${vu}`);const o=[];let c=0;for(let M=0;Mp-Wf?T-p+Wf:0),S=4*(this._cubeSize-v);wv(i,m,S,3*v,2*v),e.setRenderTarget(i),e.render(h,X0)}}function c8(g){const t=[],i=[],x=[];let T=g;const E=g-Wf+1+$T.length;for(let s=0;sg-Wf?e=$T[s-g+Wf-1]:s===0&&(e=0),x.push(e);const r=1/(y-2),d=-r,h=1+r,a=[d,d,h,d,h,h,d,d,h,h,d,h],l=6,n=6,u=3,f=2,o=1,c=new Float32Array(u*n*l),p=new Float32Array(f*n*l),v=new Float32Array(o*n*l);for(let S=0;S2?0:-1,C=[M,w,0,M+2/3,w,0,M+2/3,w+1,0,M,w,0,M+2/3,w+1,0,M,w+1,0];c.set(C,u*n*S),p.set(a,f*n*S);const A=[S,S,S,S,S,S];v.set(A,o*n*S)}const m=new Fi;m.setAttribute("position",new on(c,u)),m.setAttribute("uv",new on(p,f)),m.setAttribute("faceIndex",new on(v,o)),t.push(m),T>Wf&&T--}return{lodPlanes:t,sizeLods:i,sigmas:x}}function _T(g,t,i){const x=new ro(g,t,i);return x.texture.mapping=oc,x.texture.name="PMREM.cubeUv",x.scissorTest=!0,x}function wv(g,t,i,x,T){g.viewport.set(t,i,x,T),g.scissor.set(t,i,x,T)}function d8(g,t,i){const x=new Float32Array(vu),T=new Ct(0,1,0);return new so({name:"SphericalGaussianBlur",defines:{n:vu,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/i,CUBEUV_MAX_MIP:`${g}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:x},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:T}},vertexShader:w1(),fragmentShader:` +}`,Li={alphahash_fragment:wN,alphahash_pars_fragment:AN,alphamap_fragment:PN,alphamap_pars_fragment:RN,alphatest_fragment:bN,alphatest_pars_fragment:LN,aomap_fragment:FN,aomap_pars_fragment:ON,batching_pars_vertex:DN,batching_vertex:IN,begin_vertex:NN,beginnormal_vertex:BN,bsdfs:UN,iridescence_fragment:zN,bumpmap_pars_fragment:GN,clipping_planes_fragment:VN,clipping_planes_pars_fragment:HN,clipping_planes_pars_vertex:WN,clipping_planes_vertex:XN,color_fragment:YN,color_pars_fragment:kN,color_pars_vertex:jN,color_vertex:KN,common:$N,cube_uv_reflection_fragment:ZN,defaultnormal_vertex:JN,displacementmap_pars_vertex:QN,displacementmap_vertex:_N,emissivemap_fragment:qN,emissivemap_pars_fragment:t9,colorspace_fragment:e9,colorspace_pars_fragment:i9,envmap_fragment:n9,envmap_common_pars_fragment:r9,envmap_pars_fragment:s9,envmap_pars_vertex:a9,envmap_physical_pars_fragment:y9,envmap_vertex:o9,fog_vertex:l9,fog_pars_vertex:h9,fog_fragment:u9,fog_pars_fragment:f9,gradientmap_pars_fragment:c9,lightmap_fragment:d9,lightmap_pars_fragment:p9,lights_lambert_fragment:v9,lights_lambert_pars_fragment:m9,lights_pars_begin:g9,lights_toon_fragment:x9,lights_toon_pars_fragment:S9,lights_phong_fragment:T9,lights_phong_pars_fragment:E9,lights_physical_fragment:M9,lights_physical_pars_fragment:C9,lights_fragment_begin:w9,lights_fragment_maps:A9,lights_fragment_end:P9,logdepthbuf_fragment:R9,logdepthbuf_pars_fragment:b9,logdepthbuf_pars_vertex:L9,logdepthbuf_vertex:F9,map_fragment:O9,map_pars_fragment:D9,map_particle_fragment:I9,map_particle_pars_fragment:N9,metalnessmap_fragment:B9,metalnessmap_pars_fragment:U9,morphcolor_vertex:z9,morphnormal_vertex:G9,morphtarget_pars_vertex:V9,morphtarget_vertex:H9,normal_fragment_begin:W9,normal_fragment_maps:X9,normal_pars_fragment:Y9,normal_pars_vertex:k9,normal_vertex:j9,normalmap_pars_fragment:K9,clearcoat_normal_fragment_begin:$9,clearcoat_normal_fragment_maps:Z9,clearcoat_pars_fragment:J9,iridescence_pars_fragment:Q9,opaque_fragment:_9,packing:q9,premultiplied_alpha_fragment:tB,project_vertex:eB,dithering_fragment:iB,dithering_pars_fragment:nB,roughnessmap_fragment:rB,roughnessmap_pars_fragment:sB,shadowmap_pars_fragment:aB,shadowmap_pars_vertex:oB,shadowmap_vertex:lB,shadowmask_pars_fragment:hB,skinbase_vertex:uB,skinning_pars_vertex:fB,skinning_vertex:cB,skinnormal_vertex:dB,specularmap_fragment:pB,specularmap_pars_fragment:vB,tonemapping_fragment:mB,tonemapping_pars_fragment:gB,transmission_fragment:yB,transmission_pars_fragment:xB,uv_pars_fragment:SB,uv_pars_vertex:TB,uv_vertex:EB,worldpos_vertex:MB,background_vert:CB,background_frag:wB,backgroundCube_vert:AB,backgroundCube_frag:PB,cube_vert:RB,cube_frag:bB,depth_vert:LB,depth_frag:FB,distanceRGBA_vert:OB,distanceRGBA_frag:DB,equirect_vert:IB,equirect_frag:NB,linedashed_vert:BB,linedashed_frag:UB,meshbasic_vert:zB,meshbasic_frag:GB,meshlambert_vert:VB,meshlambert_frag:HB,meshmatcap_vert:WB,meshmatcap_frag:XB,meshnormal_vert:YB,meshnormal_frag:kB,meshphong_vert:jB,meshphong_frag:KB,meshphysical_vert:$B,meshphysical_frag:ZB,meshtoon_vert:JB,meshtoon_frag:QB,points_vert:_B,points_frag:qB,shadow_vert:t8,shadow_frag:e8,sprite_vert:i8,sprite_frag:n8},Fe={common:{diffuse:{value:new Ge(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Di},alphaMap:{value:null},alphaMapTransform:{value:new Di},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Di}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Di}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Di}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Di},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Di},normalScale:{value:new ve(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Di},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Di}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Di}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Di}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ge(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ge(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Di},alphaTest:{value:0},uvTransform:{value:new Di}},sprite:{diffuse:{value:new Ge(16777215)},opacity:{value:1},center:{value:new ve(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Di},alphaMap:{value:null},alphaMapTransform:{value:new Di},alphaTest:{value:0}}},io={basic:{uniforms:ps([Fe.common,Fe.specularmap,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.fog]),vertexShader:Li.meshbasic_vert,fragmentShader:Li.meshbasic_frag},lambert:{uniforms:ps([Fe.common,Fe.specularmap,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.fog,Fe.lights,{emissive:{value:new Ge(0)}}]),vertexShader:Li.meshlambert_vert,fragmentShader:Li.meshlambert_frag},phong:{uniforms:ps([Fe.common,Fe.specularmap,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.fog,Fe.lights,{emissive:{value:new Ge(0)},specular:{value:new Ge(1118481)},shininess:{value:30}}]),vertexShader:Li.meshphong_vert,fragmentShader:Li.meshphong_frag},standard:{uniforms:ps([Fe.common,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.roughnessmap,Fe.metalnessmap,Fe.fog,Fe.lights,{emissive:{value:new Ge(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Li.meshphysical_vert,fragmentShader:Li.meshphysical_frag},toon:{uniforms:ps([Fe.common,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.gradientmap,Fe.fog,Fe.lights,{emissive:{value:new Ge(0)}}]),vertexShader:Li.meshtoon_vert,fragmentShader:Li.meshtoon_frag},matcap:{uniforms:ps([Fe.common,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.fog,{matcap:{value:null}}]),vertexShader:Li.meshmatcap_vert,fragmentShader:Li.meshmatcap_frag},points:{uniforms:ps([Fe.points,Fe.fog]),vertexShader:Li.points_vert,fragmentShader:Li.points_frag},dashed:{uniforms:ps([Fe.common,Fe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Li.linedashed_vert,fragmentShader:Li.linedashed_frag},depth:{uniforms:ps([Fe.common,Fe.displacementmap]),vertexShader:Li.depth_vert,fragmentShader:Li.depth_frag},normal:{uniforms:ps([Fe.common,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,{opacity:{value:1}}]),vertexShader:Li.meshnormal_vert,fragmentShader:Li.meshnormal_frag},sprite:{uniforms:ps([Fe.sprite,Fe.fog]),vertexShader:Li.sprite_vert,fragmentShader:Li.sprite_frag},background:{uniforms:{uvTransform:{value:new Di},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Li.background_vert,fragmentShader:Li.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Li.backgroundCube_vert,fragmentShader:Li.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Li.cube_vert,fragmentShader:Li.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Li.equirect_vert,fragmentShader:Li.equirect_frag},distanceRGBA:{uniforms:ps([Fe.common,Fe.displacementmap,{referencePosition:{value:new Ct},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Li.distanceRGBA_vert,fragmentShader:Li.distanceRGBA_frag},shadow:{uniforms:ps([Fe.lights,Fe.fog,{color:{value:new Ge(0)},opacity:{value:1}}]),vertexShader:Li.shadow_vert,fragmentShader:Li.shadow_frag}};io.physical={uniforms:ps([io.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Di},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Di},clearcoatNormalScale:{value:new ve(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Di},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Di},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Di},sheen:{value:0},sheenColor:{value:new Ge(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Di},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Di},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Di},transmissionSamplerSize:{value:new ve},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Di},attenuationDistance:{value:0},attenuationColor:{value:new Ge(0)},specularColor:{value:new Ge(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Di},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Di},anisotropyVector:{value:new ve},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Di}}]),vertexShader:Li.meshphysical_vert,fragmentShader:Li.meshphysical_frag};const wv={r:0,b:0,g:0};function r8(g,t,i,y,T,E,s){const x=new Ge(0);let e=E===!0?0:1,r,d,h=null,a=0,l=null;function n(f,o){let c=!1,p=o.isScene===!0?o.background:null;p&&p.isTexture&&(p=(o.backgroundBlurriness>0?i:t).get(p)),p===null?u(x,e):p&&p.isColor&&(u(p,1),c=!0);const v=g.xr.getEnvironmentBlendMode();v==="additive"?y.buffers.color.setClear(0,0,0,1,s):v==="alpha-blend"&&y.buffers.color.setClear(0,0,0,0,s),(g.autoClear||c)&&g.clear(g.autoClearColor,g.autoClearDepth,g.autoClearStencil),p&&(p.isCubeTexture||p.mapping===ac)?(d===void 0&&(d=new dr(new Bu(1,1,1),new so({name:"BackgroundCubeMaterial",uniforms:tc(io.backgroundCube.uniforms),vertexShader:io.backgroundCube.vertexShader,fragmentShader:io.backgroundCube.fragmentShader,side:gs,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(m,S,M){this.matrixWorld.copyPosition(M.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),T.update(d)),d.material.uniforms.envMap.value=p,d.material.uniforms.flipEnvMap.value=p.isCubeTexture&&p.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=o.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=o.backgroundIntensity,d.material.toneMapped=an.getTransfer(p.colorSpace)!==gn,(h!==p||a!==p.version||l!==g.toneMapping)&&(d.material.needsUpdate=!0,h=p,a=p.version,l=g.toneMapping),d.layers.enableAll(),f.unshift(d,d.geometry,d.material,0,0,null)):p&&p.isTexture&&(r===void 0&&(r=new dr(new lc(2,2),new so({name:"BackgroundMaterial",uniforms:tc(io.background.uniforms),vertexShader:io.background.vertexShader,fragmentShader:io.background.fragmentShader,side:Al,depthTest:!1,depthWrite:!1,fog:!1})),r.geometry.deleteAttribute("normal"),Object.defineProperty(r.material,"map",{get:function(){return this.uniforms.t2D.value}}),T.update(r)),r.material.uniforms.t2D.value=p,r.material.uniforms.backgroundIntensity.value=o.backgroundIntensity,r.material.toneMapped=an.getTransfer(p.colorSpace)!==gn,p.matrixAutoUpdate===!0&&p.updateMatrix(),r.material.uniforms.uvTransform.value.copy(p.matrix),(h!==p||a!==p.version||l!==g.toneMapping)&&(r.material.needsUpdate=!0,h=p,a=p.version,l=g.toneMapping),r.layers.enableAll(),f.unshift(r,r.geometry,r.material,0,0,null))}function u(f,o){f.getRGB(wv,E2(g)),y.buffers.color.setClear(wv.r,wv.g,wv.b,o,s)}return{getClearColor:function(){return x},setClearColor:function(f,o=1){x.set(f),e=o,u(x,e)},getClearAlpha:function(){return e},setClearAlpha:function(f){e=f,u(x,e)},render:n}}function s8(g,t,i,y){const T=g.getParameter(g.MAX_VERTEX_ATTRIBS),E=y.isWebGL2?null:t.get("OES_vertex_array_object"),s=y.isWebGL2||E!==null,x={},e=f(null);let r=e,d=!1;function h(I,D,B,G,z){let X=!1;if(s){const j=u(G,B,D);r!==j&&(r=j,l(r.object)),X=o(I,G,B,z),X&&c(I,G,B,z)}else{const j=D.wireframe===!0;(r.geometry!==G.id||r.program!==B.id||r.wireframe!==j)&&(r.geometry=G.id,r.program=B.id,r.wireframe=j,X=!0)}z!==null&&i.update(z,g.ELEMENT_ARRAY_BUFFER),(X||d)&&(d=!1,w(I,D,B,G),z!==null&&g.bindBuffer(g.ELEMENT_ARRAY_BUFFER,i.get(z).buffer))}function a(){return y.isWebGL2?g.createVertexArray():E.createVertexArrayOES()}function l(I){return y.isWebGL2?g.bindVertexArray(I):E.bindVertexArrayOES(I)}function n(I){return y.isWebGL2?g.deleteVertexArray(I):E.deleteVertexArrayOES(I)}function u(I,D,B){const G=B.wireframe===!0;let z=x[I.id];z===void 0&&(z={},x[I.id]=z);let X=z[D.id];X===void 0&&(X={},z[D.id]=X);let j=X[G];return j===void 0&&(j=f(a()),X[G]=j),j}function f(I){const D=[],B=[],G=[];for(let z=0;z=0){const $=z[tt];let U=X[tt];if(U===void 0&&(tt==="instanceMatrix"&&I.instanceMatrix&&(U=I.instanceMatrix),tt==="instanceColor"&&I.instanceColor&&(U=I.instanceColor)),$===void 0||$.attribute!==U||U&&$.data!==U.data)return!0;j++}return r.attributesNum!==j||r.index!==G}function c(I,D,B,G){const z={},X=D.attributes;let j=0;const Q=B.getAttributes();for(const tt in Q)if(Q[tt].location>=0){let $=X[tt];$===void 0&&(tt==="instanceMatrix"&&I.instanceMatrix&&($=I.instanceMatrix),tt==="instanceColor"&&I.instanceColor&&($=I.instanceColor));const U={};U.attribute=$,$&&$.data&&(U.data=$.data),z[tt]=U,j++}r.attributes=z,r.attributesNum=j,r.index=G}function p(){const I=r.newAttributes;for(let D=0,B=I.length;D=0){let Y=z[Q];if(Y===void 0&&(Q==="instanceMatrix"&&I.instanceMatrix&&(Y=I.instanceMatrix),Q==="instanceColor"&&I.instanceColor&&(Y=I.instanceColor)),Y!==void 0){const $=Y.normalized,U=Y.itemSize,H=i.get(Y);if(H===void 0)continue;const Z=H.buffer,_=H.type,q=H.bytesPerElement,at=y.isWebGL2===!0&&(_===g.INT||_===g.UNSIGNED_INT||Y.gpuType===f1);if(Y.isInterleavedBufferAttribute){const ot=Y.data,rt=ot.stride,gt=Y.offset;if(ot.isInstancedInterleavedBuffer){for(let yt=0;yt0&&g.getShaderPrecisionFormat(g.FRAGMENT_SHADER,g.HIGH_FLOAT).precision>0)return"highp";M="mediump"}return M==="mediump"&&g.getShaderPrecisionFormat(g.VERTEX_SHADER,g.MEDIUM_FLOAT).precision>0&&g.getShaderPrecisionFormat(g.FRAGMENT_SHADER,g.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s=typeof WebGL2RenderingContext<"u"&&g.constructor.name==="WebGL2RenderingContext";let x=i.precision!==void 0?i.precision:"highp";const e=E(x);e!==x&&(console.warn("THREE.WebGLRenderer:",x,"not supported, using",e,"instead."),x=e);const r=s||t.has("WEBGL_draw_buffers"),d=i.logarithmicDepthBuffer===!0,h=g.getParameter(g.MAX_TEXTURE_IMAGE_UNITS),a=g.getParameter(g.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=g.getParameter(g.MAX_TEXTURE_SIZE),n=g.getParameter(g.MAX_CUBE_MAP_TEXTURE_SIZE),u=g.getParameter(g.MAX_VERTEX_ATTRIBS),f=g.getParameter(g.MAX_VERTEX_UNIFORM_VECTORS),o=g.getParameter(g.MAX_VARYING_VECTORS),c=g.getParameter(g.MAX_FRAGMENT_UNIFORM_VECTORS),p=a>0,v=s||t.has("OES_texture_float"),m=p&&v,S=s?g.getParameter(g.MAX_SAMPLES):0;return{isWebGL2:s,drawBuffers:r,getMaxAnisotropy:T,getMaxPrecision:E,precision:x,logarithmicDepthBuffer:d,maxTextures:h,maxVertexTextures:a,maxTextureSize:l,maxCubemapSize:n,maxAttributes:u,maxVertexUniforms:f,maxVaryings:o,maxFragmentUniforms:c,vertexTextures:p,floatFragmentTextures:v,floatVertexTextures:m,maxSamples:S}}function l8(g){const t=this;let i=null,y=0,T=!1,E=!1;const s=new lh,x=new Di,e={value:null,needsUpdate:!1};this.uniform=e,this.numPlanes=0,this.numIntersection=0,this.init=function(h,a){const l=h.length!==0||a||y!==0||T;return T=a,y=h.length,l},this.beginShadows=function(){E=!0,d(null)},this.endShadows=function(){E=!1},this.setGlobalState=function(h,a){i=d(h,a,0)},this.setState=function(h,a,l){const n=h.clippingPlanes,u=h.clipIntersection,f=h.clipShadows,o=g.get(h);if(!T||n===null||n.length===0||E&&!f)E?d(null):r();else{const c=E?0:y,p=c*4;let v=o.clippingState||null;e.value=v,v=d(n,a,p,l);for(let m=0;m!==p;++m)v[m]=i[m];o.clippingState=v,this.numIntersection=u?this.numPlanes:0,this.numPlanes+=c}};function r(){e.value!==i&&(e.value=i,e.needsUpdate=y>0),t.numPlanes=y,t.numIntersection=0}function d(h,a,l,n){const u=h!==null?h.length:0;let f=null;if(u!==0){if(f=e.value,n!==!0||f===null){const o=l+u*4,c=a.matrixWorldInverse;x.getNormalMatrix(c),(f===null||f.length0){const r=new w2(e.height);return r.fromEquirectangularTexture(g,s),t.set(s,r),s.addEventListener("dispose",T),i(r.texture,s.mapping)}else return null}}return s}function T(s){const x=s.target;x.removeEventListener("dispose",T);const e=t.get(x);e!==void 0&&(t.delete(x),e.dispose())}function E(){t=new WeakMap}return{get:y,dispose:E}}class rp extends ep{constructor(t=-1,i=1,y=1,T=-1,E=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=i,this.top=y,this.bottom=T,this.near=E,this.far=s,this.updateProjectionMatrix()}copy(t,i){return super.copy(t,i),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,i,y,T,E,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=i,this.view.offsetX=y,this.view.offsetY=T,this.view.width=E,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),i=(this.top-this.bottom)/(2*this.zoom),y=(this.right+this.left)/2,T=(this.top+this.bottom)/2;let E=y-t,s=y+t,x=T+i,e=T-i;if(this.view!==null&&this.view.enabled){const r=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;E+=r*this.view.offsetX,s=E+r*this.view.width,x-=d*this.view.offsetY,e=x-d*this.view.height}this.projectionMatrix.makeOrthographic(E,s,x,e,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const i=super.toJSON(t);return i.object.zoom=this.zoom,i.object.left=this.left,i.object.right=this.right,i.object.top=this.top,i.object.bottom=this.bottom,i.object.near=this.near,i.object.far=this.far,this.view!==null&&(i.object.view=Object.assign({},this.view)),i}}const Hf=4,QT=[.125,.215,.35,.446,.526,.582],pu=20,k0=new rp,_T=new Ge;let j0=null,K0=0,$0=0;const cu=(1+Math.sqrt(5))/2,Af=1/cu,qT=[new Ct(1,1,1),new Ct(-1,1,1),new Ct(1,1,-1),new Ct(-1,1,-1),new Ct(0,cu,Af),new Ct(0,cu,-Af),new Ct(Af,0,cu),new Ct(-Af,0,cu),new Ct(cu,Af,0),new Ct(-cu,Af,0)];class wx{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(t,i=0,y=.1,T=100){j0=this._renderer.getRenderTarget(),K0=this._renderer.getActiveCubeFace(),$0=this._renderer.getActiveMipmapLevel(),this._setSize(256);const E=this._allocateTargets();return E.depthBuffer=!0,this._sceneToCubeUV(t,y,T,E),i>0&&this._blur(E,0,0,i),this._applyPMREM(E),this._cleanup(E),E}fromEquirectangular(t,i=null){return this._fromTexture(t,i)}fromCubemap(t,i=null){return this._fromTexture(t,i)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=iE(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=eE(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let t=0;t2?p:0,p,p),d.setRenderTarget(T),u&&d.render(n,x),d.render(t,x)}n.geometry.dispose(),n.material.dispose(),d.toneMapping=a,d.autoClear=h,t.background=f}_textureToCubeUV(t,i){const y=this._renderer,T=t.mapping===Pl||t.mapping===yh;T?(this._cubemapMaterial===null&&(this._cubemapMaterial=iE()),this._cubemapMaterial.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=eE());const E=T?this._cubemapMaterial:this._equirectMaterial,s=new dr(this._lodPlanes[0],E),x=E.uniforms;x.envMap.value=t;const e=this._cubeSize;Av(i,0,0,3*e,2*e),y.setRenderTarget(i),y.render(s,k0)}_applyPMREM(t){const i=this._renderer,y=i.autoClear;i.autoClear=!1;for(let T=1;Tpu&&console.warn(`sigmaRadians, ${E}, is too large and will clip, as it requested ${f} samples when the maximum is set to ${pu}`);const o=[];let c=0;for(let M=0;Mp-Hf?T-p+Hf:0),S=4*(this._cubeSize-v);Av(i,m,S,3*v,2*v),e.setRenderTarget(i),e.render(h,k0)}}function u8(g){const t=[],i=[],y=[];let T=g;const E=g-Hf+1+QT.length;for(let s=0;sg-Hf?e=QT[s-g+Hf-1]:s===0&&(e=0),y.push(e);const r=1/(x-2),d=-r,h=1+r,a=[d,d,h,d,h,h,d,d,h,h,d,h],l=6,n=6,u=3,f=2,o=1,c=new Float32Array(u*n*l),p=new Float32Array(f*n*l),v=new Float32Array(o*n*l);for(let S=0;S2?0:-1,C=[M,w,0,M+2/3,w,0,M+2/3,w+1,0,M,w,0,M+2/3,w+1,0,M,w+1,0];c.set(C,u*n*S),p.set(a,f*n*S);const A=[S,S,S,S,S,S];v.set(A,o*n*S)}const m=new Fi;m.setAttribute("position",new ln(c,u)),m.setAttribute("uv",new ln(p,f)),m.setAttribute("faceIndex",new ln(v,o)),t.push(m),T>Hf&&T--}return{lodPlanes:t,sizeLods:i,sigmas:y}}function tE(g,t,i){const y=new ro(g,t,i);return y.texture.mapping=ac,y.texture.name="PMREM.cubeUv",y.scissorTest=!0,y}function Av(g,t,i,y,T){g.viewport.set(t,i,y,T),g.scissor.set(t,i,y,T)}function f8(g,t,i){const y=new Float32Array(pu),T=new Ct(0,1,0);return new so({name:"SphericalGaussianBlur",defines:{n:pu,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/i,CUBEUV_MAX_MIP:`${g}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:y},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:T}},vertexShader:A1(),fragmentShader:` precision mediump float; precision mediump int; @@ -9973,7 +9975,7 @@ void main() { } } - `,blending:Al,depthTest:!1,depthWrite:!1})}function qT(){return new so({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:w1(),fragmentShader:` + `,blending:wl,depthTest:!1,depthWrite:!1})}function eE(){return new so({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:A1(),fragmentShader:` precision mediump float; precision mediump int; @@ -9992,7 +9994,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:Al,depthTest:!1,depthWrite:!1})}function tE(){return new so({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:w1(),fragmentShader:` + `,blending:wl,depthTest:!1,depthWrite:!1})}function iE(){return new so({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:A1(),fragmentShader:` precision mediump float; precision mediump int; @@ -10008,7 +10010,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:Al,depthTest:!1,depthWrite:!1})}function w1(){return` + `,blending:wl,depthTest:!1,depthWrite:!1})}function A1(){return` precision mediump float; precision mediump int; @@ -10063,16 +10065,16 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function p8(g){let t=new WeakMap,i=null;function x(y){if(y&&y.isTexture){const e=y.mapping,r=e===wd||e===Ad,d=e===Rl||e===xh;if(r||d)if(y.isRenderTargetTexture&&y.needsPMREMUpdate===!0){y.needsPMREMUpdate=!1;let h=t.get(y);return i===null&&(i=new Ex(g)),h=r?i.fromEquirectangular(y,h):i.fromCubemap(y,h),t.set(y,h),h.texture}else{if(t.has(y))return t.get(y).texture;{const h=y.image;if(r&&h&&h.height>0||d&&h&&T(h)){i===null&&(i=new Ex(g));const a=r?i.fromEquirectangular(y):i.fromCubemap(y);return t.set(y,a),y.addEventListener("dispose",E),a.texture}else return null}}}return y}function T(y){let e=0;const r=6;for(let d=0;dt.maxTextureSize&&(A=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const P=new Float32Array(C*A*4*n),b=new vg(P,C,A,n);b.type=Ma,b.needsUpdate=!0;const O=w*4;for(let D=0;D0)return g;const T=t*i;let E=eE[T];if(E===void 0&&(E=new Float32Array(T),eE[T]=E),t!==0){x.toArray(E,0);for(let s=1,y=0;s!==t;++s)y+=i,g[s].toArray(E,y)}return E}function yr(g,t){if(g.length!==t.length)return!1;for(let i=0,x=g.length;i":" "} ${y}: ${i[s]}`)}return x.join(` -`)}function m6(g){const t=sn.getPrimaries(sn.workingColorSpace),i=sn.getPrimaries(g);let x;switch(t===i?x="":t===Id&&i===Dd?x="LinearDisplayP3ToLinearSRGB":t===Dd&&i===Id&&(x="LinearSRGBToLinearDisplayP3"),g){case Ho:case qd:return[x,"LinearTransferOETF"];case mr:case pg:return[x,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",g),[x,"LinearTransferOETF"]}}function lE(g,t,i){const x=g.getShaderParameter(t,g.COMPILE_STATUS),T=g.getShaderInfoLog(t).trim();if(x&&T==="")return"";const E=/ERROR: 0:(\d+)/.exec(T);if(E){const s=parseInt(E[1]);return i.toUpperCase()+` + `}function c8(g){let t=new WeakMap,i=null;function y(x){if(x&&x.isTexture){const e=x.mapping,r=e===Ad||e===Pd,d=e===Pl||e===yh;if(r||d)if(x.isRenderTargetTexture&&x.needsPMREMUpdate===!0){x.needsPMREMUpdate=!1;let h=t.get(x);return i===null&&(i=new wx(g)),h=r?i.fromEquirectangular(x,h):i.fromCubemap(x,h),t.set(x,h),h.texture}else{if(t.has(x))return t.get(x).texture;{const h=x.image;if(r&&h&&h.height>0||d&&h&&T(h)){i===null&&(i=new wx(g));const a=r?i.fromEquirectangular(x):i.fromCubemap(x);return t.set(x,a),x.addEventListener("dispose",E),a.texture}else return null}}}return x}function T(x){let e=0;const r=6;for(let d=0;dt.maxTextureSize&&(A=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const P=new Float32Array(C*A*4*n),b=new gg(P,C,A,n);b.type=Ma,b.needsUpdate=!0;const O=w*4;for(let D=0;D0)return g;const T=t*i;let E=nE[T];if(E===void 0&&(E=new Float32Array(T),nE[T]=E),t!==0){y.toArray(E,0);for(let s=1,x=0;s!==t;++s)x+=i,g[s].toArray(E,x)}return E}function yr(g,t){if(g.length!==t.length)return!1;for(let i=0,y=g.length;i":" "} ${x}: ${i[s]}`)}return y.join(` +`)}function p6(g){const t=an.getPrimaries(an.workingColorSpace),i=an.getPrimaries(g);let y;switch(t===i?y="":t===Nd&&i===Id?y="LinearDisplayP3ToLinearSRGB":t===Id&&i===Nd&&(y="LinearSRGBToLinearDisplayP3"),g){case Ho:case tp:return[y,"LinearTransferOETF"];case mr:case mg:return[y,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",g),[y,"LinearTransferOETF"]}}function uE(g,t,i){const y=g.getShaderParameter(t,g.COMPILE_STATUS),T=g.getShaderInfoLog(t).trim();if(y&&T==="")return"";const E=/ERROR: 0:(\d+)/.exec(T);if(E){const s=parseInt(E[1]);return i.toUpperCase()+` `+T+` -`+v6(g.getShaderSource(t),s)}else return T}function g6(g,t){const i=m6(t);return`vec4 ${g}( vec4 value ) { return ${i[0]}( ${i[1]}( value ) ); }`}function y6(g,t){let i;switch(t){case Xw:i="Linear";break;case Yw:i="Reinhard";break;case kw:i="OptimizedCineon";break;case h1:i="ACESFilmic";break;case Kw:i="AgX";break;case jw:i="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),i="Linear"}return"vec3 "+g+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}function x6(g){return[g.extensionDerivatives||g.envMapCubeUVHeight||g.bumpMap||g.normalMapTangentSpace||g.clearcoatNormalMap||g.flatShading||g.alphaToCoverage||g.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(g.extensionFragDepth||g.logarithmicDepthBuffer)&&g.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",g.extensionDrawBuffers&&g.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(g.extensionShaderTextureLOD||g.envMap||g.transmission)&&g.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Xf).join(` -`)}function S6(g){return[g.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",g.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Xf).join(` -`)}function T6(g){const t=[];for(const i in g){const x=g[i];x!==!1&&t.push("#define "+i+" "+x)}return t.join(` -`)}function E6(g,t){const i={},x=g.getProgramParameter(t,g.ACTIVE_ATTRIBUTES);for(let T=0;T/gm;function Mx(g){return g.replace(M6,w6)}const C6=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function w6(g,t){let i=Li[t];if(i===void 0){const x=C6.get(t);if(x!==void 0)i=Li[x],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,x);else throw new Error("Can not resolve #include <"+t+">")}return Mx(i)}const A6=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function fE(g){return g.replace(A6,P6)}function P6(g,t,i,x){let T="";for(let E=parseInt(t);E/gm;function Ax(g){return g.replace(T6,M6)}const E6=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function M6(g,t){let i=Li[t];if(i===void 0){const y=E6.get(t);if(y!==void 0)i=Li[y],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,y);else throw new Error("Can not resolve #include <"+t+">")}return Ax(i)}const C6=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function dE(g){return g.replace(C6,w6)}function w6(g,t,i,y){let T="";for(let E=parseInt(t);E0&&(o+=` -`),c=[l,"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,u].filter(Xf).join(` +`),c=[l,"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,u].filter(Wf).join(` `),c.length>0&&(c+=` -`)):(o=[cE(i),"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,u,i.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",i.batching?"#define USE_BATCHING":"",i.instancing?"#define USE_INSTANCING":"",i.instancingColor?"#define USE_INSTANCING_COLOR":"",i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+d:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",i.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",i.displacementMap?"#define USE_DISPLACEMENTMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.anisotropy?"#define USE_ANISOTROPY":"",i.anisotropyMap?"#define USE_ANISOTROPYMAP":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",i.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaHash?"#define USE_ALPHAHASH":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",i.mapUv?"#define MAP_UV "+i.mapUv:"",i.alphaMapUv?"#define ALPHAMAP_UV "+i.alphaMapUv:"",i.lightMapUv?"#define LIGHTMAP_UV "+i.lightMapUv:"",i.aoMapUv?"#define AOMAP_UV "+i.aoMapUv:"",i.emissiveMapUv?"#define EMISSIVEMAP_UV "+i.emissiveMapUv:"",i.bumpMapUv?"#define BUMPMAP_UV "+i.bumpMapUv:"",i.normalMapUv?"#define NORMALMAP_UV "+i.normalMapUv:"",i.displacementMapUv?"#define DISPLACEMENTMAP_UV "+i.displacementMapUv:"",i.metalnessMapUv?"#define METALNESSMAP_UV "+i.metalnessMapUv:"",i.roughnessMapUv?"#define ROUGHNESSMAP_UV "+i.roughnessMapUv:"",i.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+i.anisotropyMapUv:"",i.clearcoatMapUv?"#define CLEARCOATMAP_UV "+i.clearcoatMapUv:"",i.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+i.clearcoatNormalMapUv:"",i.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+i.clearcoatRoughnessMapUv:"",i.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+i.iridescenceMapUv:"",i.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+i.iridescenceThicknessMapUv:"",i.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+i.sheenColorMapUv:"",i.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+i.sheenRoughnessMapUv:"",i.specularMapUv?"#define SPECULARMAP_UV "+i.specularMapUv:"",i.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+i.specularColorMapUv:"",i.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+i.specularIntensityMapUv:"",i.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+i.transmissionMapUv:"",i.thicknessMapUv?"#define THICKNESSMAP_UV "+i.thicknessMapUv:"",i.vertexTangents&&i.flatShading===!1?"#define USE_TANGENT":"",i.vertexColors?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUv1s?"#define USE_UV1":"",i.vertexUv2s?"#define USE_UV2":"",i.vertexUv3s?"#define USE_UV3":"",i.pointsUvs?"#define USE_POINTS_UV":"",i.flatShading?"#define FLAT_SHADED":"",i.skinning?"#define USE_SKINNING":"",i.morphTargets?"#define USE_MORPHTARGETS":"",i.morphNormals&&i.flatShading===!1?"#define USE_MORPHNORMALS":"",i.morphColors&&i.isWebGL2?"#define USE_MORPHCOLORS":"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+i.morphTextureStride:"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_COUNT "+i.morphTargetsCount:"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+e:"",i.sizeAttenuation?"#define USE_SIZEATTENUATION":"",i.numLightProbes>0?"#define USE_LIGHT_PROBES":"",i.useLegacyLights?"#define LEGACY_LIGHTS":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&i.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(Xf).join(` -`),c=[l,cE(i),"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,u,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",i.map?"#define USE_MAP":"",i.matcap?"#define USE_MATCAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+r:"",i.envMap?"#define "+d:"",i.envMap?"#define "+h:"",a?"#define CUBEUV_TEXEL_WIDTH "+a.texelWidth:"",a?"#define CUBEUV_TEXEL_HEIGHT "+a.texelHeight:"",a?"#define CUBEUV_MAX_MIP "+a.maxMip+".0":"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",i.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.anisotropy?"#define USE_ANISOTROPY":"",i.anisotropyMap?"#define USE_ANISOTROPYMAP":"",i.clearcoat?"#define USE_CLEARCOAT":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescence?"#define USE_IRIDESCENCE":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",i.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaTest?"#define USE_ALPHATEST":"",i.alphaHash?"#define USE_ALPHAHASH":"",i.sheen?"#define USE_SHEEN":"",i.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.vertexTangents&&i.flatShading===!1?"#define USE_TANGENT":"",i.vertexColors||i.instancingColor?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUv1s?"#define USE_UV1":"",i.vertexUv2s?"#define USE_UV2":"",i.vertexUv3s?"#define USE_UV3":"",i.pointsUvs?"#define USE_POINTS_UV":"",i.gradientMap?"#define USE_GRADIENTMAP":"",i.flatShading?"#define FLAT_SHADED":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+e:"",i.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",i.numLightProbes>0?"#define USE_LIGHT_PROBES":"",i.useLegacyLights?"#define LEGACY_LIGHTS":"",i.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&i.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",i.toneMapping!==zo?"#define TONE_MAPPING":"",i.toneMapping!==zo?Li.tonemapping_pars_fragment:"",i.toneMapping!==zo?y6("toneMapping",i.toneMapping):"",i.dithering?"#define DITHERING":"",i.opaque?"#define OPAQUE":"",Li.colorspace_pars_fragment,g6("linearToOutputTexel",i.outputColorSpace),i.useDepthPacking?"#define DEPTH_PACKING "+i.depthPacking:"",` -`].filter(Xf).join(` -`)),s=Mx(s),s=hE(s,i),s=uE(s,i),y=Mx(y),y=hE(y,i),y=uE(y,i),s=fE(s),y=fE(y),i.isWebGL2&&i.isRawShaderMaterial!==!0&&(p=`#version 300 es +`)):(o=[pE(i),"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,u,i.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",i.batching?"#define USE_BATCHING":"",i.instancing?"#define USE_INSTANCING":"",i.instancingColor?"#define USE_INSTANCING_COLOR":"",i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+d:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",i.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",i.displacementMap?"#define USE_DISPLACEMENTMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.anisotropy?"#define USE_ANISOTROPY":"",i.anisotropyMap?"#define USE_ANISOTROPYMAP":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",i.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaHash?"#define USE_ALPHAHASH":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",i.mapUv?"#define MAP_UV "+i.mapUv:"",i.alphaMapUv?"#define ALPHAMAP_UV "+i.alphaMapUv:"",i.lightMapUv?"#define LIGHTMAP_UV "+i.lightMapUv:"",i.aoMapUv?"#define AOMAP_UV "+i.aoMapUv:"",i.emissiveMapUv?"#define EMISSIVEMAP_UV "+i.emissiveMapUv:"",i.bumpMapUv?"#define BUMPMAP_UV "+i.bumpMapUv:"",i.normalMapUv?"#define NORMALMAP_UV "+i.normalMapUv:"",i.displacementMapUv?"#define DISPLACEMENTMAP_UV "+i.displacementMapUv:"",i.metalnessMapUv?"#define METALNESSMAP_UV "+i.metalnessMapUv:"",i.roughnessMapUv?"#define ROUGHNESSMAP_UV "+i.roughnessMapUv:"",i.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+i.anisotropyMapUv:"",i.clearcoatMapUv?"#define CLEARCOATMAP_UV "+i.clearcoatMapUv:"",i.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+i.clearcoatNormalMapUv:"",i.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+i.clearcoatRoughnessMapUv:"",i.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+i.iridescenceMapUv:"",i.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+i.iridescenceThicknessMapUv:"",i.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+i.sheenColorMapUv:"",i.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+i.sheenRoughnessMapUv:"",i.specularMapUv?"#define SPECULARMAP_UV "+i.specularMapUv:"",i.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+i.specularColorMapUv:"",i.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+i.specularIntensityMapUv:"",i.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+i.transmissionMapUv:"",i.thicknessMapUv?"#define THICKNESSMAP_UV "+i.thicknessMapUv:"",i.vertexTangents&&i.flatShading===!1?"#define USE_TANGENT":"",i.vertexColors?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUv1s?"#define USE_UV1":"",i.vertexUv2s?"#define USE_UV2":"",i.vertexUv3s?"#define USE_UV3":"",i.pointsUvs?"#define USE_POINTS_UV":"",i.flatShading?"#define FLAT_SHADED":"",i.skinning?"#define USE_SKINNING":"",i.morphTargets?"#define USE_MORPHTARGETS":"",i.morphNormals&&i.flatShading===!1?"#define USE_MORPHNORMALS":"",i.morphColors&&i.isWebGL2?"#define USE_MORPHCOLORS":"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+i.morphTextureStride:"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_COUNT "+i.morphTargetsCount:"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+e:"",i.sizeAttenuation?"#define USE_SIZEATTENUATION":"",i.numLightProbes>0?"#define USE_LIGHT_PROBES":"",i.useLegacyLights?"#define LEGACY_LIGHTS":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&i.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(Wf).join(` +`),c=[l,pE(i),"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,u,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",i.map?"#define USE_MAP":"",i.matcap?"#define USE_MATCAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+r:"",i.envMap?"#define "+d:"",i.envMap?"#define "+h:"",a?"#define CUBEUV_TEXEL_WIDTH "+a.texelWidth:"",a?"#define CUBEUV_TEXEL_HEIGHT "+a.texelHeight:"",a?"#define CUBEUV_MAX_MIP "+a.maxMip+".0":"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",i.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.anisotropy?"#define USE_ANISOTROPY":"",i.anisotropyMap?"#define USE_ANISOTROPYMAP":"",i.clearcoat?"#define USE_CLEARCOAT":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescence?"#define USE_IRIDESCENCE":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",i.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaTest?"#define USE_ALPHATEST":"",i.alphaHash?"#define USE_ALPHAHASH":"",i.sheen?"#define USE_SHEEN":"",i.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.vertexTangents&&i.flatShading===!1?"#define USE_TANGENT":"",i.vertexColors||i.instancingColor?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUv1s?"#define USE_UV1":"",i.vertexUv2s?"#define USE_UV2":"",i.vertexUv3s?"#define USE_UV3":"",i.pointsUvs?"#define USE_POINTS_UV":"",i.gradientMap?"#define USE_GRADIENTMAP":"",i.flatShading?"#define FLAT_SHADED":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+e:"",i.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",i.numLightProbes>0?"#define USE_LIGHT_PROBES":"",i.useLegacyLights?"#define LEGACY_LIGHTS":"",i.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&i.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",i.toneMapping!==zo?"#define TONE_MAPPING":"",i.toneMapping!==zo?Li.tonemapping_pars_fragment:"",i.toneMapping!==zo?m6("toneMapping",i.toneMapping):"",i.dithering?"#define DITHERING":"",i.opaque?"#define OPAQUE":"",Li.colorspace_pars_fragment,v6("linearToOutputTexel",i.outputColorSpace),i.useDepthPacking?"#define DEPTH_PACKING "+i.depthPacking:"",` +`].filter(Wf).join(` +`)),s=Ax(s),s=fE(s,i),s=cE(s,i),x=Ax(x),x=fE(x,i),x=cE(x,i),s=dE(s),x=dE(x),i.isWebGL2&&i.isRawShaderMaterial!==!0&&(p=`#version 300 es `,o=[n,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+o,c=["precision mediump sampler2DArray;","#define varying in",i.glslVersion===Sx?"":"layout(location = 0) out highp vec4 pc_fragColor;",i.glslVersion===Sx?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`+o,c=["precision mediump sampler2DArray;","#define varying in",i.glslVersion===Mx?"":"layout(location = 0) out highp vec4 pc_fragColor;",i.glslVersion===Mx?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` `)+` -`+c);const v=p+o+s,m=p+c+y,S=oE(T,T.VERTEX_SHADER,v),M=oE(T,T.FRAGMENT_SHADER,m);T.attachShader(f,S),T.attachShader(f,M),i.index0AttributeName!==void 0?T.bindAttribLocation(f,0,i.index0AttributeName):i.morphTargets===!0&&T.bindAttribLocation(f,0,"position"),T.linkProgram(f);function w(b){if(g.debug.checkShaderErrors){const O=T.getProgramInfoLog(f).trim(),I=T.getShaderInfoLog(S).trim(),D=T.getShaderInfoLog(M).trim();let B=!0,G=!0;if(T.getProgramParameter(f,T.LINK_STATUS)===!1)if(B=!1,typeof g.debug.onShaderError=="function")g.debug.onShaderError(T,f,S,M);else{const z=lE(T,S,"vertex"),X=lE(T,M,"fragment");console.error("THREE.WebGLProgram: Shader Error "+T.getError()+" - VALIDATE_STATUS "+T.getProgramParameter(f,T.VALIDATE_STATUS)+` +`+c);const v=p+o+s,m=p+c+x,S=hE(T,T.VERTEX_SHADER,v),M=hE(T,T.FRAGMENT_SHADER,m);T.attachShader(f,S),T.attachShader(f,M),i.index0AttributeName!==void 0?T.bindAttribLocation(f,0,i.index0AttributeName):i.morphTargets===!0&&T.bindAttribLocation(f,0,"position"),T.linkProgram(f);function w(b){if(g.debug.checkShaderErrors){const O=T.getProgramInfoLog(f).trim(),I=T.getShaderInfoLog(S).trim(),D=T.getShaderInfoLog(M).trim();let B=!0,G=!0;if(T.getProgramParameter(f,T.LINK_STATUS)===!1)if(B=!1,typeof g.debug.onShaderError=="function")g.debug.onShaderError(T,f,S,M);else{const z=uE(T,S,"vertex"),X=uE(T,M,"fragment");console.error("THREE.WebGLProgram: Shader Error "+T.getError()+" - VALIDATE_STATUS "+T.getProgramParameter(f,T.VALIDATE_STATUS)+` Material Name: `+b.name+` Material Type: `+b.type+` Program Info Log: `+O+` `+z+` -`+X)}else O!==""?console.warn("THREE.WebGLProgram: Program Info Log:",O):(I===""||D==="")&&(G=!1);G&&(b.diagnostics={runnable:B,programLog:O,vertexShader:{log:I,prefix:o},fragmentShader:{log:D,prefix:c}})}T.deleteShader(S),T.deleteShader(M),C=new pm(T,f),A=E6(T,f)}let C;this.getUniforms=function(){return C===void 0&&w(this),C};let A;this.getAttributes=function(){return A===void 0&&w(this),A};let P=i.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return P===!1&&(P=T.getProgramParameter(f,d6)),P},this.destroy=function(){x.releaseStatesOfProgram(this),T.deleteProgram(f),this.program=void 0},this.type=i.shaderType,this.name=i.shaderName,this.id=p6++,this.cacheKey=t,this.usedTimes=1,this.program=f,this.vertexShader=S,this.fragmentShader=M,this}let I6=0;class N6{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){const i=t.vertexShader,x=t.fragmentShader,T=this._getShaderStage(i),E=this._getShaderStage(x),s=this._getShaderCacheForMaterial(t);return s.has(T)===!1&&(s.add(T),T.usedTimes++),s.has(E)===!1&&(s.add(E),E.usedTimes++),this}remove(t){const i=this.materialCache.get(t);for(const x of i)x.usedTimes--,x.usedTimes===0&&this.shaderCache.delete(x.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){const i=this.materialCache;let x=i.get(t);return x===void 0&&(x=new Set,i.set(t,x)),x}_getShaderStage(t){const i=this.shaderCache;let x=i.get(t);return x===void 0&&(x=new B6(t),i.set(t,x)),x}}class B6{constructor(t){this.id=I6++,this.code=t,this.usedTimes=0}}function U6(g,t,i,x,T,E,s){const y=new Cu,e=new N6,r=new Set,d=[],h=T.isWebGL2,a=T.logarithmicDepthBuffer,l=T.vertexTextures;let n=T.precision;const u={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function f(A){return r.add(A),A===0?"uv":`uv${A}`}function o(A,P,b,O,I){const D=O.fog,B=I.geometry,G=A.isMeshStandardMaterial?O.environment:null,z=(A.isMeshStandardMaterial?i:t).get(A.envMap||G),X=z&&z.mapping===oc?z.image.height:null,j=u[A.type];A.precision!==null&&(n=T.getMaxPrecision(A.precision),n!==A.precision&&console.warn("THREE.WebGLProgram.getParameters:",A.precision,"not supported, using",n,"instead."));const Q=B.morphAttributes.position||B.morphAttributes.normal||B.morphAttributes.color,tt=Q!==void 0?Q.length:0;let Y=0;B.morphAttributes.position!==void 0&&(Y=1),B.morphAttributes.normal!==void 0&&(Y=2),B.morphAttributes.color!==void 0&&(Y=3);let Z,U,H,$;if(j){const Ii=io[j];Z=Ii.vertexShader,U=Ii.fragmentShader}else Z=A.vertexShader,U=A.fragmentShader,e.update(A),H=e.getVertexShaderID(A),$=e.getFragmentShaderID(A);const _=g.getRenderTarget(),q=I.isInstancedMesh===!0,at=I.isBatchedMesh===!0,ot=!!A.map,rt=!!A.matcap,gt=!!z,yt=!!A.aoMap,Et=!!A.lightMap,At=!!A.bumpMap,Pt=!!A.normalMap,Vt=!!A.displacementMap,dt=!!A.emissiveMap,ut=!!A.metalnessMap,Rt=!!A.roughnessMap,Dt=A.anisotropy>0,Ht=A.clearcoat>0,Bt=A.iridescence>0,re=A.sheen>0,le=A.transmission>0,ge=Dt&&!!A.anisotropyMap,xe=Ht&&!!A.clearcoatMap,Pe=Ht&&!!A.clearcoatNormalMap,te=Ht&&!!A.clearcoatRoughnessMap,Ge=Bt&&!!A.iridescenceMap,Oe=Bt&&!!A.iridescenceThicknessMap,Be=re&&!!A.sheenColorMap,Le=re&&!!A.sheenRoughnessMap,ne=!!A.specularMap,je=!!A.specularColorMap,si=!!A.specularIntensityMap,Mi=le&&!!A.transmissionMap,he=le&&!!A.thicknessMap,Ti=!!A.gradientMap,bt=!!A.alphaMap,Ce=A.alphaTest>0,we=!!A.alphaHash,Ve=!!A.extensions;let $e=zo;A.toneMapped&&(_===null||_.isXRRenderTarget===!0)&&($e=g.toneMapping);const Gi={isWebGL2:h,shaderID:j,shaderType:A.type,shaderName:A.name,vertexShader:Z,fragmentShader:U,defines:A.defines,customVertexShaderID:H,customFragmentShaderID:$,isRawShaderMaterial:A.isRawShaderMaterial===!0,glslVersion:A.glslVersion,precision:n,batching:at,instancing:q,instancingColor:q&&I.instanceColor!==null,supportsVertexTextures:l,outputColorSpace:_===null?g.outputColorSpace:_.isXRRenderTarget===!0?_.texture.colorSpace:Ho,alphaToCoverage:!!A.alphaToCoverage,map:ot,matcap:rt,envMap:gt,envMapMode:gt&&z.mapping,envMapCubeUVHeight:X,aoMap:yt,lightMap:Et,bumpMap:At,normalMap:Pt,displacementMap:l&&Vt,emissiveMap:dt,normalMapObjectSpace:Pt&&A.normalMapType===l2,normalMapTangentSpace:Pt&&A.normalMapType===Eh,metalnessMap:ut,roughnessMap:Rt,anisotropy:Dt,anisotropyMap:ge,clearcoat:Ht,clearcoatMap:xe,clearcoatNormalMap:Pe,clearcoatRoughnessMap:te,iridescence:Bt,iridescenceMap:Ge,iridescenceThicknessMap:Oe,sheen:re,sheenColorMap:Be,sheenRoughnessMap:Le,specularMap:ne,specularColorMap:je,specularIntensityMap:si,transmission:le,transmissionMap:Mi,thicknessMap:he,gradientMap:Ti,opaque:A.transparent===!1&&A.blending===Tu&&A.alphaToCoverage===!1,alphaMap:bt,alphaTest:Ce,alphaHash:we,combine:A.combine,mapUv:ot&&f(A.map.channel),aoMapUv:yt&&f(A.aoMap.channel),lightMapUv:Et&&f(A.lightMap.channel),bumpMapUv:At&&f(A.bumpMap.channel),normalMapUv:Pt&&f(A.normalMap.channel),displacementMapUv:Vt&&f(A.displacementMap.channel),emissiveMapUv:dt&&f(A.emissiveMap.channel),metalnessMapUv:ut&&f(A.metalnessMap.channel),roughnessMapUv:Rt&&f(A.roughnessMap.channel),anisotropyMapUv:ge&&f(A.anisotropyMap.channel),clearcoatMapUv:xe&&f(A.clearcoatMap.channel),clearcoatNormalMapUv:Pe&&f(A.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:te&&f(A.clearcoatRoughnessMap.channel),iridescenceMapUv:Ge&&f(A.iridescenceMap.channel),iridescenceThicknessMapUv:Oe&&f(A.iridescenceThicknessMap.channel),sheenColorMapUv:Be&&f(A.sheenColorMap.channel),sheenRoughnessMapUv:Le&&f(A.sheenRoughnessMap.channel),specularMapUv:ne&&f(A.specularMap.channel),specularColorMapUv:je&&f(A.specularColorMap.channel),specularIntensityMapUv:si&&f(A.specularIntensityMap.channel),transmissionMapUv:Mi&&f(A.transmissionMap.channel),thicknessMapUv:he&&f(A.thicknessMap.channel),alphaMapUv:bt&&f(A.alphaMap.channel),vertexTangents:!!B.attributes.tangent&&(Pt||Dt),vertexColors:A.vertexColors,vertexAlphas:A.vertexColors===!0&&!!B.attributes.color&&B.attributes.color.itemSize===4,pointsUvs:I.isPoints===!0&&!!B.attributes.uv&&(ot||bt),fog:!!D,useFog:A.fog===!0,fogExp2:!!D&&D.isFogExp2,flatShading:A.flatShading===!0,sizeAttenuation:A.sizeAttenuation===!0,logarithmicDepthBuffer:a,skinning:I.isSkinnedMesh===!0,morphTargets:B.morphAttributes.position!==void 0,morphNormals:B.morphAttributes.normal!==void 0,morphColors:B.morphAttributes.color!==void 0,morphTargetsCount:tt,morphTextureStride:Y,numDirLights:P.directional.length,numPointLights:P.point.length,numSpotLights:P.spot.length,numSpotLightMaps:P.spotLightMap.length,numRectAreaLights:P.rectArea.length,numHemiLights:P.hemi.length,numDirLightShadows:P.directionalShadowMap.length,numPointLightShadows:P.pointShadowMap.length,numSpotLightShadows:P.spotShadowMap.length,numSpotLightShadowsWithMaps:P.numSpotLightShadowsWithMaps,numLightProbes:P.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:A.dithering,shadowMapEnabled:g.shadowMap.enabled&&b.length>0,shadowMapType:g.shadowMap.type,toneMapping:$e,useLegacyLights:g._useLegacyLights,decodeVideoTexture:ot&&A.map.isVideoTexture===!0&&sn.getTransfer(A.map.colorSpace)===mn,premultipliedAlpha:A.premultipliedAlpha,doubleSided:A.side===Io,flipSided:A.side===gs,useDepthPacking:A.depthPacking>=0,depthPacking:A.depthPacking||0,index0AttributeName:A.index0AttributeName,extensionDerivatives:Ve&&A.extensions.derivatives===!0,extensionFragDepth:Ve&&A.extensions.fragDepth===!0,extensionDrawBuffers:Ve&&A.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ve&&A.extensions.shaderTextureLOD===!0,extensionClipCullDistance:Ve&&A.extensions.clipCullDistance===!0&&x.has("WEBGL_clip_cull_distance"),extensionMultiDraw:Ve&&A.extensions.multiDraw===!0&&x.has("WEBGL_multi_draw"),rendererExtensionFragDepth:h||x.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||x.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||x.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:x.has("KHR_parallel_shader_compile"),customProgramCacheKey:A.customProgramCacheKey()};return Gi.vertexUv1s=r.has(1),Gi.vertexUv2s=r.has(2),Gi.vertexUv3s=r.has(3),r.clear(),Gi}function c(A){const P=[];if(A.shaderID?P.push(A.shaderID):(P.push(A.customVertexShaderID),P.push(A.customFragmentShaderID)),A.defines!==void 0)for(const b in A.defines)P.push(b),P.push(A.defines[b]);return A.isRawShaderMaterial===!1&&(p(P,A),v(P,A),P.push(g.outputColorSpace)),P.push(A.customProgramCacheKey),P.join()}function p(A,P){A.push(P.precision),A.push(P.outputColorSpace),A.push(P.envMapMode),A.push(P.envMapCubeUVHeight),A.push(P.mapUv),A.push(P.alphaMapUv),A.push(P.lightMapUv),A.push(P.aoMapUv),A.push(P.bumpMapUv),A.push(P.normalMapUv),A.push(P.displacementMapUv),A.push(P.emissiveMapUv),A.push(P.metalnessMapUv),A.push(P.roughnessMapUv),A.push(P.anisotropyMapUv),A.push(P.clearcoatMapUv),A.push(P.clearcoatNormalMapUv),A.push(P.clearcoatRoughnessMapUv),A.push(P.iridescenceMapUv),A.push(P.iridescenceThicknessMapUv),A.push(P.sheenColorMapUv),A.push(P.sheenRoughnessMapUv),A.push(P.specularMapUv),A.push(P.specularColorMapUv),A.push(P.specularIntensityMapUv),A.push(P.transmissionMapUv),A.push(P.thicknessMapUv),A.push(P.combine),A.push(P.fogExp2),A.push(P.sizeAttenuation),A.push(P.morphTargetsCount),A.push(P.morphAttributeCount),A.push(P.numDirLights),A.push(P.numPointLights),A.push(P.numSpotLights),A.push(P.numSpotLightMaps),A.push(P.numHemiLights),A.push(P.numRectAreaLights),A.push(P.numDirLightShadows),A.push(P.numPointLightShadows),A.push(P.numSpotLightShadows),A.push(P.numSpotLightShadowsWithMaps),A.push(P.numLightProbes),A.push(P.shadowMapType),A.push(P.toneMapping),A.push(P.numClippingPlanes),A.push(P.numClipIntersection),A.push(P.depthPacking)}function v(A,P){y.disableAll(),P.isWebGL2&&y.enable(0),P.supportsVertexTextures&&y.enable(1),P.instancing&&y.enable(2),P.instancingColor&&y.enable(3),P.matcap&&y.enable(4),P.envMap&&y.enable(5),P.normalMapObjectSpace&&y.enable(6),P.normalMapTangentSpace&&y.enable(7),P.clearcoat&&y.enable(8),P.iridescence&&y.enable(9),P.alphaTest&&y.enable(10),P.vertexColors&&y.enable(11),P.vertexAlphas&&y.enable(12),P.vertexUv1s&&y.enable(13),P.vertexUv2s&&y.enable(14),P.vertexUv3s&&y.enable(15),P.vertexTangents&&y.enable(16),P.anisotropy&&y.enable(17),P.alphaHash&&y.enable(18),P.batching&&y.enable(19),A.push(y.mask),y.disableAll(),P.fog&&y.enable(0),P.useFog&&y.enable(1),P.flatShading&&y.enable(2),P.logarithmicDepthBuffer&&y.enable(3),P.skinning&&y.enable(4),P.morphTargets&&y.enable(5),P.morphNormals&&y.enable(6),P.morphColors&&y.enable(7),P.premultipliedAlpha&&y.enable(8),P.shadowMapEnabled&&y.enable(9),P.useLegacyLights&&y.enable(10),P.doubleSided&&y.enable(11),P.flipSided&&y.enable(12),P.useDepthPacking&&y.enable(13),P.dithering&&y.enable(14),P.transmission&&y.enable(15),P.sheen&&y.enable(16),P.opaque&&y.enable(17),P.pointsUvs&&y.enable(18),P.decodeVideoTexture&&y.enable(19),P.alphaToCoverage&&y.enable(20),A.push(y.mask)}function m(A){const P=u[A.type];let b;if(P){const O=io[P];b=T2.clone(O.uniforms)}else b=A.uniforms;return b}function S(A,P){let b;for(let O=0,I=d.length;O0?x.push(o):l.transparent===!0?T.push(o):i.push(o)}function e(h,a,l,n,u,f){const o=s(h,a,l,n,u,f);l.transmission>0?x.unshift(o):l.transparent===!0?T.unshift(o):i.unshift(o)}function r(h,a){i.length>1&&i.sort(h||G6),x.length>1&&x.sort(a||dE),T.length>1&&T.sort(a||dE)}function d(){for(let h=t,a=g.length;h=E.length?(s=new pE,E.push(s)):s=E[T],s}function i(){g=new WeakMap}return{get:t,dispose:i}}function H6(){const g={};return{get:function(t){if(g[t.id]!==void 0)return g[t.id];let i;switch(t.type){case"DirectionalLight":i={direction:new Ct,color:new ze};break;case"SpotLight":i={position:new Ct,direction:new Ct,color:new ze,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":i={position:new Ct,color:new ze,distance:0,decay:0};break;case"HemisphereLight":i={direction:new Ct,skyColor:new ze,groundColor:new ze};break;case"RectAreaLight":i={color:new ze,position:new Ct,halfWidth:new Ct,halfHeight:new Ct};break}return g[t.id]=i,i}}}function W6(){const g={};return{get:function(t){if(g[t.id]!==void 0)return g[t.id];let i;switch(t.type){case"DirectionalLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve};break;case"SpotLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve};break;case"PointLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve,shadowCameraNear:1,shadowCameraFar:1e3};break}return g[t.id]=i,i}}}let X6=0;function Y6(g,t){return(t.castShadow?2:0)-(g.castShadow?2:0)+(t.map?1:0)-(g.map?1:0)}function k6(g,t){const i=new H6,x=W6(),T={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let d=0;d<9;d++)T.probe.push(new Ct);const E=new Ct,s=new di,y=new di;function e(d,h){let a=0,l=0,n=0;for(let b=0;b<9;b++)T.probe[b].set(0,0,0);let u=0,f=0,o=0,c=0,p=0,v=0,m=0,S=0,M=0,w=0,C=0;d.sort(Y6);const A=h===!0?Math.PI:1;for(let b=0,O=d.length;b0&&(t.isWebGL2?g.has("OES_texture_float_linear")===!0?(T.rectAreaLTC1=Fe.LTC_FLOAT_1,T.rectAreaLTC2=Fe.LTC_FLOAT_2):(T.rectAreaLTC1=Fe.LTC_HALF_1,T.rectAreaLTC2=Fe.LTC_HALF_2):g.has("OES_texture_float_linear")===!0?(T.rectAreaLTC1=Fe.LTC_FLOAT_1,T.rectAreaLTC2=Fe.LTC_FLOAT_2):g.has("OES_texture_half_float_linear")===!0?(T.rectAreaLTC1=Fe.LTC_HALF_1,T.rectAreaLTC2=Fe.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),T.ambient[0]=a,T.ambient[1]=l,T.ambient[2]=n;const P=T.hash;(P.directionalLength!==u||P.pointLength!==f||P.spotLength!==o||P.rectAreaLength!==c||P.hemiLength!==p||P.numDirectionalShadows!==v||P.numPointShadows!==m||P.numSpotShadows!==S||P.numSpotMaps!==M||P.numLightProbes!==C)&&(T.directional.length=u,T.spot.length=o,T.rectArea.length=c,T.point.length=f,T.hemi.length=p,T.directionalShadow.length=v,T.directionalShadowMap.length=v,T.pointShadow.length=m,T.pointShadowMap.length=m,T.spotShadow.length=S,T.spotShadowMap.length=S,T.directionalShadowMatrix.length=v,T.pointShadowMatrix.length=m,T.spotLightMatrix.length=S+M-w,T.spotLightMap.length=M,T.numSpotLightShadowsWithMaps=w,T.numLightProbes=C,P.directionalLength=u,P.pointLength=f,P.spotLength=o,P.rectAreaLength=c,P.hemiLength=p,P.numDirectionalShadows=v,P.numPointShadows=m,P.numSpotShadows=S,P.numSpotMaps=M,P.numLightProbes=C,T.version=X6++)}function r(d,h){let a=0,l=0,n=0,u=0,f=0;const o=h.matrixWorldInverse;for(let c=0,p=d.length;c=y.length?(e=new vE(g,t),y.push(e)):e=y[s],e}function T(){i=new WeakMap}return{get:x,dispose:T}}class P1 extends Wr{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=a2,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class R1 extends Wr{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}const K6=`void main() { +`+X)}else O!==""?console.warn("THREE.WebGLProgram: Program Info Log:",O):(I===""||D==="")&&(G=!1);G&&(b.diagnostics={runnable:B,programLog:O,vertexShader:{log:I,prefix:o},fragmentShader:{log:D,prefix:c}})}T.deleteShader(S),T.deleteShader(M),C=new vm(T,f),A=S6(T,f)}let C;this.getUniforms=function(){return C===void 0&&w(this),C};let A;this.getAttributes=function(){return A===void 0&&w(this),A};let P=i.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return P===!1&&(P=T.getProgramParameter(f,f6)),P},this.destroy=function(){y.releaseStatesOfProgram(this),T.deleteProgram(f),this.program=void 0},this.type=i.shaderType,this.name=i.shaderName,this.id=c6++,this.cacheKey=t,this.usedTimes=1,this.program=f,this.vertexShader=S,this.fragmentShader=M,this}let O6=0;class D6{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){const i=t.vertexShader,y=t.fragmentShader,T=this._getShaderStage(i),E=this._getShaderStage(y),s=this._getShaderCacheForMaterial(t);return s.has(T)===!1&&(s.add(T),T.usedTimes++),s.has(E)===!1&&(s.add(E),E.usedTimes++),this}remove(t){const i=this.materialCache.get(t);for(const y of i)y.usedTimes--,y.usedTimes===0&&this.shaderCache.delete(y.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){const i=this.materialCache;let y=i.get(t);return y===void 0&&(y=new Set,i.set(t,y)),y}_getShaderStage(t){const i=this.shaderCache;let y=i.get(t);return y===void 0&&(y=new I6(t),i.set(t,y)),y}}class I6{constructor(t){this.id=O6++,this.code=t,this.usedTimes=0}}function N6(g,t,i,y,T,E,s){const x=new Cu,e=new D6,r=new Set,d=[],h=T.isWebGL2,a=T.logarithmicDepthBuffer,l=T.vertexTextures;let n=T.precision;const u={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function f(A){return r.add(A),A===0?"uv":`uv${A}`}function o(A,P,b,O,I){const D=O.fog,B=I.geometry,G=A.isMeshStandardMaterial?O.environment:null,z=(A.isMeshStandardMaterial?i:t).get(A.envMap||G),X=z&&z.mapping===ac?z.image.height:null,j=u[A.type];A.precision!==null&&(n=T.getMaxPrecision(A.precision),n!==A.precision&&console.warn("THREE.WebGLProgram.getParameters:",A.precision,"not supported, using",n,"instead."));const Q=B.morphAttributes.position||B.morphAttributes.normal||B.morphAttributes.color,tt=Q!==void 0?Q.length:0;let Y=0;B.morphAttributes.position!==void 0&&(Y=1),B.morphAttributes.normal!==void 0&&(Y=2),B.morphAttributes.color!==void 0&&(Y=3);let $,U,H,Z;if(j){const Ii=io[j];$=Ii.vertexShader,U=Ii.fragmentShader}else $=A.vertexShader,U=A.fragmentShader,e.update(A),H=e.getVertexShaderID(A),Z=e.getFragmentShaderID(A);const _=g.getRenderTarget(),q=I.isInstancedMesh===!0,at=I.isBatchedMesh===!0,ot=!!A.map,rt=!!A.matcap,gt=!!z,yt=!!A.aoMap,Et=!!A.lightMap,At=!!A.bumpMap,Pt=!!A.normalMap,Vt=!!A.displacementMap,dt=!!A.emissiveMap,ut=!!A.metalnessMap,Rt=!!A.roughnessMap,Dt=A.anisotropy>0,Ht=A.clearcoat>0,Bt=A.iridescence>0,re=A.sheen>0,le=A.transmission>0,ge=Dt&&!!A.anisotropyMap,xe=Ht&&!!A.clearcoatMap,Pe=Ht&&!!A.clearcoatNormalMap,te=Ht&&!!A.clearcoatRoughnessMap,Ve=Bt&&!!A.iridescenceMap,De=Bt&&!!A.iridescenceThicknessMap,Ue=re&&!!A.sheenColorMap,Le=re&&!!A.sheenRoughnessMap,ne=!!A.specularMap,Ke=!!A.specularColorMap,si=!!A.specularIntensityMap,Mi=le&&!!A.transmissionMap,he=le&&!!A.thicknessMap,Ti=!!A.gradientMap,bt=!!A.alphaMap,Ce=A.alphaTest>0,we=!!A.alphaHash,He=!!A.extensions;let Je=zo;A.toneMapped&&(_===null||_.isXRRenderTarget===!0)&&(Je=g.toneMapping);const Gi={isWebGL2:h,shaderID:j,shaderType:A.type,shaderName:A.name,vertexShader:$,fragmentShader:U,defines:A.defines,customVertexShaderID:H,customFragmentShaderID:Z,isRawShaderMaterial:A.isRawShaderMaterial===!0,glslVersion:A.glslVersion,precision:n,batching:at,instancing:q,instancingColor:q&&I.instanceColor!==null,supportsVertexTextures:l,outputColorSpace:_===null?g.outputColorSpace:_.isXRRenderTarget===!0?_.texture.colorSpace:Ho,alphaToCoverage:!!A.alphaToCoverage,map:ot,matcap:rt,envMap:gt,envMapMode:gt&&z.mapping,envMapCubeUVHeight:X,aoMap:yt,lightMap:Et,bumpMap:At,normalMap:Pt,displacementMap:l&&Vt,emissiveMap:dt,normalMapObjectSpace:Pt&&A.normalMapType===u2,normalMapTangentSpace:Pt&&A.normalMapType===Th,metalnessMap:ut,roughnessMap:Rt,anisotropy:Dt,anisotropyMap:ge,clearcoat:Ht,clearcoatMap:xe,clearcoatNormalMap:Pe,clearcoatRoughnessMap:te,iridescence:Bt,iridescenceMap:Ve,iridescenceThicknessMap:De,sheen:re,sheenColorMap:Ue,sheenRoughnessMap:Le,specularMap:ne,specularColorMap:Ke,specularIntensityMap:si,transmission:le,transmissionMap:Mi,thicknessMap:he,gradientMap:Ti,opaque:A.transparent===!1&&A.blending===Tu&&A.alphaToCoverage===!1,alphaMap:bt,alphaTest:Ce,alphaHash:we,combine:A.combine,mapUv:ot&&f(A.map.channel),aoMapUv:yt&&f(A.aoMap.channel),lightMapUv:Et&&f(A.lightMap.channel),bumpMapUv:At&&f(A.bumpMap.channel),normalMapUv:Pt&&f(A.normalMap.channel),displacementMapUv:Vt&&f(A.displacementMap.channel),emissiveMapUv:dt&&f(A.emissiveMap.channel),metalnessMapUv:ut&&f(A.metalnessMap.channel),roughnessMapUv:Rt&&f(A.roughnessMap.channel),anisotropyMapUv:ge&&f(A.anisotropyMap.channel),clearcoatMapUv:xe&&f(A.clearcoatMap.channel),clearcoatNormalMapUv:Pe&&f(A.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:te&&f(A.clearcoatRoughnessMap.channel),iridescenceMapUv:Ve&&f(A.iridescenceMap.channel),iridescenceThicknessMapUv:De&&f(A.iridescenceThicknessMap.channel),sheenColorMapUv:Ue&&f(A.sheenColorMap.channel),sheenRoughnessMapUv:Le&&f(A.sheenRoughnessMap.channel),specularMapUv:ne&&f(A.specularMap.channel),specularColorMapUv:Ke&&f(A.specularColorMap.channel),specularIntensityMapUv:si&&f(A.specularIntensityMap.channel),transmissionMapUv:Mi&&f(A.transmissionMap.channel),thicknessMapUv:he&&f(A.thicknessMap.channel),alphaMapUv:bt&&f(A.alphaMap.channel),vertexTangents:!!B.attributes.tangent&&(Pt||Dt),vertexColors:A.vertexColors,vertexAlphas:A.vertexColors===!0&&!!B.attributes.color&&B.attributes.color.itemSize===4,pointsUvs:I.isPoints===!0&&!!B.attributes.uv&&(ot||bt),fog:!!D,useFog:A.fog===!0,fogExp2:!!D&&D.isFogExp2,flatShading:A.flatShading===!0,sizeAttenuation:A.sizeAttenuation===!0,logarithmicDepthBuffer:a,skinning:I.isSkinnedMesh===!0,morphTargets:B.morphAttributes.position!==void 0,morphNormals:B.morphAttributes.normal!==void 0,morphColors:B.morphAttributes.color!==void 0,morphTargetsCount:tt,morphTextureStride:Y,numDirLights:P.directional.length,numPointLights:P.point.length,numSpotLights:P.spot.length,numSpotLightMaps:P.spotLightMap.length,numRectAreaLights:P.rectArea.length,numHemiLights:P.hemi.length,numDirLightShadows:P.directionalShadowMap.length,numPointLightShadows:P.pointShadowMap.length,numSpotLightShadows:P.spotShadowMap.length,numSpotLightShadowsWithMaps:P.numSpotLightShadowsWithMaps,numLightProbes:P.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:A.dithering,shadowMapEnabled:g.shadowMap.enabled&&b.length>0,shadowMapType:g.shadowMap.type,toneMapping:Je,useLegacyLights:g._useLegacyLights,decodeVideoTexture:ot&&A.map.isVideoTexture===!0&&an.getTransfer(A.map.colorSpace)===gn,premultipliedAlpha:A.premultipliedAlpha,doubleSided:A.side===Io,flipSided:A.side===gs,useDepthPacking:A.depthPacking>=0,depthPacking:A.depthPacking||0,index0AttributeName:A.index0AttributeName,extensionDerivatives:He&&A.extensions.derivatives===!0,extensionFragDepth:He&&A.extensions.fragDepth===!0,extensionDrawBuffers:He&&A.extensions.drawBuffers===!0,extensionShaderTextureLOD:He&&A.extensions.shaderTextureLOD===!0,extensionClipCullDistance:He&&A.extensions.clipCullDistance===!0&&y.has("WEBGL_clip_cull_distance"),extensionMultiDraw:He&&A.extensions.multiDraw===!0&&y.has("WEBGL_multi_draw"),rendererExtensionFragDepth:h||y.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||y.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||y.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:y.has("KHR_parallel_shader_compile"),customProgramCacheKey:A.customProgramCacheKey()};return Gi.vertexUv1s=r.has(1),Gi.vertexUv2s=r.has(2),Gi.vertexUv3s=r.has(3),r.clear(),Gi}function c(A){const P=[];if(A.shaderID?P.push(A.shaderID):(P.push(A.customVertexShaderID),P.push(A.customFragmentShaderID)),A.defines!==void 0)for(const b in A.defines)P.push(b),P.push(A.defines[b]);return A.isRawShaderMaterial===!1&&(p(P,A),v(P,A),P.push(g.outputColorSpace)),P.push(A.customProgramCacheKey),P.join()}function p(A,P){A.push(P.precision),A.push(P.outputColorSpace),A.push(P.envMapMode),A.push(P.envMapCubeUVHeight),A.push(P.mapUv),A.push(P.alphaMapUv),A.push(P.lightMapUv),A.push(P.aoMapUv),A.push(P.bumpMapUv),A.push(P.normalMapUv),A.push(P.displacementMapUv),A.push(P.emissiveMapUv),A.push(P.metalnessMapUv),A.push(P.roughnessMapUv),A.push(P.anisotropyMapUv),A.push(P.clearcoatMapUv),A.push(P.clearcoatNormalMapUv),A.push(P.clearcoatRoughnessMapUv),A.push(P.iridescenceMapUv),A.push(P.iridescenceThicknessMapUv),A.push(P.sheenColorMapUv),A.push(P.sheenRoughnessMapUv),A.push(P.specularMapUv),A.push(P.specularColorMapUv),A.push(P.specularIntensityMapUv),A.push(P.transmissionMapUv),A.push(P.thicknessMapUv),A.push(P.combine),A.push(P.fogExp2),A.push(P.sizeAttenuation),A.push(P.morphTargetsCount),A.push(P.morphAttributeCount),A.push(P.numDirLights),A.push(P.numPointLights),A.push(P.numSpotLights),A.push(P.numSpotLightMaps),A.push(P.numHemiLights),A.push(P.numRectAreaLights),A.push(P.numDirLightShadows),A.push(P.numPointLightShadows),A.push(P.numSpotLightShadows),A.push(P.numSpotLightShadowsWithMaps),A.push(P.numLightProbes),A.push(P.shadowMapType),A.push(P.toneMapping),A.push(P.numClippingPlanes),A.push(P.numClipIntersection),A.push(P.depthPacking)}function v(A,P){x.disableAll(),P.isWebGL2&&x.enable(0),P.supportsVertexTextures&&x.enable(1),P.instancing&&x.enable(2),P.instancingColor&&x.enable(3),P.matcap&&x.enable(4),P.envMap&&x.enable(5),P.normalMapObjectSpace&&x.enable(6),P.normalMapTangentSpace&&x.enable(7),P.clearcoat&&x.enable(8),P.iridescence&&x.enable(9),P.alphaTest&&x.enable(10),P.vertexColors&&x.enable(11),P.vertexAlphas&&x.enable(12),P.vertexUv1s&&x.enable(13),P.vertexUv2s&&x.enable(14),P.vertexUv3s&&x.enable(15),P.vertexTangents&&x.enable(16),P.anisotropy&&x.enable(17),P.alphaHash&&x.enable(18),P.batching&&x.enable(19),A.push(x.mask),x.disableAll(),P.fog&&x.enable(0),P.useFog&&x.enable(1),P.flatShading&&x.enable(2),P.logarithmicDepthBuffer&&x.enable(3),P.skinning&&x.enable(4),P.morphTargets&&x.enable(5),P.morphNormals&&x.enable(6),P.morphColors&&x.enable(7),P.premultipliedAlpha&&x.enable(8),P.shadowMapEnabled&&x.enable(9),P.useLegacyLights&&x.enable(10),P.doubleSided&&x.enable(11),P.flipSided&&x.enable(12),P.useDepthPacking&&x.enable(13),P.dithering&&x.enable(14),P.transmission&&x.enable(15),P.sheen&&x.enable(16),P.opaque&&x.enable(17),P.pointsUvs&&x.enable(18),P.decodeVideoTexture&&x.enable(19),P.alphaToCoverage&&x.enable(20),A.push(x.mask)}function m(A){const P=u[A.type];let b;if(P){const O=io[P];b=M2.clone(O.uniforms)}else b=A.uniforms;return b}function S(A,P){let b;for(let O=0,I=d.length;O0?y.push(o):l.transparent===!0?T.push(o):i.push(o)}function e(h,a,l,n,u,f){const o=s(h,a,l,n,u,f);l.transmission>0?y.unshift(o):l.transparent===!0?T.unshift(o):i.unshift(o)}function r(h,a){i.length>1&&i.sort(h||U6),y.length>1&&y.sort(a||vE),T.length>1&&T.sort(a||vE)}function d(){for(let h=t,a=g.length;h=E.length?(s=new mE,E.push(s)):s=E[T],s}function i(){g=new WeakMap}return{get:t,dispose:i}}function G6(){const g={};return{get:function(t){if(g[t.id]!==void 0)return g[t.id];let i;switch(t.type){case"DirectionalLight":i={direction:new Ct,color:new Ge};break;case"SpotLight":i={position:new Ct,direction:new Ct,color:new Ge,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":i={position:new Ct,color:new Ge,distance:0,decay:0};break;case"HemisphereLight":i={direction:new Ct,skyColor:new Ge,groundColor:new Ge};break;case"RectAreaLight":i={color:new Ge,position:new Ct,halfWidth:new Ct,halfHeight:new Ct};break}return g[t.id]=i,i}}}function V6(){const g={};return{get:function(t){if(g[t.id]!==void 0)return g[t.id];let i;switch(t.type){case"DirectionalLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve};break;case"SpotLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve};break;case"PointLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve,shadowCameraNear:1,shadowCameraFar:1e3};break}return g[t.id]=i,i}}}let H6=0;function W6(g,t){return(t.castShadow?2:0)-(g.castShadow?2:0)+(t.map?1:0)-(g.map?1:0)}function X6(g,t){const i=new G6,y=V6(),T={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let d=0;d<9;d++)T.probe.push(new Ct);const E=new Ct,s=new di,x=new di;function e(d,h){let a=0,l=0,n=0;for(let b=0;b<9;b++)T.probe[b].set(0,0,0);let u=0,f=0,o=0,c=0,p=0,v=0,m=0,S=0,M=0,w=0,C=0;d.sort(W6);const A=h===!0?Math.PI:1;for(let b=0,O=d.length;b0&&(t.isWebGL2?g.has("OES_texture_float_linear")===!0?(T.rectAreaLTC1=Fe.LTC_FLOAT_1,T.rectAreaLTC2=Fe.LTC_FLOAT_2):(T.rectAreaLTC1=Fe.LTC_HALF_1,T.rectAreaLTC2=Fe.LTC_HALF_2):g.has("OES_texture_float_linear")===!0?(T.rectAreaLTC1=Fe.LTC_FLOAT_1,T.rectAreaLTC2=Fe.LTC_FLOAT_2):g.has("OES_texture_half_float_linear")===!0?(T.rectAreaLTC1=Fe.LTC_HALF_1,T.rectAreaLTC2=Fe.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),T.ambient[0]=a,T.ambient[1]=l,T.ambient[2]=n;const P=T.hash;(P.directionalLength!==u||P.pointLength!==f||P.spotLength!==o||P.rectAreaLength!==c||P.hemiLength!==p||P.numDirectionalShadows!==v||P.numPointShadows!==m||P.numSpotShadows!==S||P.numSpotMaps!==M||P.numLightProbes!==C)&&(T.directional.length=u,T.spot.length=o,T.rectArea.length=c,T.point.length=f,T.hemi.length=p,T.directionalShadow.length=v,T.directionalShadowMap.length=v,T.pointShadow.length=m,T.pointShadowMap.length=m,T.spotShadow.length=S,T.spotShadowMap.length=S,T.directionalShadowMatrix.length=v,T.pointShadowMatrix.length=m,T.spotLightMatrix.length=S+M-w,T.spotLightMap.length=M,T.numSpotLightShadowsWithMaps=w,T.numLightProbes=C,P.directionalLength=u,P.pointLength=f,P.spotLength=o,P.rectAreaLength=c,P.hemiLength=p,P.numDirectionalShadows=v,P.numPointShadows=m,P.numSpotShadows=S,P.numSpotMaps=M,P.numLightProbes=C,T.version=H6++)}function r(d,h){let a=0,l=0,n=0,u=0,f=0;const o=h.matrixWorldInverse;for(let c=0,p=d.length;c=x.length?(e=new gE(g,t),x.push(e)):e=x[s],e}function T(){i=new WeakMap}return{get:y,dispose:T}}class R1 extends Wr{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=l2,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class b1 extends Wr{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}const k6=`void main() { gl_Position = vec4( position, 1.0 ); -}`,Z6=`uniform sampler2D shadow_pass; +}`,j6=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -10141,12 +10143,12 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function $6(g,t,i){let x=new ip;const T=new ve,E=new ve,s=new an,y=new P1({depthPacking:o2}),e=new R1,r={},d=i.maxTextureSize,h={[Pl]:gs,[gs]:Pl,[Io]:Io},a=new so({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ve},radius:{value:4}},vertexShader:K6,fragmentShader:Z6}),l=a.clone();l.defines.HORIZONTAL_PASS=1;const n=new Fi;n.setAttribute("position",new on(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const u=new dr(n,a),f=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=ug;let o=this.type;this.render=function(S,M,w){if(f.enabled===!1||f.autoUpdate===!1&&f.needsUpdate===!1||S.length===0)return;const C=g.getRenderTarget(),A=g.getActiveCubeFace(),P=g.getActiveMipmapLevel(),b=g.state;b.setBlending(Al),b.buffers.color.setClear(1,1,1,1),b.buffers.depth.setTest(!0),b.setScissorTest(!1);const O=o!==to&&this.type===to,I=o===to&&this.type!==to;for(let D=0,B=S.length;Dd||T.y>d)&&(T.x>d&&(E.x=Math.floor(d/X.x),T.x=E.x*X.x,z.mapSize.x=E.x),T.y>d&&(E.y=Math.floor(d/X.y),T.y=E.y*X.y,z.mapSize.y=E.y)),z.map===null||O===!0||I===!0){const Q=this.type!==to?{minFilter:rr,magFilter:rr}:{};z.map!==null&&z.map.dispose(),z.map=new ro(T.x,T.y,Q),z.map.texture.name=G.name+".shadowMap",z.camera.updateProjectionMatrix()}g.setRenderTarget(z.map),g.clear();const j=z.getViewportCount();for(let Q=0;Q0||M.map&&M.alphaTest>0){const b=A.uuid,O=M.uuid;let I=r[b];I===void 0&&(I={},r[b]=I);let D=I[O];D===void 0&&(D=A.clone(),I[O]=D,M.addEventListener("dispose",m)),A=D}if(A.visible=M.visible,A.wireframe=M.wireframe,C===to?A.side=M.shadowSide!==null?M.shadowSide:M.side:A.side=M.shadowSide!==null?M.shadowSide:h[M.side],A.alphaMap=M.alphaMap,A.alphaTest=M.alphaTest,A.map=M.map,A.clipShadows=M.clipShadows,A.clippingPlanes=M.clippingPlanes,A.clipIntersection=M.clipIntersection,A.displacementMap=M.displacementMap,A.displacementScale=M.displacementScale,A.displacementBias=M.displacementBias,A.wireframeLinewidth=M.wireframeLinewidth,A.linewidth=M.linewidth,w.isPointLight===!0&&A.isMeshDistanceMaterial===!0){const b=g.properties.get(A);b.light=w}return A}function v(S,M,w,C,A){if(S.visible===!1)return;if(S.layers.test(M.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&A===to)&&(!S.frustumCulled||x.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(w.matrixWorldInverse,S.matrixWorld);const O=t.update(S),I=S.material;if(Array.isArray(I)){const D=O.groups;for(let B=0,G=D.length;B=1):j.indexOf("OpenGL ES")!==-1&&(X=parseFloat(/^OpenGL ES (\d)/.exec(j)[1]),z=X>=2);let Q=null,tt={};const Y=g.getParameter(g.SCISSOR_BOX),Z=g.getParameter(g.VIEWPORT),U=new an().fromArray(Y),H=new an().fromArray(Z);function $(bt,Ce,we,Ve){const $e=new Uint8Array(4),Gi=g.createTexture();g.bindTexture(bt,Gi),g.texParameteri(bt,g.TEXTURE_MIN_FILTER,g.NEAREST),g.texParameteri(bt,g.TEXTURE_MAG_FILTER,g.NEAREST);for(let Ii=0;Ii"u"?!1:/OculusBrowser/g.test(navigator.userAgent),d=new WeakMap;let h;const a=new WeakMap;let l=!1;try{l=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function n(dt,ut){return l?new OffscreenCanvas(dt,ut):Ud("canvas")}function u(dt,ut,Rt,Dt){let Ht=1;if((dt.width>Dt||dt.height>Dt)&&(Ht=Dt/Math.max(dt.width,dt.height)),Ht<1||ut===!0)if(typeof HTMLImageElement<"u"&&dt instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&dt instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&dt instanceof ImageBitmap){const Bt=ut?Rm:Math.floor,re=Bt(Ht*dt.width),le=Bt(Ht*dt.height);h===void 0&&(h=n(re,le));const ge=Rt?n(re,le):h;return ge.width=re,ge.height=le,ge.getContext("2d").drawImage(dt,0,0,re,le),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+dt.width+"x"+dt.height+") to ("+re+"x"+le+")."),ge}else return"data"in dt&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+dt.width+"x"+dt.height+")."),dt;return dt}function f(dt){return Tx(dt.width)&&Tx(dt.height)}function o(dt){return y?!1:dt.wrapS!==Jr||dt.wrapT!==Jr||dt.minFilter!==rr&&dt.minFilter!==Bn}function c(dt,ut){return dt.generateMipmaps&&ut&&dt.minFilter!==rr&&dt.minFilter!==Bn}function p(dt){g.generateMipmap(dt)}function v(dt,ut,Rt,Dt,Ht=!1){if(y===!1)return ut;if(dt!==null){if(g[dt]!==void 0)return g[dt];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+dt+"'")}let Bt=ut;if(ut===g.RED&&(Rt===g.FLOAT&&(Bt=g.R32F),Rt===g.HALF_FLOAT&&(Bt=g.R16F),Rt===g.UNSIGNED_BYTE&&(Bt=g.R8)),ut===g.RED_INTEGER&&(Rt===g.UNSIGNED_BYTE&&(Bt=g.R8UI),Rt===g.UNSIGNED_SHORT&&(Bt=g.R16UI),Rt===g.UNSIGNED_INT&&(Bt=g.R32UI),Rt===g.BYTE&&(Bt=g.R8I),Rt===g.SHORT&&(Bt=g.R16I),Rt===g.INT&&(Bt=g.R32I)),ut===g.RG&&(Rt===g.FLOAT&&(Bt=g.RG32F),Rt===g.HALF_FLOAT&&(Bt=g.RG16F),Rt===g.UNSIGNED_BYTE&&(Bt=g.RG8)),ut===g.RGBA){const re=Ht?Od:sn.getTransfer(Dt);Rt===g.FLOAT&&(Bt=g.RGBA32F),Rt===g.HALF_FLOAT&&(Bt=g.RGBA16F),Rt===g.UNSIGNED_BYTE&&(Bt=re===mn?g.SRGB8_ALPHA8:g.RGBA8),Rt===g.UNSIGNED_SHORT_4_4_4_4&&(Bt=g.RGBA4),Rt===g.UNSIGNED_SHORT_5_5_5_1&&(Bt=g.RGB5_A1)}return(Bt===g.R16F||Bt===g.R32F||Bt===g.RG16F||Bt===g.RG32F||Bt===g.RGBA16F||Bt===g.RGBA32F)&&t.get("EXT_color_buffer_float"),Bt}function m(dt,ut,Rt){return c(dt,Rt)===!0||dt.isFramebufferTexture&&dt.minFilter!==rr&&dt.minFilter!==Bn?Math.log2(Math.max(ut.width,ut.height))+1:dt.mipmaps!==void 0&&dt.mipmaps.length>0?dt.mipmaps.length:dt.isCompressedTexture&&Array.isArray(dt.image)?ut.mipmaps.length:1}function S(dt){return dt===rr||dt===Am||dt===pu?g.NEAREST:g.LINEAR}function M(dt){const ut=dt.target;ut.removeEventListener("dispose",M),C(ut),ut.isVideoTexture&&d.delete(ut)}function w(dt){const ut=dt.target;ut.removeEventListener("dispose",w),P(ut)}function C(dt){const ut=x.get(dt);if(ut.__webglInit===void 0)return;const Rt=dt.source,Dt=a.get(Rt);if(Dt){const Ht=Dt[ut.__cacheKey];Ht.usedTimes--,Ht.usedTimes===0&&A(dt),Object.keys(Dt).length===0&&a.delete(Rt)}x.remove(dt)}function A(dt){const ut=x.get(dt);g.deleteTexture(ut.__webglTexture);const Rt=dt.source,Dt=a.get(Rt);delete Dt[ut.__cacheKey],s.memory.textures--}function P(dt){const ut=dt.texture,Rt=x.get(dt),Dt=x.get(ut);if(Dt.__webglTexture!==void 0&&(g.deleteTexture(Dt.__webglTexture),s.memory.textures--),dt.depthTexture&&dt.depthTexture.dispose(),dt.isWebGLCubeRenderTarget)for(let Ht=0;Ht<6;Ht++){if(Array.isArray(Rt.__webglFramebuffer[Ht]))for(let Bt=0;Bt=T.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+dt+" texture units while this GPU supports only "+T.maxTextures),b+=1,dt}function D(dt){const ut=[];return ut.push(dt.wrapS),ut.push(dt.wrapT),ut.push(dt.wrapR||0),ut.push(dt.magFilter),ut.push(dt.minFilter),ut.push(dt.anisotropy),ut.push(dt.internalFormat),ut.push(dt.format),ut.push(dt.type),ut.push(dt.generateMipmaps),ut.push(dt.premultiplyAlpha),ut.push(dt.flipY),ut.push(dt.unpackAlignment),ut.push(dt.colorSpace),ut.join()}function B(dt,ut){const Rt=x.get(dt);if(dt.isVideoTexture&&Pt(dt),dt.isRenderTargetTexture===!1&&dt.version>0&&Rt.__version!==dt.version){const Dt=dt.image;if(Dt===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Dt.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{U(Rt,dt,ut);return}}i.bindTexture(g.TEXTURE_2D,Rt.__webglTexture,g.TEXTURE0+ut)}function G(dt,ut){const Rt=x.get(dt);if(dt.version>0&&Rt.__version!==dt.version){U(Rt,dt,ut);return}i.bindTexture(g.TEXTURE_2D_ARRAY,Rt.__webglTexture,g.TEXTURE0+ut)}function z(dt,ut){const Rt=x.get(dt);if(dt.version>0&&Rt.__version!==dt.version){U(Rt,dt,ut);return}i.bindTexture(g.TEXTURE_3D,Rt.__webglTexture,g.TEXTURE0+ut)}function X(dt,ut){const Rt=x.get(dt);if(dt.version>0&&Rt.__version!==dt.version){H(Rt,dt,ut);return}i.bindTexture(g.TEXTURE_CUBE_MAP,Rt.__webglTexture,g.TEXTURE0+ut)}const j={[Pd]:g.REPEAT,[Jr]:g.CLAMP_TO_EDGE,[Rd]:g.MIRRORED_REPEAT},Q={[rr]:g.NEAREST,[Am]:g.NEAREST_MIPMAP_NEAREST,[pu]:g.NEAREST_MIPMAP_LINEAR,[Bn]:g.LINEAR,[pd]:g.LINEAR_MIPMAP_NEAREST,[Bo]:g.LINEAR_MIPMAP_LINEAR},tt={[h2]:g.NEVER,[v2]:g.ALWAYS,[u2]:g.LESS,[x1]:g.LEQUAL,[f2]:g.EQUAL,[p2]:g.GEQUAL,[c2]:g.GREATER,[d2]:g.NOTEQUAL};function Y(dt,ut,Rt){if(ut.type===Ma&&t.has("OES_texture_float_linear")===!1&&(ut.magFilter===Bn||ut.magFilter===pd||ut.magFilter===pu||ut.magFilter===Bo||ut.minFilter===Bn||ut.minFilter===pd||ut.minFilter===pu||ut.minFilter===Bo)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),Rt?(g.texParameteri(dt,g.TEXTURE_WRAP_S,j[ut.wrapS]),g.texParameteri(dt,g.TEXTURE_WRAP_T,j[ut.wrapT]),(dt===g.TEXTURE_3D||dt===g.TEXTURE_2D_ARRAY)&&g.texParameteri(dt,g.TEXTURE_WRAP_R,j[ut.wrapR]),g.texParameteri(dt,g.TEXTURE_MAG_FILTER,Q[ut.magFilter]),g.texParameteri(dt,g.TEXTURE_MIN_FILTER,Q[ut.minFilter])):(g.texParameteri(dt,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(dt,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),(dt===g.TEXTURE_3D||dt===g.TEXTURE_2D_ARRAY)&&g.texParameteri(dt,g.TEXTURE_WRAP_R,g.CLAMP_TO_EDGE),(ut.wrapS!==Jr||ut.wrapT!==Jr)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),g.texParameteri(dt,g.TEXTURE_MAG_FILTER,S(ut.magFilter)),g.texParameteri(dt,g.TEXTURE_MIN_FILTER,S(ut.minFilter)),ut.minFilter!==rr&&ut.minFilter!==Bn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),ut.compareFunction&&(g.texParameteri(dt,g.TEXTURE_COMPARE_MODE,g.COMPARE_REF_TO_TEXTURE),g.texParameteri(dt,g.TEXTURE_COMPARE_FUNC,tt[ut.compareFunction])),t.has("EXT_texture_filter_anisotropic")===!0){const Dt=t.get("EXT_texture_filter_anisotropic");if(ut.magFilter===rr||ut.minFilter!==pu&&ut.minFilter!==Bo||ut.type===Ma&&t.has("OES_texture_float_linear")===!1||y===!1&&ut.type===qf&&t.has("OES_texture_half_float_linear")===!1)return;(ut.anisotropy>1||x.get(ut).__currentAnisotropy)&&(g.texParameterf(dt,Dt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(ut.anisotropy,T.getMaxAnisotropy())),x.get(ut).__currentAnisotropy=ut.anisotropy)}}function Z(dt,ut){let Rt=!1;dt.__webglInit===void 0&&(dt.__webglInit=!0,ut.addEventListener("dispose",M));const Dt=ut.source;let Ht=a.get(Dt);Ht===void 0&&(Ht={},a.set(Dt,Ht));const Bt=D(ut);if(Bt!==dt.__cacheKey){Ht[Bt]===void 0&&(Ht[Bt]={texture:g.createTexture(),usedTimes:0},s.memory.textures++,Rt=!0),Ht[Bt].usedTimes++;const re=Ht[dt.__cacheKey];re!==void 0&&(Ht[dt.__cacheKey].usedTimes--,re.usedTimes===0&&A(ut)),dt.__cacheKey=Bt,dt.__webglTexture=Ht[Bt].texture}return Rt}function U(dt,ut,Rt){let Dt=g.TEXTURE_2D;(ut.isDataArrayTexture||ut.isCompressedArrayTexture)&&(Dt=g.TEXTURE_2D_ARRAY),ut.isData3DTexture&&(Dt=g.TEXTURE_3D);const Ht=Z(dt,ut),Bt=ut.source;i.bindTexture(Dt,dt.__webglTexture,g.TEXTURE0+Rt);const re=x.get(Bt);if(Bt.version!==re.__version||Ht===!0){i.activeTexture(g.TEXTURE0+Rt);const le=sn.getPrimaries(sn.workingColorSpace),ge=ut.colorSpace===ia?null:sn.getPrimaries(ut.colorSpace),xe=ut.colorSpace===ia||le===ge?g.NONE:g.BROWSER_DEFAULT_WEBGL;g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,ut.flipY),g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ut.premultiplyAlpha),g.pixelStorei(g.UNPACK_ALIGNMENT,ut.unpackAlignment),g.pixelStorei(g.UNPACK_COLORSPACE_CONVERSION_WEBGL,xe);const Pe=o(ut)&&f(ut.image)===!1;let te=u(ut.image,Pe,!1,T.maxTextureSize);te=Vt(ut,te);const Ge=f(te)||y,Oe=E.convert(ut.format,ut.colorSpace);let Be=E.convert(ut.type),Le=v(ut.internalFormat,Oe,Be,ut.colorSpace,ut.isVideoTexture);Y(Dt,ut,Ge);let ne;const je=ut.mipmaps,si=y&&ut.isVideoTexture!==!0&&Le!==m1,Mi=re.__version===void 0||Ht===!0,he=Bt.dataReady,Ti=m(ut,te,Ge);if(ut.isDepthTexture)Le=g.DEPTH_COMPONENT,y?ut.type===Ma?Le=g.DEPTH_COMPONENT32F:ut.type===El?Le=g.DEPTH_COMPONENT24:ut.type===ph?Le=g.DEPTH24_STENCIL8:Le=g.DEPTH_COMPONENT16:ut.type===Ma&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),ut.format===vh&&Le===g.DEPTH_COMPONENT&&ut.type!==cg&&ut.type!==El&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),ut.type=El,Be=E.convert(ut.type)),ut.format===Lu&&Le===g.DEPTH_COMPONENT&&(Le=g.DEPTH_STENCIL,ut.type!==ph&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),ut.type=ph,Be=E.convert(ut.type))),Mi&&(si?i.texStorage2D(g.TEXTURE_2D,1,Le,te.width,te.height):i.texImage2D(g.TEXTURE_2D,0,Le,te.width,te.height,0,Oe,Be,null));else if(ut.isDataTexture)if(je.length>0&&Ge){si&&Mi&&i.texStorage2D(g.TEXTURE_2D,Ti,Le,je[0].width,je[0].height);for(let bt=0,Ce=je.length;bt>=1,Ce>>=1}}else if(je.length>0&&Ge){si&&Mi&&i.texStorage2D(g.TEXTURE_2D,Ti,Le,je[0].width,je[0].height);for(let bt=0,Ce=je.length;bt0&&he++,i.texStorage2D(g.TEXTURE_CUBE_MAP,he,ne,te[0].width,te[0].height));for(let bt=0;bt<6;bt++)if(Pe){je?Mi&&i.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+bt,0,0,0,te[bt].width,te[bt].height,Be,Le,te[bt].data):i.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+bt,0,ne,te[bt].width,te[bt].height,0,Be,Le,te[bt].data);for(let Ce=0;Ce>Bt),te=Math.max(1,ut.height>>Bt);Ht===g.TEXTURE_3D||Ht===g.TEXTURE_2D_ARRAY?i.texImage3D(Ht,Bt,ge,Pe,te,ut.depth,0,re,le,null):i.texImage2D(Ht,Bt,ge,Pe,te,0,re,le,null)}i.bindFramebuffer(g.FRAMEBUFFER,dt),At(ut)?e.framebufferTexture2DMultisampleEXT(g.FRAMEBUFFER,Dt,Ht,x.get(Rt).__webglTexture,0,Et(ut)):(Ht===g.TEXTURE_2D||Ht>=g.TEXTURE_CUBE_MAP_POSITIVE_X&&Ht<=g.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&g.framebufferTexture2D(g.FRAMEBUFFER,Dt,Ht,x.get(Rt).__webglTexture,Bt),i.bindFramebuffer(g.FRAMEBUFFER,null)}function _(dt,ut,Rt){if(g.bindRenderbuffer(g.RENDERBUFFER,dt),ut.depthBuffer&&!ut.stencilBuffer){let Dt=y===!0?g.DEPTH_COMPONENT24:g.DEPTH_COMPONENT16;if(Rt||At(ut)){const Ht=ut.depthTexture;Ht&&Ht.isDepthTexture&&(Ht.type===Ma?Dt=g.DEPTH_COMPONENT32F:Ht.type===El&&(Dt=g.DEPTH_COMPONENT24));const Bt=Et(ut);At(ut)?e.renderbufferStorageMultisampleEXT(g.RENDERBUFFER,Bt,Dt,ut.width,ut.height):g.renderbufferStorageMultisample(g.RENDERBUFFER,Bt,Dt,ut.width,ut.height)}else g.renderbufferStorage(g.RENDERBUFFER,Dt,ut.width,ut.height);g.framebufferRenderbuffer(g.FRAMEBUFFER,g.DEPTH_ATTACHMENT,g.RENDERBUFFER,dt)}else if(ut.depthBuffer&&ut.stencilBuffer){const Dt=Et(ut);Rt&&At(ut)===!1?g.renderbufferStorageMultisample(g.RENDERBUFFER,Dt,g.DEPTH24_STENCIL8,ut.width,ut.height):At(ut)?e.renderbufferStorageMultisampleEXT(g.RENDERBUFFER,Dt,g.DEPTH24_STENCIL8,ut.width,ut.height):g.renderbufferStorage(g.RENDERBUFFER,g.DEPTH_STENCIL,ut.width,ut.height),g.framebufferRenderbuffer(g.FRAMEBUFFER,g.DEPTH_STENCIL_ATTACHMENT,g.RENDERBUFFER,dt)}else{const Dt=ut.isWebGLMultipleRenderTargets===!0?ut.texture:[ut.texture];for(let Ht=0;Ht0){Rt.__webglFramebuffer[le]=[];for(let ge=0;ge0){Rt.__webglFramebuffer=[];for(let le=0;le0&&At(dt)===!1){const le=Bt?ut:[ut];Rt.__webglMultisampledFramebuffer=g.createFramebuffer(),Rt.__webglColorRenderbuffer=[],i.bindFramebuffer(g.FRAMEBUFFER,Rt.__webglMultisampledFramebuffer);for(let ge=0;ge0)for(let ge=0;ge0)for(let ge=0;ge0&&At(dt)===!1){const ut=dt.isWebGLMultipleRenderTargets?dt.texture:[dt.texture],Rt=dt.width,Dt=dt.height;let Ht=g.COLOR_BUFFER_BIT;const Bt=[],re=dt.stencilBuffer?g.DEPTH_STENCIL_ATTACHMENT:g.DEPTH_ATTACHMENT,le=x.get(dt),ge=dt.isWebGLMultipleRenderTargets===!0;if(ge)for(let xe=0;xe0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&ut.__useRenderToTexture!==!1}function Pt(dt){const ut=s.render.frame;d.get(dt)!==ut&&(d.set(dt,ut),dt.update())}function Vt(dt,ut){const Rt=dt.colorSpace,Dt=dt.format,Ht=dt.type;return dt.isCompressedTexture===!0||dt.isVideoTexture===!0||dt.format===Pm||Rt!==Ho&&Rt!==ia&&(sn.getTransfer(Rt)===mn?y===!1?t.has("EXT_sRGB")===!0&&Dt===vs?(dt.format=Pm,dt.minFilter=Bn,dt.generateMipmaps=!1):ut=T1.sRGBToLinear(ut):(Dt!==vs||Ht!==Go)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Rt)),ut}this.allocateTextureUnit=I,this.resetTextureUnits=O,this.setTexture2D=B,this.setTexture2DArray=G,this.setTexture3D=z,this.setTextureCube=X,this.rebindTextures=ot,this.setupRenderTarget=rt,this.updateRenderTargetMipmap=gt,this.updateMultisampleRenderTarget=yt,this.setupDepthRenderbuffer=at,this.setupFrameBufferTexture=$,this.useMultisampledRTT=At}function L2(g,t,i){const x=i.isWebGL2;function T(E,s=ia){let y;const e=sn.getTransfer(s);if(E===Go)return g.UNSIGNED_BYTE;if(E===f1)return g.UNSIGNED_SHORT_4_4_4_4;if(E===c1)return g.UNSIGNED_SHORT_5_5_5_1;if(E===$w)return g.BYTE;if(E===Jw)return g.SHORT;if(E===cg)return g.UNSIGNED_SHORT;if(E===u1)return g.INT;if(E===El)return g.UNSIGNED_INT;if(E===Ma)return g.FLOAT;if(E===qf)return x?g.HALF_FLOAT:(y=t.get("OES_texture_half_float"),y!==null?y.HALF_FLOAT_OES:null);if(E===Qw)return g.ALPHA;if(E===vs)return g.RGBA;if(E===_w)return g.LUMINANCE;if(E===qw)return g.LUMINANCE_ALPHA;if(E===vh)return g.DEPTH_COMPONENT;if(E===Lu)return g.DEPTH_STENCIL;if(E===Pm)return y=t.get("EXT_sRGB"),y!==null?y.SRGB_ALPHA_EXT:null;if(E===t2)return g.RED;if(E===d1)return g.RED_INTEGER;if(E===e2)return g.RG;if(E===p1)return g.RG_INTEGER;if(E===v1)return g.RGBA_INTEGER;if(E===om||E===lm||E===hm||E===um)if(e===mn)if(y=t.get("WEBGL_compressed_texture_s3tc_srgb"),y!==null){if(E===om)return y.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(E===lm)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(E===hm)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(E===um)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(y=t.get("WEBGL_compressed_texture_s3tc"),y!==null){if(E===om)return y.COMPRESSED_RGB_S3TC_DXT1_EXT;if(E===lm)return y.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(E===hm)return y.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(E===um)return y.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(E===Zy||E===$y||E===Jy||E===Qy)if(y=t.get("WEBGL_compressed_texture_pvrtc"),y!==null){if(E===Zy)return y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(E===$y)return y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(E===Jy)return y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(E===Qy)return y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(E===m1)return y=t.get("WEBGL_compressed_texture_etc1"),y!==null?y.COMPRESSED_RGB_ETC1_WEBGL:null;if(E===_y||E===qy)if(y=t.get("WEBGL_compressed_texture_etc"),y!==null){if(E===_y)return e===mn?y.COMPRESSED_SRGB8_ETC2:y.COMPRESSED_RGB8_ETC2;if(E===qy)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:y.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(E===tx||E===ex||E===ix||E===nx||E===rx||E===sx||E===ax||E===ox||E===lx||E===hx||E===ux||E===fx||E===cx||E===dx)if(y=t.get("WEBGL_compressed_texture_astc"),y!==null){if(E===tx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:y.COMPRESSED_RGBA_ASTC_4x4_KHR;if(E===ex)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:y.COMPRESSED_RGBA_ASTC_5x4_KHR;if(E===ix)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:y.COMPRESSED_RGBA_ASTC_5x5_KHR;if(E===nx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:y.COMPRESSED_RGBA_ASTC_6x5_KHR;if(E===rx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:y.COMPRESSED_RGBA_ASTC_6x6_KHR;if(E===sx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:y.COMPRESSED_RGBA_ASTC_8x5_KHR;if(E===ax)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:y.COMPRESSED_RGBA_ASTC_8x6_KHR;if(E===ox)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:y.COMPRESSED_RGBA_ASTC_8x8_KHR;if(E===lx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:y.COMPRESSED_RGBA_ASTC_10x5_KHR;if(E===hx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:y.COMPRESSED_RGBA_ASTC_10x6_KHR;if(E===ux)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:y.COMPRESSED_RGBA_ASTC_10x8_KHR;if(E===fx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:y.COMPRESSED_RGBA_ASTC_10x10_KHR;if(E===cx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:y.COMPRESSED_RGBA_ASTC_12x10_KHR;if(E===dx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:y.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(E===fm||E===px||E===vx)if(y=t.get("EXT_texture_compression_bptc"),y!==null){if(E===fm)return e===mn?y.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:y.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(E===px)return y.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(E===vx)return y.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(E===i2||E===mx||E===gx||E===yx)if(y=t.get("EXT_texture_compression_rgtc"),y!==null){if(E===fm)return y.COMPRESSED_RED_RGTC1_EXT;if(E===mx)return y.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(E===gx)return y.COMPRESSED_RED_GREEN_RGTC2_EXT;if(E===yx)return y.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return E===ph?x?g.UNSIGNED_INT_24_8:(y=t.get("WEBGL_depth_texture"),y!==null?y.UNSIGNED_INT_24_8_WEBGL:null):g[E]!==void 0?g[E]:null}return{convert:T}}class F2 extends Dr{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}}class Yf extends ki{constructor(){super(),this.isGroup=!0,this.type="Group"}}const _6={type:"move"};class Z0{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Yf,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Yf,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Ct,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Ct),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Yf,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Ct,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Ct),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){const i=this._hand;if(i)for(const x of t.hand.values())this._getHandJoint(i,x)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,i,x){let T=null,E=null,s=null;const y=this._targetRay,e=this._grip,r=this._hand;if(t&&i.session.visibilityState!=="visible-blurred"){if(r&&t.hand){s=!0;for(const u of t.hand.values()){const f=i.getJointPose(u,x),o=this._getHandJoint(r,u);f!==null&&(o.matrix.fromArray(f.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,o.jointRadius=f.radius),o.visible=f!==null}const d=r.joints["index-finger-tip"],h=r.joints["thumb-tip"],a=d.position.distanceTo(h.position),l=.02,n=.005;r.inputState.pinching&&a>l+n?(r.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!r.inputState.pinching&&a<=l-n&&(r.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else e!==null&&t.gripSpace&&(E=i.getPose(t.gripSpace,x),E!==null&&(e.matrix.fromArray(E.transform.matrix),e.matrix.decompose(e.position,e.rotation,e.scale),e.matrixWorldNeedsUpdate=!0,E.linearVelocity?(e.hasLinearVelocity=!0,e.linearVelocity.copy(E.linearVelocity)):e.hasLinearVelocity=!1,E.angularVelocity?(e.hasAngularVelocity=!0,e.angularVelocity.copy(E.angularVelocity)):e.hasAngularVelocity=!1));y!==null&&(T=i.getPose(t.targetRaySpace,x),T===null&&E!==null&&(T=E),T!==null&&(y.matrix.fromArray(T.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.matrixWorldNeedsUpdate=!0,T.linearVelocity?(y.hasLinearVelocity=!0,y.linearVelocity.copy(T.linearVelocity)):y.hasLinearVelocity=!1,T.angularVelocity?(y.hasAngularVelocity=!0,y.angularVelocity.copy(T.angularVelocity)):y.hasAngularVelocity=!1,this.dispatchEvent(_6)))}return y!==null&&(y.visible=T!==null),e!==null&&(e.visible=E!==null),r!==null&&(r.visible=s!==null),this}_getHandJoint(t,i){if(t.joints[i.jointName]===void 0){const x=new Yf;x.matrixAutoUpdate=!1,x.visible=!1,t.joints[i.jointName]=x,t.add(x)}return t.joints[i.jointName]}}const q6=` +}`;function K6(g,t,i){let y=new np;const T=new ve,E=new ve,s=new on,x=new R1({depthPacking:h2}),e=new b1,r={},d=i.maxTextureSize,h={[Al]:gs,[gs]:Al,[Io]:Io},a=new so({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ve},radius:{value:4}},vertexShader:k6,fragmentShader:j6}),l=a.clone();l.defines.HORIZONTAL_PASS=1;const n=new Fi;n.setAttribute("position",new ln(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const u=new dr(n,a),f=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=cg;let o=this.type;this.render=function(S,M,w){if(f.enabled===!1||f.autoUpdate===!1&&f.needsUpdate===!1||S.length===0)return;const C=g.getRenderTarget(),A=g.getActiveCubeFace(),P=g.getActiveMipmapLevel(),b=g.state;b.setBlending(wl),b.buffers.color.setClear(1,1,1,1),b.buffers.depth.setTest(!0),b.setScissorTest(!1);const O=o!==to&&this.type===to,I=o===to&&this.type!==to;for(let D=0,B=S.length;Dd||T.y>d)&&(T.x>d&&(E.x=Math.floor(d/X.x),T.x=E.x*X.x,z.mapSize.x=E.x),T.y>d&&(E.y=Math.floor(d/X.y),T.y=E.y*X.y,z.mapSize.y=E.y)),z.map===null||O===!0||I===!0){const Q=this.type!==to?{minFilter:rr,magFilter:rr}:{};z.map!==null&&z.map.dispose(),z.map=new ro(T.x,T.y,Q),z.map.texture.name=G.name+".shadowMap",z.camera.updateProjectionMatrix()}g.setRenderTarget(z.map),g.clear();const j=z.getViewportCount();for(let Q=0;Q0||M.map&&M.alphaTest>0){const b=A.uuid,O=M.uuid;let I=r[b];I===void 0&&(I={},r[b]=I);let D=I[O];D===void 0&&(D=A.clone(),I[O]=D,M.addEventListener("dispose",m)),A=D}if(A.visible=M.visible,A.wireframe=M.wireframe,C===to?A.side=M.shadowSide!==null?M.shadowSide:M.side:A.side=M.shadowSide!==null?M.shadowSide:h[M.side],A.alphaMap=M.alphaMap,A.alphaTest=M.alphaTest,A.map=M.map,A.clipShadows=M.clipShadows,A.clippingPlanes=M.clippingPlanes,A.clipIntersection=M.clipIntersection,A.displacementMap=M.displacementMap,A.displacementScale=M.displacementScale,A.displacementBias=M.displacementBias,A.wireframeLinewidth=M.wireframeLinewidth,A.linewidth=M.linewidth,w.isPointLight===!0&&A.isMeshDistanceMaterial===!0){const b=g.properties.get(A);b.light=w}return A}function v(S,M,w,C,A){if(S.visible===!1)return;if(S.layers.test(M.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&A===to)&&(!S.frustumCulled||y.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(w.matrixWorldInverse,S.matrixWorld);const O=t.update(S),I=S.material;if(Array.isArray(I)){const D=O.groups;for(let B=0,G=D.length;B=1):j.indexOf("OpenGL ES")!==-1&&(X=parseFloat(/^OpenGL ES (\d)/.exec(j)[1]),z=X>=2);let Q=null,tt={};const Y=g.getParameter(g.SCISSOR_BOX),$=g.getParameter(g.VIEWPORT),U=new on().fromArray(Y),H=new on().fromArray($);function Z(bt,Ce,we,He){const Je=new Uint8Array(4),Gi=g.createTexture();g.bindTexture(bt,Gi),g.texParameteri(bt,g.TEXTURE_MIN_FILTER,g.NEAREST),g.texParameteri(bt,g.TEXTURE_MAG_FILTER,g.NEAREST);for(let Ii=0;Ii"u"?!1:/OculusBrowser/g.test(navigator.userAgent),d=new WeakMap;let h;const a=new WeakMap;let l=!1;try{l=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function n(dt,ut){return l?new OffscreenCanvas(dt,ut):zd("canvas")}function u(dt,ut,Rt,Dt){let Ht=1;if((dt.width>Dt||dt.height>Dt)&&(Ht=Dt/Math.max(dt.width,dt.height)),Ht<1||ut===!0)if(typeof HTMLImageElement<"u"&&dt instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&dt instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&dt instanceof ImageBitmap){const Bt=ut?Lm:Math.floor,re=Bt(Ht*dt.width),le=Bt(Ht*dt.height);h===void 0&&(h=n(re,le));const ge=Rt?n(re,le):h;return ge.width=re,ge.height=le,ge.getContext("2d").drawImage(dt,0,0,re,le),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+dt.width+"x"+dt.height+") to ("+re+"x"+le+")."),ge}else return"data"in dt&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+dt.width+"x"+dt.height+")."),dt;return dt}function f(dt){return Cx(dt.width)&&Cx(dt.height)}function o(dt){return x?!1:dt.wrapS!==Jr||dt.wrapT!==Jr||dt.minFilter!==rr&&dt.minFilter!==Bn}function c(dt,ut){return dt.generateMipmaps&&ut&&dt.minFilter!==rr&&dt.minFilter!==Bn}function p(dt){g.generateMipmap(dt)}function v(dt,ut,Rt,Dt,Ht=!1){if(x===!1)return ut;if(dt!==null){if(g[dt]!==void 0)return g[dt];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+dt+"'")}let Bt=ut;if(ut===g.RED&&(Rt===g.FLOAT&&(Bt=g.R32F),Rt===g.HALF_FLOAT&&(Bt=g.R16F),Rt===g.UNSIGNED_BYTE&&(Bt=g.R8)),ut===g.RED_INTEGER&&(Rt===g.UNSIGNED_BYTE&&(Bt=g.R8UI),Rt===g.UNSIGNED_SHORT&&(Bt=g.R16UI),Rt===g.UNSIGNED_INT&&(Bt=g.R32UI),Rt===g.BYTE&&(Bt=g.R8I),Rt===g.SHORT&&(Bt=g.R16I),Rt===g.INT&&(Bt=g.R32I)),ut===g.RG&&(Rt===g.FLOAT&&(Bt=g.RG32F),Rt===g.HALF_FLOAT&&(Bt=g.RG16F),Rt===g.UNSIGNED_BYTE&&(Bt=g.RG8)),ut===g.RGBA){const re=Ht?Dd:an.getTransfer(Dt);Rt===g.FLOAT&&(Bt=g.RGBA32F),Rt===g.HALF_FLOAT&&(Bt=g.RGBA16F),Rt===g.UNSIGNED_BYTE&&(Bt=re===gn?g.SRGB8_ALPHA8:g.RGBA8),Rt===g.UNSIGNED_SHORT_4_4_4_4&&(Bt=g.RGBA4),Rt===g.UNSIGNED_SHORT_5_5_5_1&&(Bt=g.RGB5_A1)}return(Bt===g.R16F||Bt===g.R32F||Bt===g.RG16F||Bt===g.RG32F||Bt===g.RGBA16F||Bt===g.RGBA32F)&&t.get("EXT_color_buffer_float"),Bt}function m(dt,ut,Rt){return c(dt,Rt)===!0||dt.isFramebufferTexture&&dt.minFilter!==rr&&dt.minFilter!==Bn?Math.log2(Math.max(ut.width,ut.height))+1:dt.mipmaps!==void 0&&dt.mipmaps.length>0?dt.mipmaps.length:dt.isCompressedTexture&&Array.isArray(dt.image)?ut.mipmaps.length:1}function S(dt){return dt===rr||dt===Rm||dt===du?g.NEAREST:g.LINEAR}function M(dt){const ut=dt.target;ut.removeEventListener("dispose",M),C(ut),ut.isVideoTexture&&d.delete(ut)}function w(dt){const ut=dt.target;ut.removeEventListener("dispose",w),P(ut)}function C(dt){const ut=y.get(dt);if(ut.__webglInit===void 0)return;const Rt=dt.source,Dt=a.get(Rt);if(Dt){const Ht=Dt[ut.__cacheKey];Ht.usedTimes--,Ht.usedTimes===0&&A(dt),Object.keys(Dt).length===0&&a.delete(Rt)}y.remove(dt)}function A(dt){const ut=y.get(dt);g.deleteTexture(ut.__webglTexture);const Rt=dt.source,Dt=a.get(Rt);delete Dt[ut.__cacheKey],s.memory.textures--}function P(dt){const ut=dt.texture,Rt=y.get(dt),Dt=y.get(ut);if(Dt.__webglTexture!==void 0&&(g.deleteTexture(Dt.__webglTexture),s.memory.textures--),dt.depthTexture&&dt.depthTexture.dispose(),dt.isWebGLCubeRenderTarget)for(let Ht=0;Ht<6;Ht++){if(Array.isArray(Rt.__webglFramebuffer[Ht]))for(let Bt=0;Bt=T.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+dt+" texture units while this GPU supports only "+T.maxTextures),b+=1,dt}function D(dt){const ut=[];return ut.push(dt.wrapS),ut.push(dt.wrapT),ut.push(dt.wrapR||0),ut.push(dt.magFilter),ut.push(dt.minFilter),ut.push(dt.anisotropy),ut.push(dt.internalFormat),ut.push(dt.format),ut.push(dt.type),ut.push(dt.generateMipmaps),ut.push(dt.premultiplyAlpha),ut.push(dt.flipY),ut.push(dt.unpackAlignment),ut.push(dt.colorSpace),ut.join()}function B(dt,ut){const Rt=y.get(dt);if(dt.isVideoTexture&&Pt(dt),dt.isRenderTargetTexture===!1&&dt.version>0&&Rt.__version!==dt.version){const Dt=dt.image;if(Dt===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Dt.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{U(Rt,dt,ut);return}}i.bindTexture(g.TEXTURE_2D,Rt.__webglTexture,g.TEXTURE0+ut)}function G(dt,ut){const Rt=y.get(dt);if(dt.version>0&&Rt.__version!==dt.version){U(Rt,dt,ut);return}i.bindTexture(g.TEXTURE_2D_ARRAY,Rt.__webglTexture,g.TEXTURE0+ut)}function z(dt,ut){const Rt=y.get(dt);if(dt.version>0&&Rt.__version!==dt.version){U(Rt,dt,ut);return}i.bindTexture(g.TEXTURE_3D,Rt.__webglTexture,g.TEXTURE0+ut)}function X(dt,ut){const Rt=y.get(dt);if(dt.version>0&&Rt.__version!==dt.version){H(Rt,dt,ut);return}i.bindTexture(g.TEXTURE_CUBE_MAP,Rt.__webglTexture,g.TEXTURE0+ut)}const j={[Rd]:g.REPEAT,[Jr]:g.CLAMP_TO_EDGE,[bd]:g.MIRRORED_REPEAT},Q={[rr]:g.NEAREST,[Rm]:g.NEAREST_MIPMAP_NEAREST,[du]:g.NEAREST_MIPMAP_LINEAR,[Bn]:g.LINEAR,[vd]:g.LINEAR_MIPMAP_NEAREST,[Bo]:g.LINEAR_MIPMAP_LINEAR},tt={[f2]:g.NEVER,[g2]:g.ALWAYS,[c2]:g.LESS,[S1]:g.LEQUAL,[d2]:g.EQUAL,[m2]:g.GEQUAL,[p2]:g.GREATER,[v2]:g.NOTEQUAL};function Y(dt,ut,Rt){if(ut.type===Ma&&t.has("OES_texture_float_linear")===!1&&(ut.magFilter===Bn||ut.magFilter===vd||ut.magFilter===du||ut.magFilter===Bo||ut.minFilter===Bn||ut.minFilter===vd||ut.minFilter===du||ut.minFilter===Bo)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),Rt?(g.texParameteri(dt,g.TEXTURE_WRAP_S,j[ut.wrapS]),g.texParameteri(dt,g.TEXTURE_WRAP_T,j[ut.wrapT]),(dt===g.TEXTURE_3D||dt===g.TEXTURE_2D_ARRAY)&&g.texParameteri(dt,g.TEXTURE_WRAP_R,j[ut.wrapR]),g.texParameteri(dt,g.TEXTURE_MAG_FILTER,Q[ut.magFilter]),g.texParameteri(dt,g.TEXTURE_MIN_FILTER,Q[ut.minFilter])):(g.texParameteri(dt,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(dt,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),(dt===g.TEXTURE_3D||dt===g.TEXTURE_2D_ARRAY)&&g.texParameteri(dt,g.TEXTURE_WRAP_R,g.CLAMP_TO_EDGE),(ut.wrapS!==Jr||ut.wrapT!==Jr)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),g.texParameteri(dt,g.TEXTURE_MAG_FILTER,S(ut.magFilter)),g.texParameteri(dt,g.TEXTURE_MIN_FILTER,S(ut.minFilter)),ut.minFilter!==rr&&ut.minFilter!==Bn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),ut.compareFunction&&(g.texParameteri(dt,g.TEXTURE_COMPARE_MODE,g.COMPARE_REF_TO_TEXTURE),g.texParameteri(dt,g.TEXTURE_COMPARE_FUNC,tt[ut.compareFunction])),t.has("EXT_texture_filter_anisotropic")===!0){const Dt=t.get("EXT_texture_filter_anisotropic");if(ut.magFilter===rr||ut.minFilter!==du&&ut.minFilter!==Bo||ut.type===Ma&&t.has("OES_texture_float_linear")===!1||x===!1&&ut.type===_f&&t.has("OES_texture_half_float_linear")===!1)return;(ut.anisotropy>1||y.get(ut).__currentAnisotropy)&&(g.texParameterf(dt,Dt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(ut.anisotropy,T.getMaxAnisotropy())),y.get(ut).__currentAnisotropy=ut.anisotropy)}}function $(dt,ut){let Rt=!1;dt.__webglInit===void 0&&(dt.__webglInit=!0,ut.addEventListener("dispose",M));const Dt=ut.source;let Ht=a.get(Dt);Ht===void 0&&(Ht={},a.set(Dt,Ht));const Bt=D(ut);if(Bt!==dt.__cacheKey){Ht[Bt]===void 0&&(Ht[Bt]={texture:g.createTexture(),usedTimes:0},s.memory.textures++,Rt=!0),Ht[Bt].usedTimes++;const re=Ht[dt.__cacheKey];re!==void 0&&(Ht[dt.__cacheKey].usedTimes--,re.usedTimes===0&&A(ut)),dt.__cacheKey=Bt,dt.__webglTexture=Ht[Bt].texture}return Rt}function U(dt,ut,Rt){let Dt=g.TEXTURE_2D;(ut.isDataArrayTexture||ut.isCompressedArrayTexture)&&(Dt=g.TEXTURE_2D_ARRAY),ut.isData3DTexture&&(Dt=g.TEXTURE_3D);const Ht=$(dt,ut),Bt=ut.source;i.bindTexture(Dt,dt.__webglTexture,g.TEXTURE0+Rt);const re=y.get(Bt);if(Bt.version!==re.__version||Ht===!0){i.activeTexture(g.TEXTURE0+Rt);const le=an.getPrimaries(an.workingColorSpace),ge=ut.colorSpace===ia?null:an.getPrimaries(ut.colorSpace),xe=ut.colorSpace===ia||le===ge?g.NONE:g.BROWSER_DEFAULT_WEBGL;g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,ut.flipY),g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ut.premultiplyAlpha),g.pixelStorei(g.UNPACK_ALIGNMENT,ut.unpackAlignment),g.pixelStorei(g.UNPACK_COLORSPACE_CONVERSION_WEBGL,xe);const Pe=o(ut)&&f(ut.image)===!1;let te=u(ut.image,Pe,!1,T.maxTextureSize);te=Vt(ut,te);const Ve=f(te)||x,De=E.convert(ut.format,ut.colorSpace);let Ue=E.convert(ut.type),Le=v(ut.internalFormat,De,Ue,ut.colorSpace,ut.isVideoTexture);Y(Dt,ut,Ve);let ne;const Ke=ut.mipmaps,si=x&&ut.isVideoTexture!==!0&&Le!==g1,Mi=re.__version===void 0||Ht===!0,he=Bt.dataReady,Ti=m(ut,te,Ve);if(ut.isDepthTexture)Le=g.DEPTH_COMPONENT,x?ut.type===Ma?Le=g.DEPTH_COMPONENT32F:ut.type===El?Le=g.DEPTH_COMPONENT24:ut.type===dh?Le=g.DEPTH24_STENCIL8:Le=g.DEPTH_COMPONENT16:ut.type===Ma&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),ut.format===ph&&Le===g.DEPTH_COMPONENT&&ut.type!==pg&&ut.type!==El&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),ut.type=El,Ue=E.convert(ut.type)),ut.format===Lu&&Le===g.DEPTH_COMPONENT&&(Le=g.DEPTH_STENCIL,ut.type!==dh&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),ut.type=dh,Ue=E.convert(ut.type))),Mi&&(si?i.texStorage2D(g.TEXTURE_2D,1,Le,te.width,te.height):i.texImage2D(g.TEXTURE_2D,0,Le,te.width,te.height,0,De,Ue,null));else if(ut.isDataTexture)if(Ke.length>0&&Ve){si&&Mi&&i.texStorage2D(g.TEXTURE_2D,Ti,Le,Ke[0].width,Ke[0].height);for(let bt=0,Ce=Ke.length;bt>=1,Ce>>=1}}else if(Ke.length>0&&Ve){si&&Mi&&i.texStorage2D(g.TEXTURE_2D,Ti,Le,Ke[0].width,Ke[0].height);for(let bt=0,Ce=Ke.length;bt0&&he++,i.texStorage2D(g.TEXTURE_CUBE_MAP,he,ne,te[0].width,te[0].height));for(let bt=0;bt<6;bt++)if(Pe){Ke?Mi&&i.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+bt,0,0,0,te[bt].width,te[bt].height,Ue,Le,te[bt].data):i.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+bt,0,ne,te[bt].width,te[bt].height,0,Ue,Le,te[bt].data);for(let Ce=0;Ce>Bt),te=Math.max(1,ut.height>>Bt);Ht===g.TEXTURE_3D||Ht===g.TEXTURE_2D_ARRAY?i.texImage3D(Ht,Bt,ge,Pe,te,ut.depth,0,re,le,null):i.texImage2D(Ht,Bt,ge,Pe,te,0,re,le,null)}i.bindFramebuffer(g.FRAMEBUFFER,dt),At(ut)?e.framebufferTexture2DMultisampleEXT(g.FRAMEBUFFER,Dt,Ht,y.get(Rt).__webglTexture,0,Et(ut)):(Ht===g.TEXTURE_2D||Ht>=g.TEXTURE_CUBE_MAP_POSITIVE_X&&Ht<=g.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&g.framebufferTexture2D(g.FRAMEBUFFER,Dt,Ht,y.get(Rt).__webglTexture,Bt),i.bindFramebuffer(g.FRAMEBUFFER,null)}function _(dt,ut,Rt){if(g.bindRenderbuffer(g.RENDERBUFFER,dt),ut.depthBuffer&&!ut.stencilBuffer){let Dt=x===!0?g.DEPTH_COMPONENT24:g.DEPTH_COMPONENT16;if(Rt||At(ut)){const Ht=ut.depthTexture;Ht&&Ht.isDepthTexture&&(Ht.type===Ma?Dt=g.DEPTH_COMPONENT32F:Ht.type===El&&(Dt=g.DEPTH_COMPONENT24));const Bt=Et(ut);At(ut)?e.renderbufferStorageMultisampleEXT(g.RENDERBUFFER,Bt,Dt,ut.width,ut.height):g.renderbufferStorageMultisample(g.RENDERBUFFER,Bt,Dt,ut.width,ut.height)}else g.renderbufferStorage(g.RENDERBUFFER,Dt,ut.width,ut.height);g.framebufferRenderbuffer(g.FRAMEBUFFER,g.DEPTH_ATTACHMENT,g.RENDERBUFFER,dt)}else if(ut.depthBuffer&&ut.stencilBuffer){const Dt=Et(ut);Rt&&At(ut)===!1?g.renderbufferStorageMultisample(g.RENDERBUFFER,Dt,g.DEPTH24_STENCIL8,ut.width,ut.height):At(ut)?e.renderbufferStorageMultisampleEXT(g.RENDERBUFFER,Dt,g.DEPTH24_STENCIL8,ut.width,ut.height):g.renderbufferStorage(g.RENDERBUFFER,g.DEPTH_STENCIL,ut.width,ut.height),g.framebufferRenderbuffer(g.FRAMEBUFFER,g.DEPTH_STENCIL_ATTACHMENT,g.RENDERBUFFER,dt)}else{const Dt=ut.isWebGLMultipleRenderTargets===!0?ut.texture:[ut.texture];for(let Ht=0;Ht0){Rt.__webglFramebuffer[le]=[];for(let ge=0;ge0){Rt.__webglFramebuffer=[];for(let le=0;le0&&At(dt)===!1){const le=Bt?ut:[ut];Rt.__webglMultisampledFramebuffer=g.createFramebuffer(),Rt.__webglColorRenderbuffer=[],i.bindFramebuffer(g.FRAMEBUFFER,Rt.__webglMultisampledFramebuffer);for(let ge=0;ge0)for(let ge=0;ge0)for(let ge=0;ge0&&At(dt)===!1){const ut=dt.isWebGLMultipleRenderTargets?dt.texture:[dt.texture],Rt=dt.width,Dt=dt.height;let Ht=g.COLOR_BUFFER_BIT;const Bt=[],re=dt.stencilBuffer?g.DEPTH_STENCIL_ATTACHMENT:g.DEPTH_ATTACHMENT,le=y.get(dt),ge=dt.isWebGLMultipleRenderTargets===!0;if(ge)for(let xe=0;xe0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&ut.__useRenderToTexture!==!1}function Pt(dt){const ut=s.render.frame;d.get(dt)!==ut&&(d.set(dt,ut),dt.update())}function Vt(dt,ut){const Rt=dt.colorSpace,Dt=dt.format,Ht=dt.type;return dt.isCompressedTexture===!0||dt.isVideoTexture===!0||dt.format===bm||Rt!==Ho&&Rt!==ia&&(an.getTransfer(Rt)===gn?x===!1?t.has("EXT_sRGB")===!0&&Dt===vs?(dt.format=bm,dt.minFilter=Bn,dt.generateMipmaps=!1):ut=E1.sRGBToLinear(ut):(Dt!==vs||Ht!==Go)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Rt)),ut}this.allocateTextureUnit=I,this.resetTextureUnits=O,this.setTexture2D=B,this.setTexture2DArray=G,this.setTexture3D=z,this.setTextureCube=X,this.rebindTextures=ot,this.setupRenderTarget=rt,this.updateRenderTargetMipmap=gt,this.updateMultisampleRenderTarget=yt,this.setupDepthRenderbuffer=at,this.setupFrameBufferTexture=Z,this.useMultisampledRTT=At}function O2(g,t,i){const y=i.isWebGL2;function T(E,s=ia){let x;const e=an.getTransfer(s);if(E===Go)return g.UNSIGNED_BYTE;if(E===c1)return g.UNSIGNED_SHORT_4_4_4_4;if(E===d1)return g.UNSIGNED_SHORT_5_5_5_1;if(E===Qw)return g.BYTE;if(E===_w)return g.SHORT;if(E===pg)return g.UNSIGNED_SHORT;if(E===f1)return g.INT;if(E===El)return g.UNSIGNED_INT;if(E===Ma)return g.FLOAT;if(E===_f)return y?g.HALF_FLOAT:(x=t.get("OES_texture_half_float"),x!==null?x.HALF_FLOAT_OES:null);if(E===qw)return g.ALPHA;if(E===vs)return g.RGBA;if(E===t2)return g.LUMINANCE;if(E===e2)return g.LUMINANCE_ALPHA;if(E===ph)return g.DEPTH_COMPONENT;if(E===Lu)return g.DEPTH_STENCIL;if(E===bm)return x=t.get("EXT_sRGB"),x!==null?x.SRGB_ALPHA_EXT:null;if(E===i2)return g.RED;if(E===p1)return g.RED_INTEGER;if(E===n2)return g.RG;if(E===v1)return g.RG_INTEGER;if(E===m1)return g.RGBA_INTEGER;if(E===lm||E===hm||E===um||E===fm)if(e===gn)if(x=t.get("WEBGL_compressed_texture_s3tc_srgb"),x!==null){if(E===lm)return x.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(E===hm)return x.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(E===um)return x.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(E===fm)return x.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(x=t.get("WEBGL_compressed_texture_s3tc"),x!==null){if(E===lm)return x.COMPRESSED_RGB_S3TC_DXT1_EXT;if(E===hm)return x.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(E===um)return x.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(E===fm)return x.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(E===Qy||E===_y||E===qy||E===tx)if(x=t.get("WEBGL_compressed_texture_pvrtc"),x!==null){if(E===Qy)return x.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(E===_y)return x.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(E===qy)return x.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(E===tx)return x.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(E===g1)return x=t.get("WEBGL_compressed_texture_etc1"),x!==null?x.COMPRESSED_RGB_ETC1_WEBGL:null;if(E===ex||E===ix)if(x=t.get("WEBGL_compressed_texture_etc"),x!==null){if(E===ex)return e===gn?x.COMPRESSED_SRGB8_ETC2:x.COMPRESSED_RGB8_ETC2;if(E===ix)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:x.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(E===nx||E===rx||E===sx||E===ax||E===ox||E===lx||E===hx||E===ux||E===fx||E===cx||E===dx||E===px||E===vx||E===mx)if(x=t.get("WEBGL_compressed_texture_astc"),x!==null){if(E===nx)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:x.COMPRESSED_RGBA_ASTC_4x4_KHR;if(E===rx)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:x.COMPRESSED_RGBA_ASTC_5x4_KHR;if(E===sx)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:x.COMPRESSED_RGBA_ASTC_5x5_KHR;if(E===ax)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:x.COMPRESSED_RGBA_ASTC_6x5_KHR;if(E===ox)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:x.COMPRESSED_RGBA_ASTC_6x6_KHR;if(E===lx)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:x.COMPRESSED_RGBA_ASTC_8x5_KHR;if(E===hx)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:x.COMPRESSED_RGBA_ASTC_8x6_KHR;if(E===ux)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:x.COMPRESSED_RGBA_ASTC_8x8_KHR;if(E===fx)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:x.COMPRESSED_RGBA_ASTC_10x5_KHR;if(E===cx)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:x.COMPRESSED_RGBA_ASTC_10x6_KHR;if(E===dx)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:x.COMPRESSED_RGBA_ASTC_10x8_KHR;if(E===px)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:x.COMPRESSED_RGBA_ASTC_10x10_KHR;if(E===vx)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:x.COMPRESSED_RGBA_ASTC_12x10_KHR;if(E===mx)return e===gn?x.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:x.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(E===cm||E===gx||E===yx)if(x=t.get("EXT_texture_compression_bptc"),x!==null){if(E===cm)return e===gn?x.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:x.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(E===gx)return x.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(E===yx)return x.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(E===r2||E===xx||E===Sx||E===Tx)if(x=t.get("EXT_texture_compression_rgtc"),x!==null){if(E===cm)return x.COMPRESSED_RED_RGTC1_EXT;if(E===xx)return x.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(E===Sx)return x.COMPRESSED_RED_GREEN_RGTC2_EXT;if(E===Tx)return x.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return E===dh?y?g.UNSIGNED_INT_24_8:(x=t.get("WEBGL_depth_texture"),x!==null?x.UNSIGNED_INT_24_8_WEBGL:null):g[E]!==void 0?g[E]:null}return{convert:T}}class D2 extends Dr{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}}class Xf extends ki{constructor(){super(),this.isGroup=!0,this.type="Group"}}const J6={type:"move"};class J0{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Xf,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Xf,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Ct,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Ct),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Xf,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Ct,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Ct),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){const i=this._hand;if(i)for(const y of t.hand.values())this._getHandJoint(i,y)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,i,y){let T=null,E=null,s=null;const x=this._targetRay,e=this._grip,r=this._hand;if(t&&i.session.visibilityState!=="visible-blurred"){if(r&&t.hand){s=!0;for(const u of t.hand.values()){const f=i.getJointPose(u,y),o=this._getHandJoint(r,u);f!==null&&(o.matrix.fromArray(f.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,o.jointRadius=f.radius),o.visible=f!==null}const d=r.joints["index-finger-tip"],h=r.joints["thumb-tip"],a=d.position.distanceTo(h.position),l=.02,n=.005;r.inputState.pinching&&a>l+n?(r.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!r.inputState.pinching&&a<=l-n&&(r.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else e!==null&&t.gripSpace&&(E=i.getPose(t.gripSpace,y),E!==null&&(e.matrix.fromArray(E.transform.matrix),e.matrix.decompose(e.position,e.rotation,e.scale),e.matrixWorldNeedsUpdate=!0,E.linearVelocity?(e.hasLinearVelocity=!0,e.linearVelocity.copy(E.linearVelocity)):e.hasLinearVelocity=!1,E.angularVelocity?(e.hasAngularVelocity=!0,e.angularVelocity.copy(E.angularVelocity)):e.hasAngularVelocity=!1));x!==null&&(T=i.getPose(t.targetRaySpace,y),T===null&&E!==null&&(T=E),T!==null&&(x.matrix.fromArray(T.transform.matrix),x.matrix.decompose(x.position,x.rotation,x.scale),x.matrixWorldNeedsUpdate=!0,T.linearVelocity?(x.hasLinearVelocity=!0,x.linearVelocity.copy(T.linearVelocity)):x.hasLinearVelocity=!1,T.angularVelocity?(x.hasAngularVelocity=!0,x.angularVelocity.copy(T.angularVelocity)):x.hasAngularVelocity=!1,this.dispatchEvent(J6)))}return x!==null&&(x.visible=T!==null),e!==null&&(e.visible=E!==null),r!==null&&(r.visible=s!==null),this}_getHandJoint(t,i){if(t.joints[i.jointName]===void 0){const y=new Xf;y.matrixAutoUpdate=!1,y.visible=!1,t.joints[i.jointName]=y,t.add(y)}return t.joints[i.jointName]}}const Q6=` void main() { gl_Position = vec4( position, 1.0 ); -}`,tU=` +}`,_6=` uniform sampler2DArray depthColor; uniform float depthWidth; uniform float depthHeight; @@ -10165,7 +10167,7 @@ void main() { } -}`;class eU{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,i,x){if(this.texture===null){const T=new zn,E=t.properties.get(T);E.__webglTexture=i.texture,(i.depthNear!=x.depthNear||i.depthFar!=x.depthFar)&&(this.depthNear=i.depthNear,this.depthFar=i.depthFar),this.texture=T}}render(t,i){if(this.texture!==null){if(this.mesh===null){const x=i.cameras[0].viewport,T=new so({extensions:{fragDepth:!0},vertexShader:q6,fragmentShader:tU,uniforms:{depthColor:{value:this.texture},depthWidth:{value:x.z},depthHeight:{value:x.w}}});this.mesh=new dr(new hc(20,20),T)}t.render(this.mesh,i)}}reset(){this.texture=null,this.mesh=null}}class iU extends Ll{constructor(t,i){super();const x=this;let T=null,E=1,s=null,y="local-floor",e=1,r=null,d=null,h=null,a=null,l=null,n=null;const u=new eU,f=i.getContextAttributes();let o=null,c=null;const p=[],v=[],m=new ve;let S=null;const M=new Dr;M.layers.enable(1),M.viewport=new an;const w=new Dr;w.layers.enable(2),w.viewport=new an;const C=[M,w],A=new F2;A.layers.enable(1),A.layers.enable(2);let P=null,b=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Z){let U=p[Z];return U===void 0&&(U=new Z0,p[Z]=U),U.getTargetRaySpace()},this.getControllerGrip=function(Z){let U=p[Z];return U===void 0&&(U=new Z0,p[Z]=U),U.getGripSpace()},this.getHand=function(Z){let U=p[Z];return U===void 0&&(U=new Z0,p[Z]=U),U.getHandSpace()};function O(Z){const U=v.indexOf(Z.inputSource);if(U===-1)return;const H=p[U];H!==void 0&&(H.update(Z.inputSource,Z.frame,r||s),H.dispatchEvent({type:Z.type,data:Z.inputSource}))}function I(){T.removeEventListener("select",O),T.removeEventListener("selectstart",O),T.removeEventListener("selectend",O),T.removeEventListener("squeeze",O),T.removeEventListener("squeezestart",O),T.removeEventListener("squeezeend",O),T.removeEventListener("end",I),T.removeEventListener("inputsourceschange",D);for(let Z=0;Z=0&&(v[$]=null,p[$].disconnect(H))}for(let U=0;U=v.length){v.push(H),$=q;break}else if(v[q]===null){v[q]=H,$=q;break}if($===-1)break}const _=p[$];_&&_.connect(H)}}const B=new Ct,G=new Ct;function z(Z,U,H){B.setFromMatrixPosition(U.matrixWorld),G.setFromMatrixPosition(H.matrixWorld);const $=B.distanceTo(G),_=U.projectionMatrix.elements,q=H.projectionMatrix.elements,at=_[14]/(_[10]-1),ot=_[14]/(_[10]+1),rt=(_[9]+1)/_[5],gt=(_[9]-1)/_[5],yt=(_[8]-1)/_[0],Et=(q[8]+1)/q[0],At=at*yt,Pt=at*Et,Vt=$/(-yt+Et),dt=Vt*-yt;U.matrixWorld.decompose(Z.position,Z.quaternion,Z.scale),Z.translateX(dt),Z.translateZ(Vt),Z.matrixWorld.compose(Z.position,Z.quaternion,Z.scale),Z.matrixWorldInverse.copy(Z.matrixWorld).invert();const ut=at+Vt,Rt=ot+Vt,Dt=At-dt,Ht=Pt+($-dt),Bt=rt*ot/Rt*ut,re=gt*ot/Rt*ut;Z.projectionMatrix.makePerspective(Dt,Ht,Bt,re,ut,Rt),Z.projectionMatrixInverse.copy(Z.projectionMatrix).invert()}function X(Z,U){U===null?Z.matrixWorld.copy(Z.matrix):Z.matrixWorld.multiplyMatrices(U.matrixWorld,Z.matrix),Z.matrixWorldInverse.copy(Z.matrixWorld).invert()}this.updateCamera=function(Z){if(T===null)return;u.texture!==null&&(Z.near=u.depthNear,Z.far=u.depthFar),A.near=w.near=M.near=Z.near,A.far=w.far=M.far=Z.far,(P!==A.near||b!==A.far)&&(T.updateRenderState({depthNear:A.near,depthFar:A.far}),P=A.near,b=A.far,M.near=P,M.far=b,w.near=P,w.far=b,M.updateProjectionMatrix(),w.updateProjectionMatrix(),Z.updateProjectionMatrix());const U=Z.parent,H=A.cameras;X(A,U);for(let $=0;$0&&(f.alphaTest.value=o.alphaTest);const c=t.get(o).envMap;if(c&&(f.envMap.value=c,f.flipEnvMap.value=c.isCubeTexture&&c.isRenderTargetTexture===!1?-1:1,f.reflectivity.value=o.reflectivity,f.ior.value=o.ior,f.refractionRatio.value=o.refractionRatio),o.lightMap){f.lightMap.value=o.lightMap;const p=g._useLegacyLights===!0?Math.PI:1;f.lightMapIntensity.value=o.lightMapIntensity*p,i(o.lightMap,f.lightMapTransform)}o.aoMap&&(f.aoMap.value=o.aoMap,f.aoMapIntensity.value=o.aoMapIntensity,i(o.aoMap,f.aoMapTransform))}function s(f,o){f.diffuse.value.copy(o.color),f.opacity.value=o.opacity,o.map&&(f.map.value=o.map,i(o.map,f.mapTransform))}function y(f,o){f.dashSize.value=o.dashSize,f.totalSize.value=o.dashSize+o.gapSize,f.scale.value=o.scale}function e(f,o,c,p){f.diffuse.value.copy(o.color),f.opacity.value=o.opacity,f.size.value=o.size*c,f.scale.value=p*.5,o.map&&(f.map.value=o.map,i(o.map,f.uvTransform)),o.alphaMap&&(f.alphaMap.value=o.alphaMap,i(o.alphaMap,f.alphaMapTransform)),o.alphaTest>0&&(f.alphaTest.value=o.alphaTest)}function r(f,o){f.diffuse.value.copy(o.color),f.opacity.value=o.opacity,f.rotation.value=o.rotation,o.map&&(f.map.value=o.map,i(o.map,f.mapTransform)),o.alphaMap&&(f.alphaMap.value=o.alphaMap,i(o.alphaMap,f.alphaMapTransform)),o.alphaTest>0&&(f.alphaTest.value=o.alphaTest)}function d(f,o){f.specular.value.copy(o.specular),f.shininess.value=Math.max(o.shininess,1e-4)}function h(f,o){o.gradientMap&&(f.gradientMap.value=o.gradientMap)}function a(f,o){f.metalness.value=o.metalness,o.metalnessMap&&(f.metalnessMap.value=o.metalnessMap,i(o.metalnessMap,f.metalnessMapTransform)),f.roughness.value=o.roughness,o.roughnessMap&&(f.roughnessMap.value=o.roughnessMap,i(o.roughnessMap,f.roughnessMapTransform)),t.get(o).envMap&&(f.envMapIntensity.value=o.envMapIntensity)}function l(f,o,c){f.ior.value=o.ior,o.sheen>0&&(f.sheenColor.value.copy(o.sheenColor).multiplyScalar(o.sheen),f.sheenRoughness.value=o.sheenRoughness,o.sheenColorMap&&(f.sheenColorMap.value=o.sheenColorMap,i(o.sheenColorMap,f.sheenColorMapTransform)),o.sheenRoughnessMap&&(f.sheenRoughnessMap.value=o.sheenRoughnessMap,i(o.sheenRoughnessMap,f.sheenRoughnessMapTransform))),o.clearcoat>0&&(f.clearcoat.value=o.clearcoat,f.clearcoatRoughness.value=o.clearcoatRoughness,o.clearcoatMap&&(f.clearcoatMap.value=o.clearcoatMap,i(o.clearcoatMap,f.clearcoatMapTransform)),o.clearcoatRoughnessMap&&(f.clearcoatRoughnessMap.value=o.clearcoatRoughnessMap,i(o.clearcoatRoughnessMap,f.clearcoatRoughnessMapTransform)),o.clearcoatNormalMap&&(f.clearcoatNormalMap.value=o.clearcoatNormalMap,i(o.clearcoatNormalMap,f.clearcoatNormalMapTransform),f.clearcoatNormalScale.value.copy(o.clearcoatNormalScale),o.side===gs&&f.clearcoatNormalScale.value.negate())),o.iridescence>0&&(f.iridescence.value=o.iridescence,f.iridescenceIOR.value=o.iridescenceIOR,f.iridescenceThicknessMinimum.value=o.iridescenceThicknessRange[0],f.iridescenceThicknessMaximum.value=o.iridescenceThicknessRange[1],o.iridescenceMap&&(f.iridescenceMap.value=o.iridescenceMap,i(o.iridescenceMap,f.iridescenceMapTransform)),o.iridescenceThicknessMap&&(f.iridescenceThicknessMap.value=o.iridescenceThicknessMap,i(o.iridescenceThicknessMap,f.iridescenceThicknessMapTransform))),o.transmission>0&&(f.transmission.value=o.transmission,f.transmissionSamplerMap.value=c.texture,f.transmissionSamplerSize.value.set(c.width,c.height),o.transmissionMap&&(f.transmissionMap.value=o.transmissionMap,i(o.transmissionMap,f.transmissionMapTransform)),f.thickness.value=o.thickness,o.thicknessMap&&(f.thicknessMap.value=o.thicknessMap,i(o.thicknessMap,f.thicknessMapTransform)),f.attenuationDistance.value=o.attenuationDistance,f.attenuationColor.value.copy(o.attenuationColor)),o.anisotropy>0&&(f.anisotropyVector.value.set(o.anisotropy*Math.cos(o.anisotropyRotation),o.anisotropy*Math.sin(o.anisotropyRotation)),o.anisotropyMap&&(f.anisotropyMap.value=o.anisotropyMap,i(o.anisotropyMap,f.anisotropyMapTransform))),f.specularIntensity.value=o.specularIntensity,f.specularColor.value.copy(o.specularColor),o.specularColorMap&&(f.specularColorMap.value=o.specularColorMap,i(o.specularColorMap,f.specularColorMapTransform)),o.specularIntensityMap&&(f.specularIntensityMap.value=o.specularIntensityMap,i(o.specularIntensityMap,f.specularIntensityMapTransform))}function n(f,o){o.matcap&&(f.matcap.value=o.matcap)}function u(f,o){const c=t.get(o).light;f.referencePosition.value.setFromMatrixPosition(c.matrixWorld),f.nearDistance.value=c.shadow.camera.near,f.farDistance.value=c.shadow.camera.far}return{refreshFogUniforms:x,refreshMaterialUniforms:T}}function rU(g,t,i,x){let T={},E={},s=[];const y=i.isWebGL2?g.getParameter(g.MAX_UNIFORM_BUFFER_BINDINGS):0;function e(c,p){const v=p.program;x.uniformBlockBinding(c,v)}function r(c,p){let v=T[c.id];v===void 0&&(n(c),v=d(c),T[c.id]=v,c.addEventListener("dispose",f));const m=p.program;x.updateUBOMapping(c,m);const S=t.render.frame;E[c.id]!==S&&(a(c),E[c.id]=S)}function d(c){const p=h();c.__bindingPointIndex=p;const v=g.createBuffer(),m=c.__size,S=c.usage;return g.bindBuffer(g.UNIFORM_BUFFER,v),g.bufferData(g.UNIFORM_BUFFER,m,S),g.bindBuffer(g.UNIFORM_BUFFER,null),g.bindBufferBase(g.UNIFORM_BUFFER,p,v),v}function h(){for(let c=0;c0&&(v+=m-S),c.__size=v,c.__cache={},this}function u(c){const p={boundary:0,storage:0};return typeof c=="number"||typeof c=="boolean"?(p.boundary=4,p.storage=4):c.isVector2?(p.boundary=8,p.storage=8):c.isVector3||c.isColor?(p.boundary=16,p.storage=12):c.isVector4?(p.boundary=16,p.storage=16):c.isMatrix3?(p.boundary=48,p.storage=48):c.isMatrix4?(p.boundary=64,p.storage=64):c.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",c),p}function f(c){const p=c.target;p.removeEventListener("dispose",f);const v=s.indexOf(p.__bindingPointIndex);s.splice(v,1),g.deleteBuffer(T[p.id]),delete T[p.id],delete E[p.id]}function o(){for(const c in T)g.deleteBuffer(T[c]);s=[],T={},E={}}return{bind:e,update:r,dispose:o}}class b1{constructor(t={}){const{canvas:i=g2(),context:x=null,depth:T=!0,stencil:E=!0,alpha:s=!1,antialias:y=!1,premultipliedAlpha:e=!0,preserveDrawingBuffer:r=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:h=!1}=t;this.isWebGLRenderer=!0;let a;x!==null?a=x.getContextAttributes().alpha:a=s;const l=new Uint32Array(4),n=new Int32Array(4);let u=null,f=null;const o=[],c=[];this.domElement=i,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=mr,this._useLegacyLights=!1,this.toneMapping=zo,this.toneMappingExposure=1;const p=this;let v=!1,m=0,S=0,M=null,w=-1,C=null;const A=new an,P=new an;let b=null;const O=new ze(0);let I=0,D=i.width,B=i.height,G=1,z=null,X=null;const j=new an(0,0,D,B),Q=new an(0,0,D,B);let tt=!1;const Y=new ip;let Z=!1,U=!1,H=null;const $=new di,_=new ve,q=new Ct,at={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ot(){return M===null?G:1}let rt=x;function gt(Tt,Zt){for(let qt=0;qt{function Te(){if(ie.forEach(function(Ue){Vt.get(Ue).currentProgram.isReady()&&ie.delete(Ue)}),ie.size===0){ee(Tt);return}setTimeout(Te,10)}yt.get("KHR_parallel_shader_compile")!==null?Te():setTimeout(Te,10)})};let Ii=null;function nn(Tt){Ii&&Ii(Tt)}function $n(){pi.stop()}function Vi(){pi.start()}const pi=new C2;pi.setAnimationLoop(nn),typeof self<"u"&&pi.setContext(self),this.setAnimationLoop=function(Tt){Ii=Tt,he.setAnimationLoop(Tt),Tt===null?pi.stop():pi.start()},he.addEventListener("sessionstart",$n),he.addEventListener("sessionend",Vi),this.render=function(Tt,Zt){if(Zt!==void 0&&Zt.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(v===!0)return;Tt.matrixWorldAutoUpdate===!0&&Tt.updateMatrixWorld(),Zt.parent===null&&Zt.matrixWorldAutoUpdate===!0&&Zt.updateMatrixWorld(),he.enabled===!0&&he.isPresenting===!0&&(he.cameraAutoUpdate===!0&&he.updateCamera(Zt),Zt=he.getCamera()),Tt.isScene===!0&&Tt.onBeforeRender(p,Tt,Zt,M),f=xe.get(Tt,c.length),f.init(),c.push(f),$.multiplyMatrices(Zt.projectionMatrix,Zt.matrixWorldInverse),Y.setFromProjectionMatrix($),U=this.localClippingEnabled,Z=Pe.init(this.clippingPlanes,U),u=ge.get(Tt,o.length),u.init(),o.push(u),Xi(Tt,Zt,0,p.sortObjects),u.finish(),p.sortObjects===!0&&u.sort(z,X),this.info.render.frame++,Z===!0&&Pe.beginShadows();const qt=f.state.shadowsArray;if(te.render(qt,Tt,Zt),Z===!0&&Pe.endShadows(),this.info.autoReset===!0&&this.info.reset(),(he.enabled===!1||he.isPresenting===!1||he.hasDepthSensing()===!1)&&Ge.render(u,Tt),f.setupLights(p._useLegacyLights),Zt.isArrayCamera){const ie=Zt.cameras;for(let ee=0,Te=ie.length;ee0?f=c[c.length-1]:f=null,o.pop(),o.length>0?u=o[o.length-1]:u=null};function Xi(Tt,Zt,qt,ie){if(Tt.visible===!1)return;if(Tt.layers.test(Zt.layers)){if(Tt.isGroup)qt=Tt.renderOrder;else if(Tt.isLOD)Tt.autoUpdate===!0&&Tt.update(Zt);else if(Tt.isLight)f.pushLight(Tt),Tt.castShadow&&f.pushShadow(Tt);else if(Tt.isSprite){if(!Tt.frustumCulled||Y.intersectsSprite(Tt)){ie&&q.setFromMatrixPosition(Tt.matrixWorld).applyMatrix4($);const Ue=Bt.update(Tt),We=Tt.material;We.visible&&u.push(Tt,Ue,We,qt,q.z,null)}}else if((Tt.isMesh||Tt.isLine||Tt.isPoints)&&(!Tt.frustumCulled||Y.intersectsObject(Tt))){const Ue=Bt.update(Tt),We=Tt.material;if(ie&&(Tt.boundingSphere!==void 0?(Tt.boundingSphere===null&&Tt.computeBoundingSphere(),q.copy(Tt.boundingSphere.center)):(Ue.boundingSphere===null&&Ue.computeBoundingSphere(),q.copy(Ue.boundingSphere.center)),q.applyMatrix4(Tt.matrixWorld).applyMatrix4($)),Array.isArray(We)){const Je=Ue.groups;for(let ti=0,ni=Je.length;ti0&&oa(ee,Te,Zt,qt),ie&&At.viewport(A.copy(ie)),ee.length>0&&Us(ee,Zt,qt),Te.length>0&&Us(Te,Zt,qt),Ue.length>0&&Us(Ue,Zt,qt),At.buffers.depth.setTest(!0),At.buffers.depth.setMask(!0),At.buffers.color.setMask(!0),At.setPolygonOffset(!1)}function oa(Tt,Zt,qt,ie){if((qt.isScene===!0?qt.overrideMaterial:null)!==null)return;const Te=Et.isWebGL2;H===null&&(H=new ro(1,1,{generateMipmaps:!0,type:yt.has("EXT_color_buffer_half_float")?qf:Go,minFilter:Bo,samples:Te?4:0})),p.getDrawingBufferSize(_),Te?H.setSize(_.x,_.y):H.setSize(Rm(_.x),Rm(_.y));const Ue=p.getRenderTarget();p.setRenderTarget(H),p.getClearColor(O),I=p.getClearAlpha(),I<1&&p.setClearColor(16777215,.5),p.clear();const We=p.toneMapping;p.toneMapping=zo,Us(Tt,qt,ie),dt.updateMultisampleRenderTarget(H),dt.updateRenderTargetMipmap(H);let Je=!1;for(let ti=0,ni=Zt.length;ti0),oi=!!qt.morphAttributes.position,Ji=!!qt.morphAttributes.normal,un=!!qt.morphAttributes.color;let ji=zo;ie.toneMapped&&(M===null||M.isXRRenderTarget===!0)&&(ji=p.toneMapping);const yn=qt.morphAttributes.position||qt.morphAttributes.normal||qt.morphAttributes.color,ei=yn!==void 0?yn.length:0,Se=Vt.get(ie),Br=f.state.lights;if(Z===!0&&(U===!0||Tt!==C)){const En=Tt===C&&ie.id===w;Pe.setState(ie,Tt,En)}let gi=!1;ie.version===Se.__version?(Se.needsLights&&Se.lightsStateVersion!==Br.state.version||Se.outputColorSpace!==We||ee.isBatchedMesh&&Se.batching===!1||!ee.isBatchedMesh&&Se.batching===!0||ee.isInstancedMesh&&Se.instancing===!1||!ee.isInstancedMesh&&Se.instancing===!0||ee.isSkinnedMesh&&Se.skinning===!1||!ee.isSkinnedMesh&&Se.skinning===!0||ee.isInstancedMesh&&Se.instancingColor===!0&&ee.instanceColor===null||ee.isInstancedMesh&&Se.instancingColor===!1&&ee.instanceColor!==null||Se.envMap!==Je||ie.fog===!0&&Se.fog!==Te||Se.numClippingPlanes!==void 0&&(Se.numClippingPlanes!==Pe.numPlanes||Se.numIntersection!==Pe.numIntersection)||Se.vertexAlphas!==ti||Se.vertexTangents!==ni||Se.morphTargets!==oi||Se.morphNormals!==Ji||Se.morphColors!==un||Se.toneMapping!==ji||Et.isWebGL2===!0&&Se.morphTargetsCount!==ei)&&(gi=!0):(gi=!0,Se.__version=ie.version);let fn=Se.currentProgram;gi===!0&&(fn=lo(ie,Zt,ee));let Ni=!1,Vn=!1,vn=!1;const Ki=fn.getUniforms(),pr=Se.uniforms;if(At.useProgram(fn.program)&&(Ni=!0,Vn=!0,vn=!0),ie.id!==w&&(w=ie.id,Vn=!0),Ni||C!==Tt){Ki.setValue(rt,"projectionMatrix",Tt.projectionMatrix),Ki.setValue(rt,"viewMatrix",Tt.matrixWorldInverse);const En=Ki.map.cameraPosition;En!==void 0&&En.setValue(rt,q.setFromMatrixPosition(Tt.matrixWorld)),Et.logarithmicDepthBuffer&&Ki.setValue(rt,"logDepthBufFC",2/(Math.log(Tt.far+1)/Math.LN2)),(ie.isMeshPhongMaterial||ie.isMeshToonMaterial||ie.isMeshLambertMaterial||ie.isMeshBasicMaterial||ie.isMeshStandardMaterial||ie.isShaderMaterial)&&Ki.setValue(rt,"isOrthographic",Tt.isOrthographicCamera===!0),C!==Tt&&(C=Tt,Vn=!0,vn=!0)}if(ee.isSkinnedMesh){Ki.setOptional(rt,ee,"bindMatrix"),Ki.setOptional(rt,ee,"bindMatrixInverse");const En=ee.skeleton;En&&(Et.floatVertexTextures?(En.boneTexture===null&&En.computeBoneTexture(),Ki.setValue(rt,"boneTexture",En.boneTexture,dt)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}ee.isBatchedMesh&&(Ki.setOptional(rt,ee,"batchingTexture"),Ki.setValue(rt,"batchingTexture",ee._matricesTexture,dt));const Gs=qt.morphAttributes;if((Gs.position!==void 0||Gs.normal!==void 0||Gs.color!==void 0&&Et.isWebGL2===!0)&&Oe.update(ee,qt,fn),(Vn||Se.receiveShadow!==ee.receiveShadow)&&(Se.receiveShadow=ee.receiveShadow,Ki.setValue(rt,"receiveShadow",ee.receiveShadow)),ie.isMeshGouraudMaterial&&ie.envMap!==null&&(pr.envMap.value=Je,pr.flipEnvMap.value=Je.isCubeTexture&&Je.isRenderTargetTexture===!1?-1:1),Vn&&(Ki.setValue(rt,"toneMappingExposure",p.toneMappingExposure),Se.needsLights&&ho(pr,vn),Te&&ie.fog===!0&&le.refreshFogUniforms(pr,Te),le.refreshMaterialUniforms(pr,ie,G,B,H),pm.upload(rt,qr(Se),pr,dt)),ie.isShaderMaterial&&ie.uniformsNeedUpdate===!0&&(pm.upload(rt,qr(Se),pr,dt),ie.uniformsNeedUpdate=!1),ie.isSpriteMaterial&&Ki.setValue(rt,"center",ee.center),Ki.setValue(rt,"modelViewMatrix",ee.modelViewMatrix),Ki.setValue(rt,"normalMatrix",ee.normalMatrix),Ki.setValue(rt,"modelMatrix",ee.matrixWorld),ie.isShaderMaterial||ie.isRawShaderMaterial){const En=ie.uniformsGroups;for(let la=0,Jn=En.length;la0&&dt.useMultisampledRTT(Tt)===!1?ee=Vt.get(Tt).__webglMultisampledFramebuffer:Array.isArray(ni)?ee=ni[qt]:ee=ni,A.copy(Tt.viewport),P.copy(Tt.scissor),b=Tt.scissorTest}else A.copy(j).multiplyScalar(G).floor(),P.copy(Q).multiplyScalar(G).floor(),b=tt;if(At.bindFramebuffer(rt.FRAMEBUFFER,ee)&&Et.drawBuffers&&ie&&At.drawBuffers(Tt,ee),At.viewport(A),At.scissor(P),At.setScissorTest(b),Te){const Je=Vt.get(Tt.texture);rt.framebufferTexture2D(rt.FRAMEBUFFER,rt.COLOR_ATTACHMENT0,rt.TEXTURE_CUBE_MAP_POSITIVE_X+Zt,Je.__webglTexture,qt)}else if(Ue){const Je=Vt.get(Tt.texture),ti=Zt||0;rt.framebufferTextureLayer(rt.FRAMEBUFFER,rt.COLOR_ATTACHMENT0,Je.__webglTexture,qt||0,ti)}w=-1},this.readRenderTargetPixels=function(Tt,Zt,qt,ie,ee,Te,Ue){if(!(Tt&&Tt.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let We=Vt.get(Tt).__webglFramebuffer;if(Tt.isWebGLCubeRenderTarget&&Ue!==void 0&&(We=We[Ue]),We){At.bindFramebuffer(rt.FRAMEBUFFER,We);try{const Je=Tt.texture,ti=Je.format,ni=Je.type;if(ti!==vs&&ne.convert(ti)!==rt.getParameter(rt.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const oi=ni===qf&&(yt.has("EXT_color_buffer_half_float")||Et.isWebGL2&&yt.has("EXT_color_buffer_float"));if(ni!==Go&&ne.convert(ni)!==rt.getParameter(rt.IMPLEMENTATION_COLOR_READ_TYPE)&&!(ni===Ma&&(Et.isWebGL2||yt.has("OES_texture_float")||yt.has("WEBGL_color_buffer_float")))&&!oi){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}Zt>=0&&Zt<=Tt.width-ie&&qt>=0&&qt<=Tt.height-ee&&rt.readPixels(Zt,qt,ie,ee,ne.convert(ti),ne.convert(ni),Te)}finally{const Je=M!==null?Vt.get(M).__webglFramebuffer:null;At.bindFramebuffer(rt.FRAMEBUFFER,Je)}}},this.copyFramebufferToTexture=function(Tt,Zt,qt=0){const ie=Math.pow(2,-qt),ee=Math.floor(Zt.image.width*ie),Te=Math.floor(Zt.image.height*ie);dt.setTexture2D(Zt,0),rt.copyTexSubImage2D(rt.TEXTURE_2D,qt,0,0,Tt.x,Tt.y,ee,Te),At.unbindTexture()},this.copyTextureToTexture=function(Tt,Zt,qt,ie=0){const ee=Zt.image.width,Te=Zt.image.height,Ue=ne.convert(qt.format),We=ne.convert(qt.type);dt.setTexture2D(qt,0),rt.pixelStorei(rt.UNPACK_FLIP_Y_WEBGL,qt.flipY),rt.pixelStorei(rt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,qt.premultiplyAlpha),rt.pixelStorei(rt.UNPACK_ALIGNMENT,qt.unpackAlignment),Zt.isDataTexture?rt.texSubImage2D(rt.TEXTURE_2D,ie,Tt.x,Tt.y,ee,Te,Ue,We,Zt.image.data):Zt.isCompressedTexture?rt.compressedTexSubImage2D(rt.TEXTURE_2D,ie,Tt.x,Tt.y,Zt.mipmaps[0].width,Zt.mipmaps[0].height,Ue,Zt.mipmaps[0].data):rt.texSubImage2D(rt.TEXTURE_2D,ie,Tt.x,Tt.y,Ue,We,Zt.image),ie===0&&qt.generateMipmaps&&rt.generateMipmap(rt.TEXTURE_2D),At.unbindTexture()},this.copyTextureToTexture3D=function(Tt,Zt,qt,ie,ee=0){if(p.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Te=Tt.max.x-Tt.min.x+1,Ue=Tt.max.y-Tt.min.y+1,We=Tt.max.z-Tt.min.z+1,Je=ne.convert(ie.format),ti=ne.convert(ie.type);let ni;if(ie.isData3DTexture)dt.setTexture3D(ie,0),ni=rt.TEXTURE_3D;else if(ie.isDataArrayTexture||ie.isCompressedArrayTexture)dt.setTexture2DArray(ie,0),ni=rt.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}rt.pixelStorei(rt.UNPACK_FLIP_Y_WEBGL,ie.flipY),rt.pixelStorei(rt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ie.premultiplyAlpha),rt.pixelStorei(rt.UNPACK_ALIGNMENT,ie.unpackAlignment);const oi=rt.getParameter(rt.UNPACK_ROW_LENGTH),Ji=rt.getParameter(rt.UNPACK_IMAGE_HEIGHT),un=rt.getParameter(rt.UNPACK_SKIP_PIXELS),ji=rt.getParameter(rt.UNPACK_SKIP_ROWS),yn=rt.getParameter(rt.UNPACK_SKIP_IMAGES),ei=qt.isCompressedTexture?qt.mipmaps[ee]:qt.image;rt.pixelStorei(rt.UNPACK_ROW_LENGTH,ei.width),rt.pixelStorei(rt.UNPACK_IMAGE_HEIGHT,ei.height),rt.pixelStorei(rt.UNPACK_SKIP_PIXELS,Tt.min.x),rt.pixelStorei(rt.UNPACK_SKIP_ROWS,Tt.min.y),rt.pixelStorei(rt.UNPACK_SKIP_IMAGES,Tt.min.z),qt.isDataTexture||qt.isData3DTexture?rt.texSubImage3D(ni,ee,Zt.x,Zt.y,Zt.z,Te,Ue,We,Je,ti,ei.data):qt.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),rt.compressedTexSubImage3D(ni,ee,Zt.x,Zt.y,Zt.z,Te,Ue,We,Je,ei.data)):rt.texSubImage3D(ni,ee,Zt.x,Zt.y,Zt.z,Te,Ue,We,Je,ti,ei),rt.pixelStorei(rt.UNPACK_ROW_LENGTH,oi),rt.pixelStorei(rt.UNPACK_IMAGE_HEIGHT,Ji),rt.pixelStorei(rt.UNPACK_SKIP_PIXELS,un),rt.pixelStorei(rt.UNPACK_SKIP_ROWS,ji),rt.pixelStorei(rt.UNPACK_SKIP_IMAGES,yn),ee===0&&ie.generateMipmaps&&rt.generateMipmap(ni),At.unbindTexture()},this.initTexture=function(Tt){Tt.isCubeTexture?dt.setTextureCube(Tt,0):Tt.isData3DTexture?dt.setTexture3D(Tt,0):Tt.isDataArrayTexture||Tt.isCompressedArrayTexture?dt.setTexture2DArray(Tt,0):dt.setTexture2D(Tt,0),At.unbindTexture()},this.resetState=function(){m=0,S=0,M=null,At.reset(),je.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Uo}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const i=this.getContext();i.drawingBufferColorSpace=t===pg?"display-p3":"srgb",i.unpackColorSpace=sn.workingColorSpace===qd?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===mr?mh:y1}set outputEncoding(t){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=t===mh?mr:Ho}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(t){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=t}}class O2 extends b1{}O2.prototype.isWebGL1Renderer=!0;class gg{constructor(t,i=25e-5){this.isFogExp2=!0,this.name="",this.color=new ze(t),this.density=i}clone(){return new gg(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class yg{constructor(t,i=1,x=1e3){this.isFog=!0,this.name="",this.color=new ze(t),this.near=i,this.far=x}clone(){return new yg(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class bm extends ki{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,i){return super.copy(t,i),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const i=super.toJSON(t);return this.fog!==null&&(i.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(i.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(i.object.backgroundIntensity=this.backgroundIntensity),i}}class xg{constructor(t,i){this.isInterleavedBuffer=!0,this.array=t,this.stride=i,this.count=t!==void 0?t.length/i:0,this.usage=Nd,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=ra()}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return Mu("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,i){this.updateRanges.push({start:t,count:i})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,i,x){t*=this.stride,x*=i.stride;for(let T=0,E=this.stride;Tt.far||i.push({distance:e,point:_c.clone(),uv:na.getInterpolation(_c,Av,td,Pv,mE,$0,gE,new ve),face:null,object:this})}copy(t,i){return super.copy(t,i),t.center!==void 0&&this.center.copy(t.center),this.material=t.material,this}}function Rv(g,t,i,x,T,E){Lf.subVectors(g,i).addScalar(.5).multiply(x),T!==void 0?(qc.x=E*Lf.x-T*Lf.y,qc.y=T*Lf.x+E*Lf.y):qc.copy(Lf),g.copy(t),g.x+=qc.x,g.y+=qc.y,g.applyMatrix4(D2)}const bv=new Ct,yE=new Ct;class N2 extends ki{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const i=t.levels;for(let x=0,T=i.length;x0){let x,T;for(x=1,T=i.length;x0){bv.setFromMatrixPosition(this.matrixWorld);const T=t.ray.origin.distanceTo(bv);this.getObjectForDistance(T).raycast(t,i)}}update(t){const i=this.levels;if(i.length>1){bv.setFromMatrixPosition(t.matrixWorld),yE.setFromMatrixPosition(this.matrixWorld);const x=bv.distanceTo(yE)/t.zoom;i[0].object.visible=!0;let T,E;for(T=1,E=i.length;T=s)i[T-1].object.visible=!1,i[T].object.visible=!0;else break}for(this._currentLevel=T-1;T=x.length&&x.push({start:-1,count:-1,z:-1});const E=x[this.index];T.push(E),this.index++,E.start=t.start,E.count=t.count,E.z=i}reset(){this.list.length=0,this.index=0}}const Of="batchId",oh=new di,PE=new di,fU=new di,RE=new di,_0=new ip,Ov=new ys,nu=new Qr,nd=new Ct,q0=new uU,Zr=new dr,Dv=[];function cU(g,t,i=0){const x=t.itemSize;if(g.isInterleavedBufferAttribute||g.array.constructor!==t.array.constructor){const T=g.count;for(let E=0;E65536?new Uint32Array(E):new Uint16Array(E);i.setIndex(new on(y,1))}const s=T>65536?new Uint32Array(x):new Uint16Array(x);i.setAttribute(Of,new on(s,1)),this._geometryInitialized=!0}}_validateGeometry(t){if(t.getAttribute(Of))throw new Error(`BatchedMesh: Geometry cannot use attribute "${Of}"`);const i=this.geometry;if(!!t.getIndex()!=!!i.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const x in i.attributes){if(x===Of)continue;if(!t.hasAttribute(x))throw new Error(`BatchedMesh: Added geometry missing "${x}". All geometries must have consistent attributes.`);const T=t.getAttribute(x),E=i.getAttribute(x);if(T.itemSize!==E.itemSize||T.normalized!==E.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(t){return this.customSort=t,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ys);const t=this._geometryCount,i=this.boundingBox,x=this._active;i.makeEmpty();for(let T=0;T=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const T={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let E=null;const s=this._reservedRanges,y=this._drawRanges,e=this._bounds;this._geometryCount!==0&&(E=s[s.length-1]),i===-1?T.vertexCount=t.getAttribute("position").count:T.vertexCount=i,E===null?T.vertexStart=0:T.vertexStart=E.vertexStart+E.vertexCount;const r=t.getIndex(),d=r!==null;if(d&&(x===-1?T.indexCount=r.count:T.indexCount=x,E===null?T.indexStart=0:T.indexStart=E.indexStart+E.indexCount),T.indexStart!==-1&&T.indexStart+T.indexCount>this._maxIndexCount||T.vertexStart+T.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const h=this._visibility,a=this._active,l=this._matricesTexture,n=this._matricesTexture.image.data;h.push(!0),a.push(!0);const u=this._geometryCount;this._geometryCount++,fU.toArray(n,u*16),l.needsUpdate=!0,s.push(T),y.push({start:d?T.indexStart:T.vertexStart,count:-1}),e.push({boxInitialized:!1,box:new ys,sphereInitialized:!1,sphere:new Qr});const f=this.geometry.getAttribute(Of);for(let o=0;o=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(i);const x=this.geometry,T=x.getIndex()!==null,E=x.getIndex(),s=i.getIndex(),y=this._reservedRanges[t];if(T&&s.count>y.indexCount||i.attributes.position.count>y.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const e=y.vertexStart,r=y.vertexCount;for(const l in x.attributes){if(l===Of)continue;const n=i.getAttribute(l),u=x.getAttribute(l);cU(n,u,e);const f=n.itemSize;for(let o=n.count,c=r;o=i.length||i[t]===!1?this:(i[t]=!1,this._visibilityChanged=!0,this)}getBoundingBoxAt(t,i){if(this._active[t]===!1)return null;const T=this._bounds[t],E=T.box,s=this.geometry;if(T.boxInitialized===!1){E.makeEmpty();const y=s.index,e=s.attributes.position,r=this._drawRanges[t];for(let d=r.start,h=r.start+r.count;d=s||x[t]===!1?this:(i.toArray(E,t*16),T.needsUpdate=!0,this)}getMatrixAt(t,i){const x=this._active,T=this._matricesTexture.image.data,E=this._geometryCount;return t>=E||x[t]===!1?null:i.fromArray(T,t*16)}setVisibleAt(t,i){const x=this._visibility,T=this._active,E=this._geometryCount;return t>=E||T[t]===!1||x[t]===i?this:(x[t]=i,this._visibilityChanged=!0,this)}getVisibleAt(t){const i=this._visibility,x=this._active,T=this._geometryCount;return t>=T||x[t]===!1?!1:i[t]}raycast(t,i){const x=this._visibility,T=this._active,E=this._drawRanges,s=this._geometryCount,y=this.matrixWorld,e=this.geometry;Zr.material=this.material,Zr.geometry.index=e.index,Zr.geometry.attributes=e.attributes,Zr.geometry.boundingBox===null&&(Zr.geometry.boundingBox=new ys),Zr.geometry.boundingSphere===null&&(Zr.geometry.boundingSphere=new Qr);for(let r=0;r({...i})),this._reservedRanges=t._reservedRanges.map(i=>({...i})),this._visibility=t._visibility.slice(),this._active=t._active.slice(),this._bounds=t._bounds.map(i=>({boxInitialized:i.boxInitialized,box:i.box.clone(),sphereInitialized:i.sphereInitialized,sphere:i.sphere.clone()})),this._maxGeometryCount=t._maxGeometryCount,this._maxVertexCount=t._maxVertexCount,this._maxIndexCount=t._maxIndexCount,this._geometryInitialized=t._geometryInitialized,this._geometryCount=t._geometryCount,this._multiDrawCounts=t._multiDrawCounts.slice(),this._multiDrawStarts=t._multiDrawStarts.slice(),this._matricesTexture=t._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(t,i,x,T,E){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const s=T.getIndex(),y=s===null?1:s.array.BYTES_PER_ELEMENT,e=this._active,r=this._visibility,d=this._multiDrawStarts,h=this._multiDrawCounts,a=this._drawRanges,l=this.perObjectFrustumCulled;l&&(RE.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse).multiply(this.matrixWorld),_0.setFromProjectionMatrix(RE,t.coordinateSystem));let n=0;if(this.sortObjects){PE.copy(this.matrixWorld).invert(),nd.setFromMatrixPosition(x.matrixWorld).applyMatrix4(PE);for(let o=0,c=r.length;oe)continue;a.applyMatrix4(this.matrixWorld);const w=t.ray.origin.distanceTo(a);wt.far||i.push({distance:w,point:h.clone().applyMatrix4(this.matrixWorld),index:p,face:null,faceIndex:null,object:this})}}else{const o=Math.max(0,s.start),c=Math.min(f.count,s.start+s.count);for(let p=o,v=c-1;pe)continue;a.applyMatrix4(this.matrixWorld);const S=t.ray.origin.distanceTo(a);St.far||i.push({distance:S,point:h.clone().applyMatrix4(this.matrixWorld),index:p,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const i=this.geometry.morphAttributes,x=Object.keys(i);if(x.length>0){const T=i[x[0]];if(T!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,s=T.length;E0){const T=i[x[0]];if(T!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,s=T.length;ET.far)return;E.push({distance:r,distanceToRay:Math.sqrt(y),point:e,index:t,face:null,object:s})}}class dU extends zn{constructor(t,i,x,T,E,s,y,e,r){super(t,i,x,T,E,s,y,e,r),this.isVideoTexture=!0,this.minFilter=s!==void 0?s:Bn,this.magFilter=E!==void 0?E:Bn,this.generateMipmaps=!1;const d=this;function h(){d.needsUpdate=!0,t.requestVideoFrameCallback(h)}"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(h)}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;"requestVideoFrameCallback"in t===!1&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class pU extends zn{constructor(t,i){super({width:t,height:i}),this.isFramebufferTexture=!0,this.magFilter=rr,this.minFilter=rr,this.generateMipmaps=!1,this.needsUpdate=!0}}class Tg extends zn{constructor(t,i,x,T,E,s,y,e,r,d,h,a){super(null,s,y,e,r,d,T,E,h,a),this.isCompressedTexture=!0,this.image={width:i,height:x},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class vU extends Tg{constructor(t,i,x,T,E,s){super(t,i,x,E,s),this.isCompressedArrayTexture=!0,this.image.depth=T,this.wrapR=Jr}}class mU extends Tg{constructor(t,i,x){super(void 0,t[0].width,t[0].height,i,x,Rl),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class gU extends zn{constructor(t,i,x,T,E,s,y,e,r){super(t,i,x,T,E,s,y,e,r),this.isCanvasTexture=!0,this.needsUpdate=!0}}class ao{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,i){const x=this.getUtoTmapping(t);return this.getPoint(x,i)}getPoints(t=5){const i=[];for(let x=0;x<=t;x++)i.push(this.getPoint(x/t));return i}getSpacedPoints(t=5){const i=[];for(let x=0;x<=t;x++)i.push(this.getPointAt(x/t));return i}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const i=[];let x,T=this.getPoint(0),E=0;i.push(0);for(let s=1;s<=t;s++)x=this.getPoint(s/t),E+=x.distanceTo(T),i.push(E),T=x;return this.cacheArcLengths=i,i}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,i){const x=this.getLengths();let T=0;const E=x.length;let s;i?s=i:s=t*x[E-1];let y=0,e=E-1,r;for(;y<=e;)if(T=Math.floor(y+(e-y)/2),r=x[T]-s,r<0)y=T+1;else if(r>0)e=T-1;else{e=T;break}if(T=e,x[T]===s)return T/(E-1);const d=x[T],a=x[T+1]-d,l=(s-d)/a;return(T+l)/(E-1)}getTangent(t,i){let T=t-1e-4,E=t+1e-4;T<0&&(T=0),E>1&&(E=1);const s=this.getPoint(T),y=this.getPoint(E),e=i||(s.isVector2?new ve:new Ct);return e.copy(y).sub(s).normalize(),e}getTangentAt(t,i){const x=this.getUtoTmapping(t);return this.getTangent(x,i)}computeFrenetFrames(t,i){const x=new Ct,T=[],E=[],s=[],y=new Ct,e=new di;for(let l=0;l<=t;l++){const n=l/t;T[l]=this.getTangentAt(n,new Ct)}E[0]=new Ct,s[0]=new Ct;let r=Number.MAX_VALUE;const d=Math.abs(T[0].x),h=Math.abs(T[0].y),a=Math.abs(T[0].z);d<=r&&(r=d,x.set(1,0,0)),h<=r&&(r=h,x.set(0,1,0)),a<=r&&x.set(0,0,1),y.crossVectors(T[0],x).normalize(),E[0].crossVectors(T[0],y),s[0].crossVectors(T[0],E[0]);for(let l=1;l<=t;l++){if(E[l]=E[l-1].clone(),s[l]=s[l-1].clone(),y.crossVectors(T[l-1],T[l]),y.length()>Number.EPSILON){y.normalize();const n=Math.acos(Zn(T[l-1].dot(T[l]),-1,1));E[l].applyMatrix4(e.makeRotationAxis(y,n))}s[l].crossVectors(T[l],E[l])}if(i===!0){let l=Math.acos(Zn(E[0].dot(E[t]),-1,1));l/=t,T[0].dot(y.crossVectors(E[0],E[t]))>0&&(l=-l);for(let n=1;n<=t;n++)E[n].applyMatrix4(e.makeRotationAxis(T[n],l*n)),s[n].crossVectors(T[n],E[n])}return{tangents:T,normals:E,binormals:s}}clone(){return new this.constructor().copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class Eg extends ao{constructor(t=0,i=0,x=1,T=1,E=0,s=Math.PI*2,y=!1,e=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=i,this.xRadius=x,this.yRadius=T,this.aStartAngle=E,this.aEndAngle=s,this.aClockwise=y,this.aRotation=e}getPoint(t,i){const x=i||new ve,T=Math.PI*2;let E=this.aEndAngle-this.aStartAngle;const s=Math.abs(E)T;)E-=T;E0?0:(Math.floor(Math.abs(y)/E)+1)*E:e===0&&y===E-1&&(y=E-2,e=1);let r,d;this.closed||y>0?r=T[(y-1)%E]:(Uv.subVectors(T[0],T[1]).add(T[0]),r=Uv);const h=T[y%E],a=T[(y+1)%E];if(this.closed||y+2T.length-2?T.length-1:s+1],h=T[s>T.length-3?T.length-1:s+2];return x.set(BE(y,e.x,r.x,d.x,h.x),BE(y,e.y,r.y,d.y,h.y)),x}copy(t){super.copy(t),this.points=[];for(let i=0,x=t.points.length;i=x){const s=T[E]-x,y=this.curves[E],e=y.getLength(),r=e===0?0:1-s/e;return y.getPointAt(r,i)}E++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let i=0;for(let x=0,T=this.curves.length;x1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}copy(t){super.copy(t),this.curves=[];for(let i=0,x=t.curves.length;i0){const h=r.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(r);const d=r.getPoint(1);return this.currentPoint.copy(d),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class rp extends Fi{constructor(t=[new ve(0,-.5),new ve(.5,0),new ve(0,.5)],i=12,x=0,T=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:t,segments:i,phiStart:x,phiLength:T},i=Math.floor(i),T=Zn(T,0,Math.PI*2);const E=[],s=[],y=[],e=[],r=[],d=1/i,h=new Ct,a=new ve,l=new Ct,n=new Ct,u=new Ct;let f=0,o=0;for(let c=0;c<=t.length-1;c++)switch(c){case 0:f=t[c+1].x-t[c].x,o=t[c+1].y-t[c].y,l.x=o*1,l.y=-f,l.z=o*0,u.copy(l),l.normalize(),e.push(l.x,l.y,l.z);break;case t.length-1:e.push(u.x,u.y,u.z);break;default:f=t[c+1].x-t[c].x,o=t[c+1].y-t[c].y,l.x=o*1,l.y=-f,l.z=o*0,n.copy(l),l.x+=u.x,l.y+=u.y,l.z+=u.z,l.normalize(),e.push(l.x,l.y,l.z),u.copy(n)}for(let c=0;c<=i;c++){const p=x+c*d*T,v=Math.sin(p),m=Math.cos(p);for(let S=0;S<=t.length-1;S++){h.x=t[S].x*v,h.y=t[S].y,h.z=t[S].x*m,s.push(h.x,h.y,h.z),a.x=c/i,a.y=S/(t.length-1),y.push(a.x,a.y);const M=e[3*S+0]*v,w=e[3*S+1],C=e[3*S+0]*m;r.push(M,w,C)}}for(let c=0;c0&&p(!0),i>0&&p(!1)),this.setIndex(d),this.setAttribute("position",new ke(h,3)),this.setAttribute("normal",new ke(a,3)),this.setAttribute("uv",new ke(l,2));function c(){const v=new Ct,m=new Ct;let S=0;const M=(i-t)/x;for(let w=0;w<=E;w++){const C=[],A=w/E,P=A*(i-t)+t;for(let b=0;b<=T;b++){const O=b/T,I=O*e+y,D=Math.sin(I),B=Math.cos(I);m.x=P*D,m.y=-A*x+f,m.z=P*B,h.push(m.x,m.y,m.z),v.set(D,M,B).normalize(),a.push(v.x,v.y,v.z),l.push(O,1-A),C.push(n++)}u.push(C)}for(let w=0;w.9&&M<.1&&(p<.2&&(s[c+0]+=1),v<.2&&(s[c+2]+=1),m<.2&&(s[c+4]+=1))}}function a(c){E.push(c.x,c.y,c.z)}function l(c,p){const v=c*3;p.x=t[v+0],p.y=t[v+1],p.z=t[v+2]}function n(){const c=new Ct,p=new Ct,v=new Ct,m=new Ct,S=new ve,M=new ve,w=new ve;for(let C=0,A=0;C80*i){y=r=g[0],e=d=g[1];for(let n=i;nr&&(r=h),a>d&&(d=a);l=Math.max(r-y,d-e),l=l!==0?32767/l:0}return Gd(E,s,i,y,e,l,0),s}};function K2(g,t,i,x,T){let E,s;if(T===HU(g,t,i,x)>0)for(E=t;E=t;E-=x)s=UE(E,g[E],g[E+1],s);return s&&Pg(s,s.next)&&(Hd(s),s=s.next),s}function Ou(g,t){if(!g)return g;t||(t=g);let i=g,x;do if(x=!1,!i.steiner&&(Pg(i,i.next)||Un(i.prev,i,i.next)===0)){if(Hd(i),i=t=i.prev,i===i.next)break;x=!0}else i=i.next;while(x||i!==t);return t}function Gd(g,t,i,x,T,E,s){if(!g)return;!s&&E&&NU(g,x,T,E);let y=g,e,r;for(;g.prev!==g.next;){if(e=g.prev,r=g.next,E?PU(g,x,T,E):AU(g)){t.push(e.i/i|0),t.push(g.i/i|0),t.push(r.i/i|0),Hd(g),g=r.next,y=r.next;continue}if(g=r,g===y){s?s===1?(g=RU(Ou(g),t,i),Gd(g,t,i,x,T,E,2)):s===2&&bU(g,t,i,x,T,E):Gd(Ou(g),t,i,x,T,E,1);break}}}function AU(g){const t=g.prev,i=g,x=g.next;if(Un(t,i,x)>=0)return!1;const T=t.x,E=i.x,s=x.x,y=t.y,e=i.y,r=x.y,d=TE?T>s?T:s:E>s?E:s,l=y>e?y>r?y:r:e>r?e:r;let n=x.next;for(;n!==t;){if(n.x>=d&&n.x<=a&&n.y>=h&&n.y<=l&&kf(T,y,E,e,s,r,n.x,n.y)&&Un(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function PU(g,t,i,x){const T=g.prev,E=g,s=g.next;if(Un(T,E,s)>=0)return!1;const y=T.x,e=E.x,r=s.x,d=T.y,h=E.y,a=s.y,l=ye?y>r?y:r:e>r?e:r,f=d>h?d>a?d:a:h>a?h:a,o=wx(l,n,t,i,x),c=wx(u,f,t,i,x);let p=g.prevZ,v=g.nextZ;for(;p&&p.z>=o&&v&&v.z<=c;){if(p.x>=l&&p.x<=u&&p.y>=n&&p.y<=f&&p!==T&&p!==s&&kf(y,d,e,h,r,a,p.x,p.y)&&Un(p.prev,p,p.next)>=0||(p=p.prevZ,v.x>=l&&v.x<=u&&v.y>=n&&v.y<=f&&v!==T&&v!==s&&kf(y,d,e,h,r,a,v.x,v.y)&&Un(v.prev,v,v.next)>=0))return!1;v=v.nextZ}for(;p&&p.z>=o;){if(p.x>=l&&p.x<=u&&p.y>=n&&p.y<=f&&p!==T&&p!==s&&kf(y,d,e,h,r,a,p.x,p.y)&&Un(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=c;){if(v.x>=l&&v.x<=u&&v.y>=n&&v.y<=f&&v!==T&&v!==s&&kf(y,d,e,h,r,a,v.x,v.y)&&Un(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function RU(g,t,i){let x=g;do{const T=x.prev,E=x.next.next;!Pg(T,E)&&Z2(T,x,x.next,E)&&Vd(T,E)&&Vd(E,T)&&(t.push(T.i/i|0),t.push(x.i/i|0),t.push(E.i/i|0),Hd(x),Hd(x.next),x=g=E),x=x.next}while(x!==g);return Ou(x)}function bU(g,t,i,x,T,E){let s=g;do{let y=s.next.next;for(;y!==s.prev;){if(s.i!==y.i&&zU(s,y)){let e=$2(s,y);s=Ou(s,s.next),e=Ou(e,e.next),Gd(s,t,i,x,T,E,0),Gd(e,t,i,x,T,E,0);return}y=y.next}s=s.next}while(s!==g)}function LU(g,t,i,x){const T=[];let E,s,y,e,r;for(E=0,s=t.length;E=i.next.y&&i.next.y!==i.y){const a=i.x+(s-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=E&&a>x&&(x=a,T=i.x=i.x&&i.x>=e&&E!==i.x&&kf(sT.x||i.x===T.x&&IU(T,i)))&&(T=i,d=h)),i=i.next;while(i!==y);return T}function IU(g,t){return Un(g.prev,g,t.prev)<0&&Un(t.next,g,g.next)<0}function NU(g,t,i,x){let T=g;do T.z===0&&(T.z=wx(T.x,T.y,t,i,x)),T.prevZ=T.prev,T.nextZ=T.next,T=T.next;while(T!==g);T.prevZ.nextZ=null,T.prevZ=null,BU(T)}function BU(g){let t,i,x,T,E,s,y,e,r=1;do{for(i=g,g=null,E=null,s=0;i;){for(s++,x=i,y=0,t=0;t0||e>0&&x;)y!==0&&(e===0||!x||i.z<=x.z)?(T=i,i=i.nextZ,y--):(T=x,x=x.nextZ,e--),E?E.nextZ=T:g=T,T.prevZ=E,E=T;i=x}E.nextZ=null,r*=2}while(s>1);return g}function wx(g,t,i,x,T){return g=(g-i)*T|0,t=(t-x)*T|0,g=(g|g<<8)&16711935,g=(g|g<<4)&252645135,g=(g|g<<2)&858993459,g=(g|g<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,g|t<<1}function UU(g){let t=g,i=g;do(t.x=(g-s)*(E-y)&&(g-s)*(x-y)>=(i-s)*(t-y)&&(i-s)*(E-y)>=(T-s)*(x-y)}function zU(g,t){return g.next.i!==t.i&&g.prev.i!==t.i&&!GU(g,t)&&(Vd(g,t)&&Vd(t,g)&&VU(g,t)&&(Un(g.prev,g,t.prev)||Un(g,t.prev,t))||Pg(g,t)&&Un(g.prev,g,g.next)>0&&Un(t.prev,t,t.next)>0)}function Un(g,t,i){return(t.y-g.y)*(i.x-t.x)-(t.x-g.x)*(i.y-t.y)}function Pg(g,t){return g.x===t.x&&g.y===t.y}function Z2(g,t,i,x){const T=Wv(Un(g,t,i)),E=Wv(Un(g,t,x)),s=Wv(Un(i,x,g)),y=Wv(Un(i,x,t));return!!(T!==E&&s!==y||T===0&&Hv(g,i,t)||E===0&&Hv(g,x,t)||s===0&&Hv(i,g,x)||y===0&&Hv(i,t,x))}function Hv(g,t,i){return t.x<=Math.max(g.x,i.x)&&t.x>=Math.min(g.x,i.x)&&t.y<=Math.max(g.y,i.y)&&t.y>=Math.min(g.y,i.y)}function Wv(g){return g>0?1:g<0?-1:0}function GU(g,t){let i=g;do{if(i.i!==g.i&&i.next.i!==g.i&&i.i!==t.i&&i.next.i!==t.i&&Z2(i,i.next,g,t))return!0;i=i.next}while(i!==g);return!1}function Vd(g,t){return Un(g.prev,g,g.next)<0?Un(g,t,g.next)>=0&&Un(g,g.prev,t)>=0:Un(g,t,g.prev)<0||Un(g,g.next,t)<0}function VU(g,t){let i=g,x=!1;const T=(g.x+t.x)/2,E=(g.y+t.y)/2;do i.y>E!=i.next.y>E&&i.next.y!==i.y&&T<(i.next.x-i.x)*(E-i.y)/(i.next.y-i.y)+i.x&&(x=!x),i=i.next;while(i!==g);return x}function $2(g,t){const i=new Ax(g.i,g.x,g.y),x=new Ax(t.i,t.x,t.y),T=g.next,E=t.prev;return g.next=t,t.prev=g,i.next=T,T.prev=i,x.next=i,i.prev=x,E.next=x,x.prev=E,x}function UE(g,t,i,x){const T=new Ax(g,t,i);return x?(T.next=x.next,T.prev=x,x.next.prev=T,x.next=T):(T.prev=T,T.next=T),T}function Hd(g){g.next.prev=g.prev,g.prev.next=g.next,g.prevZ&&(g.prevZ.nextZ=g.nextZ),g.nextZ&&(g.nextZ.prevZ=g.prevZ)}function Ax(g,t,i){this.i=g,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function HU(g,t,i,x){let T=0;for(let E=t,s=i-x;E2&&g[t-1].equals(g[0])&&g.pop()}function GE(g,t){for(let i=0;iNumber.EPSILON){const Bt=Math.sqrt(Dt),re=Math.sqrt(ut*ut+Rt*Rt),le=gt.x-dt/Bt,ge=gt.y+Vt/Bt,xe=yt.x-Rt/re,Pe=yt.y+ut/re,te=((xe-le)*Rt-(Pe-ge)*ut)/(Vt*Rt-dt*ut);Et=le+Vt*te-rt.x,At=ge+dt*te-rt.y;const Ge=Et*Et+At*At;if(Ge<=2)return new ve(Et,At);Pt=Math.sqrt(Ge/2)}else{let Bt=!1;Vt>Number.EPSILON?ut>Number.EPSILON&&(Bt=!0):Vt<-Number.EPSILON?ut<-Number.EPSILON&&(Bt=!0):Math.sign(dt)===Math.sign(Rt)&&(Bt=!0),Bt?(Et=-dt,At=Vt,Pt=Math.sqrt(Dt)):(Et=Vt,At=dt,Pt=Math.sqrt(Dt/2))}return new ve(Et/Pt,At/Pt)}const X=[];for(let rt=0,gt=I.length,yt=gt-1,Et=rt+1;rt=0;rt--){const gt=rt/f,yt=l*Math.cos(gt*Math.PI/2),Et=n*Math.sin(gt*Math.PI/2)+u;for(let At=0,Pt=I.length;At=0;){const Et=yt;let At=yt-1;At<0&&(At=rt.length-1);for(let Pt=0,Vt=d+f*2;Pt0)&&l.push(p,v,S),(o!==x-1||e0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class tA extends Wr{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new ze(16777215),this.specular=new ze(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ze(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eh,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=_d,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class eA extends Wr{constructor(t){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new ze(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ze(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eh,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}class iA extends Wr{constructor(t){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eh,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}class nA extends Wr{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new ze(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ze(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eh,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=_d,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class rA extends Wr{constructor(t){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new ze(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Eh,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this.fog=t.fog,this}}class sA extends xs{constructor(t){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}function Su(g,t,i){return!g||!i&&g.constructor===t?g:typeof t.BYTES_PER_ELEMENT=="number"?new t(g):Array.prototype.slice.call(g)}function aA(g){return ArrayBuffer.isView(g)&&!(g instanceof DataView)}function oA(g){function t(T,E){return g[T]-g[E]}const i=g.length,x=new Array(i);for(let T=0;T!==i;++T)x[T]=T;return x.sort(t),x}function Px(g,t,i){const x=g.length,T=new g.constructor(x);for(let E=0,s=0;s!==x;++E){const y=i[E]*t;for(let e=0;e!==t;++e)T[s++]=g[y+e]}return T}function G1(g,t,i,x){let T=1,E=g[0];for(;E!==void 0&&E[x]===void 0;)E=g[T++];if(E===void 0)return;let s=E[x];if(s!==void 0)if(Array.isArray(s))do s=E[x],s!==void 0&&(t.push(E.time),i.push.apply(i,s)),E=g[T++];while(E!==void 0);else if(s.toArray!==void 0)do s=E[x],s!==void 0&&(t.push(E.time),s.toArray(i,i.length)),E=g[T++];while(E!==void 0);else do s=E[x],s!==void 0&&(t.push(E.time),i.push(s)),E=g[T++];while(E!==void 0)}function kU(g,t,i,x,T=30){const E=g.clone();E.name=t;const s=[];for(let e=0;e=x)){h.push(r.times[l]);for(let u=0;uE.tracks[e].times[0]&&(y=E.tracks[e].times[0]);for(let e=0;e=y.times[n]){const o=n*h+d,c=o+h-d;u=y.values.slice(o,c)}else{const o=y.createInterpolant(),c=d,p=h-d;o.evaluate(E),u=o.resultBuffer.slice(c,p)}e==="quaternion"&&new Is().fromArray(u).normalize().conjugate().toArray(u);const f=r.times.length;for(let o=0;o=E)){const y=i[1];t=E)break e}s=x,x=0;break i}break t}for(;x>>1;ti;)--s;if(++s,E!==0||s!==T){E>=s&&(s=Math.max(s,1),E=s-1);const y=this.getValueSize();this.times=x.slice(E,s),this.values=this.values.slice(E*y,s*y)}return this}validate(){let t=!0;const i=this.getValueSize();i-Math.floor(i)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const x=this.times,T=this.values,E=x.length;E===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let s=null;for(let y=0;y!==E;y++){const e=x[y];if(typeof e=="number"&&isNaN(e)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,y,e),t=!1;break}if(s!==null&&s>e){console.error("THREE.KeyframeTrack: Out of order keys.",this,y,e,s),t=!1;break}s=e}if(T!==void 0&&aA(T))for(let y=0,e=T.length;y!==e;++y){const r=T[y];if(isNaN(r)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,y,r),t=!1;break}}return t}optimize(){const t=this.times.slice(),i=this.values.slice(),x=this.getValueSize(),T=this.getInterpolation()===cm,E=t.length-1;let s=1;for(let y=1;y0){t[s]=t[E];for(let y=E*x,e=s*x,r=0;r!==x;++r)i[e+r]=i[y+r];++s}return s!==t.length?(this.times=t.slice(0,s),this.values=i.slice(0,s*x)):(this.times=t,this.values=i),this}clone(){const t=this.times.slice(),i=this.values.slice(),x=this.constructor,T=new x(this.name,t,i);return T.createInterpolant=this.createInterpolant,T}}oo.prototype.TimeBufferType=Float32Array;oo.prototype.ValueBufferType=Float32Array;oo.prototype.DefaultInterpolation=Ld;class Uu extends oo{}Uu.prototype.ValueTypeName="bool";Uu.prototype.ValueBufferType=Array;Uu.prototype.DefaultInterpolation=bd;Uu.prototype.InterpolantFactoryMethodLinear=void 0;Uu.prototype.InterpolantFactoryMethodSmooth=void 0;class H1 extends oo{}H1.prototype.ValueTypeName="color";class Wd extends oo{}Wd.prototype.ValueTypeName="number";class uA extends op{constructor(t,i,x,T){super(t,i,x,T)}interpolate_(t,i,x,T){const E=this.resultBuffer,s=this.sampleValues,y=this.valueSize,e=(x-i)/(T-i);let r=t*y;for(let d=r+y;r!==d;r+=4)Is.slerpFlat(E,0,s,r-y,s,r,e);return E}}class cc extends oo{InterpolantFactoryMethodLinear(t){return new uA(this.times,this.values,this.getValueSize(),t)}}cc.prototype.ValueTypeName="quaternion";cc.prototype.DefaultInterpolation=Ld;cc.prototype.InterpolantFactoryMethodSmooth=void 0;class zu extends oo{}zu.prototype.ValueTypeName="string";zu.prototype.ValueBufferType=Array;zu.prototype.DefaultInterpolation=bd;zu.prototype.InterpolantFactoryMethodLinear=void 0;zu.prototype.InterpolantFactoryMethodSmooth=void 0;class Xd extends oo{}Xd.prototype.ValueTypeName="vector";class Yd{constructor(t,i=-1,x,T=dg){this.name=t,this.tracks=x,this.duration=i,this.blendMode=T,this.uuid=ra(),this.duration<0&&this.resetDuration()}static parse(t){const i=[],x=t.tracks,T=1/(t.fps||1);for(let s=0,y=x.length;s!==y;++s)i.push($U(x[s]).scale(T));const E=new this(t.name,t.duration,i,t.blendMode);return E.uuid=t.uuid,E}static toJSON(t){const i=[],x=t.tracks,T={name:t.name,duration:t.duration,tracks:i,uuid:t.uuid,blendMode:t.blendMode};for(let E=0,s=x.length;E!==s;++E)i.push(oo.toJSON(x[E]));return T}static CreateFromMorphTargetSequence(t,i,x,T){const E=i.length,s=[];for(let y=0;y1){const h=d[1];let a=T[h];a||(T[h]=a=[]),a.push(r)}}const s=[];for(const y in T)s.push(this.CreateFromMorphTargetSequence(y,T[y],i,x));return s}static parseAnimation(t,i){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const x=function(h,a,l,n,u){if(l.length!==0){const f=[],o=[];G1(l,f,o,n),f.length!==0&&u.push(new h(a,f,o))}},T=[],E=t.name||"default",s=t.fps||30,y=t.blendMode;let e=t.length||-1;const r=t.hierarchy||[];for(let h=0;h{i&&i(E),this.manager.itemEnd(t)},0),E;if(ml[t]!==void 0){ml[t].push({onLoad:i,onProgress:x,onError:T});return}ml[t]=[],ml[t].push({onLoad:i,onProgress:x,onError:T});const s=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),y=this.mimeType,e=this.responseType;fetch(s).then(r=>{if(r.status===200||r.status===0){if(r.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||r.body===void 0||r.body.getReader===void 0)return r;const d=ml[t],h=r.body.getReader(),a=r.headers.get("Content-Length")||r.headers.get("X-File-Size"),l=a?parseInt(a):0,n=l!==0;let u=0;const f=new ReadableStream({start(o){c();function c(){h.read().then(({done:p,value:v})=>{if(p)o.close();else{u+=v.byteLength;const m=new ProgressEvent("progress",{lengthComputable:n,loaded:u,total:l});for(let S=0,M=d.length;S{switch(e){case"arraybuffer":return r.arrayBuffer();case"blob":return r.blob();case"document":return r.text().then(d=>new DOMParser().parseFromString(d,y));case"json":return r.json();default:if(y===void 0)return r.text();{const h=/charset="?([^;"\s]*)"?/i.exec(y),a=h&&h[1]?h[1].toLowerCase():void 0,l=new TextDecoder(a);return r.arrayBuffer().then(n=>l.decode(n))}}}).then(r=>{Ml.add(t,r);const d=ml[t];delete ml[t];for(let h=0,a=d.length;h{const d=ml[t];if(d===void 0)throw this.manager.itemError(t),r;delete ml[t];for(let h=0,a=d.length;h{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class QU extends Bs{constructor(t){super(t)}load(t,i,x,T){const E=this,s=new bl(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(y){try{i(E.parse(JSON.parse(y)))}catch(e){T?T(e):console.error(e),E.manager.itemError(t)}},x,T)}parse(t){const i=[];for(let x=0;x0:T.vertexColors=t.vertexColors),t.uniforms!==void 0)for(const E in t.uniforms){const s=t.uniforms[E];switch(T.uniforms[E]={},s.type){case"t":T.uniforms[E].value=x(s.value);break;case"c":T.uniforms[E].value=new ze().setHex(s.value);break;case"v2":T.uniforms[E].value=new ve().fromArray(s.value);break;case"v3":T.uniforms[E].value=new Ct().fromArray(s.value);break;case"v4":T.uniforms[E].value=new an().fromArray(s.value);break;case"m3":T.uniforms[E].value=new Di().fromArray(s.value);break;case"m4":T.uniforms[E].value=new di().fromArray(s.value);break;default:T.uniforms[E].value=s.value}}if(t.defines!==void 0&&(T.defines=t.defines),t.vertexShader!==void 0&&(T.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(T.fragmentShader=t.fragmentShader),t.glslVersion!==void 0&&(T.glslVersion=t.glslVersion),t.extensions!==void 0)for(const E in t.extensions)T.extensions[E]=t.extensions[E];if(t.lights!==void 0&&(T.lights=t.lights),t.clipping!==void 0&&(T.clipping=t.clipping),t.size!==void 0&&(T.size=t.size),t.sizeAttenuation!==void 0&&(T.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(T.map=x(t.map)),t.matcap!==void 0&&(T.matcap=x(t.matcap)),t.alphaMap!==void 0&&(T.alphaMap=x(t.alphaMap)),t.bumpMap!==void 0&&(T.bumpMap=x(t.bumpMap)),t.bumpScale!==void 0&&(T.bumpScale=t.bumpScale),t.normalMap!==void 0&&(T.normalMap=x(t.normalMap)),t.normalMapType!==void 0&&(T.normalMapType=t.normalMapType),t.normalScale!==void 0){let E=t.normalScale;Array.isArray(E)===!1&&(E=[E,E]),T.normalScale=new ve().fromArray(E)}return t.displacementMap!==void 0&&(T.displacementMap=x(t.displacementMap)),t.displacementScale!==void 0&&(T.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(T.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(T.roughnessMap=x(t.roughnessMap)),t.metalnessMap!==void 0&&(T.metalnessMap=x(t.metalnessMap)),t.emissiveMap!==void 0&&(T.emissiveMap=x(t.emissiveMap)),t.emissiveIntensity!==void 0&&(T.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(T.specularMap=x(t.specularMap)),t.specularIntensityMap!==void 0&&(T.specularIntensityMap=x(t.specularIntensityMap)),t.specularColorMap!==void 0&&(T.specularColorMap=x(t.specularColorMap)),t.envMap!==void 0&&(T.envMap=x(t.envMap)),t.envMapIntensity!==void 0&&(T.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(T.reflectivity=t.reflectivity),t.refractionRatio!==void 0&&(T.refractionRatio=t.refractionRatio),t.lightMap!==void 0&&(T.lightMap=x(t.lightMap)),t.lightMapIntensity!==void 0&&(T.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(T.aoMap=x(t.aoMap)),t.aoMapIntensity!==void 0&&(T.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(T.gradientMap=x(t.gradientMap)),t.clearcoatMap!==void 0&&(T.clearcoatMap=x(t.clearcoatMap)),t.clearcoatRoughnessMap!==void 0&&(T.clearcoatRoughnessMap=x(t.clearcoatRoughnessMap)),t.clearcoatNormalMap!==void 0&&(T.clearcoatNormalMap=x(t.clearcoatNormalMap)),t.clearcoatNormalScale!==void 0&&(T.clearcoatNormalScale=new ve().fromArray(t.clearcoatNormalScale)),t.iridescenceMap!==void 0&&(T.iridescenceMap=x(t.iridescenceMap)),t.iridescenceThicknessMap!==void 0&&(T.iridescenceThicknessMap=x(t.iridescenceThicknessMap)),t.transmissionMap!==void 0&&(T.transmissionMap=x(t.transmissionMap)),t.thicknessMap!==void 0&&(T.thicknessMap=x(t.thicknessMap)),t.anisotropyMap!==void 0&&(T.anisotropyMap=x(t.anisotropyMap)),t.sheenColorMap!==void 0&&(T.sheenColorMap=x(t.sheenColorMap)),t.sheenRoughnessMap!==void 0&&(T.sheenRoughnessMap=x(t.sheenRoughnessMap)),T}setTextures(t){return this.textures=t,this}static createMaterialFromType(t){const i={ShadowMaterial:Q2,SpriteMaterial:L1,RawShaderMaterial:_2,ShaderMaterial:so,PointsMaterial:O1,MeshPhysicalMaterial:q2,MeshStandardMaterial:yl,MeshPhongMaterial:tA,MeshToonMaterial:eA,MeshNormalMaterial:iA,MeshLambertMaterial:nA,MeshDepthMaterial:P1,MeshDistanceMaterial:R1,MeshBasicMaterial:Mh,MeshMatcapMaterial:rA,LineDashedMaterial:sA,LineBasicMaterial:xs,Material:Wr};return new i[t]}}class Rx{static decodeText(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);let i="";for(let x=0,T=t.length;x0){const e=new W1(i);E=new kd(e),E.setCrossOrigin(this.crossOrigin);for(let r=0,d=t.length;r0){T=new kd(this.manager),T.setCrossOrigin(this.crossOrigin);for(let s=0,y=t.length;s{const f=new ys;f.min.fromArray(u.boxMin),f.max.fromArray(u.boxMax);const o=new Qr;return o.radius=u.sphereRadius,o.center.fromArray(u.sphereCenter),{boxInitialized:u.boxInitialized,box:f,sphereInitialized:u.sphereInitialized,sphere:o}}),s._maxGeometryCount=t.maxGeometryCount,s._maxVertexCount=t.maxVertexCount,s._maxIndexCount=t.maxIndexCount,s._geometryInitialized=t.geometryInitialized,s._geometryCount=t.geometryCount,s._matricesTexture=r(t.matricesTexture.uuid);break;case"LOD":s=new N2;break;case"Line":s=new Sh(y(t.geometry),e(t.material));break;case"LineLoop":s=new G2(y(t.geometry),e(t.material));break;case"LineSegments":s=new Xo(y(t.geometry),e(t.material));break;case"PointCloud":case"Points":s=new V2(y(t.geometry),e(t.material));break;case"Sprite":s=new I2(e(t.material));break;case"Group":s=new Yf;break;case"Bone":s=new F1;break;default:s=new ki}if(s.uuid=t.uuid,t.name!==void 0&&(s.name=t.name),t.matrix!==void 0?(s.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(s.matrixAutoUpdate=t.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(t.position!==void 0&&s.position.fromArray(t.position),t.rotation!==void 0&&s.rotation.fromArray(t.rotation),t.quaternion!==void 0&&s.quaternion.fromArray(t.quaternion),t.scale!==void 0&&s.scale.fromArray(t.scale)),t.up!==void 0&&s.up.fromArray(t.up),t.castShadow!==void 0&&(s.castShadow=t.castShadow),t.receiveShadow!==void 0&&(s.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(s.shadow.bias=t.shadow.bias),t.shadow.normalBias!==void 0&&(s.shadow.normalBias=t.shadow.normalBias),t.shadow.radius!==void 0&&(s.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&s.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(s.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(s.visible=t.visible),t.frustumCulled!==void 0&&(s.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(s.renderOrder=t.renderOrder),t.userData!==void 0&&(s.userData=t.userData),t.layers!==void 0&&(s.layers.mask=t.layers),t.children!==void 0){const a=t.children;for(let l=0;l"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(t){return this.options=t,this}load(t,i,x,T){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const E=this,s=Ml.get(t);if(s!==void 0){if(E.manager.itemStart(t),s.then){s.then(r=>{i&&i(r),E.manager.itemEnd(t)}).catch(r=>{T&&T(r)});return}return setTimeout(function(){i&&i(s),E.manager.itemEnd(t)},0),s}const y={};y.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",y.headers=this.requestHeader;const e=fetch(t,y).then(function(r){return r.blob()}).then(function(r){return createImageBitmap(r,Object.assign(E.options,{colorSpaceConversion:"none"}))}).then(function(r){return Ml.add(t,r),i&&i(r),E.manager.itemEnd(t),r}).catch(function(r){T&&T(r),Ml.remove(t),E.manager.itemError(t),E.manager.itemEnd(t)});Ml.add(t,e),E.manager.itemStart(t)}}let Xv,Y1=class{static getContext(){return Xv===void 0&&(Xv=new(window.AudioContext||window.webkitAudioContext)),Xv}static setContext(t){Xv=t}};class oz extends Bs{constructor(t){super(t)}load(t,i,x,T){const E=this,s=new bl(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(e){try{const r=e.slice(0);Y1.getContext().decodeAudioData(r,function(h){i(h)}).catch(y)}catch(r){y(r)}},x,T);function y(e){T?T(e):console.error(e),E.manager.itemError(t)}}}const KE=new di,ZE=new di,ru=new di;class lz{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Dr,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Dr,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(t){const i=this._cache;if(i.focus!==t.focus||i.fov!==t.fov||i.aspect!==t.aspect*this.aspect||i.near!==t.near||i.far!==t.far||i.zoom!==t.zoom||i.eyeSep!==this.eyeSep){i.focus=t.focus,i.fov=t.fov,i.aspect=t.aspect*this.aspect,i.near=t.near,i.far=t.far,i.zoom=t.zoom,i.eyeSep=this.eyeSep,ru.copy(t.projectionMatrix);const T=i.eyeSep/2,E=T*i.near/i.focus,s=i.near*Math.tan(Eu*i.fov*.5)/i.zoom;let y,e;ZE.elements[12]=-T,KE.elements[12]=T,y=-s*i.aspect+E,e=s*i.aspect+E,ru.elements[0]=2*i.near/(e-y),ru.elements[8]=(e+y)/(e-y),this.cameraL.projectionMatrix.copy(ru),y=-s*i.aspect-E,e=s*i.aspect-E,ru.elements[0]=2*i.near/(e-y),ru.elements[8]=(e+y)/(e-y),this.cameraR.projectionMatrix.copy(ru)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(ZE),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(KE)}}class k1{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=$E(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const i=$E();t=(i-this.oldTime)/1e3,this.oldTime=i,this.elapsedTime+=t}return t}}function $E(){return(typeof performance>"u"?Date:performance).now()}const su=new Ct,JE=new Is,hz=new Ct,au=new Ct;class uz extends ki{constructor(){super(),this.type="AudioListener",this.context=Y1.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new k1}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);const i=this.context.listener,x=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(su,JE,hz),au.set(0,0,-1).applyQuaternion(JE),i.positionX){const T=this.context.currentTime+this.timeDelta;i.positionX.linearRampToValueAtTime(su.x,T),i.positionY.linearRampToValueAtTime(su.y,T),i.positionZ.linearRampToValueAtTime(su.z,T),i.forwardX.linearRampToValueAtTime(au.x,T),i.forwardY.linearRampToValueAtTime(au.y,T),i.forwardZ.linearRampToValueAtTime(au.z,T),i.upX.linearRampToValueAtTime(x.x,T),i.upY.linearRampToValueAtTime(x.y,T),i.upZ.linearRampToValueAtTime(x.z,T)}else i.setPosition(su.x,su.y,su.z),i.setOrientation(au.x,au.y,au.z,x.x,x.y,x.z)}}let MA=class extends ki{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+t;const i=this.context.createBufferSource();return i.buffer=this.buffer,i.loop=this.loop,i.loopStart=this.loopStart,i.loopEnd=this.loopEnd,i.onended=this.onEnded.bind(this),i.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=i,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,i=this.filters.length;t0){this.source.disconnect(this.filters[0]);for(let t=1,i=this.filters.length;t0&&this._mixBufferRegionAdditive(x,T,this._addIndex*i,1,i);for(let e=i,r=i+i;e!==r;++e)if(x[e]!==x[e+i]){y.setValue(x,T);break}}saveOriginalState(){const t=this.binding,i=this.buffer,x=this.valueSize,T=x*this._origIndex;t.getValue(i,T);for(let E=x,s=T;E!==s;++E)i[E]=i[T+E%x];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=this.valueSize*3;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,i=t+this.valueSize;for(let x=t;x=.5)for(let s=0;s!==E;++s)t[i+s]=t[x+s]}_slerp(t,i,x,T){Is.slerpFlat(t,i,t,i,t,x,T)}_slerpAdditive(t,i,x,T,E){const s=this._workIndex*E;Is.multiplyQuaternionsFlat(t,s,t,i,t,x),Is.slerpFlat(t,i,t,i,t,s,T)}_lerp(t,i,x,T,E){const s=1-T;for(let y=0;y!==E;++y){const e=i+y;t[e]=t[e]*s+t[x+y]*T}}_lerpAdditive(t,i,x,T,E){for(let s=0;s!==E;++s){const y=i+s;t[y]=t[y]+t[x+s]*T}}}const j1="\\[\\]\\.:\\/",pz=new RegExp("["+j1+"]","g"),K1="[^"+j1+"]",vz="[^"+j1.replace("\\.","")+"]",mz=/((?:WC+[\/:])*)/.source.replace("WC",K1),gz=/(WCOD+)?/.source.replace("WCOD",vz),yz=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",K1),xz=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",K1),Sz=new RegExp("^"+mz+gz+yz+xz+"$"),Tz=["material","materials","bones","map"];class Ez{constructor(t,i,x){const T=x||Yi.parseTrackName(i);this._targetGroup=t,this._bindings=t.subscribe_(i,T)}getValue(t,i){this.bind();const x=this._targetGroup.nCachedObjects_,T=this._bindings[x];T!==void 0&&T.getValue(t,i)}setValue(t,i){const x=this._bindings;for(let T=this._targetGroup.nCachedObjects_,E=x.length;T!==E;++T)x[T].setValue(t,i)}bind(){const t=this._bindings;for(let i=this._targetGroup.nCachedObjects_,x=t.length;i!==x;++i)t[i].bind()}unbind(){const t=this._bindings;for(let i=this._targetGroup.nCachedObjects_,x=t.length;i!==x;++i)t[i].unbind()}}class Yi{constructor(t,i,x){this.path=i,this.parsedPath=x||Yi.parseTrackName(i),this.node=Yi.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,i,x){return t&&t.isAnimationObjectGroup?new Yi.Composite(t,i,x):new Yi(t,i,x)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(pz,"")}static parseTrackName(t){const i=Sz.exec(t);if(i===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const x={nodeName:i[2],objectName:i[3],objectIndex:i[4],propertyName:i[5],propertyIndex:i[6]},T=x.nodeName&&x.nodeName.lastIndexOf(".");if(T!==void 0&&T!==-1){const E=x.nodeName.substring(T+1);Tz.indexOf(E)!==-1&&(x.nodeName=x.nodeName.substring(0,T),x.objectName=E)}if(x.propertyName===null||x.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return x}static findNode(t,i){if(i===void 0||i===""||i==="."||i===-1||i===t.name||i===t.uuid)return t;if(t.skeleton){const x=t.skeleton.getBoneByName(i);if(x!==void 0)return x}if(t.children){const x=function(E){for(let s=0;s=E){const h=E++,a=t[h];i[a.uuid]=d,t[d]=a,i[r]=h,t[h]=e;for(let l=0,n=T;l!==n;++l){const u=x[l],f=u[h],o=u[d];u[d]=f,u[h]=o}}}this.nCachedObjects_=E}uncache(){const t=this._objects,i=this._indicesByUUID,x=this._bindings,T=x.length;let E=this.nCachedObjects_,s=t.length;for(let y=0,e=arguments.length;y!==e;++y){const r=arguments[y],d=r.uuid,h=i[d];if(h!==void 0)if(delete i[d],h0&&(i[l.uuid]=h),t[h]=l,t.pop();for(let n=0,u=T;n!==u;++n){const f=x[n];f[h]=f[a],f.pop()}}}this.nCachedObjects_=E}subscribe_(t,i){const x=this._bindingsIndicesByPath;let T=x[t];const E=this._bindings;if(T!==void 0)return E[T];const s=this._paths,y=this._parsedPaths,e=this._objects,r=e.length,d=this.nCachedObjects_,h=new Array(r);T=E.length,x[t]=T,s.push(t),y.push(i),E.push(h);for(let a=d,l=e.length;a!==l;++a){const n=e[a];h[a]=new Yi(n,t,i)}return h}unsubscribe_(t){const i=this._bindingsIndicesByPath,x=i[t];if(x!==void 0){const T=this._paths,E=this._parsedPaths,s=this._bindings,y=s.length-1,e=s[y],r=t[y];i[r]=x,s[x]=e,s.pop(),E[x]=E[y],E.pop(),T[x]=T[y],T.pop()}}}class wA{constructor(t,i,x=null,T=i.blendMode){this._mixer=t,this._clip=i,this._localRoot=x,this.blendMode=T;const E=i.tracks,s=E.length,y=new Array(s),e={endingStart:gu,endingEnd:gu};for(let r=0;r!==s;++r){const d=E[r].createInterpolant(null);y[r]=d,d.settings=e}this._interpolantSettings=e,this._interpolants=y,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=r2,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,i){return this.loop=t,this.repetitions=i,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,i,x){if(t.fadeOut(i),this.fadeIn(i),x){const T=this._clip.duration,E=t._clip.duration,s=E/T,y=T/E;t.warp(1,s,i),this.warp(y,1,i)}return this}crossFadeTo(t,i,x){return t.crossFadeFrom(this,i,x)}stopFading(){const t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,i,x){const T=this._mixer,E=T.time,s=this.timeScale;let y=this._timeScaleInterpolant;y===null&&(y=T._lendControlInterpolant(),this._timeScaleInterpolant=y);const e=y.parameterPositions,r=y.sampleValues;return e[0]=E,e[1]=E+x,r[0]=t/s,r[1]=i/s,this}stopWarping(){const t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,i,x,T){if(!this.enabled){this._updateWeight(t);return}const E=this._startTime;if(E!==null){const e=(t-E)*x;e<0||x===0?i=0:(this._startTime=null,i=x*e)}i*=this._updateTimeScale(t);const s=this._updateTime(i),y=this._updateWeight(t);if(y>0){const e=this._interpolants,r=this._propertyBindings;switch(this.blendMode){case g1:for(let d=0,h=e.length;d!==h;++d)e[d].evaluate(s),r[d].accumulateAdditive(y);break;case dg:default:for(let d=0,h=e.length;d!==h;++d)e[d].evaluate(s),r[d].accumulate(T,y)}}}_updateWeight(t){let i=0;if(this.enabled){i=this.weight;const x=this._weightInterpolant;if(x!==null){const T=x.evaluate(t)[0];i*=T,t>x.parameterPositions[1]&&(this.stopFading(),T===0&&(this.enabled=!1))}}return this._effectiveWeight=i,i}_updateTimeScale(t){let i=0;if(!this.paused){i=this.timeScale;const x=this._timeScaleInterpolant;if(x!==null){const T=x.evaluate(t)[0];i*=T,t>x.parameterPositions[1]&&(this.stopWarping(),i===0?this.paused=!0:this.timeScale=i)}}return this._effectiveTimeScale=i,i}_updateTime(t){const i=this._clip.duration,x=this.loop;let T=this.time+t,E=this._loopCount;const s=x===s2;if(t===0)return E===-1?T:s&&(E&1)===1?i-T:T;if(x===n2){E===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(T>=i)T=i;else if(T<0)T=0;else{this.time=T;break t}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=T,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(E===-1&&(t>=0?(E=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),T>=i||T<0){const y=Math.floor(T/i);T-=i*y,E+=Math.abs(y);const e=this.repetitions-E;if(e<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,T=t>0?i:0,this.time=T,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(e===1){const r=t<0;this._setEndings(r,!r,s)}else this._setEndings(!1,!1,s);this._loopCount=E,this.time=T,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:y})}}else this.time=T;if(s&&(E&1)===1)return i-T}return T}_setEndings(t,i,x){const T=this._interpolantSettings;x?(T.endingStart=yu,T.endingEnd=yu):(t?T.endingStart=this.zeroSlopeAtStart?yu:gu:T.endingStart=Fd,i?T.endingEnd=this.zeroSlopeAtEnd?yu:gu:T.endingEnd=Fd)}_scheduleFading(t,i,x){const T=this._mixer,E=T.time;let s=this._weightInterpolant;s===null&&(s=T._lendControlInterpolant(),this._weightInterpolant=s);const y=s.parameterPositions,e=s.sampleValues;return y[0]=E,e[0]=i,y[1]=E+t,e[1]=x,this}}const Cz=new Float32Array(1);class wz extends Ll{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,i){const x=t._localRoot||this._root,T=t._clip.tracks,E=T.length,s=t._propertyBindings,y=t._interpolants,e=x.uuid,r=this._bindingsByRootAndName;let d=r[e];d===void 0&&(d={},r[e]=d);for(let h=0;h!==E;++h){const a=T[h],l=a.name;let n=d[l];if(n!==void 0)++n.referenceCount,s[h]=n;else{if(n=s[h],n!==void 0){n._cacheIndex===null&&(++n.referenceCount,this._addInactiveBinding(n,e,l));continue}const u=i&&i._propertyBindings[h].binding.parsedPath;n=new CA(Yi.create(x,l,u),a.ValueTypeName,a.getValueSize()),++n.referenceCount,this._addInactiveBinding(n,e,l),s[h]=n}y[h].resultBuffer=n.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){const x=(t._localRoot||this._root).uuid,T=t._clip.uuid,E=this._actionsByClip[T];this._bindAction(t,E&&E.knownActions[0]),this._addInactiveAction(t,T,x)}const i=t._propertyBindings;for(let x=0,T=i.length;x!==T;++x){const E=i[x];E.useCount++===0&&(this._lendBinding(E),E.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const i=t._propertyBindings;for(let x=0,T=i.length;x!==T;++x){const E=i[x];--E.useCount===0&&(E.restoreOriginalState(),this._takeBackBinding(E))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const i=t._cacheIndex;return i!==null&&i=0;--x)t[x].stop();return this}update(t){t*=this.timeScale;const i=this._actions,x=this._nActiveActions,T=this.time+=t,E=Math.sign(t),s=this._accuIndex^=1;for(let r=0;r!==x;++r)i[r]._update(T,t,E,s);const y=this._bindings,e=this._nActiveBindings;for(let r=0;r!==e;++r)y[r].apply(s);return this}setTime(t){this.time=0;for(let i=0;ithis.max.x||t.ythis.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,i){return i.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)}clampPoint(t,i){return i.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,qE).distanceTo(t)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const tM=new Ct,Yv=new Ct;class Dz{constructor(t=new Ct,i=new Ct){this.start=t,this.end=i}set(t,i){return this.start.copy(t),this.end.copy(i),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,i){return this.delta(i).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,i){tM.subVectors(t,this.start),Yv.subVectors(this.end,this.start);const x=Yv.dot(Yv);let E=Yv.dot(tM)/x;return i&&(E=Zn(E,0,1)),E}closestPointToPoint(t,i,x){const T=this.closestPointToPointParameter(t,i);return this.delta(x).multiplyScalar(T).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const eM=new Ct;class Iz extends ki{constructor(t,i){super(),this.light=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="SpotLightHelper";const x=new Fi,T=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let s=0,y=1,e=32;s1)for(let h=0;h.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{aM.set(t.z,0,-t.x).normalize();const i=Math.acos(t.y);this.quaternion.setFromAxisAngle(aM,i)}}setLength(t,i=t*.2,x=i*.2){this.line.scale.set(1,Math.max(1e-4,t-i),1),this.line.updateMatrix(),this.cone.scale.set(x,i,x),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Kz extends Xo{constructor(t=1){const i=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],x=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],T=new Fi;T.setAttribute("position",new ke(i,3)),T.setAttribute("color",new ke(x,3));const E=new xs({vertexColors:!0,toneMapped:!1});super(T,E),this.type="AxesHelper"}setColors(t,i,x){const T=new ze,E=this.geometry.attributes.color.array;return T.set(t),T.toArray(E,0),T.toArray(E,3),T.set(i),T.toArray(E,6),T.toArray(E,9),T.set(x),T.toArray(E,12),T.toArray(E,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Zz{constructor(){this.type="ShapePath",this.color=new ze,this.subPaths=[],this.currentPath=null}moveTo(t,i){return this.currentPath=new zd,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,i),this}lineTo(t,i){return this.currentPath.lineTo(t,i),this}quadraticCurveTo(t,i,x,T){return this.currentPath.quadraticCurveTo(t,i,x,T),this}bezierCurveTo(t,i,x,T,E,s){return this.currentPath.bezierCurveTo(t,i,x,T,E,s),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t){function i(o){const c=[];for(let p=0,v=o.length;pNumber.EPSILON){if(A<0&&(M=c[S],C=-C,w=c[m],A=-A),o.yw.y)continue;if(o.y===M.y){if(o.x===M.x)return!0}else{const P=A*(o.x-M.x)-C*(o.y-M.y);if(P===0)return!0;if(P<0)continue;v=!v}}else{if(o.y!==M.y)continue;if(w.x<=o.x&&o.x<=M.x||M.x<=o.x&&o.x<=w.x)return!0}}return v}const T=Vo.isClockWise,E=this.subPaths;if(E.length===0)return[];let s,y,e;const r=[];if(E.length===1)return y=E[0],e=new Au,e.curves=y.curves,r.push(e),r;let d=!T(E[0].getPoints());d=t?!d:d;const h=[],a=[];let l=[],n=0,u;a[n]=void 0,l[n]=[];for(let o=0,c=E.length;o1){let o=!1,c=0;for(let p=0,v=a.length;p0&&o===!1&&(l=h)}let f;for(let o=0,c=a.length;o=0&&(v[Z]=null,p[Z].disconnect(H))}for(let U=0;U<$.added.length;U++){const H=$.added[U];let Z=v.indexOf(H);if(Z===-1){for(let q=0;q=v.length){v.push(H),Z=q;break}else if(v[q]===null){v[q]=H,Z=q;break}if(Z===-1)break}const _=p[Z];_&&_.connect(H)}}const B=new Ct,G=new Ct;function z($,U,H){B.setFromMatrixPosition(U.matrixWorld),G.setFromMatrixPosition(H.matrixWorld);const Z=B.distanceTo(G),_=U.projectionMatrix.elements,q=H.projectionMatrix.elements,at=_[14]/(_[10]-1),ot=_[14]/(_[10]+1),rt=(_[9]+1)/_[5],gt=(_[9]-1)/_[5],yt=(_[8]-1)/_[0],Et=(q[8]+1)/q[0],At=at*yt,Pt=at*Et,Vt=Z/(-yt+Et),dt=Vt*-yt;U.matrixWorld.decompose($.position,$.quaternion,$.scale),$.translateX(dt),$.translateZ(Vt),$.matrixWorld.compose($.position,$.quaternion,$.scale),$.matrixWorldInverse.copy($.matrixWorld).invert();const ut=at+Vt,Rt=ot+Vt,Dt=At-dt,Ht=Pt+(Z-dt),Bt=rt*ot/Rt*ut,re=gt*ot/Rt*ut;$.projectionMatrix.makePerspective(Dt,Ht,Bt,re,ut,Rt),$.projectionMatrixInverse.copy($.projectionMatrix).invert()}function X($,U){U===null?$.matrixWorld.copy($.matrix):$.matrixWorld.multiplyMatrices(U.matrixWorld,$.matrix),$.matrixWorldInverse.copy($.matrixWorld).invert()}this.updateCamera=function($){if(T===null)return;u.texture!==null&&($.near=u.depthNear,$.far=u.depthFar),A.near=w.near=M.near=$.near,A.far=w.far=M.far=$.far,(P!==A.near||b!==A.far)&&(T.updateRenderState({depthNear:A.near,depthFar:A.far}),P=A.near,b=A.far,M.near=P,M.far=b,w.near=P,w.far=b,M.updateProjectionMatrix(),w.updateProjectionMatrix(),$.updateProjectionMatrix());const U=$.parent,H=A.cameras;X(A,U);for(let Z=0;Z0&&(f.alphaTest.value=o.alphaTest);const c=t.get(o).envMap;if(c&&(f.envMap.value=c,f.flipEnvMap.value=c.isCubeTexture&&c.isRenderTargetTexture===!1?-1:1,f.reflectivity.value=o.reflectivity,f.ior.value=o.ior,f.refractionRatio.value=o.refractionRatio),o.lightMap){f.lightMap.value=o.lightMap;const p=g._useLegacyLights===!0?Math.PI:1;f.lightMapIntensity.value=o.lightMapIntensity*p,i(o.lightMap,f.lightMapTransform)}o.aoMap&&(f.aoMap.value=o.aoMap,f.aoMapIntensity.value=o.aoMapIntensity,i(o.aoMap,f.aoMapTransform))}function s(f,o){f.diffuse.value.copy(o.color),f.opacity.value=o.opacity,o.map&&(f.map.value=o.map,i(o.map,f.mapTransform))}function x(f,o){f.dashSize.value=o.dashSize,f.totalSize.value=o.dashSize+o.gapSize,f.scale.value=o.scale}function e(f,o,c,p){f.diffuse.value.copy(o.color),f.opacity.value=o.opacity,f.size.value=o.size*c,f.scale.value=p*.5,o.map&&(f.map.value=o.map,i(o.map,f.uvTransform)),o.alphaMap&&(f.alphaMap.value=o.alphaMap,i(o.alphaMap,f.alphaMapTransform)),o.alphaTest>0&&(f.alphaTest.value=o.alphaTest)}function r(f,o){f.diffuse.value.copy(o.color),f.opacity.value=o.opacity,f.rotation.value=o.rotation,o.map&&(f.map.value=o.map,i(o.map,f.mapTransform)),o.alphaMap&&(f.alphaMap.value=o.alphaMap,i(o.alphaMap,f.alphaMapTransform)),o.alphaTest>0&&(f.alphaTest.value=o.alphaTest)}function d(f,o){f.specular.value.copy(o.specular),f.shininess.value=Math.max(o.shininess,1e-4)}function h(f,o){o.gradientMap&&(f.gradientMap.value=o.gradientMap)}function a(f,o){f.metalness.value=o.metalness,o.metalnessMap&&(f.metalnessMap.value=o.metalnessMap,i(o.metalnessMap,f.metalnessMapTransform)),f.roughness.value=o.roughness,o.roughnessMap&&(f.roughnessMap.value=o.roughnessMap,i(o.roughnessMap,f.roughnessMapTransform)),t.get(o).envMap&&(f.envMapIntensity.value=o.envMapIntensity)}function l(f,o,c){f.ior.value=o.ior,o.sheen>0&&(f.sheenColor.value.copy(o.sheenColor).multiplyScalar(o.sheen),f.sheenRoughness.value=o.sheenRoughness,o.sheenColorMap&&(f.sheenColorMap.value=o.sheenColorMap,i(o.sheenColorMap,f.sheenColorMapTransform)),o.sheenRoughnessMap&&(f.sheenRoughnessMap.value=o.sheenRoughnessMap,i(o.sheenRoughnessMap,f.sheenRoughnessMapTransform))),o.clearcoat>0&&(f.clearcoat.value=o.clearcoat,f.clearcoatRoughness.value=o.clearcoatRoughness,o.clearcoatMap&&(f.clearcoatMap.value=o.clearcoatMap,i(o.clearcoatMap,f.clearcoatMapTransform)),o.clearcoatRoughnessMap&&(f.clearcoatRoughnessMap.value=o.clearcoatRoughnessMap,i(o.clearcoatRoughnessMap,f.clearcoatRoughnessMapTransform)),o.clearcoatNormalMap&&(f.clearcoatNormalMap.value=o.clearcoatNormalMap,i(o.clearcoatNormalMap,f.clearcoatNormalMapTransform),f.clearcoatNormalScale.value.copy(o.clearcoatNormalScale),o.side===gs&&f.clearcoatNormalScale.value.negate())),o.iridescence>0&&(f.iridescence.value=o.iridescence,f.iridescenceIOR.value=o.iridescenceIOR,f.iridescenceThicknessMinimum.value=o.iridescenceThicknessRange[0],f.iridescenceThicknessMaximum.value=o.iridescenceThicknessRange[1],o.iridescenceMap&&(f.iridescenceMap.value=o.iridescenceMap,i(o.iridescenceMap,f.iridescenceMapTransform)),o.iridescenceThicknessMap&&(f.iridescenceThicknessMap.value=o.iridescenceThicknessMap,i(o.iridescenceThicknessMap,f.iridescenceThicknessMapTransform))),o.transmission>0&&(f.transmission.value=o.transmission,f.transmissionSamplerMap.value=c.texture,f.transmissionSamplerSize.value.set(c.width,c.height),o.transmissionMap&&(f.transmissionMap.value=o.transmissionMap,i(o.transmissionMap,f.transmissionMapTransform)),f.thickness.value=o.thickness,o.thicknessMap&&(f.thicknessMap.value=o.thicknessMap,i(o.thicknessMap,f.thicknessMapTransform)),f.attenuationDistance.value=o.attenuationDistance,f.attenuationColor.value.copy(o.attenuationColor)),o.anisotropy>0&&(f.anisotropyVector.value.set(o.anisotropy*Math.cos(o.anisotropyRotation),o.anisotropy*Math.sin(o.anisotropyRotation)),o.anisotropyMap&&(f.anisotropyMap.value=o.anisotropyMap,i(o.anisotropyMap,f.anisotropyMapTransform))),f.specularIntensity.value=o.specularIntensity,f.specularColor.value.copy(o.specularColor),o.specularColorMap&&(f.specularColorMap.value=o.specularColorMap,i(o.specularColorMap,f.specularColorMapTransform)),o.specularIntensityMap&&(f.specularIntensityMap.value=o.specularIntensityMap,i(o.specularIntensityMap,f.specularIntensityMapTransform))}function n(f,o){o.matcap&&(f.matcap.value=o.matcap)}function u(f,o){const c=t.get(o).light;f.referencePosition.value.setFromMatrixPosition(c.matrixWorld),f.nearDistance.value=c.shadow.camera.near,f.farDistance.value=c.shadow.camera.far}return{refreshFogUniforms:y,refreshMaterialUniforms:T}}function iU(g,t,i,y){let T={},E={},s=[];const x=i.isWebGL2?g.getParameter(g.MAX_UNIFORM_BUFFER_BINDINGS):0;function e(c,p){const v=p.program;y.uniformBlockBinding(c,v)}function r(c,p){let v=T[c.id];v===void 0&&(n(c),v=d(c),T[c.id]=v,c.addEventListener("dispose",f));const m=p.program;y.updateUBOMapping(c,m);const S=t.render.frame;E[c.id]!==S&&(a(c),E[c.id]=S)}function d(c){const p=h();c.__bindingPointIndex=p;const v=g.createBuffer(),m=c.__size,S=c.usage;return g.bindBuffer(g.UNIFORM_BUFFER,v),g.bufferData(g.UNIFORM_BUFFER,m,S),g.bindBuffer(g.UNIFORM_BUFFER,null),g.bindBufferBase(g.UNIFORM_BUFFER,p,v),v}function h(){for(let c=0;c0&&(v+=m-S),c.__size=v,c.__cache={},this}function u(c){const p={boundary:0,storage:0};return typeof c=="number"||typeof c=="boolean"?(p.boundary=4,p.storage=4):c.isVector2?(p.boundary=8,p.storage=8):c.isVector3||c.isColor?(p.boundary=16,p.storage=12):c.isVector4?(p.boundary=16,p.storage=16):c.isMatrix3?(p.boundary=48,p.storage=48):c.isMatrix4?(p.boundary=64,p.storage=64):c.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",c),p}function f(c){const p=c.target;p.removeEventListener("dispose",f);const v=s.indexOf(p.__bindingPointIndex);s.splice(v,1),g.deleteBuffer(T[p.id]),delete T[p.id],delete E[p.id]}function o(){for(const c in T)g.deleteBuffer(T[c]);s=[],T={},E={}}return{bind:e,update:r,dispose:o}}class L1{constructor(t={}){const{canvas:i=x2(),context:y=null,depth:T=!0,stencil:E=!0,alpha:s=!1,antialias:x=!1,premultipliedAlpha:e=!0,preserveDrawingBuffer:r=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:h=!1}=t;this.isWebGLRenderer=!0;let a;y!==null?a=y.getContextAttributes().alpha:a=s;const l=new Uint32Array(4),n=new Int32Array(4);let u=null,f=null;const o=[],c=[];this.domElement=i,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=mr,this._useLegacyLights=!1,this.toneMapping=zo,this.toneMappingExposure=1;const p=this;let v=!1,m=0,S=0,M=null,w=-1,C=null;const A=new on,P=new on;let b=null;const O=new Ge(0);let I=0,D=i.width,B=i.height,G=1,z=null,X=null;const j=new on(0,0,D,B),Q=new on(0,0,D,B);let tt=!1;const Y=new np;let $=!1,U=!1,H=null;const Z=new di,_=new ve,q=new Ct,at={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ot(){return M===null?G:1}let rt=y;function gt(Tt,$t){for(let qt=0;qt{function Te(){if(ie.forEach(function(ze){Vt.get(ze).currentProgram.isReady()&&ie.delete(ze)}),ie.size===0){ee(Tt);return}setTimeout(Te,10)}yt.get("KHR_parallel_shader_compile")!==null?Te():setTimeout(Te,10)})};let Ii=null;function rn(Tt){Ii&&Ii(Tt)}function Zn(){pi.stop()}function Vi(){pi.start()}const pi=new A2;pi.setAnimationLoop(rn),typeof self<"u"&&pi.setContext(self),this.setAnimationLoop=function(Tt){Ii=Tt,he.setAnimationLoop(Tt),Tt===null?pi.stop():pi.start()},he.addEventListener("sessionstart",Zn),he.addEventListener("sessionend",Vi),this.render=function(Tt,$t){if($t!==void 0&&$t.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(v===!0)return;Tt.matrixWorldAutoUpdate===!0&&Tt.updateMatrixWorld(),$t.parent===null&&$t.matrixWorldAutoUpdate===!0&&$t.updateMatrixWorld(),he.enabled===!0&&he.isPresenting===!0&&(he.cameraAutoUpdate===!0&&he.updateCamera($t),$t=he.getCamera()),Tt.isScene===!0&&Tt.onBeforeRender(p,Tt,$t,M),f=xe.get(Tt,c.length),f.init(),c.push(f),Z.multiplyMatrices($t.projectionMatrix,$t.matrixWorldInverse),Y.setFromProjectionMatrix(Z),U=this.localClippingEnabled,$=Pe.init(this.clippingPlanes,U),u=ge.get(Tt,o.length),u.init(),o.push(u),Xi(Tt,$t,0,p.sortObjects),u.finish(),p.sortObjects===!0&&u.sort(z,X),this.info.render.frame++,$===!0&&Pe.beginShadows();const qt=f.state.shadowsArray;if(te.render(qt,Tt,$t),$===!0&&Pe.endShadows(),this.info.autoReset===!0&&this.info.reset(),(he.enabled===!1||he.isPresenting===!1||he.hasDepthSensing()===!1)&&Ve.render(u,Tt),f.setupLights(p._useLegacyLights),$t.isArrayCamera){const ie=$t.cameras;for(let ee=0,Te=ie.length;ee0?f=c[c.length-1]:f=null,o.pop(),o.length>0?u=o[o.length-1]:u=null};function Xi(Tt,$t,qt,ie){if(Tt.visible===!1)return;if(Tt.layers.test($t.layers)){if(Tt.isGroup)qt=Tt.renderOrder;else if(Tt.isLOD)Tt.autoUpdate===!0&&Tt.update($t);else if(Tt.isLight)f.pushLight(Tt),Tt.castShadow&&f.pushShadow(Tt);else if(Tt.isSprite){if(!Tt.frustumCulled||Y.intersectsSprite(Tt)){ie&&q.setFromMatrixPosition(Tt.matrixWorld).applyMatrix4(Z);const ze=Bt.update(Tt),Xe=Tt.material;Xe.visible&&u.push(Tt,ze,Xe,qt,q.z,null)}}else if((Tt.isMesh||Tt.isLine||Tt.isPoints)&&(!Tt.frustumCulled||Y.intersectsObject(Tt))){const ze=Bt.update(Tt),Xe=Tt.material;if(ie&&(Tt.boundingSphere!==void 0?(Tt.boundingSphere===null&&Tt.computeBoundingSphere(),q.copy(Tt.boundingSphere.center)):(ze.boundingSphere===null&&ze.computeBoundingSphere(),q.copy(ze.boundingSphere.center)),q.applyMatrix4(Tt.matrixWorld).applyMatrix4(Z)),Array.isArray(Xe)){const Qe=ze.groups;for(let ti=0,ni=Qe.length;ti0&&oa(ee,Te,$t,qt),ie&&At.viewport(A.copy(ie)),ee.length>0&&Us(ee,$t,qt),Te.length>0&&Us(Te,$t,qt),ze.length>0&&Us(ze,$t,qt),At.buffers.depth.setTest(!0),At.buffers.depth.setMask(!0),At.buffers.color.setMask(!0),At.setPolygonOffset(!1)}function oa(Tt,$t,qt,ie){if((qt.isScene===!0?qt.overrideMaterial:null)!==null)return;const Te=Et.isWebGL2;H===null&&(H=new ro(1,1,{generateMipmaps:!0,type:yt.has("EXT_color_buffer_half_float")?_f:Go,minFilter:Bo,samples:Te?4:0})),p.getDrawingBufferSize(_),Te?H.setSize(_.x,_.y):H.setSize(Lm(_.x),Lm(_.y));const ze=p.getRenderTarget();p.setRenderTarget(H),p.getClearColor(O),I=p.getClearAlpha(),I<1&&p.setClearColor(16777215,.5),p.clear();const Xe=p.toneMapping;p.toneMapping=zo,Us(Tt,qt,ie),dt.updateMultisampleRenderTarget(H),dt.updateRenderTargetMipmap(H);let Qe=!1;for(let ti=0,ni=$t.length;ti0),oi=!!qt.morphAttributes.position,Qi=!!qt.morphAttributes.normal,fn=!!qt.morphAttributes.color;let ji=zo;ie.toneMapped&&(M===null||M.isXRRenderTarget===!0)&&(ji=p.toneMapping);const yn=qt.morphAttributes.position||qt.morphAttributes.normal||qt.morphAttributes.color,ei=yn!==void 0?yn.length:0,Se=Vt.get(ie),Br=f.state.lights;if($===!0&&(U===!0||Tt!==C)){const En=Tt===C&&ie.id===w;Pe.setState(ie,Tt,En)}let gi=!1;ie.version===Se.__version?(Se.needsLights&&Se.lightsStateVersion!==Br.state.version||Se.outputColorSpace!==Xe||ee.isBatchedMesh&&Se.batching===!1||!ee.isBatchedMesh&&Se.batching===!0||ee.isInstancedMesh&&Se.instancing===!1||!ee.isInstancedMesh&&Se.instancing===!0||ee.isSkinnedMesh&&Se.skinning===!1||!ee.isSkinnedMesh&&Se.skinning===!0||ee.isInstancedMesh&&Se.instancingColor===!0&&ee.instanceColor===null||ee.isInstancedMesh&&Se.instancingColor===!1&&ee.instanceColor!==null||Se.envMap!==Qe||ie.fog===!0&&Se.fog!==Te||Se.numClippingPlanes!==void 0&&(Se.numClippingPlanes!==Pe.numPlanes||Se.numIntersection!==Pe.numIntersection)||Se.vertexAlphas!==ti||Se.vertexTangents!==ni||Se.morphTargets!==oi||Se.morphNormals!==Qi||Se.morphColors!==fn||Se.toneMapping!==ji||Et.isWebGL2===!0&&Se.morphTargetsCount!==ei)&&(gi=!0):(gi=!0,Se.__version=ie.version);let cn=Se.currentProgram;gi===!0&&(cn=lo(ie,$t,ee));let Ni=!1,Vn=!1,mn=!1;const Ki=cn.getUniforms(),pr=Se.uniforms;if(At.useProgram(cn.program)&&(Ni=!0,Vn=!0,mn=!0),ie.id!==w&&(w=ie.id,Vn=!0),Ni||C!==Tt){Ki.setValue(rt,"projectionMatrix",Tt.projectionMatrix),Ki.setValue(rt,"viewMatrix",Tt.matrixWorldInverse);const En=Ki.map.cameraPosition;En!==void 0&&En.setValue(rt,q.setFromMatrixPosition(Tt.matrixWorld)),Et.logarithmicDepthBuffer&&Ki.setValue(rt,"logDepthBufFC",2/(Math.log(Tt.far+1)/Math.LN2)),(ie.isMeshPhongMaterial||ie.isMeshToonMaterial||ie.isMeshLambertMaterial||ie.isMeshBasicMaterial||ie.isMeshStandardMaterial||ie.isShaderMaterial)&&Ki.setValue(rt,"isOrthographic",Tt.isOrthographicCamera===!0),C!==Tt&&(C=Tt,Vn=!0,mn=!0)}if(ee.isSkinnedMesh){Ki.setOptional(rt,ee,"bindMatrix"),Ki.setOptional(rt,ee,"bindMatrixInverse");const En=ee.skeleton;En&&(Et.floatVertexTextures?(En.boneTexture===null&&En.computeBoneTexture(),Ki.setValue(rt,"boneTexture",En.boneTexture,dt)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}ee.isBatchedMesh&&(Ki.setOptional(rt,ee,"batchingTexture"),Ki.setValue(rt,"batchingTexture",ee._matricesTexture,dt));const Gs=qt.morphAttributes;if((Gs.position!==void 0||Gs.normal!==void 0||Gs.color!==void 0&&Et.isWebGL2===!0)&&De.update(ee,qt,cn),(Vn||Se.receiveShadow!==ee.receiveShadow)&&(Se.receiveShadow=ee.receiveShadow,Ki.setValue(rt,"receiveShadow",ee.receiveShadow)),ie.isMeshGouraudMaterial&&ie.envMap!==null&&(pr.envMap.value=Qe,pr.flipEnvMap.value=Qe.isCubeTexture&&Qe.isRenderTargetTexture===!1?-1:1),Vn&&(Ki.setValue(rt,"toneMappingExposure",p.toneMappingExposure),Se.needsLights&&ho(pr,mn),Te&&ie.fog===!0&&le.refreshFogUniforms(pr,Te),le.refreshMaterialUniforms(pr,ie,G,B,H),vm.upload(rt,qr(Se),pr,dt)),ie.isShaderMaterial&&ie.uniformsNeedUpdate===!0&&(vm.upload(rt,qr(Se),pr,dt),ie.uniformsNeedUpdate=!1),ie.isSpriteMaterial&&Ki.setValue(rt,"center",ee.center),Ki.setValue(rt,"modelViewMatrix",ee.modelViewMatrix),Ki.setValue(rt,"normalMatrix",ee.normalMatrix),Ki.setValue(rt,"modelMatrix",ee.matrixWorld),ie.isShaderMaterial||ie.isRawShaderMaterial){const En=ie.uniformsGroups;for(let la=0,Jn=En.length;la0&&dt.useMultisampledRTT(Tt)===!1?ee=Vt.get(Tt).__webglMultisampledFramebuffer:Array.isArray(ni)?ee=ni[qt]:ee=ni,A.copy(Tt.viewport),P.copy(Tt.scissor),b=Tt.scissorTest}else A.copy(j).multiplyScalar(G).floor(),P.copy(Q).multiplyScalar(G).floor(),b=tt;if(At.bindFramebuffer(rt.FRAMEBUFFER,ee)&&Et.drawBuffers&&ie&&At.drawBuffers(Tt,ee),At.viewport(A),At.scissor(P),At.setScissorTest(b),Te){const Qe=Vt.get(Tt.texture);rt.framebufferTexture2D(rt.FRAMEBUFFER,rt.COLOR_ATTACHMENT0,rt.TEXTURE_CUBE_MAP_POSITIVE_X+$t,Qe.__webglTexture,qt)}else if(ze){const Qe=Vt.get(Tt.texture),ti=$t||0;rt.framebufferTextureLayer(rt.FRAMEBUFFER,rt.COLOR_ATTACHMENT0,Qe.__webglTexture,qt||0,ti)}w=-1},this.readRenderTargetPixels=function(Tt,$t,qt,ie,ee,Te,ze){if(!(Tt&&Tt.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Xe=Vt.get(Tt).__webglFramebuffer;if(Tt.isWebGLCubeRenderTarget&&ze!==void 0&&(Xe=Xe[ze]),Xe){At.bindFramebuffer(rt.FRAMEBUFFER,Xe);try{const Qe=Tt.texture,ti=Qe.format,ni=Qe.type;if(ti!==vs&&ne.convert(ti)!==rt.getParameter(rt.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const oi=ni===_f&&(yt.has("EXT_color_buffer_half_float")||Et.isWebGL2&&yt.has("EXT_color_buffer_float"));if(ni!==Go&&ne.convert(ni)!==rt.getParameter(rt.IMPLEMENTATION_COLOR_READ_TYPE)&&!(ni===Ma&&(Et.isWebGL2||yt.has("OES_texture_float")||yt.has("WEBGL_color_buffer_float")))&&!oi){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}$t>=0&&$t<=Tt.width-ie&&qt>=0&&qt<=Tt.height-ee&&rt.readPixels($t,qt,ie,ee,ne.convert(ti),ne.convert(ni),Te)}finally{const Qe=M!==null?Vt.get(M).__webglFramebuffer:null;At.bindFramebuffer(rt.FRAMEBUFFER,Qe)}}},this.copyFramebufferToTexture=function(Tt,$t,qt=0){const ie=Math.pow(2,-qt),ee=Math.floor($t.image.width*ie),Te=Math.floor($t.image.height*ie);dt.setTexture2D($t,0),rt.copyTexSubImage2D(rt.TEXTURE_2D,qt,0,0,Tt.x,Tt.y,ee,Te),At.unbindTexture()},this.copyTextureToTexture=function(Tt,$t,qt,ie=0){const ee=$t.image.width,Te=$t.image.height,ze=ne.convert(qt.format),Xe=ne.convert(qt.type);dt.setTexture2D(qt,0),rt.pixelStorei(rt.UNPACK_FLIP_Y_WEBGL,qt.flipY),rt.pixelStorei(rt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,qt.premultiplyAlpha),rt.pixelStorei(rt.UNPACK_ALIGNMENT,qt.unpackAlignment),$t.isDataTexture?rt.texSubImage2D(rt.TEXTURE_2D,ie,Tt.x,Tt.y,ee,Te,ze,Xe,$t.image.data):$t.isCompressedTexture?rt.compressedTexSubImage2D(rt.TEXTURE_2D,ie,Tt.x,Tt.y,$t.mipmaps[0].width,$t.mipmaps[0].height,ze,$t.mipmaps[0].data):rt.texSubImage2D(rt.TEXTURE_2D,ie,Tt.x,Tt.y,ze,Xe,$t.image),ie===0&&qt.generateMipmaps&&rt.generateMipmap(rt.TEXTURE_2D),At.unbindTexture()},this.copyTextureToTexture3D=function(Tt,$t,qt,ie,ee=0){if(p.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Te=Tt.max.x-Tt.min.x+1,ze=Tt.max.y-Tt.min.y+1,Xe=Tt.max.z-Tt.min.z+1,Qe=ne.convert(ie.format),ti=ne.convert(ie.type);let ni;if(ie.isData3DTexture)dt.setTexture3D(ie,0),ni=rt.TEXTURE_3D;else if(ie.isDataArrayTexture||ie.isCompressedArrayTexture)dt.setTexture2DArray(ie,0),ni=rt.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}rt.pixelStorei(rt.UNPACK_FLIP_Y_WEBGL,ie.flipY),rt.pixelStorei(rt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ie.premultiplyAlpha),rt.pixelStorei(rt.UNPACK_ALIGNMENT,ie.unpackAlignment);const oi=rt.getParameter(rt.UNPACK_ROW_LENGTH),Qi=rt.getParameter(rt.UNPACK_IMAGE_HEIGHT),fn=rt.getParameter(rt.UNPACK_SKIP_PIXELS),ji=rt.getParameter(rt.UNPACK_SKIP_ROWS),yn=rt.getParameter(rt.UNPACK_SKIP_IMAGES),ei=qt.isCompressedTexture?qt.mipmaps[ee]:qt.image;rt.pixelStorei(rt.UNPACK_ROW_LENGTH,ei.width),rt.pixelStorei(rt.UNPACK_IMAGE_HEIGHT,ei.height),rt.pixelStorei(rt.UNPACK_SKIP_PIXELS,Tt.min.x),rt.pixelStorei(rt.UNPACK_SKIP_ROWS,Tt.min.y),rt.pixelStorei(rt.UNPACK_SKIP_IMAGES,Tt.min.z),qt.isDataTexture||qt.isData3DTexture?rt.texSubImage3D(ni,ee,$t.x,$t.y,$t.z,Te,ze,Xe,Qe,ti,ei.data):qt.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),rt.compressedTexSubImage3D(ni,ee,$t.x,$t.y,$t.z,Te,ze,Xe,Qe,ei.data)):rt.texSubImage3D(ni,ee,$t.x,$t.y,$t.z,Te,ze,Xe,Qe,ti,ei),rt.pixelStorei(rt.UNPACK_ROW_LENGTH,oi),rt.pixelStorei(rt.UNPACK_IMAGE_HEIGHT,Qi),rt.pixelStorei(rt.UNPACK_SKIP_PIXELS,fn),rt.pixelStorei(rt.UNPACK_SKIP_ROWS,ji),rt.pixelStorei(rt.UNPACK_SKIP_IMAGES,yn),ee===0&&ie.generateMipmaps&&rt.generateMipmap(ni),At.unbindTexture()},this.initTexture=function(Tt){Tt.isCubeTexture?dt.setTextureCube(Tt,0):Tt.isData3DTexture?dt.setTexture3D(Tt,0):Tt.isDataArrayTexture||Tt.isCompressedArrayTexture?dt.setTexture2DArray(Tt,0):dt.setTexture2D(Tt,0),At.unbindTexture()},this.resetState=function(){m=0,S=0,M=null,At.reset(),Ke.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Uo}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const i=this.getContext();i.drawingBufferColorSpace=t===mg?"display-p3":"srgb",i.unpackColorSpace=an.workingColorSpace===tp?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===mr?vh:x1}set outputEncoding(t){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=t===vh?mr:Ho}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(t){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=t}}class I2 extends L1{}I2.prototype.isWebGL1Renderer=!0;class xg{constructor(t,i=25e-5){this.isFogExp2=!0,this.name="",this.color=new Ge(t),this.density=i}clone(){return new xg(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Sg{constructor(t,i=1,y=1e3){this.isFog=!0,this.name="",this.color=new Ge(t),this.near=i,this.far=y}clone(){return new Sg(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Fm extends ki{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,i){return super.copy(t,i),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const i=super.toJSON(t);return this.fog!==null&&(i.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(i.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(i.object.backgroundIntensity=this.backgroundIntensity),i}}class Tg{constructor(t,i){this.isInterleavedBuffer=!0,this.array=t,this.stride=i,this.count=t!==void 0?t.length/i:0,this.usage=Bd,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=ra()}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return Mu("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,i){this.updateRanges.push({start:t,count:i})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,i,y){t*=this.stride,y*=i.stride;for(let T=0,E=this.stride;Tt.far||i.push({distance:e,point:Qc.clone(),uv:na.getInterpolation(Qc,Pv,qc,Rv,yE,Q0,xE,new ve),face:null,object:this})}copy(t,i){return super.copy(t,i),t.center!==void 0&&this.center.copy(t.center),this.material=t.material,this}}function bv(g,t,i,y,T,E){Lf.subVectors(g,i).addScalar(.5).multiply(y),T!==void 0?(_c.x=E*Lf.x-T*Lf.y,_c.y=T*Lf.x+E*Lf.y):_c.copy(Lf),g.copy(t),g.x+=_c.x,g.y+=_c.y,g.applyMatrix4(N2)}const Lv=new Ct,SE=new Ct;class U2 extends ki{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const i=t.levels;for(let y=0,T=i.length;y0){let y,T;for(y=1,T=i.length;y0){Lv.setFromMatrixPosition(this.matrixWorld);const T=t.ray.origin.distanceTo(Lv);this.getObjectForDistance(T).raycast(t,i)}}update(t){const i=this.levels;if(i.length>1){Lv.setFromMatrixPosition(t.matrixWorld),SE.setFromMatrixPosition(this.matrixWorld);const y=Lv.distanceTo(SE)/t.zoom;i[0].object.visible=!0;let T,E;for(T=1,E=i.length;T=s)i[T-1].object.visible=!1,i[T].object.visible=!0;else break}for(this._currentLevel=T-1;T=y.length&&y.push({start:-1,count:-1,z:-1});const E=y[this.index];T.push(E),this.index++,E.start=t.start,E.count=t.count,E.z=i}reset(){this.list.length=0,this.index=0}}const Of="batchId",ah=new di,bE=new di,hU=new di,LE=new di,ty=new np,Dv=new ys,iu=new Qr,id=new Ct,ey=new lU,$r=new dr,Iv=[];function uU(g,t,i=0){const y=t.itemSize;if(g.isInterleavedBufferAttribute||g.array.constructor!==t.array.constructor){const T=g.count;for(let E=0;E65536?new Uint32Array(E):new Uint16Array(E);i.setIndex(new ln(x,1))}const s=T>65536?new Uint32Array(y):new Uint16Array(y);i.setAttribute(Of,new ln(s,1)),this._geometryInitialized=!0}}_validateGeometry(t){if(t.getAttribute(Of))throw new Error(`BatchedMesh: Geometry cannot use attribute "${Of}"`);const i=this.geometry;if(!!t.getIndex()!=!!i.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const y in i.attributes){if(y===Of)continue;if(!t.hasAttribute(y))throw new Error(`BatchedMesh: Added geometry missing "${y}". All geometries must have consistent attributes.`);const T=t.getAttribute(y),E=i.getAttribute(y);if(T.itemSize!==E.itemSize||T.normalized!==E.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(t){return this.customSort=t,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ys);const t=this._geometryCount,i=this.boundingBox,y=this._active;i.makeEmpty();for(let T=0;T=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const T={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let E=null;const s=this._reservedRanges,x=this._drawRanges,e=this._bounds;this._geometryCount!==0&&(E=s[s.length-1]),i===-1?T.vertexCount=t.getAttribute("position").count:T.vertexCount=i,E===null?T.vertexStart=0:T.vertexStart=E.vertexStart+E.vertexCount;const r=t.getIndex(),d=r!==null;if(d&&(y===-1?T.indexCount=r.count:T.indexCount=y,E===null?T.indexStart=0:T.indexStart=E.indexStart+E.indexCount),T.indexStart!==-1&&T.indexStart+T.indexCount>this._maxIndexCount||T.vertexStart+T.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const h=this._visibility,a=this._active,l=this._matricesTexture,n=this._matricesTexture.image.data;h.push(!0),a.push(!0);const u=this._geometryCount;this._geometryCount++,hU.toArray(n,u*16),l.needsUpdate=!0,s.push(T),x.push({start:d?T.indexStart:T.vertexStart,count:-1}),e.push({boxInitialized:!1,box:new ys,sphereInitialized:!1,sphere:new Qr});const f=this.geometry.getAttribute(Of);for(let o=0;o=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(i);const y=this.geometry,T=y.getIndex()!==null,E=y.getIndex(),s=i.getIndex(),x=this._reservedRanges[t];if(T&&s.count>x.indexCount||i.attributes.position.count>x.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const e=x.vertexStart,r=x.vertexCount;for(const l in y.attributes){if(l===Of)continue;const n=i.getAttribute(l),u=y.getAttribute(l);uU(n,u,e);const f=n.itemSize;for(let o=n.count,c=r;o=i.length||i[t]===!1?this:(i[t]=!1,this._visibilityChanged=!0,this)}getBoundingBoxAt(t,i){if(this._active[t]===!1)return null;const T=this._bounds[t],E=T.box,s=this.geometry;if(T.boxInitialized===!1){E.makeEmpty();const x=s.index,e=s.attributes.position,r=this._drawRanges[t];for(let d=r.start,h=r.start+r.count;d=s||y[t]===!1?this:(i.toArray(E,t*16),T.needsUpdate=!0,this)}getMatrixAt(t,i){const y=this._active,T=this._matricesTexture.image.data,E=this._geometryCount;return t>=E||y[t]===!1?null:i.fromArray(T,t*16)}setVisibleAt(t,i){const y=this._visibility,T=this._active,E=this._geometryCount;return t>=E||T[t]===!1||y[t]===i?this:(y[t]=i,this._visibilityChanged=!0,this)}getVisibleAt(t){const i=this._visibility,y=this._active,T=this._geometryCount;return t>=T||y[t]===!1?!1:i[t]}raycast(t,i){const y=this._visibility,T=this._active,E=this._drawRanges,s=this._geometryCount,x=this.matrixWorld,e=this.geometry;$r.material=this.material,$r.geometry.index=e.index,$r.geometry.attributes=e.attributes,$r.geometry.boundingBox===null&&($r.geometry.boundingBox=new ys),$r.geometry.boundingSphere===null&&($r.geometry.boundingSphere=new Qr);for(let r=0;r({...i})),this._reservedRanges=t._reservedRanges.map(i=>({...i})),this._visibility=t._visibility.slice(),this._active=t._active.slice(),this._bounds=t._bounds.map(i=>({boxInitialized:i.boxInitialized,box:i.box.clone(),sphereInitialized:i.sphereInitialized,sphere:i.sphere.clone()})),this._maxGeometryCount=t._maxGeometryCount,this._maxVertexCount=t._maxVertexCount,this._maxIndexCount=t._maxIndexCount,this._geometryInitialized=t._geometryInitialized,this._geometryCount=t._geometryCount,this._multiDrawCounts=t._multiDrawCounts.slice(),this._multiDrawStarts=t._multiDrawStarts.slice(),this._matricesTexture=t._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(t,i,y,T,E){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const s=T.getIndex(),x=s===null?1:s.array.BYTES_PER_ELEMENT,e=this._active,r=this._visibility,d=this._multiDrawStarts,h=this._multiDrawCounts,a=this._drawRanges,l=this.perObjectFrustumCulled;l&&(LE.multiplyMatrices(y.projectionMatrix,y.matrixWorldInverse).multiply(this.matrixWorld),ty.setFromProjectionMatrix(LE,t.coordinateSystem));let n=0;if(this.sortObjects){bE.copy(this.matrixWorld).invert(),id.setFromMatrixPosition(y.matrixWorld).applyMatrix4(bE);for(let o=0,c=r.length;oe)continue;a.applyMatrix4(this.matrixWorld);const w=t.ray.origin.distanceTo(a);wt.far||i.push({distance:w,point:h.clone().applyMatrix4(this.matrixWorld),index:p,face:null,faceIndex:null,object:this})}}else{const o=Math.max(0,s.start),c=Math.min(f.count,s.start+s.count);for(let p=o,v=c-1;pe)continue;a.applyMatrix4(this.matrixWorld);const S=t.ray.origin.distanceTo(a);St.far||i.push({distance:S,point:h.clone().applyMatrix4(this.matrixWorld),index:p,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const i=this.geometry.morphAttributes,y=Object.keys(i);if(y.length>0){const T=i[y[0]];if(T!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,s=T.length;E0){const T=i[y[0]];if(T!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,s=T.length;ET.far)return;E.push({distance:r,distanceToRay:Math.sqrt(x),point:e,index:t,face:null,object:s})}}class fU extends zn{constructor(t,i,y,T,E,s,x,e,r){super(t,i,y,T,E,s,x,e,r),this.isVideoTexture=!0,this.minFilter=s!==void 0?s:Bn,this.magFilter=E!==void 0?E:Bn,this.generateMipmaps=!1;const d=this;function h(){d.needsUpdate=!0,t.requestVideoFrameCallback(h)}"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(h)}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;"requestVideoFrameCallback"in t===!1&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class cU extends zn{constructor(t,i){super({width:t,height:i}),this.isFramebufferTexture=!0,this.magFilter=rr,this.minFilter=rr,this.generateMipmaps=!1,this.needsUpdate=!0}}class Mg extends zn{constructor(t,i,y,T,E,s,x,e,r,d,h,a){super(null,s,x,e,r,d,T,E,h,a),this.isCompressedTexture=!0,this.image={width:i,height:y},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class dU extends Mg{constructor(t,i,y,T,E,s){super(t,i,y,E,s),this.isCompressedArrayTexture=!0,this.image.depth=T,this.wrapR=Jr}}class pU extends Mg{constructor(t,i,y){super(void 0,t[0].width,t[0].height,i,y,Pl),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class vU extends zn{constructor(t,i,y,T,E,s,x,e,r){super(t,i,y,T,E,s,x,e,r),this.isCanvasTexture=!0,this.needsUpdate=!0}}class ao{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,i){const y=this.getUtoTmapping(t);return this.getPoint(y,i)}getPoints(t=5){const i=[];for(let y=0;y<=t;y++)i.push(this.getPoint(y/t));return i}getSpacedPoints(t=5){const i=[];for(let y=0;y<=t;y++)i.push(this.getPointAt(y/t));return i}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const i=[];let y,T=this.getPoint(0),E=0;i.push(0);for(let s=1;s<=t;s++)y=this.getPoint(s/t),E+=y.distanceTo(T),i.push(E),T=y;return this.cacheArcLengths=i,i}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,i){const y=this.getLengths();let T=0;const E=y.length;let s;i?s=i:s=t*y[E-1];let x=0,e=E-1,r;for(;x<=e;)if(T=Math.floor(x+(e-x)/2),r=y[T]-s,r<0)x=T+1;else if(r>0)e=T-1;else{e=T;break}if(T=e,y[T]===s)return T/(E-1);const d=y[T],a=y[T+1]-d,l=(s-d)/a;return(T+l)/(E-1)}getTangent(t,i){let T=t-1e-4,E=t+1e-4;T<0&&(T=0),E>1&&(E=1);const s=this.getPoint(T),x=this.getPoint(E),e=i||(s.isVector2?new ve:new Ct);return e.copy(x).sub(s).normalize(),e}getTangentAt(t,i){const y=this.getUtoTmapping(t);return this.getTangent(y,i)}computeFrenetFrames(t,i){const y=new Ct,T=[],E=[],s=[],x=new Ct,e=new di;for(let l=0;l<=t;l++){const n=l/t;T[l]=this.getTangentAt(n,new Ct)}E[0]=new Ct,s[0]=new Ct;let r=Number.MAX_VALUE;const d=Math.abs(T[0].x),h=Math.abs(T[0].y),a=Math.abs(T[0].z);d<=r&&(r=d,y.set(1,0,0)),h<=r&&(r=h,y.set(0,1,0)),a<=r&&y.set(0,0,1),x.crossVectors(T[0],y).normalize(),E[0].crossVectors(T[0],x),s[0].crossVectors(T[0],E[0]);for(let l=1;l<=t;l++){if(E[l]=E[l-1].clone(),s[l]=s[l-1].clone(),x.crossVectors(T[l-1],T[l]),x.length()>Number.EPSILON){x.normalize();const n=Math.acos($n(T[l-1].dot(T[l]),-1,1));E[l].applyMatrix4(e.makeRotationAxis(x,n))}s[l].crossVectors(T[l],E[l])}if(i===!0){let l=Math.acos($n(E[0].dot(E[t]),-1,1));l/=t,T[0].dot(x.crossVectors(E[0],E[t]))>0&&(l=-l);for(let n=1;n<=t;n++)E[n].applyMatrix4(e.makeRotationAxis(T[n],l*n)),s[n].crossVectors(T[n],E[n])}return{tangents:T,normals:E,binormals:s}}clone(){return new this.constructor().copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class Cg extends ao{constructor(t=0,i=0,y=1,T=1,E=0,s=Math.PI*2,x=!1,e=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=i,this.xRadius=y,this.yRadius=T,this.aStartAngle=E,this.aEndAngle=s,this.aClockwise=x,this.aRotation=e}getPoint(t,i){const y=i||new ve,T=Math.PI*2;let E=this.aEndAngle-this.aStartAngle;const s=Math.abs(E)T;)E-=T;E0?0:(Math.floor(Math.abs(x)/E)+1)*E:e===0&&x===E-1&&(x=E-2,e=1);let r,d;this.closed||x>0?r=T[(x-1)%E]:(zv.subVectors(T[0],T[1]).add(T[0]),r=zv);const h=T[x%E],a=T[(x+1)%E];if(this.closed||x+2T.length-2?T.length-1:s+1],h=T[s>T.length-3?T.length-1:s+2];return y.set(zE(x,e.x,r.x,d.x,h.x),zE(x,e.y,r.y,d.y,h.y)),y}copy(t){super.copy(t),this.points=[];for(let i=0,y=t.points.length;i=y){const s=T[E]-y,x=this.curves[E],e=x.getLength(),r=e===0?0:1-s/e;return x.getPointAt(r,i)}E++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let i=0;for(let y=0,T=this.curves.length;y1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}copy(t){super.copy(t),this.curves=[];for(let i=0,y=t.curves.length;i0){const h=r.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(r);const d=r.getPoint(1);return this.currentPoint.copy(d),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class sp extends Fi{constructor(t=[new ve(0,-.5),new ve(.5,0),new ve(0,.5)],i=12,y=0,T=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:t,segments:i,phiStart:y,phiLength:T},i=Math.floor(i),T=$n(T,0,Math.PI*2);const E=[],s=[],x=[],e=[],r=[],d=1/i,h=new Ct,a=new ve,l=new Ct,n=new Ct,u=new Ct;let f=0,o=0;for(let c=0;c<=t.length-1;c++)switch(c){case 0:f=t[c+1].x-t[c].x,o=t[c+1].y-t[c].y,l.x=o*1,l.y=-f,l.z=o*0,u.copy(l),l.normalize(),e.push(l.x,l.y,l.z);break;case t.length-1:e.push(u.x,u.y,u.z);break;default:f=t[c+1].x-t[c].x,o=t[c+1].y-t[c].y,l.x=o*1,l.y=-f,l.z=o*0,n.copy(l),l.x+=u.x,l.y+=u.y,l.z+=u.z,l.normalize(),e.push(l.x,l.y,l.z),u.copy(n)}for(let c=0;c<=i;c++){const p=y+c*d*T,v=Math.sin(p),m=Math.cos(p);for(let S=0;S<=t.length-1;S++){h.x=t[S].x*v,h.y=t[S].y,h.z=t[S].x*m,s.push(h.x,h.y,h.z),a.x=c/i,a.y=S/(t.length-1),x.push(a.x,a.y);const M=e[3*S+0]*v,w=e[3*S+1],C=e[3*S+0]*m;r.push(M,w,C)}}for(let c=0;c0&&p(!0),i>0&&p(!1)),this.setIndex(d),this.setAttribute("position",new je(h,3)),this.setAttribute("normal",new je(a,3)),this.setAttribute("uv",new je(l,2));function c(){const v=new Ct,m=new Ct;let S=0;const M=(i-t)/y;for(let w=0;w<=E;w++){const C=[],A=w/E,P=A*(i-t)+t;for(let b=0;b<=T;b++){const O=b/T,I=O*e+x,D=Math.sin(I),B=Math.cos(I);m.x=P*D,m.y=-A*y+f,m.z=P*B,h.push(m.x,m.y,m.z),v.set(D,M,B).normalize(),a.push(v.x,v.y,v.z),l.push(O,1-A),C.push(n++)}u.push(C)}for(let w=0;w.9&&M<.1&&(p<.2&&(s[c+0]+=1),v<.2&&(s[c+2]+=1),m<.2&&(s[c+4]+=1))}}function a(c){E.push(c.x,c.y,c.z)}function l(c,p){const v=c*3;p.x=t[v+0],p.y=t[v+1],p.z=t[v+2]}function n(){const c=new Ct,p=new Ct,v=new Ct,m=new Ct,S=new ve,M=new ve,w=new ve;for(let C=0,A=0;C80*i){x=r=g[0],e=d=g[1];for(let n=i;nr&&(r=h),a>d&&(d=a);l=Math.max(r-x,d-e),l=l!==0?32767/l:0}return Vd(E,s,i,x,e,l,0),s}};function Z2(g,t,i,y,T){let E,s;if(T===GU(g,t,i,y)>0)for(E=t;E=t;E-=y)s=GE(E,g[E],g[E+1],s);return s&&bg(s,s.next)&&(Wd(s),s=s.next),s}function Ou(g,t){if(!g)return g;t||(t=g);let i=g,y;do if(y=!1,!i.steiner&&(bg(i,i.next)||Un(i.prev,i,i.next)===0)){if(Wd(i),i=t=i.prev,i===i.next)break;y=!0}else i=i.next;while(y||i!==t);return t}function Vd(g,t,i,y,T,E,s){if(!g)return;!s&&E&&DU(g,y,T,E);let x=g,e,r;for(;g.prev!==g.next;){if(e=g.prev,r=g.next,E?wU(g,y,T,E):CU(g)){t.push(e.i/i|0),t.push(g.i/i|0),t.push(r.i/i|0),Wd(g),g=r.next,x=r.next;continue}if(g=r,g===x){s?s===1?(g=AU(Ou(g),t,i),Vd(g,t,i,y,T,E,2)):s===2&&PU(g,t,i,y,T,E):Vd(Ou(g),t,i,y,T,E,1);break}}}function CU(g){const t=g.prev,i=g,y=g.next;if(Un(t,i,y)>=0)return!1;const T=t.x,E=i.x,s=y.x,x=t.y,e=i.y,r=y.y,d=TE?T>s?T:s:E>s?E:s,l=x>e?x>r?x:r:e>r?e:r;let n=y.next;for(;n!==t;){if(n.x>=d&&n.x<=a&&n.y>=h&&n.y<=l&&Yf(T,x,E,e,s,r,n.x,n.y)&&Un(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function wU(g,t,i,y){const T=g.prev,E=g,s=g.next;if(Un(T,E,s)>=0)return!1;const x=T.x,e=E.x,r=s.x,d=T.y,h=E.y,a=s.y,l=xe?x>r?x:r:e>r?e:r,f=d>h?d>a?d:a:h>a?h:a,o=Rx(l,n,t,i,y),c=Rx(u,f,t,i,y);let p=g.prevZ,v=g.nextZ;for(;p&&p.z>=o&&v&&v.z<=c;){if(p.x>=l&&p.x<=u&&p.y>=n&&p.y<=f&&p!==T&&p!==s&&Yf(x,d,e,h,r,a,p.x,p.y)&&Un(p.prev,p,p.next)>=0||(p=p.prevZ,v.x>=l&&v.x<=u&&v.y>=n&&v.y<=f&&v!==T&&v!==s&&Yf(x,d,e,h,r,a,v.x,v.y)&&Un(v.prev,v,v.next)>=0))return!1;v=v.nextZ}for(;p&&p.z>=o;){if(p.x>=l&&p.x<=u&&p.y>=n&&p.y<=f&&p!==T&&p!==s&&Yf(x,d,e,h,r,a,p.x,p.y)&&Un(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=c;){if(v.x>=l&&v.x<=u&&v.y>=n&&v.y<=f&&v!==T&&v!==s&&Yf(x,d,e,h,r,a,v.x,v.y)&&Un(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function AU(g,t,i){let y=g;do{const T=y.prev,E=y.next.next;!bg(T,E)&&J2(T,y,y.next,E)&&Hd(T,E)&&Hd(E,T)&&(t.push(T.i/i|0),t.push(y.i/i|0),t.push(E.i/i|0),Wd(y),Wd(y.next),y=g=E),y=y.next}while(y!==g);return Ou(y)}function PU(g,t,i,y,T,E){let s=g;do{let x=s.next.next;for(;x!==s.prev;){if(s.i!==x.i&&BU(s,x)){let e=Q2(s,x);s=Ou(s,s.next),e=Ou(e,e.next),Vd(s,t,i,y,T,E,0),Vd(e,t,i,y,T,E,0);return}x=x.next}s=s.next}while(s!==g)}function RU(g,t,i,y){const T=[];let E,s,x,e,r;for(E=0,s=t.length;E=i.next.y&&i.next.y!==i.y){const a=i.x+(s-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=E&&a>y&&(y=a,T=i.x=i.x&&i.x>=e&&E!==i.x&&Yf(sT.x||i.x===T.x&&OU(T,i)))&&(T=i,d=h)),i=i.next;while(i!==x);return T}function OU(g,t){return Un(g.prev,g,t.prev)<0&&Un(t.next,g,g.next)<0}function DU(g,t,i,y){let T=g;do T.z===0&&(T.z=Rx(T.x,T.y,t,i,y)),T.prevZ=T.prev,T.nextZ=T.next,T=T.next;while(T!==g);T.prevZ.nextZ=null,T.prevZ=null,IU(T)}function IU(g){let t,i,y,T,E,s,x,e,r=1;do{for(i=g,g=null,E=null,s=0;i;){for(s++,y=i,x=0,t=0;t0||e>0&&y;)x!==0&&(e===0||!y||i.z<=y.z)?(T=i,i=i.nextZ,x--):(T=y,y=y.nextZ,e--),E?E.nextZ=T:g=T,T.prevZ=E,E=T;i=y}E.nextZ=null,r*=2}while(s>1);return g}function Rx(g,t,i,y,T){return g=(g-i)*T|0,t=(t-y)*T|0,g=(g|g<<8)&16711935,g=(g|g<<4)&252645135,g=(g|g<<2)&858993459,g=(g|g<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,g|t<<1}function NU(g){let t=g,i=g;do(t.x=(g-s)*(E-x)&&(g-s)*(y-x)>=(i-s)*(t-x)&&(i-s)*(E-x)>=(T-s)*(y-x)}function BU(g,t){return g.next.i!==t.i&&g.prev.i!==t.i&&!UU(g,t)&&(Hd(g,t)&&Hd(t,g)&&zU(g,t)&&(Un(g.prev,g,t.prev)||Un(g,t.prev,t))||bg(g,t)&&Un(g.prev,g,g.next)>0&&Un(t.prev,t,t.next)>0)}function Un(g,t,i){return(t.y-g.y)*(i.x-t.x)-(t.x-g.x)*(i.y-t.y)}function bg(g,t){return g.x===t.x&&g.y===t.y}function J2(g,t,i,y){const T=Xv(Un(g,t,i)),E=Xv(Un(g,t,y)),s=Xv(Un(i,y,g)),x=Xv(Un(i,y,t));return!!(T!==E&&s!==x||T===0&&Wv(g,i,t)||E===0&&Wv(g,y,t)||s===0&&Wv(i,g,y)||x===0&&Wv(i,t,y))}function Wv(g,t,i){return t.x<=Math.max(g.x,i.x)&&t.x>=Math.min(g.x,i.x)&&t.y<=Math.max(g.y,i.y)&&t.y>=Math.min(g.y,i.y)}function Xv(g){return g>0?1:g<0?-1:0}function UU(g,t){let i=g;do{if(i.i!==g.i&&i.next.i!==g.i&&i.i!==t.i&&i.next.i!==t.i&&J2(i,i.next,g,t))return!0;i=i.next}while(i!==g);return!1}function Hd(g,t){return Un(g.prev,g,g.next)<0?Un(g,t,g.next)>=0&&Un(g,g.prev,t)>=0:Un(g,t,g.prev)<0||Un(g,g.next,t)<0}function zU(g,t){let i=g,y=!1;const T=(g.x+t.x)/2,E=(g.y+t.y)/2;do i.y>E!=i.next.y>E&&i.next.y!==i.y&&T<(i.next.x-i.x)*(E-i.y)/(i.next.y-i.y)+i.x&&(y=!y),i=i.next;while(i!==g);return y}function Q2(g,t){const i=new bx(g.i,g.x,g.y),y=new bx(t.i,t.x,t.y),T=g.next,E=t.prev;return g.next=t,t.prev=g,i.next=T,T.prev=i,y.next=i,i.prev=y,E.next=y,y.prev=E,y}function GE(g,t,i,y){const T=new bx(g,t,i);return y?(T.next=y.next,T.prev=y,y.next.prev=T,y.next=T):(T.prev=T,T.next=T),T}function Wd(g){g.next.prev=g.prev,g.prev.next=g.next,g.prevZ&&(g.prevZ.nextZ=g.nextZ),g.nextZ&&(g.nextZ.prevZ=g.prevZ)}function bx(g,t,i){this.i=g,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function GU(g,t,i,y){let T=0;for(let E=t,s=i-y;E2&&g[t-1].equals(g[0])&&g.pop()}function HE(g,t){for(let i=0;iNumber.EPSILON){const Bt=Math.sqrt(Dt),re=Math.sqrt(ut*ut+Rt*Rt),le=gt.x-dt/Bt,ge=gt.y+Vt/Bt,xe=yt.x-Rt/re,Pe=yt.y+ut/re,te=((xe-le)*Rt-(Pe-ge)*ut)/(Vt*Rt-dt*ut);Et=le+Vt*te-rt.x,At=ge+dt*te-rt.y;const Ve=Et*Et+At*At;if(Ve<=2)return new ve(Et,At);Pt=Math.sqrt(Ve/2)}else{let Bt=!1;Vt>Number.EPSILON?ut>Number.EPSILON&&(Bt=!0):Vt<-Number.EPSILON?ut<-Number.EPSILON&&(Bt=!0):Math.sign(dt)===Math.sign(Rt)&&(Bt=!0),Bt?(Et=-dt,At=Vt,Pt=Math.sqrt(Dt)):(Et=Vt,At=dt,Pt=Math.sqrt(Dt/2))}return new ve(Et/Pt,At/Pt)}const X=[];for(let rt=0,gt=I.length,yt=gt-1,Et=rt+1;rt=0;rt--){const gt=rt/f,yt=l*Math.cos(gt*Math.PI/2),Et=n*Math.sin(gt*Math.PI/2)+u;for(let At=0,Pt=I.length;At=0;){const Et=yt;let At=yt-1;At<0&&(At=rt.length-1);for(let Pt=0,Vt=d+f*2;Pt0)&&l.push(p,v,S),(o!==y-1||e0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class iA extends Wr{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Ge(16777215),this.specular=new Ge(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ge(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=qd,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class nA extends Wr{constructor(t){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ge(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ge(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}class rA extends Wr{constructor(t){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}class sA extends Wr{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Ge(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ge(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=qd,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class aA extends Wr{constructor(t){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ge(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this.fog=t.fog,this}}class oA extends xs{constructor(t){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}function xu(g,t,i){return!g||!i&&g.constructor===t?g:typeof t.BYTES_PER_ELEMENT=="number"?new t(g):Array.prototype.slice.call(g)}function lA(g){return ArrayBuffer.isView(g)&&!(g instanceof DataView)}function hA(g){function t(T,E){return g[T]-g[E]}const i=g.length,y=new Array(i);for(let T=0;T!==i;++T)y[T]=T;return y.sort(t),y}function Lx(g,t,i){const y=g.length,T=new g.constructor(y);for(let E=0,s=0;s!==y;++E){const x=i[E]*t;for(let e=0;e!==t;++e)T[s++]=g[x+e]}return T}function V1(g,t,i,y){let T=1,E=g[0];for(;E!==void 0&&E[y]===void 0;)E=g[T++];if(E===void 0)return;let s=E[y];if(s!==void 0)if(Array.isArray(s))do s=E[y],s!==void 0&&(t.push(E.time),i.push.apply(i,s)),E=g[T++];while(E!==void 0);else if(s.toArray!==void 0)do s=E[y],s!==void 0&&(t.push(E.time),s.toArray(i,i.length)),E=g[T++];while(E!==void 0);else do s=E[y],s!==void 0&&(t.push(E.time),i.push(s)),E=g[T++];while(E!==void 0)}function XU(g,t,i,y,T=30){const E=g.clone();E.name=t;const s=[];for(let e=0;e=y)){h.push(r.times[l]);for(let u=0;uE.tracks[e].times[0]&&(x=E.tracks[e].times[0]);for(let e=0;e=x.times[n]){const o=n*h+d,c=o+h-d;u=x.values.slice(o,c)}else{const o=x.createInterpolant(),c=d,p=h-d;o.evaluate(E),u=o.resultBuffer.slice(c,p)}e==="quaternion"&&new Is().fromArray(u).normalize().conjugate().toArray(u);const f=r.times.length;for(let o=0;o=E)){const x=i[1];t=E)break e}s=y,y=0;break i}break t}for(;y>>1;ti;)--s;if(++s,E!==0||s!==T){E>=s&&(s=Math.max(s,1),E=s-1);const x=this.getValueSize();this.times=y.slice(E,s),this.values=this.values.slice(E*x,s*x)}return this}validate(){let t=!0;const i=this.getValueSize();i-Math.floor(i)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const y=this.times,T=this.values,E=y.length;E===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let s=null;for(let x=0;x!==E;x++){const e=y[x];if(typeof e=="number"&&isNaN(e)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,x,e),t=!1;break}if(s!==null&&s>e){console.error("THREE.KeyframeTrack: Out of order keys.",this,x,e,s),t=!1;break}s=e}if(T!==void 0&&lA(T))for(let x=0,e=T.length;x!==e;++x){const r=T[x];if(isNaN(r)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,x,r),t=!1;break}}return t}optimize(){const t=this.times.slice(),i=this.values.slice(),y=this.getValueSize(),T=this.getInterpolation()===dm,E=t.length-1;let s=1;for(let x=1;x0){t[s]=t[E];for(let x=E*y,e=s*y,r=0;r!==y;++r)i[e+r]=i[x+r];++s}return s!==t.length?(this.times=t.slice(0,s),this.values=i.slice(0,s*y)):(this.times=t,this.values=i),this}clone(){const t=this.times.slice(),i=this.values.slice(),y=this.constructor,T=new y(this.name,t,i);return T.createInterpolant=this.createInterpolant,T}}oo.prototype.TimeBufferType=Float32Array;oo.prototype.ValueBufferType=Float32Array;oo.prototype.DefaultInterpolation=Fd;class Uu extends oo{}Uu.prototype.ValueTypeName="bool";Uu.prototype.ValueBufferType=Array;Uu.prototype.DefaultInterpolation=Ld;Uu.prototype.InterpolantFactoryMethodLinear=void 0;Uu.prototype.InterpolantFactoryMethodSmooth=void 0;class W1 extends oo{}W1.prototype.ValueTypeName="color";class Xd extends oo{}Xd.prototype.ValueTypeName="number";class cA extends lp{constructor(t,i,y,T){super(t,i,y,T)}interpolate_(t,i,y,T){const E=this.resultBuffer,s=this.sampleValues,x=this.valueSize,e=(y-i)/(T-i);let r=t*x;for(let d=r+x;r!==d;r+=4)Is.slerpFlat(E,0,s,r-x,s,r,e);return E}}class fc extends oo{InterpolantFactoryMethodLinear(t){return new cA(this.times,this.values,this.getValueSize(),t)}}fc.prototype.ValueTypeName="quaternion";fc.prototype.DefaultInterpolation=Fd;fc.prototype.InterpolantFactoryMethodSmooth=void 0;class zu extends oo{}zu.prototype.ValueTypeName="string";zu.prototype.ValueBufferType=Array;zu.prototype.DefaultInterpolation=Ld;zu.prototype.InterpolantFactoryMethodLinear=void 0;zu.prototype.InterpolantFactoryMethodSmooth=void 0;class Yd extends oo{}Yd.prototype.ValueTypeName="vector";class kd{constructor(t,i=-1,y,T=vg){this.name=t,this.tracks=y,this.duration=i,this.blendMode=T,this.uuid=ra(),this.duration<0&&this.resetDuration()}static parse(t){const i=[],y=t.tracks,T=1/(t.fps||1);for(let s=0,x=y.length;s!==x;++s)i.push(KU(y[s]).scale(T));const E=new this(t.name,t.duration,i,t.blendMode);return E.uuid=t.uuid,E}static toJSON(t){const i=[],y=t.tracks,T={name:t.name,duration:t.duration,tracks:i,uuid:t.uuid,blendMode:t.blendMode};for(let E=0,s=y.length;E!==s;++E)i.push(oo.toJSON(y[E]));return T}static CreateFromMorphTargetSequence(t,i,y,T){const E=i.length,s=[];for(let x=0;x1){const h=d[1];let a=T[h];a||(T[h]=a=[]),a.push(r)}}const s=[];for(const x in T)s.push(this.CreateFromMorphTargetSequence(x,T[x],i,y));return s}static parseAnimation(t,i){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const y=function(h,a,l,n,u){if(l.length!==0){const f=[],o=[];V1(l,f,o,n),f.length!==0&&u.push(new h(a,f,o))}},T=[],E=t.name||"default",s=t.fps||30,x=t.blendMode;let e=t.length||-1;const r=t.hierarchy||[];for(let h=0;h{i&&i(E),this.manager.itemEnd(t)},0),E;if(ml[t]!==void 0){ml[t].push({onLoad:i,onProgress:y,onError:T});return}ml[t]=[],ml[t].push({onLoad:i,onProgress:y,onError:T});const s=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),x=this.mimeType,e=this.responseType;fetch(s).then(r=>{if(r.status===200||r.status===0){if(r.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||r.body===void 0||r.body.getReader===void 0)return r;const d=ml[t],h=r.body.getReader(),a=r.headers.get("Content-Length")||r.headers.get("X-File-Size"),l=a?parseInt(a):0,n=l!==0;let u=0;const f=new ReadableStream({start(o){c();function c(){h.read().then(({done:p,value:v})=>{if(p)o.close();else{u+=v.byteLength;const m=new ProgressEvent("progress",{lengthComputable:n,loaded:u,total:l});for(let S=0,M=d.length;S{switch(e){case"arraybuffer":return r.arrayBuffer();case"blob":return r.blob();case"document":return r.text().then(d=>new DOMParser().parseFromString(d,x));case"json":return r.json();default:if(x===void 0)return r.text();{const h=/charset="?([^;"\s]*)"?/i.exec(x),a=h&&h[1]?h[1].toLowerCase():void 0,l=new TextDecoder(a);return r.arrayBuffer().then(n=>l.decode(n))}}}).then(r=>{Ml.add(t,r);const d=ml[t];delete ml[t];for(let h=0,a=d.length;h{const d=ml[t];if(d===void 0)throw this.manager.itemError(t),r;delete ml[t];for(let h=0,a=d.length;h{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class ZU extends Bs{constructor(t){super(t)}load(t,i,y,T){const E=this,s=new Rl(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(x){try{i(E.parse(JSON.parse(x)))}catch(e){T?T(e):console.error(e),E.manager.itemError(t)}},y,T)}parse(t){const i=[];for(let y=0;y0:T.vertexColors=t.vertexColors),t.uniforms!==void 0)for(const E in t.uniforms){const s=t.uniforms[E];switch(T.uniforms[E]={},s.type){case"t":T.uniforms[E].value=y(s.value);break;case"c":T.uniforms[E].value=new Ge().setHex(s.value);break;case"v2":T.uniforms[E].value=new ve().fromArray(s.value);break;case"v3":T.uniforms[E].value=new Ct().fromArray(s.value);break;case"v4":T.uniforms[E].value=new on().fromArray(s.value);break;case"m3":T.uniforms[E].value=new Di().fromArray(s.value);break;case"m4":T.uniforms[E].value=new di().fromArray(s.value);break;default:T.uniforms[E].value=s.value}}if(t.defines!==void 0&&(T.defines=t.defines),t.vertexShader!==void 0&&(T.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(T.fragmentShader=t.fragmentShader),t.glslVersion!==void 0&&(T.glslVersion=t.glslVersion),t.extensions!==void 0)for(const E in t.extensions)T.extensions[E]=t.extensions[E];if(t.lights!==void 0&&(T.lights=t.lights),t.clipping!==void 0&&(T.clipping=t.clipping),t.size!==void 0&&(T.size=t.size),t.sizeAttenuation!==void 0&&(T.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(T.map=y(t.map)),t.matcap!==void 0&&(T.matcap=y(t.matcap)),t.alphaMap!==void 0&&(T.alphaMap=y(t.alphaMap)),t.bumpMap!==void 0&&(T.bumpMap=y(t.bumpMap)),t.bumpScale!==void 0&&(T.bumpScale=t.bumpScale),t.normalMap!==void 0&&(T.normalMap=y(t.normalMap)),t.normalMapType!==void 0&&(T.normalMapType=t.normalMapType),t.normalScale!==void 0){let E=t.normalScale;Array.isArray(E)===!1&&(E=[E,E]),T.normalScale=new ve().fromArray(E)}return t.displacementMap!==void 0&&(T.displacementMap=y(t.displacementMap)),t.displacementScale!==void 0&&(T.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(T.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(T.roughnessMap=y(t.roughnessMap)),t.metalnessMap!==void 0&&(T.metalnessMap=y(t.metalnessMap)),t.emissiveMap!==void 0&&(T.emissiveMap=y(t.emissiveMap)),t.emissiveIntensity!==void 0&&(T.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(T.specularMap=y(t.specularMap)),t.specularIntensityMap!==void 0&&(T.specularIntensityMap=y(t.specularIntensityMap)),t.specularColorMap!==void 0&&(T.specularColorMap=y(t.specularColorMap)),t.envMap!==void 0&&(T.envMap=y(t.envMap)),t.envMapIntensity!==void 0&&(T.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(T.reflectivity=t.reflectivity),t.refractionRatio!==void 0&&(T.refractionRatio=t.refractionRatio),t.lightMap!==void 0&&(T.lightMap=y(t.lightMap)),t.lightMapIntensity!==void 0&&(T.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(T.aoMap=y(t.aoMap)),t.aoMapIntensity!==void 0&&(T.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(T.gradientMap=y(t.gradientMap)),t.clearcoatMap!==void 0&&(T.clearcoatMap=y(t.clearcoatMap)),t.clearcoatRoughnessMap!==void 0&&(T.clearcoatRoughnessMap=y(t.clearcoatRoughnessMap)),t.clearcoatNormalMap!==void 0&&(T.clearcoatNormalMap=y(t.clearcoatNormalMap)),t.clearcoatNormalScale!==void 0&&(T.clearcoatNormalScale=new ve().fromArray(t.clearcoatNormalScale)),t.iridescenceMap!==void 0&&(T.iridescenceMap=y(t.iridescenceMap)),t.iridescenceThicknessMap!==void 0&&(T.iridescenceThicknessMap=y(t.iridescenceThicknessMap)),t.transmissionMap!==void 0&&(T.transmissionMap=y(t.transmissionMap)),t.thicknessMap!==void 0&&(T.thicknessMap=y(t.thicknessMap)),t.anisotropyMap!==void 0&&(T.anisotropyMap=y(t.anisotropyMap)),t.sheenColorMap!==void 0&&(T.sheenColorMap=y(t.sheenColorMap)),t.sheenRoughnessMap!==void 0&&(T.sheenRoughnessMap=y(t.sheenRoughnessMap)),T}setTextures(t){return this.textures=t,this}static createMaterialFromType(t){const i={ShadowMaterial:q2,SpriteMaterial:F1,RawShaderMaterial:tA,ShaderMaterial:so,PointsMaterial:D1,MeshPhysicalMaterial:eA,MeshStandardMaterial:yl,MeshPhongMaterial:iA,MeshToonMaterial:nA,MeshNormalMaterial:rA,MeshLambertMaterial:sA,MeshDepthMaterial:R1,MeshDistanceMaterial:b1,MeshBasicMaterial:Eh,MeshMatcapMaterial:aA,LineDashedMaterial:oA,LineBasicMaterial:xs,Material:Wr};return new i[t]}}class Fx{static decodeText(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);let i="";for(let y=0,T=t.length;y0){const e=new X1(i);E=new jd(e),E.setCrossOrigin(this.crossOrigin);for(let r=0,d=t.length;r0){T=new jd(this.manager),T.setCrossOrigin(this.crossOrigin);for(let s=0,x=t.length;s{const f=new ys;f.min.fromArray(u.boxMin),f.max.fromArray(u.boxMax);const o=new Qr;return o.radius=u.sphereRadius,o.center.fromArray(u.sphereCenter),{boxInitialized:u.boxInitialized,box:f,sphereInitialized:u.sphereInitialized,sphere:o}}),s._maxGeometryCount=t.maxGeometryCount,s._maxVertexCount=t.maxVertexCount,s._maxIndexCount=t.maxIndexCount,s._geometryInitialized=t.geometryInitialized,s._geometryCount=t.geometryCount,s._matricesTexture=r(t.matricesTexture.uuid);break;case"LOD":s=new U2;break;case"Line":s=new xh(x(t.geometry),e(t.material));break;case"LineLoop":s=new H2(x(t.geometry),e(t.material));break;case"LineSegments":s=new Xo(x(t.geometry),e(t.material));break;case"PointCloud":case"Points":s=new W2(x(t.geometry),e(t.material));break;case"Sprite":s=new B2(e(t.material));break;case"Group":s=new Xf;break;case"Bone":s=new O1;break;default:s=new ki}if(s.uuid=t.uuid,t.name!==void 0&&(s.name=t.name),t.matrix!==void 0?(s.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(s.matrixAutoUpdate=t.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(t.position!==void 0&&s.position.fromArray(t.position),t.rotation!==void 0&&s.rotation.fromArray(t.rotation),t.quaternion!==void 0&&s.quaternion.fromArray(t.quaternion),t.scale!==void 0&&s.scale.fromArray(t.scale)),t.up!==void 0&&s.up.fromArray(t.up),t.castShadow!==void 0&&(s.castShadow=t.castShadow),t.receiveShadow!==void 0&&(s.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(s.shadow.bias=t.shadow.bias),t.shadow.normalBias!==void 0&&(s.shadow.normalBias=t.shadow.normalBias),t.shadow.radius!==void 0&&(s.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&s.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(s.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(s.visible=t.visible),t.frustumCulled!==void 0&&(s.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(s.renderOrder=t.renderOrder),t.userData!==void 0&&(s.userData=t.userData),t.layers!==void 0&&(s.layers.mask=t.layers),t.children!==void 0){const a=t.children;for(let l=0;l"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(t){return this.options=t,this}load(t,i,y,T){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const E=this,s=Ml.get(t);if(s!==void 0){if(E.manager.itemStart(t),s.then){s.then(r=>{i&&i(r),E.manager.itemEnd(t)}).catch(r=>{T&&T(r)});return}return setTimeout(function(){i&&i(s),E.manager.itemEnd(t)},0),s}const x={};x.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",x.headers=this.requestHeader;const e=fetch(t,x).then(function(r){return r.blob()}).then(function(r){return createImageBitmap(r,Object.assign(E.options,{colorSpaceConversion:"none"}))}).then(function(r){return Ml.add(t,r),i&&i(r),E.manager.itemEnd(t),r}).catch(function(r){T&&T(r),Ml.remove(t),E.manager.itemError(t),E.manager.itemEnd(t)});Ml.add(t,e),E.manager.itemStart(t)}}let Yv,k1=class{static getContext(){return Yv===void 0&&(Yv=new(window.AudioContext||window.webkitAudioContext)),Yv}static setContext(t){Yv=t}};class sz extends Bs{constructor(t){super(t)}load(t,i,y,T){const E=this,s=new Rl(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(e){try{const r=e.slice(0);k1.getContext().decodeAudioData(r,function(h){i(h)}).catch(x)}catch(r){x(r)}},y,T);function x(e){T?T(e):console.error(e),E.manager.itemError(t)}}}const ZE=new di,JE=new di,nu=new di;class az{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Dr,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Dr,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(t){const i=this._cache;if(i.focus!==t.focus||i.fov!==t.fov||i.aspect!==t.aspect*this.aspect||i.near!==t.near||i.far!==t.far||i.zoom!==t.zoom||i.eyeSep!==this.eyeSep){i.focus=t.focus,i.fov=t.fov,i.aspect=t.aspect*this.aspect,i.near=t.near,i.far=t.far,i.zoom=t.zoom,i.eyeSep=this.eyeSep,nu.copy(t.projectionMatrix);const T=i.eyeSep/2,E=T*i.near/i.focus,s=i.near*Math.tan(Eu*i.fov*.5)/i.zoom;let x,e;JE.elements[12]=-T,ZE.elements[12]=T,x=-s*i.aspect+E,e=s*i.aspect+E,nu.elements[0]=2*i.near/(e-x),nu.elements[8]=(e+x)/(e-x),this.cameraL.projectionMatrix.copy(nu),x=-s*i.aspect-E,e=s*i.aspect-E,nu.elements[0]=2*i.near/(e-x),nu.elements[8]=(e+x)/(e-x),this.cameraR.projectionMatrix.copy(nu)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(JE),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ZE)}}class j1{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=QE(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const i=QE();t=(i-this.oldTime)/1e3,this.oldTime=i,this.elapsedTime+=t}return t}}function QE(){return(typeof performance>"u"?Date:performance).now()}const ru=new Ct,_E=new Is,oz=new Ct,su=new Ct;class lz extends ki{constructor(){super(),this.type="AudioListener",this.context=k1.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new j1}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);const i=this.context.listener,y=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(ru,_E,oz),su.set(0,0,-1).applyQuaternion(_E),i.positionX){const T=this.context.currentTime+this.timeDelta;i.positionX.linearRampToValueAtTime(ru.x,T),i.positionY.linearRampToValueAtTime(ru.y,T),i.positionZ.linearRampToValueAtTime(ru.z,T),i.forwardX.linearRampToValueAtTime(su.x,T),i.forwardY.linearRampToValueAtTime(su.y,T),i.forwardZ.linearRampToValueAtTime(su.z,T),i.upX.linearRampToValueAtTime(y.x,T),i.upY.linearRampToValueAtTime(y.y,T),i.upZ.linearRampToValueAtTime(y.z,T)}else i.setPosition(ru.x,ru.y,ru.z),i.setOrientation(su.x,su.y,su.z,y.x,y.y,y.z)}}let wA=class extends ki{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+t;const i=this.context.createBufferSource();return i.buffer=this.buffer,i.loop=this.loop,i.loopStart=this.loopStart,i.loopEnd=this.loopEnd,i.onended=this.onEnded.bind(this),i.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=i,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,i=this.filters.length;t0){this.source.disconnect(this.filters[0]);for(let t=1,i=this.filters.length;t0&&this._mixBufferRegionAdditive(y,T,this._addIndex*i,1,i);for(let e=i,r=i+i;e!==r;++e)if(y[e]!==y[e+i]){x.setValue(y,T);break}}saveOriginalState(){const t=this.binding,i=this.buffer,y=this.valueSize,T=y*this._origIndex;t.getValue(i,T);for(let E=y,s=T;E!==s;++E)i[E]=i[T+E%y];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=this.valueSize*3;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,i=t+this.valueSize;for(let y=t;y=.5)for(let s=0;s!==E;++s)t[i+s]=t[y+s]}_slerp(t,i,y,T){Is.slerpFlat(t,i,t,i,t,y,T)}_slerpAdditive(t,i,y,T,E){const s=this._workIndex*E;Is.multiplyQuaternionsFlat(t,s,t,i,t,y),Is.slerpFlat(t,i,t,i,t,s,T)}_lerp(t,i,y,T,E){const s=1-T;for(let x=0;x!==E;++x){const e=i+x;t[e]=t[e]*s+t[y+x]*T}}_lerpAdditive(t,i,y,T,E){for(let s=0;s!==E;++s){const x=i+s;t[x]=t[x]+t[y+s]*T}}}const K1="\\[\\]\\.:\\/",cz=new RegExp("["+K1+"]","g"),$1="[^"+K1+"]",dz="[^"+K1.replace("\\.","")+"]",pz=/((?:WC+[\/:])*)/.source.replace("WC",$1),vz=/(WCOD+)?/.source.replace("WCOD",dz),mz=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",$1),gz=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",$1),yz=new RegExp("^"+pz+vz+mz+gz+"$"),xz=["material","materials","bones","map"];class Sz{constructor(t,i,y){const T=y||Yi.parseTrackName(i);this._targetGroup=t,this._bindings=t.subscribe_(i,T)}getValue(t,i){this.bind();const y=this._targetGroup.nCachedObjects_,T=this._bindings[y];T!==void 0&&T.getValue(t,i)}setValue(t,i){const y=this._bindings;for(let T=this._targetGroup.nCachedObjects_,E=y.length;T!==E;++T)y[T].setValue(t,i)}bind(){const t=this._bindings;for(let i=this._targetGroup.nCachedObjects_,y=t.length;i!==y;++i)t[i].bind()}unbind(){const t=this._bindings;for(let i=this._targetGroup.nCachedObjects_,y=t.length;i!==y;++i)t[i].unbind()}}class Yi{constructor(t,i,y){this.path=i,this.parsedPath=y||Yi.parseTrackName(i),this.node=Yi.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,i,y){return t&&t.isAnimationObjectGroup?new Yi.Composite(t,i,y):new Yi(t,i,y)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(cz,"")}static parseTrackName(t){const i=yz.exec(t);if(i===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const y={nodeName:i[2],objectName:i[3],objectIndex:i[4],propertyName:i[5],propertyIndex:i[6]},T=y.nodeName&&y.nodeName.lastIndexOf(".");if(T!==void 0&&T!==-1){const E=y.nodeName.substring(T+1);xz.indexOf(E)!==-1&&(y.nodeName=y.nodeName.substring(0,T),y.objectName=E)}if(y.propertyName===null||y.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return y}static findNode(t,i){if(i===void 0||i===""||i==="."||i===-1||i===t.name||i===t.uuid)return t;if(t.skeleton){const y=t.skeleton.getBoneByName(i);if(y!==void 0)return y}if(t.children){const y=function(E){for(let s=0;s=E){const h=E++,a=t[h];i[a.uuid]=d,t[d]=a,i[r]=h,t[h]=e;for(let l=0,n=T;l!==n;++l){const u=y[l],f=u[h],o=u[d];u[d]=f,u[h]=o}}}this.nCachedObjects_=E}uncache(){const t=this._objects,i=this._indicesByUUID,y=this._bindings,T=y.length;let E=this.nCachedObjects_,s=t.length;for(let x=0,e=arguments.length;x!==e;++x){const r=arguments[x],d=r.uuid,h=i[d];if(h!==void 0)if(delete i[d],h0&&(i[l.uuid]=h),t[h]=l,t.pop();for(let n=0,u=T;n!==u;++n){const f=y[n];f[h]=f[a],f.pop()}}}this.nCachedObjects_=E}subscribe_(t,i){const y=this._bindingsIndicesByPath;let T=y[t];const E=this._bindings;if(T!==void 0)return E[T];const s=this._paths,x=this._parsedPaths,e=this._objects,r=e.length,d=this.nCachedObjects_,h=new Array(r);T=E.length,y[t]=T,s.push(t),x.push(i),E.push(h);for(let a=d,l=e.length;a!==l;++a){const n=e[a];h[a]=new Yi(n,t,i)}return h}unsubscribe_(t){const i=this._bindingsIndicesByPath,y=i[t];if(y!==void 0){const T=this._paths,E=this._parsedPaths,s=this._bindings,x=s.length-1,e=s[x],r=t[x];i[r]=y,s[y]=e,s.pop(),E[y]=E[x],E.pop(),T[y]=T[x],T.pop()}}}class PA{constructor(t,i,y=null,T=i.blendMode){this._mixer=t,this._clip=i,this._localRoot=y,this.blendMode=T;const E=i.tracks,s=E.length,x=new Array(s),e={endingStart:mu,endingEnd:mu};for(let r=0;r!==s;++r){const d=E[r].createInterpolant(null);x[r]=d,d.settings=e}this._interpolantSettings=e,this._interpolants=x,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=a2,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,i){return this.loop=t,this.repetitions=i,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,i,y){if(t.fadeOut(i),this.fadeIn(i),y){const T=this._clip.duration,E=t._clip.duration,s=E/T,x=T/E;t.warp(1,s,i),this.warp(x,1,i)}return this}crossFadeTo(t,i,y){return t.crossFadeFrom(this,i,y)}stopFading(){const t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,i,y){const T=this._mixer,E=T.time,s=this.timeScale;let x=this._timeScaleInterpolant;x===null&&(x=T._lendControlInterpolant(),this._timeScaleInterpolant=x);const e=x.parameterPositions,r=x.sampleValues;return e[0]=E,e[1]=E+y,r[0]=t/s,r[1]=i/s,this}stopWarping(){const t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,i,y,T){if(!this.enabled){this._updateWeight(t);return}const E=this._startTime;if(E!==null){const e=(t-E)*y;e<0||y===0?i=0:(this._startTime=null,i=y*e)}i*=this._updateTimeScale(t);const s=this._updateTime(i),x=this._updateWeight(t);if(x>0){const e=this._interpolants,r=this._propertyBindings;switch(this.blendMode){case y1:for(let d=0,h=e.length;d!==h;++d)e[d].evaluate(s),r[d].accumulateAdditive(x);break;case vg:default:for(let d=0,h=e.length;d!==h;++d)e[d].evaluate(s),r[d].accumulate(T,x)}}}_updateWeight(t){let i=0;if(this.enabled){i=this.weight;const y=this._weightInterpolant;if(y!==null){const T=y.evaluate(t)[0];i*=T,t>y.parameterPositions[1]&&(this.stopFading(),T===0&&(this.enabled=!1))}}return this._effectiveWeight=i,i}_updateTimeScale(t){let i=0;if(!this.paused){i=this.timeScale;const y=this._timeScaleInterpolant;if(y!==null){const T=y.evaluate(t)[0];i*=T,t>y.parameterPositions[1]&&(this.stopWarping(),i===0?this.paused=!0:this.timeScale=i)}}return this._effectiveTimeScale=i,i}_updateTime(t){const i=this._clip.duration,y=this.loop;let T=this.time+t,E=this._loopCount;const s=y===o2;if(t===0)return E===-1?T:s&&(E&1)===1?i-T:T;if(y===s2){E===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(T>=i)T=i;else if(T<0)T=0;else{this.time=T;break t}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=T,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(E===-1&&(t>=0?(E=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),T>=i||T<0){const x=Math.floor(T/i);T-=i*x,E+=Math.abs(x);const e=this.repetitions-E;if(e<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,T=t>0?i:0,this.time=T,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(e===1){const r=t<0;this._setEndings(r,!r,s)}else this._setEndings(!1,!1,s);this._loopCount=E,this.time=T,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:x})}}else this.time=T;if(s&&(E&1)===1)return i-T}return T}_setEndings(t,i,y){const T=this._interpolantSettings;y?(T.endingStart=gu,T.endingEnd=gu):(t?T.endingStart=this.zeroSlopeAtStart?gu:mu:T.endingStart=Od,i?T.endingEnd=this.zeroSlopeAtEnd?gu:mu:T.endingEnd=Od)}_scheduleFading(t,i,y){const T=this._mixer,E=T.time;let s=this._weightInterpolant;s===null&&(s=T._lendControlInterpolant(),this._weightInterpolant=s);const x=s.parameterPositions,e=s.sampleValues;return x[0]=E,e[0]=i,x[1]=E+t,e[1]=y,this}}const Ez=new Float32Array(1);class Mz extends bl{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,i){const y=t._localRoot||this._root,T=t._clip.tracks,E=T.length,s=t._propertyBindings,x=t._interpolants,e=y.uuid,r=this._bindingsByRootAndName;let d=r[e];d===void 0&&(d={},r[e]=d);for(let h=0;h!==E;++h){const a=T[h],l=a.name;let n=d[l];if(n!==void 0)++n.referenceCount,s[h]=n;else{if(n=s[h],n!==void 0){n._cacheIndex===null&&(++n.referenceCount,this._addInactiveBinding(n,e,l));continue}const u=i&&i._propertyBindings[h].binding.parsedPath;n=new AA(Yi.create(y,l,u),a.ValueTypeName,a.getValueSize()),++n.referenceCount,this._addInactiveBinding(n,e,l),s[h]=n}x[h].resultBuffer=n.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){const y=(t._localRoot||this._root).uuid,T=t._clip.uuid,E=this._actionsByClip[T];this._bindAction(t,E&&E.knownActions[0]),this._addInactiveAction(t,T,y)}const i=t._propertyBindings;for(let y=0,T=i.length;y!==T;++y){const E=i[y];E.useCount++===0&&(this._lendBinding(E),E.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const i=t._propertyBindings;for(let y=0,T=i.length;y!==T;++y){const E=i[y];--E.useCount===0&&(E.restoreOriginalState(),this._takeBackBinding(E))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const i=t._cacheIndex;return i!==null&&i=0;--y)t[y].stop();return this}update(t){t*=this.timeScale;const i=this._actions,y=this._nActiveActions,T=this.time+=t,E=Math.sign(t),s=this._accuIndex^=1;for(let r=0;r!==y;++r)i[r]._update(T,t,E,s);const x=this._bindings,e=this._nActiveBindings;for(let r=0;r!==e;++r)x[r].apply(s);return this}setTime(t){this.time=0;for(let i=0;ithis.max.x||t.ythis.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,i){return i.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)}clampPoint(t,i){return i.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,eM).distanceTo(t)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const iM=new Ct,kv=new Ct;class Fz{constructor(t=new Ct,i=new Ct){this.start=t,this.end=i}set(t,i){return this.start.copy(t),this.end.copy(i),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,i){return this.delta(i).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,i){iM.subVectors(t,this.start),kv.subVectors(this.end,this.start);const y=kv.dot(kv);let E=kv.dot(iM)/y;return i&&(E=$n(E,0,1)),E}closestPointToPoint(t,i,y){const T=this.closestPointToPointParameter(t,i);return this.delta(y).multiplyScalar(T).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const nM=new Ct;class Oz extends ki{constructor(t,i){super(),this.light=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="SpotLightHelper";const y=new Fi,T=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let s=0,x=1,e=32;s1)for(let h=0;h.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{lM.set(t.z,0,-t.x).normalize();const i=Math.acos(t.y);this.quaternion.setFromAxisAngle(lM,i)}}setLength(t,i=t*.2,y=i*.2){this.line.scale.set(1,Math.max(1e-4,t-i),1),this.line.updateMatrix(),this.cone.scale.set(y,i,y),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class kz extends Xo{constructor(t=1){const i=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],y=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],T=new Fi;T.setAttribute("position",new je(i,3)),T.setAttribute("color",new je(y,3));const E=new xs({vertexColors:!0,toneMapped:!1});super(T,E),this.type="AxesHelper"}setColors(t,i,y){const T=new Ge,E=this.geometry.attributes.color.array;return T.set(t),T.toArray(E,0),T.toArray(E,3),T.set(i),T.toArray(E,6),T.toArray(E,9),T.set(y),T.toArray(E,12),T.toArray(E,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class jz{constructor(){this.type="ShapePath",this.color=new Ge,this.subPaths=[],this.currentPath=null}moveTo(t,i){return this.currentPath=new Gd,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,i),this}lineTo(t,i){return this.currentPath.lineTo(t,i),this}quadraticCurveTo(t,i,y,T){return this.currentPath.quadraticCurveTo(t,i,y,T),this}bezierCurveTo(t,i,y,T,E,s){return this.currentPath.bezierCurveTo(t,i,y,T,E,s),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t){function i(o){const c=[];for(let p=0,v=o.length;pNumber.EPSILON){if(A<0&&(M=c[S],C=-C,w=c[m],A=-A),o.yw.y)continue;if(o.y===M.y){if(o.x===M.x)return!0}else{const P=A*(o.x-M.x)-C*(o.y-M.y);if(P===0)return!0;if(P<0)continue;v=!v}}else{if(o.y!==M.y)continue;if(w.x<=o.x&&o.x<=M.x||M.x<=o.x&&o.x<=w.x)return!0}}return v}const T=Vo.isClockWise,E=this.subPaths;if(E.length===0)return[];let s,x,e;const r=[];if(E.length===1)return x=E[0],e=new Au,e.curves=x.curves,r.push(e),r;let d=!T(E[0].getPoints());d=t?!d:d;const h=[],a=[];let l=[],n=0,u;a[n]=void 0,l[n]=[];for(let o=0,c=E.length;o1){let o=!1,c=0;for(let p=0,v=a.length;p0&&o===!1&&(l=h)}let f;for(let o=0,c=a.length;o{const h=typeof r=="function"?r(t):r;if(h!==t){const a=t;t=d?h:Object.assign({},t,h),i.forEach(l=>l(t,a))}},T=()=>t,E=(r,d=T,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let a=d(t);function l(){const n=d(t);if(!h(a,n)){const u=a;r(a=n,u)}}return i.add(l),()=>i.delete(l)},e={setState:x,getState:T,subscribe:(r,d,h)=>d||h?E(r,d,h):(i.add(r),()=>i.delete(r)),destroy:()=>i.clear()};return t=g(x,T,e),e}const Qz=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),oM=Qz?Me.useEffect:Me.useLayoutEffect;function _z(g){const t=typeof g=="function"?Jz(g):g,i=(x=t.getState,T=Object.is)=>{const[,E]=Me.useReducer(f=>f+1,0),s=t.getState(),y=Me.useRef(s),e=Me.useRef(x),r=Me.useRef(T),d=Me.useRef(!1),h=Me.useRef();h.current===void 0&&(h.current=x(s));let a,l=!1;(y.current!==s||e.current!==x||r.current!==T||d.current)&&(a=x(s),l=!T(h.current,a)),oM(()=>{l&&(h.current=a),y.current=s,e.current=x,r.current=T,d.current=!1});const n=Me.useRef(s);oM(()=>{const f=()=>{try{const c=t.getState(),p=e.current(c);r.current(h.current,p)||(y.current=c,h.current=p,E())}catch{d.current=!0,E()}},o=t.subscribe(f);return t.getState()!==n.current&&f(),o},[]);const u=l?a:h.current;return Me.useDebugValue(u),u};return Object.assign(i,t),i[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const x=[i,t];return{next(){const T=x.length<=0;return{value:x.shift(),done:T}}}},i}var bA={exports:{}},hy={exports:{}},uy={};/** + */Gu.ConcurrentRoot=1;Gu.ContinuousEventPriority=4;Gu.DefaultEventPriority=16;Gu.DiscreteEventPriority=1;Gu.IdleEventPriority=536870912;Gu.LegacyRoot=0;LA.exports=Gu;var kf=LA.exports;function $z(g){let t;const i=new Set,y=(r,d)=>{const h=typeof r=="function"?r(t):r;if(h!==t){const a=t;t=d?h:Object.assign({},t,h),i.forEach(l=>l(t,a))}},T=()=>t,E=(r,d=T,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let a=d(t);function l(){const n=d(t);if(!h(a,n)){const u=a;r(a=n,u)}}return i.add(l),()=>i.delete(l)},e={setState:y,getState:T,subscribe:(r,d,h)=>d||h?E(r,d,h):(i.add(r),()=>i.delete(r)),destroy:()=>i.clear()};return t=g(y,T,e),e}const Zz=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),hM=Zz?Me.useEffect:Me.useLayoutEffect;function Jz(g){const t=typeof g=="function"?$z(g):g,i=(y=t.getState,T=Object.is)=>{const[,E]=Me.useReducer(f=>f+1,0),s=t.getState(),x=Me.useRef(s),e=Me.useRef(y),r=Me.useRef(T),d=Me.useRef(!1),h=Me.useRef();h.current===void 0&&(h.current=y(s));let a,l=!1;(x.current!==s||e.current!==y||r.current!==T||d.current)&&(a=y(s),l=!T(h.current,a)),hM(()=>{l&&(h.current=a),x.current=s,e.current=y,r.current=T,d.current=!1});const n=Me.useRef(s);hM(()=>{const f=()=>{try{const c=t.getState(),p=e.current(c);r.current(h.current,p)||(x.current=c,h.current=p,E())}catch{d.current=!0,E()}},o=t.subscribe(f);return t.getState()!==n.current&&f(),o},[]);const u=l?a:h.current;return Me.useDebugValue(u),u};return Object.assign(i,t),i[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const y=[i,t];return{next(){const T=y.length<=0;return{value:y.shift(),done:T}}}},i}var FA={exports:{}},fy={exports:{}},cy={};/** * @license React * scheduler.production.min.js * @@ -10181,7 +10183,7 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var lM;function qz(){return lM||(lM=1,function(g){function t(z,X){var j=z.length;z.push(X);t:for(;0>>1,tt=z[Q];if(0>>1;QT(U,j))HT($,U)?(z[Q]=$,z[H]=j,Q=H):(z[Q]=U,z[Z]=j,Q=Z);else if(HT($,j))z[Q]=$,z[H]=j,Q=H;else break t}}return X}function T(z,X){var j=z.sortIndex-X.sortIndex;return j!==0?j:z.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var E=performance;g.unstable_now=function(){return E.now()}}else{var s=Date,y=s.now();g.unstable_now=function(){return s.now()-y}}var e=[],r=[],d=1,h=null,a=3,l=!1,n=!1,u=!1,f=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(z){for(var X=i(r);X!==null;){if(X.callback===null)x(r);else if(X.startTime<=z)x(r),X.sortIndex=X.expirationTime,t(e,X);else break;X=i(r)}}function v(z){if(u=!1,p(z),!n)if(i(e)!==null)n=!0,B(m);else{var X=i(r);X!==null&&G(v,X.startTime-z)}}function m(z,X){n=!1,u&&(u=!1,o(w),w=-1),l=!0;var j=a;try{for(p(X),h=i(e);h!==null&&(!(h.expirationTime>X)||z&&!P());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,a=h.priorityLevel;var tt=Q(h.expirationTime<=X);X=g.unstable_now(),typeof tt=="function"?h.callback=tt:h===i(e)&&x(e),p(X)}else x(e);h=i(e)}if(h!==null)var Y=!0;else{var Z=i(r);Z!==null&&G(v,Z.startTime-X),Y=!1}return Y}finally{h=null,a=j,l=!1}}var S=!1,M=null,w=-1,C=5,A=-1;function P(){return!(g.unstable_now()-Az||125Q?(z.sortIndex=j,t(r,z),i(e)===null&&z===i(r)&&(u?(o(w),w=-1):u=!0,G(v,j-Q))):(z.sortIndex=tt,t(e,z),n||l||(n=!0,B(m))),z},g.unstable_shouldYield=P,g.unstable_wrapCallback=function(z){var X=a;return function(){var j=a;a=X;try{return z.apply(this,arguments)}finally{a=j}}}}(uy)),uy}var hM;function t7(){return hM||(hM=1,hy.exports=qz()),hy.exports}/** + */var uM;function Qz(){return uM||(uM=1,function(g){function t(z,X){var j=z.length;z.push(X);t:for(;0>>1,tt=z[Q];if(0>>1;QT(U,j))HT(Z,U)?(z[Q]=Z,z[H]=j,Q=H):(z[Q]=U,z[$]=j,Q=$);else if(HT(Z,j))z[Q]=Z,z[H]=j,Q=H;else break t}}return X}function T(z,X){var j=z.sortIndex-X.sortIndex;return j!==0?j:z.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var E=performance;g.unstable_now=function(){return E.now()}}else{var s=Date,x=s.now();g.unstable_now=function(){return s.now()-x}}var e=[],r=[],d=1,h=null,a=3,l=!1,n=!1,u=!1,f=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(z){for(var X=i(r);X!==null;){if(X.callback===null)y(r);else if(X.startTime<=z)y(r),X.sortIndex=X.expirationTime,t(e,X);else break;X=i(r)}}function v(z){if(u=!1,p(z),!n)if(i(e)!==null)n=!0,B(m);else{var X=i(r);X!==null&&G(v,X.startTime-z)}}function m(z,X){n=!1,u&&(u=!1,o(w),w=-1),l=!0;var j=a;try{for(p(X),h=i(e);h!==null&&(!(h.expirationTime>X)||z&&!P());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,a=h.priorityLevel;var tt=Q(h.expirationTime<=X);X=g.unstable_now(),typeof tt=="function"?h.callback=tt:h===i(e)&&y(e),p(X)}else y(e);h=i(e)}if(h!==null)var Y=!0;else{var $=i(r);$!==null&&G(v,$.startTime-X),Y=!1}return Y}finally{h=null,a=j,l=!1}}var S=!1,M=null,w=-1,C=5,A=-1;function P(){return!(g.unstable_now()-Az||125Q?(z.sortIndex=j,t(r,z),i(e)===null&&z===i(r)&&(u?(o(w),w=-1):u=!0,G(v,j-Q))):(z.sortIndex=tt,t(e,z),n||l||(n=!0,B(m))),z},g.unstable_shouldYield=P,g.unstable_wrapCallback=function(z){var X=a;return function(){var j=a;a=X;try{return z.apply(this,arguments)}finally{a=j}}}}(cy)),cy}var fM;function _z(){return fM||(fM=1,fy.exports=Qz()),fy.exports}/** * @license React * react-reconciler.production.min.js * @@ -10189,17 +10191,17 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var e7=function(t){var i={},x=Me,T=t7(),E=Object.assign;function s(L){for(var F="https://reactjs.org/docs/error-decoder.html?invariant="+L,W=1;WXt||it[wt]!==lt[Xt]){var oe=` -`+it[wt].replace(" at new "," at ");return L.displayName&&oe.includes("")&&(oe=oe.replace("",L.displayName)),oe}while(1<=wt&&0<=Xt);break}}}finally{ni=!1,Error.prepareStackTrace=W}return(L=L?L.displayName||L.name:"")?ti(L):""}var Ji=Object.prototype.hasOwnProperty,un=[],ji=-1;function yn(L){return{current:L}}function ei(L){0>ji||(L.current=un[ji],un[ji]=null,ji--)}function Se(L,F){ji++,un[ji]=L.current,L.current=F}var Br={},gi=yn(Br),fn=yn(!1),Ni=Br;function Vn(L,F){var W=L.type.contextTypes;if(!W)return Br;var J=L.stateNode;if(J&&J.__reactInternalMemoizedUnmaskedChildContext===F)return J.__reactInternalMemoizedMaskedChildContext;var it={},lt;for(lt in W)it[lt]=F[lt];return J&&(L=L.stateNode,L.__reactInternalMemoizedUnmaskedChildContext=F,L.__reactInternalMemoizedMaskedChildContext=it),it}function vn(L){return L=L.childContextTypes,L!=null}function Ki(){ei(fn),ei(gi)}function pr(L,F,W){if(gi.current!==Br)throw Error(s(168));Se(gi,F),Se(fn,W)}function Gs(L,F,W){var J=L.stateNode;if(F=F.childContextTypes,typeof J.getChildContext!="function")return W;J=J.getChildContext();for(var it in J)if(!(it in F))throw Error(s(108,w(L)||"Unknown",it));return E({},W,J)}function En(L){return L=(L=L.stateNode)&&L.__reactInternalMemoizedMergedChildContext||Br,Ni=gi.current,Se(gi,L),Se(fn,fn.current),!0}function la(L,F,W){var J=L.stateNode;if(!J)throw Error(s(169));W?(L=Gs(L,F,Ni),J.__reactInternalMemoizedMergedChildContext=L,ei(fn),ei(gi),Se(gi,L)):ei(fn),Se(fn,W)}var Jn=Math.clz32?Math.clz32:uo,La=Math.log,Vs=Math.LN2;function uo(L){return L>>>=0,L===0?32:31-(La(L)/Vs|0)|0}var Fa=64,fo=4194304;function yi(L){switch(L&-L){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return L&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return L&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return L}}function Oa(L,F){var W=L.pendingLanes;if(W===0)return 0;var J=0,it=L.suspendedLanes,lt=L.pingedLanes,wt=W&268435455;if(wt!==0){var Xt=wt&~it;Xt!==0?J=yi(Xt):(lt&=wt,lt!==0&&(J=yi(lt)))}else wt=W&~it,wt!==0?J=yi(wt):lt!==0&&(J=yi(lt));if(J===0)return 0;if(F!==0&&F!==J&&!(F&it)&&(it=J&-J,lt=F&-F,it>=lt||it===16&&(lt&4194240)!==0))return F;if(J&4&&(J|=W&16),F=L.entangledLanes,F!==0)for(L=L.entanglements,F&=J;0W;W++)F.push(L);return F}function Ws(L,F,W){L.pendingLanes|=F,F!==536870912&&(L.suspendedLanes=0,L.pingedLanes=0),L=L.eventTimes,F=31-Jn(F),L[F]=W}function Xs(L,F){var W=L.pendingLanes&~F;L.pendingLanes=F,L.suspendedLanes=0,L.pingedLanes=0,L.expiredLanes&=F,L.mutableReadLanes&=F,L.entangledLanes&=F,F=L.entanglements;var J=L.eventTimes;for(L=L.expirationTimes;0>=wt,it-=wt,Ms=1<<32-Jn(F)+it|W<Ai?(kn=xi,xi=null):kn=xi.sibling;var zi=Qe(Jt,xi,se[Ai],Ne);if(zi===null){xi===null&&(xi=kn);break}L&&xi&&zi.alternate===null&&F(Jt,xi),kt=lt(zi,kt,Ai),wi===null?Ye=zi:wi.sibling=zi,wi=zi,xi=kn}if(Ai===se.length)return W(Jt,xi),qi&&Cs(Jt,Ai),Ye;if(xi===null){for(;AiAi?(kn=xi,xi=null):kn=xi.sibling;var ya=Qe(Jt,xi,zi.value,Ne);if(ya===null){xi===null&&(xi=kn);break}L&&xi&&ya.alternate===null&&F(Jt,xi),kt=lt(ya,kt,Ai),wi===null?Ye=ya:wi.sibling=ya,wi=ya,xi=kn}if(zi.done)return W(Jt,xi),qi&&Cs(Jt,Ai),Ye;if(xi===null){for(;!zi.done;Ai++,zi=se.next())zi=mi(Jt,zi.value,Ne),zi!==null&&(kt=lt(zi,kt,Ai),wi===null?Ye=zi:wi.sibling=zi,wi=zi);return qi&&Cs(Jt,Ai),Ye}for(xi=J(Jt,xi);!zi.done;Ai++,zi=se.next())zi=tn(xi,Jt,Ai,zi.value,Ne),zi!==null&&(L&&zi.alternate!==null&&xi.delete(zi.key===null?Ai:zi.key),kt=lt(zi,kt,Ai),wi===null?Ye=zi:wi.sibling=zi,wi=zi);return L&&xi.forEach(function(lf){return F(Jt,lf)}),qi&&Cs(Jt,Ai),Ye}function us(Jt,kt,se,Ne){if(typeof se=="object"&&se!==null&&se.type===d&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case e:t:{for(var Ye=se.key,wi=kt;wi!==null;){if(wi.key===Ye){if(Ye=se.type,Ye===d){if(wi.tag===7){W(Jt,wi.sibling),kt=it(wi,se.props.children),kt.return=Jt,Jt=kt;break t}}else if(wi.elementType===Ye||typeof Ye=="object"&&Ye!==null&&Ye.$$typeof===p&&Xa(Ye)===wi.type){W(Jt,wi.sibling),kt=it(wi,se.props),kt.ref=Wa(Jt,wi,se),kt.return=Jt,Jt=kt;break t}W(Jt,wi);break}else F(Jt,wi);wi=wi.sibling}se.type===d?(kt=Fo(se.props.children,Jt.mode,Ne,se.key),kt.return=Jt,Jt=kt):(Ne=af(se.type,se.key,se.props,null,Jt.mode,Ne),Ne.ref=Wa(Jt,kt,se),Ne.return=Jt,Jt=Ne)}return wt(Jt);case r:t:{for(wi=se.key;kt!==null;){if(kt.key===wi)if(kt.tag===4&&kt.stateNode.containerInfo===se.containerInfo&&kt.stateNode.implementation===se.implementation){W(Jt,kt.sibling),kt=it(kt,se.children||[]),kt.return=Jt,Jt=kt;break t}else{W(Jt,kt);break}else F(Jt,kt);kt=kt.sibling}kt=bs(se,Jt.mode,Ne),kt.return=Jt,Jt=kt}return wt(Jt);case p:return wi=se._init,us(Jt,kt,wi(se._payload),Ne)}if(D(se))return Xe(Jt,kt,se,Ne);if(S(se))return Lr(Jt,kt,se,Ne);_n(Jt,se)}return typeof se=="string"&&se!==""||typeof se=="number"?(se=""+se,kt!==null&&kt.tag===6?(W(Jt,kt.sibling),kt=it(kt,se),kt.return=Jt,Jt=kt):(W(Jt,kt),kt=br(se,Jt.mode,Ne),kt.return=Jt,Jt=kt),wt(Jt)):W(Jt,kt)}return us}var Vr=Ya(!0),Lh=Ya(!1),V={},K=yn(V),et=yn(V),st=yn(V);function ht(L){if(L===V)throw Error(s(174));return L}function pt(L,F){Se(st,F),Se(et,L),Se(K,V),L=G(F),ei(K),Se(K,L)}function Mt(){ei(K),ei(et),ei(st)}function Nt(L){var F=ht(st.current),W=ht(K.current);F=z(W,L.type,F),W!==F&&(Se(et,L),Se(K,F))}function zt(L){et.current===L&&(ei(K),ei(et))}var ct=yn(0);function St(L){for(var F=L;F!==null;){if(F.tag===13){var W=F.memoizedState;if(W!==null&&(W=W.dehydrated,W===null||ba(W)||oa(W)))return F}else if(F.tag===19&&F.memoizedProps.revealOrder!==void 0){if(F.flags&128)return F}else if(F.child!==null){F.child.return=F,F=F.child;continue}if(F===L)break;for(;F.sibling===null;){if(F.return===null||F.return===L)return null;F=F.return}F.sibling.return=F.return,F=F.sibling}return null}var vt=[];function Ft(){for(var L=0;LW?W:4,L(!0);var J=Ut.transition;Ut.transition={};try{L(!1),F()}finally{Bi=W,Ut.transition=J}}function cp(){return Ze().memoizedState}function qn(L,F,W){var J=ma(L);W={lane:J,action:W,hasEagerState:!1,eagerState:null,next:null},dp(L)?pp(F,W):(gc(L,F,W),W=Ar(),L=Ps(L,J,W),L!==null&&vp(L,F,J))}function Mr(L,F,W){var J=ma(L),it={lane:J,action:W,hasEagerState:!1,eagerState:null,next:null};if(dp(L))pp(F,it);else{gc(L,F,it);var lt=L.alternate;if(L.lanes===0&&(lt===null||lt.lanes===0)&&(lt=F.lastRenderedReducer,lt!==null))try{var wt=F.lastRenderedState,Xt=lt(wt,W);if(it.hasEagerState=!0,it.eagerState=Xt,Es(Xt,wt))return}catch{}finally{}W=Ar(),L=Ps(L,J,W),L!==null&&vp(L,F,J)}}function dp(L){var F=L.alternate;return L===It||F!==null&&F===It}function pp(L,F){ae=Qt=!0;var W=L.pending;W===null?F.next=F:(F.next=W.next,W.next=F),L.pending=F}function gc(L,F,W){Xn!==null&&L.mode&1&&!(Ci&2)?(L=F.interleaved,L===null?(W.next=W,Xr===null?Xr=[F]:Xr.push(F)):(W.next=L.next,L.next=W),F.interleaved=W):(L=F.pending,L===null?W.next=W:(W.next=L.next,L.next=W),F.pending=W)}function vp(L,F,W){if(W&4194240){var J=F.lanes;J&=L.pendingLanes,W|=J,F.lanes=W,Ol(L,W)}}var Hl={readContext:Qi,useCallback:pe,useContext:pe,useEffect:pe,useImperativeHandle:pe,useInsertionEffect:pe,useLayoutEffect:pe,useMemo:pe,useReducer:pe,useRef:pe,useState:pe,useDebugValue:pe,useDeferredValue:pe,useTransition:pe,useMutableSource:pe,useSyncExternalStore:pe,useId:pe,unstable_isNewReconciler:!1},Nh={readContext:Qi,useCallback:function(L,F){return qe().memoizedState=[L,F===void 0?null:F],L},useContext:Qi,useEffect:Vl,useImperativeHandle:function(L,F,W){return W=W!=null?W.concat([L]):null,To(4194308,4,Oh.bind(null,F,L),W)},useLayoutEffect:function(L,F){return To(4194308,4,L,F)},useInsertionEffect:function(L,F){return To(4,2,L,F)},useMemo:function(L,F){var W=qe();return F=F===void 0?null:F,L=L(),W.memoizedState=[L,F],L},useReducer:function(L,F,W){var J=qe();return F=W!==void 0?W(F):F,J.memoizedState=J.baseState=F,L={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:L,lastRenderedState:F},J.queue=L,L=L.dispatch=qn.bind(null,It,L),[J.memoizedState,L]},useRef:function(L){var F=qe();return L={current:L},F.memoizedState=L},useState:xo,useDebugValue:Ih,useDeferredValue:function(L){var F=xo(L),W=F[0],J=F[1];return Vl(function(){var it=Ut.transition;Ut.transition={};try{J(L)}finally{Ut.transition=it}},[L]),W},useTransition:function(){var L=xo(!1),F=L[0];return L=Ug.bind(null,L[1]),qe().memoizedState=L,[F,L]},useMutableSource:function(){},useSyncExternalStore:function(L,F,W){var J=It,it=qe();if(qi){if(W===void 0)throw Error(s(407));W=W()}else{if(W=F(),Xn===null)throw Error(s(349));Wt&30||wn(J,F,W)}it.memoizedState=W;var lt={value:W,getSnapshot:F};return it.queue=lt,Vl(Ln.bind(null,J,lt,L),[L]),J.flags|=2048,So(9,yo.bind(null,J,lt,W,F),void 0,null),W},useId:function(){var L=qe(),F=Xn.identifierPrefix;if(qi){var W=is,J=Ms;W=(J&~(1<<32-Jn(J)-1)).toString(32)+W,F=":"+F+"R"+W,W=ue++,0")&&(oe=oe.replace("",L.displayName)),oe}while(1<=wt&&0<=Xt);break}}}finally{ni=!1,Error.prepareStackTrace=W}return(L=L?L.displayName||L.name:"")?ti(L):""}var Qi=Object.prototype.hasOwnProperty,fn=[],ji=-1;function yn(L){return{current:L}}function ei(L){0>ji||(L.current=fn[ji],fn[ji]=null,ji--)}function Se(L,F){ji++,fn[ji]=L.current,L.current=F}var Br={},gi=yn(Br),cn=yn(!1),Ni=Br;function Vn(L,F){var W=L.type.contextTypes;if(!W)return Br;var J=L.stateNode;if(J&&J.__reactInternalMemoizedUnmaskedChildContext===F)return J.__reactInternalMemoizedMaskedChildContext;var it={},lt;for(lt in W)it[lt]=F[lt];return J&&(L=L.stateNode,L.__reactInternalMemoizedUnmaskedChildContext=F,L.__reactInternalMemoizedMaskedChildContext=it),it}function mn(L){return L=L.childContextTypes,L!=null}function Ki(){ei(cn),ei(gi)}function pr(L,F,W){if(gi.current!==Br)throw Error(s(168));Se(gi,F),Se(cn,W)}function Gs(L,F,W){var J=L.stateNode;if(F=F.childContextTypes,typeof J.getChildContext!="function")return W;J=J.getChildContext();for(var it in J)if(!(it in F))throw Error(s(108,w(L)||"Unknown",it));return E({},W,J)}function En(L){return L=(L=L.stateNode)&&L.__reactInternalMemoizedMergedChildContext||Br,Ni=gi.current,Se(gi,L),Se(cn,cn.current),!0}function la(L,F,W){var J=L.stateNode;if(!J)throw Error(s(169));W?(L=Gs(L,F,Ni),J.__reactInternalMemoizedMergedChildContext=L,ei(cn),ei(gi),Se(gi,L)):ei(cn),Se(cn,W)}var Jn=Math.clz32?Math.clz32:uo,La=Math.log,Vs=Math.LN2;function uo(L){return L>>>=0,L===0?32:31-(La(L)/Vs|0)|0}var Fa=64,fo=4194304;function yi(L){switch(L&-L){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return L&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return L&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return L}}function Oa(L,F){var W=L.pendingLanes;if(W===0)return 0;var J=0,it=L.suspendedLanes,lt=L.pingedLanes,wt=W&268435455;if(wt!==0){var Xt=wt&~it;Xt!==0?J=yi(Xt):(lt&=wt,lt!==0&&(J=yi(lt)))}else wt=W&~it,wt!==0?J=yi(wt):lt!==0&&(J=yi(lt));if(J===0)return 0;if(F!==0&&F!==J&&!(F&it)&&(it=J&-J,lt=F&-F,it>=lt||it===16&&(lt&4194240)!==0))return F;if(J&4&&(J|=W&16),F=L.entangledLanes,F!==0)for(L=L.entanglements,F&=J;0W;W++)F.push(L);return F}function Ws(L,F,W){L.pendingLanes|=F,F!==536870912&&(L.suspendedLanes=0,L.pingedLanes=0),L=L.eventTimes,F=31-Jn(F),L[F]=W}function Xs(L,F){var W=L.pendingLanes&~F;L.pendingLanes=F,L.suspendedLanes=0,L.pingedLanes=0,L.expiredLanes&=F,L.mutableReadLanes&=F,L.entangledLanes&=F,F=L.entanglements;var J=L.eventTimes;for(L=L.expirationTimes;0>=wt,it-=wt,Ms=1<<32-Jn(F)+it|W<Ai?(kn=xi,xi=null):kn=xi.sibling;var zi=_e(Jt,xi,se[Ai],Be);if(zi===null){xi===null&&(xi=kn);break}L&&xi&&zi.alternate===null&&F(Jt,xi),kt=lt(zi,kt,Ai),wi===null?ke=zi:wi.sibling=zi,wi=zi,xi=kn}if(Ai===se.length)return W(Jt,xi),tn&&Cs(Jt,Ai),ke;if(xi===null){for(;AiAi?(kn=xi,xi=null):kn=xi.sibling;var ya=_e(Jt,xi,zi.value,Be);if(ya===null){xi===null&&(xi=kn);break}L&&xi&&ya.alternate===null&&F(Jt,xi),kt=lt(ya,kt,Ai),wi===null?ke=ya:wi.sibling=ya,wi=ya,xi=kn}if(zi.done)return W(Jt,xi),tn&&Cs(Jt,Ai),ke;if(xi===null){for(;!zi.done;Ai++,zi=se.next())zi=mi(Jt,zi.value,Be),zi!==null&&(kt=lt(zi,kt,Ai),wi===null?ke=zi:wi.sibling=zi,wi=zi);return tn&&Cs(Jt,Ai),ke}for(xi=J(Jt,xi);!zi.done;Ai++,zi=se.next())zi=en(xi,Jt,Ai,zi.value,Be),zi!==null&&(L&&zi.alternate!==null&&xi.delete(zi.key===null?Ai:zi.key),kt=lt(zi,kt,Ai),wi===null?ke=zi:wi.sibling=zi,wi=zi);return L&&xi.forEach(function(lf){return F(Jt,lf)}),tn&&Cs(Jt,Ai),ke}function us(Jt,kt,se,Be){if(typeof se=="object"&&se!==null&&se.type===d&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case e:t:{for(var ke=se.key,wi=kt;wi!==null;){if(wi.key===ke){if(ke=se.type,ke===d){if(wi.tag===7){W(Jt,wi.sibling),kt=it(wi,se.props.children),kt.return=Jt,Jt=kt;break t}}else if(wi.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===p&&Xa(ke)===wi.type){W(Jt,wi.sibling),kt=it(wi,se.props),kt.ref=Wa(Jt,wi,se),kt.return=Jt,Jt=kt;break t}W(Jt,wi);break}else F(Jt,wi);wi=wi.sibling}se.type===d?(kt=Fo(se.props.children,Jt.mode,Be,se.key),kt.return=Jt,Jt=kt):(Be=af(se.type,se.key,se.props,null,Jt.mode,Be),Be.ref=Wa(Jt,kt,se),Be.return=Jt,Jt=Be)}return wt(Jt);case r:t:{for(wi=se.key;kt!==null;){if(kt.key===wi)if(kt.tag===4&&kt.stateNode.containerInfo===se.containerInfo&&kt.stateNode.implementation===se.implementation){W(Jt,kt.sibling),kt=it(kt,se.children||[]),kt.return=Jt,Jt=kt;break t}else{W(Jt,kt);break}else F(Jt,kt);kt=kt.sibling}kt=bs(se,Jt.mode,Be),kt.return=Jt,Jt=kt}return wt(Jt);case p:return wi=se._init,us(Jt,kt,wi(se._payload),Be)}if(D(se))return Ye(Jt,kt,se,Be);if(S(se))return Lr(Jt,kt,se,Be);_n(Jt,se)}return typeof se=="string"&&se!==""||typeof se=="number"?(se=""+se,kt!==null&&kt.tag===6?(W(Jt,kt.sibling),kt=it(kt,se),kt.return=Jt,Jt=kt):(W(Jt,kt),kt=br(se,Jt.mode,Be),kt.return=Jt,Jt=kt),wt(Jt)):W(Jt,kt)}return us}var Vr=Ya(!0),bh=Ya(!1),V={},K=yn(V),et=yn(V),st=yn(V);function ht(L){if(L===V)throw Error(s(174));return L}function pt(L,F){Se(st,F),Se(et,L),Se(K,V),L=G(F),ei(K),Se(K,L)}function Mt(){ei(K),ei(et),ei(st)}function Nt(L){var F=ht(st.current),W=ht(K.current);F=z(W,L.type,F),W!==F&&(Se(et,L),Se(K,F))}function zt(L){et.current===L&&(ei(K),ei(et))}var ct=yn(0);function St(L){for(var F=L;F!==null;){if(F.tag===13){var W=F.memoizedState;if(W!==null&&(W=W.dehydrated,W===null||ba(W)||oa(W)))return F}else if(F.tag===19&&F.memoizedProps.revealOrder!==void 0){if(F.flags&128)return F}else if(F.child!==null){F.child.return=F,F=F.child;continue}if(F===L)break;for(;F.sibling===null;){if(F.return===null||F.return===L)return null;F=F.return}F.sibling.return=F.return,F=F.sibling}return null}var vt=[];function Ft(){for(var L=0;LW?W:4,L(!0);var J=Ut.transition;Ut.transition={};try{L(!1),F()}finally{Bi=W,Ut.transition=J}}function dp(){return Ze().memoizedState}function qn(L,F,W){var J=ma(L);W={lane:J,action:W,hasEagerState:!1,eagerState:null,next:null},pp(L)?vp(F,W):(mc(L,F,W),W=Ar(),L=Ps(L,J,W),L!==null&&mp(L,F,J))}function Mr(L,F,W){var J=ma(L),it={lane:J,action:W,hasEagerState:!1,eagerState:null,next:null};if(pp(L))vp(F,it);else{mc(L,F,it);var lt=L.alternate;if(L.lanes===0&&(lt===null||lt.lanes===0)&&(lt=F.lastRenderedReducer,lt!==null))try{var wt=F.lastRenderedState,Xt=lt(wt,W);if(it.hasEagerState=!0,it.eagerState=Xt,Es(Xt,wt))return}catch{}finally{}W=Ar(),L=Ps(L,J,W),L!==null&&mp(L,F,J)}}function pp(L){var F=L.alternate;return L===It||F!==null&&F===It}function vp(L,F){ae=Qt=!0;var W=L.pending;W===null?F.next=F:(F.next=W.next,W.next=F),L.pending=F}function mc(L,F,W){Xn!==null&&L.mode&1&&!(Ci&2)?(L=F.interleaved,L===null?(W.next=W,Xr===null?Xr=[F]:Xr.push(F)):(W.next=L.next,L.next=W),F.interleaved=W):(L=F.pending,L===null?W.next=W:(W.next=L.next,L.next=W),F.pending=W)}function mp(L,F,W){if(W&4194240){var J=F.lanes;J&=L.pendingLanes,W|=J,F.lanes=W,Fl(L,W)}}var Vl={readContext:_i,useCallback:pe,useContext:pe,useEffect:pe,useImperativeHandle:pe,useInsertionEffect:pe,useLayoutEffect:pe,useMemo:pe,useReducer:pe,useRef:pe,useState:pe,useDebugValue:pe,useDeferredValue:pe,useTransition:pe,useMutableSource:pe,useSyncExternalStore:pe,useId:pe,unstable_isNewReconciler:!1},Ih={readContext:_i,useCallback:function(L,F){return qe().memoizedState=[L,F===void 0?null:F],L},useContext:_i,useEffect:Gl,useImperativeHandle:function(L,F,W){return W=W!=null?W.concat([L]):null,To(4194308,4,Fh.bind(null,F,L),W)},useLayoutEffect:function(L,F){return To(4194308,4,L,F)},useInsertionEffect:function(L,F){return To(4,2,L,F)},useMemo:function(L,F){var W=qe();return F=F===void 0?null:F,L=L(),W.memoizedState=[L,F],L},useReducer:function(L,F,W){var J=qe();return F=W!==void 0?W(F):F,J.memoizedState=J.baseState=F,L={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:L,lastRenderedState:F},J.queue=L,L=L.dispatch=qn.bind(null,It,L),[J.memoizedState,L]},useRef:function(L){var F=qe();return L={current:L},F.memoizedState=L},useState:xo,useDebugValue:Dh,useDeferredValue:function(L){var F=xo(L),W=F[0],J=F[1];return Gl(function(){var it=Ut.transition;Ut.transition={};try{J(L)}finally{Ut.transition=it}},[L]),W},useTransition:function(){var L=xo(!1),F=L[0];return L=Gg.bind(null,L[1]),qe().memoizedState=L,[F,L]},useMutableSource:function(){},useSyncExternalStore:function(L,F,W){var J=It,it=qe();if(tn){if(W===void 0)throw Error(s(407));W=W()}else{if(W=F(),Xn===null)throw Error(s(349));Wt&30||wn(J,F,W)}it.memoizedState=W;var lt={value:W,getSnapshot:F};return it.queue=lt,Gl(Ln.bind(null,J,lt,L),[L]),J.flags|=2048,So(9,yo.bind(null,J,lt,W,F),void 0,null),W},useId:function(){var L=qe(),F=Xn.identifierPrefix;if(tn){var W=is,J=Ms;W=(J&~(1<<32-Jn(J)-1)).toString(32)+W,F=":"+F+"R"+W,W=ue++,0Wh&&(F.flags|=128,J=!0,Cr(it,!1),F.lanes=4194304)}else{if(!J)if(L=St(lt),L!==null){if(F.flags|=128,J=!0,L=L.updateQueue,L!==null&&(F.updateQueue=L,F.flags|=4),Cr(it,!0),it.tail===null&&it.tailMode==="hidden"&&!lt.alternate&&!qi)return ri(F),null}else 2*rn()-it.renderingStartTime>Wh&&W!==1073741824&&(F.flags|=128,J=!0,Cr(it,!1),F.lanes=4194304);it.isBackwards?(lt.sibling=F.child,F.child=lt):(L=it.last,L!==null?L.sibling=lt:F.child=lt,it.last=lt)}return it.tail!==null?(F=it.tail,it.rendering=F,it.tail=F.sibling,it.renderingStartTime=rn(),F.sibling=null,L=ct.current,Se(ct,J?L&1|2:L&1),F):(ri(F),null);case 22:case 23:return Ic(),J=F.memoizedState!==null,L!==null&&L.memoizedState!==null!==J&&(F.flags|=8192),J&&F.mode&1?ls&1073741824&&(ri(F),ot&&F.subtreeFlags&6&&(F.flags|=8192)):ri(F),null;case 24:return null;case 25:return null}throw Error(s(156,F.tag))}var Gg=y.ReactCurrentOwner,ss=!1;function Fn(L,F,W,J){F.child=L===null?Lh(F,null,W,J):Vr(F,L.child,W,J)}function Sp(L,F,W,J,it){W=W.render;var lt=F.ref;return Ys(F,it),J=me(L,F,W,J,lt,it),W=be(),L!==null&&!ss?(F.updateQueue=L.updateQueue,F.flags&=-2053,L.lanes&=~it,tr(L,F,it)):(qi&&W&&Gl(F),F.flags|=1,Fn(L,F,J,it),F.child)}function Tp(L,F,W,J,it){if(L===null){var lt=W.type;return typeof lt=="function"&&!Vc(lt)&<.defaultProps===void 0&&W.compare===null&&W.defaultProps===void 0?(F.tag=15,F.type=lt,Ep(L,F,lt,J,it)):(L=af(W.type,null,J,F,F.mode,it),L.ref=F.ref,L.return=F,F.child=L)}if(lt=L.child,!(L.lanes&it)){var wt=lt.memoizedProps;if(W=W.compare,W=W!==null?W:xn,W(wt,J)&&L.ref===F.ref)return tr(L,F,it)}return F.flags|=1,L=Za(lt,J),L.ref=F.ref,L.return=F,F.child=L}function Ep(L,F,W,J,it){if(L!==null&&xn(L.memoizedProps,J)&&L.ref===F.ref)if(ss=!1,(L.lanes&it)!==0)L.flags&131072&&(ss=!0);else return F.lanes=L.lanes,tr(L,F,it);return js(L,F,W,J,it)}function Mp(L,F,W){var J=F.pendingProps,it=J.children,lt=L!==null?L.memoizedState:null;if(J.mode==="hidden")if(!(F.mode&1))F.memoizedState={baseLanes:0,cachePool:null},Se(Kl,ls),ls|=W;else if(W&1073741824)F.memoizedState={baseLanes:0,cachePool:null},J=lt!==null?lt.baseLanes:W,Se(Kl,ls),ls|=J;else return L=lt!==null?lt.baseLanes|W:W,F.lanes=F.childLanes=1073741824,F.memoizedState={baseLanes:L,cachePool:null},F.updateQueue=null,Se(Kl,ls),ls|=L,null;else lt!==null?(J=lt.baseLanes|W,F.memoizedState=null):J=W,Se(Kl,ls),ls|=J;return Fn(L,F,it,W),F.child}function Cp(L,F){var W=F.ref;(L===null&&W!==null||L!==null&&L.ref!==W)&&(F.flags|=512,F.flags|=2097152)}function js(L,F,W,J,it){var lt=vn(W)?Ni:gi.current;return lt=Vn(F,lt),Ys(F,it),W=me(L,F,W,J,lt,it),J=be(),L!==null&&!ss?(F.updateQueue=L.updateQueue,F.flags&=-2053,L.lanes&=~it,tr(L,F,it)):(qi&&J&&Gl(F),F.flags|=1,Fn(L,F,W,it),F.child)}function wp(L,F,W,J,it){if(vn(W)){var lt=!0;En(F)}else lt=!1;if(Ys(F,it),F.stateNode===null)L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),Zo(F,W,J),Va(F,W,J,it),J=!0;else if(L===null){var wt=F.stateNode,Xt=F.memoizedProps;wt.props=Xt;var oe=wt.context,Ee=W.contextType;typeof Ee=="object"&&Ee!==null?Ee=Qi(Ee):(Ee=vn(W)?Ni:gi.current,Ee=Vn(F,Ee));var He=W.getDerivedStateFromProps,mi=typeof He=="function"||typeof wt.getSnapshotBeforeUpdate=="function";mi||typeof wt.UNSAFE_componentWillReceiveProps!="function"&&typeof wt.componentWillReceiveProps!="function"||(Xt!==J||oe!==Ee)&&$o(F,wt,J,Ee),Sn=!1;var Qe=F.memoizedState;wt.state=Qe,Yr(F,J,wt,it),oe=F.memoizedState,Xt!==J||Qe!==oe||fn.current||Sn?(typeof He=="function"&&(ts(F,W,He,J),oe=F.memoizedState),(Xt=Sn||zl(F,W,Xt,J,Qe,oe,Ee))?(mi||typeof wt.UNSAFE_componentWillMount!="function"&&typeof wt.componentWillMount!="function"||(typeof wt.componentWillMount=="function"&&wt.componentWillMount(),typeof wt.UNSAFE_componentWillMount=="function"&&wt.UNSAFE_componentWillMount()),typeof wt.componentDidMount=="function"&&(F.flags|=4194308)):(typeof wt.componentDidMount=="function"&&(F.flags|=4194308),F.memoizedProps=J,F.memoizedState=oe),wt.props=J,wt.state=oe,wt.context=Ee,J=Xt):(typeof wt.componentDidMount=="function"&&(F.flags|=4194308),J=!1)}else{wt=F.stateNode,za(L,F),Xt=F.memoizedProps,Ee=F.type===F.elementType?Xt:bn(F.type,Xt),wt.props=Ee,mi=F.pendingProps,Qe=wt.context,oe=W.contextType,typeof oe=="object"&&oe!==null?oe=Qi(oe):(oe=vn(W)?Ni:gi.current,oe=Vn(F,oe));var tn=W.getDerivedStateFromProps;(He=typeof tn=="function"||typeof wt.getSnapshotBeforeUpdate=="function")||typeof wt.UNSAFE_componentWillReceiveProps!="function"&&typeof wt.componentWillReceiveProps!="function"||(Xt!==mi||Qe!==oe)&&$o(F,wt,J,oe),Sn=!1,Qe=F.memoizedState,wt.state=Qe,Yr(F,J,wt,it);var Xe=F.memoizedState;Xt!==mi||Qe!==Xe||fn.current||Sn?(typeof tn=="function"&&(ts(F,W,tn,J),Xe=F.memoizedState),(Ee=Sn||zl(F,W,Ee,J,Qe,Xe,oe)||!1)?(He||typeof wt.UNSAFE_componentWillUpdate!="function"&&typeof wt.componentWillUpdate!="function"||(typeof wt.componentWillUpdate=="function"&&wt.componentWillUpdate(J,Xe,oe),typeof wt.UNSAFE_componentWillUpdate=="function"&&wt.UNSAFE_componentWillUpdate(J,Xe,oe)),typeof wt.componentDidUpdate=="function"&&(F.flags|=4),typeof wt.getSnapshotBeforeUpdate=="function"&&(F.flags|=1024)):(typeof wt.componentDidUpdate!="function"||Xt===L.memoizedProps&&Qe===L.memoizedState||(F.flags|=4),typeof wt.getSnapshotBeforeUpdate!="function"||Xt===L.memoizedProps&&Qe===L.memoizedState||(F.flags|=1024),F.memoizedProps=J,F.memoizedState=Xe),wt.props=J,wt.state=Xe,wt.context=oe,J=Ee):(typeof wt.componentDidUpdate!="function"||Xt===L.memoizedProps&&Qe===L.memoizedState||(F.flags|=4),typeof wt.getSnapshotBeforeUpdate!="function"||Xt===L.memoizedProps&&Qe===L.memoizedState||(F.flags|=1024),J=!1)}return xc(L,F,W,J,lt,it)}function xc(L,F,W,J,it,lt){Cp(L,F);var wt=(F.flags&128)!==0;if(!J&&!wt)return it&&la(F,W,!1),tr(L,F,lt);J=F.stateNode,Gg.current=F;var Xt=wt&&typeof W.getDerivedStateFromError!="function"?null:J.render();return F.flags|=1,L!==null&&wt?(F.child=Vr(F,L.child,null,lt),F.child=Vr(F,null,Xt,lt)):Fn(L,F,Xt,lt),F.memoizedState=J.state,it&&la(F,W,!0),F.child}function Ap(L){var F=L.stateNode;F.pendingContext?pr(L,F.pendingContext,F.pendingContext!==F.context):F.context&&pr(L,F.context,!1),pt(L,F.containerInfo)}function Pp(L,F,W,J,it){return go(),Ha(it),F.flags|=256,Fn(L,F,W,J),F.child}var Yu={dehydrated:null,treeContext:null,retryLane:0};function As(L){return{baseLanes:L,cachePool:null}}function Rp(L,F,W){var J=F.pendingProps,it=ct.current,lt=!1,wt=(F.flags&128)!==0,Xt;if((Xt=wt)||(Xt=L!==null&&L.memoizedState===null?!1:(it&2)!==0),Xt?(lt=!0,F.flags&=-129):(L===null||L.memoizedState!==null)&&(it|=1),Se(ct,it&1),L===null)return dn(F),L=F.memoizedState,L!==null&&(L=L.dehydrated,L!==null)?(F.mode&1?oa(L)?F.lanes=8:F.lanes=1073741824:F.lanes=1,null):(it=J.children,L=J.fallback,lt?(J=F.mode,lt=F.child,it={mode:"hidden",children:it},!(J&1)&<!==null?(lt.childLanes=0,lt.pendingProps=it):lt=Kh(it,J,0,null),L=Fo(L,J,W,null),lt.return=F,L.return=F,lt.sibling=L,F.child=lt,F.child.memoizedState=As(W),F.memoizedState=Yu,L):Sc(F,it));if(it=L.memoizedState,it!==null){if(Xt=it.dehydrated,Xt!==null){if(wt)return F.flags&256?(F.flags&=-257,ku(L,F,W,Error(s(422)))):F.memoizedState!==null?(F.child=L.child,F.flags|=128,null):(lt=J.fallback,it=F.mode,J=Kh({mode:"visible",children:J.children},it,0,null),lt=Fo(lt,it,W,null),lt.flags|=2,J.return=F,lt.return=F,J.sibling=lt,F.child=J,F.mode&1&&Vr(F,L.child,null,W),F.child.memoizedState=As(W),F.memoizedState=Yu,lt);if(!(F.mode&1))F=ku(L,F,W,null);else if(oa(Xt))F=ku(L,F,W,Error(s(419)));else if(J=(W&L.childLanes)!==0,ss||J){if(J=Xn,J!==null){switch(W&-W){case 4:lt=2;break;case 16:lt=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:lt=32;break;case 536870912:lt=268435456;break;default:lt=0}J=lt&(J.suspendedLanes|W)?0:lt,J!==0&&J!==it.retryLane&&(it.retryLane=J,Ps(L,J,-1))}nf(),F=ku(L,F,W,Error(s(421)))}else ba(Xt)?(F.flags|=128,F.child=L.child,F=Lo.bind(null,L),Us(Xt,F),F=null):(W=it.treeContext,gt&&(Wn=zs(Xt),Qn=F,qi=!0,ns=null,mo=!1,W!==null&&(ar[or++]=Ms,ar[or++]=is,ar[or++]=ca,Ms=W.id,is=W.overflow,ca=F)),F=Sc(F,F.pendingProps.children),F.flags|=4096);return F}return lt?(J=Lp(L,F,J.children,J.fallback,W),lt=F.child,it=L.child.memoizedState,lt.memoizedState=it===null?As(W):{baseLanes:it.baseLanes|W,cachePool:null},lt.childLanes=L.childLanes&~W,F.memoizedState=Yu,J):(W=bp(L,F,J.children,W),F.memoizedState=null,W)}return lt?(J=Lp(L,F,J.children,J.fallback,W),lt=F.child,it=L.child.memoizedState,lt.memoizedState=it===null?As(W):{baseLanes:it.baseLanes|W,cachePool:null},lt.childLanes=L.childLanes&~W,F.memoizedState=Yu,J):(W=bp(L,F,J.children,W),F.memoizedState=null,W)}function Sc(L,F){return F=Kh({mode:"visible",children:F},L.mode,0,null),F.return=L,L.child=F}function bp(L,F,W,J){var it=L.child;return L=it.sibling,W=Za(it,{mode:"visible",children:W}),!(F.mode&1)&&(W.lanes=J),W.return=F,W.sibling=null,L!==null&&(J=F.deletions,J===null?(F.deletions=[L],F.flags|=16):J.push(L)),F.child=W}function Lp(L,F,W,J,it){var lt=F.mode;L=L.child;var wt=L.sibling,Xt={mode:"hidden",children:W};return!(lt&1)&&F.child!==L?(W=F.child,W.childLanes=0,W.pendingProps=Xt,F.deletions=null):(W=Za(L,Xt),W.subtreeFlags=L.subtreeFlags&14680064),wt!==null?J=Za(wt,J):(J=Fo(J,lt,it,null),J.flags|=2),J.return=F,W.return=F,W.sibling=J,F.child=W,J}function ku(L,F,W,J){return J!==null&&Ha(J),Vr(F,L.child,null,W),L=Sc(F,F.pendingProps.children),L.flags|=2,F.memoizedState=null,L}function Eo(L,F,W){L.lanes|=F;var J=L.alternate;J!==null&&(J.lanes|=F),Ua(L.return,F,W)}function Tc(L,F,W,J,it){var lt=L.memoizedState;lt===null?L.memoizedState={isBackwards:F,rendering:null,renderingStartTime:0,last:J,tail:W,tailMode:it}:(lt.isBackwards=F,lt.rendering=null,lt.renderingStartTime=0,lt.last=J,lt.tail=W,lt.tailMode=it)}function Fp(L,F,W){var J=F.pendingProps,it=J.revealOrder,lt=J.tail;if(Fn(L,F,J.children,W),J=ct.current,J&2)J=J&1|2,F.flags|=128;else{if(L!==null&&L.flags&128)t:for(L=F.child;L!==null;){if(L.tag===13)L.memoizedState!==null&&Eo(L,W,F);else if(L.tag===19)Eo(L,W,F);else if(L.child!==null){L.child.return=L,L=L.child;continue}if(L===F)break t;for(;L.sibling===null;){if(L.return===null||L.return===F)break t;L=L.return}L.sibling.return=L.return,L=L.sibling}J&=1}if(Se(ct,J),!(F.mode&1))F.memoizedState=null;else switch(it){case"forwards":for(W=F.child,it=null;W!==null;)L=W.alternate,L!==null&&St(L)===null&&(it=W),W=W.sibling;W=it,W===null?(it=F.child,F.child=null):(it=W.sibling,W.sibling=null),Tc(F,!1,it,W,lt);break;case"backwards":for(W=null,it=F.child,F.child=null;it!==null;){if(L=it.alternate,L!==null&&St(L)===null){F.child=it;break}L=it.sibling,it.sibling=W,W=it,it=L}Tc(F,!0,W,null,lt);break;case"together":Tc(F,!1,null,null,void 0);break;default:F.memoizedState=null}return F.child}function tr(L,F,W){if(L!==null&&(F.dependencies=L.dependencies),$l|=F.lanes,!(W&F.childLanes))return null;if(L!==null&&F.child!==L.child)throw Error(s(153));if(F.child!==null){for(L=F.child,W=Za(L,L.pendingProps),F.child=W,W.return=F;L.sibling!==null;)L=L.sibling,W=W.sibling=Za(L,L.pendingProps),W.return=F;W.sibling=null}return F.child}function Vg(L,F,W){switch(F.tag){case 3:Ap(F),go();break;case 5:Nt(F);break;case 1:vn(F.type)&&En(F);break;case 4:pt(F,F.stateNode.containerInfo);break;case 10:Nl(F,F.type._context,F.memoizedProps.value);break;case 13:var J=F.memoizedState;if(J!==null)return J.dehydrated!==null?(Se(ct,ct.current&1),F.flags|=128,null):W&F.child.childLanes?Rp(L,F,W):(Se(ct,ct.current&1),L=tr(L,F,W),L!==null?L.sibling:null);Se(ct,ct.current&1);break;case 19:if(J=(W&F.childLanes)!==0,L.flags&128){if(J)return Fp(L,F,W);F.flags|=128}var it=F.memoizedState;if(it!==null&&(it.rendering=null,it.tail=null,it.lastEffect=null),Se(ct,ct.current),J)break;return null;case 22:case 23:return F.lanes=0,Mp(L,F,W)}return tr(L,F,W)}function Hg(L,F){switch(lr(F),F.tag){case 1:return vn(F.type)&&Ki(),L=F.flags,L&65536?(F.flags=L&-65537|128,F):null;case 3:return Mt(),ei(fn),ei(gi),Ft(),L=F.flags,L&65536&&!(L&128)?(F.flags=L&-65537|128,F):null;case 5:return zt(F),null;case 13:if(ei(ct),L=F.memoizedState,L!==null&&L.dehydrated!==null){if(F.alternate===null)throw Error(s(340));go()}return L=F.flags,L&65536?(F.flags=L&-65537|128,F):null;case 19:return ei(ct),null;case 4:return Mt(),null;case 10:return Bl(F.type._context),null;case 22:case 23:return Ic(),null;case 24:return null;default:return null}}var ju=!1,el=!1,Wg=typeof WeakSet=="function"?WeakSet:Set,De=null;function zh(L,F){var W=L.ref;if(W!==null)if(typeof W=="function")try{W(null)}catch(J){Rr(L,F,J)}else W.current=null}function Ec(L,F,W){try{W()}catch(J){Rr(L,F,J)}}var Op=!1;function Mc(L,F){for(X(L.containerInfo),De=F;De!==null;)if(L=De,F=L.child,(L.subtreeFlags&1028)!==0&&F!==null)F.return=L,De=F;else for(;De!==null;){L=De;try{var W=L.alternate;if(L.flags&1024)switch(L.tag){case 0:case 11:case 15:break;case 1:if(W!==null){var J=W.memoizedProps,it=W.memoizedState,lt=L.stateNode,wt=lt.getSnapshotBeforeUpdate(L.elementType===L.type?J:bn(L.type,J),it);lt.__reactInternalSnapshotBeforeUpdate=wt}break;case 3:ot&&Ce(L.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Xt){Rr(L,L.return,Xt)}if(F=L.sibling,F!==null){F.return=L.return,De=F;break}De=L.return}return W=Op,Op=!1,W}function Ks(L,F,W){var J=F.updateQueue;if(J=J!==null?J.lastEffect:null,J!==null){var it=J=J.next;do{if((it.tag&L)===L){var lt=it.destroy;it.destroy=void 0,lt!==void 0&&Ec(F,W,lt)}it=it.next}while(it!==J)}}function Mo(L,F){if(F=F.updateQueue,F=F!==null?F.lastEffect:null,F!==null){var W=F=F.next;do{if((W.tag&L)===L){var J=W.create;W.destroy=J()}W=W.next}while(W!==F)}}function Cc(L){var F=L.ref;if(F!==null){var W=L.stateNode;switch(L.tag){case 5:L=B(W);break;default:L=W}typeof F=="function"?F(L):F.current=L}}function wc(L,F,W){if(Sr&&typeof Sr.onCommitFiberUnmount=="function")try{Sr.onCommitFiberUnmount(po,F)}catch{}switch(F.tag){case 0:case 11:case 14:case 15:if(L=F.updateQueue,L!==null&&(L=L.lastEffect,L!==null)){var J=L=L.next;do{var it=J,lt=it.destroy;it=it.tag,lt!==void 0&&(it&2||it&4)&&Ec(F,W,lt),J=J.next}while(J!==L)}break;case 1:if(zh(F,W),L=F.stateNode,typeof L.componentWillUnmount=="function")try{L.props=F.memoizedProps,L.state=F.memoizedState,L.componentWillUnmount()}catch(wt){Rr(F,W,wt)}break;case 5:zh(F,W);break;case 4:ot?Pc(L,F,W):rt&&rt&&(F=F.stateNode.containerInfo,W=Ve(F),Ii(F,W))}}function Dp(L,F,W){for(var J=F;;)if(wc(L,J,W),J.child===null||ot&&J.tag===4){if(J===F)break;for(;J.sibling===null;){if(J.return===null||J.return===F)return;J=J.return}J.sibling.return=J.return,J=J.sibling}else J.child.return=J,J=J.child}function va(L){var F=L.alternate;F!==null&&(L.alternate=null,va(F)),L.child=null,L.deletions=null,L.sibling=null,L.tag===5&&(F=L.stateNode,F!==null&&Pt(F)),L.stateNode=null,L.return=null,L.dependencies=null,L.memoizedProps=null,L.memoizedState=null,L.pendingProps=null,L.stateNode=null,L.updateQueue=null}function Ku(L){return L.tag===5||L.tag===3||L.tag===4}function Co(L){t:for(;;){for(;L.sibling===null;){if(L.return===null||Ku(L.return))return null;L=L.return}for(L.sibling.return=L.return,L=L.sibling;L.tag!==5&&L.tag!==6&&L.tag!==18;){if(L.flags&2||L.child===null||L.tag===4)continue t;L.child.return=L,L=L.child}if(!(L.flags&2))return L.stateNode}}function as(L){if(ot){t:{for(var F=L.return;F!==null;){if(Ku(F))break t;F=F.return}throw Error(s(160))}var W=F;switch(W.tag){case 5:F=W.stateNode,W.flags&32&&(si(F),W.flags&=-33),W=Co(L),Zu(L,W,F);break;case 3:case 4:F=W.stateNode.containerInfo,W=Co(L),Ac(L,W,F);break;default:throw Error(s(161))}}}function Ac(L,F,W){var J=L.tag;if(J===5||J===6)L=L.stateNode,F?Le(W,L,F):Pe(W,L);else if(J!==4&&(L=L.child,L!==null))for(Ac(L,F,W),L=L.sibling;L!==null;)Ac(L,F,W),L=L.sibling}function Zu(L,F,W){var J=L.tag;if(J===5||J===6)L=L.stateNode,F?Be(W,L,F):xe(W,L);else if(J!==4&&(L=L.child,L!==null))for(Zu(L,F,W),L=L.sibling;L!==null;)Zu(L,F,W),L=L.sibling}function Pc(L,F,W){for(var J=F,it=!1,lt,wt;;){if(!it){it=J.return;t:for(;;){if(it===null)throw Error(s(160));switch(lt=it.stateNode,it.tag){case 5:wt=!1;break t;case 3:lt=lt.containerInfo,wt=!0;break t;case 4:lt=lt.containerInfo,wt=!0;break t}it=it.return}it=!0}if(J.tag===5||J.tag===6)Dp(L,J,W),wt?je(lt,J.stateNode):ne(lt,J.stateNode);else if(J.tag===18)wt?ee(lt,J.stateNode):ie(lt,J.stateNode);else if(J.tag===4){if(J.child!==null){lt=J.stateNode.containerInfo,wt=!0,J.child.return=J,J=J.child;continue}}else if(wc(L,J,W),J.child!==null){J.child.return=J,J=J.child;continue}if(J===F)break;for(;J.sibling===null;){if(J.return===null||J.return===F)return;J=J.return,J.tag===4&&(it=!1)}J.sibling.return=J.return,J=J.sibling}}function il(L,F){if(ot){switch(F.tag){case 0:case 11:case 14:case 15:Ks(3,F,F.return),Mo(3,F),Ks(5,F,F.return);return;case 1:return;case 5:var W=F.stateNode;if(W!=null){var J=F.memoizedProps;L=L!==null?L.memoizedProps:J;var it=F.type,lt=F.updateQueue;F.updateQueue=null,lt!==null&&Oe(W,lt,it,L,J,F)}return;case 6:if(F.stateNode===null)throw Error(s(162));W=F.memoizedProps,te(F.stateNode,L!==null?L.memoizedProps:W,W);return;case 3:gt&&L!==null&&L.memoizedState.isDehydrated&&Zt(F.stateNode.containerInfo);return;case 12:return;case 13:Zs(F);return;case 19:Zs(F);return;case 17:return}throw Error(s(163))}switch(F.tag){case 0:case 11:case 14:case 15:Ks(3,F,F.return),Mo(3,F),Ks(5,F,F.return);return;case 12:return;case 13:Zs(F);return;case 19:Zs(F);return;case 3:gt&&L!==null&&L.memoizedState.isDehydrated&&Zt(F.stateNode.containerInfo);break;case 22:case 23:return}t:if(rt){switch(F.tag){case 1:case 5:case 6:break t;case 3:case 4:F=F.stateNode,Ii(F.containerInfo,F.pendingChildren);break t}throw Error(s(163))}}function Zs(L){var F=L.updateQueue;if(F!==null){L.updateQueue=null;var W=L.stateNode;W===null&&(W=L.stateNode=new Wg),F.forEach(function(J){var it=Hp.bind(null,L,J);W.has(J)||(W.add(J),J.then(it,it))})}}function Ip(L,F){for(De=F;De!==null;){F=De;var W=F.deletions;if(W!==null)for(var J=0;J";case Vh:return":has("+(Hh(L)||"")+")";case os:return'[role="'+L.value+'"]';case nl:return'"'+L.value+'"';case kl:return'[data-testname="'+L.value+'"]';default:throw Error(s(365))}}function Bp(L,F){var W=[];L=[L,0];for(var J=0;Jit&&(it=wt),J&=~lt}if(J=it,J=rn()-J,J=(120>J?120:480>J?480:1080>J?1080:1920>J?1920:3e3>J?3e3:4320>J?4320:1960*Yg(J/1960))-J,10L?16:L,Ka===null)var J=!1;else{if(L=Ka,Ka=null,Yh=0,Ci&6)throw Error(s(331));var it=Ci;for(Ci|=4,De=L.current;De!==null;){var lt=De,wt=lt.child;if(De.flags&16){var Xt=lt.deletions;if(Xt!==null){for(var oe=0;oern()-Oc?ga(L,0):Fc|=W),ii(L,F)}function Vp(L,F){F===0&&(L.mode&1?(F=fo,fo<<=1,!(fo&130023424)&&(fo=4194304)):F=1);var W=Ar();L=_l(L,F),L!==null&&(Ws(L,F,W),ii(L,W))}function Lo(L){var F=L.memoizedState,W=0;F!==null&&(W=F.retryLane),Vp(L,W)}function Hp(L,F){var W=0;switch(L.tag){case 13:var J=L.stateNode,it=L.memoizedState;it!==null&&(W=it.retryLane);break;case 19:J=L.stateNode;break;default:throw Error(s(314))}J!==null&&J.delete(F),Vp(L,W)}var Gc;Gc=function(L,F,W){if(L!==null)if(L.memoizedProps!==F.pendingProps||fn.current)ss=!0;else{if(!(L.lanes&W)&&!(F.flags&128))return ss=!1,Vg(L,F,W);ss=!!(L.flags&131072)}else ss=!1,qi&&F.flags&1048576&&bh(F,Jo,F.index);switch(F.lanes=0,F.tag){case 2:var J=F.type;L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),L=F.pendingProps;var it=Vn(F,gi.current);Ys(F,W),it=me(null,F,J,L,it,W);var lt=be();return F.flags|=1,typeof it=="object"&&it!==null&&typeof it.render=="function"&&it.$$typeof===void 0?(F.tag=1,F.memoizedState=null,F.updateQueue=null,vn(J)?(lt=!0,En(F)):lt=!1,F.memoizedState=it.state!==null&&it.state!==void 0?it.state:null,Hn(F),it.updater=vo,F.stateNode=it,it._reactInternals=F,Va(F,J,L,W),F=xc(null,F,J,!0,lt,W)):(F.tag=0,qi&<&&Gl(F),Fn(null,F,it,W),F=F.child),F;case 16:J=F.elementType;t:{switch(L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),L=F.pendingProps,it=J._init,J=it(J._payload),F.type=J,it=F.tag=Wp(J),L=bn(J,L),it){case 0:F=js(null,F,J,L,W);break t;case 1:F=wp(null,F,J,L,W);break t;case 11:F=Sp(null,F,J,L,W);break t;case 14:F=Tp(null,F,J,bn(J.type,L),W);break t}throw Error(s(306,J,""))}return F;case 0:return J=F.type,it=F.pendingProps,it=F.elementType===J?it:bn(J,it),js(L,F,J,it,W);case 1:return J=F.type,it=F.pendingProps,it=F.elementType===J?it:bn(J,it),wp(L,F,J,it,W);case 3:t:{if(Ap(F),L===null)throw Error(s(387));J=F.pendingProps,lt=F.memoizedState,it=lt.element,za(L,F),Yr(F,J,null,W);var wt=F.memoizedState;if(J=wt.element,gt&<.isDehydrated)if(lt={element:J,isDehydrated:!1,cache:wt.cache,transitions:wt.transitions},F.updateQueue.baseState=lt,F.memoizedState=lt,F.flags&256){it=Error(s(423)),F=Pp(L,F,J,W,it);break t}else if(J!==it){it=Error(s(424)),F=Pp(L,F,J,W,it);break t}else for(gt&&(Wn=qr(F.stateNode.containerInfo),Qn=F,qi=!0,ns=null,mo=!1),W=Lh(F,null,J,W),F.child=W;W;)W.flags=W.flags&-3|4096,W=W.sibling;else{if(go(),J===it){F=tr(L,F,W);break t}Fn(L,F,J,W)}F=F.child}return F;case 5:return Nt(F),L===null&&dn(F),J=F.type,it=F.pendingProps,lt=L!==null?L.memoizedProps:null,wt=it.children,U(J,it)?wt=null:lt!==null&&U(J,lt)&&(F.flags|=32),Cp(L,F),Fn(L,F,wt,W),F.child;case 6:return L===null&&dn(F),null;case 13:return Rp(L,F,W);case 4:return pt(F,F.stateNode.containerInfo),J=F.pendingProps,L===null?F.child=Vr(F,null,J,W):Fn(L,F,J,W),F.child;case 11:return J=F.type,it=F.pendingProps,it=F.elementType===J?it:bn(J,it),Sp(L,F,J,it,W);case 7:return Fn(L,F,F.pendingProps,W),F.child;case 8:return Fn(L,F,F.pendingProps.children,W),F.child;case 12:return Fn(L,F,F.pendingProps.children,W),F.child;case 10:t:{if(J=F.type._context,it=F.pendingProps,lt=F.memoizedProps,wt=it.value,Nl(F,J,wt),lt!==null)if(Es(lt.value,wt)){if(lt.children===it.children&&!fn.current){F=tr(L,F,W);break t}}else for(lt=F.child,lt!==null&&(lt.return=F);lt!==null;){var Xt=lt.dependencies;if(Xt!==null){wt=lt.child;for(var oe=Xt.firstContext;oe!==null;){if(oe.context===J){if(lt.tag===1){oe=Cn(-1,W&-W),oe.tag=2;var Ee=lt.updateQueue;if(Ee!==null){Ee=Ee.shared;var He=Ee.pending;He===null?oe.next=oe:(oe.next=He.next,He.next=oe),Ee.pending=oe}}lt.lanes|=W,oe=lt.alternate,oe!==null&&(oe.lanes|=W),Ua(lt.return,W,F),Xt.lanes|=W;break}oe=oe.next}}else if(lt.tag===10)wt=lt.type===F.type?null:lt.child;else if(lt.tag===18){if(wt=lt.return,wt===null)throw Error(s(341));wt.lanes|=W,Xt=wt.alternate,Xt!==null&&(Xt.lanes|=W),Ua(wt,W,F),wt=lt.sibling}else wt=lt.child;if(wt!==null)wt.return=lt;else for(wt=lt;wt!==null;){if(wt===F){wt=null;break}if(lt=wt.sibling,lt!==null){lt.return=wt.return,wt=lt;break}wt=wt.return}lt=wt}Fn(L,F,it.children,W),F=F.child}return F;case 9:return it=F.type,J=F.pendingProps.children,Ys(F,W),it=Qi(it),J=J(it),F.flags|=1,Fn(L,F,J,W),F.child;case 14:return J=F.type,it=bn(J,F.pendingProps),it=bn(J.type,it),Tp(L,F,J,it,W);case 15:return Ep(L,F,F.type,F.pendingProps,W);case 17:return J=F.type,it=F.pendingProps,it=F.elementType===J?it:bn(J,it),L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),F.tag=1,vn(J)?(L=!0,En(F)):L=!1,Ys(F,W),Zo(F,J,it),Va(F,J,it,W),xc(null,F,J,!0,L,W);case 19:return Fp(L,F,W);case 22:return Mp(L,F,W)}throw Error(s(156,F.tag))};function sf(L,F){return Ur(L,F)}function kg(L,F,W,J){this.tag=L,this.key=W,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=F,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=J,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rs(L,F,W,J){return new kg(L,F,W,J)}function Vc(L){return L=L.prototype,!(!L||!L.isReactComponent)}function Wp(L){if(typeof L=="function")return Vc(L)?1:0;if(L!=null){if(L=L.$$typeof,L===u)return 11;if(L===c)return 14}return 2}function Za(L,F){var W=L.alternate;return W===null?(W=Rs(L.tag,F,L.key,L.mode),W.elementType=L.elementType,W.type=L.type,W.stateNode=L.stateNode,W.alternate=L,L.alternate=W):(W.pendingProps=F,W.type=L.type,W.flags=0,W.subtreeFlags=0,W.deletions=null),W.flags=L.flags&14680064,W.childLanes=L.childLanes,W.lanes=L.lanes,W.child=L.child,W.memoizedProps=L.memoizedProps,W.memoizedState=L.memoizedState,W.updateQueue=L.updateQueue,F=L.dependencies,W.dependencies=F===null?null:{lanes:F.lanes,firstContext:F.firstContext},W.sibling=L.sibling,W.index=L.index,W.ref=L.ref,W}function af(L,F,W,J,it,lt){var wt=2;if(J=L,typeof L=="function")Vc(L)&&(wt=1);else if(typeof L=="string")wt=5;else t:switch(L){case d:return Fo(W.children,it,lt,F);case h:wt=8,it|=8;break;case a:return L=Rs(12,W,F,it|2),L.elementType=a,L.lanes=lt,L;case f:return L=Rs(13,W,F,it),L.elementType=f,L.lanes=lt,L;case o:return L=Rs(19,W,F,it),L.elementType=o,L.lanes=lt,L;case v:return Kh(W,it,lt,F);default:if(typeof L=="object"&&L!==null)switch(L.$$typeof){case l:wt=10;break t;case n:wt=9;break t;case u:wt=11;break t;case c:wt=14;break t;case p:wt=16,J=null;break t}throw Error(s(130,L==null?L:typeof L,""))}return F=Rs(wt,W,F,it),F.elementType=L,F.type=J,F.lanes=lt,F}function Fo(L,F,W,J){return L=Rs(7,L,J,F),L.lanes=W,L}function Kh(L,F,W,J){return L=Rs(22,L,J,F),L.elementType=v,L.lanes=W,L.stateNode={},L}function br(L,F,W){return L=Rs(6,L,null,F),L.lanes=W,L}function bs(L,F,W){return F=Rs(4,L.children!==null?L.children:[],L.key,F),F.lanes=W,F.stateNode={containerInfo:L.containerInfo,pendingChildren:null,implementation:L.implementation},F}function jg(L,F,W,J,it){this.tag=F,this.containerInfo=L,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=q,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hs(0),this.expirationTimes=Hs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hs(0),this.identifierPrefix=J,this.onRecoverableError=it,gt&&(this.mutableSourceEagerHydrationData=null)}function Xp(L,F,W,J,it,lt,wt,Xt,oe){return L=new jg(L,F,W,Xt,oe),F===1?(F=1,lt===!0&&(F|=8)):F=0,lt=Rs(3,null,null,F),L.current=lt,lt.stateNode=L,lt.memoizedState={element:J,isDehydrated:W,cache:null,transitions:null},Hn(lt),L}function Zh(L){if(!L)return Br;L=L._reactInternals;t:{if(C(L)!==L||L.tag!==1)throw Error(s(170));var F=L;do{switch(F.tag){case 3:F=F.stateNode.context;break t;case 1:if(vn(F.type)){F=F.stateNode.__reactInternalMemoizedMergedChildContext;break t}}F=F.return}while(F!==null);throw Error(s(171))}if(L.tag===1){var W=L.type;if(vn(W))return Gs(L,W,F)}return F}function al(L){var F=L._reactInternals;if(F===void 0)throw typeof L.render=="function"?Error(s(188)):(L=Object.keys(L).join(","),Error(s(268,L)));return L=b(F),L===null?null:L.stateNode}function Hc(L,F){if(L=L.memoizedState,L!==null&&L.dehydrated!==null){var W=L.retryLane;L.retryLane=W!==0&&W=Ee&<>=mi&&it<=He&&wt<=Qe){L.splice(F,1);break}else if(J!==Ee||W.width!==oe.width||Qewt){if(!(lt!==mi||W.height!==oe.height||Heit)){Ee>J&&(oe.width+=Ee-J,oe.x=J),Helt&&(oe.height+=mi-lt,oe.y=lt),QeW&&(W=wt)),wtHh&&(F.flags|=128,J=!0,Cr(it,!1),F.lanes=4194304)}else{if(!J)if(L=St(lt),L!==null){if(F.flags|=128,J=!0,L=L.updateQueue,L!==null&&(F.updateQueue=L,F.flags|=4),Cr(it,!0),it.tail===null&&it.tailMode==="hidden"&&!lt.alternate&&!tn)return ri(F),null}else 2*sn()-it.renderingStartTime>Hh&&W!==1073741824&&(F.flags|=128,J=!0,Cr(it,!1),F.lanes=4194304);it.isBackwards?(lt.sibling=F.child,F.child=lt):(L=it.last,L!==null?L.sibling=lt:F.child=lt,it.last=lt)}return it.tail!==null?(F=it.tail,it.rendering=F,it.tail=F.sibling,it.renderingStartTime=sn(),F.sibling=null,L=ct.current,Se(ct,J?L&1|2:L&1),F):(ri(F),null);case 22:case 23:return Dc(),J=F.memoizedState!==null,L!==null&&L.memoizedState!==null!==J&&(F.flags|=8192),J&&F.mode&1?ls&1073741824&&(ri(F),ot&&F.subtreeFlags&6&&(F.flags|=8192)):ri(F),null;case 24:return null;case 25:return null}throw Error(s(156,F.tag))}var Hg=x.ReactCurrentOwner,ss=!1;function Fn(L,F,W,J){F.child=L===null?bh(F,null,W,J):Vr(F,L.child,W,J)}function Tp(L,F,W,J,it){W=W.render;var lt=F.ref;return Ys(F,it),J=me(L,F,W,J,lt,it),W=be(),L!==null&&!ss?(F.updateQueue=L.updateQueue,F.flags&=-2053,L.lanes&=~it,tr(L,F,it)):(tn&&W&&zl(F),F.flags|=1,Fn(L,F,J,it),F.child)}function Ep(L,F,W,J,it){if(L===null){var lt=W.type;return typeof lt=="function"&&!Gc(lt)&<.defaultProps===void 0&&W.compare===null&&W.defaultProps===void 0?(F.tag=15,F.type=lt,Mp(L,F,lt,J,it)):(L=af(W.type,null,J,F,F.mode,it),L.ref=F.ref,L.return=F,F.child=L)}if(lt=L.child,!(L.lanes&it)){var wt=lt.memoizedProps;if(W=W.compare,W=W!==null?W:xn,W(wt,J)&&L.ref===F.ref)return tr(L,F,it)}return F.flags|=1,L=$a(lt,J),L.ref=F.ref,L.return=F,F.child=L}function Mp(L,F,W,J,it){if(L!==null&&xn(L.memoizedProps,J)&&L.ref===F.ref)if(ss=!1,(L.lanes&it)!==0)L.flags&131072&&(ss=!0);else return F.lanes=L.lanes,tr(L,F,it);return js(L,F,W,J,it)}function Cp(L,F,W){var J=F.pendingProps,it=J.children,lt=L!==null?L.memoizedState:null;if(J.mode==="hidden")if(!(F.mode&1))F.memoizedState={baseLanes:0,cachePool:null},Se(jl,ls),ls|=W;else if(W&1073741824)F.memoizedState={baseLanes:0,cachePool:null},J=lt!==null?lt.baseLanes:W,Se(jl,ls),ls|=J;else return L=lt!==null?lt.baseLanes|W:W,F.lanes=F.childLanes=1073741824,F.memoizedState={baseLanes:L,cachePool:null},F.updateQueue=null,Se(jl,ls),ls|=L,null;else lt!==null?(J=lt.baseLanes|W,F.memoizedState=null):J=W,Se(jl,ls),ls|=J;return Fn(L,F,it,W),F.child}function wp(L,F){var W=F.ref;(L===null&&W!==null||L!==null&&L.ref!==W)&&(F.flags|=512,F.flags|=2097152)}function js(L,F,W,J,it){var lt=mn(W)?Ni:gi.current;return lt=Vn(F,lt),Ys(F,it),W=me(L,F,W,J,lt,it),J=be(),L!==null&&!ss?(F.updateQueue=L.updateQueue,F.flags&=-2053,L.lanes&=~it,tr(L,F,it)):(tn&&J&&zl(F),F.flags|=1,Fn(L,F,W,it),F.child)}function Ap(L,F,W,J,it){if(mn(W)){var lt=!0;En(F)}else lt=!1;if(Ys(F,it),F.stateNode===null)L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),$o(F,W,J),Va(F,W,J,it),J=!0;else if(L===null){var wt=F.stateNode,Xt=F.memoizedProps;wt.props=Xt;var oe=wt.context,Ee=W.contextType;typeof Ee=="object"&&Ee!==null?Ee=_i(Ee):(Ee=mn(W)?Ni:gi.current,Ee=Vn(F,Ee));var We=W.getDerivedStateFromProps,mi=typeof We=="function"||typeof wt.getSnapshotBeforeUpdate=="function";mi||typeof wt.UNSAFE_componentWillReceiveProps!="function"&&typeof wt.componentWillReceiveProps!="function"||(Xt!==J||oe!==Ee)&&Zo(F,wt,J,Ee),Sn=!1;var _e=F.memoizedState;wt.state=_e,Yr(F,J,wt,it),oe=F.memoizedState,Xt!==J||_e!==oe||cn.current||Sn?(typeof We=="function"&&(ts(F,W,We,J),oe=F.memoizedState),(Xt=Sn||Ul(F,W,Xt,J,_e,oe,Ee))?(mi||typeof wt.UNSAFE_componentWillMount!="function"&&typeof wt.componentWillMount!="function"||(typeof wt.componentWillMount=="function"&&wt.componentWillMount(),typeof wt.UNSAFE_componentWillMount=="function"&&wt.UNSAFE_componentWillMount()),typeof wt.componentDidMount=="function"&&(F.flags|=4194308)):(typeof wt.componentDidMount=="function"&&(F.flags|=4194308),F.memoizedProps=J,F.memoizedState=oe),wt.props=J,wt.state=oe,wt.context=Ee,J=Xt):(typeof wt.componentDidMount=="function"&&(F.flags|=4194308),J=!1)}else{wt=F.stateNode,za(L,F),Xt=F.memoizedProps,Ee=F.type===F.elementType?Xt:bn(F.type,Xt),wt.props=Ee,mi=F.pendingProps,_e=wt.context,oe=W.contextType,typeof oe=="object"&&oe!==null?oe=_i(oe):(oe=mn(W)?Ni:gi.current,oe=Vn(F,oe));var en=W.getDerivedStateFromProps;(We=typeof en=="function"||typeof wt.getSnapshotBeforeUpdate=="function")||typeof wt.UNSAFE_componentWillReceiveProps!="function"&&typeof wt.componentWillReceiveProps!="function"||(Xt!==mi||_e!==oe)&&Zo(F,wt,J,oe),Sn=!1,_e=F.memoizedState,wt.state=_e,Yr(F,J,wt,it);var Ye=F.memoizedState;Xt!==mi||_e!==Ye||cn.current||Sn?(typeof en=="function"&&(ts(F,W,en,J),Ye=F.memoizedState),(Ee=Sn||Ul(F,W,Ee,J,_e,Ye,oe)||!1)?(We||typeof wt.UNSAFE_componentWillUpdate!="function"&&typeof wt.componentWillUpdate!="function"||(typeof wt.componentWillUpdate=="function"&&wt.componentWillUpdate(J,Ye,oe),typeof wt.UNSAFE_componentWillUpdate=="function"&&wt.UNSAFE_componentWillUpdate(J,Ye,oe)),typeof wt.componentDidUpdate=="function"&&(F.flags|=4),typeof wt.getSnapshotBeforeUpdate=="function"&&(F.flags|=1024)):(typeof wt.componentDidUpdate!="function"||Xt===L.memoizedProps&&_e===L.memoizedState||(F.flags|=4),typeof wt.getSnapshotBeforeUpdate!="function"||Xt===L.memoizedProps&&_e===L.memoizedState||(F.flags|=1024),F.memoizedProps=J,F.memoizedState=Ye),wt.props=J,wt.state=Ye,wt.context=oe,J=Ee):(typeof wt.componentDidUpdate!="function"||Xt===L.memoizedProps&&_e===L.memoizedState||(F.flags|=4),typeof wt.getSnapshotBeforeUpdate!="function"||Xt===L.memoizedProps&&_e===L.memoizedState||(F.flags|=1024),J=!1)}return yc(L,F,W,J,lt,it)}function yc(L,F,W,J,it,lt){wp(L,F);var wt=(F.flags&128)!==0;if(!J&&!wt)return it&&la(F,W,!1),tr(L,F,lt);J=F.stateNode,Hg.current=F;var Xt=wt&&typeof W.getDerivedStateFromError!="function"?null:J.render();return F.flags|=1,L!==null&&wt?(F.child=Vr(F,L.child,null,lt),F.child=Vr(F,null,Xt,lt)):Fn(L,F,Xt,lt),F.memoizedState=J.state,it&&la(F,W,!0),F.child}function Pp(L){var F=L.stateNode;F.pendingContext?pr(L,F.pendingContext,F.pendingContext!==F.context):F.context&&pr(L,F.context,!1),pt(L,F.containerInfo)}function Rp(L,F,W,J,it){return go(),Ha(it),F.flags|=256,Fn(L,F,W,J),F.child}var Yu={dehydrated:null,treeContext:null,retryLane:0};function As(L){return{baseLanes:L,cachePool:null}}function bp(L,F,W){var J=F.pendingProps,it=ct.current,lt=!1,wt=(F.flags&128)!==0,Xt;if((Xt=wt)||(Xt=L!==null&&L.memoizedState===null?!1:(it&2)!==0),Xt?(lt=!0,F.flags&=-129):(L===null||L.memoizedState!==null)&&(it|=1),Se(ct,it&1),L===null)return pn(F),L=F.memoizedState,L!==null&&(L=L.dehydrated,L!==null)?(F.mode&1?oa(L)?F.lanes=8:F.lanes=1073741824:F.lanes=1,null):(it=J.children,L=J.fallback,lt?(J=F.mode,lt=F.child,it={mode:"hidden",children:it},!(J&1)&<!==null?(lt.childLanes=0,lt.pendingProps=it):lt=jh(it,J,0,null),L=Fo(L,J,W,null),lt.return=F,L.return=F,lt.sibling=L,F.child=lt,F.child.memoizedState=As(W),F.memoizedState=Yu,L):xc(F,it));if(it=L.memoizedState,it!==null){if(Xt=it.dehydrated,Xt!==null){if(wt)return F.flags&256?(F.flags&=-257,ku(L,F,W,Error(s(422)))):F.memoizedState!==null?(F.child=L.child,F.flags|=128,null):(lt=J.fallback,it=F.mode,J=jh({mode:"visible",children:J.children},it,0,null),lt=Fo(lt,it,W,null),lt.flags|=2,J.return=F,lt.return=F,J.sibling=lt,F.child=J,F.mode&1&&Vr(F,L.child,null,W),F.child.memoizedState=As(W),F.memoizedState=Yu,lt);if(!(F.mode&1))F=ku(L,F,W,null);else if(oa(Xt))F=ku(L,F,W,Error(s(419)));else if(J=(W&L.childLanes)!==0,ss||J){if(J=Xn,J!==null){switch(W&-W){case 4:lt=2;break;case 16:lt=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:lt=32;break;case 536870912:lt=268435456;break;default:lt=0}J=lt&(J.suspendedLanes|W)?0:lt,J!==0&&J!==it.retryLane&&(it.retryLane=J,Ps(L,J,-1))}nf(),F=ku(L,F,W,Error(s(421)))}else ba(Xt)?(F.flags|=128,F.child=L.child,F=Lo.bind(null,L),Us(Xt,F),F=null):(W=it.treeContext,gt&&(Wn=zs(Xt),Qn=F,tn=!0,ns=null,mo=!1,W!==null&&(ar[or++]=Ms,ar[or++]=is,ar[or++]=ca,Ms=W.id,is=W.overflow,ca=F)),F=xc(F,F.pendingProps.children),F.flags|=4096);return F}return lt?(J=Fp(L,F,J.children,J.fallback,W),lt=F.child,it=L.child.memoizedState,lt.memoizedState=it===null?As(W):{baseLanes:it.baseLanes|W,cachePool:null},lt.childLanes=L.childLanes&~W,F.memoizedState=Yu,J):(W=Lp(L,F,J.children,W),F.memoizedState=null,W)}return lt?(J=Fp(L,F,J.children,J.fallback,W),lt=F.child,it=L.child.memoizedState,lt.memoizedState=it===null?As(W):{baseLanes:it.baseLanes|W,cachePool:null},lt.childLanes=L.childLanes&~W,F.memoizedState=Yu,J):(W=Lp(L,F,J.children,W),F.memoizedState=null,W)}function xc(L,F){return F=jh({mode:"visible",children:F},L.mode,0,null),F.return=L,L.child=F}function Lp(L,F,W,J){var it=L.child;return L=it.sibling,W=$a(it,{mode:"visible",children:W}),!(F.mode&1)&&(W.lanes=J),W.return=F,W.sibling=null,L!==null&&(J=F.deletions,J===null?(F.deletions=[L],F.flags|=16):J.push(L)),F.child=W}function Fp(L,F,W,J,it){var lt=F.mode;L=L.child;var wt=L.sibling,Xt={mode:"hidden",children:W};return!(lt&1)&&F.child!==L?(W=F.child,W.childLanes=0,W.pendingProps=Xt,F.deletions=null):(W=$a(L,Xt),W.subtreeFlags=L.subtreeFlags&14680064),wt!==null?J=$a(wt,J):(J=Fo(J,lt,it,null),J.flags|=2),J.return=F,W.return=F,W.sibling=J,F.child=W,J}function ku(L,F,W,J){return J!==null&&Ha(J),Vr(F,L.child,null,W),L=xc(F,F.pendingProps.children),L.flags|=2,F.memoizedState=null,L}function Eo(L,F,W){L.lanes|=F;var J=L.alternate;J!==null&&(J.lanes|=F),Ua(L.return,F,W)}function Sc(L,F,W,J,it){var lt=L.memoizedState;lt===null?L.memoizedState={isBackwards:F,rendering:null,renderingStartTime:0,last:J,tail:W,tailMode:it}:(lt.isBackwards=F,lt.rendering=null,lt.renderingStartTime=0,lt.last=J,lt.tail=W,lt.tailMode=it)}function Op(L,F,W){var J=F.pendingProps,it=J.revealOrder,lt=J.tail;if(Fn(L,F,J.children,W),J=ct.current,J&2)J=J&1|2,F.flags|=128;else{if(L!==null&&L.flags&128)t:for(L=F.child;L!==null;){if(L.tag===13)L.memoizedState!==null&&Eo(L,W,F);else if(L.tag===19)Eo(L,W,F);else if(L.child!==null){L.child.return=L,L=L.child;continue}if(L===F)break t;for(;L.sibling===null;){if(L.return===null||L.return===F)break t;L=L.return}L.sibling.return=L.return,L=L.sibling}J&=1}if(Se(ct,J),!(F.mode&1))F.memoizedState=null;else switch(it){case"forwards":for(W=F.child,it=null;W!==null;)L=W.alternate,L!==null&&St(L)===null&&(it=W),W=W.sibling;W=it,W===null?(it=F.child,F.child=null):(it=W.sibling,W.sibling=null),Sc(F,!1,it,W,lt);break;case"backwards":for(W=null,it=F.child,F.child=null;it!==null;){if(L=it.alternate,L!==null&&St(L)===null){F.child=it;break}L=it.sibling,it.sibling=W,W=it,it=L}Sc(F,!0,W,null,lt);break;case"together":Sc(F,!1,null,null,void 0);break;default:F.memoizedState=null}return F.child}function tr(L,F,W){if(L!==null&&(F.dependencies=L.dependencies),$l|=F.lanes,!(W&F.childLanes))return null;if(L!==null&&F.child!==L.child)throw Error(s(153));if(F.child!==null){for(L=F.child,W=$a(L,L.pendingProps),F.child=W,W.return=F;L.sibling!==null;)L=L.sibling,W=W.sibling=$a(L,L.pendingProps),W.return=F;W.sibling=null}return F.child}function Wg(L,F,W){switch(F.tag){case 3:Pp(F),go();break;case 5:Nt(F);break;case 1:mn(F.type)&&En(F);break;case 4:pt(F,F.stateNode.containerInfo);break;case 10:Il(F,F.type._context,F.memoizedProps.value);break;case 13:var J=F.memoizedState;if(J!==null)return J.dehydrated!==null?(Se(ct,ct.current&1),F.flags|=128,null):W&F.child.childLanes?bp(L,F,W):(Se(ct,ct.current&1),L=tr(L,F,W),L!==null?L.sibling:null);Se(ct,ct.current&1);break;case 19:if(J=(W&F.childLanes)!==0,L.flags&128){if(J)return Op(L,F,W);F.flags|=128}var it=F.memoizedState;if(it!==null&&(it.rendering=null,it.tail=null,it.lastEffect=null),Se(ct,ct.current),J)break;return null;case 22:case 23:return F.lanes=0,Cp(L,F,W)}return tr(L,F,W)}function Xg(L,F){switch(lr(F),F.tag){case 1:return mn(F.type)&&Ki(),L=F.flags,L&65536?(F.flags=L&-65537|128,F):null;case 3:return Mt(),ei(cn),ei(gi),Ft(),L=F.flags,L&65536&&!(L&128)?(F.flags=L&-65537|128,F):null;case 5:return zt(F),null;case 13:if(ei(ct),L=F.memoizedState,L!==null&&L.dehydrated!==null){if(F.alternate===null)throw Error(s(340));go()}return L=F.flags,L&65536?(F.flags=L&-65537|128,F):null;case 19:return ei(ct),null;case 4:return Mt(),null;case 10:return Nl(F.type._context),null;case 22:case 23:return Dc(),null;case 24:return null;default:return null}}var ju=!1,el=!1,Yg=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function Uh(L,F){var W=L.ref;if(W!==null)if(typeof W=="function")try{W(null)}catch(J){Rr(L,F,J)}else W.current=null}function Tc(L,F,W){try{W()}catch(J){Rr(L,F,J)}}var Dp=!1;function Ec(L,F){for(X(L.containerInfo),Ie=F;Ie!==null;)if(L=Ie,F=L.child,(L.subtreeFlags&1028)!==0&&F!==null)F.return=L,Ie=F;else for(;Ie!==null;){L=Ie;try{var W=L.alternate;if(L.flags&1024)switch(L.tag){case 0:case 11:case 15:break;case 1:if(W!==null){var J=W.memoizedProps,it=W.memoizedState,lt=L.stateNode,wt=lt.getSnapshotBeforeUpdate(L.elementType===L.type?J:bn(L.type,J),it);lt.__reactInternalSnapshotBeforeUpdate=wt}break;case 3:ot&&Ce(L.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Xt){Rr(L,L.return,Xt)}if(F=L.sibling,F!==null){F.return=L.return,Ie=F;break}Ie=L.return}return W=Dp,Dp=!1,W}function Ks(L,F,W){var J=F.updateQueue;if(J=J!==null?J.lastEffect:null,J!==null){var it=J=J.next;do{if((it.tag&L)===L){var lt=it.destroy;it.destroy=void 0,lt!==void 0&&Tc(F,W,lt)}it=it.next}while(it!==J)}}function Mo(L,F){if(F=F.updateQueue,F=F!==null?F.lastEffect:null,F!==null){var W=F=F.next;do{if((W.tag&L)===L){var J=W.create;W.destroy=J()}W=W.next}while(W!==F)}}function Mc(L){var F=L.ref;if(F!==null){var W=L.stateNode;switch(L.tag){case 5:L=B(W);break;default:L=W}typeof F=="function"?F(L):F.current=L}}function Cc(L,F,W){if(Sr&&typeof Sr.onCommitFiberUnmount=="function")try{Sr.onCommitFiberUnmount(po,F)}catch{}switch(F.tag){case 0:case 11:case 14:case 15:if(L=F.updateQueue,L!==null&&(L=L.lastEffect,L!==null)){var J=L=L.next;do{var it=J,lt=it.destroy;it=it.tag,lt!==void 0&&(it&2||it&4)&&Tc(F,W,lt),J=J.next}while(J!==L)}break;case 1:if(Uh(F,W),L=F.stateNode,typeof L.componentWillUnmount=="function")try{L.props=F.memoizedProps,L.state=F.memoizedState,L.componentWillUnmount()}catch(wt){Rr(F,W,wt)}break;case 5:Uh(F,W);break;case 4:ot?Ac(L,F,W):rt&&rt&&(F=F.stateNode.containerInfo,W=He(F),Ii(F,W))}}function Ip(L,F,W){for(var J=F;;)if(Cc(L,J,W),J.child===null||ot&&J.tag===4){if(J===F)break;for(;J.sibling===null;){if(J.return===null||J.return===F)return;J=J.return}J.sibling.return=J.return,J=J.sibling}else J.child.return=J,J=J.child}function va(L){var F=L.alternate;F!==null&&(L.alternate=null,va(F)),L.child=null,L.deletions=null,L.sibling=null,L.tag===5&&(F=L.stateNode,F!==null&&Pt(F)),L.stateNode=null,L.return=null,L.dependencies=null,L.memoizedProps=null,L.memoizedState=null,L.pendingProps=null,L.stateNode=null,L.updateQueue=null}function Ku(L){return L.tag===5||L.tag===3||L.tag===4}function Co(L){t:for(;;){for(;L.sibling===null;){if(L.return===null||Ku(L.return))return null;L=L.return}for(L.sibling.return=L.return,L=L.sibling;L.tag!==5&&L.tag!==6&&L.tag!==18;){if(L.flags&2||L.child===null||L.tag===4)continue t;L.child.return=L,L=L.child}if(!(L.flags&2))return L.stateNode}}function as(L){if(ot){t:{for(var F=L.return;F!==null;){if(Ku(F))break t;F=F.return}throw Error(s(160))}var W=F;switch(W.tag){case 5:F=W.stateNode,W.flags&32&&(si(F),W.flags&=-33),W=Co(L),$u(L,W,F);break;case 3:case 4:F=W.stateNode.containerInfo,W=Co(L),wc(L,W,F);break;default:throw Error(s(161))}}}function wc(L,F,W){var J=L.tag;if(J===5||J===6)L=L.stateNode,F?Le(W,L,F):Pe(W,L);else if(J!==4&&(L=L.child,L!==null))for(wc(L,F,W),L=L.sibling;L!==null;)wc(L,F,W),L=L.sibling}function $u(L,F,W){var J=L.tag;if(J===5||J===6)L=L.stateNode,F?Ue(W,L,F):xe(W,L);else if(J!==4&&(L=L.child,L!==null))for($u(L,F,W),L=L.sibling;L!==null;)$u(L,F,W),L=L.sibling}function Ac(L,F,W){for(var J=F,it=!1,lt,wt;;){if(!it){it=J.return;t:for(;;){if(it===null)throw Error(s(160));switch(lt=it.stateNode,it.tag){case 5:wt=!1;break t;case 3:lt=lt.containerInfo,wt=!0;break t;case 4:lt=lt.containerInfo,wt=!0;break t}it=it.return}it=!0}if(J.tag===5||J.tag===6)Ip(L,J,W),wt?Ke(lt,J.stateNode):ne(lt,J.stateNode);else if(J.tag===18)wt?ee(lt,J.stateNode):ie(lt,J.stateNode);else if(J.tag===4){if(J.child!==null){lt=J.stateNode.containerInfo,wt=!0,J.child.return=J,J=J.child;continue}}else if(Cc(L,J,W),J.child!==null){J.child.return=J,J=J.child;continue}if(J===F)break;for(;J.sibling===null;){if(J.return===null||J.return===F)return;J=J.return,J.tag===4&&(it=!1)}J.sibling.return=J.return,J=J.sibling}}function il(L,F){if(ot){switch(F.tag){case 0:case 11:case 14:case 15:Ks(3,F,F.return),Mo(3,F),Ks(5,F,F.return);return;case 1:return;case 5:var W=F.stateNode;if(W!=null){var J=F.memoizedProps;L=L!==null?L.memoizedProps:J;var it=F.type,lt=F.updateQueue;F.updateQueue=null,lt!==null&&De(W,lt,it,L,J,F)}return;case 6:if(F.stateNode===null)throw Error(s(162));W=F.memoizedProps,te(F.stateNode,L!==null?L.memoizedProps:W,W);return;case 3:gt&&L!==null&&L.memoizedState.isDehydrated&&$t(F.stateNode.containerInfo);return;case 12:return;case 13:$s(F);return;case 19:$s(F);return;case 17:return}throw Error(s(163))}switch(F.tag){case 0:case 11:case 14:case 15:Ks(3,F,F.return),Mo(3,F),Ks(5,F,F.return);return;case 12:return;case 13:$s(F);return;case 19:$s(F);return;case 3:gt&&L!==null&&L.memoizedState.isDehydrated&&$t(F.stateNode.containerInfo);break;case 22:case 23:return}t:if(rt){switch(F.tag){case 1:case 5:case 6:break t;case 3:case 4:F=F.stateNode,Ii(F.containerInfo,F.pendingChildren);break t}throw Error(s(163))}}function $s(L){var F=L.updateQueue;if(F!==null){L.updateQueue=null;var W=L.stateNode;W===null&&(W=L.stateNode=new Yg),F.forEach(function(J){var it=Wp.bind(null,L,J);W.has(J)||(W.add(J),J.then(it,it))})}}function Np(L,F){for(Ie=F;Ie!==null;){F=Ie;var W=F.deletions;if(W!==null)for(var J=0;J";case Gh:return":has("+(Vh(L)||"")+")";case os:return'[role="'+L.value+'"]';case nl:return'"'+L.value+'"';case Yl:return'[data-testname="'+L.value+'"]';default:throw Error(s(365))}}function Up(L,F){var W=[];L=[L,0];for(var J=0;Jit&&(it=wt),J&=~lt}if(J=it,J=sn()-J,J=(120>J?120:480>J?480:1080>J?1080:1920>J?1920:3e3>J?3e3:4320>J?4320:1960*jg(J/1960))-J,10L?16:L,Ka===null)var J=!1;else{if(L=Ka,Ka=null,Xh=0,Ci&6)throw Error(s(331));var it=Ci;for(Ci|=4,Ie=L.current;Ie!==null;){var lt=Ie,wt=lt.child;if(Ie.flags&16){var Xt=lt.deletions;if(Xt!==null){for(var oe=0;oesn()-Fc?ga(L,0):Lc|=W),ii(L,F)}function Hp(L,F){F===0&&(L.mode&1?(F=fo,fo<<=1,!(fo&130023424)&&(fo=4194304)):F=1);var W=Ar();L=Ql(L,F),L!==null&&(Ws(L,F,W),ii(L,W))}function Lo(L){var F=L.memoizedState,W=0;F!==null&&(W=F.retryLane),Hp(L,W)}function Wp(L,F){var W=0;switch(L.tag){case 13:var J=L.stateNode,it=L.memoizedState;it!==null&&(W=it.retryLane);break;case 19:J=L.stateNode;break;default:throw Error(s(314))}J!==null&&J.delete(F),Hp(L,W)}var zc;zc=function(L,F,W){if(L!==null)if(L.memoizedProps!==F.pendingProps||cn.current)ss=!0;else{if(!(L.lanes&W)&&!(F.flags&128))return ss=!1,Wg(L,F,W);ss=!!(L.flags&131072)}else ss=!1,tn&&F.flags&1048576&&Rh(F,Jo,F.index);switch(F.lanes=0,F.tag){case 2:var J=F.type;L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),L=F.pendingProps;var it=Vn(F,gi.current);Ys(F,W),it=me(null,F,J,L,it,W);var lt=be();return F.flags|=1,typeof it=="object"&&it!==null&&typeof it.render=="function"&&it.$$typeof===void 0?(F.tag=1,F.memoizedState=null,F.updateQueue=null,mn(J)?(lt=!0,En(F)):lt=!1,F.memoizedState=it.state!==null&&it.state!==void 0?it.state:null,Hn(F),it.updater=vo,F.stateNode=it,it._reactInternals=F,Va(F,J,L,W),F=yc(null,F,J,!0,lt,W)):(F.tag=0,tn&<&&zl(F),Fn(null,F,it,W),F=F.child),F;case 16:J=F.elementType;t:{switch(L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),L=F.pendingProps,it=J._init,J=it(J._payload),F.type=J,it=F.tag=Xp(J),L=bn(J,L),it){case 0:F=js(null,F,J,L,W);break t;case 1:F=Ap(null,F,J,L,W);break t;case 11:F=Tp(null,F,J,L,W);break t;case 14:F=Ep(null,F,J,bn(J.type,L),W);break t}throw Error(s(306,J,""))}return F;case 0:return J=F.type,it=F.pendingProps,it=F.elementType===J?it:bn(J,it),js(L,F,J,it,W);case 1:return J=F.type,it=F.pendingProps,it=F.elementType===J?it:bn(J,it),Ap(L,F,J,it,W);case 3:t:{if(Pp(F),L===null)throw Error(s(387));J=F.pendingProps,lt=F.memoizedState,it=lt.element,za(L,F),Yr(F,J,null,W);var wt=F.memoizedState;if(J=wt.element,gt&<.isDehydrated)if(lt={element:J,isDehydrated:!1,cache:wt.cache,transitions:wt.transitions},F.updateQueue.baseState=lt,F.memoizedState=lt,F.flags&256){it=Error(s(423)),F=Rp(L,F,J,W,it);break t}else if(J!==it){it=Error(s(424)),F=Rp(L,F,J,W,it);break t}else for(gt&&(Wn=qr(F.stateNode.containerInfo),Qn=F,tn=!0,ns=null,mo=!1),W=bh(F,null,J,W),F.child=W;W;)W.flags=W.flags&-3|4096,W=W.sibling;else{if(go(),J===it){F=tr(L,F,W);break t}Fn(L,F,J,W)}F=F.child}return F;case 5:return Nt(F),L===null&&pn(F),J=F.type,it=F.pendingProps,lt=L!==null?L.memoizedProps:null,wt=it.children,U(J,it)?wt=null:lt!==null&&U(J,lt)&&(F.flags|=32),wp(L,F),Fn(L,F,wt,W),F.child;case 6:return L===null&&pn(F),null;case 13:return bp(L,F,W);case 4:return pt(F,F.stateNode.containerInfo),J=F.pendingProps,L===null?F.child=Vr(F,null,J,W):Fn(L,F,J,W),F.child;case 11:return J=F.type,it=F.pendingProps,it=F.elementType===J?it:bn(J,it),Tp(L,F,J,it,W);case 7:return Fn(L,F,F.pendingProps,W),F.child;case 8:return Fn(L,F,F.pendingProps.children,W),F.child;case 12:return Fn(L,F,F.pendingProps.children,W),F.child;case 10:t:{if(J=F.type._context,it=F.pendingProps,lt=F.memoizedProps,wt=it.value,Il(F,J,wt),lt!==null)if(Es(lt.value,wt)){if(lt.children===it.children&&!cn.current){F=tr(L,F,W);break t}}else for(lt=F.child,lt!==null&&(lt.return=F);lt!==null;){var Xt=lt.dependencies;if(Xt!==null){wt=lt.child;for(var oe=Xt.firstContext;oe!==null;){if(oe.context===J){if(lt.tag===1){oe=Cn(-1,W&-W),oe.tag=2;var Ee=lt.updateQueue;if(Ee!==null){Ee=Ee.shared;var We=Ee.pending;We===null?oe.next=oe:(oe.next=We.next,We.next=oe),Ee.pending=oe}}lt.lanes|=W,oe=lt.alternate,oe!==null&&(oe.lanes|=W),Ua(lt.return,W,F),Xt.lanes|=W;break}oe=oe.next}}else if(lt.tag===10)wt=lt.type===F.type?null:lt.child;else if(lt.tag===18){if(wt=lt.return,wt===null)throw Error(s(341));wt.lanes|=W,Xt=wt.alternate,Xt!==null&&(Xt.lanes|=W),Ua(wt,W,F),wt=lt.sibling}else wt=lt.child;if(wt!==null)wt.return=lt;else for(wt=lt;wt!==null;){if(wt===F){wt=null;break}if(lt=wt.sibling,lt!==null){lt.return=wt.return,wt=lt;break}wt=wt.return}lt=wt}Fn(L,F,it.children,W),F=F.child}return F;case 9:return it=F.type,J=F.pendingProps.children,Ys(F,W),it=_i(it),J=J(it),F.flags|=1,Fn(L,F,J,W),F.child;case 14:return J=F.type,it=bn(J,F.pendingProps),it=bn(J.type,it),Ep(L,F,J,it,W);case 15:return Mp(L,F,F.type,F.pendingProps,W);case 17:return J=F.type,it=F.pendingProps,it=F.elementType===J?it:bn(J,it),L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),F.tag=1,mn(J)?(L=!0,En(F)):L=!1,Ys(F,W),$o(F,J,it),Va(F,J,it,W),yc(null,F,J,!0,L,W);case 19:return Op(L,F,W);case 22:return Cp(L,F,W)}throw Error(s(156,F.tag))};function sf(L,F){return Ur(L,F)}function Kg(L,F,W,J){this.tag=L,this.key=W,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=F,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=J,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rs(L,F,W,J){return new Kg(L,F,W,J)}function Gc(L){return L=L.prototype,!(!L||!L.isReactComponent)}function Xp(L){if(typeof L=="function")return Gc(L)?1:0;if(L!=null){if(L=L.$$typeof,L===u)return 11;if(L===c)return 14}return 2}function $a(L,F){var W=L.alternate;return W===null?(W=Rs(L.tag,F,L.key,L.mode),W.elementType=L.elementType,W.type=L.type,W.stateNode=L.stateNode,W.alternate=L,L.alternate=W):(W.pendingProps=F,W.type=L.type,W.flags=0,W.subtreeFlags=0,W.deletions=null),W.flags=L.flags&14680064,W.childLanes=L.childLanes,W.lanes=L.lanes,W.child=L.child,W.memoizedProps=L.memoizedProps,W.memoizedState=L.memoizedState,W.updateQueue=L.updateQueue,F=L.dependencies,W.dependencies=F===null?null:{lanes:F.lanes,firstContext:F.firstContext},W.sibling=L.sibling,W.index=L.index,W.ref=L.ref,W}function af(L,F,W,J,it,lt){var wt=2;if(J=L,typeof L=="function")Gc(L)&&(wt=1);else if(typeof L=="string")wt=5;else t:switch(L){case d:return Fo(W.children,it,lt,F);case h:wt=8,it|=8;break;case a:return L=Rs(12,W,F,it|2),L.elementType=a,L.lanes=lt,L;case f:return L=Rs(13,W,F,it),L.elementType=f,L.lanes=lt,L;case o:return L=Rs(19,W,F,it),L.elementType=o,L.lanes=lt,L;case v:return jh(W,it,lt,F);default:if(typeof L=="object"&&L!==null)switch(L.$$typeof){case l:wt=10;break t;case n:wt=9;break t;case u:wt=11;break t;case c:wt=14;break t;case p:wt=16,J=null;break t}throw Error(s(130,L==null?L:typeof L,""))}return F=Rs(wt,W,F,it),F.elementType=L,F.type=J,F.lanes=lt,F}function Fo(L,F,W,J){return L=Rs(7,L,J,F),L.lanes=W,L}function jh(L,F,W,J){return L=Rs(22,L,J,F),L.elementType=v,L.lanes=W,L.stateNode={},L}function br(L,F,W){return L=Rs(6,L,null,F),L.lanes=W,L}function bs(L,F,W){return F=Rs(4,L.children!==null?L.children:[],L.key,F),F.lanes=W,F.stateNode={containerInfo:L.containerInfo,pendingChildren:null,implementation:L.implementation},F}function $g(L,F,W,J,it){this.tag=F,this.containerInfo=L,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=q,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hs(0),this.expirationTimes=Hs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hs(0),this.identifierPrefix=J,this.onRecoverableError=it,gt&&(this.mutableSourceEagerHydrationData=null)}function Yp(L,F,W,J,it,lt,wt,Xt,oe){return L=new $g(L,F,W,Xt,oe),F===1?(F=1,lt===!0&&(F|=8)):F=0,lt=Rs(3,null,null,F),L.current=lt,lt.stateNode=L,lt.memoizedState={element:J,isDehydrated:W,cache:null,transitions:null},Hn(lt),L}function Kh(L){if(!L)return Br;L=L._reactInternals;t:{if(C(L)!==L||L.tag!==1)throw Error(s(170));var F=L;do{switch(F.tag){case 3:F=F.stateNode.context;break t;case 1:if(mn(F.type)){F=F.stateNode.__reactInternalMemoizedMergedChildContext;break t}}F=F.return}while(F!==null);throw Error(s(171))}if(L.tag===1){var W=L.type;if(mn(W))return Gs(L,W,F)}return F}function al(L){var F=L._reactInternals;if(F===void 0)throw typeof L.render=="function"?Error(s(188)):(L=Object.keys(L).join(","),Error(s(268,L)));return L=b(F),L===null?null:L.stateNode}function Vc(L,F){if(L=L.memoizedState,L!==null&&L.dehydrated!==null){var W=L.retryLane;L.retryLane=W!==0&&W=Ee&<>=mi&&it<=We&&wt<=_e){L.splice(F,1);break}else if(J!==Ee||W.width!==oe.width||_ewt){if(!(lt!==mi||W.height!==oe.height||Weit)){Ee>J&&(oe.width+=Ee-J,oe.x=J),Welt&&(oe.height+=mi-lt,oe.y=lt),_eW&&(W=wt)),wt ")+` No matching component was found for: - `)+L.join(" > ")}return null},i.getPublicRootInstance=function(L){if(L=L.current,!L.child)return null;switch(L.child.tag){case 5:return B(L.child.stateNode);default:return L.child.stateNode}},i.injectIntoDevTools=function(L){if(L={bundleType:L.bundleType,version:L.version,rendererPackageName:L.rendererPackageName,rendererConfig:L.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:y.ReactCurrentDispatcher,findHostInstanceByFiber:Kg,findFiberByHostInstance:L.findFiberByHostInstance||Yp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")L=!1;else{var F=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(F.isDisabled||!F.supportsFiber)L=!0;else{try{po=F.inject(L),Sr=F}catch{}L=!!F.checkDCE}}return L},i.isAlreadyRendering=function(){return!1},i.observeVisibleRects=function(L,F,W,J){if(!ut)throw Error(s(363));L=bc(L,F);var it=ge(L,W,J).disconnect;return{disconnect:function(){it()}}},i.registerMutableSourceForHydration=function(L,F){var W=F._getVersion;W=W(F._source),L.mutableSourceEagerHydrationData==null?L.mutableSourceEagerHydrationData=[F,W]:L.mutableSourceEagerHydrationData.push(F,W)},i.runWithPriority=function(L,F){var W=Bi;try{return Bi=L,F()}finally{Bi=W}},i.shouldError=function(){return null},i.shouldSuspend=function(){return!1},i.updateContainer=function(L,F,W,J){var it=F.current,lt=Ar(),wt=ma(it);return W=Zh(W),F.context===null?F.context=W:F.pendingContext=W,F=Cn(lt,wt),F.payload={element:L},J=J===void 0?null:J,J!==null&&(F.callback=J),Tr(it,F),L=Ps(it,wt,lt),L!==null&&ha(L,it,wt),wt},i};bA.exports=e7;var i7=bA.exports;const n7=jd(i7);var LA={exports:{}},FA={};/** + `)+L.join(" > ")}return null},i.getPublicRootInstance=function(L){if(L=L.current,!L.child)return null;switch(L.child.tag){case 5:return B(L.child.stateNode);default:return L.child.stateNode}},i.injectIntoDevTools=function(L){if(L={bundleType:L.bundleType,version:L.version,rendererPackageName:L.rendererPackageName,rendererConfig:L.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:Zg,findFiberByHostInstance:L.findFiberByHostInstance||kp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")L=!1;else{var F=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(F.isDisabled||!F.supportsFiber)L=!0;else{try{po=F.inject(L),Sr=F}catch{}L=!!F.checkDCE}}return L},i.isAlreadyRendering=function(){return!1},i.observeVisibleRects=function(L,F,W,J){if(!ut)throw Error(s(363));L=Rc(L,F);var it=ge(L,W,J).disconnect;return{disconnect:function(){it()}}},i.registerMutableSourceForHydration=function(L,F){var W=F._getVersion;W=W(F._source),L.mutableSourceEagerHydrationData==null?L.mutableSourceEagerHydrationData=[F,W]:L.mutableSourceEagerHydrationData.push(F,W)},i.runWithPriority=function(L,F){var W=Bi;try{return Bi=L,F()}finally{Bi=W}},i.shouldError=function(){return null},i.shouldSuspend=function(){return!1},i.updateContainer=function(L,F,W,J){var it=F.current,lt=Ar(),wt=ma(it);return W=Kh(W),F.context===null?F.context=W:F.pendingContext=W,F=Cn(lt,wt),F.payload={element:L},J=J===void 0?null:J,J!==null&&(F.callback=J),Tr(it,F),L=Ps(it,wt,lt),L!==null&&ha(L,it,wt),wt},i};FA.exports=qz;var t7=FA.exports;const e7=Kd(t7);var OA={exports:{}},DA={};/** * @license React * scheduler.production.min.js * @@ -10207,12 +10209,10 @@ No matching component was found for: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(g){function t(z,X){var j=z.length;z.push(X);t:for(;0>>1,tt=z[Q];if(0>>1;QT(U,j))HT($,U)?(z[Q]=$,z[H]=j,Q=H):(z[Q]=U,z[Z]=j,Q=Z);else if(HT($,j))z[Q]=$,z[H]=j,Q=H;else break t}}return X}function T(z,X){var j=z.sortIndex-X.sortIndex;return j!==0?j:z.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var E=performance;g.unstable_now=function(){return E.now()}}else{var s=Date,y=s.now();g.unstable_now=function(){return s.now()-y}}var e=[],r=[],d=1,h=null,a=3,l=!1,n=!1,u=!1,f=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(z){for(var X=i(r);X!==null;){if(X.callback===null)x(r);else if(X.startTime<=z)x(r),X.sortIndex=X.expirationTime,t(e,X);else break;X=i(r)}}function v(z){if(u=!1,p(z),!n)if(i(e)!==null)n=!0,B(m);else{var X=i(r);X!==null&&G(v,X.startTime-z)}}function m(z,X){n=!1,u&&(u=!1,o(w),w=-1),l=!0;var j=a;try{for(p(X),h=i(e);h!==null&&(!(h.expirationTime>X)||z&&!P());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,a=h.priorityLevel;var tt=Q(h.expirationTime<=X);X=g.unstable_now(),typeof tt=="function"?h.callback=tt:h===i(e)&&x(e),p(X)}else x(e);h=i(e)}if(h!==null)var Y=!0;else{var Z=i(r);Z!==null&&G(v,Z.startTime-X),Y=!1}return Y}finally{h=null,a=j,l=!1}}var S=!1,M=null,w=-1,C=5,A=-1;function P(){return!(g.unstable_now()-Az||125Q?(z.sortIndex=j,t(r,z),i(e)===null&&z===i(r)&&(u?(o(w),w=-1):u=!0,G(v,j-Q))):(z.sortIndex=tt,t(e,z),n||l||(n=!0,B(m))),z},g.unstable_shouldYield=P,g.unstable_wrapCallback=function(z){var X=a;return function(){var j=a;a=X;try{return z.apply(this,arguments)}finally{a=j}}}})(FA);LA.exports=FA;var uM=LA.exports;const $1={},r7=g=>void Object.assign($1,g);function s7(g,t){function i(d,{args:h=[],attach:a,...l},n){let u=`${d[0].toUpperCase()}${d.slice(1)}`,f;if(d==="primitive"){if(l.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const o=l.object;f=Nf(o,{type:d,root:n,attach:a,primitive:!0})}else{const o=$1[u];if(!o)throw new Error(`R3F: ${u} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(h))throw new Error("R3F: The args prop must be an array!");f=Nf(new o(...h),{type:d,root:n,attach:a,memoizedProps:{args:h}})}return f.__r3f.attach===void 0&&(f instanceof Fi?f.__r3f.attach="geometry":f instanceof Wr&&(f.__r3f.attach="material")),u!=="inject"&&dy(f,l),f}function x(d,h){let a=!1;if(h){var l,n;(l=h.__r3f)!=null&&l.attach?cy(d,h,h.__r3f.attach):h.isObject3D&&d.isObject3D&&(d.add(h),a=!0),a||(n=d.__r3f)==null||n.objects.push(h),h.__r3f||Nf(h,{}),h.__r3f.parent=d,Fx(h),Bf(h)}}function T(d,h,a){let l=!1;if(h){var n,u;if((n=h.__r3f)!=null&&n.attach)cy(d,h,h.__r3f.attach);else if(h.isObject3D&&d.isObject3D){h.parent=d,h.dispatchEvent({type:"added"}),d.dispatchEvent({type:"childadded",child:h});const f=d.children.filter(c=>c!==h),o=f.indexOf(a);d.children=[...f.slice(0,o),h,...f.slice(o)],l=!0}l||(u=d.__r3f)==null||u.objects.push(h),h.__r3f||Nf(h,{}),h.__r3f.parent=d,Fx(h),Bf(h)}}function E(d,h,a=!1){d&&[...d].forEach(l=>s(h,l,a))}function s(d,h,a){if(h){var l,n,u;if(h.__r3f&&(h.__r3f.parent=null),(l=d.__r3f)!=null&&l.objects&&(d.__r3f.objects=d.__r3f.objects.filter(v=>v!==h)),(n=h.__r3f)!=null&&n.attach)vM(d,h,h.__r3f.attach);else if(h.isObject3D&&d.isObject3D){var f;d.remove(h),(f=h.__r3f)!=null&&f.root&&d7(vm(h),h)}const c=(u=h.__r3f)==null?void 0:u.primitive,p=!c&&(a===void 0?h.dispose!==null:a);if(!c){var o;E((o=h.__r3f)==null?void 0:o.objects,h,p),E(h.children,h,p)}if(delete h.__r3f,p&&h.dispose&&h.type!=="Scene"){const v=()=>{try{h.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?uM.unstable_scheduleCallback(uM.unstable_IdlePriority,v):v()}Bf(d)}}function y(d,h,a,l){var n;const u=(n=d.__r3f)==null?void 0:n.parent;if(!u)return;const f=i(h,a,d.__r3f.root);if(d.children){for(const o of d.children)o.__r3f&&x(f,o);d.children=d.children.filter(o=>!o.__r3f)}d.__r3f.objects.forEach(o=>x(f,o)),d.__r3f.objects=[],d.__r3f.autoRemovedBeforeAppend||s(u,d),f.parent&&(f.__r3f.autoRemovedBeforeAppend=!0),x(u,f),f.raycast&&f.__r3f.eventCount&&vm(f).getState().internal.interaction.push(f),[l,l.alternate].forEach(o=>{o!==null&&(o.stateNode=f,o.ref&&(typeof o.ref=="function"?o.ref(f):o.ref.current=f))})}const e=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:n7({createInstance:i,removeChild:s,appendChild:x,appendInitialChild:x,insertBefore:T,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(d,h)=>{if(!h)return;const a=d.getState().scene;a.__r3f&&(a.__r3f.root=d,x(a,h))},removeChildFromContainer:(d,h)=>{h&&s(d.getState().scene,h)},insertInContainerBefore:(d,h,a)=>{if(!h||!a)return;const l=d.getState().scene;l.__r3f&&T(l,h,a)},getRootHostContext:()=>null,getChildHostContext:d=>d,finalizeInitialChildren(d){var h;return!!((h=d?.__r3f)!=null?h:{}).handlers},prepareUpdate(d,h,a,l){var n;if(((n=d?.__r3f)!=null?n:{}).primitive&&l.object&&l.object!==d)return[!0];{const{args:f=[],children:o,...c}=l,{args:p=[],children:v,...m}=a;if(!Array.isArray(f))throw new Error("R3F: the args prop must be an array!");if(f.some((M,w)=>M!==p[w]))return[!0];const S=zA(d,c,m,!0);return S.changes.length?[!1,S]:null}},commitUpdate(d,[h,a],l,n,u,f){h?y(d,l,u,f):dy(d,a)},commitMount(d,h,a,l){var n;const u=(n=d.__r3f)!=null?n:{};d.raycast&&u.handlers&&u.eventCount&&vm(d).getState().internal.interaction.push(d)},getPublicInstance:d=>d,prepareForCommit:()=>null,preparePortalMount:d=>Nf(d.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(d){var h;const{attach:a,parent:l}=(h=d.__r3f)!=null?h:{};a&&l&&vM(l,d,a),d.isObject3D&&(d.visible=!1),Bf(d)},unhideInstance(d,h){var a;const{attach:l,parent:n}=(a=d.__r3f)!=null?a:{};l&&n&&cy(n,d,l),(d.isObject3D&&h.visible==null||h.visible)&&(d.visible=!0),Bf(d)},createTextInstance:e,hideTextInstance:e,unhideTextInstance:e,getCurrentEventPriority:()=>t?t():jf.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&An.fun(performance.now)?performance.now:An.fun(Date.now)?Date.now:()=>0,scheduleTimeout:An.fun(setTimeout)?setTimeout:void 0,cancelTimeout:An.fun(clearTimeout)?clearTimeout:void 0}),applyProps:dy}}var fM,cM;const fy=g=>"colorSpace"in g||"outputColorSpace"in g,OA=()=>{var g;return(g=$1.ColorManagement)!=null?g:null},DA=g=>g&&g.isOrthographicCamera,a7=g=>g&&g.hasOwnProperty("current"),lp=typeof window<"u"&&((fM=window.document)!=null&&fM.createElement||((cM=window.navigator)==null?void 0:cM.product)==="ReactNative")?Me.useLayoutEffect:Me.useEffect;function IA(g){const t=Me.useRef(g);return lp(()=>void(t.current=g),[g]),t}function o7({set:g}){return lp(()=>(g(new Promise(()=>null)),()=>g(!1)),[g]),null}class NA extends Me.Component{constructor(...t){super(...t),this.state={error:!1}}componentDidCatch(t){this.props.set(t)}render(){return this.state.error?null:this.props.children}}NA.getDerivedStateFromError=()=>({error:!0});const BA="__default",dM=new Map,l7=g=>g&&!!g.memoized&&!!g.changes;function UA(g){var t;const i=typeof window<"u"?(t=window.devicePixelRatio)!=null?t:2:1;return Array.isArray(g)?Math.min(Math.max(g[0],i),g[1]):g}const sd=g=>{var t;return(t=g.__r3f)==null?void 0:t.root.getState()};function vm(g){let t=g.__r3f.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}const An={obj:g=>g===Object(g)&&!An.arr(g)&&typeof g!="function",fun:g=>typeof g=="function",str:g=>typeof g=="string",num:g=>typeof g=="number",boo:g=>typeof g=="boolean",und:g=>g===void 0,arr:g=>Array.isArray(g),equ(g,t,{arrays:i="shallow",objects:x="reference",strict:T=!0}={}){if(typeof g!=typeof t||!!g!=!!t)return!1;if(An.str(g)||An.num(g))return g===t;const E=An.obj(g);if(E&&x==="reference")return g===t;const s=An.arr(g);if(s&&i==="reference")return g===t;if((s||E)&&g===t)return!0;let y;for(y in g)if(!(y in t))return!1;if(E&&i==="shallow"&&x==="shallow"){for(y in T?t:g)if(!An.equ(g[y],t[y],{strict:T,objects:"reference"}))return!1}else for(y in T?t:g)if(g[y]!==t[y])return!1;if(An.und(y)){if(s&&g.length===0&&t.length===0||E&&Object.keys(g).length===0&&Object.keys(t).length===0)return!0;if(g!==t)return!1}return!0}};function h7(g){g.dispose&&g.type!=="Scene"&&g.dispose();for(const t in g)t.dispose==null||t.dispose(),delete g[t]}function Nf(g,t){const i=g;return i.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...t},g}function Lx(g,t){let i=g;if(t.includes("-")){const x=t.split("-"),T=x.pop();return i=x.reduce((E,s)=>E[s],g),{target:i,key:T}}else return{target:i,key:t}}const pM=/-\d+$/;function cy(g,t,i){if(An.str(i)){if(pM.test(i)){const E=i.replace(pM,""),{target:s,key:y}=Lx(g,E);Array.isArray(s[y])||(s[y]=[])}const{target:x,key:T}=Lx(g,i);t.__r3f.previousAttach=x[T],x[T]=t}else t.__r3f.previousAttach=i(g,t)}function vM(g,t,i){var x,T;if(An.str(i)){const{target:E,key:s}=Lx(g,i),y=t.__r3f.previousAttach;y===void 0?delete E[s]:E[s]=y}else(x=t.__r3f)==null||x.previousAttach==null||x.previousAttach(g,t);(T=t.__r3f)==null||delete T.previousAttach}function zA(g,{children:t,key:i,ref:x,...T},{children:E,key:s,ref:y,...e}={},r=!1){var d;const h=(d=g?.__r3f)!=null?d:{},a=Object.entries(T),l=[];if(r){const u=Object.keys(e);for(let f=0;f{var o;if((o=g.__r3f)!=null&&o.primitive&&u==="object"||An.equ(f,e[u]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(u))return l.push([u,f,!0,[]]);let c=[];u.includes("-")&&(c=u.split("-")),l.push([u,f,!1,c]);for(const p in T){const v=T[p];p.startsWith(`${u}-`)&&l.push([p,v,!1,p.split("-")])}});const n={...T};return h.memoizedProps&&h.memoizedProps.args&&(n.args=h.memoizedProps.args),h.memoizedProps&&h.memoizedProps.attach&&(n.attach=h.memoizedProps.attach),{memoized:n,changes:l}}const u7=typeof process<"u"&&!1;function dy(g,t){var i,x,T;const E=(i=g.__r3f)!=null?i:{},s=E.root,y=(x=s==null||s.getState==null?void 0:s.getState())!=null?x:{},{memoized:e,changes:r}=l7(t)?t:zA(g,t),d=E.eventCount;g.__r3f&&(g.__r3f.memoizedProps=e);for(let a=0;ap[v],g),!(c&&c.set))){const[p,...v]=f.reverse();o=v.reverse().reduce((m,S)=>m[S],g),l=p}if(n===BA+"remove")if(o.constructor){let p=dM.get(o.constructor);p||(p=new o.constructor,dM.set(o.constructor,p)),n=p[l]}else n=0;if(u)n?E.handlers[l]=n:delete E.handlers[l],E.eventCount=Object.keys(E.handlers).length;else if(c&&c.set&&(c.copy||c instanceof Cu)){if(Array.isArray(n))c.fromArray?c.fromArray(n):c.set(...n);else if(c.copy&&n&&n.constructor&&(u7?c.constructor.name===n.constructor.name:c.constructor===n.constructor))c.copy(n);else if(n!==void 0){const p=c instanceof ze;!p&&c.setScalar?c.setScalar(n):c instanceof Cu&&n instanceof Cu?c.mask=n.mask:c.set(n),!OA()&&!y.linear&&p&&c.convertSRGBToLinear()}}else if(o[l]=n,o[l]instanceof zn&&o[l].format===vs&&o[l].type===Go){const p=o[l];fy(p)&&fy(y.gl)?p.colorSpace=y.gl.outputColorSpace:p.encoding=y.gl.outputEncoding}Bf(g)}if(E.parent&&g.raycast&&d!==E.eventCount){const a=vm(g).getState().internal,l=a.interaction.indexOf(g);l>-1&&a.interaction.splice(l,1),E.eventCount&&a.interaction.push(g)}return!(r.length===1&&r[0][0]==="onUpdate")&&r.length&&(T=g.__r3f)!=null&&T.parent&&Fx(g),g}function Bf(g){var t,i;const x=(t=g.__r3f)==null||(i=t.root)==null||i.getState==null?void 0:i.getState();x&&x.internal.frames===0&&x.invalidate()}function Fx(g){g.onUpdate==null||g.onUpdate(g)}function f7(g,t){g.manual||(DA(g)?(g.left=t.width/-2,g.right=t.width/2,g.top=t.height/2,g.bottom=t.height/-2):g.aspect=t.width/t.height,g.updateProjectionMatrix(),g.updateMatrixWorld())}function Jv(g){return(g.eventObject||g.object).uuid+"/"+g.index+g.instanceId}function c7(){var g;const t=typeof self<"u"&&self||typeof window<"u"&&window;if(!t)return jf.DefaultEventPriority;switch((g=t.event)==null?void 0:g.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return jf.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return jf.ContinuousEventPriority;default:return jf.DefaultEventPriority}}function GA(g,t,i,x){const T=i.get(t);T&&(i.delete(t),i.size===0&&(g.delete(x),T.target.releasePointerCapture(x)))}function d7(g,t){const{internal:i}=g.getState();i.interaction=i.interaction.filter(x=>x!==t),i.initialHits=i.initialHits.filter(x=>x!==t),i.hovered.forEach((x,T)=>{(x.eventObject===t||x.object===t)&&i.hovered.delete(T)}),i.capturedMap.forEach((x,T)=>{GA(i.capturedMap,t,x,T)})}function p7(g){function t(e){const{internal:r}=g.getState(),d=e.offsetX-r.initialClick[0],h=e.offsetY-r.initialClick[1];return Math.round(Math.sqrt(d*d+h*h))}function i(e){return e.filter(r=>["Move","Over","Enter","Out","Leave"].some(d=>{var h;return(h=r.__r3f)==null?void 0:h.handlers["onPointer"+d]}))}function x(e,r){const d=g.getState(),h=new Set,a=[],l=r?r(d.internal.interaction):d.internal.interaction;for(let o=0;o{const p=sd(o.object),v=sd(c.object);return!p||!v?o.distance-c.distance:v.events.priority-p.events.priority||o.distance-c.distance}).filter(o=>{const c=Jv(o);return h.has(c)?!1:(h.add(c),!0)});d.events.filter&&(u=d.events.filter(u,d));for(const o of u){let c=o.object;for(;c;){var f;(f=c.__r3f)!=null&&f.eventCount&&a.push({...o,eventObject:c}),c=c.parent}}if("pointerId"in e&&d.internal.capturedMap.has(e.pointerId))for(let o of d.internal.capturedMap.get(e.pointerId).values())h.has(Jv(o.intersection))||a.push(o.intersection);return a}function T(e,r,d,h){const a=g.getState();if(e.length){const l={stopped:!1};for(const n of e){const u=sd(n.object)||a,{raycaster:f,pointer:o,camera:c,internal:p}=u,v=new Ct(o.x,o.y,0).unproject(c),m=A=>{var P,b;return(P=(b=p.capturedMap.get(A))==null?void 0:b.has(n.eventObject))!=null?P:!1},S=A=>{const P={intersection:n,target:r.target};p.capturedMap.has(A)?p.capturedMap.get(A).set(n.eventObject,P):p.capturedMap.set(A,new Map([[n.eventObject,P]])),r.target.setPointerCapture(A)},M=A=>{const P=p.capturedMap.get(A);P&&GA(p.capturedMap,n.eventObject,P,A)};let w={};for(let A in r){let P=r[A];typeof P!="function"&&(w[A]=P)}let C={...n,...w,pointer:o,intersections:e,stopped:l.stopped,delta:d,unprojectedPoint:v,ray:f.ray,camera:c,stopPropagation(){const A="pointerId"in r&&p.capturedMap.get(r.pointerId);if((!A||A.has(n.eventObject))&&(C.stopped=l.stopped=!0,p.hovered.size&&Array.from(p.hovered.values()).find(P=>P.eventObject===n.eventObject))){const P=e.slice(0,e.indexOf(n));E([...P,n])}},target:{hasPointerCapture:m,setPointerCapture:S,releasePointerCapture:M},currentTarget:{hasPointerCapture:m,setPointerCapture:S,releasePointerCapture:M},nativeEvent:r};if(h(C),l.stopped===!0)break}}return e}function E(e){const{internal:r}=g.getState();for(const d of r.hovered.values())if(!e.length||!e.find(h=>h.object===d.object&&h.index===d.index&&h.instanceId===d.instanceId)){const a=d.eventObject.__r3f,l=a?.handlers;if(r.hovered.delete(Jv(d)),a!=null&&a.eventCount){const n={...d,intersections:e};l.onPointerOut==null||l.onPointerOut(n),l.onPointerLeave==null||l.onPointerLeave(n)}}}function s(e,r){for(let d=0;dE([]);case"onLostPointerCapture":return r=>{const{internal:d}=g.getState();"pointerId"in r&&d.capturedMap.has(r.pointerId)&&requestAnimationFrame(()=>{d.capturedMap.has(r.pointerId)&&(d.capturedMap.delete(r.pointerId),E([]))})}}return function(d){const{onPointerMissed:h,internal:a}=g.getState();a.lastEvent.current=d;const l=e==="onPointerMove",n=e==="onClick"||e==="onContextMenu"||e==="onDoubleClick",f=x(d,l?i:void 0),o=n?t(d):0;e==="onPointerDown"&&(a.initialClick=[d.offsetX,d.offsetY],a.initialHits=f.map(p=>p.eventObject)),n&&!f.length&&o<=2&&(s(d,a.interaction),h&&h(d)),l&&E(f);function c(p){const v=p.eventObject,m=v.__r3f,S=m?.handlers;if(m!=null&&m.eventCount)if(l){if(S.onPointerOver||S.onPointerEnter||S.onPointerOut||S.onPointerLeave){const M=Jv(p),w=a.hovered.get(M);w?w.stopped&&p.stopPropagation():(a.hovered.set(M,p),S.onPointerOver==null||S.onPointerOver(p),S.onPointerEnter==null||S.onPointerEnter(p))}S.onPointerMove==null||S.onPointerMove(p)}else{const M=S[e];M?(!n||a.initialHits.includes(v))&&(s(d,a.interaction.filter(w=>!a.initialHits.includes(w))),M(p)):n&&a.initialHits.includes(v)&&s(d,a.interaction.filter(w=>!a.initialHits.includes(w)))}}T(f,d,o,c)}}return{handlePointer:y}}const VA=g=>!!(g!=null&&g.render),HA=Me.createContext(null),v7=(g,t)=>{const i=_z((y,e)=>{const r=new Ct,d=new Ct,h=new Ct;function a(o=e().camera,c=d,p=e().size){const{width:v,height:m,top:S,left:M}=p,w=v/m;c instanceof Ct?h.copy(c):h.set(...c);const C=o.getWorldPosition(r).distanceTo(h);if(DA(o))return{width:v/o.zoom,height:m/o.zoom,top:S,left:M,factor:1,distance:C,aspect:w};{const A=o.fov*Math.PI/180,P=2*Math.tan(A/2)*C,b=P*(v/m);return{width:b,height:P,top:S,left:M,factor:v/b,distance:C,aspect:w}}}let l;const n=o=>y(c=>({performance:{...c.performance,current:o}})),u=new ve;return{set:y,get:e,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(o=1)=>g(e(),o),advance:(o,c)=>t(o,c,e()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new k1,pointer:u,mouse:u,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const o=e();l&&clearTimeout(l),o.performance.current!==o.performance.min&&n(o.performance.min),l=setTimeout(()=>n(e().performance.max),o.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:a},setEvents:o=>y(c=>({...c,events:{...c.events,...o}})),setSize:(o,c,p,v,m)=>{const S=e().camera,M={width:o,height:c,top:v||0,left:m||0,updateStyle:p};y(w=>({size:M,viewport:{...w.viewport,...a(S,d,M)}}))},setDpr:o=>y(c=>{const p=UA(o);return{viewport:{...c.viewport,dpr:p,initialDpr:c.viewport.initialDpr||p}}}),setFrameloop:(o="always")=>{const c=e().clock;c.stop(),c.elapsedTime=0,o!=="never"&&(c.start(),c.elapsedTime=0),y(()=>({frameloop:o}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:Me.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(o,c,p)=>{const v=e().internal;return v.priority=v.priority+(c>0?1:0),v.subscribers.push({ref:o,priority:c,store:p}),v.subscribers=v.subscribers.sort((m,S)=>m.priority-S.priority),()=>{const m=e().internal;m!=null&&m.subscribers&&(m.priority=m.priority-(c>0?1:0),m.subscribers=m.subscribers.filter(S=>S.ref!==o))}}}}}),x=i.getState();let T=x.size,E=x.viewport.dpr,s=x.camera;return i.subscribe(()=>{const{camera:y,size:e,viewport:r,gl:d,set:h}=i.getState();if(e.width!==T.width||e.height!==T.height||r.dpr!==E){var a;T=e,E=r.dpr,f7(y,e),d.setPixelRatio(r.dpr);const l=(a=e.updateStyle)!=null?a:typeof HTMLCanvasElement<"u"&&d.domElement instanceof HTMLCanvasElement;d.setSize(e.width,e.height,l)}y!==s&&(s=y,h(l=>({viewport:{...l.viewport,...l.viewport.getCurrentViewport(y)}})))}),i.subscribe(y=>g(y)),i};let Qv,m7=new Set,g7=new Set,y7=new Set;function py(g,t){if(g.size)for(const{callback:i}of g.values())i(t)}function ad(g,t){switch(g){case"before":return py(m7,t);case"after":return py(g7,t);case"tail":return py(y7,t)}}let vy,my;function gy(g,t,i){let x=t.clock.getDelta();for(t.frameloop==="never"&&typeof g=="number"&&(x=g-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=g),vy=t.internal.subscribers,Qv=0;Qv0)&&!((d=E.gl.xr)!=null&&d.isPresenting)&&(x+=gy(r,E))}if(i=!1,ad("after",r),x===0)return ad("tail",r),t=!1,cancelAnimationFrame(T)}function y(r,d=1){var h;if(!r)return g.forEach(a=>y(a.store.getState(),d));(h=r.gl.xr)!=null&&h.isPresenting||!r.internal.active||r.frameloop==="never"||(d>1?r.internal.frames=Math.min(60,r.internal.frames+d):i?r.internal.frames=2:r.internal.frames=1,t||(t=!0,requestAnimationFrame(s)))}function e(r,d=!0,h,a){if(d&&ad("before",r),h)gy(r,h,a);else for(const l of g.values())gy(r,l.store.getState());d&&ad("after",r)}return{loop:s,invalidate:y,advance:e}}function S7(){const g=Me.useContext(HA);if(!g)throw new Error("R3F: Hooks can only be used within the Canvas component!");return g}function T7(g,t=0){const i=S7(),x=i.getState().internal.subscribe,T=IA(g);return lp(()=>x(T,t,i),[t,x,i]),null}const nc=new Map,{invalidate:mM,advance:gM}=x7(nc),{reconciler:Fm,applyProps:Df}=s7(nc,c7),If={objects:"shallow",strict:!1},E7=(g,t)=>{const i=typeof g=="function"?g(t):g;return VA(i)?i:new b1({powerPreference:"high-performance",canvas:t,antialias:!0,alpha:!0,...g})};function M7(g,t){const i=typeof HTMLCanvasElement<"u"&&g instanceof HTMLCanvasElement;if(t){const{width:x,height:T,top:E,left:s,updateStyle:y=i}=t;return{width:x,height:T,top:E,left:s,updateStyle:y}}else if(typeof HTMLCanvasElement<"u"&&g instanceof HTMLCanvasElement&&g.parentElement){const{width:x,height:T,top:E,left:s}=g.parentElement.getBoundingClientRect();return{width:x,height:T,top:E,left:s,updateStyle:i}}else if(typeof OffscreenCanvas<"u"&&g instanceof OffscreenCanvas)return{width:g.width,height:g.height,top:0,left:0,updateStyle:i};return{width:0,height:0,top:0,left:0}}function C7(g){const t=nc.get(g),i=t?.fiber,x=t?.store;t&&console.warn("R3F.createRoot should only be called once!");const T=typeof reportError=="function"?reportError:console.error,E=x||v7(mM,gM),s=i||Fm.createContainer(E,jf.ConcurrentRoot,null,!1,null,"",T,null);t||nc.set(g,{fiber:s,store:E});let y,e=!1,r;return{configure(d={}){let{gl:h,size:a,scene:l,events:n,onCreated:u,shadows:f=!1,linear:o=!1,flat:c=!1,legacy:p=!1,orthographic:v=!1,frameloop:m="always",dpr:S=[1,2],performance:M,raycaster:w,camera:C,onPointerMissed:A}=d,P=E.getState(),b=P.gl;P.gl||P.set({gl:b=E7(h,g)});let O=P.raycaster;O||P.set({raycaster:O=new AA});const{params:I,...D}=w||{};if(An.equ(D,O,If)||Df(O,{...D}),An.equ(I,O.params,If)||Df(O,{params:{...O.params,...I}}),!P.camera||P.camera===r&&!An.equ(r,C,If)){r=C;const j=C instanceof tp,Q=j?C:v?new np(0,0,0,0,.1,1e3):new Dr(75,0,.1,1e3);j||(Q.position.z=5,C&&Df(Q,C),!P.camera&&!(C!=null&&C.rotation)&&Q.lookAt(0,0,0)),P.set({camera:Q}),O.camera=Q}if(!P.scene){let j;l instanceof bm?j=l:(j=new bm,l&&Df(j,l)),P.set({scene:Nf(j)})}if(!P.xr){var B;const j=(Y,Z)=>{const U=E.getState();U.frameloop!=="never"&&gM(Y,!0,U,Z)},Q=()=>{const Y=E.getState();Y.gl.xr.enabled=Y.gl.xr.isPresenting,Y.gl.xr.setAnimationLoop(Y.gl.xr.isPresenting?j:null),Y.gl.xr.isPresenting||mM(Y)},tt={connect(){const Y=E.getState().gl;Y.xr.addEventListener("sessionstart",Q),Y.xr.addEventListener("sessionend",Q)},disconnect(){const Y=E.getState().gl;Y.xr.removeEventListener("sessionstart",Q),Y.xr.removeEventListener("sessionend",Q)}};typeof((B=b.xr)==null?void 0:B.addEventListener)=="function"&&tt.connect(),P.set({xr:tt})}if(b.shadowMap){const j=b.shadowMap.enabled,Q=b.shadowMap.type;if(b.shadowMap.enabled=!!f,An.boo(f))b.shadowMap.type=dd;else if(An.str(f)){var G;const tt={basic:gw,percentage:ug,soft:dd,variance:to};b.shadowMap.type=(G=tt[f])!=null?G:dd}else An.obj(f)&&Object.assign(b.shadowMap,f);(j!==b.shadowMap.enabled||Q!==b.shadowMap.type)&&(b.shadowMap.needsUpdate=!0)}const z=OA();z&&("enabled"in z?z.enabled=!p:"legacyMode"in z&&(z.legacyMode=p)),e||Df(b,{outputEncoding:o?3e3:3001,toneMapping:c?zo:h1}),P.legacy!==p&&P.set(()=>({legacy:p})),P.linear!==o&&P.set(()=>({linear:o})),P.flat!==c&&P.set(()=>({flat:c})),h&&!An.fun(h)&&!VA(h)&&!An.equ(h,b,If)&&Df(b,h),n&&!P.events.handlers&&P.set({events:n(E)});const X=M7(g,a);return An.equ(X,P.size,If)||P.setSize(X.width,X.height,X.updateStyle,X.top,X.left),S&&P.viewport.dpr!==UA(S)&&P.setDpr(S),P.frameloop!==m&&P.setFrameloop(m),P.onPointerMissed||P.set({onPointerMissed:A}),M&&!An.equ(M,P.performance,If)&&P.set(j=>({performance:{...j.performance,...M}})),y=u,e=!0,this},render(d){return e||this.configure(),Fm.updateContainer(Me.createElement(w7,{store:E,children:d,onCreated:y,rootElement:g}),s,null,()=>{}),E},unmount(){WA(g)}}}function w7({store:g,children:t,onCreated:i,rootElement:x}){return lp(()=>{const T=g.getState();T.set(E=>({internal:{...E.internal,active:!0}})),i&&i(T),g.getState().events.connected||T.events.connect==null||T.events.connect(x)},[]),Me.createElement(HA.Provider,{value:g},t)}function WA(g,t){const i=nc.get(g),x=i?.fiber;if(x){const T=i?.store.getState();T&&(T.internal.active=!1),Fm.updateContainer(null,x,null,()=>{T&&setTimeout(()=>{try{var E,s,y,e;T.events.disconnect==null||T.events.disconnect(),(E=T.gl)==null||(s=E.renderLists)==null||s.dispose==null||s.dispose(),(y=T.gl)==null||y.forceContextLoss==null||y.forceContextLoss(),(e=T.gl)!=null&&e.xr&&T.xr.disconnect(),h7(T),nc.delete(g),t&&t(g)}catch{}},500)})}}Fm.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:Me.version});function Om(){return Om=Object.assign?Object.assign.bind():function(g){for(var t=1;t=0?x=setTimeout(e,t-d):(x=null,i||(y=g.apply(E,T),E=T=null))}var r=function(){E=this,T=arguments,s=Date.now();var d=i&&!x;return x||(x=setTimeout(e,t)),d&&(y=g.apply(E,T),E=T=null),y};return r.clear=function(){x&&(clearTimeout(x),x=null)},r.flush=function(){x&&(y=g.apply(E,T),E=T=null,clearTimeout(x),x=null)},r}Ox.debounce=Ox;var A7=Ox;const yM=jd(A7);function P7(g){let{debounce:t,scroll:i,polyfill:x,offsetSize:T}=g===void 0?{debounce:0,scroll:!1,offsetSize:!1}:g;const E=x||(typeof window>"u"?class{}:window.ResizeObserver);if(!E)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,y]=Me.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),e=Me.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s}),r=t?typeof t=="number"?t:t.scroll:null,d=t?typeof t=="number"?t:t.resize:null,h=Me.useRef(!1);Me.useEffect(()=>(h.current=!0,()=>void(h.current=!1)));const[a,l,n]=Me.useMemo(()=>{const c=()=>{if(!e.current.element)return;const{left:p,top:v,width:m,height:S,bottom:M,right:w,x:C,y:A}=e.current.element.getBoundingClientRect(),P={left:p,top:v,width:m,height:S,bottom:M,right:w,x:C,y:A};e.current.element instanceof HTMLElement&&T&&(P.height=e.current.element.offsetHeight,P.width=e.current.element.offsetWidth),Object.freeze(P),h.current&&!F7(e.current.lastBounds,P)&&y(e.current.lastBounds=P)};return[c,d?yM(c,d):c,r?yM(c,r):c]},[y,T,r,d]);function u(){e.current.scrollContainers&&(e.current.scrollContainers.forEach(c=>c.removeEventListener("scroll",n,!0)),e.current.scrollContainers=null),e.current.resizeObserver&&(e.current.resizeObserver.disconnect(),e.current.resizeObserver=null)}function f(){e.current.element&&(e.current.resizeObserver=new E(n),e.current.resizeObserver.observe(e.current.element),i&&e.current.scrollContainers&&e.current.scrollContainers.forEach(c=>c.addEventListener("scroll",n,{capture:!0,passive:!0})))}const o=c=>{!c||c===e.current.element||(u(),e.current.element=c,e.current.scrollContainers=XA(c),f())};return b7(n,!!i),R7(l),Me.useEffect(()=>{u(),f()},[i,n,l]),Me.useEffect(()=>u,[]),[o,s,a]}function R7(g){Me.useEffect(()=>{const t=g;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[g])}function b7(g,t){Me.useEffect(()=>{if(t){const i=g;return window.addEventListener("scroll",i,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",i,!0)}},[g,t])}function XA(g){const t=[];if(!g||g===document.body)return t;const{overflow:i,overflowX:x,overflowY:T}=window.getComputedStyle(g);return[i,x,T].some(E=>E==="auto"||E==="scroll")&&t.push(g),[...t,...XA(g.parentElement)]}const L7=["x","y","top","bottom","left","right","width","height"],F7=(g,t)=>L7.every(i=>g[i]===t[i]);var O7=Object.defineProperty,D7=Object.defineProperties,I7=Object.getOwnPropertyDescriptors,xM=Object.getOwnPropertySymbols,N7=Object.prototype.hasOwnProperty,B7=Object.prototype.propertyIsEnumerable,SM=(g,t,i)=>t in g?O7(g,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):g[t]=i,TM=(g,t)=>{for(var i in t||(t={}))N7.call(t,i)&&SM(g,i,t[i]);if(xM)for(var i of xM(t))B7.call(t,i)&&SM(g,i,t[i]);return g},U7=(g,t)=>D7(g,I7(t)),EM,MM;typeof window<"u"&&((EM=window.document)!=null&&EM.createElement||((MM=window.navigator)==null?void 0:MM.product)==="ReactNative")?Me.useLayoutEffect:Me.useEffect;function YA(g,t,i){if(!g)return;if(i(g)===!0)return g;let x=t?g.return:g.child;for(;x;){const T=YA(x,t,i);if(T)return T;x=t?null:x.sibling}}function kA(g){try{return Object.defineProperties(g,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return g}}const CM=console.error;console.error=function(){const g=[...arguments].join("");if(g?.startsWith("Warning:")&&g.includes("useContext")){console.error=CM;return}return CM.apply(this,arguments)};const J1=kA(Me.createContext(null));class jA extends Me.Component{render(){return Me.createElement(J1.Provider,{value:this._reactInternals},this.props.children)}}function z7(){const g=Me.useContext(J1);if(g===null)throw new Error("its-fine: useFiber must be called within a !");const t=Me.useId();return Me.useMemo(()=>{for(const x of[g,g?.alternate]){if(!x)continue;const T=YA(x,!1,E=>{let s=E.memoizedState;for(;s;){if(s.memoizedState===t)return!0;s=s.next}});if(T)return T}},[g,t])}function G7(){const g=z7(),[t]=Me.useState(()=>new Map);t.clear();let i=g;for(;i;){if(i.type&&typeof i.type=="object"){const T=i.type._context===void 0&&i.type.Provider===i.type?i.type:i.type._context;T&&T!==J1&&!t.has(T)&&t.set(T,Me.useContext(kA(T)))}i=i.return}return t}function V7(){const g=G7();return Me.useMemo(()=>Array.from(g.keys()).reduce((t,i)=>x=>Me.createElement(t,null,Me.createElement(i.Provider,U7(TM({},x),{value:g.get(i)}))),t=>Me.createElement(jA,TM({},t))),[g])}const yy={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function H7(g){const{handlePointer:t}=p7(g);return{priority:1,enabled:!0,compute(i,x,T){x.pointer.set(i.offsetX/x.size.width*2-1,-(i.offsetY/x.size.height)*2+1),x.raycaster.setFromCamera(x.pointer,x.camera)},connected:void 0,handlers:Object.keys(yy).reduce((i,x)=>({...i,[x]:t(x)}),{}),update:()=>{var i;const{events:x,internal:T}=g.getState();(i=T.lastEvent)!=null&&i.current&&x.handlers&&x.handlers.onPointerMove(T.lastEvent.current)},connect:i=>{var x;const{set:T,events:E}=g.getState();E.disconnect==null||E.disconnect(),T(s=>({events:{...s.events,connected:i}})),Object.entries((x=E.handlers)!=null?x:[]).forEach(([s,y])=>{const[e,r]=yy[s];i.addEventListener(e,y,{passive:r})})},disconnect:()=>{const{set:i,events:x}=g.getState();if(x.connected){var T;Object.entries((T=x.handlers)!=null?T:[]).forEach(([E,s])=>{if(x&&x.connected instanceof HTMLElement){const[y]=yy[E];x.connected.removeEventListener(y,s)}}),i(E=>({events:{...E.events,connected:void 0}}))}}}}const W7=Me.forwardRef(function({children:t,fallback:i,resize:x,style:T,gl:E,events:s=H7,eventSource:y,eventPrefix:e,shadows:r,linear:d,flat:h,legacy:a,orthographic:l,frameloop:n,dpr:u,performance:f,raycaster:o,camera:c,scene:p,onPointerMissed:v,onCreated:m,...S},M){Me.useMemo(()=>r7($z),[]);const w=V7(),[C,A]=P7({scroll:!0,debounce:{scroll:50,resize:0},...x}),P=Me.useRef(null),b=Me.useRef(null);Me.useImperativeHandle(M,()=>P.current);const O=IA(v),[I,D]=Me.useState(!1),[B,G]=Me.useState(!1);if(I)throw I;if(B)throw B;const z=Me.useRef(null);lp(()=>{const j=P.current;A.width>0&&A.height>0&&j&&(z.current||(z.current=C7(j)),z.current.configure({gl:E,events:s,shadows:r,linear:d,flat:h,legacy:a,orthographic:l,frameloop:n,dpr:u,performance:f,raycaster:o,camera:c,scene:p,size:A,onPointerMissed:(...Q)=>O.current==null?void 0:O.current(...Q),onCreated:Q=>{Q.events.connect==null||Q.events.connect(y?a7(y)?y.current:y:b.current),e&&Q.setEvents({compute:(tt,Y)=>{const Z=tt[e+"X"],U=tt[e+"Y"];Y.pointer.set(Z/Y.size.width*2-1,-(U/Y.size.height)*2+1),Y.raycaster.setFromCamera(Y.pointer,Y.camera)}}),m?.(Q)}}),z.current.render(Me.createElement(w,null,Me.createElement(NA,{set:G},Me.createElement(Me.Suspense,{fallback:Me.createElement(o7,{set:D})},t)))))}),Me.useEffect(()=>{const j=P.current;if(j)return()=>WA(j)},[]);const X=y?"none":"auto";return Me.createElement("div",Om({ref:b,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:X,...T}},S),Me.createElement("div",{ref:C,style:{width:"100%",height:"100%"}},Me.createElement("canvas",{ref:P,style:{display:"block"}},i)))}),X7=Me.forwardRef(function(t,i){return Me.createElement(jA,null,Me.createElement(W7,Om({},t,{ref:i})))});function wa(g,t={}){let i=Me.useCallback(T=>t.keys?_4(g,t.keys,T):g.listen(T),[t.keys,g]),x=g.get.bind(g);return Me.useSyncExternalStore(i,x,x)}const Y7=[new eo(-Math.PI/2,-Math.PI/2,-Math.PI/2),new eo(0,Math.PI/2,0),new eo(0,-Math.PI/2,-Math.PI/2),new eo(Math.PI/2,Math.PI,Math.PI),new eo(0,0,-Math.PI/2),new eo(Math.PI,0,0)],k7=({diceValues:g,isRolling:t,textures:i})=>{const x=Me.useRef([]),T=Me.useRef([]);return Me.useEffect(()=>{const E=new cA,s=new ze(16766720);T.current=[new yl({map:E.load(i.side1),color:s}),new yl({map:E.load(i.side2),color:s}),new yl({map:E.load(i.side3),color:s}),new yl({map:E.load(i.side4),color:s}),new yl({map:E.load(i.side5),color:s}),new yl({map:E.load(i.side6),color:s})],x.current.forEach(y=>{y&&(y.material=T.current)})},[i]),T7(()=>{x.current.forEach((E,s)=>{if(E)if(t)E.rotation.x+=.2,E.rotation.y+=.2;else{const y=Y7[g[s]-1];E.rotation.x=dm.lerp(E.rotation.x,y.x,.1),E.rotation.y=dm.lerp(E.rotation.y,y.y,.1),E.rotation.z=dm.lerp(E.rotation.z,y.z,.1)}})}),Yt.jsx(Yt.Fragment,{children:g.map((E,s)=>Yt.jsxs("mesh",{ref:y=>x.current[s]=y,position:[s*2-(g.length-1),0,0],children:[Yt.jsx("boxGeometry",{args:[1,1,1]}),T.current.length===6&&T.current.map((y,e)=>Yt.jsx("meshStandardMaterial",{attach:`material-${e}`,...y},e))]},s))})},j7=({styleClass:g,textures:t,diceCount:i})=>{const x=wa(Md);Me.useEffect(()=>{YI("Dice"),jI(t),kI({type:"ROLL_DICE",diceValues:Array(i).fill(1),isRolling:!1})},[t,i]);const T=()=>{bT(!0),setTimeout(()=>{const E=Array.from({length:i},()=>Math.floor(Math.random()*6)+1);pw(E),bT(!1);const s={diceValues:E};Si.emit("diceRollResult",s)},2e3)};return Yt.jsxs("div",{className:`flex flex-col items-center justify-center p-4 ${g}`,children:[Yt.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Dice Roller"}),Yt.jsxs(X7,{className:"w-full h-full",camera:{position:[0,0,5]},children:[Yt.jsx("ambientLight",{intensity:2.5}),Yt.jsx("pointLight",{position:[10,10,10]}),mT(x.action)&&Yt.jsx(k7,{diceValues:x.action.diceValues,isRolling:x.action.isRolling,textures:x.textures})]}),mT(x.action)&&Yt.jsx("button",{onClick:T,className:`mt-4 p-2 border border-yellow-300 rounded text-yellow-400 hover:scale-110 ${x.action.isRolling?"opacity-50":""}`,disabled:x.action.isRolling,children:"Roll Dice"})]})},K7=({text:g,speed:t=80,onComplete:i})=>{const[x,T]=Me.useState([]),E=Me.useRef([]);return Me.useEffect(()=>{let s,y=0;const e=g.split(/(<\/?span[^>]*>)/g).filter(Boolean),r=[];e.forEach((h,a)=>{if(h.startsWith("/);if(l){const n=l[1];r.push(Yt.jsx("span",{className:n},`span-${a}`))}else r.push(Yt.jsx("span",{},`span-${a}`))}else h.split("").forEach((l,n)=>{r.push(Yt.jsx("span",{children:l},`char-${a}-${n}`))})}),y=0;const d=()=>{y{window.clearTimeout(s)}},[g,t,i]),Yt.jsx("div",{children:x})},KA=Du.memo(K7);class ZA{constructor(t,i,x){this.scene=t,this.gridEngine=i,this.quadtree=x,this.cursor=this.scene.input.keyboard?.createCursorKeys(),this.initializeWASDKeys(),this.registerEventHandlers(),this.tooltip=this.scene.add.text(0,0,"Press [F]",{font:"16px Arial",backgroundColor:"#000000"}).setDepth(4).setPadding(3,2,2,3).setVisible(!1)}initializeWASDKeys(){const t=this.scene.input.keyboard;t&&(this.wasdKeys={W:t.addKey(Phaser.Input.Keyboard.KeyCodes.W),A:t.addKey(Phaser.Input.Keyboard.KeyCodes.A),S:t.addKey(Phaser.Input.Keyboard.KeyCodes.S),D:t.addKey(Phaser.Input.Keyboard.KeyCodes.D)})}handleConsume(t){const i=Tl(t);i&&i.consumable?(_e.log(`Consuming item: ${i.name}`),WI(i),RT(i.id)):_e.log(`Item ${t} is not consumable`)}handleEquip(t){const i=Tl(t);i&&(_e.log(`Equipping item: ${i.name}`),DI("weapon",i.id))}handleUnequip(t){const i=Tl(t);i&&(_e.log(`Unequipping item: ${i.name}`),II("weapon"))}handleDiscard(t){_e.log(`Discarding item: ${t}`),RT(t)}handleView(t){const i=Tl(t);if(i&&(_e.log(`Viewing item: ${i.name} with ${i.slug}`),i.slug)){const x=`https://kbve.com/${i.slug}#${i.name.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"")}`;window.open(x,"_blank")}}registerEventHandlers(){Si.on("itemAction",this.handleItemAction.bind(this));//! Broken -Si.on("playerMove",this.handlePlayerMove.bind(this)),Si.on("playerReward",this.handlePlayerReward.bind(this)),Si.on("playerDamage",this.handlePlayerCombatDamage.bind(this))}handleItemAction(t){if(t)switch(_e.log(`Preparing Action: ${t.itemId} with ${t.action}`),t.action){case"consume":this.handleConsume(t.itemId);break;case"equip":this.handleEquip(t.itemId);break;case"unequip":this.handleUnequip(t.itemId);break;case"discard":this.handleDiscard(t.itemId);break;case"view":this.handleView(t.itemId);break;default:_e.log(`Unknown action: ${t.action}`)}}handlePlayerReward(t){_e.log("Rewarding the player"),t&&(Si.emit("notification",{title:"Success",message:t.message,notificationType:bu.success}),OI(t.item))}handlePlayerCombatDamage(t){t&&(dw(parseInt(t.damage)),Si.emit("notification",{title:"Danger",message:`You taken ${t.damage} points of damage!`,notificationType:bu.danger}))}handlePlayerMove(t){t&&this.gridEngine.moveTo("player",{x:t.x,y:t.y})}checkForNearbyObjects(){const i=this.gridEngine.getPosition("player"),x=i.x*48,T=i.y*48;this.quadtree.query(i).length>0?this.tooltip.setPosition(x,T-60).setVisible(!0):this.tooltip.setVisible(!1)}handleMovement(){if(!this.cursor)return;const t=this.cursor,i=this.wasdKeys;if(this.scene.input.keyboard?.addKey("F").isDown){const x=this.gridEngine.getPosition("player"),T=this.quadtree.query(x);for(const E of T)E.action()}(t.left.isDown||i.A.isDown)&&(t.up.isDown||i.W.isDown)?this.gridEngine.move("player","up-left"):(t.left.isDown||i.A.isDown)&&(t.down.isDown||i.S.isDown)?this.gridEngine.move("player","down-left"):(t.right.isDown||i.D.isDown)&&(t.up.isDown||i.W.isDown)?this.gridEngine.move("player","up-right"):(t.right.isDown||i.D.isDown)&&(t.down.isDown||i.S.isDown)?this.gridEngine.move("player","down-right"):t.left.isDown||i.A.isDown?this.gridEngine.move("player","left"):t.right.isDown||i.D.isDown?this.gridEngine.move("player","right"):t.up.isDown||i.W.isDown?this.gridEngine.move("player","up"):(t.down.isDown||i.S.isDown)&&this.gridEngine.move("player","down"),this.checkForNearbyObjects()}}class $A extends Phaser.GameObjects.Container{constructor(t,i,x,T){const E=i.x,s=i.y-i.height+10;super(t,E,s),this.sprite=i;const y=150,e=40+T.length*20;this.background=t.add.rectangle(0,0,y,e,0,.7),this.text=t.add.text(0,-e/2+10,x,{fontSize:"12px",color:"#ffffff"}).setOrigin(.5),this.buttons=T.map((r,d)=>{const h=t.add.text(0,-e/2+30+d*20,r.label,{fontSize:"12px",color:"#00ff00"}).setOrigin(.5);return h.setInteractive({useHandCursor:!0}),h.on("pointerdown",r.callback),h}),this.add(this.background),this.add(this.text),this.buttons.forEach(r=>this.add(r)),this.scene.add.existing(this)}updatePosition(){this.setPosition(this.sprite.x-30,this.sprite.y-this.sprite.height-this.background.height/2+100)}static attachToSprite(t,i,x,T){i.setInteractive(),i.on("pointerover",E=>{const s={npcId:i.name,npcName:x,actions:T.map(e=>e.label),coords:{x:E.x,y:E.y}};if(Si.emit("npcInteraction",s),!i.getData("tooltipMenu")){const e=new $A(t,i,x,T);i.setData("tooltipMenu",e)}const y=i.getData("tooltipMenu");y.setVisible(!0),y.updatePosition()}),i.on("pointerout",()=>{const E=i.getData("tooltipMenu");E&&E.setVisible(!1)})}static updateAllTooltipPositions(t){t.children.list.forEach(i=>{if(i instanceof Phaser.GameObjects.Sprite){const x=i.getData("tooltipMenu");x&&x.updatePosition()}})}}let OG=class extends Phaser.GameObjects.Sprite{};function Z7(g,t,i,x){const y=g.add.graphics();y.fillStyle(16777215,1),y.fillRoundedRect(0,0,200,60,16),y.setDepth(99);const e=g.add.text(100,30,i,{fontFamily:"Arial",fontSize:16,color:"#000000"});e.setOrigin(.5),e.setWordWrapWidth(200-10*2),e.setDepth(100);const r=g.add.container(0,0,[y,e]);return r.setDepth(100),t.messageBubble=r,J7(t),g.time.addEvent({delay:x,callback:()=>{r.destroy(),t.messageBubble===r&&(t.messageBubble=void 0)},callbackScope:g}),r}function $7(g,t,i){const s=g.add.graphics();s.fillStyle(16777215,1),s.fillRoundedRect(0,0,200,60,16),s.setDepth(99);const y=g.add.text(100,30,i,{fontFamily:"Arial",fontSize:16,color:"#000000"});y.setOrigin(.5),y.setWordWrapWidth(200-10*2),y.setDepth(100);const e=g.add.container(0,0,[s,y]);return e.setDepth(100),t.textBubble=e,Dx(t),e}function Dx(g){const t=g.textBubble;t&&(t.x=g.x,t.y=g.y-g.height-t.height/2)}function J7(g){const t=g.messageBubble;t&&(t.x=g.x,t.y=g.y-g.height-t.height/2)}var JA={exports:{}};(function(g,t){(function(i,x){g.exports=x()})(Ey,function(){var i=function(V,K){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(et,st){et.__proto__=st}||function(et,st){for(var ht in st)Object.prototype.hasOwnProperty.call(st,ht)&&(et[ht]=st[ht])})(V,K)},x=function(){return(x=Object.assign||function(V){for(var K,et=1,st=arguments.length;et"u"||E.Promise||(E.Promise=Promise);var r=Object.getPrototypeOf,d={}.hasOwnProperty;function h(V,K){return d.call(V,K)}function a(V,K){typeof K=="function"&&(K=K(r(V))),(typeof Reflect>"u"?s:Reflect.ownKeys)(K).forEach(function(et){n(V,et,K[et])})}var l=Object.defineProperty;function n(V,K,et,st){l(V,K,e(et&&h(et,"get")&&typeof et.get=="function"?{get:et.get,set:et.set,configurable:!0}:{value:et,configurable:!0,writable:!0},st))}function u(V){return{from:function(K){return V.prototype=Object.create(K.prototype),n(V.prototype,"constructor",V),{extend:a.bind(null,V.prototype)}}}}var f=Object.getOwnPropertyDescriptor,o=[].slice;function c(V,K,et){return o.call(V,K,et)}function p(V,K){return K(V)}function v(V){if(!V)throw new Error("Assertion Failed")}function m(V){E.setImmediate?setImmediate(V):setTimeout(V,0)}function S(V,K){if(typeof K=="string"&&h(V,K))return V[K];if(!K)return V;if(typeof K!="string"){for(var et=[],st=0,ht=K.length;st"u"?[]:function(){var V=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[V,r(V),V];var K=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[K,r(K),V]}(),re=Vs[0],hr=Vs[1],Vs=Vs[2],hr=hr&&hr.then,le=re&&re.constructor,ge=!!Vs,xe=function(V,K){je.push([V,K]),te&&(queueMicrotask(Gi),te=!1)},Pe=!0,te=!0,Ge=[],Oe=[],Be=gt,Le={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:rt,pgp:!1,env:{},finalize:rt},ne=Le,je=[],si=0,Mi=[];function he(V){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var K=this._PSD=ne;if(typeof V!="function"){if(V!==Ht)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Ce(this,this._value))}this._state=null,this._value=null,++K.ref,function et(st,ht){try{ht(function(pt){if(st._state===null){if(pt===st)throw new TypeError("A promise cannot be resolved with itself.");var Mt=st._lib&&Ii();pt&&typeof pt.then=="function"?et(st,function(Nt,zt){pt instanceof he?pt._then(Nt,zt):pt.then(Nt,zt)}):(st._state=!0,st._value=pt,we(st)),Mt&&nn()}},Ce.bind(null,st))}catch(pt){Ce(st,pt)}}(this,V)}var Ti={get:function(){var V=ne,K=_r;function et(st,ht){var pt=this,Mt=!V.global&&(V!==ne||K!==_r),Nt=Mt&&!Ss(),zt=new he(function(ct,St){Ve(pt,new bt(ie(st,V,Mt,Nt),ie(ht,V,Mt,Nt),ct,St,V))});return this._consoleTask&&(zt._consoleTask=this._consoleTask),zt}return et.prototype=Ht,et},set:function(V){n(this,"then",V&&V.prototype===Ht?Ti:{get:function(){return V},set:Ti.set})}};function bt(V,K,et,st,ht){this.onFulfilled=typeof V=="function"?V:null,this.onRejected=typeof K=="function"?K:null,this.resolve=et,this.reject=st,this.psd=ht}function Ce(V,K){var et,st;Oe.push(K),V._state===null&&(et=V._lib&&Ii(),K=Be(K),V._state=!1,V._value=K,st=V,Ge.some(function(ht){return ht._value===st._value})||Ge.push(st),we(V),et&&nn())}function we(V){var K=V._listeners;V._listeners=[];for(var et=0,st=K.length;et.",Je="String expected.",ti=[],ni="__dbnames",oi="readonly",Ji="readwrite";function un(V,K){return V?K?function(){return V.apply(this,arguments)&&K.apply(this,arguments)}:V:K}var ji={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function yn(V){return typeof V!="string"||/\./.test(V)?function(K){return K}:function(K){return K[V]===void 0&&V in K&&delete(K=O(K))[V],K}}function ei(){throw q.Type()}function Se(V,K){try{var et=Br(V),st=Br(K);if(et!==st)return et==="Array"?1:st==="Array"?-1:et==="binary"?1:st==="binary"?-1:et==="string"?1:st==="string"?-1:et==="Date"?1:st!=="Date"?NaN:-1;switch(et){case"number":case"Date":case"string":return KQt+ae&&Kt(Qt+Ft)})})}var $t=Ki(et)&&et.limit===1/0&&(typeof V!="function"||V===Oa)&&{index:et.index,range:et.range};return Kt(0).then(function(){if(0=Ft})).length!==0?(St.forEach(function(Kt){Wt.push(function(){var $t=It,Qt=Kt._cfg.dbschema;Ba(vt,$t,Ut),Ba(vt,Qt,Ut),It=vt._dbSchema=Qt;var ae=bn($t,Qt);ae.add.forEach(function(me){Da(Ut,me[0],me[1].primKey,me[1].indexes)}),ae.change.forEach(function(me){if(me.recreate)throw new q.Upgrade("Not yet support for changing primary key");var be=Ut.objectStore(me.name);me.add.forEach(function(qe){return Mn(be,qe)}),me.change.forEach(function(qe){be.deleteIndex(qe.name),Mn(be,qe)}),me.del.forEach(function(qe){return be.deleteIndex(qe)})});var ue=Kt._cfg.contentUpgrade;if(ue&&Kt._cfg.version>Ft){Ko(vt,Ut),Lt._memoizedTables={};var Re=w(Qt);ae.del.forEach(function(me){Re[me]=$t[me]}),Gr(vt,[vt.Transaction.prototype]),Il(vt,[vt.Transaction.prototype],s(Re),Re),Lt.schema=Re;var pe,Ae=Q(ue);return Ae&&zs(),ae=he.follow(function(){var me;(pe=ue(Lt))&&Ae&&(me=Ss.bind(null,null),pe.then(me,me))}),pe&&typeof pe.then=="function"?he.resolve(pe):ae.then(function(){return pe})}}),Wt.push(function($t){var Qt,ae,ue=Kt._cfg.dbschema;Qt=ue,ae=$t,[].slice.call(ae.db.objectStoreNames).forEach(function(Re){return Qt[Re]==null&&ae.db.deleteObjectStore(Re)}),Gr(vt,[vt.Transaction.prototype]),Il(vt,[vt.Transaction.prototype],vt._storeNames,vt._dbSchema),Lt.schema=vt._dbSchema}),Wt.push(function($t){vt.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(vt.idbdb.version/10)===Kt._cfg.version?(vt.idbdb.deleteObjectStore("$meta"),delete vt._dbSchema.$meta,vt._storeNames=vt._storeNames.filter(function(Qt){return Qt!=="$meta"})):$t.objectStore("$meta").put(Kt._cfg.version,"version"))})}),function Kt(){return Wt.length?he.resolve(Wt.shift()(Lt.idbtrans)).then(Kt):he.resolve()}().then(function(){Ia(It,Ut)})):he.resolve();var vt,Ft,Lt,Ut,Wt,It}).catch(Mt)):(s(ht).forEach(function(St){Da(et,St,ht[St].primKey,ht[St].indexes)}),Ko(V,et),void he.follow(function(){return V.on.populate.fire(pt)}).catch(Mt));var zt,ct})}function Rh(V,K){Ia(V._dbSchema,K),K.db.version%10!=0||K.objectStoreNames.contains("$meta")||K.db.createObjectStore("$meta").add(Math.ceil(K.db.version/10-1),"version");var et=Na(0,V.idbdb,K);Ba(V,V._dbSchema,K);for(var st=0,ht=bn(et,V._dbSchema).change;stMath.pow(2,62)?0:It.oldVersion,vt=It<1,V.idbdb=Wt.result,pt&&Rh(V,St),xn(V,It/10,St,Lt))},Lt),Wt.onsuccess=pi(function(){St=null;var It,Kt,$t,Qt,ae,ue=V.idbdb=Wt.result,Re=c(ue.objectStoreNames);if(0"u"?he.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(Ft){function Lt(){return indexedDB.databases().finally(Ft)}zt=setInterval(Lt,100),Lt()}).finally(function(){return clearInterval(zt)}):Promise.resolve()).then(Nt)]).then(function(){return Mt(),K.onReadyBeingFired=[],he.resolve(Xr(function(){return V.on.ready.fire(V.vip)})).then(function Ft(){if(0K.limit?Ft.length=K.limit:V.length===K.limit&&Ft.length=Kt.limit&&(!Kt.values||ue.req.values)&&mo(ue.req.query.range,Kt.query.range)}),!1,$t,Qt];case"count":return ae=Qt.find(function(ue){return qi(ue.req.query.range,Kt.query.range)}),[ae,!!ae,$t,Qt]}}(K,et,"query",pt),St=ct[0],vt=ct[1],Ft=ct[2],Lt=ct[3];return St&&vt?St.obsSet=pt.obsSet:(vt=st.query(pt).then(function(Ut){var Wt=Ut.result;if(St&&(St.res=Wt),Mt){for(var It=0,Kt=Wt.length;It{_e.log(`Texture ${s} loaded successfully.`),this.addNPCToScene(t,E,x,T)}),t.load.start()}else throw new Error(`Sprite with ID ${E.spriteImageId} not found`)}}catch(E){E instanceof Error?_e.error(`Failed to load NPC: ${E.message}`):_e.error("Failed to load NPC:",E)}}addNPCToScene(t,i,x,T){try{_e.log(`Adding NPC to scene: ${JSON.stringify(i)}`),_e.log(`Using sprite key: ${i.spriteKey}`);const E=t.add.sprite(0,0,i.spriteKey);E.scale=i.scale||1.5,E.name=i.id||"Error Missing Name",_e.log(`NPC Sprite created with texture key ${i.spriteKey} at position (${i.startPosition.x}, ${i.startPosition.y})`);const s={id:i.id,sprite:E,walkingAnimationMapping:i.walkingAnimationMapping,startPosition:{x:x??i.startPosition.x,y:T??i.startPosition.y},speed:i.speed};if(_e.log(`Grid engine config: ${JSON.stringify(s)}`),!t.textures.exists(i.spriteKey))throw new Error(`Texture with key ${i.spriteKey} does not exist in the scene`);t.gridEngine.addCharacter(s),_e.log(`NPC added to grid engine with ID ${i.id}`),((e,r,d)=>{const h=t.gridEngine.getPosition(e.name);_e.log(`Attaching NPC events to ${r} at position: ${JSON.stringify(h)}`),QA.attachNPCEvent(e,r,d,{coords:h})})(E,i.name,i.actions.map(e=>({label:e}))),_e.log(`NPC ${i.name} added to scene successfully`)}catch(E){E instanceof Error?_e.error(`Error adding NPC to scene from addNPCToScene: ${E.message}`):_e.error("Error adding NPC to scene:",E)}}async addDialogue(t){await this.dialogues.put(t)}async getDialogue(t){return await this.dialogues.get(t)}async getAllDialogues(){return await this.dialogues.toArray()}async getDialoguesForNPC(t){const i=await this.getNPC(t);if(!i)throw new Error(`NPC with ID ${t} not found`);return(await Promise.all((i.dialogues||[]).map(T=>this.getDialogue(T.dialogueId)))).filter(T=>T!==void 0)}async markDialogueAsRead(t,i){const x=await this.getNPC(t);if(!x)throw new Error(`NPC with ID ${t} not found`);const T=x.dialogues?.find(E=>E.dialogueId===i);T&&(T.read=!0,await this.addNPC(x))}async fetchDialogues(t){try{const x=(await gn.get(t)).data.key,T=Object.values(x).map(E=>({...E}));await this.dialogues.bulkPut(T)}catch(i){_e.error(`Failed to fetch dialogues from ${t}:`,i)}}async getPrioritizedDialoguesForNPC(t){try{const i=await this.getNPC(t);if(!i)throw new Error(`NPC with ID ${t} not found`);const T=(await Promise.all((i.dialogues||[]).map(async E=>{const s=await this.getDialogue(E.dialogueId);return s?{...s,priority:E.priority,read:E.read}:null}))).filter(E=>E!==null);return T.sort((E,s)=>s.priority-E.priority),T}catch(i){return _e.error(`Failed to get prioritized dialogues for NPC with ID ${t}:`,i),[]}}async getNPCNameById(t){return(await this.getNPC(t))?.name}async getNPCAvatarById(t){const i=await this.getNPC(t);if(i?.avatarImageId)return(await this.getAvatar(i.avatarImageId))?.avatarData}async getNPCSlugById(t){return(await this.getNPC(t))?.slug}async getNPCHealthById(t){try{return(await this.getNPC(t))?.stats?.health}catch(i){_e.error(`Failed to get health for NPC with ID ${t}:`,i);return}}async getNPCManaById(t){try{return(await this.getNPC(t))?.stats?.mana}catch(i){_e.error(`Failed to get mana for NPC with ID ${t}:`,i);return}}async createNPCSession(t,i){try{const x=this.getNPCNameById(i),T=this.getNPCSlugById(i),E=this.getNPCAvatarById(i),s=this.getNPCHealthById(i),y=this.getNPCManaById(i),[e,r,d,h,a]=await Promise.all([x,T,E,s,y]),l={...t.get(),[`${i}_name`]:e||"Unknown",[`${i}_slug`]:r||"Unknown",[`${i}_avatar`]:d?URL.createObjectURL(d):"Unknown",[`${i}_health`]:h||"100",[`${i}_mana`]:a||"100"};t.set(l)}catch{const T={...t.get(),[`${i}_name`]:"Unknown",[`${i}_slug`]:"Unknown",[`${i}_avatar`]:"Unknown",[`${i}_hp`]:"100",[`${i}_mana`]:"100"};t.set(T)}}async getNPCDialogueOptionsByULID(t){try{const i=await this.getDialogue(t);if(!i||!i.options)return"[]";const x=await Promise.all(i.options.map(async T=>this.getDialogue(T)));return JSON.stringify(x.filter(T=>T!==void 0))}catch(i){return _e.error(`Failed to get dialogue options for ID ${t}:`,i),"[]"}}async getAllDialogueOptions(t){const i=[],x=new Set,T=async E=>{if(x.has(E))return;x.add(E);const s=await this.getDialogue(E);if(s&&(i.push(s),s.options&&s.options.length>0))for(const y of s.options)await T(y)};return await T(t),i}async createDialogueSession(t,i){try{const x=await this.getNPCDialogueOptionsByULID(i),T={...t.get(),[`${i}_options`]:x||"[]"};t.set(T)}catch{const T={...t.get(),[`${i}_options`]:"[]"};t.set(T)}}}const Cl=new _7;class q7{constructor(){this.actionHandlers={talk:this.talkToNPC.bind(this),quest:this.questWithNPC.bind(this),trade:this.tradeWithNPC.bind(this),combat:this.startCombat.bind(this),heal:this.healNPC.bind(this),steal:this.stealFromNPC.bind(this),lore:this.loreFromNPC.bind(this)}}getActionHandler(t){return this.actionHandlers[t]}loreFromNPC(t){_e.log(`Pulling up the lore of the NPC with ID: ${t.npcId}`)}questWithNPC(t){_e.log(`Starting quest with NPC with ID: ${t.npcId}`)}healNPC(t){_e.log(`Healing NPC with ID: ${t.npcId}`)}oathFromNPC(t){_e.log(`Oath from NPC with ID: ${t.npcId}`)}async talkToNPC(t){try{_e.log(`Talking to NPC with ID: ${t.npcId}`);const i=await Cl.getPrioritizedDialoguesForNPC(t.npcId);if(_e.log(i),i.length>0){const x=i[0];Si.emit("npcDialogue",{npcId:t.npcId,dialogue:x},1e3)}else _e.log("No dialogues available for this NPC.")}catch(i){_e.error(`Failed to fetch dialogues for NPC with ID ${t.npcId}:`,i)}}tradeWithNPC(t){_e.log(`Trading with NPC with ID: ${t.npcId}`)}moveToNPC(t){const x=t.data?.coords||{x:10,y:15};Si.emit("playerMove",x)}stealFromNPC(t){_e.log(`Attempting to steal from NPC with ID: ${t.npcId}`);const i={npcId:t.npcId,npcName:t.npcName,data:t.data};Si.emit("playerSteal",i)}startCombat(t){_e.log(`Starting combat with NPC with ID: ${t.npcId}`)}checkFish(t){_e.log(`Checking fish for NPC with ID: ${t.npcId}`)}attachNPCEvent(t,i,x,T){t.setInteractive(),t.on("pointerover",E=>{const s={npcId:t.name||"",npcName:i,actions:x.map(y=>y.label),data:T||{},coords:{x:E.x,y:E.y}};Si.emit("npcInteraction",s),t.setTint(65280)}),t.on("pointerout",()=>{t.clearTint()}),t.on("pointerdown",E=>{const s={npcId:t.name||"",npcName:i,actions:x.map(y=>y.label),data:T||{},coords:{x:E.x,y:E.y}};_e.log(`Click Registered at X: ${s.coords.x} Y: ${s.coords.y}`),Si.emit("npcInteractionClick",s,1e3)})}}const QA=new q7;function _A(g){return+g[g.length-1]}function qA(g){return g.startsWith("monster_bird_")&&!g.startsWith("monster_bird_shadow")}function tP(g,t,i,x,T){const E=[];for(let s=0;s<10;s++){const y=g.add.sprite(0,0,"monster_bird");y.setCrop(t,i,x,T),y.scale=3,E.push(y)}return E}function eP(g){return tP(g,0,0,61,47)}function iP(g){return tP(g,22,47,16,10)}function nP(g){g.anims.create({key:"bird",frames:g.anims.generateFrameNumbers("monster_bird",{start:0,end:2}),frameRate:10,repeat:-1,yoyo:!0})}class tG extends qm.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.image("creditsBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),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}),bI()}async create(){await Cl.initializeDatabase(),this.add.image(480,480,"mainBg").setScale(.1),this.mainMenuButtonImage=this.add.image(480,480,"scroll").setAlpha(.9).setScale(.7,.2).setInteractive({useHandCursor:!0}),this.mainMenuButtonText=this.add.text(480,480,"Start Game",{fontFamily:"Arial Black",fontSize:50,color:"#ffffff",stroke:"#000000",strokeThickness:6}).setOrigin(.5).setInteractive({useHandCursor:!0}),this.mainMenuButtonText.on("pointerdown",()=>{this.scene.start("SandCity")},this)}}let IG=class extends zf.GameObjects.Sprite{textBubble;tooltip};class eG extends qm.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"SandCity"});const t={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new mu(t)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57}),Si.emit("notification",{title:"Success",message:`You arrived safely to SandCity Passport: ${l1()}`,notificationType:bu.success})}async create(){const t=this.make.tilemap({key:"cloud-city-map"});t.addTilesetImage("Cloud City","tiles");for(let T=0;T({id:"monster_bird_"+E,sprite:T,startPosition:{x:7,y:7+E},speed:5,collides:!1})),...this.monsterBirdShadows.map((T,E)=>({id:"monster_bird_shadow_"+E,sprite:T,startPosition:{x:7,y:7+E},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(t,x),this.loadRanges(),this.playerController=new ZA(this,this.gridEngine,this.quadtree),Z7(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!",3e3),await Cl.loadCharacter(this,"01J2DT4G871KJ0VNSHCNC5REDM",6,6),await Cl.loadCharacter(this,"01J2HCTMQ58JBMJGW9YA3FBQCG",8,8),await Cl.loadCharacter(this,"01J2HQJBMBGEEMWDBDWATRCY3T",8,15),this.gridEngine.moveRandomly("npc",1500,3),this.gridEngine.moveRandomly("fishNpc",1500,3);for(let T=0;T<10;T++)this.gridEngine.moveRandomly("monster_bird_"+T,1e3,10);this.gridEngine.positionChangeStarted().subscribe(({charId:T,exitTile:E,enterTile:s})=>{qA(T)&&this.gridEngine.moveTo("monster_bird_shadow_"+_A(T),{x:s.x,y:s.y})}),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const t=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>{const i={message:"Seems like there are no fish in the sand pits. You know null, this area could be fixed up a bit too."};Si.emit("charEvent",i)}},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:()=>{const i={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"};Si.emit("charEvent",i)}},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>{const i={message:"Sorry, we are closed!",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/animebar.webp"};Si.emit("charEvent",i)}},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>{const i={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"};Si.emit("charEvent",i)}}];for(const i of t)this.quadtree.insert(i)}update(){this.playerController?.handleMovement()}}class BG extends zf.GameObjects.Sprite{textBubble}class iG extends qm.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"CloudCity"});const t={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new mu(t)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57})}create(){const t=this.make.tilemap({key:"cloud-city-map-large"});t.addTilesetImage("cloud_tileset","cloud-city-tiles");for(let T=0;T({id:"monster_bird_"+E,sprite:T,startPosition:{x:7,y:7+E},speed:5,collides:!1})),...this.monsterBirdShadows.map((T,E)=>({id:"monster_bird_shadow_"+E,sprite:T,startPosition:{x:7,y:7+E},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(t,x),this.loadRanges(),this.playerController=new ZA(this,this.gridEngine,this.quadtree),$7(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!"),this.gridEngine.moveRandomly("npc",1500,3);for(let T=0;T<10;T++)this.gridEngine.moveRandomly("monster_bird_"+T,1e3,20);this.gridEngine.positionChangeStarted().subscribe(({charId:T,exitTile:E,enterTile:s})=>{qA(T)&&this.gridEngine.moveTo("monster_bird_shadow_"+_A(T),{x:s.x,y:s.y})}),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const t=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>{const i={message:"Seems like there are no fish in the sand pits. You know null, this area could be fixed up a bit too."};Si.emit("charEvent",i,1e3)}},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:async()=>{try{const T={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"};Si.emit("charEvent",T,1e3)}catch(i){console.error("Error fetching data:",i);const x={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"};Si.emit("charEvent",x,1e3)}}},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>{const i={message:"Sorry, we are closed!",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/animebar.webp"};Si.emit("charEvent",i,1e3)}},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>{const i={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"};Si.emit("charEvent",i,1e3)}}];for(const i of t)this.quadtree.insert(i)}update(){this.playerController?.handleMovement(),this.npcSprite&&this.npcSprite.textBubble&&Dx(this.npcSprite),this.fishNpcSprite&&this.fishNpcSprite.textBubble&&Dx(this.fishNpcSprite)}}const nG=ym.div` + */(function(g){function t(z,X){var j=z.length;z.push(X);t:for(;0>>1,tt=z[Q];if(0>>1;QT(U,j))HT(Z,U)?(z[Q]=Z,z[H]=j,Q=H):(z[Q]=U,z[$]=j,Q=$);else if(HT(Z,j))z[Q]=Z,z[H]=j,Q=H;else break t}}return X}function T(z,X){var j=z.sortIndex-X.sortIndex;return j!==0?j:z.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var E=performance;g.unstable_now=function(){return E.now()}}else{var s=Date,x=s.now();g.unstable_now=function(){return s.now()-x}}var e=[],r=[],d=1,h=null,a=3,l=!1,n=!1,u=!1,f=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(z){for(var X=i(r);X!==null;){if(X.callback===null)y(r);else if(X.startTime<=z)y(r),X.sortIndex=X.expirationTime,t(e,X);else break;X=i(r)}}function v(z){if(u=!1,p(z),!n)if(i(e)!==null)n=!0,B(m);else{var X=i(r);X!==null&&G(v,X.startTime-z)}}function m(z,X){n=!1,u&&(u=!1,o(w),w=-1),l=!0;var j=a;try{for(p(X),h=i(e);h!==null&&(!(h.expirationTime>X)||z&&!P());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,a=h.priorityLevel;var tt=Q(h.expirationTime<=X);X=g.unstable_now(),typeof tt=="function"?h.callback=tt:h===i(e)&&y(e),p(X)}else y(e);h=i(e)}if(h!==null)var Y=!0;else{var $=i(r);$!==null&&G(v,$.startTime-X),Y=!1}return Y}finally{h=null,a=j,l=!1}}var S=!1,M=null,w=-1,C=5,A=-1;function P(){return!(g.unstable_now()-Az||125Q?(z.sortIndex=j,t(r,z),i(e)===null&&z===i(r)&&(u?(o(w),w=-1):u=!0,G(v,j-Q))):(z.sortIndex=tt,t(e,z),n||l||(n=!0,B(m))),z},g.unstable_shouldYield=P,g.unstable_wrapCallback=function(z){var X=a;return function(){var j=a;a=X;try{return z.apply(this,arguments)}finally{a=j}}}})(DA);OA.exports=DA;var cM=OA.exports;const J1={},i7=g=>void Object.assign(J1,g);function n7(g,t){function i(d,{args:h=[],attach:a,...l},n){let u=`${d[0].toUpperCase()}${d.slice(1)}`,f;if(d==="primitive"){if(l.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const o=l.object;f=Nf(o,{type:d,root:n,attach:a,primitive:!0})}else{const o=J1[u];if(!o)throw new Error(`R3F: ${u} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(h))throw new Error("R3F: The args prop must be an array!");f=Nf(new o(...h),{type:d,root:n,attach:a,memoizedProps:{args:h}})}return f.__r3f.attach===void 0&&(f instanceof Fi?f.__r3f.attach="geometry":f instanceof Wr&&(f.__r3f.attach="material")),u!=="inject"&&vy(f,l),f}function y(d,h){let a=!1;if(h){var l,n;(l=h.__r3f)!=null&&l.attach?py(d,h,h.__r3f.attach):h.isObject3D&&d.isObject3D&&(d.add(h),a=!0),a||(n=d.__r3f)==null||n.objects.push(h),h.__r3f||Nf(h,{}),h.__r3f.parent=d,Ix(h),Bf(h)}}function T(d,h,a){let l=!1;if(h){var n,u;if((n=h.__r3f)!=null&&n.attach)py(d,h,h.__r3f.attach);else if(h.isObject3D&&d.isObject3D){h.parent=d,h.dispatchEvent({type:"added"}),d.dispatchEvent({type:"childadded",child:h});const f=d.children.filter(c=>c!==h),o=f.indexOf(a);d.children=[...f.slice(0,o),h,...f.slice(o)],l=!0}l||(u=d.__r3f)==null||u.objects.push(h),h.__r3f||Nf(h,{}),h.__r3f.parent=d,Ix(h),Bf(h)}}function E(d,h,a=!1){d&&[...d].forEach(l=>s(h,l,a))}function s(d,h,a){if(h){var l,n,u;if(h.__r3f&&(h.__r3f.parent=null),(l=d.__r3f)!=null&&l.objects&&(d.__r3f.objects=d.__r3f.objects.filter(v=>v!==h)),(n=h.__r3f)!=null&&n.attach)gM(d,h,h.__r3f.attach);else if(h.isObject3D&&d.isObject3D){var f;d.remove(h),(f=h.__r3f)!=null&&f.root&&f7(mm(h),h)}const c=(u=h.__r3f)==null?void 0:u.primitive,p=!c&&(a===void 0?h.dispose!==null:a);if(!c){var o;E((o=h.__r3f)==null?void 0:o.objects,h,p),E(h.children,h,p)}if(delete h.__r3f,p&&h.dispose&&h.type!=="Scene"){const v=()=>{try{h.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?cM.unstable_scheduleCallback(cM.unstable_IdlePriority,v):v()}Bf(d)}}function x(d,h,a,l){var n;const u=(n=d.__r3f)==null?void 0:n.parent;if(!u)return;const f=i(h,a,d.__r3f.root);if(d.children){for(const o of d.children)o.__r3f&&y(f,o);d.children=d.children.filter(o=>!o.__r3f)}d.__r3f.objects.forEach(o=>y(f,o)),d.__r3f.objects=[],d.__r3f.autoRemovedBeforeAppend||s(u,d),f.parent&&(f.__r3f.autoRemovedBeforeAppend=!0),y(u,f),f.raycast&&f.__r3f.eventCount&&mm(f).getState().internal.interaction.push(f),[l,l.alternate].forEach(o=>{o!==null&&(o.stateNode=f,o.ref&&(typeof o.ref=="function"?o.ref(f):o.ref.current=f))})}const e=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:e7({createInstance:i,removeChild:s,appendChild:y,appendInitialChild:y,insertBefore:T,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(d,h)=>{if(!h)return;const a=d.getState().scene;a.__r3f&&(a.__r3f.root=d,y(a,h))},removeChildFromContainer:(d,h)=>{h&&s(d.getState().scene,h)},insertInContainerBefore:(d,h,a)=>{if(!h||!a)return;const l=d.getState().scene;l.__r3f&&T(l,h,a)},getRootHostContext:()=>null,getChildHostContext:d=>d,finalizeInitialChildren(d){var h;return!!((h=d?.__r3f)!=null?h:{}).handlers},prepareUpdate(d,h,a,l){var n;if(((n=d?.__r3f)!=null?n:{}).primitive&&l.object&&l.object!==d)return[!0];{const{args:f=[],children:o,...c}=l,{args:p=[],children:v,...m}=a;if(!Array.isArray(f))throw new Error("R3F: the args prop must be an array!");if(f.some((M,w)=>M!==p[w]))return[!0];const S=VA(d,c,m,!0);return S.changes.length?[!1,S]:null}},commitUpdate(d,[h,a],l,n,u,f){h?x(d,l,u,f):vy(d,a)},commitMount(d,h,a,l){var n;const u=(n=d.__r3f)!=null?n:{};d.raycast&&u.handlers&&u.eventCount&&mm(d).getState().internal.interaction.push(d)},getPublicInstance:d=>d,prepareForCommit:()=>null,preparePortalMount:d=>Nf(d.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(d){var h;const{attach:a,parent:l}=(h=d.__r3f)!=null?h:{};a&&l&&gM(l,d,a),d.isObject3D&&(d.visible=!1),Bf(d)},unhideInstance(d,h){var a;const{attach:l,parent:n}=(a=d.__r3f)!=null?a:{};l&&n&&py(n,d,l),(d.isObject3D&&h.visible==null||h.visible)&&(d.visible=!0),Bf(d)},createTextInstance:e,hideTextInstance:e,unhideTextInstance:e,getCurrentEventPriority:()=>t?t():kf.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&An.fun(performance.now)?performance.now:An.fun(Date.now)?Date.now:()=>0,scheduleTimeout:An.fun(setTimeout)?setTimeout:void 0,cancelTimeout:An.fun(clearTimeout)?clearTimeout:void 0}),applyProps:vy}}var dM,pM;const dy=g=>"colorSpace"in g||"outputColorSpace"in g,IA=()=>{var g;return(g=J1.ColorManagement)!=null?g:null},NA=g=>g&&g.isOrthographicCamera,r7=g=>g&&g.hasOwnProperty("current"),hp=typeof window<"u"&&((dM=window.document)!=null&&dM.createElement||((pM=window.navigator)==null?void 0:pM.product)==="ReactNative")?Me.useLayoutEffect:Me.useEffect;function BA(g){const t=Me.useRef(g);return hp(()=>void(t.current=g),[g]),t}function s7({set:g}){return hp(()=>(g(new Promise(()=>null)),()=>g(!1)),[g]),null}class UA extends Me.Component{constructor(...t){super(...t),this.state={error:!1}}componentDidCatch(t){this.props.set(t)}render(){return this.state.error?null:this.props.children}}UA.getDerivedStateFromError=()=>({error:!0});const zA="__default",vM=new Map,a7=g=>g&&!!g.memoized&&!!g.changes;function GA(g){var t;const i=typeof window<"u"?(t=window.devicePixelRatio)!=null?t:2:1;return Array.isArray(g)?Math.min(Math.max(g[0],i),g[1]):g}const rd=g=>{var t;return(t=g.__r3f)==null?void 0:t.root.getState()};function mm(g){let t=g.__r3f.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}const An={obj:g=>g===Object(g)&&!An.arr(g)&&typeof g!="function",fun:g=>typeof g=="function",str:g=>typeof g=="string",num:g=>typeof g=="number",boo:g=>typeof g=="boolean",und:g=>g===void 0,arr:g=>Array.isArray(g),equ(g,t,{arrays:i="shallow",objects:y="reference",strict:T=!0}={}){if(typeof g!=typeof t||!!g!=!!t)return!1;if(An.str(g)||An.num(g))return g===t;const E=An.obj(g);if(E&&y==="reference")return g===t;const s=An.arr(g);if(s&&i==="reference")return g===t;if((s||E)&&g===t)return!0;let x;for(x in g)if(!(x in t))return!1;if(E&&i==="shallow"&&y==="shallow"){for(x in T?t:g)if(!An.equ(g[x],t[x],{strict:T,objects:"reference"}))return!1}else for(x in T?t:g)if(g[x]!==t[x])return!1;if(An.und(x)){if(s&&g.length===0&&t.length===0||E&&Object.keys(g).length===0&&Object.keys(t).length===0)return!0;if(g!==t)return!1}return!0}};function o7(g){g.dispose&&g.type!=="Scene"&&g.dispose();for(const t in g)t.dispose==null||t.dispose(),delete g[t]}function Nf(g,t){const i=g;return i.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...t},g}function Dx(g,t){let i=g;if(t.includes("-")){const y=t.split("-"),T=y.pop();return i=y.reduce((E,s)=>E[s],g),{target:i,key:T}}else return{target:i,key:t}}const mM=/-\d+$/;function py(g,t,i){if(An.str(i)){if(mM.test(i)){const E=i.replace(mM,""),{target:s,key:x}=Dx(g,E);Array.isArray(s[x])||(s[x]=[])}const{target:y,key:T}=Dx(g,i);t.__r3f.previousAttach=y[T],y[T]=t}else t.__r3f.previousAttach=i(g,t)}function gM(g,t,i){var y,T;if(An.str(i)){const{target:E,key:s}=Dx(g,i),x=t.__r3f.previousAttach;x===void 0?delete E[s]:E[s]=x}else(y=t.__r3f)==null||y.previousAttach==null||y.previousAttach(g,t);(T=t.__r3f)==null||delete T.previousAttach}function VA(g,{children:t,key:i,ref:y,...T},{children:E,key:s,ref:x,...e}={},r=!1){var d;const h=(d=g?.__r3f)!=null?d:{},a=Object.entries(T),l=[];if(r){const u=Object.keys(e);for(let f=0;f{var o;if((o=g.__r3f)!=null&&o.primitive&&u==="object"||An.equ(f,e[u]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(u))return l.push([u,f,!0,[]]);let c=[];u.includes("-")&&(c=u.split("-")),l.push([u,f,!1,c]);for(const p in T){const v=T[p];p.startsWith(`${u}-`)&&l.push([p,v,!1,p.split("-")])}});const n={...T};return h.memoizedProps&&h.memoizedProps.args&&(n.args=h.memoizedProps.args),h.memoizedProps&&h.memoizedProps.attach&&(n.attach=h.memoizedProps.attach),{memoized:n,changes:l}}const l7=typeof process<"u"&&!1;function vy(g,t){var i,y,T;const E=(i=g.__r3f)!=null?i:{},s=E.root,x=(y=s==null||s.getState==null?void 0:s.getState())!=null?y:{},{memoized:e,changes:r}=a7(t)?t:VA(g,t),d=E.eventCount;g.__r3f&&(g.__r3f.memoizedProps=e);for(let a=0;ap[v],g),!(c&&c.set))){const[p,...v]=f.reverse();o=v.reverse().reduce((m,S)=>m[S],g),l=p}if(n===zA+"remove")if(o.constructor){let p=vM.get(o.constructor);p||(p=new o.constructor,vM.set(o.constructor,p)),n=p[l]}else n=0;if(u)n?E.handlers[l]=n:delete E.handlers[l],E.eventCount=Object.keys(E.handlers).length;else if(c&&c.set&&(c.copy||c instanceof Cu)){if(Array.isArray(n))c.fromArray?c.fromArray(n):c.set(...n);else if(c.copy&&n&&n.constructor&&(l7?c.constructor.name===n.constructor.name:c.constructor===n.constructor))c.copy(n);else if(n!==void 0){const p=c instanceof Ge;!p&&c.setScalar?c.setScalar(n):c instanceof Cu&&n instanceof Cu?c.mask=n.mask:c.set(n),!IA()&&!x.linear&&p&&c.convertSRGBToLinear()}}else if(o[l]=n,o[l]instanceof zn&&o[l].format===vs&&o[l].type===Go){const p=o[l];dy(p)&&dy(x.gl)?p.colorSpace=x.gl.outputColorSpace:p.encoding=x.gl.outputEncoding}Bf(g)}if(E.parent&&g.raycast&&d!==E.eventCount){const a=mm(g).getState().internal,l=a.interaction.indexOf(g);l>-1&&a.interaction.splice(l,1),E.eventCount&&a.interaction.push(g)}return!(r.length===1&&r[0][0]==="onUpdate")&&r.length&&(T=g.__r3f)!=null&&T.parent&&Ix(g),g}function Bf(g){var t,i;const y=(t=g.__r3f)==null||(i=t.root)==null||i.getState==null?void 0:i.getState();y&&y.internal.frames===0&&y.invalidate()}function Ix(g){g.onUpdate==null||g.onUpdate(g)}function h7(g,t){g.manual||(NA(g)?(g.left=t.width/-2,g.right=t.width/2,g.top=t.height/2,g.bottom=t.height/-2):g.aspect=t.width/t.height,g.updateProjectionMatrix(),g.updateMatrixWorld())}function Qv(g){return(g.eventObject||g.object).uuid+"/"+g.index+g.instanceId}function u7(){var g;const t=typeof self<"u"&&self||typeof window<"u"&&window;if(!t)return kf.DefaultEventPriority;switch((g=t.event)==null?void 0:g.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return kf.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return kf.ContinuousEventPriority;default:return kf.DefaultEventPriority}}function HA(g,t,i,y){const T=i.get(t);T&&(i.delete(t),i.size===0&&(g.delete(y),T.target.releasePointerCapture(y)))}function f7(g,t){const{internal:i}=g.getState();i.interaction=i.interaction.filter(y=>y!==t),i.initialHits=i.initialHits.filter(y=>y!==t),i.hovered.forEach((y,T)=>{(y.eventObject===t||y.object===t)&&i.hovered.delete(T)}),i.capturedMap.forEach((y,T)=>{HA(i.capturedMap,t,y,T)})}function c7(g){function t(e){const{internal:r}=g.getState(),d=e.offsetX-r.initialClick[0],h=e.offsetY-r.initialClick[1];return Math.round(Math.sqrt(d*d+h*h))}function i(e){return e.filter(r=>["Move","Over","Enter","Out","Leave"].some(d=>{var h;return(h=r.__r3f)==null?void 0:h.handlers["onPointer"+d]}))}function y(e,r){const d=g.getState(),h=new Set,a=[],l=r?r(d.internal.interaction):d.internal.interaction;for(let o=0;o{const p=rd(o.object),v=rd(c.object);return!p||!v?o.distance-c.distance:v.events.priority-p.events.priority||o.distance-c.distance}).filter(o=>{const c=Qv(o);return h.has(c)?!1:(h.add(c),!0)});d.events.filter&&(u=d.events.filter(u,d));for(const o of u){let c=o.object;for(;c;){var f;(f=c.__r3f)!=null&&f.eventCount&&a.push({...o,eventObject:c}),c=c.parent}}if("pointerId"in e&&d.internal.capturedMap.has(e.pointerId))for(let o of d.internal.capturedMap.get(e.pointerId).values())h.has(Qv(o.intersection))||a.push(o.intersection);return a}function T(e,r,d,h){const a=g.getState();if(e.length){const l={stopped:!1};for(const n of e){const u=rd(n.object)||a,{raycaster:f,pointer:o,camera:c,internal:p}=u,v=new Ct(o.x,o.y,0).unproject(c),m=A=>{var P,b;return(P=(b=p.capturedMap.get(A))==null?void 0:b.has(n.eventObject))!=null?P:!1},S=A=>{const P={intersection:n,target:r.target};p.capturedMap.has(A)?p.capturedMap.get(A).set(n.eventObject,P):p.capturedMap.set(A,new Map([[n.eventObject,P]])),r.target.setPointerCapture(A)},M=A=>{const P=p.capturedMap.get(A);P&&HA(p.capturedMap,n.eventObject,P,A)};let w={};for(let A in r){let P=r[A];typeof P!="function"&&(w[A]=P)}let C={...n,...w,pointer:o,intersections:e,stopped:l.stopped,delta:d,unprojectedPoint:v,ray:f.ray,camera:c,stopPropagation(){const A="pointerId"in r&&p.capturedMap.get(r.pointerId);if((!A||A.has(n.eventObject))&&(C.stopped=l.stopped=!0,p.hovered.size&&Array.from(p.hovered.values()).find(P=>P.eventObject===n.eventObject))){const P=e.slice(0,e.indexOf(n));E([...P,n])}},target:{hasPointerCapture:m,setPointerCapture:S,releasePointerCapture:M},currentTarget:{hasPointerCapture:m,setPointerCapture:S,releasePointerCapture:M},nativeEvent:r};if(h(C),l.stopped===!0)break}}return e}function E(e){const{internal:r}=g.getState();for(const d of r.hovered.values())if(!e.length||!e.find(h=>h.object===d.object&&h.index===d.index&&h.instanceId===d.instanceId)){const a=d.eventObject.__r3f,l=a?.handlers;if(r.hovered.delete(Qv(d)),a!=null&&a.eventCount){const n={...d,intersections:e};l.onPointerOut==null||l.onPointerOut(n),l.onPointerLeave==null||l.onPointerLeave(n)}}}function s(e,r){for(let d=0;dE([]);case"onLostPointerCapture":return r=>{const{internal:d}=g.getState();"pointerId"in r&&d.capturedMap.has(r.pointerId)&&requestAnimationFrame(()=>{d.capturedMap.has(r.pointerId)&&(d.capturedMap.delete(r.pointerId),E([]))})}}return function(d){const{onPointerMissed:h,internal:a}=g.getState();a.lastEvent.current=d;const l=e==="onPointerMove",n=e==="onClick"||e==="onContextMenu"||e==="onDoubleClick",f=y(d,l?i:void 0),o=n?t(d):0;e==="onPointerDown"&&(a.initialClick=[d.offsetX,d.offsetY],a.initialHits=f.map(p=>p.eventObject)),n&&!f.length&&o<=2&&(s(d,a.interaction),h&&h(d)),l&&E(f);function c(p){const v=p.eventObject,m=v.__r3f,S=m?.handlers;if(m!=null&&m.eventCount)if(l){if(S.onPointerOver||S.onPointerEnter||S.onPointerOut||S.onPointerLeave){const M=Qv(p),w=a.hovered.get(M);w?w.stopped&&p.stopPropagation():(a.hovered.set(M,p),S.onPointerOver==null||S.onPointerOver(p),S.onPointerEnter==null||S.onPointerEnter(p))}S.onPointerMove==null||S.onPointerMove(p)}else{const M=S[e];M?(!n||a.initialHits.includes(v))&&(s(d,a.interaction.filter(w=>!a.initialHits.includes(w))),M(p)):n&&a.initialHits.includes(v)&&s(d,a.interaction.filter(w=>!a.initialHits.includes(w)))}}T(f,d,o,c)}}return{handlePointer:x}}const WA=g=>!!(g!=null&&g.render),XA=Me.createContext(null),d7=(g,t)=>{const i=Jz((x,e)=>{const r=new Ct,d=new Ct,h=new Ct;function a(o=e().camera,c=d,p=e().size){const{width:v,height:m,top:S,left:M}=p,w=v/m;c instanceof Ct?h.copy(c):h.set(...c);const C=o.getWorldPosition(r).distanceTo(h);if(NA(o))return{width:v/o.zoom,height:m/o.zoom,top:S,left:M,factor:1,distance:C,aspect:w};{const A=o.fov*Math.PI/180,P=2*Math.tan(A/2)*C,b=P*(v/m);return{width:b,height:P,top:S,left:M,factor:v/b,distance:C,aspect:w}}}let l;const n=o=>x(c=>({performance:{...c.performance,current:o}})),u=new ve;return{set:x,get:e,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(o=1)=>g(e(),o),advance:(o,c)=>t(o,c,e()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new j1,pointer:u,mouse:u,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const o=e();l&&clearTimeout(l),o.performance.current!==o.performance.min&&n(o.performance.min),l=setTimeout(()=>n(e().performance.max),o.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:a},setEvents:o=>x(c=>({...c,events:{...c.events,...o}})),setSize:(o,c,p,v,m)=>{const S=e().camera,M={width:o,height:c,top:v||0,left:m||0,updateStyle:p};x(w=>({size:M,viewport:{...w.viewport,...a(S,d,M)}}))},setDpr:o=>x(c=>{const p=GA(o);return{viewport:{...c.viewport,dpr:p,initialDpr:c.viewport.initialDpr||p}}}),setFrameloop:(o="always")=>{const c=e().clock;c.stop(),c.elapsedTime=0,o!=="never"&&(c.start(),c.elapsedTime=0),x(()=>({frameloop:o}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:Me.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(o,c,p)=>{const v=e().internal;return v.priority=v.priority+(c>0?1:0),v.subscribers.push({ref:o,priority:c,store:p}),v.subscribers=v.subscribers.sort((m,S)=>m.priority-S.priority),()=>{const m=e().internal;m!=null&&m.subscribers&&(m.priority=m.priority-(c>0?1:0),m.subscribers=m.subscribers.filter(S=>S.ref!==o))}}}}}),y=i.getState();let T=y.size,E=y.viewport.dpr,s=y.camera;return i.subscribe(()=>{const{camera:x,size:e,viewport:r,gl:d,set:h}=i.getState();if(e.width!==T.width||e.height!==T.height||r.dpr!==E){var a;T=e,E=r.dpr,h7(x,e),d.setPixelRatio(r.dpr);const l=(a=e.updateStyle)!=null?a:typeof HTMLCanvasElement<"u"&&d.domElement instanceof HTMLCanvasElement;d.setSize(e.width,e.height,l)}x!==s&&(s=x,h(l=>({viewport:{...l.viewport,...l.viewport.getCurrentViewport(x)}})))}),i.subscribe(x=>g(x)),i};let _v,p7=new Set,v7=new Set,m7=new Set;function my(g,t){if(g.size)for(const{callback:i}of g.values())i(t)}function sd(g,t){switch(g){case"before":return my(p7,t);case"after":return my(v7,t);case"tail":return my(m7,t)}}let gy,yy;function xy(g,t,i){let y=t.clock.getDelta();for(t.frameloop==="never"&&typeof g=="number"&&(y=g-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=g),gy=t.internal.subscribers,_v=0;_v0)&&!((d=E.gl.xr)!=null&&d.isPresenting)&&(y+=xy(r,E))}if(i=!1,sd("after",r),y===0)return sd("tail",r),t=!1,cancelAnimationFrame(T)}function x(r,d=1){var h;if(!r)return g.forEach(a=>x(a.store.getState(),d));(h=r.gl.xr)!=null&&h.isPresenting||!r.internal.active||r.frameloop==="never"||(d>1?r.internal.frames=Math.min(60,r.internal.frames+d):i?r.internal.frames=2:r.internal.frames=1,t||(t=!0,requestAnimationFrame(s)))}function e(r,d=!0,h,a){if(d&&sd("before",r),h)xy(r,h,a);else for(const l of g.values())xy(r,l.store.getState());d&&sd("after",r)}return{loop:s,invalidate:x,advance:e}}function y7(){const g=Me.useContext(XA);if(!g)throw new Error("R3F: Hooks can only be used within the Canvas component!");return g}function x7(g,t=0){const i=y7(),y=i.getState().internal.subscribe,T=BA(g);return hp(()=>y(T,t,i),[t,y,i]),null}const ic=new Map,{invalidate:yM,advance:xM}=g7(ic),{reconciler:Dm,applyProps:Df}=n7(ic,u7),If={objects:"shallow",strict:!1},S7=(g,t)=>{const i=typeof g=="function"?g(t):g;return WA(i)?i:new L1({powerPreference:"high-performance",canvas:t,antialias:!0,alpha:!0,...g})};function T7(g,t){const i=typeof HTMLCanvasElement<"u"&&g instanceof HTMLCanvasElement;if(t){const{width:y,height:T,top:E,left:s,updateStyle:x=i}=t;return{width:y,height:T,top:E,left:s,updateStyle:x}}else if(typeof HTMLCanvasElement<"u"&&g instanceof HTMLCanvasElement&&g.parentElement){const{width:y,height:T,top:E,left:s}=g.parentElement.getBoundingClientRect();return{width:y,height:T,top:E,left:s,updateStyle:i}}else if(typeof OffscreenCanvas<"u"&&g instanceof OffscreenCanvas)return{width:g.width,height:g.height,top:0,left:0,updateStyle:i};return{width:0,height:0,top:0,left:0}}function E7(g){const t=ic.get(g),i=t?.fiber,y=t?.store;t&&console.warn("R3F.createRoot should only be called once!");const T=typeof reportError=="function"?reportError:console.error,E=y||d7(yM,xM),s=i||Dm.createContainer(E,kf.ConcurrentRoot,null,!1,null,"",T,null);t||ic.set(g,{fiber:s,store:E});let x,e=!1,r;return{configure(d={}){let{gl:h,size:a,scene:l,events:n,onCreated:u,shadows:f=!1,linear:o=!1,flat:c=!1,legacy:p=!1,orthographic:v=!1,frameloop:m="always",dpr:S=[1,2],performance:M,raycaster:w,camera:C,onPointerMissed:A}=d,P=E.getState(),b=P.gl;P.gl||P.set({gl:b=S7(h,g)});let O=P.raycaster;O||P.set({raycaster:O=new RA});const{params:I,...D}=w||{};if(An.equ(D,O,If)||Df(O,{...D}),An.equ(I,O.params,If)||Df(O,{params:{...O.params,...I}}),!P.camera||P.camera===r&&!An.equ(r,C,If)){r=C;const j=C instanceof ep,Q=j?C:v?new rp(0,0,0,0,.1,1e3):new Dr(75,0,.1,1e3);j||(Q.position.z=5,C&&Df(Q,C),!P.camera&&!(C!=null&&C.rotation)&&Q.lookAt(0,0,0)),P.set({camera:Q}),O.camera=Q}if(!P.scene){let j;l instanceof Fm?j=l:(j=new Fm,l&&Df(j,l)),P.set({scene:Nf(j)})}if(!P.xr){var B;const j=(Y,$)=>{const U=E.getState();U.frameloop!=="never"&&xM(Y,!0,U,$)},Q=()=>{const Y=E.getState();Y.gl.xr.enabled=Y.gl.xr.isPresenting,Y.gl.xr.setAnimationLoop(Y.gl.xr.isPresenting?j:null),Y.gl.xr.isPresenting||yM(Y)},tt={connect(){const Y=E.getState().gl;Y.xr.addEventListener("sessionstart",Q),Y.xr.addEventListener("sessionend",Q)},disconnect(){const Y=E.getState().gl;Y.xr.removeEventListener("sessionstart",Q),Y.xr.removeEventListener("sessionend",Q)}};typeof((B=b.xr)==null?void 0:B.addEventListener)=="function"&&tt.connect(),P.set({xr:tt})}if(b.shadowMap){const j=b.shadowMap.enabled,Q=b.shadowMap.type;if(b.shadowMap.enabled=!!f,An.boo(f))b.shadowMap.type=pd;else if(An.str(f)){var G;const tt={basic:xw,percentage:cg,soft:pd,variance:to};b.shadowMap.type=(G=tt[f])!=null?G:pd}else An.obj(f)&&Object.assign(b.shadowMap,f);(j!==b.shadowMap.enabled||Q!==b.shadowMap.type)&&(b.shadowMap.needsUpdate=!0)}const z=IA();z&&("enabled"in z?z.enabled=!p:"legacyMode"in z&&(z.legacyMode=p)),e||Df(b,{outputEncoding:o?3e3:3001,toneMapping:c?zo:u1}),P.legacy!==p&&P.set(()=>({legacy:p})),P.linear!==o&&P.set(()=>({linear:o})),P.flat!==c&&P.set(()=>({flat:c})),h&&!An.fun(h)&&!WA(h)&&!An.equ(h,b,If)&&Df(b,h),n&&!P.events.handlers&&P.set({events:n(E)});const X=T7(g,a);return An.equ(X,P.size,If)||P.setSize(X.width,X.height,X.updateStyle,X.top,X.left),S&&P.viewport.dpr!==GA(S)&&P.setDpr(S),P.frameloop!==m&&P.setFrameloop(m),P.onPointerMissed||P.set({onPointerMissed:A}),M&&!An.equ(M,P.performance,If)&&P.set(j=>({performance:{...j.performance,...M}})),x=u,e=!0,this},render(d){return e||this.configure(),Dm.updateContainer(Me.createElement(M7,{store:E,children:d,onCreated:x,rootElement:g}),s,null,()=>{}),E},unmount(){YA(g)}}}function M7({store:g,children:t,onCreated:i,rootElement:y}){return hp(()=>{const T=g.getState();T.set(E=>({internal:{...E.internal,active:!0}})),i&&i(T),g.getState().events.connected||T.events.connect==null||T.events.connect(y)},[]),Me.createElement(XA.Provider,{value:g},t)}function YA(g,t){const i=ic.get(g),y=i?.fiber;if(y){const T=i?.store.getState();T&&(T.internal.active=!1),Dm.updateContainer(null,y,null,()=>{T&&setTimeout(()=>{try{var E,s,x,e;T.events.disconnect==null||T.events.disconnect(),(E=T.gl)==null||(s=E.renderLists)==null||s.dispose==null||s.dispose(),(x=T.gl)==null||x.forceContextLoss==null||x.forceContextLoss(),(e=T.gl)!=null&&e.xr&&T.xr.disconnect(),o7(T),ic.delete(g),t&&t(g)}catch{}},500)})}}Dm.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:Me.version});function Im(){return Im=Object.assign?Object.assign.bind():function(g){for(var t=1;t=0?y=setTimeout(e,t-d):(y=null,i||(x=g.apply(E,T),E=T=null))}var r=function(){E=this,T=arguments,s=Date.now();var d=i&&!y;return y||(y=setTimeout(e,t)),d&&(x=g.apply(E,T),E=T=null),x};return r.clear=function(){y&&(clearTimeout(y),y=null)},r.flush=function(){y&&(x=g.apply(E,T),E=T=null,clearTimeout(y),y=null)},r}Nx.debounce=Nx;var C7=Nx;const SM=Kd(C7);function w7(g){let{debounce:t,scroll:i,polyfill:y,offsetSize:T}=g===void 0?{debounce:0,scroll:!1,offsetSize:!1}:g;const E=y||(typeof window>"u"?class{}:window.ResizeObserver);if(!E)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,x]=Me.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),e=Me.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s}),r=t?typeof t=="number"?t:t.scroll:null,d=t?typeof t=="number"?t:t.resize:null,h=Me.useRef(!1);Me.useEffect(()=>(h.current=!0,()=>void(h.current=!1)));const[a,l,n]=Me.useMemo(()=>{const c=()=>{if(!e.current.element)return;const{left:p,top:v,width:m,height:S,bottom:M,right:w,x:C,y:A}=e.current.element.getBoundingClientRect(),P={left:p,top:v,width:m,height:S,bottom:M,right:w,x:C,y:A};e.current.element instanceof HTMLElement&&T&&(P.height=e.current.element.offsetHeight,P.width=e.current.element.offsetWidth),Object.freeze(P),h.current&&!b7(e.current.lastBounds,P)&&x(e.current.lastBounds=P)};return[c,d?SM(c,d):c,r?SM(c,r):c]},[x,T,r,d]);function u(){e.current.scrollContainers&&(e.current.scrollContainers.forEach(c=>c.removeEventListener("scroll",n,!0)),e.current.scrollContainers=null),e.current.resizeObserver&&(e.current.resizeObserver.disconnect(),e.current.resizeObserver=null)}function f(){e.current.element&&(e.current.resizeObserver=new E(n),e.current.resizeObserver.observe(e.current.element),i&&e.current.scrollContainers&&e.current.scrollContainers.forEach(c=>c.addEventListener("scroll",n,{capture:!0,passive:!0})))}const o=c=>{!c||c===e.current.element||(u(),e.current.element=c,e.current.scrollContainers=kA(c),f())};return P7(n,!!i),A7(l),Me.useEffect(()=>{u(),f()},[i,n,l]),Me.useEffect(()=>u,[]),[o,s,a]}function A7(g){Me.useEffect(()=>{const t=g;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[g])}function P7(g,t){Me.useEffect(()=>{if(t){const i=g;return window.addEventListener("scroll",i,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",i,!0)}},[g,t])}function kA(g){const t=[];if(!g||g===document.body)return t;const{overflow:i,overflowX:y,overflowY:T}=window.getComputedStyle(g);return[i,y,T].some(E=>E==="auto"||E==="scroll")&&t.push(g),[...t,...kA(g.parentElement)]}const R7=["x","y","top","bottom","left","right","width","height"],b7=(g,t)=>R7.every(i=>g[i]===t[i]);var L7=Object.defineProperty,F7=Object.defineProperties,O7=Object.getOwnPropertyDescriptors,TM=Object.getOwnPropertySymbols,D7=Object.prototype.hasOwnProperty,I7=Object.prototype.propertyIsEnumerable,EM=(g,t,i)=>t in g?L7(g,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):g[t]=i,MM=(g,t)=>{for(var i in t||(t={}))D7.call(t,i)&&EM(g,i,t[i]);if(TM)for(var i of TM(t))I7.call(t,i)&&EM(g,i,t[i]);return g},N7=(g,t)=>F7(g,O7(t)),CM,wM;typeof window<"u"&&((CM=window.document)!=null&&CM.createElement||((wM=window.navigator)==null?void 0:wM.product)==="ReactNative")?Me.useLayoutEffect:Me.useEffect;function jA(g,t,i){if(!g)return;if(i(g)===!0)return g;let y=t?g.return:g.child;for(;y;){const T=jA(y,t,i);if(T)return T;y=t?null:y.sibling}}function KA(g){try{return Object.defineProperties(g,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return g}}const AM=console.error;console.error=function(){const g=[...arguments].join("");if(g?.startsWith("Warning:")&&g.includes("useContext")){console.error=AM;return}return AM.apply(this,arguments)};const Q1=KA(Me.createContext(null));class $A extends Me.Component{render(){return Me.createElement(Q1.Provider,{value:this._reactInternals},this.props.children)}}function B7(){const g=Me.useContext(Q1);if(g===null)throw new Error("its-fine: useFiber must be called within a !");const t=Me.useId();return Me.useMemo(()=>{for(const y of[g,g?.alternate]){if(!y)continue;const T=jA(y,!1,E=>{let s=E.memoizedState;for(;s;){if(s.memoizedState===t)return!0;s=s.next}});if(T)return T}},[g,t])}function U7(){const g=B7(),[t]=Me.useState(()=>new Map);t.clear();let i=g;for(;i;){if(i.type&&typeof i.type=="object"){const T=i.type._context===void 0&&i.type.Provider===i.type?i.type:i.type._context;T&&T!==Q1&&!t.has(T)&&t.set(T,Me.useContext(KA(T)))}i=i.return}return t}function z7(){const g=U7();return Me.useMemo(()=>Array.from(g.keys()).reduce((t,i)=>y=>Me.createElement(t,null,Me.createElement(i.Provider,N7(MM({},y),{value:g.get(i)}))),t=>Me.createElement($A,MM({},t))),[g])}const Sy={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function G7(g){const{handlePointer:t}=c7(g);return{priority:1,enabled:!0,compute(i,y,T){y.pointer.set(i.offsetX/y.size.width*2-1,-(i.offsetY/y.size.height)*2+1),y.raycaster.setFromCamera(y.pointer,y.camera)},connected:void 0,handlers:Object.keys(Sy).reduce((i,y)=>({...i,[y]:t(y)}),{}),update:()=>{var i;const{events:y,internal:T}=g.getState();(i=T.lastEvent)!=null&&i.current&&y.handlers&&y.handlers.onPointerMove(T.lastEvent.current)},connect:i=>{var y;const{set:T,events:E}=g.getState();E.disconnect==null||E.disconnect(),T(s=>({events:{...s.events,connected:i}})),Object.entries((y=E.handlers)!=null?y:[]).forEach(([s,x])=>{const[e,r]=Sy[s];i.addEventListener(e,x,{passive:r})})},disconnect:()=>{const{set:i,events:y}=g.getState();if(y.connected){var T;Object.entries((T=y.handlers)!=null?T:[]).forEach(([E,s])=>{if(y&&y.connected instanceof HTMLElement){const[x]=Sy[E];y.connected.removeEventListener(x,s)}}),i(E=>({events:{...E.events,connected:void 0}}))}}}}const V7=Me.forwardRef(function({children:t,fallback:i,resize:y,style:T,gl:E,events:s=G7,eventSource:x,eventPrefix:e,shadows:r,linear:d,flat:h,legacy:a,orthographic:l,frameloop:n,dpr:u,performance:f,raycaster:o,camera:c,scene:p,onPointerMissed:v,onCreated:m,...S},M){Me.useMemo(()=>i7(Kz),[]);const w=z7(),[C,A]=w7({scroll:!0,debounce:{scroll:50,resize:0},...y}),P=Me.useRef(null),b=Me.useRef(null);Me.useImperativeHandle(M,()=>P.current);const O=BA(v),[I,D]=Me.useState(!1),[B,G]=Me.useState(!1);if(I)throw I;if(B)throw B;const z=Me.useRef(null);hp(()=>{const j=P.current;A.width>0&&A.height>0&&j&&(z.current||(z.current=E7(j)),z.current.configure({gl:E,events:s,shadows:r,linear:d,flat:h,legacy:a,orthographic:l,frameloop:n,dpr:u,performance:f,raycaster:o,camera:c,scene:p,size:A,onPointerMissed:(...Q)=>O.current==null?void 0:O.current(...Q),onCreated:Q=>{Q.events.connect==null||Q.events.connect(x?r7(x)?x.current:x:b.current),e&&Q.setEvents({compute:(tt,Y)=>{const $=tt[e+"X"],U=tt[e+"Y"];Y.pointer.set($/Y.size.width*2-1,-(U/Y.size.height)*2+1),Y.raycaster.setFromCamera(Y.pointer,Y.camera)}}),m?.(Q)}}),z.current.render(Me.createElement(w,null,Me.createElement(UA,{set:G},Me.createElement(Me.Suspense,{fallback:Me.createElement(s7,{set:D})},t)))))}),Me.useEffect(()=>{const j=P.current;if(j)return()=>YA(j)},[]);const X=x?"none":"auto";return Me.createElement("div",Im({ref:b,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:X,...T}},S),Me.createElement("div",{ref:C,style:{width:"100%",height:"100%"}},Me.createElement("canvas",{ref:P,style:{display:"block"}},i)))}),H7=Me.forwardRef(function(t,i){return Me.createElement($A,null,Me.createElement(V7,Im({},t,{ref:i})))});function wa(g,t={}){let i=Me.useCallback(T=>t.keys?$4(g,t.keys,T):g.listen(T),[t.keys,g]),y=g.get.bind(g);return Me.useSyncExternalStore(i,y,y)}const W7=[new eo(-Math.PI/2,-Math.PI/2,-Math.PI/2),new eo(0,Math.PI/2,0),new eo(0,-Math.PI/2,-Math.PI/2),new eo(Math.PI/2,Math.PI,Math.PI),new eo(0,0,-Math.PI/2),new eo(Math.PI,0,0)],X7=({diceValues:g,isRolling:t,textures:i})=>{const y=Me.useRef([]),T=Me.useRef([]);return Me.useEffect(()=>{const E=new pA,s=new Ge(16766720);T.current=[new yl({map:E.load(i.side1),color:s}),new yl({map:E.load(i.side2),color:s}),new yl({map:E.load(i.side3),color:s}),new yl({map:E.load(i.side4),color:s}),new yl({map:E.load(i.side5),color:s}),new yl({map:E.load(i.side6),color:s})],y.current.forEach(x=>{x&&(x.material=T.current)})},[i]),x7(()=>{y.current.forEach((E,s)=>{if(E)if(t)E.rotation.x+=.2,E.rotation.y+=.2;else{const x=W7[g[s]-1];E.rotation.x=pm.lerp(E.rotation.x,x.x,.1),E.rotation.y=pm.lerp(E.rotation.y,x.y,.1),E.rotation.z=pm.lerp(E.rotation.z,x.z,.1)}})}),Yt.jsx(Yt.Fragment,{children:g.map((E,s)=>Yt.jsxs("mesh",{ref:x=>y.current[s]=x,position:[s*2-(g.length-1),0,0],children:[Yt.jsx("boxGeometry",{args:[1,1,1]}),T.current.length===6&&T.current.map((x,e)=>Yt.jsx("meshStandardMaterial",{attach:`material-${e}`,...x},e))]},s))})},Y7=({styleClass:g,textures:t,diceCount:i})=>{const y=wa(Cd);Me.useEffect(()=>{VI("Dice"),WI(t),HI({type:"ROLL_DICE",diceValues:Array(i).fill(1),isRolling:!1})},[t,i]);const T=()=>{LT(!0),setTimeout(()=>{const E=Array.from({length:i},()=>Math.floor(Math.random()*6)+1);vw(E),LT(!1);const s={diceValues:E};Si.emit("diceRollResult",s)},2e3)};return Yt.jsxs("div",{className:`flex flex-col items-center justify-center p-4 ${g}`,children:[Yt.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Dice Roller"}),Yt.jsxs(H7,{className:"w-full h-full",camera:{position:[0,0,5]},children:[Yt.jsx("ambientLight",{intensity:2.5}),Yt.jsx("pointLight",{position:[10,10,10]}),gT(y.action)&&Yt.jsx(X7,{diceValues:y.action.diceValues,isRolling:y.action.isRolling,textures:y.textures})]}),gT(y.action)&&Yt.jsx("button",{onClick:T,className:`mt-4 p-2 border border-yellow-300 rounded text-yellow-400 hover:scale-110 ${y.action.isRolling?"opacity-50":""}`,disabled:y.action.isRolling,children:"Roll Dice"})]})},k7=({text:g,speed:t=80,onComplete:i})=>{const[y,T]=Me.useState([]),E=Me.useRef([]);return Me.useEffect(()=>{let s,x=0;const e=g.split(/(<\/?span[^>]*>)/g).filter(Boolean),r=[];e.forEach((h,a)=>{if(h.startsWith("/);if(l){const n=l[1];r.push(Yt.jsx("span",{className:n},`span-${a}`))}else r.push(Yt.jsx("span",{},`span-${a}`))}else h.split("").forEach((l,n)=>{r.push(Yt.jsx("span",{children:l},`char-${a}-${n}`))})}),x=0;const d=()=>{x{window.clearTimeout(s)}},[g,t,i]),Yt.jsx("div",{children:y})},ZA=Du.memo(k7);class JA{constructor(t,i,y){this.scene=t,this.gridEngine=i,this.quadtree=y,this.cursor=this.scene.input.keyboard?.createCursorKeys(),this.initializeWASDKeys(),this.registerEventHandlers(),this.tooltip=this.scene.add.text(0,0,"Press [F]",{font:"16px Arial",backgroundColor:"#000000"}).setDepth(4).setPadding(3,2,2,3).setVisible(!1)}initializeWASDKeys(){const t=this.scene.input.keyboard;t&&(this.wasdKeys={W:t.addKey(Phaser.Input.Keyboard.KeyCodes.W),A:t.addKey(Phaser.Input.Keyboard.KeyCodes.A),S:t.addKey(Phaser.Input.Keyboard.KeyCodes.S),D:t.addKey(Phaser.Input.Keyboard.KeyCodes.D)})}handleConsume(t){const i=Tl(t);i&&i.consumable?(Oe.log(`Consuming item: ${i.name}`),zI(i),bT(i.id)):Oe.log(`Item ${t} is not consumable`)}handleEquip(t){const i=Tl(t);i&&(Oe.log(`Equipping item: ${i.name}`),bI("weapon",i.id))}handleUnequip(t){const i=Tl(t);i&&(Oe.log(`Unequipping item: ${i.name}`),LI("weapon"))}handleDiscard(t){Oe.log(`Discarding item: ${t}`),bT(t)}handleView(t){const i=Tl(t);if(i&&(Oe.log(`Viewing item: ${i.name} with ${i.slug}`),i.slug)){const y=`https://kbve.com/${i.slug}#${i.name.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"")}`;window.open(y,"_blank")}}registerEventHandlers(){Si.on("itemAction",this.handleItemAction.bind(this));//! Broken +Si.on("playerMove",this.handlePlayerMove.bind(this)),Si.on("playerReward",this.handlePlayerReward.bind(this)),Si.on("playerDamage",this.handlePlayerCombatDamage.bind(this))}handleItemAction(t){if(t)switch(Oe.log(`Preparing Action: ${t.itemId} with ${t.action}`),t.action){case"consume":this.handleConsume(t.itemId);break;case"equip":this.handleEquip(t.itemId);break;case"unequip":this.handleUnequip(t.itemId);break;case"discard":this.handleDiscard(t.itemId);break;case"view":this.handleView(t.itemId);break;default:Oe.log(`Unknown action: ${t.action}`)}}handlePlayerReward(t){Oe.log("Rewarding the player"),t&&(Si.emit("notification",{title:"Success",message:t.message,notificationType:bu.success}),RI(t.item))}handlePlayerCombatDamage(t){t&&(pw(parseInt(t.damage)),Si.emit("notification",{title:"Danger",message:`You taken ${t.damage} points of damage!`,notificationType:bu.danger}))}handlePlayerMove(t){t&&this.gridEngine.moveTo("player",{x:t.x,y:t.y})}checkForNearbyObjects(){const i=this.gridEngine.getPosition("player"),y=i.x*48,T=i.y*48;this.quadtree.query(i).length>0?this.tooltip.setPosition(y,T-60).setVisible(!0):this.tooltip.setVisible(!1)}handleMovement(){if(!this.cursor)return;const t=this.cursor,i=this.wasdKeys;if(this.scene.input.keyboard?.addKey("F").isDown){const y=this.gridEngine.getPosition("player"),T=this.quadtree.query(y);for(const E of T)E.action()}(t.left.isDown||i.A.isDown)&&(t.up.isDown||i.W.isDown)?this.gridEngine.move("player","up-left"):(t.left.isDown||i.A.isDown)&&(t.down.isDown||i.S.isDown)?this.gridEngine.move("player","down-left"):(t.right.isDown||i.D.isDown)&&(t.up.isDown||i.W.isDown)?this.gridEngine.move("player","up-right"):(t.right.isDown||i.D.isDown)&&(t.down.isDown||i.S.isDown)?this.gridEngine.move("player","down-right"):t.left.isDown||i.A.isDown?this.gridEngine.move("player","left"):t.right.isDown||i.D.isDown?this.gridEngine.move("player","right"):t.up.isDown||i.W.isDown?this.gridEngine.move("player","up"):(t.down.isDown||i.S.isDown)&&this.gridEngine.move("player","down"),this.checkForNearbyObjects()}}class QA extends Phaser.GameObjects.Container{constructor(t,i,y,T){const E=i.x,s=i.y-i.height+10;super(t,E,s),this.sprite=i;const x=150,e=40+T.length*20;this.background=t.add.rectangle(0,0,x,e,0,.7),this.text=t.add.text(0,-e/2+10,y,{fontSize:"12px",color:"#ffffff"}).setOrigin(.5),this.buttons=T.map((r,d)=>{const h=t.add.text(0,-e/2+30+d*20,r.label,{fontSize:"12px",color:"#00ff00"}).setOrigin(.5);return h.setInteractive({useHandCursor:!0}),h.on("pointerdown",r.callback),h}),this.add(this.background),this.add(this.text),this.buttons.forEach(r=>this.add(r)),this.scene.add.existing(this)}updatePosition(){this.setPosition(this.sprite.x-30,this.sprite.y-this.sprite.height-this.background.height/2+100)}static attachToSprite(t,i,y,T){i.setInteractive(),i.on("pointerover",E=>{const s={npcId:i.name,npcName:y,actions:T.map(e=>e.label),coords:{x:E.x,y:E.y}};if(Si.emit("npcInteraction",s),!i.getData("tooltipMenu")){const e=new QA(t,i,y,T);i.setData("tooltipMenu",e)}const x=i.getData("tooltipMenu");x.setVisible(!0),x.updatePosition()}),i.on("pointerout",()=>{const E=i.getData("tooltipMenu");E&&E.setVisible(!1)})}static updateAllTooltipPositions(t){t.children.list.forEach(i=>{if(i instanceof Phaser.GameObjects.Sprite){const y=i.getData("tooltipMenu");y&&y.updatePosition()}})}}let OG=class extends Phaser.GameObjects.Sprite{};function j7(g,t,i){const s=g.add.graphics();s.fillStyle(16777215,1),s.fillRoundedRect(0,0,200,60,16),s.setDepth(99);const x=g.add.text(100,30,i,{fontFamily:"Arial",fontSize:16,color:"#000000"});x.setOrigin(.5),x.setWordWrapWidth(200-10*2),x.setDepth(100);const e=g.add.container(0,0,[s,x]);return e.setDepth(100),t.textBubble=e,Bx(t),e}function Bx(g){const t=g.textBubble;t&&(t.x=g.x,t.y=g.y-g.height-t.height/2)}class K7 extends wm{constructor(){super("NPCDatabase"),this.version(3).stores({npcs:"id,name",sprites:"id",avatars:"id",dialogues:"id"}),this.npcs=this.table("npcs"),this.sprites=this.table("sprites"),this.avatars=this.table("avatars"),this.dialogues=this.table("dialogues")}async addNPC(t){await this.npcs.put(t)}async getNPC(t){return await this.npcs.get(t)}async getNPCByName(t){return await this.npcs.where("name").equals(t).first()}async getAllNPCs(){return await this.npcs.toArray()}async exportNPCs(){const t=await this.getAllNPCs();return JSON.stringify(t,null,2)}async importNPCs(t){const i=JSON.parse(t);await this.npcs.bulkPut(i)}async fetchNPCData(t){try{return(await Ji.get(t)).data}catch(i){Oe.error(`Failed to fetch NPC data from ${t}:`,i);return}}async addSprite(t){await this.sprites.put(t)}async getSprite(t){return await this.sprites.get(t)}async getAllSprites(){return await this.sprites.toArray()}async addAvatar(t){await this.avatars.put(t)}async getAvatar(t){return await this.avatars.get(t)}async getAllAvatars(){return await this.avatars.toArray()}async urlToBlob(t){try{return(await Ji.get(t,{responseType:"blob"})).data}catch(i){Oe.error(`Failed to fetch blob from ${t}:`,i);return}}async addNewSprite(t,i){const y=await this.urlToBlob(t);if(y){const T={...i,spriteData:y};return await this.addSprite(T),T.id}}async addNewNPC(t,i,y){const T={...t,spriteImageId:i,avatarImageId:y};await this.addNPC(T)}async addNewAvatar(t,i){const y=await this.urlToBlob(t);if(y){const T={...i,avatarData:y};return await this.addAvatar(T),T.id}}async fetchAvatars(t){try{const y=(await Ji.get(t)).data.key;for(const T in y){const E=y[T];let s=await this.urlToBlob(E.avatarLocation);if(s||(s=await this.urlToBlob(`https://kbve.com${E.avatarLocation}`)),s){const x={id:E.id,avatarName:E.avatarName,avatarLocation:E.avatarLocation,avatarData:s,slug:E.slug};await this.addAvatar(x)}}}catch(i){Oe.error(`Failed to fetch avatars from ${t}:`,i)}}async fetchSprites(t){try{const y=(await Ji.get(t)).data.key;for(const T in y){const E=y[T];let s=await this.urlToBlob(E.assetLocation);if(s||(s=await this.urlToBlob(`https://kbve.com${E.assetLocation}`)),s){const x={id:E.id,spriteName:E.spriteName,assetLocation:E.assetLocation,frameWidth:E.frameWidth,frameHeight:E.frameHeight,scale:E.scale,slug:E.slug,spriteData:s};await this.addSprite(x)}}}catch(i){Oe.error(`Failed to fetch sprites from ${t}:`,i)}}async fetchNPCs(t){try{const y=(await Ji.get(t)).data.key;for(const T in y){const E=y[T],s={id:E.id,name:E.name,spriteKey:E.spriteKey,walkingAnimationMapping:E.walkingAnimationMapping,startPosition:E.startPosition,speed:E.speed,scale:E.scale,slug:E.slug,actions:E.actions,effects:E.effects,stats:E.stats,spriteImageId:E.spriteImageId,avatarImageId:E.avatarImageId,dialogues:E.dialogues||[]};await this.addNPC(s)}}catch(i){Oe.error(`Failed to fetch NPCs from ${t}:`,i)}}async initializeDatabase(t="https://kbve.com"){await this.fetchAvatars(`${t}/api/avatardb.json`),await this.fetchSprites(`${t}/api/spritedb.json`),await this.fetchNPCs(`${t}/api/npcdb.json`),await this.fetchDialogues(`${t}/api/dialogue.json`)}async loadNPC(t,i,y,T){try{Oe.log(`Loading NPC with name: ${i}`);const E=await this.getNPCByName(i);if(!E)throw new Error(`NPC with name ${i} not found`);Oe.log(`NPC Data: ${JSON.stringify(E)}`),await this.loadCharacter(t,E.id,y,T)}catch(E){E instanceof Error?Oe.error(`Failed to load NPC: ${E.message}`):Oe.error("Failed to load NPC:",E)}}async loadCharacter(t,i,y,T){try{Oe.log(`Loading NPC with ID: ${i}`);const E=await this.getNPC(i);if(!E)throw new Error(`NPC with ID ${i} not found`);Oe.log(`NPC Data: ${JSON.stringify(E)}`);const s=E.spriteKey;if(t.textures.exists(s))Oe.log(`Texture with key ${s} already loaded.`),this.addNPCToScene(t,E,y,T);else{Oe.log(`Texture with key ${s} not found, attempting to load.`);const x=await this.getSprite(E.spriteImageId);if(x&&x.spriteData){Oe.log(`Sprite Data: ${JSON.stringify(x)}`);const e=URL.createObjectURL(x.spriteData);t.load.spritesheet(s,e,{frameWidth:x.frameWidth,frameHeight:x.frameHeight}),t.load.once("complete",()=>{Oe.log(`Texture ${s} loaded successfully.`),this.addNPCToScene(t,E,y,T)}),t.load.start()}else throw new Error(`Sprite with ID ${E.spriteImageId} not found`)}}catch(E){E instanceof Error?Oe.error(`Failed to load NPC: ${E.message}`):Oe.error("Failed to load NPC:",E)}}addNPCToScene(t,i,y,T){try{Oe.log(`Adding NPC to scene: ${JSON.stringify(i)}`),Oe.log(`Using sprite key: ${i.spriteKey}`);const E=t.add.sprite(0,0,i.spriteKey);E.scale=i.scale||1.5,E.name=i.id||"Error Missing Name",Oe.log(`NPC Sprite created with texture key ${i.spriteKey} at position (${i.startPosition.x}, ${i.startPosition.y})`);const s={id:i.id,sprite:E,walkingAnimationMapping:i.walkingAnimationMapping,startPosition:{x:y??i.startPosition.x,y:T??i.startPosition.y},speed:i.speed};if(Oe.log(`Grid engine config: ${JSON.stringify(s)}`),!t.textures.exists(i.spriteKey))throw new Error(`Texture with key ${i.spriteKey} does not exist in the scene`);t.gridEngine.addCharacter(s),Oe.log(`NPC added to grid engine with ID ${i.id}`),((e,r,d)=>{const h=t.gridEngine.getPosition(e.name);Oe.log(`Attaching NPC events to ${r} at position: ${JSON.stringify(h)}`),_A.attachNPCEvent(e,r,d,{coords:h})})(E,i.name,i.actions.map(e=>({label:e}))),Oe.log(`NPC ${i.name} added to scene successfully`)}catch(E){E instanceof Error?Oe.error(`Error adding NPC to scene from addNPCToScene: ${E.message}`):Oe.error("Error adding NPC to scene:",E)}}async addDialogue(t){await this.dialogues.put(t)}async getDialogue(t){return await this.dialogues.get(t)}async getAllDialogues(){return await this.dialogues.toArray()}async getDialoguesForNPC(t){const i=await this.getNPC(t);if(!i)throw new Error(`NPC with ID ${t} not found`);return(await Promise.all((i.dialogues||[]).map(T=>this.getDialogue(T.dialogueId)))).filter(T=>T!==void 0)}async markDialogueAsRead(t,i){const y=await this.getNPC(t);if(!y)throw new Error(`NPC with ID ${t} not found`);const T=y.dialogues?.find(E=>E.dialogueId===i);T&&(T.read=!0,await this.addNPC(y))}async fetchDialogues(t){try{const y=(await Ji.get(t)).data.key,T=Object.values(y).map(E=>({...E}));await this.dialogues.bulkPut(T)}catch(i){Oe.error(`Failed to fetch dialogues from ${t}:`,i)}}async getPrioritizedDialoguesForNPC(t){try{const i=await this.getNPC(t);if(!i)throw new Error(`NPC with ID ${t} not found`);const T=(await Promise.all((i.dialogues||[]).map(async E=>{const s=await this.getDialogue(E.dialogueId);return s?{...s,priority:E.priority,read:E.read}:null}))).filter(E=>E!==null);return T.sort((E,s)=>s.priority-E.priority),T}catch(i){return Oe.error(`Failed to get prioritized dialogues for NPC with ID ${t}:`,i),[]}}async getNPCNameById(t){return(await this.getNPC(t))?.name}async getNPCAvatarById(t){const i=await this.getNPC(t);if(i?.avatarImageId)return(await this.getAvatar(i.avatarImageId))?.avatarData}async getNPCSlugById(t){return(await this.getNPC(t))?.slug}async getNPCHealthById(t){try{return(await this.getNPC(t))?.stats?.health}catch(i){Oe.error(`Failed to get health for NPC with ID ${t}:`,i);return}}async getNPCManaById(t){try{return(await this.getNPC(t))?.stats?.mana}catch(i){Oe.error(`Failed to get mana for NPC with ID ${t}:`,i);return}}async createNPCSession(t,i){try{const y=this.getNPCNameById(i),T=this.getNPCSlugById(i),E=this.getNPCAvatarById(i),s=this.getNPCHealthById(i),x=this.getNPCManaById(i),[e,r,d,h,a]=await Promise.all([y,T,E,s,x]),l={...t.get(),[`${i}_name`]:e||"Unknown",[`${i}_slug`]:r||"Unknown",[`${i}_avatar`]:d?URL.createObjectURL(d):"Unknown",[`${i}_health`]:h||"100",[`${i}_mana`]:a||"100"};t.set(l)}catch{const T={...t.get(),[`${i}_name`]:"Unknown",[`${i}_slug`]:"Unknown",[`${i}_avatar`]:"Unknown",[`${i}_hp`]:"100",[`${i}_mana`]:"100"};t.set(T)}}async getNPCDialogueOptionsByULID(t){try{const i=await this.getDialogue(t);if(!i||!i.options)return"[]";const y=await Promise.all(i.options.map(async T=>this.getDialogue(T)));return JSON.stringify(y.filter(T=>T!==void 0))}catch(i){return Oe.error(`Failed to get dialogue options for ID ${t}:`,i),"[]"}}async getAllDialogueOptions(t){const i=[],y=new Set,T=async E=>{if(y.has(E))return;y.add(E);const s=await this.getDialogue(E);if(s&&(i.push(s),s.options&&s.options.length>0))for(const x of s.options)await T(x)};return await T(t),i}async createDialogueSession(t,i){try{const y=await this.getNPCDialogueOptionsByULID(i),T={...t.get(),[`${i}_options`]:y||"[]"};t.set(T)}catch{const T={...t.get(),[`${i}_options`]:"[]"};t.set(T)}}}const Su=new K7;class $7{constructor(){this.actionHandlers={talk:this.talkToNPC.bind(this),quest:this.questWithNPC.bind(this),trade:this.tradeWithNPC.bind(this),combat:this.startCombat.bind(this),heal:this.healNPC.bind(this),steal:this.stealFromNPC.bind(this),lore:this.loreFromNPC.bind(this)}}getActionHandler(t){return this.actionHandlers[t]}loreFromNPC(t){Oe.log(`Pulling up the lore of the NPC with ID: ${t.npcId}`)}questWithNPC(t){Oe.log(`Starting quest with NPC with ID: ${t.npcId}`)}healNPC(t){Oe.log(`Healing NPC with ID: ${t.npcId}`)}oathFromNPC(t){Oe.log(`Oath from NPC with ID: ${t.npcId}`)}async talkToNPC(t){try{Oe.log(`Talking to NPC with ID: ${t.npcId}`);const i=await Su.getPrioritizedDialoguesForNPC(t.npcId);if(Oe.log(i),i.length>0){const y=i[0];Si.emit("npcDialogue",{npcId:t.npcId,dialogue:y},1e3)}else Oe.log("No dialogues available for this NPC.")}catch(i){Oe.error(`Failed to fetch dialogues for NPC with ID ${t.npcId}:`,i)}}tradeWithNPC(t){Oe.log(`Trading with NPC with ID: ${t.npcId}`)}moveToNPC(t){const y=t.data?.coords||{x:10,y:15};Si.emit("playerMove",y)}stealFromNPC(t){Oe.log(`Attempting to steal from NPC with ID: ${t.npcId}`);const i={npcId:t.npcId,npcName:t.npcName,data:t.data};Si.emit("playerSteal",i)}startCombat(t){Oe.log(`Starting combat with NPC with ID: ${t.npcId}`)}checkFish(t){Oe.log(`Checking fish for NPC with ID: ${t.npcId}`)}attachNPCEvent(t,i,y,T){t.setInteractive(),t.on("pointerover",E=>{const s={npcId:t.name||"",npcName:i,actions:y.map(x=>x.label),data:T||{},coords:{x:E.x,y:E.y}};Si.emit("npcInteraction",s),t.setTint(65280)}),t.on("pointerout",()=>{t.clearTint()}),t.on("pointerdown",E=>{const s={npcId:t.name||"",npcName:i,actions:y.map(x=>x.label),data:T||{},coords:{x:E.x,y:E.y}};Oe.log(`Click Registered at X: ${s.coords.x} Y: ${s.coords.y}`),Si.emit("npcInteractionClick",s,1e3)})}}const _A=new $7;function Z7(g){return+g[g.length-1]}function J7(g){return g.startsWith("monster_bird_")&&!g.startsWith("monster_bird_shadow")}function qA(g,t,i,y,T){const E=[];for(let s=0;s<10;s++){const x=g.add.sprite(0,0,"monster_bird");x.setCrop(t,i,y,T),x.scale=3,E.push(x)}return E}function Q7(g){return qA(g,0,0,61,47)}function _7(g){return qA(g,22,47,16,10)}function q7(g){g.anims.create({key:"bird",frames:g.anims.generateFrameNumbers("monster_bird",{start:0,end:2}),frameRate:10,repeat:-1,yoyo:!0})}class tG extends eg.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.image("creditsBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),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.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}),wI()}async create(){await Su.initializeDatabase(),await dd.initializeMapDatabase(),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 eG extends eg.Scene{cursor;gridEngine;quadtree;playerController;constructor(){super({key:"SandCity"})}preload(){Si.emit("notification",{title:"Success",message:`You arrived safely to SandCity Passport: ${h1()}`,notificationType:bu.success})}async create(){let t=null;try{t=await dd.loadMap(this,"cloud-city-map")}catch(r){Oe.error("Failed to load map:",r);return}if(!t){Oe.error("Tilemap could not be loaded.");return}const i=await dd.getBounds("cloud-city-map");if(i)this.quadtree=new vu(i);else{Oe.error("Bounds could not be retrieved.");return}const y=this.add.sprite(0,0,"player");y.scale=1.5;const T=y.getBounds(),E=T.centerX+y.width*3,s=T.centerY+y.height*3;this.cameras.main.pan(E,s,1e3,"Power2"),this.cameras.main.once("camerapancomplete",()=>{this.cameras.main.startFollow(y,!0),this.cameras.main.setFollowOffset(-y.width,-y.height)});const x={characters:[{id:"player",sprite:y,walkingAnimationMapping:6,startPosition:{x:5,y:12}}],numberOfDirections:8};this.gridEngine.create(t,x),this.loadRanges(),this.playerController=new JA(this,this.gridEngine,this.quadtree);const e=await dd.getNpcsFromTilesetKey("cloud-city-map");if(e)for(const r of e)try{await Su.loadCharacter(this,r.ulid,r.position.x,r.position.y)}catch(d){Oe.error(`Failed to load NPC with ULID: ${r.ulid}`,d)}window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const t=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>{const i={message:"Seems like there are no fish in the sand pits. You know null, this area could be fixed up a bit too."};Si.emit("charEvent",i)}},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:()=>{const i={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"};Si.emit("charEvent",i)}},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>{const i={message:"Sorry, we are closed!",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/animebar.webp"};Si.emit("charEvent",i)}},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>{const i={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"};Si.emit("charEvent",i)}}];for(const i of t)this.quadtree!=null&&this.quadtree.insert(i)}update(){this.playerController?.handleMovement()}}class IG extends ad.GameObjects.Sprite{textBubble}class iG extends eg.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"CloudCity"});const t={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new vu(t)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57})}create(){const t=this.make.tilemap({key:"cloud-city-map-large"});t.addTilesetImage("cloud_tileset","cloud-city-tiles");for(let T=0;T({id:"monster_bird_"+E,sprite:T,startPosition:{x:7,y:7+E},speed:5,collides:!1})),...this.monsterBirdShadows.map((T,E)=>({id:"monster_bird_shadow_"+E,sprite:T,startPosition:{x:7,y:7+E},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(t,y),this.loadRanges(),this.playerController=new JA(this,this.gridEngine,this.quadtree),j7(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!"),this.gridEngine.moveRandomly("npc",1500,3);for(let T=0;T<10;T++)this.gridEngine.moveRandomly("monster_bird_"+T,1e3,20);this.gridEngine.positionChangeStarted().subscribe(({charId:T,exitTile:E,enterTile:s})=>{J7(T)&&this.gridEngine.moveTo("monster_bird_shadow_"+Z7(T),{x:s.x,y:s.y})}),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const t=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>{const i={message:"Seems like there are no fish in the sand pits. You know null, this area could be fixed up a bit too."};Si.emit("charEvent",i,1e3)}},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:async()=>{try{const T={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"};Si.emit("charEvent",T,1e3)}catch(i){console.error("Error fetching data:",i);const y={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"};Si.emit("charEvent",y,1e3)}}},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>{const i={message:"Sorry, we are closed!",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/animebar.webp"};Si.emit("charEvent",i,1e3)}},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>{const i={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"};Si.emit("charEvent",i,1e3)}}];for(const i of t)this.quadtree.insert(i)}update(){this.playerController?.handleMovement(),this.npcSprite&&this.npcSprite.textBubble&&Bx(this.npcSprite),this.fishNpcSprite&&this.fishNpcSprite.textBubble&&Bx(this.fishNpcSprite)}}const nG=xm.div` width: 100vw; height: 100vh; -`;function rG(){const g=Me.useRef(null);return Me.useEffect(()=>{let t=null;if(g.current){const i=g.current,x={title:"CryptoThrone",render:{antialias:!1},scale:{mode:zf.Scale.FIT,autoCenter:zf.Scale.CENTER_BOTH,zoom:1},type:zf.AUTO,transparent:!0,width:window.innerWidth,height:window.innerHeight,physics:{default:"arcade",arcade:{gravity:{x:0,y:0},debug:!1}},plugins:{scene:[{key:"gridEngine",plugin:Q4,mapping:"gridEngine"}]},scene:[tG,eG,iG],input:{mouse:{preventDefaultWheel:!1},touch:{capture:!0}},parent:i};t=new zf.Game(x);const T=()=>{t&&t.scale.resize(window.innerWidth,window.innerHeight)};return window.addEventListener("resize",T),()=>{window.removeEventListener("resize",T),t&&t.destroy(!0)}}},[]),Yt.jsx(nG,{children:Yt.jsx("div",{className:"w-full h-full scrollbar-hide",ref:g})})}const AM=rc({message:""}),sG=()=>{const g=wa(AM);Me.useEffect(()=>{const i=x=>{if(x){AM.set(x);const T=document.querySelector("#hs-stacked-overlays");T&&(T.classList.remove("hidden"),T.classList.add("open"))}};return Si.on("charEvent",i),()=>{Si.off("charEvent",i)}},[]);const t=()=>{const i=document.querySelector("#hs-stacked-overlays");i&&(i.classList.add("hidden"),i.classList.remove("open"))};return Yt.jsx(Yt.Fragment,{children:Yt.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:Yt.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:Yt.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(${g.background_image||"https://kbve.com/assets/img/curved-images/wave.jpg"})`},children:[Yt.jsxs("div",{className:"w-full lg:w-1/3 p-4 rounded-l-xl flex flex-col items-center justify-center",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4",children:`${g.character_name||"NPC"}`}),Yt.jsx("img",{src:g.character_image||"/assets/npc/barkeep.webp",alt:"Character",className:"w-full h-auto rounded-md"})]}),Yt.jsxs("div",{className:"w-full lg:w-2/3 p-4 bg-cover bg-center rounded-r-xl",children:[Yt.jsxs("div",{className:"flex justify-between items-center pb-3 border-b",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400",children:""}),Yt.jsxs("button",{type:"button",className:"flex justify-center items-center size-7 text-sm font-semibold rounded-full border border-transparent text-yellow-400 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays",onClick:t,children:[Yt.jsx("span",{className:"sr-only",children:"Close"}),Yt.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:[Yt.jsx("path",{d:"M18 6 6 18"}),Yt.jsx("path",{d:"m6 6 12 12"})]})]})]}),Yt.jsx("div",{className:"p-4 overflow-y-auto",children:Yt.jsx("p",{className:"mt-1 mb-2 text-yellow-400 bg-zinc-950/80 rounded-xl p-4",children:g.message||"No Message"})}),Yt.jsx("div",{className:"flex justify-end items-center gap-x-2 py-3 px-4 border-t",children:Yt.jsxs("button",{className:"relative rounded px-5 py-2.5 overflow-hidden group bg-yellow-500 relative hover:bg-gradient-to-r hover:from-yellow-500 hover:to-yellow-400 text-white hover:ring-2 hover:ring-offset-2 hover:ring-yellow-400 transition-all ease-out duration-300 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays",onClick:t,children:[Yt.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"}),Yt.jsx("span",{className:"relative",children:"Okay."})]})})]})]})})})})},PM=({settingKey:g,label:t,collapseIcon:i=qI,expandIcon:x=t5})=>{const T=gl(g),E=()=>fh(g,!T);return Yt.jsxs("button",{onClick:E,className:"bg-yellow-500 text-white text-sm p-2 rounded ml-2 flex items-center w-20 h-10",children:[T?Yt.jsx(x,{className:"w-2"}):Yt.jsx(i,{className:"w-4"}),Yt.jsx("span",{className:"ml-2 text-xs",children:t})]})},aG=({stats:g})=>{const t=(i,x)=>{const T=typeof i=="string"?parseInt(i,10):i,E=typeof x=="string"?parseInt(x,10):x;return Math.min(T/E*100,100)};return Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Stats"}),Yt.jsxs("div",{className:"mb-2",children:[Yt.jsx("p",{className:"text-sm text-green-400",children:`HP: ${g.health||"0"} / ${g.maxHealth}`}),Yt.jsx("div",{className:"w-full bg-gray-300 h-4 rounded",children:Yt.jsx("div",{className:"bg-green-400 h-full rounded",style:{width:`${t(g.health,g.maxHealth)}%`}})})]}),Yt.jsxs("div",{className:"mb-2",children:[Yt.jsx("p",{className:"text-sm text-blue-400",children:`MP: ${g.mana||"0"} / ${g.maxMana}`}),Yt.jsx("div",{className:"w-full bg-gray-300 h-4 rounded",children:Yt.jsx("div",{className:"bg-blue-400 h-full rounded",style:{width:`${t(g.mana,g.maxMana)}%`}})})]}),Yt.jsxs("div",{className:"mb-2",children:[Yt.jsx("p",{className:"text-sm text-yellow-400",children:`EP: ${g.energy||"0"} / ${g.maxEnergy}`}),Yt.jsx("div",{className:"w-full bg-gray-300 h-4 rounded",children:Yt.jsx("div",{className:"bg-yellow-400 h-full rounded",style:{width:`${t(g.energy,g.maxEnergy)}%`}})})]})]})},oG=({settingKey:g,label:t})=>{const i=gl(g),x=()=>{fh(g,!i)};return Yt.jsxs("label",{className:"flex items-center cursor-pointer",children:[Yt.jsx("span",{className:"mr-2 text-sm",children:t}),Yt.jsxs("div",{className:"relative",children:[Yt.jsx("input",{type:"checkbox",className:"sr-only",checked:i,onChange:x}),Yt.jsx("div",{className:"w-10 h-4 bg-gray-400 rounded-full shadow-inner"}),Yt.jsx("div",{className:`absolute w-6 h-6 bg-white opacity-75 rounded-full shadow -left-1 -top-1 transition-transform ${i?"transform translate-x-full bg-yellow-500 !opacity-100":""}`})]})]})},lG=(g,t)=>{const i=Tl(g);return i?Yt.jsxs("div",{style:{top:t.y,left:t.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[Yt.jsx("p",{className:"text-sm font-semibold",children:i.name}),Yt.jsxs("p",{className:"text-xs",children:["Type: ",i.type]}),Yt.jsxs("p",{className:"text-xs",children:["Bonuses: ",JSON.stringify(i.bonuses)]}),Yt.jsxs("p",{className:"text-xs",children:["Durability: ",i.durability]}),Yt.jsxs("p",{className:"text-xs",children:["Weight: ",i.weight]})]}):null},hG=(g,t,i,x)=>Yt.jsx("ul",{className:"grid grid-cols-8 gap-2",children:Object.keys(g).map(T=>{const E=g[T];return uG(E,t,i,x)})}),uG=(g,t,i,x)=>{if(!g)return Yt.jsx("li",{className:"text-sm relative flex items-center justify-center border border-gray-500 bg-gray-200",style:{width:"32px",height:"32px"}},`empty-${Math.random()}`);const T=Tl(g);return T?Yt.jsxs("li",{className:"text-sm relative",onMouseEnter:E=>t(T.id,E),onMouseLeave:i,onClick:E=>x(T.id,E),children:[T.name," (",T.type,") - Bonuses: ",JSON.stringify(T.bonuses)," - Durability: ",T.durability," - Weight: ",T.weight]},T.id):null},fG=(g,t,i,x)=>Yt.jsx("ul",{className:"grid grid-cols-8 gap-1",children:g.map((T,E)=>{const s=Tl(T);return s?Yt.jsx("li",{className:"text-sm relative hover:scale-[1.3] transition ease-in-out duration-100",onMouseEnter:y=>t(s.id,y),onMouseLeave:i,onClick:y=>x(s.id,y),children:Yt.jsx("img",{src:s.img,alt:s.name,style:{width:"32px",height:"32px"},className:"inline-block border border-yellow-400/50"})},E):null})}),cG=()=>Yt.jsx("div",{className:"transition transform duration-1000 ease-in-out",children:Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Settings"}),Yt.jsx("p",{className:"text-sm",children:"Additional settings can go here."}),Yt.jsx(oG,{settingKey:"debugMode",label:"Debug Mode"})]})}),dG=()=>{const g=wa(Tn);wa(Em),wa(RI),wa($r),Me.useEffect(()=>{const r=d=>{};return Si.on("playerEvent",r),()=>{Si.off("playerEvent",r)}},[]);const t=(r,d)=>{fh("tooltipItem",{id:r,position:{x:d.clientX+10,y:d.clientY-150}})},i=()=>{fh("tooltipItem",{...gl("tooltipItem"),id:null})},x=(r,d)=>{fh("submenuItem",{id:r,position:{x:d.clientX,y:d.clientY-150}})},T=()=>{fh("submenuItem",{...gl("submenuItem"),id:null})},E=(r,d)=>{const h=Tl(r);if(h){const a={itemId:h.id,action:d};Si.emit("itemAction",a),T()}};if(!g||!g.stats)return null;const s=gl("submenuItem"),y=s.id?XI(s.id):[],e=gl("tooltipItem");return Yt.jsxs("div",{className:"fixed top-24 left-3 w-[350px] p-4 bg-zinc-800 text-yellow-400 border border-yellow-300 rounded-lg z-20 transition transform ease-in-out duration-500 opacity-50 hover:opacity-100",children:[Yt.jsxs("div",{className:"flex flex-row space-y-2 align-top",children:[Yt.jsx(PM,{settingKey:"isStatsMenuCollapsed",label:"Stats"}),Yt.jsx(PM,{settingKey:"isSettingsMenuCollapsed",label:"Settings"})]}),Yt.jsx("div",{className:`transition transform duration-1000 ease-in-out ${gl("isSettingsMenuCollapsed")?"max-h-0 overflow-hidden":"max-h-screen"}`,children:Yt.jsx(cG,{})}),Yt.jsxs("div",{className:`transition transform duration-1000 ease-in-out ${gl("isStatsMenuCollapsed")?"max-h-0 overflow-hidden":"max-h-screen"}`,children:[Yt.jsx(aG,{stats:g.stats}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"User Information"}),Yt.jsx("p",{className:"text-sm",children:g.stats.username||"Guest"})]}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"General Information"}),Yt.jsx("p",{className:"text-sm",children:""})]}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Inventory"}),fG(g.inventory.backpack,t,i,x)]}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Equipment"}),hG(g.inventory.equipment,t,i,x)]}),e.id&&lG(e.id,e.position),s.id&&Yt.jsxs("div",{style:{top:s.position.y,left:s.position.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[Yt.jsx("button",{onClick:T,className:"absolute top-1 right-1 translate-x-6 bg-yellow-400 p-1 text-white hover:text-gray-400",children:"X"}),Yt.jsx("p",{className:"text-sm strong",children:"Actions:"}),Yt.jsxs("ul",{className:"text-xs",children:[y.map(r=>Yt.jsx("li",{onClick:()=>s.id&&E(s.id,r),className:"cursor-pointer hover:bg-gray-600",children:r.charAt(0).toUpperCase()+r.slice(1)},r)),Yt.jsx("li",{onClick:T,className:"cursor-pointer hover:bg-gray-600",children:"Close"})]})]})]})]})},xy=rc(null),Sy=rc(null),pG=()=>{const g=wa(xy),[t,i]=Me.useState({x:0,y:0}),x=Me.useRef(null);Me.useEffect(()=>{const e=r=>{r&&(xy.set(r),setTimeout(()=>{i(T(r.coords.x,r.coords.y))},0))};return Si.on("npcInteractionClick",e),()=>{Si.off("npcInteractionClick",e)}},[]);const T=(e,r)=>{const h=x.current;if(!h)return{x:e,y:r};const a=h.getBoundingClientRect();let l=e,n=r;return l+a.width>window.innerWidth-10&&(l=window.innerWidth-a.width-10),n+a.height>window.innerHeight-10&&(n=window.innerHeight-a.height-10),l<10&&(l=10),n<10&&(n=10),{x:l,y:n}},E=e=>{if(g){const r=QA.getActionHandler(e);r&&(r(g),s())}},s=()=>{xy.set(null)},y=()=>{if(!g)return null;const{npcName:e,actions:r,npcId:d}=g,{x:h,y:a}=t;return Yt.jsxs("div",{ref:x,className:"absolute bg-zinc-900 border border-yellow-300 rounded-md p-2 z-[100]",style:{left:`${h}px`,top:`${a}px`},children:[Yt.jsxs("div",{className:"flex justify-between items-center mb-2",children:[Yt.jsx("h3",{className:"font-bold text-sm text-white",children:e}),Yt.jsx("button",{onClick:s,className:"text-xs font-bold m-1 text-yellow-300 border rounded-full pl-1 pr-1 hover:text-yellow-500 hover:scale-110",children:"X"})]}),r.map((l,n)=>Yt.jsx("button",{onClick:()=>E(l),className:"block w-full text-sm py-1 px-2 mb-1 bg-yellow-500 hover:bg-yellow-400 rounded capitalize",children:l},n)),Yt.jsx("button",{onClick:s,className:"block w-full text-xs py-1 px-2 mt-2 bg-red-500 hover:bg-red-600 rounded text-white",children:"Close"})]},d)};return Yt.jsx("div",{children:y()})},_v=rc(null),Ty=rc({}),qv=rc({}),vG=Du.memo(({text:g,onComplete:t})=>Yt.jsx(KA,{text:g,onComplete:t})),mG=Du.memo(({text:g,onComplete:t})=>Yt.jsx(KA,{text:g,onComplete:t})),gG=()=>{const g=wa(_v),t=wa(Ty),i=wa(qv),[x,T]=Me.useState(!1),[E,s]=Me.useState(!1);Me.useEffect(()=>{const r=d=>{if(d){_v.set(d);const h=document.querySelector("#hs-stacked-overlays-dialogue");h&&(h.classList.remove("hidden"),h.classList.add("open")),d.npcId&&(Cl.createNPCSession(Ty,d.npcId),T(!1),s(!1),d.dialogue.options&&Cl.getNPCDialogueOptionsByULID(d.dialogue.id).then(a=>{qv.set({[`${d.dialogue.id}_options`]:a})}))}};return Si.on("npcDialogue",r),()=>{Si.off("npcDialogue",r)}},[]);const y=async r=>{const d=await Cl.getDialogue(r);if(d&&g){const h={npcId:g.npcId,dialogue:{...d,priority:0,read:!1}};_v.set(h),T(!1),s(!1),Cl.createDialogueSession(qv,d.id)}},e=()=>{const r=document.querySelector("#hs-stacked-overlays-dialogue");r&&(r.classList.add("hidden"),r.classList.remove("open")),_v.set(null),Ty.set({}),qv.set({}),T(!1),s(!1)};return Yt.jsx(Yt.Fragment,{children:Yt.jsx("div",{id:"hs-stacked-overlays-dialogue",className:"hs-overlay hs-overlay-backdrop-open:bg-gray-900/50 w-full h-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:Yt.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 w-full h-full sm:max-w-lg sm:w-full m-3 sm:mx-auto md:min-w-fit",children:Yt.jsx("div",{className:"flex flex-col lg:flex-row bg-zinc-950 border border-yellow-500 shadow-sm rounded-xl pointer-events-auto bg-cover min-w-[800px] min-h-[500px]",style:{backgroundImage:`url(${g?.dialogue.backgroundImage||"https://kbve.com/assets/img/curved-images/wave.jpg"})`},children:g?Yt.jsxs(Yt.Fragment,{children:[Yt.jsxs("div",{className:"w-full lg:w-1/3 p-4 rounded-l-xl flex flex-col items-center justify-center relative",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4 p-4 absolute top-2 left-2",children:g.npcId&&t[`${g.npcId}_name`]?t[`${g.npcId}_name`]:"Unknown"}),Yt.jsx("a",{href:`https://kbve.com/${t[`${g.npcId}_slug`]}`,target:"_blank",children:Yt.jsx("img",{src:g.npcId&&t[`${g.npcId}_avatar`]?t[`${g.npcId}_avatar`]:"/assets/npc/barkeep.webp",alt:"Character",className:"w-full h-auto rounded-md absolute bottom-0 left-0 hover:sepia"})})]}),Yt.jsxs("div",{className:"w-full md:w-2/3 p-4 bg-cover bg-center rounded-r-xl",children:[Yt.jsxs("div",{className:"flex justify-between items-center pb-3 border-b",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400 text-shadow-outline-white",children:g.dialogue.title||"Dialogue"}),Yt.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-dialogue",onClick:e,children:[Yt.jsx("span",{className:"sr-only",children:"Close"}),Yt.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:[Yt.jsx("path",{d:"M18 6 6 18"}),Yt.jsx("path",{d:"m6 6 12 12"})]})]})]}),Yt.jsx("div",{className:"p-4 overflow-y-auto",children:Yt.jsxs("div",{className:"flex flex-col",children:[Yt.jsx("div",{className:"flex justify-end",children:Yt.jsxs("div",{className:"w-3/4 mt-1 mb-2 text-yellow-400 text-shadow-outline-whites bg-zinc-950/40 rounded-xl p-4 text-right",children:[g.dialogue.playerResponse&&!E&&Yt.jsx(mG,{text:`${g.dialogue.playerResponse}`,onComplete:()=>s(!0)}),E&&Yt.jsx("div",{children:g.dialogue.playerResponse})]})}),Yt.jsx("div",{className:"mt-1 mb-2 text-white bg-zinc-950/40 text-shadow-outline-white rounded-xl p-4 flex w-3/4",children:Yt.jsxs("div",{className:"w-full",children:[g.dialogue.message&&E&&!x&&Yt.jsx(vG,{text:g.dialogue.message,onComplete:()=>T(!0)}),x&&Yt.jsx("div",{children:g.dialogue.message})]})})]})}),Yt.jsxs("div",{className:"flex justify-end items-center gap-x-2 py-3 px-4 border-t",children:[g.npcId&&i[`${g.dialogue.id}_options`]&&JSON.parse(i[`${g.dialogue.id}_options`]).map(r=>Yt.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",onClick:()=>y(r.id),children:[Yt.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"}),Yt.jsx("span",{className:"relative",children:r.title})]},r.id)),Yt.jsxs("button",{className:"relative rounded px-5 py-2.5 overflow-hidden group bg-red-500 relative hover:bg-gradient-to-r hover:from-red-500 hover:to-red-400 text-white hover:ring-2 hover:ring-offset-2 hover:ring-red-400 transition-all ease-out duration-300 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays-dialogue",onClick:e,disabled:!x,children:[Yt.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"}),Yt.jsxs("span",{className:`relative ${x?"":"text-gray-500"}`,children:["Good Bye ",g.npcId&&t[`${g.npcId}_name`]?t[`${g.npcId}_name`]:"Unknown"]})]})]})]})]}):Yt.jsx("div",{className:"w-full p-4 rounded-xl flex flex-col items-center justify-center",children:Yt.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4 p-4",children:"Loading..."})})})})})})},yG=()=>{const g=wa(_h);Me.useEffect(()=>{const i=x=>{if(x){const T=Date.now()+Math.random(),E={id:T,...x};_h.set([..._h.get(),E]),setTimeout(()=>{_h.set(_h.get().filter(s=>s.id!==T))},5e3)}};return Si.on("notification",i),()=>{Si.off("notification",i)}},[]);const t=i=>{_h.set(_h.get().filter(x=>x.id!==i))};return Yt.jsx("div",{className:"fixed inset-x-0 bottom-0 z-50 m-4 space-y-2",children:Array.isArray(g)&&g.map(i=>Yt.jsx("div",{className:`hs-removing:translate-x-5 hs-removing:opacity-0 transition duration-300 max-w-xs border rounded-xl shadow-lg ${i.notificationType.color}`,role:"alert",children:Yt.jsxs("div",{className:"flex p-4",children:[Yt.jsx("img",{src:i.notificationType.imgUrl,alt:i.notificationType.type,className:"flex-shrink-0 size-4"}),Yt.jsxs("div",{className:"ms-2",children:[Yt.jsx("h3",{className:"text-sm font-bold",children:i.title}),Yt.jsx("p",{className:"text-sm",children:i.message})]}),Yt.jsx("div",{className:"ms-auto",children:Yt.jsxs("button",{type:"button",className:"inline-flex flex-shrink-0 justify-center items-center size-5 rounded-lg text-gray-800 opacity-50 hover:opacity-100 focus:outline-none focus:opacity-100 dark:text-white",onClick:()=>t(i.id),children:[Yt.jsx("span",{className:"sr-only",children:"Close"}),Yt.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:[Yt.jsx("path",{d:"M18 6 6 18"}),Yt.jsx("path",{d:"m6 6 12 12"})]})]})})]})},i.id))})},xG=()=>{const g=wa(Sy),[t,i]=Me.useState([]),[x,T]=Me.useState(null);Me.useEffect(()=>{const y=r=>{r&&Sy.set(r)},e=r=>{r&&i(r.diceValues)};return Si.on("playerSteal",y),Si.on("diceRollResult",e),()=>{Si.off("playerSteal",y),Si.off("diceRollResult",e)}},[]),Me.useEffect(()=>{t.length>0&&E(t)},[t]);const E=y=>{const e=y.reduce((a,l)=>a+l,0);if(T(e),!g)return;let r="",d="";switch(!0){case e>=24:r="01J27QABD2GPFNRVK69S51HSGB",d=`You successfully stole a ${r}!`;break;case e>=20:r="01J27QN2KZG1RDZW4CE9Q9Z3YQ",d=`You successfully stole a ${r}!`;break;case e>=18:r="01J269PK47V1DWX2S1251DEASD",d=`You successfully stole a ${r}!`;break;case e>=15:r="Blue Shark",d=`You successfully stole a ${r}!`;break;case e>=12:r="Salmon",d=`You successfully stole a ${r}!`;break;case e<=4:Si.emit("notification",{title:"Danger",message:`You crit failed to steal from ${g.npcName}!`,notificationType:bu.danger}),Si.emit("playerDamage",{damage:"5"});break;default:Si.emit("notification",{title:"Danger",message:`You failed to steal from ${g.npcName}!`,notificationType:bu.danger}),Si.emit("playerDamage",{damage:"1"});return}const h=LI(r);h?Si.emit("playerReward",{message:d,item:h}):console.warn("Item not found in ItemDB")},s=()=>{pw([]),i([]),T(null),Sy.set(null)};return g?Yt.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 bg-zinc-800 bg-opacity-50",children:Yt.jsxs("div",{className:"bg-zinc-800 p-4 rounded-lg shadow-lg w-3/4",children:[Yt.jsx(SG,{npcName:g.npcName,roll:x}),Yt.jsx(EG,{}),Yt.jsx(MG,{handleClose:s})]})}):null},SG=({npcName:g,roll:t})=>Yt.jsxs("div",{children:[Yt.jsx("h2",{className:"text-lg text-yellow-400 font-bold mb-4",children:"Steal Attempt"}),Yt.jsxs("p",{className:"mb-4",children:["Roll the dice to steal from ",g,". You need a total of 12 or higher to succeed."]}),t!==null&&Yt.jsxs("p",{className:"mb-4",children:["Your roll: ",t]})]}),TG=()=>Yt.jsx(j7,{textures:{side1:"/assets/items/set/dice/dice1.png",side2:"/assets/items/set/dice/dice2.png",side3:"/assets/items/set/dice/dice3.png",side4:"/assets/items/set/dice/dice4.png",side5:"/assets/items/set/dice/dice5.png",side6:"/assets/items/set/dice/dice6.png"},styleClass:"h-96",diceCount:4}),EG=Me.memo(TG),MG=({handleClose:g})=>Yt.jsx("button",{onClick:g,className:"block w-full py-2 bg-red-500 text-white rounded hover:bg-red-700 mt-2",children:"Close"}),CG=ym.div` +`;function rG(){const g=Me.useRef(null);return Me.useEffect(()=>{let t=null;if(g.current){const i=g.current,y={title:"CryptoThrone",render:{antialias:!1},scale:{mode:ad.Scale.FIT,autoCenter:ad.Scale.CENTER_BOTH,zoom:1},type:ad.AUTO,transparent:!0,width:window.innerWidth,height:window.innerHeight,physics:{default:"arcade",arcade:{gravity:{x:0,y:0},debug:!1}},plugins:{scene:[{key:"gridEngine",plugin:K4,mapping:"gridEngine"}]},scene:[tG,eG,iG],input:{mouse:{preventDefaultWheel:!1},touch:{capture:!0}},parent:i};t=new ad.Game(y);const T=()=>{t&&t.scale.resize(window.innerWidth,window.innerHeight)};return window.addEventListener("resize",T),()=>{window.removeEventListener("resize",T),t&&t.destroy(!0)}}},[]),Yt.jsx(nG,{children:Yt.jsx("div",{className:"w-full h-full scrollbar-hide",ref:g})})}const PM=nc({message:""}),sG=()=>{const g=wa(PM);Me.useEffect(()=>{const i=y=>{if(y){PM.set(y);const T=document.querySelector("#hs-stacked-overlays");T&&(T.classList.remove("hidden"),T.classList.add("open"))}};return Si.on("charEvent",i),()=>{Si.off("charEvent",i)}},[]);const t=()=>{const i=document.querySelector("#hs-stacked-overlays");i&&(i.classList.add("hidden"),i.classList.remove("open"))};return Yt.jsx(Yt.Fragment,{children:Yt.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:Yt.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:Yt.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(${g.background_image||"https://kbve.com/assets/img/curved-images/wave.jpg"})`},children:[Yt.jsxs("div",{className:"w-full lg:w-1/3 p-4 rounded-l-xl flex flex-col items-center justify-center",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4",children:`${g.character_name||"NPC"}`}),Yt.jsx("img",{src:g.character_image||"/assets/npc/barkeep.webp",alt:"Character",className:"w-full h-auto rounded-md"})]}),Yt.jsxs("div",{className:"w-full lg:w-2/3 p-4 bg-cover bg-center rounded-r-xl",children:[Yt.jsxs("div",{className:"flex justify-between items-center pb-3 border-b",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400",children:""}),Yt.jsxs("button",{type:"button",className:"flex justify-center items-center size-7 text-sm font-semibold rounded-full border border-transparent text-yellow-400 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays",onClick:t,children:[Yt.jsx("span",{className:"sr-only",children:"Close"}),Yt.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:[Yt.jsx("path",{d:"M18 6 6 18"}),Yt.jsx("path",{d:"m6 6 12 12"})]})]})]}),Yt.jsx("div",{className:"p-4 overflow-y-auto",children:Yt.jsx("p",{className:"mt-1 mb-2 text-yellow-400 bg-zinc-950/80 rounded-xl p-4",children:g.message||"No Message"})}),Yt.jsx("div",{className:"flex justify-end items-center gap-x-2 py-3 px-4 border-t",children:Yt.jsxs("button",{className:"relative rounded px-5 py-2.5 overflow-hidden group bg-yellow-500 relative hover:bg-gradient-to-r hover:from-yellow-500 hover:to-yellow-400 text-white hover:ring-2 hover:ring-offset-2 hover:ring-yellow-400 transition-all ease-out duration-300 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays",onClick:t,children:[Yt.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"}),Yt.jsx("span",{className:"relative",children:"Okay."})]})})]})]})})})})},RM=({settingKey:g,label:t,collapseIcon:i=ZI,expandIcon:y=JI})=>{const T=gl(g),E=()=>uh(g,!T);return Yt.jsxs("button",{onClick:E,className:"bg-yellow-500 text-white text-sm p-2 rounded ml-2 flex items-center w-20 h-10",children:[T?Yt.jsx(y,{className:"w-2"}):Yt.jsx(i,{className:"w-4"}),Yt.jsx("span",{className:"ml-2 text-xs",children:t})]})},aG=({stats:g})=>{const t=(i,y)=>{const T=typeof i=="string"?parseInt(i,10):i,E=typeof y=="string"?parseInt(y,10):y;return Math.min(T/E*100,100)};return Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Stats"}),Yt.jsxs("div",{className:"mb-2",children:[Yt.jsx("p",{className:"text-sm text-green-400",children:`HP: ${g.health||"0"} / ${g.maxHealth}`}),Yt.jsx("div",{className:"w-full bg-gray-300 h-4 rounded",children:Yt.jsx("div",{className:"bg-green-400 h-full rounded",style:{width:`${t(g.health,g.maxHealth)}%`}})})]}),Yt.jsxs("div",{className:"mb-2",children:[Yt.jsx("p",{className:"text-sm text-blue-400",children:`MP: ${g.mana||"0"} / ${g.maxMana}`}),Yt.jsx("div",{className:"w-full bg-gray-300 h-4 rounded",children:Yt.jsx("div",{className:"bg-blue-400 h-full rounded",style:{width:`${t(g.mana,g.maxMana)}%`}})})]}),Yt.jsxs("div",{className:"mb-2",children:[Yt.jsx("p",{className:"text-sm text-yellow-400",children:`EP: ${g.energy||"0"} / ${g.maxEnergy}`}),Yt.jsx("div",{className:"w-full bg-gray-300 h-4 rounded",children:Yt.jsx("div",{className:"bg-yellow-400 h-full rounded",style:{width:`${t(g.energy,g.maxEnergy)}%`}})})]})]})},oG=({settingKey:g,label:t})=>{const i=gl(g),y=()=>{uh(g,!i)};return Yt.jsxs("label",{className:"flex items-center cursor-pointer",children:[Yt.jsx("span",{className:"mr-2 text-sm",children:t}),Yt.jsxs("div",{className:"relative",children:[Yt.jsx("input",{type:"checkbox",className:"sr-only",checked:i,onChange:y}),Yt.jsx("div",{className:"w-10 h-4 bg-gray-400 rounded-full shadow-inner"}),Yt.jsx("div",{className:`absolute w-6 h-6 bg-white opacity-75 rounded-full shadow -left-1 -top-1 transition-transform ${i?"transform translate-x-full bg-yellow-500 !opacity-100":""}`})]})]})},lG=(g,t)=>{const i=Tl(g);return i?Yt.jsxs("div",{style:{top:t.y,left:t.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[Yt.jsx("p",{className:"text-sm font-semibold",children:i.name}),Yt.jsxs("p",{className:"text-xs",children:["Type: ",i.type]}),Yt.jsxs("p",{className:"text-xs",children:["Bonuses: ",JSON.stringify(i.bonuses)]}),Yt.jsxs("p",{className:"text-xs",children:["Durability: ",i.durability]}),Yt.jsxs("p",{className:"text-xs",children:["Weight: ",i.weight]})]}):null},hG=(g,t,i,y)=>Yt.jsx("ul",{className:"grid grid-cols-8 gap-2",children:Object.keys(g).map(T=>{const E=g[T];return uG(E,t,i,y)})}),uG=(g,t,i,y)=>{if(!g)return Yt.jsx("li",{className:"text-sm relative flex items-center justify-center border border-gray-500 bg-gray-200",style:{width:"32px",height:"32px"}},`empty-${Math.random()}`);const T=Tl(g);return T?Yt.jsxs("li",{className:"text-sm relative",onMouseEnter:E=>t(T.id,E),onMouseLeave:i,onClick:E=>y(T.id,E),children:[T.name," (",T.type,") - Bonuses: ",JSON.stringify(T.bonuses)," - Durability: ",T.durability," - Weight: ",T.weight]},T.id):null},fG=(g,t,i,y)=>Yt.jsx("ul",{className:"grid grid-cols-8 gap-1",children:g.map((T,E)=>{const s=Tl(T);return s?Yt.jsx("li",{className:"text-sm relative hover:scale-[1.3] transition ease-in-out duration-100",onMouseEnter:x=>t(s.id,x),onMouseLeave:i,onClick:x=>y(s.id,x),children:Yt.jsx("img",{src:s.img,alt:s.name,style:{width:"32px",height:"32px"},className:"inline-block border border-yellow-400/50"})},E):null})}),cG=()=>Yt.jsx("div",{className:"transition transform duration-1000 ease-in-out",children:Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Settings"}),Yt.jsx("p",{className:"text-sm",children:"Additional settings can go here."}),Yt.jsx(oG,{settingKey:"debugMode",label:"Debug Mode"})]})}),dG=()=>{const g=wa(Tn);wa(Mm),wa(CI),wa(Zr),Me.useEffect(()=>{const r=d=>{};return Si.on("playerEvent",r),()=>{Si.off("playerEvent",r)}},[]);const t=(r,d)=>{uh("tooltipItem",{id:r,position:{x:d.clientX+10,y:d.clientY-150}})},i=()=>{uh("tooltipItem",{...gl("tooltipItem"),id:null})},y=(r,d)=>{uh("submenuItem",{id:r,position:{x:d.clientX,y:d.clientY-150}})},T=()=>{uh("submenuItem",{...gl("submenuItem"),id:null})},E=(r,d)=>{const h=Tl(r);if(h){const a={itemId:h.id,action:d};Si.emit("itemAction",a),T()}};if(!g||!g.stats)return null;const s=gl("submenuItem"),x=s.id?GI(s.id):[],e=gl("tooltipItem");return Yt.jsxs("div",{className:"fixed top-24 left-3 w-[350px] p-4 bg-zinc-800 text-yellow-400 border border-yellow-300 rounded-lg z-20 transition transform ease-in-out duration-500 opacity-50 hover:opacity-100",children:[Yt.jsxs("div",{className:"flex flex-row space-y-2 align-top",children:[Yt.jsx(RM,{settingKey:"isStatsMenuCollapsed",label:"Stats"}),Yt.jsx(RM,{settingKey:"isSettingsMenuCollapsed",label:"Settings"})]}),Yt.jsx("div",{className:`transition transform duration-1000 ease-in-out ${gl("isSettingsMenuCollapsed")?"max-h-0 overflow-hidden":"max-h-screen"}`,children:Yt.jsx(cG,{})}),Yt.jsxs("div",{className:`transition transform duration-1000 ease-in-out ${gl("isStatsMenuCollapsed")?"max-h-0 overflow-hidden":"max-h-screen"}`,children:[Yt.jsx(aG,{stats:g.stats}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"User Information"}),Yt.jsx("p",{className:"text-sm",children:g.stats.username||"Guest"})]}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"General Information"}),Yt.jsx("p",{className:"text-sm",children:""})]}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Inventory"}),fG(g.inventory.backpack,t,i,y)]}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Equipment"}),hG(g.inventory.equipment,t,i,y)]}),e.id&&lG(e.id,e.position),s.id&&Yt.jsxs("div",{style:{top:s.position.y,left:s.position.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[Yt.jsx("button",{onClick:T,className:"absolute top-1 right-1 translate-x-6 bg-yellow-400 p-1 text-white hover:text-gray-400",children:"X"}),Yt.jsx("p",{className:"text-sm strong",children:"Actions:"}),Yt.jsxs("ul",{className:"text-xs",children:[x.map(r=>Yt.jsx("li",{onClick:()=>s.id&&E(s.id,r),className:"cursor-pointer hover:bg-gray-600",children:r.charAt(0).toUpperCase()+r.slice(1)},r)),Yt.jsx("li",{onClick:T,className:"cursor-pointer hover:bg-gray-600",children:"Close"})]})]})]})]})},Ty=nc(null),Ey=nc(null),pG=()=>{const g=wa(Ty),[t,i]=Me.useState({x:0,y:0}),y=Me.useRef(null);Me.useEffect(()=>{const e=r=>{r&&(Ty.set(r),setTimeout(()=>{i(T(r.coords.x,r.coords.y))},0))};return Si.on("npcInteractionClick",e),()=>{Si.off("npcInteractionClick",e)}},[]);const T=(e,r)=>{const h=y.current;if(!h)return{x:e,y:r};const a=h.getBoundingClientRect();let l=e,n=r;return l+a.width>window.innerWidth-10&&(l=window.innerWidth-a.width-10),n+a.height>window.innerHeight-10&&(n=window.innerHeight-a.height-10),l<10&&(l=10),n<10&&(n=10),{x:l,y:n}},E=e=>{if(g){const r=_A.getActionHandler(e);r&&(r(g),s())}},s=()=>{Ty.set(null)},x=()=>{if(!g)return null;const{npcName:e,actions:r,npcId:d}=g,{x:h,y:a}=t;return Yt.jsxs("div",{ref:y,className:"absolute bg-zinc-900 border border-yellow-300 rounded-md p-2 z-[100]",style:{left:`${h}px`,top:`${a}px`},children:[Yt.jsxs("div",{className:"flex justify-between items-center mb-2",children:[Yt.jsx("h3",{className:"font-bold text-sm text-white",children:e}),Yt.jsx("button",{onClick:s,className:"text-xs font-bold m-1 text-yellow-300 border rounded-full pl-1 pr-1 hover:text-yellow-500 hover:scale-110",children:"X"})]}),r.map((l,n)=>Yt.jsx("button",{onClick:()=>E(l),className:"block w-full text-sm py-1 px-2 mb-1 bg-yellow-500 hover:bg-yellow-400 rounded capitalize",children:l},n)),Yt.jsx("button",{onClick:s,className:"block w-full text-xs py-1 px-2 mt-2 bg-red-500 hover:bg-red-600 rounded text-white",children:"Close"})]},d)};return Yt.jsx("div",{children:x()})},qv=nc(null),My=nc({}),tm=nc({}),vG=Du.memo(({text:g,onComplete:t})=>Yt.jsx(ZA,{text:g,onComplete:t})),mG=Du.memo(({text:g,onComplete:t})=>Yt.jsx(ZA,{text:g,onComplete:t})),gG=()=>{const g=wa(qv),t=wa(My),i=wa(tm),[y,T]=Me.useState(!1),[E,s]=Me.useState(!1);Me.useEffect(()=>{const r=d=>{if(d){qv.set(d);const h=document.querySelector("#hs-stacked-overlays-dialogue");h&&(h.classList.remove("hidden"),h.classList.add("open")),d.npcId&&(Su.createNPCSession(My,d.npcId),T(!1),s(!1),d.dialogue.options&&Su.getNPCDialogueOptionsByULID(d.dialogue.id).then(a=>{tm.set({[`${d.dialogue.id}_options`]:a})}))}};return Si.on("npcDialogue",r),()=>{Si.off("npcDialogue",r)}},[]);const x=async r=>{const d=await Su.getDialogue(r);if(d&&g){const h={npcId:g.npcId,dialogue:{...d,priority:0,read:!1}};qv.set(h),T(!1),s(!1),Su.createDialogueSession(tm,d.id)}},e=()=>{const r=document.querySelector("#hs-stacked-overlays-dialogue");r&&(r.classList.add("hidden"),r.classList.remove("open")),qv.set(null),My.set({}),tm.set({}),T(!1),s(!1)};return Yt.jsx(Yt.Fragment,{children:Yt.jsx("div",{id:"hs-stacked-overlays-dialogue",className:"hs-overlay hs-overlay-backdrop-open:bg-gray-900/50 w-full h-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:Yt.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 w-full h-full sm:max-w-lg sm:w-full m-3 sm:mx-auto md:min-w-fit",children:Yt.jsx("div",{className:"flex flex-col lg:flex-row bg-zinc-950 border border-yellow-500 shadow-sm rounded-xl pointer-events-auto bg-cover min-w-[800px] min-h-[500px]",style:{backgroundImage:`url(${g?.dialogue.backgroundImage||"https://kbve.com/assets/img/curved-images/wave.jpg"})`},children:g?Yt.jsxs(Yt.Fragment,{children:[Yt.jsxs("div",{className:"w-full lg:w-1/3 p-4 rounded-l-xl flex flex-col items-center justify-center relative",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4 p-4 absolute top-2 left-2",children:g.npcId&&t[`${g.npcId}_name`]?t[`${g.npcId}_name`]:"Unknown"}),Yt.jsx("a",{href:`https://kbve.com/${t[`${g.npcId}_slug`]}`,target:"_blank",children:Yt.jsx("img",{src:g.npcId&&t[`${g.npcId}_avatar`]?t[`${g.npcId}_avatar`]:"/assets/npc/barkeep.webp",alt:"Character",className:"w-full h-auto rounded-md absolute bottom-0 left-0 hover:sepia"})})]}),Yt.jsxs("div",{className:"w-full md:w-2/3 p-4 bg-cover bg-center rounded-r-xl",children:[Yt.jsxs("div",{className:"flex justify-between items-center pb-3 border-b",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400 text-shadow-outline-white",children:g.dialogue.title||"Dialogue"}),Yt.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-dialogue",onClick:e,children:[Yt.jsx("span",{className:"sr-only",children:"Close"}),Yt.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:[Yt.jsx("path",{d:"M18 6 6 18"}),Yt.jsx("path",{d:"m6 6 12 12"})]})]})]}),Yt.jsx("div",{className:"p-4 overflow-y-auto",children:Yt.jsxs("div",{className:"flex flex-col",children:[Yt.jsx("div",{className:"flex justify-end",children:Yt.jsxs("div",{className:"w-3/4 mt-1 mb-2 text-yellow-400 text-shadow-outline-whites bg-zinc-950/40 rounded-xl p-4 text-right",children:[g.dialogue.playerResponse&&!E&&Yt.jsx(mG,{text:`${g.dialogue.playerResponse}`,onComplete:()=>s(!0)}),E&&Yt.jsx("div",{children:g.dialogue.playerResponse})]})}),Yt.jsx("div",{className:"mt-1 mb-2 text-white bg-zinc-950/40 text-shadow-outline-white rounded-xl p-4 flex w-3/4",children:Yt.jsxs("div",{className:"w-full",children:[g.dialogue.message&&E&&!y&&Yt.jsx(vG,{text:g.dialogue.message,onComplete:()=>T(!0)}),y&&Yt.jsx("div",{children:g.dialogue.message})]})})]})}),Yt.jsxs("div",{className:"flex justify-end items-center gap-x-2 py-3 px-4 border-t",children:[g.npcId&&i[`${g.dialogue.id}_options`]&&JSON.parse(i[`${g.dialogue.id}_options`]).map(r=>Yt.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",onClick:()=>x(r.id),children:[Yt.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"}),Yt.jsx("span",{className:"relative",children:r.title})]},r.id)),Yt.jsxs("button",{className:"relative rounded px-5 py-2.5 overflow-hidden group bg-red-500 relative hover:bg-gradient-to-r hover:from-red-500 hover:to-red-400 text-white hover:ring-2 hover:ring-offset-2 hover:ring-red-400 transition-all ease-out duration-300 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays-dialogue",onClick:e,disabled:!y,children:[Yt.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"}),Yt.jsxs("span",{className:`relative ${y?"":"text-gray-500"}`,children:["Good Bye ",g.npcId&&t[`${g.npcId}_name`]?t[`${g.npcId}_name`]:"Unknown"]})]})]})]})]}):Yt.jsx("div",{className:"w-full p-4 rounded-xl flex flex-col items-center justify-center",children:Yt.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4 p-4",children:"Loading..."})})})})})})},yG=()=>{const g=wa(Qh);Me.useEffect(()=>{const i=y=>{if(y){const T=Date.now()+Math.random(),E={id:T,...y};Qh.set([...Qh.get(),E]),setTimeout(()=>{Qh.set(Qh.get().filter(s=>s.id!==T))},5e3)}};return Si.on("notification",i),()=>{Si.off("notification",i)}},[]);const t=i=>{Qh.set(Qh.get().filter(y=>y.id!==i))};return Yt.jsx("div",{className:"fixed inset-x-0 bottom-0 z-50 m-4 space-y-2",children:Array.isArray(g)&&g.map(i=>Yt.jsx("div",{className:`hs-removing:translate-x-5 hs-removing:opacity-0 transition duration-300 max-w-xs border rounded-xl shadow-lg ${i.notificationType.color}`,role:"alert",children:Yt.jsxs("div",{className:"flex p-4",children:[Yt.jsx("img",{src:i.notificationType.imgUrl,alt:i.notificationType.type,className:"flex-shrink-0 size-4"}),Yt.jsxs("div",{className:"ms-2",children:[Yt.jsx("h3",{className:"text-sm font-bold",children:i.title}),Yt.jsx("p",{className:"text-sm",children:i.message})]}),Yt.jsx("div",{className:"ms-auto",children:Yt.jsxs("button",{type:"button",className:"inline-flex flex-shrink-0 justify-center items-center size-5 rounded-lg text-gray-800 opacity-50 hover:opacity-100 focus:outline-none focus:opacity-100 dark:text-white",onClick:()=>t(i.id),children:[Yt.jsx("span",{className:"sr-only",children:"Close"}),Yt.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:[Yt.jsx("path",{d:"M18 6 6 18"}),Yt.jsx("path",{d:"m6 6 12 12"})]})]})})]})},i.id))})},xG=()=>{const g=wa(Ey),[t,i]=Me.useState([]),[y,T]=Me.useState(null);Me.useEffect(()=>{const x=r=>{r&&Ey.set(r)},e=r=>{r&&i(r.diceValues)};return Si.on("playerSteal",x),Si.on("diceRollResult",e),()=>{Si.off("playerSteal",x),Si.off("diceRollResult",e)}},[]),Me.useEffect(()=>{t.length>0&&E(t)},[t]);const E=x=>{const e=x.reduce((a,l)=>a+l,0);if(T(e),!g)return;let r="",d="";switch(!0){case e>=24:r="01J27QABD2GPFNRVK69S51HSGB",d=`You successfully stole a ${r}!`;break;case e>=20:r="01J27QN2KZG1RDZW4CE9Q9Z3YQ",d=`You successfully stole a ${r}!`;break;case e>=18:r="01J269PK47V1DWX2S1251DEASD",d=`You successfully stole a ${r}!`;break;case e>=15:r="Blue Shark",d=`You successfully stole a ${r}!`;break;case e>=12:r="Salmon",d=`You successfully stole a ${r}!`;break;case e<=4:Si.emit("notification",{title:"Danger",message:`You crit failed to steal from ${g.npcName}!`,notificationType:bu.danger}),Si.emit("playerDamage",{damage:"5"});break;default:Si.emit("notification",{title:"Danger",message:`You failed to steal from ${g.npcName}!`,notificationType:bu.danger}),Si.emit("playerDamage",{damage:"1"});return}const h=AI(r);h?Si.emit("playerReward",{message:d,item:h}):console.warn("Item not found in ItemDB")},s=()=>{vw([]),i([]),T(null),Ey.set(null)};return g?Yt.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 bg-zinc-800 bg-opacity-50",children:Yt.jsxs("div",{className:"bg-zinc-800 p-4 rounded-lg shadow-lg w-3/4",children:[Yt.jsx(SG,{npcName:g.npcName,roll:y}),Yt.jsx(EG,{}),Yt.jsx(MG,{handleClose:s})]})}):null},SG=({npcName:g,roll:t})=>Yt.jsxs("div",{children:[Yt.jsx("h2",{className:"text-lg text-yellow-400 font-bold mb-4",children:"Steal Attempt"}),Yt.jsxs("p",{className:"mb-4",children:["Roll the dice to steal from ",g,". You need a total of 12 or higher to succeed."]}),t!==null&&Yt.jsxs("p",{className:"mb-4",children:["Your roll: ",t]})]}),TG=()=>Yt.jsx(Y7,{textures:{side1:"/assets/items/set/dice/dice1.png",side2:"/assets/items/set/dice/dice2.png",side3:"/assets/items/set/dice/dice3.png",side4:"/assets/items/set/dice/dice4.png",side5:"/assets/items/set/dice/dice5.png",side6:"/assets/items/set/dice/dice6.png"},styleClass:"h-96",diceCount:4}),EG=Me.memo(TG),MG=({handleClose:g})=>Yt.jsx("button",{onClick:g,className:"block w-full py-2 bg-red-500 text-white rounded hover:bg-red-700 mt-2",children:"Close"}),CG=xm.div` // Your style here -`;function UG(){return Yt.jsxs(CG,{children:[Yt.jsx(dG,{}),Yt.jsxs("div",{className:"flex justify-center items-center h-screen overflow-hidden",children:[Yt.jsx(gG,{}),Yt.jsx(xG,{}),Yt.jsx(rG,{}),Yt.jsx(yG,{})]}),Yt.jsx(pG,{}),Yt.jsx(sG,{})]})}export{UG as default}; +`;function NG(){return Yt.jsxs(CG,{children:[Yt.jsx(dG,{}),Yt.jsxs("div",{className:"flex justify-center items-center h-screen overflow-hidden",children:[Yt.jsx(gG,{}),Yt.jsx(xG,{}),Yt.jsx(rG,{}),Yt.jsx(yG,{})]}),Yt.jsx(pG,{}),Yt.jsx(sG,{})]})}export{NG as default}; diff --git a/docs/assets/items/map/README.md b/docs/assets/items/map/README.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/assets/items/map/ccc/cloud_city.json b/docs/assets/items/map/ccc/cloud_city.json new file mode 100644 index 0000000..edead4c --- /dev/null +++ b/docs/assets/items/map/ccc/cloud_city.json @@ -0,0 +1,12067 @@ +{ "compressionlevel":-1, + "height":100, + "infinite":false, + "layers":[ + { + "data":[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, 146, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 50, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 364, 147, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 92, 362, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 365, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 409, 51, 101, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 366, 363, 364, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 92, 407, 368, 368, 369, 368, 368, 371, 368, 368, 368, 414, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 372, 409, 51, 146, 58, 0, 591, 590, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 92, 407, 368, 368, 368, 368, 368, 368, 368, 368, 372, 368, 368, 413, 369, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 366, 363, 364, 101, 58, 546, 545, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 189, 452, 453, 410, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 93, 147, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 234, 235, 188, 452, 410, 368, 414, 368, 368, 369, 368, 372, 368, 368, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 366, 363, 364, 103, 103, 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, 48, 48, 48, 48, 49, 0, 0, 0, + 0, 0, 182, 233, 190, 407, 368, 413, 413, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 93, 93, 93, 93, 93, 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, 363, 364, 94, 0, 0, 0, + 0, 0, 0, 53, 144, 407, 368, 371, 368, 413, 368, 368, 368, 368, 368, 372, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 366, 363, 363, 363, 363, 363, 365, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 53, 145, 98, 93, 407, 368, 368, 368, 413, 368, 371, 413, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 143, 242, 243, 244, 407, 368, 368, 368, 368, 368, 368, 368, 413, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 92, 287, 288, 289, 407, 368, 369, 368, 413, 368, 413, 368, 368, 413, 368, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 92, 332, 333, 334, 407, 368, 368, 368, 414, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 92, 362, 363, 363, 365, 368, 413, 368, 413, 368, 371, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 92, 407, 368, 414, 368, 368, 368, 368, 368, 368, 368, 368, 368, 372, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 189, 452, 453, 453, 410, 413, 371, 372, 368, 369, 413, 371, 372, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 234, 235, 188, 93, 407, 415, 413, 417, 413, 413, 413, 416, 417, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 182, 233, 190, 407, 368, 368, 368, 368, 368, 368, 368, 368, 415, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 53, 144, 407, 414, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 53, 145, 98, 362, 365, 368, 368, 368, 368, 368, 368, 368, 368, 415, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 143, 93, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 92, 93, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 189, 93, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 234, 235, 188, 452, 453, 410, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 182, 233, 190, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 53, 144, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 53, 145, 98, 362, 363, 365, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 143, 93, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 189, 93, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 234, 235, 188, 452, 453, 453, 453, 410, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 182, 233, 190, 93, 93, 362, 365, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 234, 190, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 53, 144, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 143, 93, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 92, 93, 93, 452, 453, 410, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 92, 93, 93, 93, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 189, 93, 93, 93, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 234, 235, 188, 93, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 182, 233, 235, 188, 452, 453, 410, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 182, 233, 235, 188, 452, 453, 453, 410, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 182, 233, 190, 93, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 190, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 144, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 93, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 362, 365, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 452, 453, 453, 410, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 93, 93, 93, 452, 453, 410, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 96, 95, 93, 96, 95, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 94, 137, 138, 139, 92, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 94, 182, 183, 184, 92, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 94, 0, 0, 0, 92, 362, 365, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 51, 103, 101, 100, 50, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 93, 93, 93, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 93, 93, 93, 93, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 93, 93, 93, 93, 407, 413, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 93, 362, 363, 363, 365, 368, 372, 413, 368, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 93, 407, 368, 368, 368, 368, 368, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 93, 407, 368, 368, 413, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 362, 365, 368, 368, 414, 368, 368, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 362, 365, 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, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 407, 368, 368, 368, 368, 413, 368, 368, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 452, 410, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 362, 365, 368, 368, 368, 368, 368, 368, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 407, 368, 368, 368, 368, 368, 372, 368, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 452, 410, 368, 368, 368, 368, 368, 368, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 362, 365, 368, 414, 368, 368, 368, 368, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 413, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 407, 368, 368, 368, 368, 368, 368, 413, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 407, 368, 368, 368, 411, 453, 453, 453, 410, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 189, 452, 453, 453, 453, 454, 96, 95, 93, 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, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 190, 93, 93, 93, 93, 94, 92, 93, 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, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 99, 93, 93, 93, 192, 137, 188, 452, 453, 410, 368, 411, 453, 453, 453, 453, 410, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 96, 236, 237, 182, 233, 190, 93, 407, 368, 409, 93, 93, 93, 93, 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, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 192, 184, 0, 0, 53, 144, 93, 452, 453, 454, 93, 93, 93, 93, 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, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 191, 237, 0, 0, 53, 100, 93, 93, 93, 93, 93, 93, 93, 93, 93, 452, 410, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 182, 184, 0, 47, 48, 98, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 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, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 454, 94, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 145, 146, 58, 0, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 193, 139, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 47, 48, 49, 0, 53, 100, 93, 93, 148, 0, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 193, 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, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 236, 238, 184, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 92, 93, 94, 0, 143, 93, 93, 102, 237, 0, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 191, 238, 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, 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, 137, 138, 139, 0, 92, 93, 93, 192, 0, 0, 137, 138, 188, 93, 93, 93, 93, 93, 193, 138, 236, 237, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 182, 183, 184, 0, 137, 138, 236, 237, 0, 0, 182, 183, 233, 190, 93, 93, 96, 236, 238, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 182, 183, 184, 0, 0, 0, 0, 0, 0, 234, 235, 95, 94, 237, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 190, 51, 147, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 144, 93, 93, 103, 146, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 100, 93, 93, 93, 93, 51, 101, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 98, 93, 93, 96, 95, 93, 96, 236, 237, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 93, 93, 51, 50, 96, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 138, 138, 138, 138, 139, 238, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 182, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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":100, + "id":1, + "name":"ground", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":100, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 439, 440, 440, 440, 440, 440, 440, 440, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 484, 485, 485, 485, 485, 485, 485, 485, 486, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 529, 530, 530, 530, 530, 530, 530, 530, 531, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 574, 575, 575, 575, 575, 575, 575, 575, 576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 683, 686, 687, 688, 689, 690, 687, 685, 684, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 728, 731, 732, 733, 734, 735, 732, 730, 729, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 773, 776, 777, 778, 779, 780, 777, 775, 774, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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":100, + "id":2, + "name":"buildings", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":100, + "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, 962, 963, 1066, 1067, 1067, 1067, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1067, 1067, 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, 1111, 1112, 1112, 1112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1112, 1112, 1112, 1113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1157, 1157, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1157, 1157, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 869, 0, 0, 0, 0, 934, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 933, 0, 0, 914, 0, 0, 0, 0, 933, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 978, 0, 0, 0, 0, 0, 979, 0, 978, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 970, 0, 1151, 1152, 0, 970, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1102, 1103, 1102, 1103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1102, 1103, 1102, 1103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1102, 1103, 1102, 1103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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":100, + "id":3, + "name":"objects", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":100, + "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, 925, 0, 1106, 1107, 0, 928, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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":100, + "id":5, + "name":"heightShift1", + "opacity":1, + "properties":[ + { + "name":"ge_heightShift", + "type":"int", + "value":1 + }], + "type":"tilelayer", + "visible":true, + "width":100, + "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, 1061, 1062, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 928, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 545, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 546, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 590, 591, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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":100, + "id":7, + "name":"heightShift2", + "opacity":1, + "properties":[ + { + "name":"ge_heightShift", + "type":"int", + "value":2 + }], + "type":"tilelayer", + "visible":true, + "width":100, + "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, 880, 881, 0, 0, 882, 883, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 971, 0, 0, 972, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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":100, + "id":6, + "locked":true, + "name":"top2", + "opacity":1, + "properties":[ + { + "name":"ge_alwaysTop", + "type":"bool", + "value":true + }], + "type":"tilelayer", + "visible":true, + "width":100, + "x":0, + "y":0 + }], + "nextlayerid":8, + "nextobjectid":1, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.11.0", + "tileheight":16, + "tilesets":[ + { + "columns":45, + "firstgid":1, + "image":"cloud_tileset.png", + "imageheight":448, + "imagewidth":720, + "margin":0, + "name":"Cloud City", + "spacing":0, + "tilecount":1260, + "tileheight":16, + "tiles":[ + { + "id":0, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":2, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":3, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":4, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":5, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":6, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":7, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":8, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":9, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":10, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":11, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":12, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":13, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":14, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":15, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":16, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":17, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":18, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":19, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":20, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":21, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":22, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":23, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":24, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":25, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":26, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":27, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":28, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":29, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":30, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":31, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":32, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":33, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":34, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":35, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":36, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":37, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":38, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":39, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":40, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":41, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":42, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":43, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":44, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":45, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "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":false + }] + }, + { + "id":50, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":51, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "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":58, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":59, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":60, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":61, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":62, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":63, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":64, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":65, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":66, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":67, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":68, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":69, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":70, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":71, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":72, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":73, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":74, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":75, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":76, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":77, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":78, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":79, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":80, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":81, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":82, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":83, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":84, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":85, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":86, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":87, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":88, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":89, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":90, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":91, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":92, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":93, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":94, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":95, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":96, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "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":103, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":104, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":105, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":106, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":107, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":108, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":109, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":110, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":111, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":112, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":113, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":114, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":115, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":116, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":117, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":118, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":119, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":120, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":121, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":122, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":123, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":124, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":125, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":126, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":127, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":128, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":129, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":130, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":131, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":132, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":133, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":134, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":135, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "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":139, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":140, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":141, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "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":148, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":149, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":150, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":151, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":152, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":153, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":154, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":155, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":156, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":157, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":158, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":159, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":160, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":161, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":162, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":163, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":164, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":165, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":166, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":167, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":168, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":169, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":170, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":171, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":172, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":173, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":174, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":175, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":176, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":177, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":178, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":179, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":180, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "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":184, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":185, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":186, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "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":193, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":194, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":195, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":196, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":197, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":198, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":199, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + + { + "id":200, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":201, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":202, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":203, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":204, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":205, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":206, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":207, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":208, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":209, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":210, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":211, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":212, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":213, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":214, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":215, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":216, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":217, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":218, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":219, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":220, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":221, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":222, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":223, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":224, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":225, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":226, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":227, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":228, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":229, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":230, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":231, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "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":238, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":239, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":240, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "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":244, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":245, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":246, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":247, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":248, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":249, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":250, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":251, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":252, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":253, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":254, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":255, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":256, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":257, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":258, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":259, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":260, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":261, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":262, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":263, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":264, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":265, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":266, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":267, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":268, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":269, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":270, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":271, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":272, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":273, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":274, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":275, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":276, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":277, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":278, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":279, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":280, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":281, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":282, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":283, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":284, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":285, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "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":289, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":290, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":291, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":292, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":293, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":294, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":295, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":296, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":297, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":298, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":299, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + + { + "id":300, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":301, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":302, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":303, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":304, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":305, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":306, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":307, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":308, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":309, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":310, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":311, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":312, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":313, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":314, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":315, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":316, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":317, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":318, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":319, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":320, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":321, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":322, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":323, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":324, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":325, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":326, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":327, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":328, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":329, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":330, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "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":334, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":335, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":336, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":337, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":338, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":339, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":340, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":341, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":342, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":343, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":344, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":345, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":346, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":347, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":348, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":349, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":350, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":351, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":352, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":353, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":354, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":355, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":356, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":357, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":358, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":359, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":360, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":361, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":362, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":363, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":364, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":365, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":366, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":367, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":368, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":369, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":370, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":371, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":372, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":373, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":374, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":375, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":376, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":377, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":378, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":379, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":380, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":381, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":382, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":383, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":384, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":385, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":386, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":387, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":388, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":389, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":390, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":391, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":392, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":393, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":394, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":395, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":396, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":397, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":398, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":399, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + + { + "id":400, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":401, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":402, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":403, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":404, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":405, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":406, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":407, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":408, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":409, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":410, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":411, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":412, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":413, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":414, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":415, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":416, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":417, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":418, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":419, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":420, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":421, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":422, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":423, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":424, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":425, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":426, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":427, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":428, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":429, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":430, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":431, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":432, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":433, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":434, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":435, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":436, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":437, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":438, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":439, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":440, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":441, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":442, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":443, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":444, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":445, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":446, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":447, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":448, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":449, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":450, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":451, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":452, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":453, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":454, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":455, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":456, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":457, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":458, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":459, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":460, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":461, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":462, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":463, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":464, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":465, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":466, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":467, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":468, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":469, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":470, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":471, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":472, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":473, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":474, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":475, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":476, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":477, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":478, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":479, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":480, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":481, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":482, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":483, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":484, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":485, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":486, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":487, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":488, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":489, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":490, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":491, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":492, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":493, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":494, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":495, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":496, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":497, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":498, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":499, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + + { + "id":500, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":501, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":502, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":503, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":504, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":505, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":506, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":507, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":508, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":509, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":510, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":511, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":512, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":513, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":514, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":515, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":516, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":517, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":518, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":519, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":520, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":521, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":522, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":523, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":524, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":525, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":526, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":527, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":528, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":529, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":530, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":531, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":532, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":533, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":534, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":535, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":536, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":537, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":538, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":539, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":540, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":541, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":542, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":543, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":544, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":545, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":546, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":547, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":548, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":549, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":550, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":551, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":552, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":553, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":554, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":555, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":556, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":557, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":558, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":559, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":560, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":561, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":562, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":563, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":564, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":565, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":566, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":567, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":568, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":569, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":570, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":571, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":572, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":573, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":574, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":575, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":576, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":577, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":578, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":579, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":580, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":581, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":582, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":583, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":584, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":585, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":586, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":587, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":588, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":589, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":590, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":591, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":592, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":593, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":594, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":595, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":596, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":597, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":598, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":599, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + + { + "id":600, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":601, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":602, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":603, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":604, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":605, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":606, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":607, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":608, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":609, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":610, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":611, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":612, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":613, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":614, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":615, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":616, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":617, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":618, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":619, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":620, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":621, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":622, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":623, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":624, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":625, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":626, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":627, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":628, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":629, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":630, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":631, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":632, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":633, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":634, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":635, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":636, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":637, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":638, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":639, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":640, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":641, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":642, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":643, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":644, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":645, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":646, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":647, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":648, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":649, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":650, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":651, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":652, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":653, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":654, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":655, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":656, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":657, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":658, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":659, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":660, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":661, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":662, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":663, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":664, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":665, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":666, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":667, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":668, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":669, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":670, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":671, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":672, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":673, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":674, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":675, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":676, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":677, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":678, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":679, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":680, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":681, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":682, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":683, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":684, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":685, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":686, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":687, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":688, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":689, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":690, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":691, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":692, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":693, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":694, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":695, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":696, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":697, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":698, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":699, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + + { + "id":700, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":701, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":702, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":703, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":704, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":705, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":706, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":707, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":708, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":709, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":710, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":711, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":712, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":713, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":714, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":715, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":716, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":717, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":718, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":719, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":720, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":721, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":722, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":723, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":724, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":725, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":726, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":727, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":728, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":729, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":730, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":731, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":732, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":733, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":734, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":735, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":736, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":737, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":738, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":739, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":740, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":741, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":742, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":743, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":744, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":745, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":746, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":747, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":748, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":749, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":750, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":751, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":752, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":753, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":754, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":755, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":756, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":757, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":758, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":759, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":760, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":761, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":762, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":763, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":764, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":765, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":766, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":767, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":768, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":769, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":770, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":771, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":772, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":773, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":774, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":775, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":776, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":777, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":778, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":779, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":780, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":781, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":782, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":783, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":784, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":785, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":786, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":787, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":788, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":789, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":790, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":791, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":792, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":793, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":794, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":795, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":796, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":797, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":798, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":799, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + + { + "id":800, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":801, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":802, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":803, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":804, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":805, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":806, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":807, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":808, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":809, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":810, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":811, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":812, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":813, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":814, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":815, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":816, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":817, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":818, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":819, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":820, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":821, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":822, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":823, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":824, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":825, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":826, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":827, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":828, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":829, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":830, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":831, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":832, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":833, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":834, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":835, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":836, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":837, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":838, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":839, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":840, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":841, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":842, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":843, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":844, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":845, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":846, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":847, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":848, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":849, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":850, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":851, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":852, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":853, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":854, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":855, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":856, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":857, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":858, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":859, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":860, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":861, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":862, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":863, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":864, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":865, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":866, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":867, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":868, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":869, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":870, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":871, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":872, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":873, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":874, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":875, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":876, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":877, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":878, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":879, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":880, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":881, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":882, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":883, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":884, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":885, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":886, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":887, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":888, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":889, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":890, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":891, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":892, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":893, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":894, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":895, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":896, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":897, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":898, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":899, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + + { + "id":900, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":901, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":902, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":903, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":904, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":905, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":906, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":907, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":908, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":909, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":910, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":911, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":912, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":913, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":914, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":915, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":916, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":917, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":918, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":919, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":920, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":921, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":922, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":923, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":924, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":925, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":926, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":927, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":928, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":929, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":930, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":931, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":932, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":933, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":934, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":935, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":936, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":937, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":938, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":939, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":940, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":941, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":942, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":943, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":944, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":945, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":946, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":947, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":948, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":949, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":950, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":951, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":952, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":953, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":954, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":955, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":956, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":957, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":958, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":959, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":960, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":961, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":962, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":963, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":964, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":965, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":966, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":967, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":968, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":969, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":970, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":971, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":972, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":973, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":974, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":975, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":976, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":977, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":978, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":979, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":980, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":981, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":982, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":983, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":984, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":985, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":986, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":987, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":988, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":989, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":990, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":991, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":992, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":993, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":994, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":995, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":996, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":997, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":998, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":999, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + + { + "id":1000, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1001, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1002, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1003, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1004, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1005, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1006, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1007, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1008, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1009, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1010, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1011, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1012, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1013, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1014, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1015, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1016, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1017, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1018, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1019, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1020, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1021, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1022, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1023, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1024, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1025, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1026, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1027, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1028, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1029, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1030, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1031, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1032, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1033, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1034, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1035, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1036, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1037, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1038, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1039, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1040, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1041, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1042, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1043, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1044, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1045, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1046, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1047, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1048, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1049, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1050, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1051, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1052, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1053, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1054, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1055, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1056, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1057, + "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":1060, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1061, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1062, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1063, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1064, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1065, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1066, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1067, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1068, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1069, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1070, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1071, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1072, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1073, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1074, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1075, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1076, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1077, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1078, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1079, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1080, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1081, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1082, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1083, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1084, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1085, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1086, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1087, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1088, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1089, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1090, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1091, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1092, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1093, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1094, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1095, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1096, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1097, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1098, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1099, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + + { + "id":1100, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "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":1105, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1106, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1107, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1108, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1109, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "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":1113, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1114, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1115, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1116, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1117, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1118, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1119, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1120, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1121, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1122, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1123, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1124, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1125, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1126, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1127, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1128, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1129, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1130, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1131, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1132, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1133, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1134, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1135, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1136, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1137, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1138, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1139, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1140, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1141, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1142, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1143, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1144, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1145, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "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":1152, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1153, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1154, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":true + }] + }, + { + "id":1155, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1156, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1157, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1158, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1159, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1160, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1161, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1162, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1163, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1164, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1165, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1166, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1167, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1168, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1169, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1170, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1171, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1172, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1173, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1174, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1175, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1176, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1177, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1178, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1179, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1180, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1181, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1182, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1183, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1184, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1185, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1186, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1187, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1188, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1189, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1190, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1191, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1192, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1193, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1194, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1195, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1196, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1197, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1198, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1199, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + + { + "id":1200, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1201, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1202, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1203, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1204, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1205, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1206, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1207, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1208, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1209, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1210, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1211, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1212, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1213, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1214, + "properties":[ + { + "name":"ge_collide", + "type":"bool", + "value":false + }] + }, + { + "id":1215, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1216, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1217, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1218, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1219, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1220, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1221, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1222, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1223, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1224, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1225, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1226, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1227, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1228, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1229, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1230, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1231, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1232, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1233, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1234, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1235, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1236, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1237, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1238, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1239, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1240, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1241, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1242, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1243, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1244, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1245, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1246, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1247, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1248, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1249, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1250, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1251, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1252, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1253, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1254, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1255, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1256, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1257, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1258, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":1259, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }], + "tilewidth":16 + }], + "tilewidth":16, + "type":"map", + "version":"1.10", + "width":100 +} \ No newline at end of file diff --git a/docs/assets/items/map/ccc/cloud_tileset.png b/docs/assets/items/map/ccc/cloud_tileset.png new file mode 100644 index 0000000..17f6dca Binary files /dev/null and b/docs/assets/items/map/ccc/cloud_tileset.png differ diff --git a/docs/assets/items/map/index.html b/docs/assets/items/map/index.html new file mode 100644 index 0000000..e69de29 diff --git a/docs/index.html b/docs/index.html index f1435b4..e4a377c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -27,4 +27,4 @@ Log in \ No newline at end of file + \ No newline at end of file